From c6a3315dc2168f8f5a815d7c9ba54a0a9375074b Mon Sep 17 00:00:00 2001 From: simonstadlinger Date: Wed, 23 Jun 2021 09:53:48 +0200 Subject: [PATCH 01/73] #1 Add create index support in the sql translator --- src/sql/CreateStatement.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sql/CreateStatement.h b/src/sql/CreateStatement.h index e88324f0..99d53f56 100755 --- a/src/sql/CreateStatement.h +++ b/src/sql/CreateStatement.h @@ -23,7 +23,8 @@ namespace hsql { enum CreateType { kCreateTable, kCreateTableFromTbl, // Hyrise file format - kCreateView + kCreateView, + kCreateIndex }; // Represents SQL Create statements. @@ -37,6 +38,7 @@ namespace hsql { char* filePath; // default: nullptr char* schema; // default: nullptr char* tableName; // default: nullptr + char* indexName; // default: nullptr std::vector* columns; // default: nullptr std::vector* viewColumns; SelectStatement* select; From 59007508e9a653be03e8b493a1a3ed9ceaec5a94 Mon Sep 17 00:00:00 2001 From: simonstadlinger Date: Tue, 29 Jun 2021 14:09:51 +0200 Subject: [PATCH 02/73] #1 Add basic create index support in bison parser --- src/parser/bison_parser.cpp | 2350 ++++++++++++++++++----------------- src/parser/bison_parser.h | 6 +- src/parser/bison_parser.y | 13 + src/sql/CreateStatement.h | 1 + 4 files changed, 1222 insertions(+), 1148 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 4e5f4a7e..c8d50121 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.7.4. */ +/* A Bison parser, made by GNU Bison 3.7.6. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -46,10 +46,10 @@ USER NAME SPACE" below. */ /* Identify Bison output, and Bison version. */ -#define YYBISON 30704 +#define YYBISON 30706 /* Bison version string. */ -#define YYBISON_VERSION "3.7.4" +#define YYBISON_VERSION "3.7.6" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -393,19 +393,20 @@ enum yysymbol_kind_t YYSYMBOL_table_ref_name = 259, /* table_ref_name */ YYSYMBOL_table_ref_name_no_alias = 260, /* table_ref_name_no_alias */ YYSYMBOL_table_name = 261, /* table_name */ - YYSYMBOL_table_alias = 262, /* table_alias */ - YYSYMBOL_opt_table_alias = 263, /* opt_table_alias */ - YYSYMBOL_alias = 264, /* alias */ - YYSYMBOL_opt_alias = 265, /* opt_alias */ - YYSYMBOL_opt_with_clause = 266, /* opt_with_clause */ - YYSYMBOL_with_clause = 267, /* with_clause */ - YYSYMBOL_with_description_list = 268, /* with_description_list */ - YYSYMBOL_with_description = 269, /* with_description */ - YYSYMBOL_join_clause = 270, /* join_clause */ - YYSYMBOL_opt_join_type = 271, /* opt_join_type */ - YYSYMBOL_join_condition = 272, /* join_condition */ - YYSYMBOL_opt_semicolon = 273, /* opt_semicolon */ - YYSYMBOL_ident_commalist = 274 /* ident_commalist */ + YYSYMBOL_opt_index_name = 262, /* opt_index_name */ + YYSYMBOL_table_alias = 263, /* table_alias */ + YYSYMBOL_opt_table_alias = 264, /* opt_table_alias */ + YYSYMBOL_alias = 265, /* alias */ + YYSYMBOL_opt_alias = 266, /* opt_alias */ + YYSYMBOL_opt_with_clause = 267, /* opt_with_clause */ + YYSYMBOL_with_clause = 268, /* with_clause */ + YYSYMBOL_with_description_list = 269, /* with_description_list */ + YYSYMBOL_with_description = 270, /* with_description */ + YYSYMBOL_join_clause = 271, /* join_clause */ + YYSYMBOL_opt_join_type = 272, /* opt_join_type */ + YYSYMBOL_join_condition = 273, /* join_condition */ + YYSYMBOL_opt_semicolon = 274, /* opt_semicolon */ + YYSYMBOL_ident_commalist = 275 /* ident_commalist */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -449,6 +450,18 @@ typedef int_least16_t yytype_int16; typedef short yytype_int16; #endif +/* Work around bug in HP-UX 11.23, which defines these macros + incorrectly for preprocessor constants. This workaround can likely + be removed in 2023, as HPE has promised support for HP-UX 11.23 + (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of + . */ +#ifdef __hpux +# undef UINT_LEAST8_MAX +# undef UINT_LEAST16_MAX +# define UINT_LEAST8_MAX 255 +# define UINT_LEAST16_MAX 65535 +#endif + #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ @@ -546,9 +559,9 @@ typedef int yy_state_fast_t; /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) +# define YY_USE(E) ((void) (E)) #else -# define YYUSE(E) /* empty */ +# define YY_USE(E) /* empty */ #endif #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ @@ -716,18 +729,18 @@ union yyalloc #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 62 +#define YYFINAL 63 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 721 +#define YYLAST 791 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 169 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 106 +#define YYNNTS 107 /* YYNRULES -- Number of rules. */ -#define YYNRULES 262 +#define YYNRULES 265 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 474 +#define YYNSTATES 483 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 406 @@ -791,33 +804,33 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 269, 269, 290, 296, 305, 309, 313, 316, 319, - 326, 327, 328, 329, 330, 331, 332, 333, 334, 343, - 344, 349, 350, 354, 358, 370, 373, 376, 382, 383, - 390, 397, 400, 404, 418, 424, 433, 450, 454, 457, - 466, 480, 483, 488, 502, 515, 522, 529, 540, 541, - 545, 546, 550, 556, 557, 558, 559, 560, 561, 562, - 563, 564, 565, 569, 570, 571, 581, 587, 593, 601, - 602, 611, 620, 633, 640, 651, 652, 662, 671, 672, - 676, 688, 692, 696, 710, 711, 714, 715, 726, 727, - 731, 741, 754, 761, 765, 769, 776, 779, 785, 797, - 798, 802, 806, 807, 811, 816, 817, 821, 826, 830, - 831, 835, 836, 840, 841, 845, 849, 850, 851, 857, - 858, 862, 863, 864, 865, 866, 867, 874, 875, 879, - 880, 884, 885, 889, 899, 900, 901, 902, 903, 907, - 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, - 921, 922, 926, 927, 928, 929, 930, 934, 935, 936, - 937, 938, 939, 940, 941, 942, 943, 944, 948, 949, - 953, 954, 955, 956, 962, 963, 964, 965, 969, 970, - 974, 975, 979, 980, 981, 982, 983, 984, 985, 989, - 990, 994, 998, 1002, 1003, 1004, 1005, 1006, 1007, 1011, - 1015, 1019, 1023, 1024, 1025, 1026, 1030, 1031, 1032, 1033, - 1034, 1038, 1042, 1043, 1047, 1048, 1052, 1056, 1060, 1072, - 1073, 1083, 1084, 1088, 1089, 1098, 1099, 1104, 1115, 1124, - 1125, 1130, 1131, 1136, 1137, 1142, 1143, 1148, 1149, 1158, - 1159, 1163, 1167, 1171, 1178, 1191, 1199, 1209, 1228, 1229, - 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1242, 1251, - 1252, 1257, 1258 + 0, 270, 270, 291, 297, 306, 310, 314, 317, 320, + 327, 328, 329, 330, 331, 332, 333, 334, 335, 344, + 345, 350, 351, 355, 359, 371, 374, 377, 383, 384, + 391, 398, 401, 405, 419, 425, 434, 451, 455, 458, + 467, 481, 484, 489, 503, 516, 523, 530, 537, 548, + 549, 553, 554, 558, 564, 565, 566, 567, 568, 569, + 570, 571, 572, 573, 577, 578, 579, 589, 595, 601, + 609, 610, 619, 628, 641, 648, 659, 660, 670, 679, + 680, 684, 696, 700, 704, 718, 719, 722, 723, 734, + 735, 739, 749, 762, 769, 773, 777, 784, 787, 793, + 805, 806, 810, 814, 815, 819, 824, 825, 829, 834, + 838, 839, 843, 844, 848, 849, 853, 857, 858, 859, + 865, 866, 870, 871, 872, 873, 874, 875, 882, 883, + 887, 888, 892, 893, 897, 907, 908, 909, 910, 911, + 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, + 925, 929, 930, 934, 935, 936, 937, 938, 942, 943, + 944, 945, 946, 947, 948, 949, 950, 951, 952, 956, + 957, 961, 962, 963, 964, 970, 971, 972, 973, 977, + 978, 982, 983, 987, 988, 989, 990, 991, 992, 993, + 997, 998, 1002, 1006, 1010, 1011, 1012, 1013, 1014, 1015, + 1019, 1023, 1027, 1031, 1032, 1033, 1034, 1038, 1039, 1040, + 1041, 1042, 1046, 1050, 1051, 1055, 1056, 1060, 1064, 1068, + 1080, 1081, 1091, 1092, 1096, 1097, 1106, 1107, 1112, 1123, + 1132, 1133, 1137, 1138, 1143, 1144, 1149, 1150, 1155, 1156, + 1161, 1162, 1171, 1172, 1176, 1180, 1184, 1191, 1204, 1212, + 1222, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, + 1250, 1255, 1264, 1265, 1270, 1271 }; #endif @@ -879,7 +892,7 @@ static const char *const yytname[] = "string_literal", "bool_literal", "num_literal", "int_literal", "null_literal", "param_expr", "table_ref", "table_ref_atomic", "nonjoin_table_ref_atomic", "table_ref_commalist", "table_ref_name", - "table_ref_name_no_alias", "table_name", "table_alias", + "table_ref_name_no_alias", "table_name", "opt_index_name", "table_alias", "opt_table_alias", "alias", "opt_alias", "opt_with_clause", "with_clause", "with_description_list", "with_description", "join_clause", "opt_join_type", "join_condition", "opt_semicolon", @@ -918,12 +931,12 @@ static const yytype_int16 yytoknum[] = }; #endif -#define YYPACT_NINF (-318) +#define YYPACT_NINF (-364) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF (-260) +#define YYTABLE_NINF (-263) #define yytable_value_is_error(Yyn) \ ((Yyn) == YYTABLE_NINF) @@ -932,54 +945,55 @@ static const yytype_int16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - 511, 7, 39, 125, 147, 39, -37, 71, 95, 103, - 39, 39, -19, 6, 225, 96, 96, 96, 237, 72, - -318, 150, -318, 150, -318, -318, -318, -318, -318, -318, - -318, -318, -318, -318, -318, 10, -318, 246, 135, -318, - 98, 190, -318, 179, 179, 39, 307, 39, 195, -318, - -63, 192, 192, 39, -318, 200, 158, -318, -318, -318, - -318, -318, -318, 506, -318, 245, -318, -318, 219, 10, - 20, -318, 26, -318, 338, 9, 341, 226, 39, 39, - 268, -318, 261, 189, 350, 351, 351, 313, 39, 39, - -318, 194, 225, -318, 196, 352, 349, 198, 199, -318, - -318, -318, 10, 264, 254, 10, 45, -318, -318, -318, - -318, -318, -318, -318, -318, 212, 211, -318, -318, -318, - -318, -318, -318, -318, -318, -318, 339, -62, 189, 248, - -318, 351, 378, 66, 240, -57, -318, 278, -318, 278, - -318, -318, -318, -318, -318, 385, -318, -318, 248, -318, - -318, 320, -318, -318, 20, -318, -318, 248, 320, 248, - 79, -318, -318, 9, -318, 394, 291, 396, 281, -122, - 242, 244, 247, 149, 280, 239, 326, -318, 227, 2, - 353, -318, -318, -318, -318, -318, -318, -318, -318, -318, - -318, -318, -318, -318, -318, -318, -318, 321, -318, -86, - 250, -318, 248, 350, -318, 371, -318, -318, 257, 30, - -318, 328, 255, -318, 36, 45, 10, 256, -318, -34, - 45, 2, 377, -16, -318, 333, -318, 310, 58, -318, - 291, 8, 14, 375, 161, 248, 248, 117, 133, 266, - 326, 541, 248, 44, 269, -55, 248, 248, 326, -318, - 326, -8, 267, -54, 326, 326, 326, 326, 326, 326, - 326, 326, 326, 326, 326, 326, 326, 326, 326, 352, - 39, -318, 429, 9, 2, -318, 307, 9, -318, 385, - 13, 268, -318, 248, -318, 431, -318, -318, -318, -318, - 248, -318, -318, -318, -318, 248, 248, 351, -318, 276, - -318, -318, 282, -318, -318, -318, -318, -318, 90, -318, - 396, -318, -318, 248, -318, -318, 283, -318, -318, -318, - -318, -318, -318, 357, 172, 77, 134, 248, 248, -318, - 375, 344, 97, -318, -318, -318, 340, 475, 560, 326, - 288, 227, -318, 354, 295, 560, 560, 560, 560, 425, - 425, 425, 425, 44, 44, 55, 55, 55, -94, 290, - -318, -318, 108, -318, 142, -318, 291, -318, -3, -318, - 293, -318, 29, -318, 392, -318, -318, -318, 2, 2, - -318, 452, 455, -318, 363, -318, -318, 144, -318, 248, - 310, 248, 248, -318, 114, 140, 299, -318, 326, 560, - 227, 302, 151, -318, -318, -318, -318, 303, 374, -318, - -318, -318, 397, 398, 399, 379, 13, 472, -318, -318, - -318, 358, -318, 314, 316, -318, -318, 48, 322, 2, - 146, -318, 248, -318, 541, 323, 152, -318, -318, 29, - 13, -318, -318, -318, 13, 277, 325, 248, -318, -318, - -318, -318, -318, 2, -318, -318, -318, -318, 364, 378, - -22, 329, 248, 160, 248, -318, 15, 2, -318, -318, - 2, 330, 327, -318 + 473, 57, 112, 159, 162, 112, -33, 37, 86, 90, + 112, 112, -13, 8, 174, 50, 50, 50, 203, 27, + -364, 102, -364, 102, -364, -364, -364, -364, -364, -364, + -364, -364, -364, -364, -364, -32, -364, 213, 52, -364, + 65, 150, -364, 237, 128, 128, 112, 271, 112, 179, + -364, -55, 207, 207, 112, -364, 191, 145, -364, -364, + -364, -364, -364, -364, 468, -364, 226, -364, -364, 202, + -32, 29, -364, 26, -364, 328, 13, 333, -364, 128, + 239, 112, 112, 275, -364, 268, 216, 363, 366, 366, + 331, 112, 112, -364, 224, 174, -364, 230, 379, 382, + 232, 234, -364, -364, -364, -32, 290, 279, -32, 111, + -364, -364, -364, -364, -364, -364, -364, -364, 238, 236, + -364, -364, -364, -364, -364, -364, -364, -364, -364, 278, + 364, -60, 216, 253, -364, 366, 403, 32, 269, -56, + -364, 305, -364, 305, -364, -364, -364, -364, -364, 412, + -364, -364, 253, -364, -364, 345, -364, -364, 29, -364, + -364, 253, 345, 253, 75, -364, -364, 13, 112, -364, + 415, 318, 419, 307, 141, 265, 266, 267, 154, 285, + 272, 281, -364, 220, -63, 315, -364, -364, -364, -364, + -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, + -364, -364, 339, -364, -123, 280, -364, 253, 363, -364, + 390, -364, -364, 284, 77, -364, 346, 283, -364, 72, + 111, -32, 287, -364, 109, 111, -63, 392, -26, -364, + 288, 367, -364, 677, 84, -364, 318, 14, 10, 399, + 209, 253, 253, 79, 121, 293, 281, 503, 253, 119, + 294, -71, 253, 253, 281, -364, 281, -2, 301, 156, + 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, + 281, 281, 281, 281, 281, 379, 112, -364, 454, 13, + -63, -364, 271, 13, -364, 412, 9, 275, -364, 253, + -364, 462, -364, -364, -364, -364, 253, -364, -364, -364, + -364, 253, 253, 403, 366, -364, 314, -364, -364, 316, + -364, -364, -364, -364, -364, 199, -364, 419, -364, -364, + 253, -364, -364, 317, -364, -364, -364, -364, -364, -364, + 389, 78, 142, 123, 253, 253, -364, 399, 386, -38, + -364, -364, -364, 374, 437, 522, 281, 322, 220, -364, + 388, 330, 522, 522, 522, 522, 541, 541, 541, 541, + 119, 119, -94, -94, -94, -84, 327, -364, -364, 183, + -364, 184, -364, 318, -364, 33, -364, 325, -364, 34, + -364, 428, -364, -364, -364, -63, -63, 190, -364, 490, + 491, -364, 402, -364, -364, 196, -364, 253, 677, 253, + 253, -364, 189, 144, 334, -364, 281, 522, 220, 338, + 204, -364, -364, -364, -364, 342, 413, -364, -364, -364, + 438, 439, 440, 416, 9, 511, -364, -364, -364, 396, + -364, -364, 354, 355, -364, -364, -39, 358, -63, 193, + -364, 253, -364, 503, 359, 214, -364, -364, 34, 9, + -364, -364, -364, 9, 240, 361, 253, -364, -364, -364, + -364, -364, -63, -364, -364, -364, -364, 300, 403, -14, + 362, 253, 222, 253, -364, 11, -63, -364, -364, -63, + 365, 368, -364 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -987,86 +1001,87 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_int16 yydefact[] = { - 240, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 29, 29, 29, 0, 260, + 243, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 29, 29, 29, 0, 263, 3, 20, 18, 20, 17, 8, 9, 7, 11, 16, - 13, 14, 12, 15, 10, 0, 239, 0, 229, 72, - 32, 0, 43, 49, 49, 0, 0, 0, 0, 228, - 0, 70, 70, 0, 41, 0, 241, 242, 28, 25, - 27, 26, 1, 240, 2, 0, 6, 5, 120, 0, - 81, 82, 112, 68, 0, 130, 0, 0, 0, 0, - 106, 36, 0, 76, 0, 0, 0, 0, 0, 0, - 42, 0, 0, 4, 0, 0, 100, 0, 0, 94, - 95, 93, 0, 97, 0, 0, 126, 230, 211, 214, - 216, 217, 212, 213, 218, 0, 129, 131, 206, 207, - 208, 215, 209, 210, 31, 30, 0, 0, 76, 0, - 71, 0, 0, 0, 0, 106, 78, 39, 37, 39, - 69, 66, 67, 244, 243, 0, 119, 99, 0, 89, - 88, 112, 85, 84, 86, 96, 92, 0, 112, 0, - 0, 90, 33, 0, 48, 0, 240, 0, 0, 202, - 0, 0, 0, 0, 0, 0, 0, 204, 0, 105, - 134, 141, 142, 143, 136, 138, 144, 137, 157, 145, - 146, 147, 148, 140, 135, 150, 151, 0, 261, 0, - 0, 74, 0, 0, 77, 0, 35, 40, 23, 0, - 21, 103, 101, 127, 238, 126, 0, 111, 113, 118, - 126, 122, 124, 121, 132, 0, 46, 0, 0, 50, - 240, 100, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 153, 0, 152, 0, 0, 0, 0, 0, 154, + 13, 14, 12, 15, 10, 0, 242, 0, 230, 73, + 32, 0, 43, 233, 50, 50, 0, 0, 0, 0, + 229, 0, 71, 71, 0, 41, 0, 244, 245, 28, + 25, 27, 26, 1, 243, 2, 0, 6, 5, 121, + 0, 82, 83, 113, 69, 0, 131, 0, 232, 50, + 0, 0, 0, 107, 36, 0, 77, 0, 0, 0, + 0, 0, 0, 42, 0, 0, 4, 0, 0, 101, + 0, 0, 95, 96, 94, 0, 98, 0, 0, 127, + 231, 212, 215, 217, 218, 213, 214, 219, 0, 130, + 132, 207, 208, 209, 216, 210, 211, 31, 30, 0, + 0, 0, 77, 0, 72, 0, 0, 0, 0, 107, + 79, 39, 37, 39, 70, 67, 68, 247, 246, 0, + 120, 100, 0, 90, 89, 113, 86, 85, 87, 97, + 93, 0, 113, 0, 0, 91, 33, 0, 0, 49, + 0, 243, 0, 0, 203, 0, 0, 0, 0, 0, + 0, 0, 205, 0, 106, 135, 142, 143, 144, 137, + 139, 145, 138, 158, 146, 147, 148, 149, 141, 136, + 151, 152, 0, 264, 0, 0, 75, 0, 0, 78, + 0, 35, 40, 23, 0, 21, 104, 102, 128, 241, + 127, 0, 112, 114, 119, 127, 123, 125, 122, 133, + 0, 0, 46, 0, 0, 51, 243, 101, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 154, 0, 153, + 0, 0, 0, 0, 0, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 75, 0, 0, 80, 79, 0, 0, 19, 0, - 0, 106, 102, 0, 236, 0, 237, 133, 83, 87, - 0, 117, 116, 115, 91, 0, 0, 0, 54, 0, - 57, 56, 0, 62, 61, 55, 60, 53, 65, 45, - 0, 47, 189, 0, 203, 205, 0, 193, 194, 195, - 196, 197, 198, 0, 0, 0, 0, 0, 0, 176, - 0, 0, 0, 149, 139, 168, 169, 0, 164, 0, - 0, 0, 155, 0, 167, 166, 182, 183, 184, 185, - 186, 187, 188, 159, 158, 161, 160, 162, 163, 0, - 34, 262, 0, 38, 0, 22, 240, 104, 219, 221, - 0, 223, 234, 222, 108, 128, 235, 114, 125, 123, - 44, 0, 0, 63, 0, 52, 51, 0, 180, 0, - 0, 0, 0, 174, 0, 0, 0, 199, 0, 165, - 0, 0, 0, 156, 200, 73, 24, 0, 0, 256, - 248, 254, 252, 255, 250, 0, 0, 0, 233, 227, - 231, 0, 98, 0, 0, 64, 190, 0, 0, 178, - 0, 177, 0, 181, 201, 0, 0, 172, 170, 234, - 0, 251, 253, 249, 0, 220, 235, 0, 58, 59, - 191, 192, 175, 179, 173, 171, 224, 245, 257, 0, - 110, 0, 0, 0, 0, 107, 0, 258, 246, 232, - 109, 202, 0, 247 + 0, 0, 0, 0, 0, 0, 0, 76, 0, 0, + 81, 80, 0, 0, 19, 0, 0, 107, 103, 0, + 239, 0, 240, 134, 84, 88, 0, 118, 117, 116, + 92, 0, 0, 0, 0, 55, 0, 58, 57, 0, + 63, 62, 56, 61, 54, 66, 45, 0, 48, 190, + 0, 204, 206, 0, 194, 195, 196, 197, 198, 199, + 0, 0, 0, 0, 0, 0, 177, 0, 0, 0, + 150, 140, 169, 170, 0, 165, 0, 0, 0, 156, + 0, 168, 167, 183, 184, 185, 186, 187, 188, 189, + 160, 159, 162, 161, 163, 164, 0, 34, 265, 0, + 38, 0, 22, 243, 105, 220, 222, 0, 224, 237, + 223, 109, 129, 238, 115, 126, 124, 0, 44, 0, + 0, 64, 0, 53, 52, 0, 181, 0, 0, 0, + 0, 175, 0, 0, 0, 200, 0, 166, 0, 0, + 0, 157, 201, 74, 24, 0, 0, 259, 251, 257, + 255, 258, 253, 0, 0, 0, 236, 228, 234, 0, + 99, 47, 0, 0, 65, 191, 0, 0, 179, 0, + 178, 0, 182, 202, 0, 0, 173, 171, 237, 0, + 254, 256, 252, 0, 221, 238, 0, 59, 60, 192, + 193, 176, 180, 174, 172, 225, 248, 260, 0, 111, + 0, 0, 0, 0, 108, 0, 261, 249, 235, 110, + 203, 0, 250 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -318, -318, -318, 422, -318, 470, -318, 217, -318, 166, - -318, -318, -318, -318, 241, -78, 376, -318, -318, -318, - 458, -318, 193, 126, -318, -318, 467, -318, -318, -318, - 395, -318, -318, 317, -156, -48, -318, 88, -64, -49, - -318, -318, -65, 294, -318, -318, -318, -116, -318, -318, - 35, -318, 232, -318, -318, 61, -238, -318, -173, 251, - -129, -124, -318, -318, -318, -318, -318, -318, 292, -318, - -318, -318, -318, -318, -318, -318, -318, -318, 64, -66, - -84, -318, -318, -88, -318, -318, -318, -317, 87, -318, - -318, -318, 1, -318, 92, 331, -318, -318, -318, -318, - 443, -318, -318, -318, -318, 80 + -364, -364, -364, 463, -364, 505, -364, 244, -364, 118, + -364, -364, -364, -364, 252, -83, 393, -364, -364, -364, + 3, -364, 218, 139, -364, -364, 485, -364, -364, -364, + 407, -364, -364, 332, -166, -88, -364, 19, -69, -48, + -364, -364, -65, 304, -364, -364, -364, -116, -364, -364, + 25, -364, 246, -364, -364, 12, -244, -364, -37, 254, + -133, -124, -364, -364, -364, -364, -364, -364, 302, -364, + -364, -364, -364, -364, -364, -364, -364, -364, 69, -68, + -86, -364, -364, -89, -364, -364, -364, -363, 97, -364, + -364, -364, 5, -364, -364, 100, 337, -364, -364, -364, + -364, 456, -364, -364, -364, -364, -292 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 18, 19, 20, 21, 66, 209, 210, 22, 59, - 23, 125, 24, 25, 82, 137, 206, 26, 27, 28, - 78, 228, 229, 308, 385, 29, 88, 30, 31, 32, - 133, 33, 135, 136, 34, 151, 152, 153, 71, 102, - 103, 156, 72, 148, 211, 281, 282, 130, 422, 465, - 106, 217, 218, 293, 96, 161, 212, 115, 116, 213, - 214, 180, 181, 182, 183, 184, 185, 186, 238, 187, - 188, 189, 190, 191, 323, 192, 193, 194, 195, 196, - 118, 119, 120, 121, 122, 123, 367, 368, 369, 370, - 371, 48, 372, 418, 419, 420, 287, 35, 36, 56, - 57, 373, 415, 468, 64, 199 + 0, 18, 19, 20, 21, 67, 214, 215, 22, 60, + 23, 128, 24, 25, 85, 141, 211, 26, 27, 28, + 81, 234, 235, 315, 393, 29, 91, 30, 31, 32, + 137, 33, 139, 140, 34, 155, 156, 157, 72, 105, + 106, 160, 73, 152, 216, 287, 288, 134, 430, 474, + 109, 222, 223, 299, 99, 165, 217, 118, 119, 218, + 219, 185, 186, 187, 188, 189, 190, 191, 244, 192, + 193, 194, 195, 196, 330, 197, 198, 199, 200, 201, + 121, 122, 123, 124, 125, 126, 374, 375, 376, 377, + 378, 49, 379, 79, 426, 427, 428, 293, 35, 36, + 57, 58, 380, 423, 477, 65, 204 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1074,156 +1089,170 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 179, 138, 138, 39, 332, 98, 42, 146, 139, 117, - 226, 49, 50, 108, 109, 110, 38, 314, 471, 204, - 147, 129, 408, 105, 464, 53, 85, 165, 219, 99, - 221, 223, 284, 37, 296, 99, 254, 154, 43, 284, - 154, 231, 38, 232, 237, 342, 80, 138, 83, 245, - 241, 291, 243, 197, 90, 246, 51, 158, 166, 409, - 100, 54, 343, 68, 410, 86, 100, 269, 44, 201, - 411, 412, 247, 274, 311, 387, 246, 292, 271, 127, - 128, 272, 169, 108, 109, 110, 52, 413, 339, 141, - 142, -257, 414, 247, 246, 159, 101, 224, 104, 445, - 362, 167, 101, 402, 364, 216, 324, 325, 111, 334, - 203, 247, 246, 160, 244, 340, 241, 335, 336, 68, - 170, 171, 172, 70, 337, 200, 338, 458, 40, 247, - 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, - 354, 355, 356, 357, 358, 283, 246, 112, 113, 417, - 41, 154, 169, 108, 109, 110, 285, 97, 246, 173, - 45, 219, 436, 247, -225, 374, 378, 379, 289, 316, - 315, 177, 312, 69, 254, 247, 366, 114, 111, 143, - 391, 359, 60, 61, 46, 254, 215, 246, 222, 383, - 170, 171, 172, 220, 278, 174, 47, 279, 394, 395, - 265, 266, 267, 268, 247, 269, 384, 117, 175, 460, - 407, 117, 450, 138, 268, 399, 269, 112, 113, 380, - 327, 392, 309, 236, 246, 310, 431, 246, 55, 173, - 169, 108, 109, 110, 176, 177, 58, 62, 63, 328, - 328, 247, 178, 432, 247, 329, 393, 114, 111, 73, - 246, 169, 108, 109, 110, 236, 246, 65, 452, 397, - 427, 75, 429, 430, 283, 174, 396, 247, 170, 171, - 172, 360, 405, 247, 434, 163, 288, 401, 175, 76, - 68, 294, 246, 169, 108, 109, 110, 112, 113, 170, - 171, 172, 390, 317, 318, 319, 320, 321, 322, 247, - 74, 77, 408, 453, 176, 177, 406, 173, 426, 163, - 81, 283, 178, 84, 87, 438, 455, 114, 283, 283, - 91, 239, 171, 172, 469, 92, 111, 272, 173, 169, - 108, 109, 110, 467, 298, 470, 435, 94, 95, 409, - 299, 107, 126, 174, 410, 124, 129, 111, 300, 131, - 411, 412, 132, 134, 140, 108, 175, 69, 110, 145, - 173, 147, 149, 150, 174, 112, 113, 413, 171, 172, - 248, -257, 414, 155, 301, 157, 162, 175, 163, 111, - 164, 198, 176, 177, 202, 205, 112, 113, 208, 408, - 178, 302, 104, 303, 304, 114, 240, 225, 14, 227, - 242, 230, 249, 176, 177, 233, 173, 234, 305, 175, - 235, 178, 306, 273, 270, 276, 114, 280, 112, 113, - 277, 297, 283, 290, 307, 111, 409, 295, 68, 330, - 341, 410, 361, 333, 376, 176, 177, 411, 412, 381, - 339, 461, 240, 178, -226, 382, 389, 388, 114, 250, - 246, 400, 404, 403, 413, 175, 269, 421, 423, 414, - 416, 424, 425, 433, 112, 113, 437, 439, 440, 251, - 441, 442, 443, 444, 249, 446, 252, 253, 448, 447, - 449, 176, 177, 254, 255, 93, 451, 454, 459, 178, - 462, 473, 466, 67, 114, 232, 365, 256, 257, 258, - 259, 260, 79, 386, 261, 262, -259, 263, 264, 265, - 266, 267, 268, 1, 269, 207, 428, 363, 1, 89, - 275, 2, 377, 168, 249, 313, 2, 457, 3, 326, - 472, 456, 4, 3, 375, 144, 0, 4, 5, 463, - 0, 6, 7, 5, 0, 286, 6, 7, 0, 253, - 0, 0, 0, 8, 9, 254, 0, 0, 8, 9, - 0, 0, 0, 0, 10, 0, 0, 0, 0, 10, - 0, 250, -260, -260, 0, 0, -260, -260, 0, 263, - 264, 265, 266, 267, 268, 398, 269, 0, 11, 0, - 249, 331, 12, 11, 0, 0, 0, 12, 0, 253, - 0, 0, 0, 0, 0, 254, 255, 13, 0, 249, - 0, 0, 13, 14, 0, 0, 0, 0, 14, 256, - 257, 258, 259, 260, 0, 0, 261, 262, 0, 263, - 264, 265, 266, 267, 268, 0, 269, 250, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 15, 16, 17, - 0, 0, 15, 16, 17, 0, -260, 331, 0, 0, - 0, 0, 0, 0, 0, 253, 0, 0, 0, 0, - 0, 254, 255, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 253, 256, 257, 258, 259, 260, - 254, -260, 261, 262, 0, 263, 264, 265, 266, 267, - 268, 0, 269, 0, -260, -260, -260, 259, 260, 0, - 0, 261, 262, 0, 263, 264, 265, 266, 267, 268, - 0, 269 + 184, 101, 142, 142, 339, 232, 143, 39, 120, 150, + 42, 387, 38, 321, 480, 50, 51, 111, 112, 113, + 162, 69, 133, 209, 302, 108, 151, 54, 224, 170, + 226, 228, 473, 43, 88, 102, 260, 290, 102, 252, + 158, 277, 44, 158, 278, 243, 260, 252, 82, 142, + 251, 83, 202, 86, 71, 247, 253, 249, 416, 93, + 171, 454, 52, 55, 253, 274, 103, 275, 206, 103, + 318, 252, 45, 89, 280, 290, 395, 275, 174, 111, + 112, 113, 129, 37, 252, 69, 131, 132, 253, 100, + 467, 205, 53, 341, 346, 417, 145, 146, 107, 229, + 418, 253, 104, 172, 410, 104, 419, 420, 331, 332, + 221, 208, 114, 147, 250, 38, 175, 176, 177, 342, + 343, 347, 247, 421, 405, 459, 46, -260, 422, 289, + 344, 70, 345, 295, 61, 62, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, + 365, 115, 116, 289, 425, 178, 158, 174, 111, 112, + 113, 163, 40, 224, 445, 41, 322, 182, 385, 386, + 323, 381, 373, 230, 114, 47, 472, 56, 319, 164, + 220, 117, 252, 48, 227, 242, 366, 225, 252, 252, + 59, 179, 291, 64, 297, 175, 176, 177, 398, 253, + -226, 402, 403, 63, 180, 253, 253, 415, 334, 66, + 400, 120, 469, 115, 116, 120, 74, 75, 142, 252, + 298, 388, 407, 174, 111, 112, 113, 335, 76, 335, + 181, 182, 294, 336, 178, 401, 253, 300, 183, 77, + 78, 284, 369, 117, 285, 399, 371, 441, 316, 260, + 80, 317, 252, 114, 252, 349, 174, 111, 112, 113, + 242, 175, 176, 177, 436, 416, 438, 439, 404, 253, + 179, 253, 350, 69, 84, 271, 272, 273, 274, 409, + 275, 367, 443, 180, 174, 111, 112, 113, 174, 111, + 112, 113, 115, 116, 175, 176, 177, 87, 391, 252, + 178, 440, 417, 252, 237, 461, 238, 418, 462, 181, + 182, 94, 95, 419, 420, 392, 253, 183, 97, 114, + 253, 98, 117, 176, 177, 416, 245, 176, 177, 90, + 421, 110, 254, 178, -260, 422, 179, 127, 476, 444, + 479, 324, 325, 326, 327, 328, 329, 413, 414, 180, + 167, 167, 114, 133, 431, 130, 135, 278, 115, 116, + 435, 178, 417, 289, 255, 178, 138, 418, 447, 179, + 111, 289, 144, 419, 420, 181, 182, 470, 464, 136, + 114, 289, 180, 183, 114, 113, 478, 70, 117, 278, + 421, 115, 116, 149, 151, 422, 153, 246, 154, 159, + 161, 246, 166, 167, 168, 169, 203, -227, 181, 182, + 180, 256, 210, 207, 180, 213, 183, 107, 231, 115, + 116, 117, 233, 115, 116, 14, 471, 236, 239, 240, + 241, 257, 276, 248, 282, 286, 181, 182, 258, 259, + 181, 182, 301, 279, 183, 260, 261, 283, 183, 117, + 289, 303, 69, 117, 296, 304, 337, 368, 340, 262, + 263, 264, 265, 266, 348, 383, 267, 268, -262, 269, + 270, 271, 272, 273, 274, 1, 275, 389, 397, 390, + 1, 396, 346, 2, 252, 408, 255, 411, 2, 412, + 3, 275, 424, 429, 4, 3, 432, 433, 442, 4, + 5, 434, 446, 6, 7, 5, 448, 449, 6, 7, + 453, 450, 451, 452, 455, 8, 9, 456, 457, 458, + 8, 9, 460, 463, 468, 475, 10, 96, 68, 372, + 238, 10, 482, 256, 370, 394, 212, 437, 92, 173, + 281, 320, 384, 382, 481, 333, 466, 406, 465, 0, + 11, 148, 255, 338, 12, 11, 292, 0, 0, 12, + 0, 259, 0, 0, 0, 0, 0, 260, 261, 13, + 0, 255, 0, 0, 13, 14, 0, 0, 0, 0, + 14, 262, 263, 264, 265, 266, 0, 0, 267, 268, + 255, 269, 270, 271, 272, 273, 274, 0, 275, 256, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, + 16, 17, 0, 0, 15, 16, 17, 0, -263, 338, + 0, 0, 0, 0, 0, 0, 0, 259, 0, 0, + 0, 0, 0, 260, 261, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 259, 262, 263, 264, + 265, 266, 260, -263, 267, 268, 0, 269, 270, 271, + 272, 273, 274, 0, 275, 259, -263, -263, -263, 265, + 266, 260, 0, 267, 268, 0, 269, 270, 271, 272, + 273, 274, 0, 275, 0, 0, 0, 0, -263, -263, + 0, 0, -263, -263, 0, 269, 270, 271, 272, 273, + 274, 305, 275, 0, 0, 0, 0, 306, 0, 0, + 0, 0, 0, 0, 0, 307, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 308, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 309, 0, + 310, 311, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 312, 0, 0, 0, 313, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 314 }; static const yytype_int16 yycheck[] = { - 129, 85, 86, 2, 242, 69, 5, 95, 86, 75, - 166, 10, 11, 4, 5, 6, 3, 3, 3, 135, - 12, 78, 25, 72, 46, 19, 89, 89, 157, 9, - 159, 160, 3, 26, 50, 9, 130, 102, 75, 3, - 105, 163, 3, 165, 173, 99, 45, 131, 47, 178, - 174, 85, 176, 131, 53, 110, 75, 105, 120, 62, - 40, 55, 116, 53, 67, 128, 40, 161, 105, 133, - 73, 74, 127, 202, 230, 313, 110, 111, 164, 78, - 79, 167, 3, 4, 5, 6, 105, 90, 96, 88, - 89, 94, 95, 127, 110, 50, 76, 163, 72, 416, - 273, 163, 76, 341, 277, 154, 235, 236, 99, 164, - 167, 127, 110, 68, 178, 123, 240, 246, 247, 53, - 41, 42, 43, 35, 248, 59, 250, 444, 3, 127, - 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, - 264, 265, 266, 267, 268, 167, 110, 138, 139, 120, - 3, 216, 3, 4, 5, 6, 120, 69, 110, 80, - 89, 290, 400, 127, 167, 281, 295, 296, 216, 233, - 156, 156, 164, 163, 130, 127, 163, 168, 99, 91, - 103, 269, 16, 17, 89, 130, 151, 110, 109, 99, - 41, 42, 43, 158, 164, 116, 93, 167, 327, 328, - 156, 157, 158, 159, 127, 161, 116, 273, 129, 447, - 366, 277, 164, 297, 159, 339, 161, 138, 139, 297, - 87, 87, 164, 106, 110, 167, 112, 110, 3, 80, - 3, 4, 5, 6, 155, 156, 140, 0, 166, 106, - 106, 127, 163, 103, 127, 112, 112, 168, 99, 3, - 110, 3, 4, 5, 6, 106, 110, 107, 112, 162, - 389, 163, 391, 392, 167, 116, 330, 127, 41, 42, - 43, 270, 164, 127, 398, 167, 215, 341, 129, 89, - 53, 220, 110, 3, 4, 5, 6, 138, 139, 41, - 42, 43, 120, 132, 133, 134, 135, 136, 137, 127, - 165, 122, 25, 432, 155, 156, 164, 80, 164, 167, - 3, 167, 163, 118, 122, 164, 164, 168, 167, 167, - 120, 41, 42, 43, 164, 167, 99, 167, 80, 3, - 4, 5, 6, 462, 24, 464, 400, 92, 119, 62, - 30, 3, 116, 116, 67, 4, 78, 99, 38, 88, - 73, 74, 163, 3, 41, 4, 129, 163, 6, 163, - 80, 12, 164, 164, 116, 138, 139, 90, 42, 43, - 17, 94, 95, 109, 64, 121, 164, 129, 167, 99, - 41, 3, 155, 156, 144, 107, 138, 139, 3, 25, - 163, 81, 72, 83, 84, 168, 116, 3, 107, 3, - 161, 120, 49, 155, 156, 163, 80, 163, 98, 129, - 163, 163, 102, 163, 93, 44, 168, 89, 138, 139, - 163, 88, 167, 167, 114, 99, 62, 50, 53, 163, - 163, 67, 3, 164, 3, 155, 156, 73, 74, 163, - 96, 77, 116, 163, 167, 163, 89, 164, 168, 96, - 110, 163, 162, 99, 90, 129, 161, 65, 6, 95, - 167, 6, 99, 164, 138, 139, 164, 164, 94, 116, - 73, 73, 73, 94, 49, 3, 123, 124, 164, 121, - 164, 155, 156, 130, 131, 63, 164, 164, 163, 163, - 126, 164, 163, 23, 168, 165, 279, 144, 145, 146, - 147, 148, 44, 310, 151, 152, 0, 154, 155, 156, - 157, 158, 159, 7, 161, 139, 390, 276, 7, 52, - 203, 15, 290, 128, 49, 231, 15, 440, 22, 237, - 466, 439, 26, 22, 283, 92, -1, 26, 32, 459, - -1, 35, 36, 32, -1, 214, 35, 36, -1, 124, - -1, -1, -1, 47, 48, 130, -1, -1, 47, 48, - -1, -1, -1, -1, 58, -1, -1, -1, -1, 58, - -1, 96, 147, 148, -1, -1, 151, 152, -1, 154, - 155, 156, 157, 158, 159, 110, 161, -1, 82, -1, - 49, 116, 86, 82, -1, -1, -1, 86, -1, 124, - -1, -1, -1, -1, -1, 130, 131, 101, -1, 49, - -1, -1, 101, 107, -1, -1, -1, -1, 107, 144, - 145, 146, 147, 148, -1, -1, 151, 152, -1, 154, - 155, 156, 157, 158, 159, -1, 161, 96, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 141, 142, 143, - -1, -1, 141, 142, 143, -1, 96, 116, -1, -1, - -1, -1, -1, -1, -1, 124, -1, -1, -1, -1, - -1, 130, 131, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 124, 144, 145, 146, 147, 148, - 130, 131, 151, 152, -1, 154, 155, 156, 157, 158, - 159, -1, 161, -1, 144, 145, 146, 147, 148, -1, - -1, 151, 152, -1, 154, 155, 156, 157, 158, 159, - -1, 161 + 133, 70, 88, 89, 248, 171, 89, 2, 76, 98, + 5, 303, 3, 3, 3, 10, 11, 4, 5, 6, + 108, 53, 78, 139, 50, 73, 12, 19, 161, 89, + 163, 164, 46, 66, 89, 9, 130, 3, 9, 110, + 105, 164, 75, 108, 167, 178, 130, 110, 45, 135, + 183, 46, 135, 48, 35, 179, 127, 181, 25, 54, + 120, 424, 75, 55, 127, 159, 40, 161, 137, 40, + 236, 110, 105, 128, 207, 3, 320, 161, 3, 4, + 5, 6, 79, 26, 110, 53, 81, 82, 127, 70, + 453, 59, 105, 164, 96, 62, 91, 92, 72, 167, + 67, 127, 76, 163, 348, 76, 73, 74, 241, 242, + 158, 167, 99, 94, 183, 3, 41, 42, 43, 252, + 253, 123, 246, 90, 162, 164, 89, 94, 95, 167, + 254, 163, 256, 221, 16, 17, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, + 274, 138, 139, 167, 120, 80, 221, 3, 4, 5, + 6, 50, 3, 296, 408, 3, 156, 156, 301, 302, + 239, 287, 163, 168, 99, 89, 468, 3, 164, 68, + 155, 168, 110, 93, 109, 106, 275, 162, 110, 110, + 140, 116, 120, 166, 85, 41, 42, 43, 120, 127, + 167, 334, 335, 0, 129, 127, 127, 373, 87, 107, + 87, 279, 456, 138, 139, 283, 3, 165, 304, 110, + 111, 304, 346, 3, 4, 5, 6, 106, 163, 106, + 155, 156, 220, 112, 80, 112, 127, 225, 163, 89, + 3, 164, 279, 168, 167, 103, 283, 103, 164, 130, + 122, 167, 110, 99, 110, 99, 3, 4, 5, 6, + 106, 41, 42, 43, 397, 25, 399, 400, 337, 127, + 116, 127, 116, 53, 3, 156, 157, 158, 159, 348, + 161, 276, 406, 129, 3, 4, 5, 6, 3, 4, + 5, 6, 138, 139, 41, 42, 43, 118, 99, 110, + 80, 112, 62, 110, 163, 112, 165, 67, 441, 155, + 156, 120, 167, 73, 74, 116, 127, 163, 92, 99, + 127, 119, 168, 42, 43, 25, 41, 42, 43, 122, + 90, 3, 17, 80, 94, 95, 116, 4, 471, 408, + 473, 132, 133, 134, 135, 136, 137, 164, 164, 129, + 167, 167, 99, 78, 164, 116, 88, 167, 138, 139, + 164, 80, 62, 167, 49, 80, 3, 67, 164, 116, + 4, 167, 41, 73, 74, 155, 156, 77, 164, 163, + 99, 167, 129, 163, 99, 6, 164, 163, 168, 167, + 90, 138, 139, 163, 12, 95, 164, 116, 164, 109, + 121, 116, 164, 167, 126, 41, 3, 167, 155, 156, + 129, 96, 107, 144, 129, 3, 163, 72, 3, 138, + 139, 168, 3, 138, 139, 107, 126, 120, 163, 163, + 163, 116, 93, 161, 44, 89, 155, 156, 123, 124, + 155, 156, 50, 163, 163, 130, 131, 163, 163, 168, + 167, 163, 53, 168, 167, 88, 163, 3, 164, 144, + 145, 146, 147, 148, 163, 3, 151, 152, 0, 154, + 155, 156, 157, 158, 159, 7, 161, 163, 89, 163, + 7, 164, 96, 15, 110, 163, 49, 99, 15, 162, + 22, 161, 167, 65, 26, 22, 6, 6, 164, 26, + 32, 99, 164, 35, 36, 32, 164, 94, 35, 36, + 94, 73, 73, 73, 3, 47, 48, 121, 164, 164, + 47, 48, 164, 164, 163, 163, 58, 64, 23, 285, + 165, 58, 164, 96, 282, 317, 143, 398, 53, 132, + 208, 237, 296, 289, 475, 243, 449, 110, 448, -1, + 82, 95, 49, 116, 86, 82, 219, -1, -1, 86, + -1, 124, -1, -1, -1, -1, -1, 130, 131, 101, + -1, 49, -1, -1, 101, 107, -1, -1, -1, -1, + 107, 144, 145, 146, 147, 148, -1, -1, 151, 152, + 49, 154, 155, 156, 157, 158, 159, -1, 161, 96, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 141, + 142, 143, -1, -1, 141, 142, 143, -1, 96, 116, + -1, -1, -1, -1, -1, -1, -1, 124, -1, -1, + -1, -1, -1, 130, 131, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 124, 144, 145, 146, + 147, 148, 130, 131, 151, 152, -1, 154, 155, 156, + 157, 158, 159, -1, 161, 124, 144, 145, 146, 147, + 148, 130, -1, 151, 152, -1, 154, 155, 156, 157, + 158, 159, -1, 161, -1, -1, -1, -1, 147, 148, + -1, -1, 151, 152, -1, 154, 155, 156, 157, 158, + 159, 24, 161, -1, -1, -1, -1, 30, -1, -1, + -1, -1, -1, -1, -1, 38, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 64, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 81, -1, + 83, 84, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 98, -1, -1, -1, 102, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 114 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1233,51 +1262,52 @@ static const yytype_int16 yystos[] = 0, 7, 15, 22, 26, 32, 35, 36, 47, 48, 58, 82, 86, 101, 107, 141, 142, 143, 170, 171, 172, 173, 177, 179, 181, 182, 186, 187, 188, 194, - 196, 197, 198, 200, 203, 266, 267, 26, 3, 261, - 3, 3, 261, 75, 105, 89, 89, 93, 260, 261, - 261, 75, 105, 19, 55, 3, 268, 269, 140, 178, - 178, 178, 0, 166, 273, 107, 174, 174, 53, 163, - 206, 207, 211, 3, 165, 163, 89, 122, 189, 189, - 261, 3, 183, 261, 118, 89, 128, 122, 195, 195, - 261, 120, 167, 172, 92, 119, 223, 206, 207, 9, - 40, 76, 208, 209, 72, 208, 219, 3, 4, 5, - 6, 99, 138, 139, 168, 226, 227, 248, 249, 250, - 251, 252, 253, 254, 4, 180, 116, 261, 261, 78, - 216, 88, 163, 199, 3, 201, 202, 184, 249, 184, - 41, 261, 261, 206, 269, 163, 252, 12, 212, 164, - 164, 204, 205, 206, 211, 109, 210, 121, 204, 50, - 68, 224, 164, 167, 41, 89, 120, 163, 199, 3, - 41, 42, 43, 80, 116, 129, 155, 156, 163, 229, - 230, 231, 232, 233, 234, 235, 236, 238, 239, 240, - 241, 242, 244, 245, 246, 247, 248, 184, 3, 274, - 59, 207, 144, 167, 216, 107, 185, 185, 3, 175, - 176, 213, 225, 228, 229, 219, 208, 220, 221, 229, - 219, 229, 109, 229, 248, 3, 203, 3, 190, 191, - 120, 163, 165, 163, 163, 163, 106, 229, 237, 41, - 116, 230, 161, 230, 207, 229, 110, 127, 17, 49, - 96, 116, 123, 124, 130, 131, 144, 145, 146, 147, - 148, 151, 152, 154, 155, 156, 157, 158, 159, 161, - 93, 164, 167, 163, 229, 202, 44, 163, 164, 167, - 89, 214, 215, 167, 3, 120, 264, 265, 224, 204, - 167, 85, 111, 222, 224, 50, 50, 88, 24, 30, - 38, 64, 81, 83, 84, 98, 102, 114, 192, 164, - 167, 203, 164, 212, 3, 156, 207, 132, 133, 134, - 135, 136, 137, 243, 229, 229, 237, 87, 106, 112, - 163, 116, 225, 164, 164, 229, 229, 230, 230, 96, - 123, 163, 99, 116, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 252, - 261, 3, 227, 183, 227, 176, 163, 255, 256, 257, - 258, 259, 261, 270, 216, 228, 3, 221, 229, 229, - 184, 163, 163, 99, 116, 193, 191, 225, 164, 89, - 120, 103, 87, 112, 229, 229, 207, 162, 110, 230, - 163, 207, 225, 99, 162, 164, 164, 203, 25, 62, - 67, 73, 74, 90, 95, 271, 167, 120, 262, 263, - 264, 65, 217, 6, 6, 99, 164, 229, 192, 229, - 229, 112, 103, 164, 230, 207, 225, 164, 164, 164, - 94, 73, 73, 73, 94, 256, 3, 121, 164, 164, - 164, 164, 112, 229, 164, 164, 263, 257, 256, 163, - 225, 77, 126, 274, 46, 218, 163, 229, 272, 164, - 229, 3, 247, 164 + 196, 197, 198, 200, 203, 267, 268, 26, 3, 261, + 3, 3, 261, 66, 75, 105, 89, 89, 93, 260, + 261, 261, 75, 105, 19, 55, 3, 269, 270, 140, + 178, 178, 178, 0, 166, 274, 107, 174, 174, 53, + 163, 206, 207, 211, 3, 165, 163, 89, 3, 262, + 122, 189, 189, 261, 3, 183, 261, 118, 89, 128, + 122, 195, 195, 261, 120, 167, 172, 92, 119, 223, + 206, 207, 9, 40, 76, 208, 209, 72, 208, 219, + 3, 4, 5, 6, 99, 138, 139, 168, 226, 227, + 248, 249, 250, 251, 252, 253, 254, 4, 180, 189, + 116, 261, 261, 78, 216, 88, 163, 199, 3, 201, + 202, 184, 249, 184, 41, 261, 261, 206, 270, 163, + 252, 12, 212, 164, 164, 204, 205, 206, 211, 109, + 210, 121, 204, 50, 68, 224, 164, 167, 126, 41, + 89, 120, 163, 199, 3, 41, 42, 43, 80, 116, + 129, 155, 156, 163, 229, 230, 231, 232, 233, 234, + 235, 236, 238, 239, 240, 241, 242, 244, 245, 246, + 247, 248, 184, 3, 275, 59, 207, 144, 167, 216, + 107, 185, 185, 3, 175, 176, 213, 225, 228, 229, + 219, 208, 220, 221, 229, 219, 229, 109, 229, 248, + 261, 3, 203, 3, 190, 191, 120, 163, 165, 163, + 163, 163, 106, 229, 237, 41, 116, 230, 161, 230, + 207, 229, 110, 127, 17, 49, 96, 116, 123, 124, + 130, 131, 144, 145, 146, 147, 148, 151, 152, 154, + 155, 156, 157, 158, 159, 161, 93, 164, 167, 163, + 229, 202, 44, 163, 164, 167, 89, 214, 215, 167, + 3, 120, 265, 266, 224, 204, 167, 85, 111, 222, + 224, 50, 50, 163, 88, 24, 30, 38, 64, 81, + 83, 84, 98, 102, 114, 192, 164, 167, 203, 164, + 212, 3, 156, 207, 132, 133, 134, 135, 136, 137, + 243, 229, 229, 237, 87, 106, 112, 163, 116, 225, + 164, 164, 229, 229, 230, 230, 96, 123, 163, 99, + 116, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 252, 261, 3, 227, + 183, 227, 176, 163, 255, 256, 257, 258, 259, 261, + 271, 216, 228, 3, 221, 229, 229, 275, 184, 163, + 163, 99, 116, 193, 191, 225, 164, 89, 120, 103, + 87, 112, 229, 229, 207, 162, 110, 230, 163, 207, + 225, 99, 162, 164, 164, 203, 25, 62, 67, 73, + 74, 90, 95, 272, 167, 120, 263, 264, 265, 65, + 217, 164, 6, 6, 99, 164, 229, 192, 229, 229, + 112, 103, 164, 230, 207, 225, 164, 164, 164, 94, + 73, 73, 73, 94, 256, 3, 121, 164, 164, 164, + 164, 112, 229, 164, 164, 264, 257, 256, 163, 225, + 77, 126, 275, 46, 218, 163, 229, 273, 164, 229, + 3, 247, 164 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ @@ -1287,29 +1317,29 @@ static const yytype_int16 yyr1[] = 173, 173, 173, 173, 173, 173, 173, 173, 173, 174, 174, 175, 175, 176, 176, 177, 177, 177, 178, 178, 179, 180, 181, 181, 182, 182, 183, 184, 185, 185, - 186, 187, 187, 187, 188, 188, 188, 188, 189, 189, - 190, 190, 191, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 193, 193, 193, 194, 194, 194, 195, - 195, 196, 197, 198, 198, 199, 199, 200, 201, 201, - 202, 203, 203, 203, 204, 204, 205, 205, 206, 206, - 207, 207, 208, 209, 209, 209, 210, 210, 211, 212, - 212, 213, 214, 214, 215, 216, 216, 217, 217, 218, - 218, 219, 219, 220, 220, 221, 222, 222, 222, 223, - 223, 224, 224, 224, 224, 224, 224, 225, 225, 226, - 226, 227, 227, 228, 229, 229, 229, 229, 229, 230, + 186, 187, 187, 187, 188, 188, 188, 188, 188, 189, + 189, 190, 190, 191, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 193, 193, 193, 194, 194, 194, + 195, 195, 196, 197, 198, 198, 199, 199, 200, 201, + 201, 202, 203, 203, 203, 204, 204, 205, 205, 206, + 206, 207, 207, 208, 209, 209, 209, 210, 210, 211, + 212, 212, 213, 214, 214, 215, 216, 216, 217, 217, + 218, 218, 219, 219, 220, 220, 221, 222, 222, 222, + 223, 223, 224, 224, 224, 224, 224, 224, 225, 225, + 226, 226, 227, 227, 228, 229, 229, 229, 229, 229, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 231, 231, 232, 232, 232, 232, 232, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 234, 234, - 235, 235, 235, 235, 236, 236, 236, 236, 237, 237, - 238, 238, 239, 239, 239, 239, 239, 239, 239, 240, - 240, 241, 242, 243, 243, 243, 243, 243, 243, 244, - 245, 246, 247, 247, 247, 247, 248, 248, 248, 248, - 248, 249, 250, 250, 251, 251, 252, 253, 254, 255, - 255, 256, 256, 257, 257, 258, 258, 259, 260, 261, - 261, 262, 262, 263, 263, 264, 264, 265, 265, 266, - 266, 267, 268, 268, 269, 270, 270, 270, 271, 271, - 271, 271, 271, 271, 271, 271, 271, 271, 272, 273, - 273, 274, 274 + 230, 231, 231, 232, 232, 232, 232, 232, 233, 233, + 233, 233, 233, 233, 233, 233, 233, 233, 233, 234, + 234, 235, 235, 235, 235, 236, 236, 236, 236, 237, + 237, 238, 238, 239, 239, 239, 239, 239, 239, 239, + 240, 240, 241, 242, 243, 243, 243, 243, 243, 243, + 244, 245, 246, 247, 247, 247, 247, 248, 248, 248, + 248, 248, 249, 250, 250, 251, 251, 252, 253, 254, + 255, 255, 256, 256, 257, 257, 258, 258, 259, 260, + 261, 261, 262, 262, 263, 263, 264, 264, 265, 265, + 266, 266, 267, 267, 268, 269, 269, 270, 271, 271, + 271, 272, 272, 272, 272, 272, 272, 272, 272, 272, + 272, 273, 274, 274, 275, 275 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -1319,29 +1349,29 @@ static const yytype_int8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 0, 1, 3, 1, 4, 2, 2, 2, 1, 0, 4, 1, 2, 5, 7, 5, 1, 1, 3, 0, - 5, 2, 3, 2, 8, 7, 6, 7, 3, 0, - 1, 3, 3, 1, 1, 1, 1, 1, 4, 4, - 1, 1, 1, 1, 2, 0, 4, 4, 3, 2, - 0, 4, 2, 8, 5, 3, 0, 5, 1, 3, - 3, 2, 2, 6, 1, 1, 1, 3, 3, 3, - 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, 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, 6, 1, 1, 1, 1, 1, 1, 4, - 4, 5, 1, 3, 1, 3, 1, 1, 1, 1, + 5, 2, 3, 2, 8, 7, 6, 9, 7, 3, + 0, 1, 3, 3, 1, 1, 1, 1, 1, 4, + 4, 1, 1, 1, 1, 2, 0, 4, 4, 3, + 2, 0, 4, 2, 8, 5, 3, 0, 5, 1, + 3, 3, 2, 2, 6, 1, 1, 1, 3, 3, + 3, 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, 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, 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, 3, 1, 1, 1, 4, 1, 3, 2, 1, + 1, 3, 1, 0, 1, 5, 1, 0, 2, 1, + 1, 0, 1, 0, 2, 1, 3, 3, 4, 6, + 8, 1, 2, 1, 2, 1, 2, 1, 1, 1, + 0, 1, 1, 0, 1, 3 }; @@ -1485,10 +1515,10 @@ yy_symbol_value_print (FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, hsql::SQLParserResult* result, yyscan_t scanner) { FILE *yyoutput = yyo; - YYUSE (yyoutput); - YYUSE (yylocationp); - YYUSE (result); - YYUSE (scanner); + YY_USE (yyoutput); + YY_USE (yylocationp); + YY_USE (result); + YY_USE (scanner); if (!yyvaluep) return; # ifdef YYPRINT @@ -1496,7 +1526,7 @@ yy_symbol_value_print (FILE *yyo, YYPRINT (yyo, yytoknum[yykind], *yyvaluep); # endif YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YYUSE (yykind); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -1881,10 +1911,10 @@ static void yydestruct (const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, hsql::SQLParserResult* result, yyscan_t scanner) { - YYUSE (yyvaluep); - YYUSE (yylocationp); - YYUSE (result); - YYUSE (scanner); + YY_USE (yyvaluep); + YY_USE (yylocationp); + YY_USE (result); + YY_USE (scanner); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); @@ -1895,25 +1925,25 @@ yydestruct (const char *yymsg, case YYSYMBOL_IDENTIFIER: /* IDENTIFIER */ #line 149 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1899 "bison_parser.cpp" +#line 1929 "bison_parser.cpp" break; case YYSYMBOL_STRING: /* STRING */ #line 149 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1905 "bison_parser.cpp" +#line 1935 "bison_parser.cpp" break; case YYSYMBOL_FLOATVAL: /* FLOATVAL */ #line 147 "bison_parser.y" { } -#line 1911 "bison_parser.cpp" +#line 1941 "bison_parser.cpp" break; case YYSYMBOL_INTVAL: /* INTVAL */ #line 147 "bison_parser.y" { } -#line 1917 "bison_parser.cpp" +#line 1947 "bison_parser.cpp" break; case YYSYMBOL_statement_list: /* statement_list */ @@ -1926,19 +1956,19 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).stmt_vec)); } -#line 1930 "bison_parser.cpp" +#line 1960 "bison_parser.cpp" break; case YYSYMBOL_statement: /* statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 1936 "bison_parser.cpp" +#line 1966 "bison_parser.cpp" break; case YYSYMBOL_preparable_statement: /* preparable_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 1942 "bison_parser.cpp" +#line 1972 "bison_parser.cpp" break; case YYSYMBOL_opt_hints: /* opt_hints */ @@ -1951,7 +1981,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 1955 "bison_parser.cpp" +#line 1985 "bison_parser.cpp" break; case YYSYMBOL_hint_list: /* hint_list */ @@ -1964,85 +1994,85 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 1968 "bison_parser.cpp" +#line 1998 "bison_parser.cpp" break; case YYSYMBOL_hint: /* hint */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 1974 "bison_parser.cpp" +#line 2004 "bison_parser.cpp" break; case YYSYMBOL_transaction_statement: /* transaction_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).transaction_stmt)); } -#line 1980 "bison_parser.cpp" +#line 2010 "bison_parser.cpp" break; case YYSYMBOL_prepare_statement: /* prepare_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).prep_stmt)); } -#line 1986 "bison_parser.cpp" +#line 2016 "bison_parser.cpp" break; case YYSYMBOL_prepare_target_query: /* prepare_target_query */ #line 149 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1992 "bison_parser.cpp" +#line 2022 "bison_parser.cpp" break; case YYSYMBOL_execute_statement: /* execute_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).exec_stmt)); } -#line 1998 "bison_parser.cpp" +#line 2028 "bison_parser.cpp" break; case YYSYMBOL_import_statement: /* import_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).import_stmt)); } -#line 2004 "bison_parser.cpp" +#line 2034 "bison_parser.cpp" break; case YYSYMBOL_file_type: /* file_type */ #line 147 "bison_parser.y" { } -#line 2010 "bison_parser.cpp" +#line 2040 "bison_parser.cpp" break; case YYSYMBOL_file_path: /* file_path */ #line 149 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2016 "bison_parser.cpp" +#line 2046 "bison_parser.cpp" break; case YYSYMBOL_opt_file_type: /* opt_file_type */ #line 147 "bison_parser.y" { } -#line 2022 "bison_parser.cpp" +#line 2052 "bison_parser.cpp" break; case YYSYMBOL_export_statement: /* export_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).export_stmt)); } -#line 2028 "bison_parser.cpp" +#line 2058 "bison_parser.cpp" break; case YYSYMBOL_show_statement: /* show_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).show_stmt)); } -#line 2034 "bison_parser.cpp" +#line 2064 "bison_parser.cpp" break; case YYSYMBOL_create_statement: /* create_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).create_stmt)); } -#line 2040 "bison_parser.cpp" +#line 2070 "bison_parser.cpp" break; case YYSYMBOL_opt_not_exists: /* opt_not_exists */ #line 147 "bison_parser.y" { } -#line 2046 "bison_parser.cpp" +#line 2076 "bison_parser.cpp" break; case YYSYMBOL_column_def_commalist: /* column_def_commalist */ @@ -2055,55 +2085,55 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).column_vec)); } -#line 2059 "bison_parser.cpp" +#line 2089 "bison_parser.cpp" break; case YYSYMBOL_column_def: /* column_def */ #line 158 "bison_parser.y" { delete (((*yyvaluep).column_t)); } -#line 2065 "bison_parser.cpp" +#line 2095 "bison_parser.cpp" break; case YYSYMBOL_column_type: /* column_type */ #line 147 "bison_parser.y" { } -#line 2071 "bison_parser.cpp" +#line 2101 "bison_parser.cpp" break; case YYSYMBOL_opt_column_nullable: /* opt_column_nullable */ #line 147 "bison_parser.y" { } -#line 2077 "bison_parser.cpp" +#line 2107 "bison_parser.cpp" break; case YYSYMBOL_drop_statement: /* drop_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).drop_stmt)); } -#line 2083 "bison_parser.cpp" +#line 2113 "bison_parser.cpp" break; case YYSYMBOL_opt_exists: /* opt_exists */ #line 147 "bison_parser.y" { } -#line 2089 "bison_parser.cpp" +#line 2119 "bison_parser.cpp" break; case YYSYMBOL_delete_statement: /* delete_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2095 "bison_parser.cpp" +#line 2125 "bison_parser.cpp" break; case YYSYMBOL_truncate_statement: /* truncate_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2101 "bison_parser.cpp" +#line 2131 "bison_parser.cpp" break; case YYSYMBOL_insert_statement: /* insert_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).insert_stmt)); } -#line 2107 "bison_parser.cpp" +#line 2137 "bison_parser.cpp" break; case YYSYMBOL_opt_column_list: /* opt_column_list */ @@ -2116,13 +2146,13 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2120 "bison_parser.cpp" +#line 2150 "bison_parser.cpp" break; case YYSYMBOL_update_statement: /* update_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).update_stmt)); } -#line 2126 "bison_parser.cpp" +#line 2156 "bison_parser.cpp" break; case YYSYMBOL_update_clause_commalist: /* update_clause_commalist */ @@ -2135,73 +2165,73 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).update_vec)); } -#line 2139 "bison_parser.cpp" +#line 2169 "bison_parser.cpp" break; case YYSYMBOL_update_clause: /* update_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).update_t)); } -#line 2145 "bison_parser.cpp" +#line 2175 "bison_parser.cpp" break; case YYSYMBOL_select_statement: /* select_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2151 "bison_parser.cpp" +#line 2181 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation: /* select_within_set_operation */ #line 158 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2157 "bison_parser.cpp" +#line 2187 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation_no_parentheses: /* select_within_set_operation_no_parentheses */ #line 158 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2163 "bison_parser.cpp" +#line 2193 "bison_parser.cpp" break; case YYSYMBOL_select_with_paren: /* select_with_paren */ #line 158 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2169 "bison_parser.cpp" +#line 2199 "bison_parser.cpp" break; case YYSYMBOL_select_no_paren: /* select_no_paren */ #line 158 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2175 "bison_parser.cpp" +#line 2205 "bison_parser.cpp" break; case YYSYMBOL_set_operator: /* set_operator */ #line 158 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2181 "bison_parser.cpp" +#line 2211 "bison_parser.cpp" break; case YYSYMBOL_set_type: /* set_type */ #line 158 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2187 "bison_parser.cpp" +#line 2217 "bison_parser.cpp" break; case YYSYMBOL_opt_all: /* opt_all */ #line 147 "bison_parser.y" { } -#line 2193 "bison_parser.cpp" +#line 2223 "bison_parser.cpp" break; case YYSYMBOL_select_clause: /* select_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2199 "bison_parser.cpp" +#line 2229 "bison_parser.cpp" break; case YYSYMBOL_opt_distinct: /* opt_distinct */ #line 147 "bison_parser.y" { } -#line 2205 "bison_parser.cpp" +#line 2235 "bison_parser.cpp" break; case YYSYMBOL_select_list: /* select_list */ @@ -2214,37 +2244,37 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2218 "bison_parser.cpp" +#line 2248 "bison_parser.cpp" break; case YYSYMBOL_opt_from_clause: /* opt_from_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2224 "bison_parser.cpp" +#line 2254 "bison_parser.cpp" break; case YYSYMBOL_from_clause: /* from_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2230 "bison_parser.cpp" +#line 2260 "bison_parser.cpp" break; case YYSYMBOL_opt_where: /* opt_where */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2236 "bison_parser.cpp" +#line 2266 "bison_parser.cpp" break; case YYSYMBOL_opt_group: /* opt_group */ #line 158 "bison_parser.y" { delete (((*yyvaluep).group_t)); } -#line 2242 "bison_parser.cpp" +#line 2272 "bison_parser.cpp" break; case YYSYMBOL_opt_having: /* opt_having */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2248 "bison_parser.cpp" +#line 2278 "bison_parser.cpp" break; case YYSYMBOL_opt_order: /* opt_order */ @@ -2257,7 +2287,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2261 "bison_parser.cpp" +#line 2291 "bison_parser.cpp" break; case YYSYMBOL_order_list: /* order_list */ @@ -2270,31 +2300,31 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2274 "bison_parser.cpp" +#line 2304 "bison_parser.cpp" break; case YYSYMBOL_order_desc: /* order_desc */ #line 158 "bison_parser.y" { delete (((*yyvaluep).order)); } -#line 2280 "bison_parser.cpp" +#line 2310 "bison_parser.cpp" break; case YYSYMBOL_opt_order_type: /* opt_order_type */ #line 147 "bison_parser.y" { } -#line 2286 "bison_parser.cpp" +#line 2316 "bison_parser.cpp" break; case YYSYMBOL_opt_top: /* opt_top */ #line 158 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2292 "bison_parser.cpp" +#line 2322 "bison_parser.cpp" break; case YYSYMBOL_opt_limit: /* opt_limit */ #line 158 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2298 "bison_parser.cpp" +#line 2328 "bison_parser.cpp" break; case YYSYMBOL_expr_list: /* expr_list */ @@ -2307,7 +2337,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2311 "bison_parser.cpp" +#line 2341 "bison_parser.cpp" break; case YYSYMBOL_opt_literal_list: /* opt_literal_list */ @@ -2320,7 +2350,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2324 "bison_parser.cpp" +#line 2354 "bison_parser.cpp" break; case YYSYMBOL_literal_list: /* literal_list */ @@ -2333,187 +2363,187 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2337 "bison_parser.cpp" +#line 2367 "bison_parser.cpp" break; case YYSYMBOL_expr_alias: /* expr_alias */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2343 "bison_parser.cpp" +#line 2373 "bison_parser.cpp" break; case YYSYMBOL_expr: /* expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2349 "bison_parser.cpp" +#line 2379 "bison_parser.cpp" break; case YYSYMBOL_operand: /* operand */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2355 "bison_parser.cpp" +#line 2385 "bison_parser.cpp" break; case YYSYMBOL_scalar_expr: /* scalar_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2361 "bison_parser.cpp" +#line 2391 "bison_parser.cpp" break; case YYSYMBOL_unary_expr: /* unary_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2367 "bison_parser.cpp" +#line 2397 "bison_parser.cpp" break; case YYSYMBOL_binary_expr: /* binary_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2373 "bison_parser.cpp" +#line 2403 "bison_parser.cpp" break; case YYSYMBOL_logic_expr: /* logic_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2379 "bison_parser.cpp" +#line 2409 "bison_parser.cpp" break; case YYSYMBOL_in_expr: /* in_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2385 "bison_parser.cpp" +#line 2415 "bison_parser.cpp" break; case YYSYMBOL_case_expr: /* case_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2391 "bison_parser.cpp" +#line 2421 "bison_parser.cpp" break; case YYSYMBOL_case_list: /* case_list */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2397 "bison_parser.cpp" +#line 2427 "bison_parser.cpp" break; case YYSYMBOL_exists_expr: /* exists_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2403 "bison_parser.cpp" +#line 2433 "bison_parser.cpp" break; case YYSYMBOL_comp_expr: /* comp_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2409 "bison_parser.cpp" +#line 2439 "bison_parser.cpp" break; case YYSYMBOL_function_expr: /* function_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2415 "bison_parser.cpp" +#line 2445 "bison_parser.cpp" break; case YYSYMBOL_extract_expr: /* extract_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2421 "bison_parser.cpp" +#line 2451 "bison_parser.cpp" break; case YYSYMBOL_cast_expr: /* cast_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2427 "bison_parser.cpp" +#line 2457 "bison_parser.cpp" break; case YYSYMBOL_datetime_field: /* datetime_field */ #line 147 "bison_parser.y" { } -#line 2433 "bison_parser.cpp" +#line 2463 "bison_parser.cpp" break; case YYSYMBOL_array_expr: /* array_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2439 "bison_parser.cpp" +#line 2469 "bison_parser.cpp" break; case YYSYMBOL_array_index: /* array_index */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2445 "bison_parser.cpp" +#line 2475 "bison_parser.cpp" break; case YYSYMBOL_between_expr: /* between_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2451 "bison_parser.cpp" +#line 2481 "bison_parser.cpp" break; case YYSYMBOL_column_name: /* column_name */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2457 "bison_parser.cpp" +#line 2487 "bison_parser.cpp" break; case YYSYMBOL_literal: /* literal */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2463 "bison_parser.cpp" +#line 2493 "bison_parser.cpp" break; case YYSYMBOL_string_literal: /* string_literal */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2469 "bison_parser.cpp" +#line 2499 "bison_parser.cpp" break; case YYSYMBOL_bool_literal: /* bool_literal */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2475 "bison_parser.cpp" +#line 2505 "bison_parser.cpp" break; case YYSYMBOL_num_literal: /* num_literal */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2481 "bison_parser.cpp" +#line 2511 "bison_parser.cpp" break; case YYSYMBOL_int_literal: /* int_literal */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2487 "bison_parser.cpp" +#line 2517 "bison_parser.cpp" break; case YYSYMBOL_null_literal: /* null_literal */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2493 "bison_parser.cpp" +#line 2523 "bison_parser.cpp" break; case YYSYMBOL_param_expr: /* param_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2499 "bison_parser.cpp" +#line 2529 "bison_parser.cpp" break; case YYSYMBOL_table_ref: /* table_ref */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2505 "bison_parser.cpp" +#line 2535 "bison_parser.cpp" break; case YYSYMBOL_table_ref_atomic: /* table_ref_atomic */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2511 "bison_parser.cpp" +#line 2541 "bison_parser.cpp" break; case YYSYMBOL_nonjoin_table_ref_atomic: /* nonjoin_table_ref_atomic */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2517 "bison_parser.cpp" +#line 2547 "bison_parser.cpp" break; case YYSYMBOL_table_ref_commalist: /* table_ref_commalist */ @@ -2526,91 +2556,97 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).table_vec)); } -#line 2530 "bison_parser.cpp" +#line 2560 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name: /* table_ref_name */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2536 "bison_parser.cpp" +#line 2566 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name_no_alias: /* table_ref_name_no_alias */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2542 "bison_parser.cpp" +#line 2572 "bison_parser.cpp" break; case YYSYMBOL_table_name: /* table_name */ #line 148 "bison_parser.y" { free( (((*yyvaluep).table_name).name) ); free( (((*yyvaluep).table_name).schema) ); } -#line 2548 "bison_parser.cpp" +#line 2578 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_index_name: /* opt_index_name */ +#line 149 "bison_parser.y" + { free( (((*yyvaluep).sval)) ); } +#line 2584 "bison_parser.cpp" break; case YYSYMBOL_table_alias: /* table_alias */ #line 158 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2554 "bison_parser.cpp" +#line 2590 "bison_parser.cpp" break; case YYSYMBOL_opt_table_alias: /* opt_table_alias */ #line 158 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2560 "bison_parser.cpp" +#line 2596 "bison_parser.cpp" break; case YYSYMBOL_alias: /* alias */ #line 158 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2566 "bison_parser.cpp" +#line 2602 "bison_parser.cpp" break; case YYSYMBOL_opt_alias: /* opt_alias */ #line 158 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2572 "bison_parser.cpp" +#line 2608 "bison_parser.cpp" break; case YYSYMBOL_opt_with_clause: /* opt_with_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2578 "bison_parser.cpp" +#line 2614 "bison_parser.cpp" break; case YYSYMBOL_with_clause: /* with_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2584 "bison_parser.cpp" +#line 2620 "bison_parser.cpp" break; case YYSYMBOL_with_description_list: /* with_description_list */ #line 158 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2590 "bison_parser.cpp" +#line 2626 "bison_parser.cpp" break; case YYSYMBOL_with_description: /* with_description */ #line 158 "bison_parser.y" { delete (((*yyvaluep).with_description_t)); } -#line 2596 "bison_parser.cpp" +#line 2632 "bison_parser.cpp" break; case YYSYMBOL_join_clause: /* join_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2602 "bison_parser.cpp" +#line 2638 "bison_parser.cpp" break; case YYSYMBOL_opt_join_type: /* opt_join_type */ #line 147 "bison_parser.y" { } -#line 2608 "bison_parser.cpp" +#line 2644 "bison_parser.cpp" break; case YYSYMBOL_join_condition: /* join_condition */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2614 "bison_parser.cpp" +#line 2650 "bison_parser.cpp" break; case YYSYMBOL_ident_commalist: /* ident_commalist */ @@ -2623,7 +2659,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2627 "bison_parser.cpp" +#line 2663 "bison_parser.cpp" break; default: @@ -2730,7 +2766,7 @@ YYLTYPE yylloc = yyloc_default; yylloc.string_length = 0; } -#line 2734 "bison_parser.cpp" +#line 2770 "bison_parser.cpp" yylsp[0] = yylloc; goto yysetstate; @@ -2940,7 +2976,7 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* input: statement_list opt_semicolon */ -#line 269 "bison_parser.y" +#line 270 "bison_parser.y" { for (SQLStatement* stmt : *(yyvsp[-1].stmt_vec)) { // Transfers ownership of the statement. @@ -2958,247 +2994,247 @@ YYLTYPE yylloc = yyloc_default; } delete (yyvsp[-1].stmt_vec); } -#line 2962 "bison_parser.cpp" +#line 2998 "bison_parser.cpp" break; case 3: /* statement_list: statement */ -#line 290 "bison_parser.y" +#line 291 "bison_parser.y" { (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 2973 "bison_parser.cpp" +#line 3009 "bison_parser.cpp" break; case 4: /* statement_list: statement_list ';' statement */ -#line 296 "bison_parser.y" +#line 297 "bison_parser.y" { (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 2984 "bison_parser.cpp" +#line 3020 "bison_parser.cpp" break; case 5: /* statement: prepare_statement opt_hints */ -#line 305 "bison_parser.y" +#line 306 "bison_parser.y" { (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 2993 "bison_parser.cpp" +#line 3029 "bison_parser.cpp" break; case 6: /* statement: preparable_statement opt_hints */ -#line 309 "bison_parser.y" +#line 310 "bison_parser.y" { (yyval.statement) = (yyvsp[-1].statement); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3002 "bison_parser.cpp" +#line 3038 "bison_parser.cpp" break; case 7: /* statement: show_statement */ -#line 313 "bison_parser.y" +#line 314 "bison_parser.y" { (yyval.statement) = (yyvsp[0].show_stmt); } -#line 3010 "bison_parser.cpp" +#line 3046 "bison_parser.cpp" break; case 8: /* statement: import_statement */ -#line 316 "bison_parser.y" +#line 317 "bison_parser.y" { (yyval.statement) = (yyvsp[0].import_stmt); } -#line 3018 "bison_parser.cpp" +#line 3054 "bison_parser.cpp" break; case 9: /* statement: export_statement */ -#line 319 "bison_parser.y" +#line 320 "bison_parser.y" { (yyval.statement) = (yyvsp[0].export_stmt); } -#line 3026 "bison_parser.cpp" +#line 3062 "bison_parser.cpp" break; case 10: /* preparable_statement: select_statement */ -#line 326 "bison_parser.y" +#line 327 "bison_parser.y" { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 3032 "bison_parser.cpp" +#line 3068 "bison_parser.cpp" break; case 11: /* preparable_statement: create_statement */ -#line 327 "bison_parser.y" +#line 328 "bison_parser.y" { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 3038 "bison_parser.cpp" +#line 3074 "bison_parser.cpp" break; case 12: /* preparable_statement: insert_statement */ -#line 328 "bison_parser.y" +#line 329 "bison_parser.y" { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 3044 "bison_parser.cpp" +#line 3080 "bison_parser.cpp" break; case 13: /* preparable_statement: delete_statement */ -#line 329 "bison_parser.y" +#line 330 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3050 "bison_parser.cpp" +#line 3086 "bison_parser.cpp" break; case 14: /* preparable_statement: truncate_statement */ -#line 330 "bison_parser.y" +#line 331 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3056 "bison_parser.cpp" +#line 3092 "bison_parser.cpp" break; case 15: /* preparable_statement: update_statement */ -#line 331 "bison_parser.y" +#line 332 "bison_parser.y" { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 3062 "bison_parser.cpp" +#line 3098 "bison_parser.cpp" break; case 16: /* preparable_statement: drop_statement */ -#line 332 "bison_parser.y" +#line 333 "bison_parser.y" { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 3068 "bison_parser.cpp" +#line 3104 "bison_parser.cpp" break; case 17: /* preparable_statement: execute_statement */ -#line 333 "bison_parser.y" +#line 334 "bison_parser.y" { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 3074 "bison_parser.cpp" +#line 3110 "bison_parser.cpp" break; case 18: /* preparable_statement: transaction_statement */ -#line 334 "bison_parser.y" +#line 335 "bison_parser.y" { (yyval.statement) = (yyvsp[0].transaction_stmt); } -#line 3080 "bison_parser.cpp" +#line 3116 "bison_parser.cpp" break; case 19: /* opt_hints: WITH HINT '(' hint_list ')' */ -#line 343 "bison_parser.y" +#line 344 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 3086 "bison_parser.cpp" +#line 3122 "bison_parser.cpp" break; case 20: /* opt_hints: %empty */ -#line 344 "bison_parser.y" +#line 345 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 3092 "bison_parser.cpp" +#line 3128 "bison_parser.cpp" break; case 21: /* hint_list: hint */ -#line 349 "bison_parser.y" +#line 350 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3098 "bison_parser.cpp" +#line 3134 "bison_parser.cpp" break; case 22: /* hint_list: hint_list ',' hint */ -#line 350 "bison_parser.y" +#line 351 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3104 "bison_parser.cpp" +#line 3140 "bison_parser.cpp" break; case 23: /* hint: IDENTIFIER */ -#line 354 "bison_parser.y" +#line 355 "bison_parser.y" { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[0].sval); } -#line 3113 "bison_parser.cpp" +#line 3149 "bison_parser.cpp" break; case 24: /* hint: IDENTIFIER '(' literal_list ')' */ -#line 358 "bison_parser.y" +#line 359 "bison_parser.y" { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[-3].sval); (yyval.expr)->exprList = (yyvsp[-1].expr_vec); } -#line 3123 "bison_parser.cpp" +#line 3159 "bison_parser.cpp" break; case 25: /* transaction_statement: BEGIN opt_transaction_keyword */ -#line 370 "bison_parser.y" +#line 371 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kBeginTransaction); } -#line 3131 "bison_parser.cpp" +#line 3167 "bison_parser.cpp" break; case 26: /* transaction_statement: ROLLBACK opt_transaction_keyword */ -#line 373 "bison_parser.y" +#line 374 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kRollbackTransaction); } -#line 3139 "bison_parser.cpp" +#line 3175 "bison_parser.cpp" break; case 27: /* transaction_statement: COMMIT opt_transaction_keyword */ -#line 376 "bison_parser.y" +#line 377 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kCommitTransaction); } -#line 3147 "bison_parser.cpp" +#line 3183 "bison_parser.cpp" break; case 30: /* prepare_statement: PREPARE IDENTIFIER FROM prepare_target_query */ -#line 390 "bison_parser.y" +#line 391 "bison_parser.y" { (yyval.prep_stmt) = new PrepareStatement(); (yyval.prep_stmt)->name = (yyvsp[-2].sval); (yyval.prep_stmt)->query = (yyvsp[0].sval); } -#line 3157 "bison_parser.cpp" +#line 3193 "bison_parser.cpp" break; case 32: /* execute_statement: EXECUTE IDENTIFIER */ -#line 400 "bison_parser.y" +#line 401 "bison_parser.y" { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[0].sval); } -#line 3166 "bison_parser.cpp" +#line 3202 "bison_parser.cpp" break; case 33: /* execute_statement: EXECUTE IDENTIFIER '(' opt_literal_list ')' */ -#line 404 "bison_parser.y" +#line 405 "bison_parser.y" { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[-3].sval); (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); } -#line 3176 "bison_parser.cpp" +#line 3212 "bison_parser.cpp" break; case 34: /* import_statement: IMPORT FROM file_type FILE file_path INTO table_name */ -#line 418 "bison_parser.y" +#line 419 "bison_parser.y" { (yyval.import_stmt) = new ImportStatement((yyvsp[-4].import_type_t)); (yyval.import_stmt)->filePath = (yyvsp[-2].sval); (yyval.import_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3187 "bison_parser.cpp" +#line 3223 "bison_parser.cpp" break; case 35: /* import_statement: COPY table_name FROM file_path opt_file_type */ -#line 424 "bison_parser.y" +#line 425 "bison_parser.y" { (yyval.import_stmt) = new ImportStatement((yyvsp[0].import_type_t)); (yyval.import_stmt)->filePath = (yyvsp[-1].sval); (yyval.import_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3198 "bison_parser.cpp" +#line 3234 "bison_parser.cpp" break; case 36: /* file_type: IDENTIFIER */ -#line 433 "bison_parser.y" +#line 434 "bison_parser.y" { if (strcasecmp((yyvsp[0].sval), "csv") == 0) { (yyval.import_type_t) = kImportCSV; @@ -3213,70 +3249,70 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[0].sval)); } -#line 3217 "bison_parser.cpp" +#line 3253 "bison_parser.cpp" break; case 37: /* file_path: string_literal */ -#line 450 "bison_parser.y" +#line 451 "bison_parser.y" { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 3223 "bison_parser.cpp" +#line 3259 "bison_parser.cpp" break; case 38: /* opt_file_type: WITH FORMAT file_type */ -#line 454 "bison_parser.y" +#line 455 "bison_parser.y" { (yyval.import_type_t) = (yyvsp[0].import_type_t); } -#line 3231 "bison_parser.cpp" +#line 3267 "bison_parser.cpp" break; case 39: /* opt_file_type: %empty */ -#line 457 "bison_parser.y" +#line 458 "bison_parser.y" { (yyval.import_type_t) = kImportAuto; } -#line 3237 "bison_parser.cpp" +#line 3273 "bison_parser.cpp" break; case 40: /* export_statement: COPY table_name TO file_path opt_file_type */ -#line 466 "bison_parser.y" +#line 467 "bison_parser.y" { (yyval.export_stmt) = new ExportStatement((yyvsp[0].import_type_t)); (yyval.export_stmt)->filePath = (yyvsp[-1].sval); (yyval.export_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.export_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3248 "bison_parser.cpp" +#line 3284 "bison_parser.cpp" break; case 41: /* show_statement: SHOW TABLES */ -#line 480 "bison_parser.y" +#line 481 "bison_parser.y" { (yyval.show_stmt) = new ShowStatement(kShowTables); } -#line 3256 "bison_parser.cpp" +#line 3292 "bison_parser.cpp" break; case 42: /* show_statement: SHOW COLUMNS table_name */ -#line 483 "bison_parser.y" +#line 484 "bison_parser.y" { (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 3266 "bison_parser.cpp" +#line 3302 "bison_parser.cpp" break; case 43: /* show_statement: DESCRIBE table_name */ -#line 488 "bison_parser.y" +#line 489 "bison_parser.y" { (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 3276 "bison_parser.cpp" +#line 3312 "bison_parser.cpp" break; case 44: /* create_statement: CREATE TABLE opt_not_exists table_name FROM IDENTIFIER FILE file_path */ -#line 502 "bison_parser.y" +#line 503 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTableFromTbl); (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); @@ -3290,11 +3326,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].sval)); (yyval.create_stmt)->filePath = (yyvsp[0].sval); } -#line 3294 "bison_parser.cpp" +#line 3330 "bison_parser.cpp" break; case 45: /* create_statement: CREATE TABLE opt_not_exists table_name '(' column_def_commalist ')' */ -#line 515 "bison_parser.y" +#line 516 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -3302,11 +3338,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->columns = (yyvsp[-1].column_vec); } -#line 3306 "bison_parser.cpp" +#line 3342 "bison_parser.cpp" break; case 46: /* create_statement: CREATE TABLE opt_not_exists table_name AS select_statement */ -#line 522 "bison_parser.y" +#line 523 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-3].bval); @@ -3314,11 +3350,23 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-2].table_name).name; (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3318 "bison_parser.cpp" +#line 3354 "bison_parser.cpp" + break; + + case 47: /* create_statement: CREATE INDEX opt_index_name opt_not_exists ON table_name '(' ident_commalist ')' */ +#line 530 "bison_parser.y" + { + (yyval.create_stmt) = new CreateStatement(kCreateIndex); + (yyval.create_stmt)->indexName = (yyvsp[-6].sval); + (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); + (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; + (yyval.create_stmt)->indexColumns = (yyvsp[-1].str_vec); + } +#line 3366 "bison_parser.cpp" break; - case 47: /* create_statement: CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement */ -#line 529 "bison_parser.y" + case 48: /* create_statement: CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement */ +#line 537 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateView); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -3327,186 +3375,186 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3331 "bison_parser.cpp" +#line 3379 "bison_parser.cpp" break; - case 48: /* opt_not_exists: IF NOT EXISTS */ -#line 540 "bison_parser.y" + case 49: /* opt_not_exists: IF NOT EXISTS */ +#line 548 "bison_parser.y" { (yyval.bval) = true; } -#line 3337 "bison_parser.cpp" +#line 3385 "bison_parser.cpp" break; - case 49: /* opt_not_exists: %empty */ -#line 541 "bison_parser.y" + case 50: /* opt_not_exists: %empty */ +#line 549 "bison_parser.y" { (yyval.bval) = false; } -#line 3343 "bison_parser.cpp" +#line 3391 "bison_parser.cpp" break; - case 50: /* column_def_commalist: column_def */ -#line 545 "bison_parser.y" + case 51: /* column_def_commalist: column_def */ +#line 553 "bison_parser.y" { (yyval.column_vec) = new std::vector(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); } -#line 3349 "bison_parser.cpp" +#line 3397 "bison_parser.cpp" break; - case 51: /* column_def_commalist: column_def_commalist ',' column_def */ -#line 546 "bison_parser.y" + case 52: /* column_def_commalist: column_def_commalist ',' column_def */ +#line 554 "bison_parser.y" { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } -#line 3355 "bison_parser.cpp" +#line 3403 "bison_parser.cpp" break; - case 52: /* column_def: IDENTIFIER column_type opt_column_nullable */ -#line 550 "bison_parser.y" + case 53: /* column_def: IDENTIFIER column_type opt_column_nullable */ +#line 558 "bison_parser.y" { (yyval.column_t) = new ColumnDefinition((yyvsp[-2].sval), (yyvsp[-1].column_type_t), (yyvsp[0].bval)); } -#line 3363 "bison_parser.cpp" +#line 3411 "bison_parser.cpp" break; - case 53: /* column_type: INT */ -#line 556 "bison_parser.y" + case 54: /* column_type: INT */ +#line 564 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3369 "bison_parser.cpp" +#line 3417 "bison_parser.cpp" break; - case 54: /* column_type: INTEGER */ -#line 557 "bison_parser.y" + case 55: /* column_type: INTEGER */ +#line 565 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3375 "bison_parser.cpp" +#line 3423 "bison_parser.cpp" break; - case 55: /* column_type: LONG */ -#line 558 "bison_parser.y" + case 56: /* column_type: LONG */ +#line 566 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::LONG}; } -#line 3381 "bison_parser.cpp" +#line 3429 "bison_parser.cpp" break; - case 56: /* column_type: FLOAT */ -#line 559 "bison_parser.y" + case 57: /* column_type: FLOAT */ +#line 567 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3387 "bison_parser.cpp" +#line 3435 "bison_parser.cpp" break; - case 57: /* column_type: DOUBLE */ -#line 560 "bison_parser.y" + case 58: /* column_type: DOUBLE */ +#line 568 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } -#line 3393 "bison_parser.cpp" +#line 3441 "bison_parser.cpp" break; - case 58: /* column_type: VARCHAR '(' INTVAL ')' */ -#line 561 "bison_parser.y" + case 59: /* column_type: VARCHAR '(' INTVAL ')' */ +#line 569 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3399 "bison_parser.cpp" +#line 3447 "bison_parser.cpp" break; - case 59: /* column_type: CHAR '(' INTVAL ')' */ -#line 562 "bison_parser.y" + case 60: /* column_type: CHAR '(' INTVAL ')' */ +#line 570 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } -#line 3405 "bison_parser.cpp" +#line 3453 "bison_parser.cpp" break; - case 60: /* column_type: TEXT */ -#line 563 "bison_parser.y" + case 61: /* column_type: TEXT */ +#line 571 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } -#line 3411 "bison_parser.cpp" +#line 3459 "bison_parser.cpp" break; - case 61: /* column_type: DATETIME */ -#line 564 "bison_parser.y" + case 62: /* column_type: DATETIME */ +#line 572 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } -#line 3417 "bison_parser.cpp" +#line 3465 "bison_parser.cpp" break; - case 62: /* column_type: DATE */ -#line 565 "bison_parser.y" + case 63: /* column_type: DATE */ +#line 573 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATE}; } -#line 3423 "bison_parser.cpp" +#line 3471 "bison_parser.cpp" break; - case 63: /* opt_column_nullable: NULL */ -#line 569 "bison_parser.y" + case 64: /* opt_column_nullable: NULL */ +#line 577 "bison_parser.y" { (yyval.bval) = true; } -#line 3429 "bison_parser.cpp" +#line 3477 "bison_parser.cpp" break; - case 64: /* opt_column_nullable: NOT NULL */ -#line 570 "bison_parser.y" + case 65: /* opt_column_nullable: NOT NULL */ +#line 578 "bison_parser.y" { (yyval.bval) = false; } -#line 3435 "bison_parser.cpp" +#line 3483 "bison_parser.cpp" break; - case 65: /* opt_column_nullable: %empty */ -#line 571 "bison_parser.y" + case 66: /* opt_column_nullable: %empty */ +#line 579 "bison_parser.y" { (yyval.bval) = false; } -#line 3441 "bison_parser.cpp" +#line 3489 "bison_parser.cpp" break; - case 66: /* drop_statement: DROP TABLE opt_exists table_name */ -#line 581 "bison_parser.y" + case 67: /* drop_statement: DROP TABLE opt_exists table_name */ +#line 589 "bison_parser.y" { (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 3452 "bison_parser.cpp" +#line 3500 "bison_parser.cpp" break; - case 67: /* drop_statement: DROP VIEW opt_exists table_name */ -#line 587 "bison_parser.y" + case 68: /* drop_statement: DROP VIEW opt_exists table_name */ +#line 595 "bison_parser.y" { (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 3463 "bison_parser.cpp" +#line 3511 "bison_parser.cpp" break; - case 68: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ -#line 593 "bison_parser.y" + case 69: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ +#line 601 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); (yyval.drop_stmt)->ifExists = false; (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 3473 "bison_parser.cpp" +#line 3521 "bison_parser.cpp" break; - case 69: /* opt_exists: IF EXISTS */ -#line 601 "bison_parser.y" + case 70: /* opt_exists: IF EXISTS */ +#line 609 "bison_parser.y" { (yyval.bval) = true; } -#line 3479 "bison_parser.cpp" +#line 3527 "bison_parser.cpp" break; - case 70: /* opt_exists: %empty */ -#line 602 "bison_parser.y" + case 71: /* opt_exists: %empty */ +#line 610 "bison_parser.y" { (yyval.bval) = false; } -#line 3485 "bison_parser.cpp" +#line 3533 "bison_parser.cpp" break; - case 71: /* delete_statement: DELETE FROM table_name opt_where */ -#line 611 "bison_parser.y" + case 72: /* delete_statement: DELETE FROM table_name opt_where */ +#line 619 "bison_parser.y" { (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 3496 "bison_parser.cpp" +#line 3544 "bison_parser.cpp" break; - case 72: /* truncate_statement: TRUNCATE table_name */ -#line 620 "bison_parser.y" + case 73: /* truncate_statement: TRUNCATE table_name */ +#line 628 "bison_parser.y" { (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3506 "bison_parser.cpp" +#line 3554 "bison_parser.cpp" break; - case 73: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ -#line 633 "bison_parser.y" + case 74: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ +#line 641 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertValues); (yyval.insert_stmt)->schema = (yyvsp[-5].table_name).schema; @@ -3514,11 +3562,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } -#line 3518 "bison_parser.cpp" +#line 3566 "bison_parser.cpp" break; - case 74: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ -#line 640 "bison_parser.y" + case 75: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ +#line 648 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertSelect); (yyval.insert_stmt)->schema = (yyvsp[-2].table_name).schema; @@ -3526,74 +3574,74 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } -#line 3530 "bison_parser.cpp" +#line 3578 "bison_parser.cpp" break; - case 75: /* opt_column_list: '(' ident_commalist ')' */ -#line 651 "bison_parser.y" + case 76: /* opt_column_list: '(' ident_commalist ')' */ +#line 659 "bison_parser.y" { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 3536 "bison_parser.cpp" +#line 3584 "bison_parser.cpp" break; - case 76: /* opt_column_list: %empty */ -#line 652 "bison_parser.y" + case 77: /* opt_column_list: %empty */ +#line 660 "bison_parser.y" { (yyval.str_vec) = nullptr; } -#line 3542 "bison_parser.cpp" +#line 3590 "bison_parser.cpp" break; - case 77: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ -#line 662 "bison_parser.y" + case 78: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ +#line 670 "bison_parser.y" { (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 3553 "bison_parser.cpp" +#line 3601 "bison_parser.cpp" break; - case 78: /* update_clause_commalist: update_clause */ -#line 671 "bison_parser.y" + case 79: /* update_clause_commalist: update_clause */ +#line 679 "bison_parser.y" { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 3559 "bison_parser.cpp" +#line 3607 "bison_parser.cpp" break; - case 79: /* update_clause_commalist: update_clause_commalist ',' update_clause */ -#line 672 "bison_parser.y" + case 80: /* update_clause_commalist: update_clause_commalist ',' update_clause */ +#line 680 "bison_parser.y" { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 3565 "bison_parser.cpp" +#line 3613 "bison_parser.cpp" break; - case 80: /* update_clause: IDENTIFIER '=' expr */ -#line 676 "bison_parser.y" + case 81: /* update_clause: IDENTIFIER '=' expr */ +#line 684 "bison_parser.y" { (yyval.update_t) = new UpdateClause(); (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 3575 "bison_parser.cpp" +#line 3623 "bison_parser.cpp" break; - case 81: /* select_statement: opt_with_clause select_with_paren */ -#line 688 "bison_parser.y" + case 82: /* select_statement: opt_with_clause select_with_paren */ +#line 696 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3584 "bison_parser.cpp" +#line 3632 "bison_parser.cpp" break; - case 82: /* select_statement: opt_with_clause select_no_paren */ -#line 692 "bison_parser.y" + case 83: /* select_statement: opt_with_clause select_no_paren */ +#line 700 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3593 "bison_parser.cpp" +#line 3641 "bison_parser.cpp" break; - case 83: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ -#line 696 "bison_parser.y" + case 84: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ +#line 704 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3605,17 +3653,17 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); (yyval.select_stmt)->withDescriptions = (yyvsp[-5].with_description_vec); } -#line 3609 "bison_parser.cpp" +#line 3657 "bison_parser.cpp" break; - case 86: /* select_within_set_operation_no_parentheses: select_clause */ -#line 714 "bison_parser.y" + case 87: /* select_within_set_operation_no_parentheses: select_clause */ +#line 722 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); } -#line 3615 "bison_parser.cpp" +#line 3663 "bison_parser.cpp" break; - case 87: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ -#line 715 "bison_parser.y" + case 88: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ +#line 723 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3624,23 +3672,23 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->push_back((yyvsp[-1].set_operator_t)); (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[0].select_stmt); } -#line 3628 "bison_parser.cpp" +#line 3676 "bison_parser.cpp" break; - case 88: /* select_with_paren: '(' select_no_paren ')' */ -#line 726 "bison_parser.y" + case 89: /* select_with_paren: '(' select_no_paren ')' */ +#line 734 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3634 "bison_parser.cpp" +#line 3682 "bison_parser.cpp" break; - case 89: /* select_with_paren: '(' select_with_paren ')' */ -#line 727 "bison_parser.y" + case 90: /* select_with_paren: '(' select_with_paren ')' */ +#line 735 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3640 "bison_parser.cpp" +#line 3688 "bison_parser.cpp" break; - case 90: /* select_no_paren: select_clause opt_order opt_limit */ -#line 731 "bison_parser.y" + case 91: /* select_no_paren: select_clause opt_order opt_limit */ +#line 739 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); (yyval.select_stmt)->order = (yyvsp[-1].order_vec); @@ -3651,11 +3699,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3655 "bison_parser.cpp" +#line 3703 "bison_parser.cpp" break; - case 91: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ -#line 741 "bison_parser.y" + case 92: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ +#line 749 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3666,63 +3714,63 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); } -#line 3670 "bison_parser.cpp" +#line 3718 "bison_parser.cpp" break; - case 92: /* set_operator: set_type opt_all */ -#line 754 "bison_parser.y" + case 93: /* set_operator: set_type opt_all */ +#line 762 "bison_parser.y" { (yyval.set_operator_t) = (yyvsp[-1].set_operator_t); (yyval.set_operator_t)->isAll = (yyvsp[0].bval); } -#line 3679 "bison_parser.cpp" +#line 3727 "bison_parser.cpp" break; - case 93: /* set_type: UNION */ -#line 761 "bison_parser.y" + case 94: /* set_type: UNION */ +#line 769 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetUnion; } -#line 3688 "bison_parser.cpp" +#line 3736 "bison_parser.cpp" break; - case 94: /* set_type: INTERSECT */ -#line 765 "bison_parser.y" + case 95: /* set_type: INTERSECT */ +#line 773 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetIntersect; } -#line 3697 "bison_parser.cpp" +#line 3745 "bison_parser.cpp" break; - case 95: /* set_type: EXCEPT */ -#line 769 "bison_parser.y" + case 96: /* set_type: EXCEPT */ +#line 777 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetExcept; } -#line 3706 "bison_parser.cpp" +#line 3754 "bison_parser.cpp" break; - case 96: /* opt_all: ALL */ -#line 776 "bison_parser.y" + case 97: /* opt_all: ALL */ +#line 784 "bison_parser.y" { (yyval.bval) = true; } -#line 3714 "bison_parser.cpp" +#line 3762 "bison_parser.cpp" break; - case 97: /* opt_all: %empty */ -#line 779 "bison_parser.y" + case 98: /* opt_all: %empty */ +#line 787 "bison_parser.y" { (yyval.bval) = false; } -#line 3722 "bison_parser.cpp" +#line 3770 "bison_parser.cpp" break; - case 98: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ -#line 785 "bison_parser.y" + case 99: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ +#line 793 "bison_parser.y" { (yyval.select_stmt) = new SelectStatement(); (yyval.select_stmt)->limit = (yyvsp[-5].limit); @@ -3732,213 +3780,213 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 3736 "bison_parser.cpp" +#line 3784 "bison_parser.cpp" break; - case 99: /* opt_distinct: DISTINCT */ -#line 797 "bison_parser.y" + case 100: /* opt_distinct: DISTINCT */ +#line 805 "bison_parser.y" { (yyval.bval) = true; } -#line 3742 "bison_parser.cpp" +#line 3790 "bison_parser.cpp" break; - case 100: /* opt_distinct: %empty */ -#line 798 "bison_parser.y" + case 101: /* opt_distinct: %empty */ +#line 806 "bison_parser.y" { (yyval.bval) = false; } -#line 3748 "bison_parser.cpp" +#line 3796 "bison_parser.cpp" break; - case 102: /* opt_from_clause: from_clause */ -#line 806 "bison_parser.y" + case 103: /* opt_from_clause: from_clause */ +#line 814 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 3754 "bison_parser.cpp" +#line 3802 "bison_parser.cpp" break; - case 103: /* opt_from_clause: %empty */ -#line 807 "bison_parser.y" + case 104: /* opt_from_clause: %empty */ +#line 815 "bison_parser.y" { (yyval.table) = nullptr; } -#line 3760 "bison_parser.cpp" +#line 3808 "bison_parser.cpp" break; - case 104: /* from_clause: FROM table_ref */ -#line 811 "bison_parser.y" + case 105: /* from_clause: FROM table_ref */ +#line 819 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 3766 "bison_parser.cpp" +#line 3814 "bison_parser.cpp" break; - case 105: /* opt_where: WHERE expr */ -#line 816 "bison_parser.y" + case 106: /* opt_where: WHERE expr */ +#line 824 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 3772 "bison_parser.cpp" +#line 3820 "bison_parser.cpp" break; - case 106: /* opt_where: %empty */ -#line 817 "bison_parser.y" + case 107: /* opt_where: %empty */ +#line 825 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 3778 "bison_parser.cpp" +#line 3826 "bison_parser.cpp" break; - case 107: /* opt_group: GROUP BY expr_list opt_having */ -#line 821 "bison_parser.y" + case 108: /* opt_group: GROUP BY expr_list opt_having */ +#line 829 "bison_parser.y" { (yyval.group_t) = new GroupByDescription(); (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 3788 "bison_parser.cpp" +#line 3836 "bison_parser.cpp" break; - case 108: /* opt_group: %empty */ -#line 826 "bison_parser.y" + case 109: /* opt_group: %empty */ +#line 834 "bison_parser.y" { (yyval.group_t) = nullptr; } -#line 3794 "bison_parser.cpp" +#line 3842 "bison_parser.cpp" break; - case 109: /* opt_having: HAVING expr */ -#line 830 "bison_parser.y" + case 110: /* opt_having: HAVING expr */ +#line 838 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 3800 "bison_parser.cpp" +#line 3848 "bison_parser.cpp" break; - case 110: /* opt_having: %empty */ -#line 831 "bison_parser.y" + case 111: /* opt_having: %empty */ +#line 839 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 3806 "bison_parser.cpp" +#line 3854 "bison_parser.cpp" break; - case 111: /* opt_order: ORDER BY order_list */ -#line 835 "bison_parser.y" + case 112: /* opt_order: ORDER BY order_list */ +#line 843 "bison_parser.y" { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 3812 "bison_parser.cpp" +#line 3860 "bison_parser.cpp" break; - case 112: /* opt_order: %empty */ -#line 836 "bison_parser.y" + case 113: /* opt_order: %empty */ +#line 844 "bison_parser.y" { (yyval.order_vec) = nullptr; } -#line 3818 "bison_parser.cpp" +#line 3866 "bison_parser.cpp" break; - case 113: /* order_list: order_desc */ -#line 840 "bison_parser.y" + case 114: /* order_list: order_desc */ +#line 848 "bison_parser.y" { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 3824 "bison_parser.cpp" +#line 3872 "bison_parser.cpp" break; - case 114: /* order_list: order_list ',' order_desc */ -#line 841 "bison_parser.y" + case 115: /* order_list: order_list ',' order_desc */ +#line 849 "bison_parser.y" { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 3830 "bison_parser.cpp" +#line 3878 "bison_parser.cpp" break; - case 115: /* order_desc: expr opt_order_type */ -#line 845 "bison_parser.y" + case 116: /* order_desc: expr opt_order_type */ +#line 853 "bison_parser.y" { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 3836 "bison_parser.cpp" +#line 3884 "bison_parser.cpp" break; - case 116: /* opt_order_type: ASC */ -#line 849 "bison_parser.y" + case 117: /* opt_order_type: ASC */ +#line 857 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 3842 "bison_parser.cpp" +#line 3890 "bison_parser.cpp" break; - case 117: /* opt_order_type: DESC */ -#line 850 "bison_parser.y" + case 118: /* opt_order_type: DESC */ +#line 858 "bison_parser.y" { (yyval.order_type) = kOrderDesc; } -#line 3848 "bison_parser.cpp" +#line 3896 "bison_parser.cpp" break; - case 118: /* opt_order_type: %empty */ -#line 851 "bison_parser.y" + case 119: /* opt_order_type: %empty */ +#line 859 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 3854 "bison_parser.cpp" +#line 3902 "bison_parser.cpp" break; - case 119: /* opt_top: TOP int_literal */ -#line 857 "bison_parser.y" + case 120: /* opt_top: TOP int_literal */ +#line 865 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 3860 "bison_parser.cpp" +#line 3908 "bison_parser.cpp" break; - case 120: /* opt_top: %empty */ -#line 858 "bison_parser.y" + case 121: /* opt_top: %empty */ +#line 866 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 3866 "bison_parser.cpp" +#line 3914 "bison_parser.cpp" break; - case 121: /* opt_limit: LIMIT expr */ -#line 862 "bison_parser.y" + case 122: /* opt_limit: LIMIT expr */ +#line 870 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 3872 "bison_parser.cpp" +#line 3920 "bison_parser.cpp" break; - case 122: /* opt_limit: OFFSET expr */ -#line 863 "bison_parser.y" + case 123: /* opt_limit: OFFSET expr */ +#line 871 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 3878 "bison_parser.cpp" +#line 3926 "bison_parser.cpp" break; - case 123: /* opt_limit: LIMIT expr OFFSET expr */ -#line 864 "bison_parser.y" + case 124: /* opt_limit: LIMIT expr OFFSET expr */ +#line 872 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 3884 "bison_parser.cpp" +#line 3932 "bison_parser.cpp" break; - case 124: /* opt_limit: LIMIT ALL */ -#line 865 "bison_parser.y" + case 125: /* opt_limit: LIMIT ALL */ +#line 873 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, nullptr); } -#line 3890 "bison_parser.cpp" +#line 3938 "bison_parser.cpp" break; - case 125: /* opt_limit: LIMIT ALL OFFSET expr */ -#line 866 "bison_parser.y" + case 126: /* opt_limit: LIMIT ALL OFFSET expr */ +#line 874 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 3896 "bison_parser.cpp" +#line 3944 "bison_parser.cpp" break; - case 126: /* opt_limit: %empty */ -#line 867 "bison_parser.y" + case 127: /* opt_limit: %empty */ +#line 875 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 3902 "bison_parser.cpp" +#line 3950 "bison_parser.cpp" break; - case 127: /* expr_list: expr_alias */ -#line 874 "bison_parser.y" + case 128: /* expr_list: expr_alias */ +#line 882 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3908 "bison_parser.cpp" +#line 3956 "bison_parser.cpp" break; - case 128: /* expr_list: expr_list ',' expr_alias */ -#line 875 "bison_parser.y" + case 129: /* expr_list: expr_list ',' expr_alias */ +#line 883 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3914 "bison_parser.cpp" +#line 3962 "bison_parser.cpp" break; - case 129: /* opt_literal_list: literal_list */ -#line 879 "bison_parser.y" + case 130: /* opt_literal_list: literal_list */ +#line 887 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[0].expr_vec); } -#line 3920 "bison_parser.cpp" +#line 3968 "bison_parser.cpp" break; - case 130: /* opt_literal_list: %empty */ -#line 880 "bison_parser.y" + case 131: /* opt_literal_list: %empty */ +#line 888 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 3926 "bison_parser.cpp" +#line 3974 "bison_parser.cpp" break; - case 131: /* literal_list: literal */ -#line 884 "bison_parser.y" + case 132: /* literal_list: literal */ +#line 892 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3932 "bison_parser.cpp" +#line 3980 "bison_parser.cpp" break; - case 132: /* literal_list: literal_list ',' literal */ -#line 885 "bison_parser.y" + case 133: /* literal_list: literal_list ',' literal */ +#line 893 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3938 "bison_parser.cpp" +#line 3986 "bison_parser.cpp" break; - case 133: /* expr_alias: expr opt_alias */ -#line 889 "bison_parser.y" + case 134: /* expr_alias: expr opt_alias */ +#line 897 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); if ((yyvsp[0].alias_t)) { @@ -3946,421 +3994,421 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].alias_t); } } -#line 3950 "bison_parser.cpp" +#line 3998 "bison_parser.cpp" break; - case 139: /* operand: '(' expr ')' */ -#line 907 "bison_parser.y" + case 140: /* operand: '(' expr ')' */ +#line 915 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); } -#line 3956 "bison_parser.cpp" +#line 4004 "bison_parser.cpp" break; - case 149: /* operand: '(' select_no_paren ')' */ -#line 917 "bison_parser.y" + case 150: /* operand: '(' select_no_paren ')' */ +#line 925 "bison_parser.y" { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 3962 "bison_parser.cpp" +#line 4010 "bison_parser.cpp" break; - case 152: /* unary_expr: '-' operand */ -#line 926 "bison_parser.y" + case 153: /* unary_expr: '-' operand */ +#line 934 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 3968 "bison_parser.cpp" +#line 4016 "bison_parser.cpp" break; - case 153: /* unary_expr: NOT operand */ -#line 927 "bison_parser.y" + case 154: /* unary_expr: NOT operand */ +#line 935 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 3974 "bison_parser.cpp" +#line 4022 "bison_parser.cpp" break; - case 154: /* unary_expr: operand ISNULL */ -#line 928 "bison_parser.y" + case 155: /* unary_expr: operand ISNULL */ +#line 936 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 3980 "bison_parser.cpp" +#line 4028 "bison_parser.cpp" break; - case 155: /* unary_expr: operand IS NULL */ -#line 929 "bison_parser.y" + case 156: /* unary_expr: operand IS NULL */ +#line 937 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 3986 "bison_parser.cpp" +#line 4034 "bison_parser.cpp" break; - case 156: /* unary_expr: operand IS NOT NULL */ -#line 930 "bison_parser.y" + case 157: /* unary_expr: operand IS NOT NULL */ +#line 938 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 3992 "bison_parser.cpp" +#line 4040 "bison_parser.cpp" break; - case 158: /* binary_expr: operand '-' operand */ -#line 935 "bison_parser.y" + case 159: /* binary_expr: operand '-' operand */ +#line 943 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 3998 "bison_parser.cpp" +#line 4046 "bison_parser.cpp" break; - case 159: /* binary_expr: operand '+' operand */ -#line 936 "bison_parser.y" + case 160: /* binary_expr: operand '+' operand */ +#line 944 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 4004 "bison_parser.cpp" +#line 4052 "bison_parser.cpp" break; - case 160: /* binary_expr: operand '/' operand */ -#line 937 "bison_parser.y" + case 161: /* binary_expr: operand '/' operand */ +#line 945 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 4010 "bison_parser.cpp" +#line 4058 "bison_parser.cpp" break; - case 161: /* binary_expr: operand '*' operand */ -#line 938 "bison_parser.y" + case 162: /* binary_expr: operand '*' operand */ +#line 946 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 4016 "bison_parser.cpp" +#line 4064 "bison_parser.cpp" break; - case 162: /* binary_expr: operand '%' operand */ -#line 939 "bison_parser.y" + case 163: /* binary_expr: operand '%' operand */ +#line 947 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 4022 "bison_parser.cpp" +#line 4070 "bison_parser.cpp" break; - case 163: /* binary_expr: operand '^' operand */ -#line 940 "bison_parser.y" + case 164: /* binary_expr: operand '^' operand */ +#line 948 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 4028 "bison_parser.cpp" +#line 4076 "bison_parser.cpp" break; - case 164: /* binary_expr: operand LIKE operand */ -#line 941 "bison_parser.y" + case 165: /* binary_expr: operand LIKE operand */ +#line 949 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 4034 "bison_parser.cpp" +#line 4082 "bison_parser.cpp" break; - case 165: /* binary_expr: operand NOT LIKE operand */ -#line 942 "bison_parser.y" + case 166: /* binary_expr: operand NOT LIKE operand */ +#line 950 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 4040 "bison_parser.cpp" +#line 4088 "bison_parser.cpp" break; - case 166: /* binary_expr: operand ILIKE operand */ -#line 943 "bison_parser.y" + case 167: /* binary_expr: operand ILIKE operand */ +#line 951 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 4046 "bison_parser.cpp" +#line 4094 "bison_parser.cpp" break; - case 167: /* binary_expr: operand CONCAT operand */ -#line 944 "bison_parser.y" + case 168: /* binary_expr: operand CONCAT operand */ +#line 952 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 4052 "bison_parser.cpp" +#line 4100 "bison_parser.cpp" break; - case 168: /* logic_expr: expr AND expr */ -#line 948 "bison_parser.y" + case 169: /* logic_expr: expr AND expr */ +#line 956 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 4058 "bison_parser.cpp" +#line 4106 "bison_parser.cpp" break; - case 169: /* logic_expr: expr OR expr */ -#line 949 "bison_parser.y" + case 170: /* logic_expr: expr OR expr */ +#line 957 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 4064 "bison_parser.cpp" +#line 4112 "bison_parser.cpp" break; - case 170: /* in_expr: operand IN '(' expr_list ')' */ -#line 953 "bison_parser.y" + case 171: /* in_expr: operand IN '(' expr_list ')' */ +#line 961 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 4070 "bison_parser.cpp" +#line 4118 "bison_parser.cpp" break; - case 171: /* in_expr: operand NOT IN '(' expr_list ')' */ -#line 954 "bison_parser.y" + case 172: /* in_expr: operand NOT IN '(' expr_list ')' */ +#line 962 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 4076 "bison_parser.cpp" +#line 4124 "bison_parser.cpp" break; - case 172: /* in_expr: operand IN '(' select_no_paren ')' */ -#line 955 "bison_parser.y" + case 173: /* in_expr: operand IN '(' select_no_paren ')' */ +#line 963 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 4082 "bison_parser.cpp" +#line 4130 "bison_parser.cpp" break; - case 173: /* in_expr: operand NOT IN '(' select_no_paren ')' */ -#line 956 "bison_parser.y" + case 174: /* in_expr: operand NOT IN '(' select_no_paren ')' */ +#line 964 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 4088 "bison_parser.cpp" +#line 4136 "bison_parser.cpp" break; - case 174: /* case_expr: CASE expr case_list END */ -#line 962 "bison_parser.y" + case 175: /* case_expr: CASE expr case_list END */ +#line 970 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } -#line 4094 "bison_parser.cpp" +#line 4142 "bison_parser.cpp" break; - case 175: /* case_expr: CASE expr case_list ELSE expr END */ -#line 963 "bison_parser.y" + case 176: /* case_expr: CASE expr case_list ELSE expr END */ +#line 971 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4100 "bison_parser.cpp" +#line 4148 "bison_parser.cpp" break; - case 176: /* case_expr: CASE case_list END */ -#line 964 "bison_parser.y" + case 177: /* case_expr: CASE case_list END */ +#line 972 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } -#line 4106 "bison_parser.cpp" +#line 4154 "bison_parser.cpp" break; - case 177: /* case_expr: CASE case_list ELSE expr END */ -#line 965 "bison_parser.y" + case 178: /* case_expr: CASE case_list ELSE expr END */ +#line 973 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4112 "bison_parser.cpp" +#line 4160 "bison_parser.cpp" break; - case 178: /* case_list: WHEN expr THEN expr */ -#line 969 "bison_parser.y" + case 179: /* case_list: WHEN expr THEN expr */ +#line 977 "bison_parser.y" { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4118 "bison_parser.cpp" +#line 4166 "bison_parser.cpp" break; - case 179: /* case_list: case_list WHEN expr THEN expr */ -#line 970 "bison_parser.y" + case 180: /* case_list: case_list WHEN expr THEN expr */ +#line 978 "bison_parser.y" { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4124 "bison_parser.cpp" +#line 4172 "bison_parser.cpp" break; - case 180: /* exists_expr: EXISTS '(' select_no_paren ')' */ -#line 974 "bison_parser.y" + case 181: /* exists_expr: EXISTS '(' select_no_paren ')' */ +#line 982 "bison_parser.y" { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 4130 "bison_parser.cpp" +#line 4178 "bison_parser.cpp" break; - case 181: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ -#line 975 "bison_parser.y" + case 182: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ +#line 983 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 4136 "bison_parser.cpp" +#line 4184 "bison_parser.cpp" break; - case 182: /* comp_expr: operand '=' operand */ -#line 979 "bison_parser.y" + case 183: /* comp_expr: operand '=' operand */ +#line 987 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4142 "bison_parser.cpp" +#line 4190 "bison_parser.cpp" break; - case 183: /* comp_expr: operand EQUALS operand */ -#line 980 "bison_parser.y" + case 184: /* comp_expr: operand EQUALS operand */ +#line 988 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4148 "bison_parser.cpp" +#line 4196 "bison_parser.cpp" break; - case 184: /* comp_expr: operand NOTEQUALS operand */ -#line 981 "bison_parser.y" + case 185: /* comp_expr: operand NOTEQUALS operand */ +#line 989 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 4154 "bison_parser.cpp" +#line 4202 "bison_parser.cpp" break; - case 185: /* comp_expr: operand '<' operand */ -#line 982 "bison_parser.y" + case 186: /* comp_expr: operand '<' operand */ +#line 990 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 4160 "bison_parser.cpp" +#line 4208 "bison_parser.cpp" break; - case 186: /* comp_expr: operand '>' operand */ -#line 983 "bison_parser.y" + case 187: /* comp_expr: operand '>' operand */ +#line 991 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 4166 "bison_parser.cpp" +#line 4214 "bison_parser.cpp" break; - case 187: /* comp_expr: operand LESSEQ operand */ -#line 984 "bison_parser.y" + case 188: /* comp_expr: operand LESSEQ operand */ +#line 992 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 4172 "bison_parser.cpp" +#line 4220 "bison_parser.cpp" break; - case 188: /* comp_expr: operand GREATEREQ operand */ -#line 985 "bison_parser.y" + case 189: /* comp_expr: operand GREATEREQ operand */ +#line 993 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 4178 "bison_parser.cpp" +#line 4226 "bison_parser.cpp" break; - case 189: /* function_expr: IDENTIFIER '(' ')' */ -#line 989 "bison_parser.y" + case 190: /* function_expr: IDENTIFIER '(' ')' */ +#line 997 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 4184 "bison_parser.cpp" +#line 4232 "bison_parser.cpp" break; - case 190: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ -#line 990 "bison_parser.y" + case 191: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ +#line 998 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 4190 "bison_parser.cpp" +#line 4238 "bison_parser.cpp" break; - case 191: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ -#line 994 "bison_parser.y" + case 192: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ +#line 1002 "bison_parser.y" { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } -#line 4196 "bison_parser.cpp" +#line 4244 "bison_parser.cpp" break; - case 192: /* cast_expr: CAST '(' expr AS column_type ')' */ -#line 998 "bison_parser.y" + case 193: /* cast_expr: CAST '(' expr AS column_type ')' */ +#line 1006 "bison_parser.y" { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } -#line 4202 "bison_parser.cpp" +#line 4250 "bison_parser.cpp" break; - case 193: /* datetime_field: SECOND */ -#line 1002 "bison_parser.y" + case 194: /* datetime_field: SECOND */ +#line 1010 "bison_parser.y" { (yyval.datetime_field) = kDatetimeSecond; } -#line 4208 "bison_parser.cpp" +#line 4256 "bison_parser.cpp" break; - case 194: /* datetime_field: MINUTE */ -#line 1003 "bison_parser.y" + case 195: /* datetime_field: MINUTE */ +#line 1011 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMinute; } -#line 4214 "bison_parser.cpp" +#line 4262 "bison_parser.cpp" break; - case 195: /* datetime_field: HOUR */ -#line 1004 "bison_parser.y" + case 196: /* datetime_field: HOUR */ +#line 1012 "bison_parser.y" { (yyval.datetime_field) = kDatetimeHour; } -#line 4220 "bison_parser.cpp" +#line 4268 "bison_parser.cpp" break; - case 196: /* datetime_field: DAY */ -#line 1005 "bison_parser.y" + case 197: /* datetime_field: DAY */ +#line 1013 "bison_parser.y" { (yyval.datetime_field) = kDatetimeDay; } -#line 4226 "bison_parser.cpp" +#line 4274 "bison_parser.cpp" break; - case 197: /* datetime_field: MONTH */ -#line 1006 "bison_parser.y" + case 198: /* datetime_field: MONTH */ +#line 1014 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMonth; } -#line 4232 "bison_parser.cpp" +#line 4280 "bison_parser.cpp" break; - case 198: /* datetime_field: YEAR */ -#line 1007 "bison_parser.y" + case 199: /* datetime_field: YEAR */ +#line 1015 "bison_parser.y" { (yyval.datetime_field) = kDatetimeYear; } -#line 4238 "bison_parser.cpp" +#line 4286 "bison_parser.cpp" break; - case 199: /* array_expr: ARRAY '[' expr_list ']' */ -#line 1011 "bison_parser.y" + case 200: /* array_expr: ARRAY '[' expr_list ']' */ +#line 1019 "bison_parser.y" { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 4244 "bison_parser.cpp" +#line 4292 "bison_parser.cpp" break; - case 200: /* array_index: operand '[' int_literal ']' */ -#line 1015 "bison_parser.y" + case 201: /* array_index: operand '[' int_literal ']' */ +#line 1023 "bison_parser.y" { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 4250 "bison_parser.cpp" +#line 4298 "bison_parser.cpp" break; - case 201: /* between_expr: operand BETWEEN operand AND operand */ -#line 1019 "bison_parser.y" + case 202: /* between_expr: operand BETWEEN operand AND operand */ +#line 1027 "bison_parser.y" { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4256 "bison_parser.cpp" +#line 4304 "bison_parser.cpp" break; - case 202: /* column_name: IDENTIFIER */ -#line 1023 "bison_parser.y" + case 203: /* column_name: IDENTIFIER */ +#line 1031 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 4262 "bison_parser.cpp" +#line 4310 "bison_parser.cpp" break; - case 203: /* column_name: IDENTIFIER '.' IDENTIFIER */ -#line 1024 "bison_parser.y" + case 204: /* column_name: IDENTIFIER '.' IDENTIFIER */ +#line 1032 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 4268 "bison_parser.cpp" +#line 4316 "bison_parser.cpp" break; - case 204: /* column_name: '*' */ -#line 1025 "bison_parser.y" + case 205: /* column_name: '*' */ +#line 1033 "bison_parser.y" { (yyval.expr) = Expr::makeStar(); } -#line 4274 "bison_parser.cpp" +#line 4322 "bison_parser.cpp" break; - case 205: /* column_name: IDENTIFIER '.' '*' */ -#line 1026 "bison_parser.y" + case 206: /* column_name: IDENTIFIER '.' '*' */ +#line 1034 "bison_parser.y" { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 4280 "bison_parser.cpp" +#line 4328 "bison_parser.cpp" break; - case 211: /* string_literal: STRING */ -#line 1038 "bison_parser.y" + case 212: /* string_literal: STRING */ +#line 1046 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 4286 "bison_parser.cpp" +#line 4334 "bison_parser.cpp" break; - case 212: /* bool_literal: TRUE */ -#line 1042 "bison_parser.y" + case 213: /* bool_literal: TRUE */ +#line 1050 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(true); } -#line 4292 "bison_parser.cpp" +#line 4340 "bison_parser.cpp" break; - case 213: /* bool_literal: FALSE */ -#line 1043 "bison_parser.y" + case 214: /* bool_literal: FALSE */ +#line 1051 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(false); } -#line 4298 "bison_parser.cpp" +#line 4346 "bison_parser.cpp" break; - case 214: /* num_literal: FLOATVAL */ -#line 1047 "bison_parser.y" + case 215: /* num_literal: FLOATVAL */ +#line 1055 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 4304 "bison_parser.cpp" +#line 4352 "bison_parser.cpp" break; - case 216: /* int_literal: INTVAL */ -#line 1052 "bison_parser.y" + case 217: /* int_literal: INTVAL */ +#line 1060 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 4310 "bison_parser.cpp" +#line 4358 "bison_parser.cpp" break; - case 217: /* null_literal: NULL */ -#line 1056 "bison_parser.y" + case 218: /* null_literal: NULL */ +#line 1064 "bison_parser.y" { (yyval.expr) = Expr::makeNullLiteral(); } -#line 4316 "bison_parser.cpp" +#line 4364 "bison_parser.cpp" break; - case 218: /* param_expr: '?' */ -#line 1060 "bison_parser.y" + case 219: /* param_expr: '?' */ +#line 1068 "bison_parser.y" { (yyval.expr) = Expr::makeParameter(yylloc.total_column); (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 4326 "bison_parser.cpp" +#line 4374 "bison_parser.cpp" break; - case 220: /* table_ref: table_ref_commalist ',' table_ref_atomic */ -#line 1073 "bison_parser.y" + case 221: /* table_ref: table_ref_commalist ',' table_ref_atomic */ +#line 1081 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); auto tbl = new TableRef(kTableCrossProduct); tbl->list = (yyvsp[-2].table_vec); (yyval.table) = tbl; } -#line 4337 "bison_parser.cpp" +#line 4385 "bison_parser.cpp" break; - case 224: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ -#line 1089 "bison_parser.y" + case 225: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ +#line 1097 "bison_parser.y" { auto tbl = new TableRef(kTableSelect); tbl->select = (yyvsp[-2].select_stmt); tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4348 "bison_parser.cpp" +#line 4396 "bison_parser.cpp" break; - case 225: /* table_ref_commalist: table_ref_atomic */ -#line 1098 "bison_parser.y" + case 226: /* table_ref_commalist: table_ref_atomic */ +#line 1106 "bison_parser.y" { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 4354 "bison_parser.cpp" +#line 4402 "bison_parser.cpp" break; - case 226: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ -#line 1099 "bison_parser.y" + case 227: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ +#line 1107 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 4360 "bison_parser.cpp" +#line 4408 "bison_parser.cpp" break; - case 227: /* table_ref_name: table_name opt_table_alias */ -#line 1104 "bison_parser.y" + case 228: /* table_ref_name: table_name opt_table_alias */ +#line 1112 "bison_parser.y" { auto tbl = new TableRef(kTableName); tbl->schema = (yyvsp[-1].table_name).schema; @@ -4368,103 +4416,115 @@ YYLTYPE yylloc = yyloc_default; tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4372 "bison_parser.cpp" +#line 4420 "bison_parser.cpp" break; - case 228: /* table_ref_name_no_alias: table_name */ -#line 1115 "bison_parser.y" + case 229: /* table_ref_name_no_alias: table_name */ +#line 1123 "bison_parser.y" { (yyval.table) = new TableRef(kTableName); (yyval.table)->schema = (yyvsp[0].table_name).schema; (yyval.table)->name = (yyvsp[0].table_name).name; } -#line 4382 "bison_parser.cpp" +#line 4430 "bison_parser.cpp" break; - case 229: /* table_name: IDENTIFIER */ -#line 1124 "bison_parser.y" + case 230: /* table_name: IDENTIFIER */ +#line 1132 "bison_parser.y" { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} -#line 4388 "bison_parser.cpp" +#line 4436 "bison_parser.cpp" break; - case 230: /* table_name: IDENTIFIER '.' IDENTIFIER */ -#line 1125 "bison_parser.y" + case 231: /* table_name: IDENTIFIER '.' IDENTIFIER */ +#line 1133 "bison_parser.y" { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } -#line 4394 "bison_parser.cpp" +#line 4442 "bison_parser.cpp" + break; + + case 232: /* opt_index_name: IDENTIFIER */ +#line 1137 "bison_parser.y" + { (yyval.sval) = (yyvsp[0].sval);} +#line 4448 "bison_parser.cpp" + break; + + case 233: /* opt_index_name: %empty */ +#line 1138 "bison_parser.y" + { (yyval.sval) = nullptr;} +#line 4454 "bison_parser.cpp" break; - case 232: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ -#line 1131 "bison_parser.y" + case 235: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ +#line 1144 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } -#line 4400 "bison_parser.cpp" +#line 4460 "bison_parser.cpp" break; - case 234: /* opt_table_alias: %empty */ -#line 1137 "bison_parser.y" + case 237: /* opt_table_alias: %empty */ +#line 1150 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4406 "bison_parser.cpp" +#line 4466 "bison_parser.cpp" break; - case 235: /* alias: AS IDENTIFIER */ -#line 1142 "bison_parser.y" + case 238: /* alias: AS IDENTIFIER */ +#line 1155 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4412 "bison_parser.cpp" +#line 4472 "bison_parser.cpp" break; - case 236: /* alias: IDENTIFIER */ -#line 1143 "bison_parser.y" + case 239: /* alias: IDENTIFIER */ +#line 1156 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4418 "bison_parser.cpp" +#line 4478 "bison_parser.cpp" break; - case 238: /* opt_alias: %empty */ -#line 1149 "bison_parser.y" + case 241: /* opt_alias: %empty */ +#line 1162 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4424 "bison_parser.cpp" +#line 4484 "bison_parser.cpp" break; - case 240: /* opt_with_clause: %empty */ -#line 1159 "bison_parser.y" + case 243: /* opt_with_clause: %empty */ +#line 1172 "bison_parser.y" { (yyval.with_description_vec) = nullptr; } -#line 4430 "bison_parser.cpp" +#line 4490 "bison_parser.cpp" break; - case 241: /* with_clause: WITH with_description_list */ -#line 1163 "bison_parser.y" + case 244: /* with_clause: WITH with_description_list */ +#line 1176 "bison_parser.y" { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } -#line 4436 "bison_parser.cpp" +#line 4496 "bison_parser.cpp" break; - case 242: /* with_description_list: with_description */ -#line 1167 "bison_parser.y" + case 245: /* with_description_list: with_description */ +#line 1180 "bison_parser.y" { (yyval.with_description_vec) = new std::vector(); (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); } -#line 4445 "bison_parser.cpp" +#line 4505 "bison_parser.cpp" break; - case 243: /* with_description_list: with_description_list ',' with_description */ -#line 1171 "bison_parser.y" + case 246: /* with_description_list: with_description_list ',' with_description */ +#line 1184 "bison_parser.y" { (yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t)); (yyval.with_description_vec) = (yyvsp[-2].with_description_vec); } -#line 4454 "bison_parser.cpp" +#line 4514 "bison_parser.cpp" break; - case 244: /* with_description: IDENTIFIER AS select_with_paren */ -#line 1178 "bison_parser.y" + case 247: /* with_description: IDENTIFIER AS select_with_paren */ +#line 1191 "bison_parser.y" { (yyval.with_description_t) = new WithDescription(); (yyval.with_description_t)->alias = (yyvsp[-2].sval); (yyval.with_description_t)->select = (yyvsp[0].select_stmt); } -#line 4464 "bison_parser.cpp" +#line 4524 "bison_parser.cpp" break; - case 245: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ -#line 1192 "bison_parser.y" + case 248: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ +#line 1205 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4472,11 +4532,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 4476 "bison_parser.cpp" +#line 4536 "bison_parser.cpp" break; - case 246: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ -#line 1200 "bison_parser.y" + case 249: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ +#line 1213 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4485,11 +4545,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 4489 "bison_parser.cpp" +#line 4549 "bison_parser.cpp" break; - case 247: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ -#line 1210 "bison_parser.y" + case 250: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ +#line 1223 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4505,83 +4565,83 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } -#line 4509 "bison_parser.cpp" +#line 4569 "bison_parser.cpp" break; - case 248: /* opt_join_type: INNER */ -#line 1228 "bison_parser.y" + case 251: /* opt_join_type: INNER */ +#line 1241 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4515 "bison_parser.cpp" +#line 4575 "bison_parser.cpp" break; - case 249: /* opt_join_type: LEFT OUTER */ -#line 1229 "bison_parser.y" + case 252: /* opt_join_type: LEFT OUTER */ +#line 1242 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4521 "bison_parser.cpp" +#line 4581 "bison_parser.cpp" break; - case 250: /* opt_join_type: LEFT */ -#line 1230 "bison_parser.y" + case 253: /* opt_join_type: LEFT */ +#line 1243 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4527 "bison_parser.cpp" +#line 4587 "bison_parser.cpp" break; - case 251: /* opt_join_type: RIGHT OUTER */ -#line 1231 "bison_parser.y" + case 254: /* opt_join_type: RIGHT OUTER */ +#line 1244 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4533 "bison_parser.cpp" +#line 4593 "bison_parser.cpp" break; - case 252: /* opt_join_type: RIGHT */ -#line 1232 "bison_parser.y" + case 255: /* opt_join_type: RIGHT */ +#line 1245 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4539 "bison_parser.cpp" +#line 4599 "bison_parser.cpp" break; - case 253: /* opt_join_type: FULL OUTER */ -#line 1233 "bison_parser.y" + case 256: /* opt_join_type: FULL OUTER */ +#line 1246 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4545 "bison_parser.cpp" +#line 4605 "bison_parser.cpp" break; - case 254: /* opt_join_type: OUTER */ -#line 1234 "bison_parser.y" + case 257: /* opt_join_type: OUTER */ +#line 1247 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4551 "bison_parser.cpp" +#line 4611 "bison_parser.cpp" break; - case 255: /* opt_join_type: FULL */ -#line 1235 "bison_parser.y" + case 258: /* opt_join_type: FULL */ +#line 1248 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4557 "bison_parser.cpp" +#line 4617 "bison_parser.cpp" break; - case 256: /* opt_join_type: CROSS */ -#line 1236 "bison_parser.y" + case 259: /* opt_join_type: CROSS */ +#line 1249 "bison_parser.y" { (yyval.uval) = kJoinCross; } -#line 4563 "bison_parser.cpp" +#line 4623 "bison_parser.cpp" break; - case 257: /* opt_join_type: %empty */ -#line 1237 "bison_parser.y" + case 260: /* opt_join_type: %empty */ +#line 1250 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4569 "bison_parser.cpp" +#line 4629 "bison_parser.cpp" break; - case 261: /* ident_commalist: IDENTIFIER */ -#line 1257 "bison_parser.y" + case 264: /* ident_commalist: IDENTIFIER */ +#line 1270 "bison_parser.y" { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 4575 "bison_parser.cpp" +#line 4635 "bison_parser.cpp" break; - case 262: /* ident_commalist: ident_commalist ',' IDENTIFIER */ -#line 1258 "bison_parser.y" + case 265: /* ident_commalist: ident_commalist ',' IDENTIFIER */ +#line 1271 "bison_parser.y" { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 4581 "bison_parser.cpp" +#line 4641 "bison_parser.cpp" break; -#line 4585 "bison_parser.cpp" +#line 4645 "bison_parser.cpp" default: break; } @@ -4811,7 +4871,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 1261 "bison_parser.y" +#line 1274 "bison_parser.y" /********************************* ** Section 4: Additional C code diff --git a/src/parser/bison_parser.h b/src/parser/bison_parser.h index aa7b6558..034caa15 100644 --- a/src/parser/bison_parser.h +++ b/src/parser/bison_parser.h @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.7.4. */ +/* A Bison parser, made by GNU Bison 3.7.6. */ /* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 8d92e0df..35fbae18 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -202,6 +202,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha %type drop_statement %type show_statement %type table_name +%type opt_index_name %type file_path prepare_target_query %type opt_not_exists opt_exists opt_distinct opt_column_nullable opt_all %type opt_join_type @@ -526,6 +527,13 @@ create_statement: $$->tableName = $4.name; $$->select = $6; } + | CREATE INDEX opt_index_name opt_not_exists ON table_name '(' ident_commalist ')' { + $$ = new CreateStatement(kCreateIndex); + $$->indexName = $3; + $$->ifNotExists = $4; + $$->tableName = $6.name; + $$->indexColumns = $8; + } | CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement { $$ = new CreateStatement(kCreateView); $$->ifNotExists = $3; @@ -1125,6 +1133,11 @@ table_name: | IDENTIFIER '.' IDENTIFIER { $$.schema = $1; $$.name = $3; } ; +opt_index_name: + IDENTIFIER { $$ = $1;} + | /* empty */ { $$ = nullptr;} + ; + table_alias: alias diff --git a/src/sql/CreateStatement.h b/src/sql/CreateStatement.h index 99d53f56..56e78192 100755 --- a/src/sql/CreateStatement.h +++ b/src/sql/CreateStatement.h @@ -39,6 +39,7 @@ namespace hsql { char* schema; // default: nullptr char* tableName; // default: nullptr char* indexName; // default: nullptr + std::vector* indexColumns; std::vector* columns; // default: nullptr std::vector* viewColumns; SelectStatement* select; From b278a8e07ca4af634f5965c2cb9e9ed8433f7ea4 Mon Sep 17 00:00:00 2001 From: Moritz Spranger Date: Sat, 3 Jul 2021 15:00:08 +0200 Subject: [PATCH 03/73] Add Drop Index to sql_translator --- src/parser/bison_parser.cpp | 2269 ++++++++++++++++++----------------- src/parser/bison_parser.y | 12 +- src/sql/DropStatement.h | 1 + 3 files changed, 1151 insertions(+), 1131 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index c8d50121..033a5498 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -394,19 +394,20 @@ enum yysymbol_kind_t YYSYMBOL_table_ref_name_no_alias = 260, /* table_ref_name_no_alias */ YYSYMBOL_table_name = 261, /* table_name */ YYSYMBOL_opt_index_name = 262, /* opt_index_name */ - YYSYMBOL_table_alias = 263, /* table_alias */ - YYSYMBOL_opt_table_alias = 264, /* opt_table_alias */ - YYSYMBOL_alias = 265, /* alias */ - YYSYMBOL_opt_alias = 266, /* opt_alias */ - YYSYMBOL_opt_with_clause = 267, /* opt_with_clause */ - YYSYMBOL_with_clause = 268, /* with_clause */ - YYSYMBOL_with_description_list = 269, /* with_description_list */ - YYSYMBOL_with_description = 270, /* with_description */ - YYSYMBOL_join_clause = 271, /* join_clause */ - YYSYMBOL_opt_join_type = 272, /* opt_join_type */ - YYSYMBOL_join_condition = 273, /* join_condition */ - YYSYMBOL_opt_semicolon = 274, /* opt_semicolon */ - YYSYMBOL_ident_commalist = 275 /* ident_commalist */ + YYSYMBOL_index_name = 263, /* index_name */ + YYSYMBOL_table_alias = 264, /* table_alias */ + YYSYMBOL_opt_table_alias = 265, /* opt_table_alias */ + YYSYMBOL_alias = 266, /* alias */ + YYSYMBOL_opt_alias = 267, /* opt_alias */ + YYSYMBOL_opt_with_clause = 268, /* opt_with_clause */ + YYSYMBOL_with_clause = 269, /* with_clause */ + YYSYMBOL_with_description_list = 270, /* with_description_list */ + YYSYMBOL_with_description = 271, /* with_description */ + YYSYMBOL_join_clause = 272, /* join_clause */ + YYSYMBOL_opt_join_type = 273, /* opt_join_type */ + YYSYMBOL_join_condition = 274, /* join_condition */ + YYSYMBOL_opt_semicolon = 275, /* opt_semicolon */ + YYSYMBOL_ident_commalist = 276 /* ident_commalist */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -729,18 +730,18 @@ union yyalloc #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 63 +#define YYFINAL 64 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 791 +#define YYLAST 722 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 169 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 107 +#define YYNNTS 108 /* YYNRULES -- Number of rules. */ -#define YYNRULES 265 +#define YYNRULES 267 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 483 +#define YYNSTATES 488 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 406 @@ -804,33 +805,33 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 270, 270, 291, 297, 306, 310, 314, 317, 320, - 327, 328, 329, 330, 331, 332, 333, 334, 335, 344, - 345, 350, 351, 355, 359, 371, 374, 377, 383, 384, - 391, 398, 401, 405, 419, 425, 434, 451, 455, 458, - 467, 481, 484, 489, 503, 516, 523, 530, 537, 548, - 549, 553, 554, 558, 564, 565, 566, 567, 568, 569, - 570, 571, 572, 573, 577, 578, 579, 589, 595, 601, - 609, 610, 619, 628, 641, 648, 659, 660, 670, 679, - 680, 684, 696, 700, 704, 718, 719, 722, 723, 734, - 735, 739, 749, 762, 769, 773, 777, 784, 787, 793, - 805, 806, 810, 814, 815, 819, 824, 825, 829, 834, - 838, 839, 843, 844, 848, 849, 853, 857, 858, 859, - 865, 866, 870, 871, 872, 873, 874, 875, 882, 883, - 887, 888, 892, 893, 897, 907, 908, 909, 910, 911, - 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, - 925, 929, 930, 934, 935, 936, 937, 938, 942, 943, - 944, 945, 946, 947, 948, 949, 950, 951, 952, 956, - 957, 961, 962, 963, 964, 970, 971, 972, 973, 977, - 978, 982, 983, 987, 988, 989, 990, 991, 992, 993, - 997, 998, 1002, 1006, 1010, 1011, 1012, 1013, 1014, 1015, - 1019, 1023, 1027, 1031, 1032, 1033, 1034, 1038, 1039, 1040, - 1041, 1042, 1046, 1050, 1051, 1055, 1056, 1060, 1064, 1068, - 1080, 1081, 1091, 1092, 1096, 1097, 1106, 1107, 1112, 1123, - 1132, 1133, 1137, 1138, 1143, 1144, 1149, 1150, 1155, 1156, - 1161, 1162, 1171, 1172, 1176, 1180, 1184, 1191, 1204, 1212, - 1222, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, - 1250, 1255, 1264, 1265, 1270, 1271 + 0, 271, 271, 292, 298, 307, 311, 315, 318, 321, + 328, 329, 330, 331, 332, 333, 334, 335, 336, 345, + 346, 351, 352, 356, 360, 372, 375, 378, 384, 385, + 392, 399, 402, 406, 420, 426, 435, 452, 456, 459, + 468, 482, 485, 490, 504, 517, 524, 531, 538, 549, + 550, 554, 555, 559, 565, 566, 567, 568, 569, 570, + 571, 572, 573, 574, 578, 579, 580, 590, 596, 602, + 607, 615, 616, 625, 634, 647, 654, 665, 666, 676, + 685, 686, 690, 702, 706, 710, 724, 725, 728, 729, + 740, 741, 745, 755, 768, 775, 779, 783, 790, 793, + 799, 811, 812, 816, 820, 821, 825, 830, 831, 835, + 840, 844, 845, 849, 850, 854, 855, 859, 863, 864, + 865, 871, 872, 876, 877, 878, 879, 880, 881, 888, + 889, 893, 894, 898, 899, 903, 913, 914, 915, 916, + 917, 921, 922, 923, 924, 925, 926, 927, 928, 929, + 930, 931, 935, 936, 940, 941, 942, 943, 944, 948, + 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, + 962, 963, 967, 968, 969, 970, 976, 977, 978, 979, + 983, 984, 988, 989, 993, 994, 995, 996, 997, 998, + 999, 1003, 1004, 1008, 1012, 1016, 1017, 1018, 1019, 1020, + 1021, 1025, 1029, 1033, 1037, 1038, 1039, 1040, 1044, 1045, + 1046, 1047, 1048, 1052, 1056, 1057, 1061, 1062, 1066, 1070, + 1074, 1086, 1087, 1097, 1098, 1102, 1103, 1112, 1113, 1118, + 1129, 1138, 1139, 1143, 1144, 1148, 1153, 1154, 1159, 1160, + 1165, 1166, 1171, 1172, 1181, 1182, 1186, 1190, 1194, 1201, + 1214, 1222, 1232, 1251, 1252, 1253, 1254, 1255, 1256, 1257, + 1258, 1259, 1260, 1265, 1274, 1275, 1280, 1281 }; #endif @@ -892,11 +893,11 @@ static const char *const yytname[] = "string_literal", "bool_literal", "num_literal", "int_literal", "null_literal", "param_expr", "table_ref", "table_ref_atomic", "nonjoin_table_ref_atomic", "table_ref_commalist", "table_ref_name", - "table_ref_name_no_alias", "table_name", "opt_index_name", "table_alias", - "opt_table_alias", "alias", "opt_alias", "opt_with_clause", - "with_clause", "with_description_list", "with_description", - "join_clause", "opt_join_type", "join_condition", "opt_semicolon", - "ident_commalist", YY_NULLPTR + "table_ref_name_no_alias", "table_name", "opt_index_name", "index_name", + "table_alias", "opt_table_alias", "alias", "opt_alias", + "opt_with_clause", "with_clause", "with_description_list", + "with_description", "join_clause", "opt_join_type", "join_condition", + "opt_semicolon", "ident_commalist", YY_NULLPTR }; static const char * @@ -931,12 +932,12 @@ static const yytype_int16 yytoknum[] = }; #endif -#define YYPACT_NINF (-364) +#define YYPACT_NINF (-369) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF (-263) +#define YYTABLE_NINF (-265) #define yytable_value_is_error(Yyn) \ ((Yyn) == YYTABLE_NINF) @@ -945,55 +946,55 @@ static const yytype_int16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - 473, 57, 112, 159, 162, 112, -33, 37, 86, 90, - 112, 112, -13, 8, 174, 50, 50, 50, 203, 27, - -364, 102, -364, 102, -364, -364, -364, -364, -364, -364, - -364, -364, -364, -364, -364, -32, -364, 213, 52, -364, - 65, 150, -364, 237, 128, 128, 112, 271, 112, 179, - -364, -55, 207, 207, 112, -364, 191, 145, -364, -364, - -364, -364, -364, -364, 468, -364, 226, -364, -364, 202, - -32, 29, -364, 26, -364, 328, 13, 333, -364, 128, - 239, 112, 112, 275, -364, 268, 216, 363, 366, 366, - 331, 112, 112, -364, 224, 174, -364, 230, 379, 382, - 232, 234, -364, -364, -364, -32, 290, 279, -32, 111, - -364, -364, -364, -364, -364, -364, -364, -364, 238, 236, - -364, -364, -364, -364, -364, -364, -364, -364, -364, 278, - 364, -60, 216, 253, -364, 366, 403, 32, 269, -56, - -364, 305, -364, 305, -364, -364, -364, -364, -364, 412, - -364, -364, 253, -364, -364, 345, -364, -364, 29, -364, - -364, 253, 345, 253, 75, -364, -364, 13, 112, -364, - 415, 318, 419, 307, 141, 265, 266, 267, 154, 285, - 272, 281, -364, 220, -63, 315, -364, -364, -364, -364, - -364, -364, -364, -364, -364, -364, -364, -364, -364, -364, - -364, -364, 339, -364, -123, 280, -364, 253, 363, -364, - 390, -364, -364, 284, 77, -364, 346, 283, -364, 72, - 111, -32, 287, -364, 109, 111, -63, 392, -26, -364, - 288, 367, -364, 677, 84, -364, 318, 14, 10, 399, - 209, 253, 253, 79, 121, 293, 281, 503, 253, 119, - 294, -71, 253, 253, 281, -364, 281, -2, 301, 156, - 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, - 281, 281, 281, 281, 281, 379, 112, -364, 454, 13, - -63, -364, 271, 13, -364, 412, 9, 275, -364, 253, - -364, 462, -364, -364, -364, -364, 253, -364, -364, -364, - -364, 253, 253, 403, 366, -364, 314, -364, -364, 316, - -364, -364, -364, -364, -364, 199, -364, 419, -364, -364, - 253, -364, -364, 317, -364, -364, -364, -364, -364, -364, - 389, 78, 142, 123, 253, 253, -364, 399, 386, -38, - -364, -364, -364, 374, 437, 522, 281, 322, 220, -364, - 388, 330, 522, 522, 522, 522, 541, 541, 541, 541, - 119, 119, -94, -94, -94, -84, 327, -364, -364, 183, - -364, 184, -364, 318, -364, 33, -364, 325, -364, 34, - -364, 428, -364, -364, -364, -63, -63, 190, -364, 490, - 491, -364, 402, -364, -364, 196, -364, 253, 677, 253, - 253, -364, 189, 144, 334, -364, 281, 522, 220, 338, - 204, -364, -364, -364, -364, 342, 413, -364, -364, -364, - 438, 439, 440, 416, 9, 511, -364, -364, -364, 396, - -364, -364, 354, 355, -364, -364, -39, 358, -63, 193, - -364, 253, -364, 503, 359, 214, -364, -364, 34, 9, - -364, -364, -364, 9, 240, 361, 253, -364, -364, -364, - -364, -364, -63, -364, -364, -364, -364, 300, 403, -14, - 362, 253, 222, 253, -364, 11, -63, -364, -364, -63, - 365, 368, -364 + 512, -6, 42, 116, 117, 42, -31, 38, 75, 91, + 42, 42, 113, 3, 195, 60, 60, 60, 211, 54, + -369, 114, -369, 114, -369, -369, -369, -369, -369, -369, + -369, -369, -369, -369, -369, -35, -369, 222, 82, -369, + 97, 197, -369, 271, 176, 176, 42, 305, 42, 191, + -369, -68, 310, 192, 192, 42, -369, 196, 148, -369, + -369, -369, -369, -369, -369, 507, -369, 228, -369, -369, + 203, -35, 53, -369, 199, -369, 330, 19, 344, -369, + 176, 234, 42, 42, 277, -369, 272, 221, 356, 360, + 360, -369, 259, 325, 42, 42, -369, 227, 195, -369, + 235, 385, 390, 246, 251, -369, -369, -369, -35, 299, + 295, -35, 29, -369, -369, -369, -369, -369, -369, -369, + -369, 253, 255, -369, -369, -369, -369, -369, -369, -369, + -369, -369, 294, 382, -49, 221, 258, -369, 360, 421, + 244, 281, -44, -369, 322, -369, 322, 42, -369, -369, + -369, -369, -369, 434, -369, -369, 258, -369, -369, 366, + -369, -369, 53, -369, -369, 258, 366, 258, 149, -369, + -369, 19, 42, -369, 436, 333, 438, 323, -87, 279, + 283, 284, 190, 289, 287, 320, -369, 238, 103, 354, + -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, + -369, -369, -369, -369, -369, -369, 358, -369, 180, 290, + -369, 258, 356, -369, 410, -369, -369, -369, 292, 185, + -369, 367, 293, -369, 36, 29, -35, 296, -369, -22, + 29, 103, 411, -12, -369, 301, 374, -369, 297, 201, + -369, 333, 4, 11, 412, 298, 258, 258, 56, 74, + 303, 320, 542, 258, 79, 304, -58, 258, 258, 320, + -369, 320, -29, 306, 174, 320, 320, 320, 320, 320, + 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, + 385, 42, -369, 464, 19, 103, -369, 305, 19, -369, + 434, 12, 277, -369, 258, -369, 468, -369, -369, -369, + -369, 258, -369, -369, -369, -369, 258, 258, 421, 360, + -369, 309, -369, -369, 311, -369, -369, -369, -369, -369, + 186, -369, 438, -369, -369, 258, -369, -369, 315, -369, + -369, -369, -369, -369, -369, 384, 157, 96, 95, 258, + 258, -369, 412, 386, -63, -369, -369, -369, 370, 476, + 561, 320, 318, 238, -369, 387, 326, 561, 561, 561, + 561, 98, 98, 98, 98, 79, 79, 51, 51, 51, + -88, 327, -369, -369, 206, -369, 208, -369, 333, -369, + -8, -369, 324, -369, 30, -369, 425, -369, -369, -369, + 103, 103, 215, -369, 486, 487, -369, 395, -369, -369, + 219, -369, 258, 297, 258, 258, -369, 224, 124, 331, + -369, 320, 561, 238, 332, 225, -369, -369, -369, -369, + 339, 403, -369, -369, -369, 443, 444, 445, 426, 12, + 518, -369, -369, -369, 402, -369, -369, 362, 364, -369, + -369, 50, 368, 103, 229, -369, 258, -369, 542, 371, + 240, -369, -369, 30, 12, -369, -369, -369, 12, 18, + 361, 258, -369, -369, -369, -369, -369, 103, -369, -369, + -369, -369, 479, 421, -18, 373, 258, 245, 258, -369, + 16, 103, -369, -369, 103, 365, 376, -369 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -1001,87 +1002,87 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_int16 yydefact[] = { - 243, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 29, 29, 29, 0, 263, + 245, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 29, 29, 29, 0, 265, 3, 20, 18, 20, 17, 8, 9, 7, 11, 16, - 13, 14, 12, 15, 10, 0, 242, 0, 230, 73, - 32, 0, 43, 233, 50, 50, 0, 0, 0, 0, - 229, 0, 71, 71, 0, 41, 0, 244, 245, 28, - 25, 27, 26, 1, 243, 2, 0, 6, 5, 121, - 0, 82, 83, 113, 69, 0, 131, 0, 232, 50, - 0, 0, 0, 107, 36, 0, 77, 0, 0, 0, - 0, 0, 0, 42, 0, 0, 4, 0, 0, 101, - 0, 0, 95, 96, 94, 0, 98, 0, 0, 127, - 231, 212, 215, 217, 218, 213, 214, 219, 0, 130, - 132, 207, 208, 209, 216, 210, 211, 31, 30, 0, - 0, 0, 77, 0, 72, 0, 0, 0, 0, 107, - 79, 39, 37, 39, 70, 67, 68, 247, 246, 0, - 120, 100, 0, 90, 89, 113, 86, 85, 87, 97, - 93, 0, 113, 0, 0, 91, 33, 0, 0, 49, - 0, 243, 0, 0, 203, 0, 0, 0, 0, 0, - 0, 0, 205, 0, 106, 135, 142, 143, 144, 137, - 139, 145, 138, 158, 146, 147, 148, 149, 141, 136, - 151, 152, 0, 264, 0, 0, 75, 0, 0, 78, - 0, 35, 40, 23, 0, 21, 104, 102, 128, 241, - 127, 0, 112, 114, 119, 127, 123, 125, 122, 133, - 0, 0, 46, 0, 0, 51, 243, 101, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 154, 0, 153, - 0, 0, 0, 0, 0, 155, 0, 0, 0, 0, + 13, 14, 12, 15, 10, 0, 244, 0, 231, 74, + 32, 0, 43, 234, 50, 50, 0, 0, 0, 0, + 230, 0, 0, 72, 72, 0, 41, 0, 246, 247, + 28, 25, 27, 26, 1, 245, 2, 0, 6, 5, + 122, 0, 83, 84, 114, 69, 0, 132, 0, 233, + 50, 0, 0, 0, 108, 36, 0, 78, 0, 0, + 0, 235, 0, 0, 0, 0, 42, 0, 0, 4, + 0, 0, 102, 0, 0, 96, 97, 95, 0, 99, + 0, 0, 128, 232, 213, 216, 218, 219, 214, 215, + 220, 0, 131, 133, 208, 209, 210, 217, 211, 212, + 31, 30, 0, 0, 0, 78, 0, 73, 0, 0, + 0, 0, 108, 80, 39, 37, 39, 0, 71, 67, + 68, 249, 248, 0, 121, 101, 0, 91, 90, 114, + 87, 86, 88, 98, 94, 0, 114, 0, 0, 92, + 33, 0, 0, 49, 0, 245, 0, 0, 204, 0, + 0, 0, 0, 0, 0, 0, 206, 0, 107, 136, + 143, 144, 145, 138, 140, 146, 139, 159, 147, 148, + 149, 150, 142, 137, 152, 153, 0, 266, 0, 0, + 76, 0, 0, 79, 0, 35, 40, 70, 23, 0, + 21, 105, 103, 129, 243, 128, 0, 113, 115, 120, + 128, 124, 126, 123, 134, 0, 0, 46, 0, 0, + 51, 245, 102, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 155, 0, 154, 0, 0, 0, 0, 0, + 156, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 76, 0, 0, - 81, 80, 0, 0, 19, 0, 0, 107, 103, 0, - 239, 0, 240, 134, 84, 88, 0, 118, 117, 116, - 92, 0, 0, 0, 0, 55, 0, 58, 57, 0, - 63, 62, 56, 61, 54, 66, 45, 0, 48, 190, - 0, 204, 206, 0, 194, 195, 196, 197, 198, 199, - 0, 0, 0, 0, 0, 0, 177, 0, 0, 0, - 150, 140, 169, 170, 0, 165, 0, 0, 0, 156, - 0, 168, 167, 183, 184, 185, 186, 187, 188, 189, - 160, 159, 162, 161, 163, 164, 0, 34, 265, 0, - 38, 0, 22, 243, 105, 220, 222, 0, 224, 237, - 223, 109, 129, 238, 115, 126, 124, 0, 44, 0, - 0, 64, 0, 53, 52, 0, 181, 0, 0, 0, - 0, 175, 0, 0, 0, 200, 0, 166, 0, 0, - 0, 157, 201, 74, 24, 0, 0, 259, 251, 257, - 255, 258, 253, 0, 0, 0, 236, 228, 234, 0, - 99, 47, 0, 0, 65, 191, 0, 0, 179, 0, - 178, 0, 182, 202, 0, 0, 173, 171, 237, 0, - 254, 256, 252, 0, 221, 238, 0, 59, 60, 192, - 193, 176, 180, 174, 172, 225, 248, 260, 0, 111, - 0, 0, 0, 0, 108, 0, 261, 249, 235, 110, - 203, 0, 250 + 0, 0, 77, 0, 0, 82, 81, 0, 0, 19, + 0, 0, 108, 104, 0, 241, 0, 242, 135, 85, + 89, 0, 119, 118, 117, 93, 0, 0, 0, 0, + 55, 0, 58, 57, 0, 63, 62, 56, 61, 54, + 66, 45, 0, 48, 191, 0, 205, 207, 0, 195, + 196, 197, 198, 199, 200, 0, 0, 0, 0, 0, + 0, 178, 0, 0, 0, 151, 141, 170, 171, 0, + 166, 0, 0, 0, 157, 0, 169, 168, 184, 185, + 186, 187, 188, 189, 190, 161, 160, 163, 162, 164, + 165, 0, 34, 267, 0, 38, 0, 22, 245, 106, + 221, 223, 0, 225, 239, 224, 110, 130, 240, 116, + 127, 125, 0, 44, 0, 0, 64, 0, 53, 52, + 0, 182, 0, 0, 0, 0, 176, 0, 0, 0, + 201, 0, 167, 0, 0, 0, 158, 202, 75, 24, + 0, 0, 261, 253, 259, 257, 260, 255, 0, 0, + 0, 238, 229, 236, 0, 100, 47, 0, 0, 65, + 192, 0, 0, 180, 0, 179, 0, 183, 203, 0, + 0, 174, 172, 239, 0, 256, 258, 254, 0, 222, + 240, 0, 59, 60, 193, 194, 177, 181, 175, 173, + 226, 250, 262, 0, 112, 0, 0, 0, 0, 109, + 0, 263, 251, 237, 111, 204, 0, 252 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -364, -364, -364, 463, -364, 505, -364, 244, -364, 118, - -364, -364, -364, -364, 252, -83, 393, -364, -364, -364, - 3, -364, 218, 139, -364, -364, 485, -364, -364, -364, - 407, -364, -364, 332, -166, -88, -364, 19, -69, -48, - -364, -364, -65, 304, -364, -364, -364, -116, -364, -364, - 25, -364, 246, -364, -364, 12, -244, -364, -37, 254, - -133, -124, -364, -364, -364, -364, -364, -364, 302, -364, - -364, -364, -364, -364, -364, -364, -364, -364, 69, -68, - -86, -364, -364, -89, -364, -364, -364, -363, 97, -364, - -364, -364, 5, -364, -364, 100, 337, -364, -364, -364, - -364, 456, -364, -364, -364, -364, -292 + -369, -369, -369, 466, -369, 514, -369, 260, -369, 84, + -369, -369, -369, -369, 262, -83, 399, -369, -369, -369, + 27, -369, 236, 154, -369, -369, 497, -369, -369, -369, + 427, -369, -369, 349, -173, -75, -369, 6, -70, -37, + -369, -369, -81, 321, -369, -369, -369, -116, -369, -369, + -102, -369, 263, -369, -369, -28, -244, -369, 23, 273, + -136, -135, -369, -369, -369, -369, -369, -369, 328, -369, + -369, -369, -369, -369, -369, -369, -369, -369, 86, -69, + -85, -369, -369, -91, -369, -369, -369, -368, 119, -369, + -369, -369, 1, -369, -369, -369, 115, 347, -369, -369, + -369, -369, 477, -369, -369, -369, -369, -295 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - 0, 18, 19, 20, 21, 67, 214, 215, 22, 60, - 23, 128, 24, 25, 85, 141, 211, 26, 27, 28, - 81, 234, 235, 315, 393, 29, 91, 30, 31, 32, - 137, 33, 139, 140, 34, 155, 156, 157, 72, 105, - 106, 160, 73, 152, 216, 287, 288, 134, 430, 474, - 109, 222, 223, 299, 99, 165, 217, 118, 119, 218, - 219, 185, 186, 187, 188, 189, 190, 191, 244, 192, - 193, 194, 195, 196, 330, 197, 198, 199, 200, 201, - 121, 122, 123, 124, 125, 126, 374, 375, 376, 377, - 378, 49, 379, 79, 426, 427, 428, 293, 35, 36, - 57, 58, 380, 423, 477, 65, 204 + 0, 18, 19, 20, 21, 68, 219, 220, 22, 61, + 23, 131, 24, 25, 86, 144, 215, 26, 27, 28, + 82, 239, 240, 320, 398, 29, 94, 30, 31, 32, + 140, 33, 142, 143, 34, 159, 160, 161, 73, 108, + 109, 164, 74, 156, 221, 292, 293, 137, 435, 479, + 112, 227, 228, 304, 102, 169, 222, 121, 122, 223, + 224, 189, 190, 191, 192, 193, 194, 195, 249, 196, + 197, 198, 199, 200, 335, 201, 202, 203, 204, 205, + 124, 125, 126, 127, 128, 129, 379, 380, 381, 382, + 383, 49, 384, 80, 92, 431, 432, 433, 298, 35, + 36, 58, 59, 385, 428, 482, 66, 208 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1089,170 +1090,156 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 184, 101, 142, 142, 339, 232, 143, 39, 120, 150, - 42, 387, 38, 321, 480, 50, 51, 111, 112, 113, - 162, 69, 133, 209, 302, 108, 151, 54, 224, 170, - 226, 228, 473, 43, 88, 102, 260, 290, 102, 252, - 158, 277, 44, 158, 278, 243, 260, 252, 82, 142, - 251, 83, 202, 86, 71, 247, 253, 249, 416, 93, - 171, 454, 52, 55, 253, 274, 103, 275, 206, 103, - 318, 252, 45, 89, 280, 290, 395, 275, 174, 111, - 112, 113, 129, 37, 252, 69, 131, 132, 253, 100, - 467, 205, 53, 341, 346, 417, 145, 146, 107, 229, - 418, 253, 104, 172, 410, 104, 419, 420, 331, 332, - 221, 208, 114, 147, 250, 38, 175, 176, 177, 342, - 343, 347, 247, 421, 405, 459, 46, -260, 422, 289, - 344, 70, 345, 295, 61, 62, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, - 365, 115, 116, 289, 425, 178, 158, 174, 111, 112, - 113, 163, 40, 224, 445, 41, 322, 182, 385, 386, - 323, 381, 373, 230, 114, 47, 472, 56, 319, 164, - 220, 117, 252, 48, 227, 242, 366, 225, 252, 252, - 59, 179, 291, 64, 297, 175, 176, 177, 398, 253, - -226, 402, 403, 63, 180, 253, 253, 415, 334, 66, - 400, 120, 469, 115, 116, 120, 74, 75, 142, 252, - 298, 388, 407, 174, 111, 112, 113, 335, 76, 335, - 181, 182, 294, 336, 178, 401, 253, 300, 183, 77, - 78, 284, 369, 117, 285, 399, 371, 441, 316, 260, - 80, 317, 252, 114, 252, 349, 174, 111, 112, 113, - 242, 175, 176, 177, 436, 416, 438, 439, 404, 253, - 179, 253, 350, 69, 84, 271, 272, 273, 274, 409, - 275, 367, 443, 180, 174, 111, 112, 113, 174, 111, - 112, 113, 115, 116, 175, 176, 177, 87, 391, 252, - 178, 440, 417, 252, 237, 461, 238, 418, 462, 181, - 182, 94, 95, 419, 420, 392, 253, 183, 97, 114, - 253, 98, 117, 176, 177, 416, 245, 176, 177, 90, - 421, 110, 254, 178, -260, 422, 179, 127, 476, 444, - 479, 324, 325, 326, 327, 328, 329, 413, 414, 180, - 167, 167, 114, 133, 431, 130, 135, 278, 115, 116, - 435, 178, 417, 289, 255, 178, 138, 418, 447, 179, - 111, 289, 144, 419, 420, 181, 182, 470, 464, 136, - 114, 289, 180, 183, 114, 113, 478, 70, 117, 278, - 421, 115, 116, 149, 151, 422, 153, 246, 154, 159, - 161, 246, 166, 167, 168, 169, 203, -227, 181, 182, - 180, 256, 210, 207, 180, 213, 183, 107, 231, 115, - 116, 117, 233, 115, 116, 14, 471, 236, 239, 240, - 241, 257, 276, 248, 282, 286, 181, 182, 258, 259, - 181, 182, 301, 279, 183, 260, 261, 283, 183, 117, - 289, 303, 69, 117, 296, 304, 337, 368, 340, 262, - 263, 264, 265, 266, 348, 383, 267, 268, -262, 269, - 270, 271, 272, 273, 274, 1, 275, 389, 397, 390, - 1, 396, 346, 2, 252, 408, 255, 411, 2, 412, - 3, 275, 424, 429, 4, 3, 432, 433, 442, 4, - 5, 434, 446, 6, 7, 5, 448, 449, 6, 7, - 453, 450, 451, 452, 455, 8, 9, 456, 457, 458, - 8, 9, 460, 463, 468, 475, 10, 96, 68, 372, - 238, 10, 482, 256, 370, 394, 212, 437, 92, 173, - 281, 320, 384, 382, 481, 333, 466, 406, 465, 0, - 11, 148, 255, 338, 12, 11, 292, 0, 0, 12, - 0, 259, 0, 0, 0, 0, 0, 260, 261, 13, - 0, 255, 0, 0, 13, 14, 0, 0, 0, 0, - 14, 262, 263, 264, 265, 266, 0, 0, 267, 268, - 255, 269, 270, 271, 272, 273, 274, 0, 275, 256, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, - 16, 17, 0, 0, 15, 16, 17, 0, -263, 338, - 0, 0, 0, 0, 0, 0, 0, 259, 0, 0, - 0, 0, 0, 260, 261, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 259, 262, 263, 264, - 265, 266, 260, -263, 267, 268, 0, 269, 270, 271, - 272, 273, 274, 0, 275, 259, -263, -263, -263, 265, - 266, 260, 0, 267, 268, 0, 269, 270, 271, 272, - 273, 274, 0, 275, 0, 0, 0, 0, -263, -263, - 0, 0, -263, -263, 0, 269, 270, 271, 272, 273, - 274, 305, 275, 0, 0, 0, 0, 306, 0, 0, - 0, 0, 0, 0, 0, 307, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 308, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 309, 0, - 310, 311, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 312, 0, 0, 0, 313, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 314 + 188, 104, 237, 39, 145, 145, 42, 146, 123, 344, + 154, 50, 51, 392, 326, 38, 155, 421, 70, 485, + 37, 89, 55, 114, 115, 116, 213, 162, 478, 229, + 162, 231, 233, 295, 136, 43, 166, 111, 307, 295, + 174, 72, 265, 421, 44, 38, 248, 84, 252, 87, + 254, 256, 257, 145, 422, 206, 96, 225, 56, 423, + 90, 459, 105, 302, 230, 424, 425, 351, 323, 258, + 210, 175, 83, 280, 45, 285, 242, 103, 243, 167, + 422, 400, 426, 134, 135, 423, -262, 427, 257, 303, + 472, 424, 425, 106, 352, 149, 150, 168, 257, 410, + 62, 63, 234, 151, 294, 258, 346, 132, 426, 415, + 336, 337, -262, 427, 176, 258, 252, 255, 117, 40, + 41, 347, 348, 212, 349, 226, 350, 46, 71, 107, + 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, + 366, 367, 368, 369, 370, 162, 257, 260, 217, 294, + 430, 300, 178, 114, 115, 116, 296, 118, 119, -227, + 257, 339, 247, 258, 47, 229, 257, 327, 324, 450, + 390, 391, 186, 235, 328, 378, 386, 258, 477, 52, + 340, 265, 405, 258, 48, -228, 341, 120, 53, 371, + 179, 180, 181, 178, 114, 115, 116, 299, 57, 404, + 60, 340, 305, 407, 408, 420, 257, 406, 105, 265, + 279, 64, 280, 257, 464, 123, 412, 474, 54, 123, + 65, 67, 264, 258, 145, 75, 393, 446, 265, 182, + 258, 179, 180, 181, 257, 276, 277, 278, 279, 106, + 280, 178, 114, 115, 116, -265, -265, 76, 117, -265, + -265, 258, 274, 275, 276, 277, 278, 279, 232, 280, + 77, 178, 114, 115, 116, 183, 441, 257, 443, 444, + 182, 110, 409, 354, 79, 107, 448, 403, 184, 179, + 180, 181, 372, 414, 258, 396, 78, 118, 119, 117, + 355, 70, 178, 114, 115, 116, 247, 70, 81, 179, + 180, 181, 397, 209, 185, 186, 183, 374, 85, 88, + 467, 376, 187, 91, 93, 98, 97, 120, 182, 184, + 100, 310, 101, 178, 114, 115, 116, 311, 118, 119, + 250, 180, 181, 113, 257, 312, 445, 117, 182, 257, + 481, 466, 484, 449, 282, 185, 186, 283, 130, 289, + 133, 258, 290, 187, 183, 136, 258, 117, 120, 141, + 138, 313, 180, 181, 114, 321, 148, 184, 322, 182, + 418, 259, 419, 171, 183, 171, 118, 119, 314, 436, + 315, 316, 283, 440, 139, 147, 294, 184, 117, 452, + 71, 116, 294, 185, 186, 317, 118, 119, 153, 318, + 182, 187, 155, 260, 469, 251, 120, 294, 163, 483, + 157, 319, 283, 185, 186, 158, 165, 170, 184, 117, + 172, 187, 171, 173, 207, 211, 120, 118, 119, 214, + 329, 330, 331, 332, 333, 334, 251, 218, 110, 236, + 14, 238, 244, 241, 185, 186, 245, 246, 253, 184, + 261, 281, 187, 284, 287, 288, 291, 120, 118, 119, + 294, 306, 309, 301, 308, 70, 342, 373, 345, 353, + 262, 388, 394, 402, 395, 185, 186, 263, 264, 401, + 257, 413, 351, 187, 265, 266, 416, 280, 120, 417, + 434, 429, 437, 438, 439, 447, 451, 454, 267, 268, + 269, 270, 271, 453, 421, 272, 273, -264, 274, 275, + 276, 277, 278, 279, 1, 280, 455, 456, 457, 1, + 458, 460, 2, 461, 473, 260, 462, 2, 463, 3, + 243, 99, 465, 4, 3, 468, 480, 69, 4, 5, + 487, 422, 6, 7, 5, 216, 423, 6, 7, 375, + 377, 95, 424, 425, 8, 9, 475, 442, 399, 8, + 9, 286, 177, 325, 389, 10, 486, 387, 470, 426, + 10, 297, 261, 471, 427, 152, 338, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 411, 0, 0, 11, + 0, 260, 343, 12, 11, 0, 0, 0, 12, 0, + 264, 0, 0, 0, 0, 476, 265, 266, 13, 0, + 260, 0, 0, 13, 14, 0, 0, 0, 0, 14, + 267, 268, 269, 270, 271, 0, 0, 272, 273, 0, + 274, 275, 276, 277, 278, 279, 0, 280, 261, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 15, 16, + 17, 0, 0, 15, 16, 17, 0, -265, 343, 0, + 0, 0, 0, 0, 0, 0, 264, 0, 0, 0, + 0, 0, 265, 266, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 264, 267, 268, 269, 270, + 271, 265, -265, 272, 273, 0, 274, 275, 276, 277, + 278, 279, 0, 280, 0, -265, -265, -265, 270, 271, + 0, 0, 272, 273, 0, 274, 275, 276, 277, 278, + 279, 0, 280 }; static const yytype_int16 yycheck[] = { - 133, 70, 88, 89, 248, 171, 89, 2, 76, 98, - 5, 303, 3, 3, 3, 10, 11, 4, 5, 6, - 108, 53, 78, 139, 50, 73, 12, 19, 161, 89, - 163, 164, 46, 66, 89, 9, 130, 3, 9, 110, - 105, 164, 75, 108, 167, 178, 130, 110, 45, 135, - 183, 46, 135, 48, 35, 179, 127, 181, 25, 54, - 120, 424, 75, 55, 127, 159, 40, 161, 137, 40, - 236, 110, 105, 128, 207, 3, 320, 161, 3, 4, - 5, 6, 79, 26, 110, 53, 81, 82, 127, 70, - 453, 59, 105, 164, 96, 62, 91, 92, 72, 167, - 67, 127, 76, 163, 348, 76, 73, 74, 241, 242, - 158, 167, 99, 94, 183, 3, 41, 42, 43, 252, - 253, 123, 246, 90, 162, 164, 89, 94, 95, 167, - 254, 163, 256, 221, 16, 17, 260, 261, 262, 263, - 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, - 274, 138, 139, 167, 120, 80, 221, 3, 4, 5, - 6, 50, 3, 296, 408, 3, 156, 156, 301, 302, - 239, 287, 163, 168, 99, 89, 468, 3, 164, 68, - 155, 168, 110, 93, 109, 106, 275, 162, 110, 110, - 140, 116, 120, 166, 85, 41, 42, 43, 120, 127, - 167, 334, 335, 0, 129, 127, 127, 373, 87, 107, - 87, 279, 456, 138, 139, 283, 3, 165, 304, 110, - 111, 304, 346, 3, 4, 5, 6, 106, 163, 106, - 155, 156, 220, 112, 80, 112, 127, 225, 163, 89, - 3, 164, 279, 168, 167, 103, 283, 103, 164, 130, - 122, 167, 110, 99, 110, 99, 3, 4, 5, 6, - 106, 41, 42, 43, 397, 25, 399, 400, 337, 127, - 116, 127, 116, 53, 3, 156, 157, 158, 159, 348, - 161, 276, 406, 129, 3, 4, 5, 6, 3, 4, - 5, 6, 138, 139, 41, 42, 43, 118, 99, 110, - 80, 112, 62, 110, 163, 112, 165, 67, 441, 155, - 156, 120, 167, 73, 74, 116, 127, 163, 92, 99, - 127, 119, 168, 42, 43, 25, 41, 42, 43, 122, - 90, 3, 17, 80, 94, 95, 116, 4, 471, 408, - 473, 132, 133, 134, 135, 136, 137, 164, 164, 129, - 167, 167, 99, 78, 164, 116, 88, 167, 138, 139, - 164, 80, 62, 167, 49, 80, 3, 67, 164, 116, - 4, 167, 41, 73, 74, 155, 156, 77, 164, 163, - 99, 167, 129, 163, 99, 6, 164, 163, 168, 167, - 90, 138, 139, 163, 12, 95, 164, 116, 164, 109, - 121, 116, 164, 167, 126, 41, 3, 167, 155, 156, - 129, 96, 107, 144, 129, 3, 163, 72, 3, 138, - 139, 168, 3, 138, 139, 107, 126, 120, 163, 163, - 163, 116, 93, 161, 44, 89, 155, 156, 123, 124, - 155, 156, 50, 163, 163, 130, 131, 163, 163, 168, - 167, 163, 53, 168, 167, 88, 163, 3, 164, 144, - 145, 146, 147, 148, 163, 3, 151, 152, 0, 154, - 155, 156, 157, 158, 159, 7, 161, 163, 89, 163, - 7, 164, 96, 15, 110, 163, 49, 99, 15, 162, - 22, 161, 167, 65, 26, 22, 6, 6, 164, 26, - 32, 99, 164, 35, 36, 32, 164, 94, 35, 36, - 94, 73, 73, 73, 3, 47, 48, 121, 164, 164, - 47, 48, 164, 164, 163, 163, 58, 64, 23, 285, - 165, 58, 164, 96, 282, 317, 143, 398, 53, 132, - 208, 237, 296, 289, 475, 243, 449, 110, 448, -1, - 82, 95, 49, 116, 86, 82, 219, -1, -1, 86, - -1, 124, -1, -1, -1, -1, -1, 130, 131, 101, - -1, 49, -1, -1, 101, 107, -1, -1, -1, -1, - 107, 144, 145, 146, 147, 148, -1, -1, 151, 152, - 49, 154, 155, 156, 157, 158, 159, -1, 161, 96, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 141, - 142, 143, -1, -1, 141, 142, 143, -1, 96, 116, - -1, -1, -1, -1, -1, -1, -1, 124, -1, -1, - -1, -1, -1, 130, 131, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 124, 144, 145, 146, - 147, 148, 130, 131, 151, 152, -1, 154, 155, 156, - 157, 158, 159, -1, 161, 124, 144, 145, 146, 147, - 148, 130, -1, 151, 152, -1, 154, 155, 156, 157, - 158, 159, -1, 161, -1, -1, -1, -1, 147, 148, + 136, 71, 175, 2, 89, 90, 5, 90, 77, 253, + 101, 10, 11, 308, 3, 3, 12, 25, 53, 3, + 26, 89, 19, 4, 5, 6, 142, 108, 46, 165, + 111, 167, 168, 3, 78, 66, 111, 74, 50, 3, + 89, 35, 130, 25, 75, 3, 182, 46, 183, 48, + 185, 187, 110, 138, 62, 138, 55, 159, 55, 67, + 128, 429, 9, 85, 166, 73, 74, 96, 241, 127, + 140, 120, 45, 161, 105, 211, 163, 71, 165, 50, + 62, 325, 90, 82, 83, 67, 94, 95, 110, 111, + 458, 73, 74, 40, 123, 94, 95, 68, 110, 162, + 16, 17, 171, 97, 167, 127, 164, 80, 90, 353, + 246, 247, 94, 95, 163, 127, 251, 187, 99, 3, + 3, 257, 258, 167, 259, 162, 261, 89, 163, 76, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 226, 110, 49, 147, 167, + 120, 226, 3, 4, 5, 6, 120, 138, 139, 167, + 110, 87, 106, 127, 89, 301, 110, 156, 164, 413, + 306, 307, 156, 172, 244, 163, 292, 127, 473, 66, + 106, 130, 87, 127, 93, 167, 112, 168, 75, 280, + 41, 42, 43, 3, 4, 5, 6, 225, 3, 103, + 140, 106, 230, 339, 340, 378, 110, 112, 9, 130, + 159, 0, 161, 110, 164, 284, 351, 461, 105, 288, + 166, 107, 124, 127, 309, 3, 309, 103, 130, 80, + 127, 41, 42, 43, 110, 156, 157, 158, 159, 40, + 161, 3, 4, 5, 6, 147, 148, 165, 99, 151, + 152, 127, 154, 155, 156, 157, 158, 159, 109, 161, + 163, 3, 4, 5, 6, 116, 402, 110, 404, 405, + 80, 72, 342, 99, 3, 76, 411, 120, 129, 41, + 42, 43, 281, 353, 127, 99, 89, 138, 139, 99, + 116, 53, 3, 4, 5, 6, 106, 53, 122, 41, + 42, 43, 116, 59, 155, 156, 116, 284, 3, 118, + 446, 288, 163, 3, 122, 167, 120, 168, 80, 129, + 92, 24, 119, 3, 4, 5, 6, 30, 138, 139, + 41, 42, 43, 3, 110, 38, 112, 99, 80, 110, + 476, 112, 478, 413, 164, 155, 156, 167, 4, 164, + 116, 127, 167, 163, 116, 78, 127, 99, 168, 3, + 88, 64, 42, 43, 4, 164, 41, 129, 167, 80, + 164, 17, 164, 167, 116, 167, 138, 139, 81, 164, + 83, 84, 167, 164, 163, 126, 167, 129, 99, 164, + 163, 6, 167, 155, 156, 98, 138, 139, 163, 102, + 80, 163, 12, 49, 164, 116, 168, 167, 109, 164, + 164, 114, 167, 155, 156, 164, 121, 164, 129, 99, + 126, 163, 167, 41, 3, 144, 168, 138, 139, 107, + 132, 133, 134, 135, 136, 137, 116, 3, 72, 3, + 107, 3, 163, 120, 155, 156, 163, 163, 161, 129, + 96, 93, 163, 163, 44, 163, 89, 168, 138, 139, + 167, 50, 88, 167, 163, 53, 163, 3, 164, 163, + 116, 3, 163, 89, 163, 155, 156, 123, 124, 164, + 110, 163, 96, 163, 130, 131, 99, 161, 168, 162, + 65, 167, 6, 6, 99, 164, 164, 94, 144, 145, + 146, 147, 148, 164, 25, 151, 152, 0, 154, 155, + 156, 157, 158, 159, 7, 161, 73, 73, 73, 7, + 94, 3, 15, 121, 163, 49, 164, 15, 164, 22, + 165, 65, 164, 26, 22, 164, 163, 23, 26, 32, + 164, 62, 35, 36, 32, 146, 67, 35, 36, 287, + 290, 54, 73, 74, 47, 48, 77, 403, 322, 47, + 48, 212, 135, 242, 301, 58, 480, 294, 453, 90, + 58, 224, 96, 454, 95, 98, 248, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 110, -1, -1, 82, + -1, 49, 116, 86, 82, -1, -1, -1, 86, -1, + 124, -1, -1, -1, -1, 126, 130, 131, 101, -1, + 49, -1, -1, 101, 107, -1, -1, -1, -1, 107, + 144, 145, 146, 147, 148, -1, -1, 151, 152, -1, + 154, 155, 156, 157, 158, 159, -1, 161, 96, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 141, 142, + 143, -1, -1, 141, 142, 143, -1, 96, 116, -1, + -1, -1, -1, -1, -1, -1, 124, -1, -1, -1, + -1, -1, 130, 131, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 124, 144, 145, 146, 147, + 148, 130, 131, 151, 152, -1, 154, 155, 156, 157, + 158, 159, -1, 161, -1, 144, 145, 146, 147, 148, -1, -1, 151, 152, -1, 154, 155, 156, 157, 158, - 159, 24, 161, -1, -1, -1, -1, 30, -1, -1, - -1, -1, -1, -1, -1, 38, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 64, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 81, -1, - 83, 84, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 98, -1, -1, -1, 102, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 114 + 159, -1, 161 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1262,52 +1249,52 @@ static const yytype_int16 yystos[] = 0, 7, 15, 22, 26, 32, 35, 36, 47, 48, 58, 82, 86, 101, 107, 141, 142, 143, 170, 171, 172, 173, 177, 179, 181, 182, 186, 187, 188, 194, - 196, 197, 198, 200, 203, 267, 268, 26, 3, 261, + 196, 197, 198, 200, 203, 268, 269, 26, 3, 261, 3, 3, 261, 66, 75, 105, 89, 89, 93, 260, - 261, 261, 75, 105, 19, 55, 3, 269, 270, 140, - 178, 178, 178, 0, 166, 274, 107, 174, 174, 53, - 163, 206, 207, 211, 3, 165, 163, 89, 3, 262, - 122, 189, 189, 261, 3, 183, 261, 118, 89, 128, - 122, 195, 195, 261, 120, 167, 172, 92, 119, 223, - 206, 207, 9, 40, 76, 208, 209, 72, 208, 219, - 3, 4, 5, 6, 99, 138, 139, 168, 226, 227, - 248, 249, 250, 251, 252, 253, 254, 4, 180, 189, - 116, 261, 261, 78, 216, 88, 163, 199, 3, 201, - 202, 184, 249, 184, 41, 261, 261, 206, 270, 163, - 252, 12, 212, 164, 164, 204, 205, 206, 211, 109, - 210, 121, 204, 50, 68, 224, 164, 167, 126, 41, - 89, 120, 163, 199, 3, 41, 42, 43, 80, 116, - 129, 155, 156, 163, 229, 230, 231, 232, 233, 234, - 235, 236, 238, 239, 240, 241, 242, 244, 245, 246, - 247, 248, 184, 3, 275, 59, 207, 144, 167, 216, - 107, 185, 185, 3, 175, 176, 213, 225, 228, 229, - 219, 208, 220, 221, 229, 219, 229, 109, 229, 248, - 261, 3, 203, 3, 190, 191, 120, 163, 165, 163, - 163, 163, 106, 229, 237, 41, 116, 230, 161, 230, - 207, 229, 110, 127, 17, 49, 96, 116, 123, 124, - 130, 131, 144, 145, 146, 147, 148, 151, 152, 154, - 155, 156, 157, 158, 159, 161, 93, 164, 167, 163, - 229, 202, 44, 163, 164, 167, 89, 214, 215, 167, - 3, 120, 265, 266, 224, 204, 167, 85, 111, 222, - 224, 50, 50, 163, 88, 24, 30, 38, 64, 81, - 83, 84, 98, 102, 114, 192, 164, 167, 203, 164, - 212, 3, 156, 207, 132, 133, 134, 135, 136, 137, - 243, 229, 229, 237, 87, 106, 112, 163, 116, 225, - 164, 164, 229, 229, 230, 230, 96, 123, 163, 99, - 116, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 252, 261, 3, 227, - 183, 227, 176, 163, 255, 256, 257, 258, 259, 261, - 271, 216, 228, 3, 221, 229, 229, 275, 184, 163, - 163, 99, 116, 193, 191, 225, 164, 89, 120, 103, - 87, 112, 229, 229, 207, 162, 110, 230, 163, 207, - 225, 99, 162, 164, 164, 203, 25, 62, 67, 73, - 74, 90, 95, 272, 167, 120, 263, 264, 265, 65, - 217, 164, 6, 6, 99, 164, 229, 192, 229, 229, - 112, 103, 164, 230, 207, 225, 164, 164, 164, 94, - 73, 73, 73, 94, 256, 3, 121, 164, 164, 164, - 164, 112, 229, 164, 164, 264, 257, 256, 163, 225, - 77, 126, 275, 46, 218, 163, 229, 273, 164, 229, - 3, 247, 164 + 261, 261, 66, 75, 105, 19, 55, 3, 270, 271, + 140, 178, 178, 178, 0, 166, 275, 107, 174, 174, + 53, 163, 206, 207, 211, 3, 165, 163, 89, 3, + 262, 122, 189, 189, 261, 3, 183, 261, 118, 89, + 128, 3, 263, 122, 195, 195, 261, 120, 167, 172, + 92, 119, 223, 206, 207, 9, 40, 76, 208, 209, + 72, 208, 219, 3, 4, 5, 6, 99, 138, 139, + 168, 226, 227, 248, 249, 250, 251, 252, 253, 254, + 4, 180, 189, 116, 261, 261, 78, 216, 88, 163, + 199, 3, 201, 202, 184, 249, 184, 126, 41, 261, + 261, 206, 271, 163, 252, 12, 212, 164, 164, 204, + 205, 206, 211, 109, 210, 121, 204, 50, 68, 224, + 164, 167, 126, 41, 89, 120, 163, 199, 3, 41, + 42, 43, 80, 116, 129, 155, 156, 163, 229, 230, + 231, 232, 233, 234, 235, 236, 238, 239, 240, 241, + 242, 244, 245, 246, 247, 248, 184, 3, 276, 59, + 207, 144, 167, 216, 107, 185, 185, 261, 3, 175, + 176, 213, 225, 228, 229, 219, 208, 220, 221, 229, + 219, 229, 109, 229, 248, 261, 3, 203, 3, 190, + 191, 120, 163, 165, 163, 163, 163, 106, 229, 237, + 41, 116, 230, 161, 230, 207, 229, 110, 127, 17, + 49, 96, 116, 123, 124, 130, 131, 144, 145, 146, + 147, 148, 151, 152, 154, 155, 156, 157, 158, 159, + 161, 93, 164, 167, 163, 229, 202, 44, 163, 164, + 167, 89, 214, 215, 167, 3, 120, 266, 267, 224, + 204, 167, 85, 111, 222, 224, 50, 50, 163, 88, + 24, 30, 38, 64, 81, 83, 84, 98, 102, 114, + 192, 164, 167, 203, 164, 212, 3, 156, 207, 132, + 133, 134, 135, 136, 137, 243, 229, 229, 237, 87, + 106, 112, 163, 116, 225, 164, 164, 229, 229, 230, + 230, 96, 123, 163, 99, 116, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 252, 261, 3, 227, 183, 227, 176, 163, 255, + 256, 257, 258, 259, 261, 272, 216, 228, 3, 221, + 229, 229, 276, 184, 163, 163, 99, 116, 193, 191, + 225, 164, 89, 120, 103, 87, 112, 229, 229, 207, + 162, 110, 230, 163, 207, 225, 99, 162, 164, 164, + 203, 25, 62, 67, 73, 74, 90, 95, 273, 167, + 120, 264, 265, 266, 65, 217, 164, 6, 6, 99, + 164, 229, 192, 229, 229, 112, 103, 164, 230, 207, + 225, 164, 164, 164, 94, 73, 73, 73, 94, 256, + 3, 121, 164, 164, 164, 164, 112, 229, 164, 164, + 265, 257, 256, 163, 225, 77, 126, 276, 46, 218, + 163, 229, 274, 164, 229, 3, 247, 164 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ @@ -1320,26 +1307,26 @@ static const yytype_int16 yyr1[] = 186, 187, 187, 187, 188, 188, 188, 188, 188, 189, 189, 190, 190, 191, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 193, 193, 193, 194, 194, 194, - 195, 195, 196, 197, 198, 198, 199, 199, 200, 201, - 201, 202, 203, 203, 203, 204, 204, 205, 205, 206, - 206, 207, 207, 208, 209, 209, 209, 210, 210, 211, - 212, 212, 213, 214, 214, 215, 216, 216, 217, 217, - 218, 218, 219, 219, 220, 220, 221, 222, 222, 222, - 223, 223, 224, 224, 224, 224, 224, 224, 225, 225, - 226, 226, 227, 227, 228, 229, 229, 229, 229, 229, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 231, 231, 232, 232, 232, 232, 232, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 233, 234, - 234, 235, 235, 235, 235, 236, 236, 236, 236, 237, - 237, 238, 238, 239, 239, 239, 239, 239, 239, 239, - 240, 240, 241, 242, 243, 243, 243, 243, 243, 243, - 244, 245, 246, 247, 247, 247, 247, 248, 248, 248, - 248, 248, 249, 250, 250, 251, 251, 252, 253, 254, - 255, 255, 256, 256, 257, 257, 258, 258, 259, 260, - 261, 261, 262, 262, 263, 263, 264, 264, 265, 265, - 266, 266, 267, 267, 268, 269, 269, 270, 271, 271, - 271, 272, 272, 272, 272, 272, 272, 272, 272, 272, - 272, 273, 274, 274, 275, 275 + 194, 195, 195, 196, 197, 198, 198, 199, 199, 200, + 201, 201, 202, 203, 203, 203, 204, 204, 205, 205, + 206, 206, 207, 207, 208, 209, 209, 209, 210, 210, + 211, 212, 212, 213, 214, 214, 215, 216, 216, 217, + 217, 218, 218, 219, 219, 220, 220, 221, 222, 222, + 222, 223, 223, 224, 224, 224, 224, 224, 224, 225, + 225, 226, 226, 227, 227, 228, 229, 229, 229, 229, + 229, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 231, 231, 232, 232, 232, 232, 232, 233, + 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, + 234, 234, 235, 235, 235, 235, 236, 236, 236, 236, + 237, 237, 238, 238, 239, 239, 239, 239, 239, 239, + 239, 240, 240, 241, 242, 243, 243, 243, 243, 243, + 243, 244, 245, 246, 247, 247, 247, 247, 248, 248, + 248, 248, 248, 249, 250, 250, 251, 251, 252, 253, + 254, 255, 255, 256, 256, 257, 257, 258, 258, 259, + 260, 261, 261, 262, 262, 263, 264, 264, 265, 265, + 266, 266, 267, 267, 268, 268, 269, 270, 270, 271, + 272, 272, 272, 273, 273, 273, 273, 273, 273, 273, + 273, 273, 273, 274, 275, 275, 276, 276 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -1352,26 +1339,26 @@ static const yytype_int8 yyr2[] = 5, 2, 3, 2, 8, 7, 6, 9, 7, 3, 0, 1, 3, 3, 1, 1, 1, 1, 1, 4, 4, 1, 1, 1, 1, 2, 0, 4, 4, 3, - 2, 0, 4, 2, 8, 5, 3, 0, 5, 1, - 3, 3, 2, 2, 6, 1, 1, 1, 3, 3, - 3, 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, 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, 6, 1, 1, 1, 1, 1, 1, - 4, 4, 5, 1, 3, 1, 3, 1, 1, 1, + 5, 2, 0, 4, 2, 8, 5, 3, 0, 5, + 1, 3, 3, 2, 2, 6, 1, 1, 1, 3, + 3, 3, 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, + 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, 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, 0, 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, 0, 1, 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 }; @@ -1925,25 +1912,25 @@ yydestruct (const char *yymsg, case YYSYMBOL_IDENTIFIER: /* IDENTIFIER */ #line 149 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1929 "bison_parser.cpp" +#line 1916 "bison_parser.cpp" break; case YYSYMBOL_STRING: /* STRING */ #line 149 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1935 "bison_parser.cpp" +#line 1922 "bison_parser.cpp" break; case YYSYMBOL_FLOATVAL: /* FLOATVAL */ #line 147 "bison_parser.y" { } -#line 1941 "bison_parser.cpp" +#line 1928 "bison_parser.cpp" break; case YYSYMBOL_INTVAL: /* INTVAL */ #line 147 "bison_parser.y" { } -#line 1947 "bison_parser.cpp" +#line 1934 "bison_parser.cpp" break; case YYSYMBOL_statement_list: /* statement_list */ @@ -1956,19 +1943,19 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).stmt_vec)); } -#line 1960 "bison_parser.cpp" +#line 1947 "bison_parser.cpp" break; case YYSYMBOL_statement: /* statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 1966 "bison_parser.cpp" +#line 1953 "bison_parser.cpp" break; case YYSYMBOL_preparable_statement: /* preparable_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 1972 "bison_parser.cpp" +#line 1959 "bison_parser.cpp" break; case YYSYMBOL_opt_hints: /* opt_hints */ @@ -1981,7 +1968,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 1985 "bison_parser.cpp" +#line 1972 "bison_parser.cpp" break; case YYSYMBOL_hint_list: /* hint_list */ @@ -1994,85 +1981,85 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 1998 "bison_parser.cpp" +#line 1985 "bison_parser.cpp" break; case YYSYMBOL_hint: /* hint */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2004 "bison_parser.cpp" +#line 1991 "bison_parser.cpp" break; case YYSYMBOL_transaction_statement: /* transaction_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).transaction_stmt)); } -#line 2010 "bison_parser.cpp" +#line 1997 "bison_parser.cpp" break; case YYSYMBOL_prepare_statement: /* prepare_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).prep_stmt)); } -#line 2016 "bison_parser.cpp" +#line 2003 "bison_parser.cpp" break; case YYSYMBOL_prepare_target_query: /* prepare_target_query */ #line 149 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2022 "bison_parser.cpp" +#line 2009 "bison_parser.cpp" break; case YYSYMBOL_execute_statement: /* execute_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).exec_stmt)); } -#line 2028 "bison_parser.cpp" +#line 2015 "bison_parser.cpp" break; case YYSYMBOL_import_statement: /* import_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).import_stmt)); } -#line 2034 "bison_parser.cpp" +#line 2021 "bison_parser.cpp" break; case YYSYMBOL_file_type: /* file_type */ #line 147 "bison_parser.y" { } -#line 2040 "bison_parser.cpp" +#line 2027 "bison_parser.cpp" break; case YYSYMBOL_file_path: /* file_path */ #line 149 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2046 "bison_parser.cpp" +#line 2033 "bison_parser.cpp" break; case YYSYMBOL_opt_file_type: /* opt_file_type */ #line 147 "bison_parser.y" { } -#line 2052 "bison_parser.cpp" +#line 2039 "bison_parser.cpp" break; case YYSYMBOL_export_statement: /* export_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).export_stmt)); } -#line 2058 "bison_parser.cpp" +#line 2045 "bison_parser.cpp" break; case YYSYMBOL_show_statement: /* show_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).show_stmt)); } -#line 2064 "bison_parser.cpp" +#line 2051 "bison_parser.cpp" break; case YYSYMBOL_create_statement: /* create_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).create_stmt)); } -#line 2070 "bison_parser.cpp" +#line 2057 "bison_parser.cpp" break; case YYSYMBOL_opt_not_exists: /* opt_not_exists */ #line 147 "bison_parser.y" { } -#line 2076 "bison_parser.cpp" +#line 2063 "bison_parser.cpp" break; case YYSYMBOL_column_def_commalist: /* column_def_commalist */ @@ -2085,55 +2072,55 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).column_vec)); } -#line 2089 "bison_parser.cpp" +#line 2076 "bison_parser.cpp" break; case YYSYMBOL_column_def: /* column_def */ #line 158 "bison_parser.y" { delete (((*yyvaluep).column_t)); } -#line 2095 "bison_parser.cpp" +#line 2082 "bison_parser.cpp" break; case YYSYMBOL_column_type: /* column_type */ #line 147 "bison_parser.y" { } -#line 2101 "bison_parser.cpp" +#line 2088 "bison_parser.cpp" break; case YYSYMBOL_opt_column_nullable: /* opt_column_nullable */ #line 147 "bison_parser.y" { } -#line 2107 "bison_parser.cpp" +#line 2094 "bison_parser.cpp" break; case YYSYMBOL_drop_statement: /* drop_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).drop_stmt)); } -#line 2113 "bison_parser.cpp" +#line 2100 "bison_parser.cpp" break; case YYSYMBOL_opt_exists: /* opt_exists */ #line 147 "bison_parser.y" { } -#line 2119 "bison_parser.cpp" +#line 2106 "bison_parser.cpp" break; case YYSYMBOL_delete_statement: /* delete_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2125 "bison_parser.cpp" +#line 2112 "bison_parser.cpp" break; case YYSYMBOL_truncate_statement: /* truncate_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2131 "bison_parser.cpp" +#line 2118 "bison_parser.cpp" break; case YYSYMBOL_insert_statement: /* insert_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).insert_stmt)); } -#line 2137 "bison_parser.cpp" +#line 2124 "bison_parser.cpp" break; case YYSYMBOL_opt_column_list: /* opt_column_list */ @@ -2146,13 +2133,13 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2150 "bison_parser.cpp" +#line 2137 "bison_parser.cpp" break; case YYSYMBOL_update_statement: /* update_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).update_stmt)); } -#line 2156 "bison_parser.cpp" +#line 2143 "bison_parser.cpp" break; case YYSYMBOL_update_clause_commalist: /* update_clause_commalist */ @@ -2165,73 +2152,73 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).update_vec)); } -#line 2169 "bison_parser.cpp" +#line 2156 "bison_parser.cpp" break; case YYSYMBOL_update_clause: /* update_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).update_t)); } -#line 2175 "bison_parser.cpp" +#line 2162 "bison_parser.cpp" break; case YYSYMBOL_select_statement: /* select_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2181 "bison_parser.cpp" +#line 2168 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation: /* select_within_set_operation */ #line 158 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2187 "bison_parser.cpp" +#line 2174 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation_no_parentheses: /* select_within_set_operation_no_parentheses */ #line 158 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2193 "bison_parser.cpp" +#line 2180 "bison_parser.cpp" break; case YYSYMBOL_select_with_paren: /* select_with_paren */ #line 158 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2199 "bison_parser.cpp" +#line 2186 "bison_parser.cpp" break; case YYSYMBOL_select_no_paren: /* select_no_paren */ #line 158 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2205 "bison_parser.cpp" +#line 2192 "bison_parser.cpp" break; case YYSYMBOL_set_operator: /* set_operator */ #line 158 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2211 "bison_parser.cpp" +#line 2198 "bison_parser.cpp" break; case YYSYMBOL_set_type: /* set_type */ #line 158 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2217 "bison_parser.cpp" +#line 2204 "bison_parser.cpp" break; case YYSYMBOL_opt_all: /* opt_all */ #line 147 "bison_parser.y" { } -#line 2223 "bison_parser.cpp" +#line 2210 "bison_parser.cpp" break; case YYSYMBOL_select_clause: /* select_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2229 "bison_parser.cpp" +#line 2216 "bison_parser.cpp" break; case YYSYMBOL_opt_distinct: /* opt_distinct */ #line 147 "bison_parser.y" { } -#line 2235 "bison_parser.cpp" +#line 2222 "bison_parser.cpp" break; case YYSYMBOL_select_list: /* select_list */ @@ -2244,37 +2231,37 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2248 "bison_parser.cpp" +#line 2235 "bison_parser.cpp" break; case YYSYMBOL_opt_from_clause: /* opt_from_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2254 "bison_parser.cpp" +#line 2241 "bison_parser.cpp" break; case YYSYMBOL_from_clause: /* from_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2260 "bison_parser.cpp" +#line 2247 "bison_parser.cpp" break; case YYSYMBOL_opt_where: /* opt_where */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2266 "bison_parser.cpp" +#line 2253 "bison_parser.cpp" break; case YYSYMBOL_opt_group: /* opt_group */ #line 158 "bison_parser.y" { delete (((*yyvaluep).group_t)); } -#line 2272 "bison_parser.cpp" +#line 2259 "bison_parser.cpp" break; case YYSYMBOL_opt_having: /* opt_having */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2278 "bison_parser.cpp" +#line 2265 "bison_parser.cpp" break; case YYSYMBOL_opt_order: /* opt_order */ @@ -2287,7 +2274,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2291 "bison_parser.cpp" +#line 2278 "bison_parser.cpp" break; case YYSYMBOL_order_list: /* order_list */ @@ -2300,31 +2287,31 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2304 "bison_parser.cpp" +#line 2291 "bison_parser.cpp" break; case YYSYMBOL_order_desc: /* order_desc */ #line 158 "bison_parser.y" { delete (((*yyvaluep).order)); } -#line 2310 "bison_parser.cpp" +#line 2297 "bison_parser.cpp" break; case YYSYMBOL_opt_order_type: /* opt_order_type */ #line 147 "bison_parser.y" { } -#line 2316 "bison_parser.cpp" +#line 2303 "bison_parser.cpp" break; case YYSYMBOL_opt_top: /* opt_top */ #line 158 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2322 "bison_parser.cpp" +#line 2309 "bison_parser.cpp" break; case YYSYMBOL_opt_limit: /* opt_limit */ #line 158 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2328 "bison_parser.cpp" +#line 2315 "bison_parser.cpp" break; case YYSYMBOL_expr_list: /* expr_list */ @@ -2337,7 +2324,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2341 "bison_parser.cpp" +#line 2328 "bison_parser.cpp" break; case YYSYMBOL_opt_literal_list: /* opt_literal_list */ @@ -2350,7 +2337,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2354 "bison_parser.cpp" +#line 2341 "bison_parser.cpp" break; case YYSYMBOL_literal_list: /* literal_list */ @@ -2363,187 +2350,187 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2367 "bison_parser.cpp" +#line 2354 "bison_parser.cpp" break; case YYSYMBOL_expr_alias: /* expr_alias */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2373 "bison_parser.cpp" +#line 2360 "bison_parser.cpp" break; case YYSYMBOL_expr: /* expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2379 "bison_parser.cpp" +#line 2366 "bison_parser.cpp" break; case YYSYMBOL_operand: /* operand */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2385 "bison_parser.cpp" +#line 2372 "bison_parser.cpp" break; case YYSYMBOL_scalar_expr: /* scalar_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2391 "bison_parser.cpp" +#line 2378 "bison_parser.cpp" break; case YYSYMBOL_unary_expr: /* unary_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2397 "bison_parser.cpp" +#line 2384 "bison_parser.cpp" break; case YYSYMBOL_binary_expr: /* binary_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2403 "bison_parser.cpp" +#line 2390 "bison_parser.cpp" break; case YYSYMBOL_logic_expr: /* logic_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2409 "bison_parser.cpp" +#line 2396 "bison_parser.cpp" break; case YYSYMBOL_in_expr: /* in_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2415 "bison_parser.cpp" +#line 2402 "bison_parser.cpp" break; case YYSYMBOL_case_expr: /* case_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2421 "bison_parser.cpp" +#line 2408 "bison_parser.cpp" break; case YYSYMBOL_case_list: /* case_list */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2427 "bison_parser.cpp" +#line 2414 "bison_parser.cpp" break; case YYSYMBOL_exists_expr: /* exists_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2433 "bison_parser.cpp" +#line 2420 "bison_parser.cpp" break; case YYSYMBOL_comp_expr: /* comp_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2439 "bison_parser.cpp" +#line 2426 "bison_parser.cpp" break; case YYSYMBOL_function_expr: /* function_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2445 "bison_parser.cpp" +#line 2432 "bison_parser.cpp" break; case YYSYMBOL_extract_expr: /* extract_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2451 "bison_parser.cpp" +#line 2438 "bison_parser.cpp" break; case YYSYMBOL_cast_expr: /* cast_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2457 "bison_parser.cpp" +#line 2444 "bison_parser.cpp" break; case YYSYMBOL_datetime_field: /* datetime_field */ #line 147 "bison_parser.y" { } -#line 2463 "bison_parser.cpp" +#line 2450 "bison_parser.cpp" break; case YYSYMBOL_array_expr: /* array_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2469 "bison_parser.cpp" +#line 2456 "bison_parser.cpp" break; case YYSYMBOL_array_index: /* array_index */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2475 "bison_parser.cpp" +#line 2462 "bison_parser.cpp" break; case YYSYMBOL_between_expr: /* between_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2481 "bison_parser.cpp" +#line 2468 "bison_parser.cpp" break; case YYSYMBOL_column_name: /* column_name */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2487 "bison_parser.cpp" +#line 2474 "bison_parser.cpp" break; case YYSYMBOL_literal: /* literal */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2493 "bison_parser.cpp" +#line 2480 "bison_parser.cpp" break; case YYSYMBOL_string_literal: /* string_literal */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2499 "bison_parser.cpp" +#line 2486 "bison_parser.cpp" break; case YYSYMBOL_bool_literal: /* bool_literal */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2505 "bison_parser.cpp" +#line 2492 "bison_parser.cpp" break; case YYSYMBOL_num_literal: /* num_literal */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2511 "bison_parser.cpp" +#line 2498 "bison_parser.cpp" break; case YYSYMBOL_int_literal: /* int_literal */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2517 "bison_parser.cpp" +#line 2504 "bison_parser.cpp" break; case YYSYMBOL_null_literal: /* null_literal */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2523 "bison_parser.cpp" +#line 2510 "bison_parser.cpp" break; case YYSYMBOL_param_expr: /* param_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2529 "bison_parser.cpp" +#line 2516 "bison_parser.cpp" break; case YYSYMBOL_table_ref: /* table_ref */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2535 "bison_parser.cpp" +#line 2522 "bison_parser.cpp" break; case YYSYMBOL_table_ref_atomic: /* table_ref_atomic */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2541 "bison_parser.cpp" +#line 2528 "bison_parser.cpp" break; case YYSYMBOL_nonjoin_table_ref_atomic: /* nonjoin_table_ref_atomic */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2547 "bison_parser.cpp" +#line 2534 "bison_parser.cpp" break; case YYSYMBOL_table_ref_commalist: /* table_ref_commalist */ @@ -2556,97 +2543,103 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).table_vec)); } -#line 2560 "bison_parser.cpp" +#line 2547 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name: /* table_ref_name */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2566 "bison_parser.cpp" +#line 2553 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name_no_alias: /* table_ref_name_no_alias */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2572 "bison_parser.cpp" +#line 2559 "bison_parser.cpp" break; case YYSYMBOL_table_name: /* table_name */ #line 148 "bison_parser.y" { free( (((*yyvaluep).table_name).name) ); free( (((*yyvaluep).table_name).schema) ); } -#line 2578 "bison_parser.cpp" +#line 2565 "bison_parser.cpp" break; case YYSYMBOL_opt_index_name: /* opt_index_name */ #line 149 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2584 "bison_parser.cpp" +#line 2571 "bison_parser.cpp" + break; + + case YYSYMBOL_index_name: /* index_name */ +#line 149 "bison_parser.y" + { free( (((*yyvaluep).sval)) ); } +#line 2577 "bison_parser.cpp" break; case YYSYMBOL_table_alias: /* table_alias */ #line 158 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2590 "bison_parser.cpp" +#line 2583 "bison_parser.cpp" break; case YYSYMBOL_opt_table_alias: /* opt_table_alias */ #line 158 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2596 "bison_parser.cpp" +#line 2589 "bison_parser.cpp" break; case YYSYMBOL_alias: /* alias */ #line 158 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2602 "bison_parser.cpp" +#line 2595 "bison_parser.cpp" break; case YYSYMBOL_opt_alias: /* opt_alias */ #line 158 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2608 "bison_parser.cpp" +#line 2601 "bison_parser.cpp" break; case YYSYMBOL_opt_with_clause: /* opt_with_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2614 "bison_parser.cpp" +#line 2607 "bison_parser.cpp" break; case YYSYMBOL_with_clause: /* with_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2620 "bison_parser.cpp" +#line 2613 "bison_parser.cpp" break; case YYSYMBOL_with_description_list: /* with_description_list */ #line 158 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2626 "bison_parser.cpp" +#line 2619 "bison_parser.cpp" break; case YYSYMBOL_with_description: /* with_description */ #line 158 "bison_parser.y" { delete (((*yyvaluep).with_description_t)); } -#line 2632 "bison_parser.cpp" +#line 2625 "bison_parser.cpp" break; case YYSYMBOL_join_clause: /* join_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2638 "bison_parser.cpp" +#line 2631 "bison_parser.cpp" break; case YYSYMBOL_opt_join_type: /* opt_join_type */ #line 147 "bison_parser.y" { } -#line 2644 "bison_parser.cpp" +#line 2637 "bison_parser.cpp" break; case YYSYMBOL_join_condition: /* join_condition */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2650 "bison_parser.cpp" +#line 2643 "bison_parser.cpp" break; case YYSYMBOL_ident_commalist: /* ident_commalist */ @@ -2659,7 +2652,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2663 "bison_parser.cpp" +#line 2656 "bison_parser.cpp" break; default: @@ -2766,7 +2759,7 @@ YYLTYPE yylloc = yyloc_default; yylloc.string_length = 0; } -#line 2770 "bison_parser.cpp" +#line 2763 "bison_parser.cpp" yylsp[0] = yylloc; goto yysetstate; @@ -2976,7 +2969,7 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* input: statement_list opt_semicolon */ -#line 270 "bison_parser.y" +#line 271 "bison_parser.y" { for (SQLStatement* stmt : *(yyvsp[-1].stmt_vec)) { // Transfers ownership of the statement. @@ -2994,247 +2987,247 @@ YYLTYPE yylloc = yyloc_default; } delete (yyvsp[-1].stmt_vec); } -#line 2998 "bison_parser.cpp" +#line 2991 "bison_parser.cpp" break; case 3: /* statement_list: statement */ -#line 291 "bison_parser.y" +#line 292 "bison_parser.y" { (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 3009 "bison_parser.cpp" +#line 3002 "bison_parser.cpp" break; case 4: /* statement_list: statement_list ';' statement */ -#line 297 "bison_parser.y" +#line 298 "bison_parser.y" { (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 3020 "bison_parser.cpp" +#line 3013 "bison_parser.cpp" break; case 5: /* statement: prepare_statement opt_hints */ -#line 306 "bison_parser.y" +#line 307 "bison_parser.y" { (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3029 "bison_parser.cpp" +#line 3022 "bison_parser.cpp" break; case 6: /* statement: preparable_statement opt_hints */ -#line 310 "bison_parser.y" +#line 311 "bison_parser.y" { (yyval.statement) = (yyvsp[-1].statement); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3038 "bison_parser.cpp" +#line 3031 "bison_parser.cpp" break; case 7: /* statement: show_statement */ -#line 314 "bison_parser.y" +#line 315 "bison_parser.y" { (yyval.statement) = (yyvsp[0].show_stmt); } -#line 3046 "bison_parser.cpp" +#line 3039 "bison_parser.cpp" break; case 8: /* statement: import_statement */ -#line 317 "bison_parser.y" +#line 318 "bison_parser.y" { (yyval.statement) = (yyvsp[0].import_stmt); } -#line 3054 "bison_parser.cpp" +#line 3047 "bison_parser.cpp" break; case 9: /* statement: export_statement */ -#line 320 "bison_parser.y" +#line 321 "bison_parser.y" { (yyval.statement) = (yyvsp[0].export_stmt); } -#line 3062 "bison_parser.cpp" +#line 3055 "bison_parser.cpp" break; case 10: /* preparable_statement: select_statement */ -#line 327 "bison_parser.y" +#line 328 "bison_parser.y" { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 3068 "bison_parser.cpp" +#line 3061 "bison_parser.cpp" break; case 11: /* preparable_statement: create_statement */ -#line 328 "bison_parser.y" +#line 329 "bison_parser.y" { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 3074 "bison_parser.cpp" +#line 3067 "bison_parser.cpp" break; case 12: /* preparable_statement: insert_statement */ -#line 329 "bison_parser.y" +#line 330 "bison_parser.y" { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 3080 "bison_parser.cpp" +#line 3073 "bison_parser.cpp" break; case 13: /* preparable_statement: delete_statement */ -#line 330 "bison_parser.y" +#line 331 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3086 "bison_parser.cpp" +#line 3079 "bison_parser.cpp" break; case 14: /* preparable_statement: truncate_statement */ -#line 331 "bison_parser.y" +#line 332 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3092 "bison_parser.cpp" +#line 3085 "bison_parser.cpp" break; case 15: /* preparable_statement: update_statement */ -#line 332 "bison_parser.y" +#line 333 "bison_parser.y" { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 3098 "bison_parser.cpp" +#line 3091 "bison_parser.cpp" break; case 16: /* preparable_statement: drop_statement */ -#line 333 "bison_parser.y" +#line 334 "bison_parser.y" { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 3104 "bison_parser.cpp" +#line 3097 "bison_parser.cpp" break; case 17: /* preparable_statement: execute_statement */ -#line 334 "bison_parser.y" +#line 335 "bison_parser.y" { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 3110 "bison_parser.cpp" +#line 3103 "bison_parser.cpp" break; case 18: /* preparable_statement: transaction_statement */ -#line 335 "bison_parser.y" +#line 336 "bison_parser.y" { (yyval.statement) = (yyvsp[0].transaction_stmt); } -#line 3116 "bison_parser.cpp" +#line 3109 "bison_parser.cpp" break; case 19: /* opt_hints: WITH HINT '(' hint_list ')' */ -#line 344 "bison_parser.y" +#line 345 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 3122 "bison_parser.cpp" +#line 3115 "bison_parser.cpp" break; case 20: /* opt_hints: %empty */ -#line 345 "bison_parser.y" +#line 346 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 3128 "bison_parser.cpp" +#line 3121 "bison_parser.cpp" break; case 21: /* hint_list: hint */ -#line 350 "bison_parser.y" +#line 351 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3134 "bison_parser.cpp" +#line 3127 "bison_parser.cpp" break; case 22: /* hint_list: hint_list ',' hint */ -#line 351 "bison_parser.y" +#line 352 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3140 "bison_parser.cpp" +#line 3133 "bison_parser.cpp" break; case 23: /* hint: IDENTIFIER */ -#line 355 "bison_parser.y" +#line 356 "bison_parser.y" { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[0].sval); } -#line 3149 "bison_parser.cpp" +#line 3142 "bison_parser.cpp" break; case 24: /* hint: IDENTIFIER '(' literal_list ')' */ -#line 359 "bison_parser.y" +#line 360 "bison_parser.y" { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[-3].sval); (yyval.expr)->exprList = (yyvsp[-1].expr_vec); } -#line 3159 "bison_parser.cpp" +#line 3152 "bison_parser.cpp" break; case 25: /* transaction_statement: BEGIN opt_transaction_keyword */ -#line 371 "bison_parser.y" +#line 372 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kBeginTransaction); } -#line 3167 "bison_parser.cpp" +#line 3160 "bison_parser.cpp" break; case 26: /* transaction_statement: ROLLBACK opt_transaction_keyword */ -#line 374 "bison_parser.y" +#line 375 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kRollbackTransaction); } -#line 3175 "bison_parser.cpp" +#line 3168 "bison_parser.cpp" break; case 27: /* transaction_statement: COMMIT opt_transaction_keyword */ -#line 377 "bison_parser.y" +#line 378 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kCommitTransaction); } -#line 3183 "bison_parser.cpp" +#line 3176 "bison_parser.cpp" break; case 30: /* prepare_statement: PREPARE IDENTIFIER FROM prepare_target_query */ -#line 391 "bison_parser.y" +#line 392 "bison_parser.y" { (yyval.prep_stmt) = new PrepareStatement(); (yyval.prep_stmt)->name = (yyvsp[-2].sval); (yyval.prep_stmt)->query = (yyvsp[0].sval); } -#line 3193 "bison_parser.cpp" +#line 3186 "bison_parser.cpp" break; case 32: /* execute_statement: EXECUTE IDENTIFIER */ -#line 401 "bison_parser.y" +#line 402 "bison_parser.y" { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[0].sval); } -#line 3202 "bison_parser.cpp" +#line 3195 "bison_parser.cpp" break; case 33: /* execute_statement: EXECUTE IDENTIFIER '(' opt_literal_list ')' */ -#line 405 "bison_parser.y" +#line 406 "bison_parser.y" { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[-3].sval); (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); } -#line 3212 "bison_parser.cpp" +#line 3205 "bison_parser.cpp" break; case 34: /* import_statement: IMPORT FROM file_type FILE file_path INTO table_name */ -#line 419 "bison_parser.y" +#line 420 "bison_parser.y" { (yyval.import_stmt) = new ImportStatement((yyvsp[-4].import_type_t)); (yyval.import_stmt)->filePath = (yyvsp[-2].sval); (yyval.import_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3223 "bison_parser.cpp" +#line 3216 "bison_parser.cpp" break; case 35: /* import_statement: COPY table_name FROM file_path opt_file_type */ -#line 425 "bison_parser.y" +#line 426 "bison_parser.y" { (yyval.import_stmt) = new ImportStatement((yyvsp[0].import_type_t)); (yyval.import_stmt)->filePath = (yyvsp[-1].sval); (yyval.import_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3234 "bison_parser.cpp" +#line 3227 "bison_parser.cpp" break; case 36: /* file_type: IDENTIFIER */ -#line 434 "bison_parser.y" +#line 435 "bison_parser.y" { if (strcasecmp((yyvsp[0].sval), "csv") == 0) { (yyval.import_type_t) = kImportCSV; @@ -3249,70 +3242,70 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[0].sval)); } -#line 3253 "bison_parser.cpp" +#line 3246 "bison_parser.cpp" break; case 37: /* file_path: string_literal */ -#line 451 "bison_parser.y" +#line 452 "bison_parser.y" { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 3259 "bison_parser.cpp" +#line 3252 "bison_parser.cpp" break; case 38: /* opt_file_type: WITH FORMAT file_type */ -#line 455 "bison_parser.y" +#line 456 "bison_parser.y" { (yyval.import_type_t) = (yyvsp[0].import_type_t); } -#line 3267 "bison_parser.cpp" +#line 3260 "bison_parser.cpp" break; case 39: /* opt_file_type: %empty */ -#line 458 "bison_parser.y" +#line 459 "bison_parser.y" { (yyval.import_type_t) = kImportAuto; } -#line 3273 "bison_parser.cpp" +#line 3266 "bison_parser.cpp" break; case 40: /* export_statement: COPY table_name TO file_path opt_file_type */ -#line 467 "bison_parser.y" +#line 468 "bison_parser.y" { (yyval.export_stmt) = new ExportStatement((yyvsp[0].import_type_t)); (yyval.export_stmt)->filePath = (yyvsp[-1].sval); (yyval.export_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.export_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3284 "bison_parser.cpp" +#line 3277 "bison_parser.cpp" break; case 41: /* show_statement: SHOW TABLES */ -#line 481 "bison_parser.y" +#line 482 "bison_parser.y" { (yyval.show_stmt) = new ShowStatement(kShowTables); } -#line 3292 "bison_parser.cpp" +#line 3285 "bison_parser.cpp" break; case 42: /* show_statement: SHOW COLUMNS table_name */ -#line 484 "bison_parser.y" +#line 485 "bison_parser.y" { (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 3302 "bison_parser.cpp" +#line 3295 "bison_parser.cpp" break; case 43: /* show_statement: DESCRIBE table_name */ -#line 489 "bison_parser.y" +#line 490 "bison_parser.y" { (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 3312 "bison_parser.cpp" +#line 3305 "bison_parser.cpp" break; case 44: /* create_statement: CREATE TABLE opt_not_exists table_name FROM IDENTIFIER FILE file_path */ -#line 503 "bison_parser.y" +#line 504 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTableFromTbl); (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); @@ -3326,11 +3319,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].sval)); (yyval.create_stmt)->filePath = (yyvsp[0].sval); } -#line 3330 "bison_parser.cpp" +#line 3323 "bison_parser.cpp" break; case 45: /* create_statement: CREATE TABLE opt_not_exists table_name '(' column_def_commalist ')' */ -#line 516 "bison_parser.y" +#line 517 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -3338,11 +3331,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->columns = (yyvsp[-1].column_vec); } -#line 3342 "bison_parser.cpp" +#line 3335 "bison_parser.cpp" break; case 46: /* create_statement: CREATE TABLE opt_not_exists table_name AS select_statement */ -#line 523 "bison_parser.y" +#line 524 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-3].bval); @@ -3350,11 +3343,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-2].table_name).name; (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3354 "bison_parser.cpp" +#line 3347 "bison_parser.cpp" break; case 47: /* create_statement: CREATE INDEX opt_index_name opt_not_exists ON table_name '(' ident_commalist ')' */ -#line 530 "bison_parser.y" +#line 531 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateIndex); (yyval.create_stmt)->indexName = (yyvsp[-6].sval); @@ -3362,11 +3355,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->indexColumns = (yyvsp[-1].str_vec); } -#line 3366 "bison_parser.cpp" +#line 3359 "bison_parser.cpp" break; case 48: /* create_statement: CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement */ -#line 537 "bison_parser.y" +#line 538 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateView); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -3375,186 +3368,196 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3379 "bison_parser.cpp" +#line 3372 "bison_parser.cpp" break; case 49: /* opt_not_exists: IF NOT EXISTS */ -#line 548 "bison_parser.y" +#line 549 "bison_parser.y" { (yyval.bval) = true; } -#line 3385 "bison_parser.cpp" +#line 3378 "bison_parser.cpp" break; case 50: /* opt_not_exists: %empty */ -#line 549 "bison_parser.y" +#line 550 "bison_parser.y" { (yyval.bval) = false; } -#line 3391 "bison_parser.cpp" +#line 3384 "bison_parser.cpp" break; case 51: /* column_def_commalist: column_def */ -#line 553 "bison_parser.y" +#line 554 "bison_parser.y" { (yyval.column_vec) = new std::vector(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); } -#line 3397 "bison_parser.cpp" +#line 3390 "bison_parser.cpp" break; case 52: /* column_def_commalist: column_def_commalist ',' column_def */ -#line 554 "bison_parser.y" +#line 555 "bison_parser.y" { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } -#line 3403 "bison_parser.cpp" +#line 3396 "bison_parser.cpp" break; case 53: /* column_def: IDENTIFIER column_type opt_column_nullable */ -#line 558 "bison_parser.y" +#line 559 "bison_parser.y" { (yyval.column_t) = new ColumnDefinition((yyvsp[-2].sval), (yyvsp[-1].column_type_t), (yyvsp[0].bval)); } -#line 3411 "bison_parser.cpp" +#line 3404 "bison_parser.cpp" break; case 54: /* column_type: INT */ -#line 564 "bison_parser.y" +#line 565 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3417 "bison_parser.cpp" +#line 3410 "bison_parser.cpp" break; case 55: /* column_type: INTEGER */ -#line 565 "bison_parser.y" +#line 566 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3423 "bison_parser.cpp" +#line 3416 "bison_parser.cpp" break; case 56: /* column_type: LONG */ -#line 566 "bison_parser.y" +#line 567 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::LONG}; } -#line 3429 "bison_parser.cpp" +#line 3422 "bison_parser.cpp" break; case 57: /* column_type: FLOAT */ -#line 567 "bison_parser.y" +#line 568 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3435 "bison_parser.cpp" +#line 3428 "bison_parser.cpp" break; case 58: /* column_type: DOUBLE */ -#line 568 "bison_parser.y" +#line 569 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } -#line 3441 "bison_parser.cpp" +#line 3434 "bison_parser.cpp" break; case 59: /* column_type: VARCHAR '(' INTVAL ')' */ -#line 569 "bison_parser.y" +#line 570 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3447 "bison_parser.cpp" +#line 3440 "bison_parser.cpp" break; case 60: /* column_type: CHAR '(' INTVAL ')' */ -#line 570 "bison_parser.y" +#line 571 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } -#line 3453 "bison_parser.cpp" +#line 3446 "bison_parser.cpp" break; case 61: /* column_type: TEXT */ -#line 571 "bison_parser.y" +#line 572 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } -#line 3459 "bison_parser.cpp" +#line 3452 "bison_parser.cpp" break; case 62: /* column_type: DATETIME */ -#line 572 "bison_parser.y" +#line 573 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } -#line 3465 "bison_parser.cpp" +#line 3458 "bison_parser.cpp" break; case 63: /* column_type: DATE */ -#line 573 "bison_parser.y" +#line 574 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATE}; } -#line 3471 "bison_parser.cpp" +#line 3464 "bison_parser.cpp" break; case 64: /* opt_column_nullable: NULL */ -#line 577 "bison_parser.y" +#line 578 "bison_parser.y" { (yyval.bval) = true; } -#line 3477 "bison_parser.cpp" +#line 3470 "bison_parser.cpp" break; case 65: /* opt_column_nullable: NOT NULL */ -#line 578 "bison_parser.y" +#line 579 "bison_parser.y" { (yyval.bval) = false; } -#line 3483 "bison_parser.cpp" +#line 3476 "bison_parser.cpp" break; case 66: /* opt_column_nullable: %empty */ -#line 579 "bison_parser.y" +#line 580 "bison_parser.y" { (yyval.bval) = false; } -#line 3489 "bison_parser.cpp" +#line 3482 "bison_parser.cpp" break; case 67: /* drop_statement: DROP TABLE opt_exists table_name */ -#line 589 "bison_parser.y" +#line 590 "bison_parser.y" { (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 3500 "bison_parser.cpp" +#line 3493 "bison_parser.cpp" break; case 68: /* drop_statement: DROP VIEW opt_exists table_name */ -#line 595 "bison_parser.y" +#line 596 "bison_parser.y" { (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 3511 "bison_parser.cpp" +#line 3504 "bison_parser.cpp" break; case 69: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ -#line 601 "bison_parser.y" +#line 602 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); (yyval.drop_stmt)->ifExists = false; (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 3521 "bison_parser.cpp" +#line 3514 "bison_parser.cpp" break; - case 70: /* opt_exists: IF EXISTS */ -#line 609 "bison_parser.y" + case 70: /* drop_statement: DROP INDEX index_name ON table_name */ +#line 607 "bison_parser.y" + { + (yyval.drop_stmt) = new DropStatement(kDropIndex); + (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; + (yyval.drop_stmt)->index_name = (yyvsp[-2].sval); + } +#line 3524 "bison_parser.cpp" + break; + + case 71: /* opt_exists: IF EXISTS */ +#line 615 "bison_parser.y" { (yyval.bval) = true; } -#line 3527 "bison_parser.cpp" +#line 3530 "bison_parser.cpp" break; - case 71: /* opt_exists: %empty */ -#line 610 "bison_parser.y" + case 72: /* opt_exists: %empty */ +#line 616 "bison_parser.y" { (yyval.bval) = false; } -#line 3533 "bison_parser.cpp" +#line 3536 "bison_parser.cpp" break; - case 72: /* delete_statement: DELETE FROM table_name opt_where */ -#line 619 "bison_parser.y" + case 73: /* delete_statement: DELETE FROM table_name opt_where */ +#line 625 "bison_parser.y" { (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 3544 "bison_parser.cpp" +#line 3547 "bison_parser.cpp" break; - case 73: /* truncate_statement: TRUNCATE table_name */ -#line 628 "bison_parser.y" + case 74: /* truncate_statement: TRUNCATE table_name */ +#line 634 "bison_parser.y" { (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3554 "bison_parser.cpp" +#line 3557 "bison_parser.cpp" break; - case 74: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ -#line 641 "bison_parser.y" + case 75: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ +#line 647 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertValues); (yyval.insert_stmt)->schema = (yyvsp[-5].table_name).schema; @@ -3562,11 +3565,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } -#line 3566 "bison_parser.cpp" +#line 3569 "bison_parser.cpp" break; - case 75: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ -#line 648 "bison_parser.y" + case 76: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ +#line 654 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertSelect); (yyval.insert_stmt)->schema = (yyvsp[-2].table_name).schema; @@ -3574,74 +3577,74 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } -#line 3578 "bison_parser.cpp" +#line 3581 "bison_parser.cpp" break; - case 76: /* opt_column_list: '(' ident_commalist ')' */ -#line 659 "bison_parser.y" + case 77: /* opt_column_list: '(' ident_commalist ')' */ +#line 665 "bison_parser.y" { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 3584 "bison_parser.cpp" +#line 3587 "bison_parser.cpp" break; - case 77: /* opt_column_list: %empty */ -#line 660 "bison_parser.y" + case 78: /* opt_column_list: %empty */ +#line 666 "bison_parser.y" { (yyval.str_vec) = nullptr; } -#line 3590 "bison_parser.cpp" +#line 3593 "bison_parser.cpp" break; - case 78: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ -#line 670 "bison_parser.y" + case 79: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ +#line 676 "bison_parser.y" { (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 3601 "bison_parser.cpp" +#line 3604 "bison_parser.cpp" break; - case 79: /* update_clause_commalist: update_clause */ -#line 679 "bison_parser.y" + case 80: /* update_clause_commalist: update_clause */ +#line 685 "bison_parser.y" { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 3607 "bison_parser.cpp" +#line 3610 "bison_parser.cpp" break; - case 80: /* update_clause_commalist: update_clause_commalist ',' update_clause */ -#line 680 "bison_parser.y" + case 81: /* update_clause_commalist: update_clause_commalist ',' update_clause */ +#line 686 "bison_parser.y" { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 3613 "bison_parser.cpp" +#line 3616 "bison_parser.cpp" break; - case 81: /* update_clause: IDENTIFIER '=' expr */ -#line 684 "bison_parser.y" + case 82: /* update_clause: IDENTIFIER '=' expr */ +#line 690 "bison_parser.y" { (yyval.update_t) = new UpdateClause(); (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 3623 "bison_parser.cpp" +#line 3626 "bison_parser.cpp" break; - case 82: /* select_statement: opt_with_clause select_with_paren */ -#line 696 "bison_parser.y" + case 83: /* select_statement: opt_with_clause select_with_paren */ +#line 702 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3632 "bison_parser.cpp" +#line 3635 "bison_parser.cpp" break; - case 83: /* select_statement: opt_with_clause select_no_paren */ -#line 700 "bison_parser.y" + case 84: /* select_statement: opt_with_clause select_no_paren */ +#line 706 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3641 "bison_parser.cpp" +#line 3644 "bison_parser.cpp" break; - case 84: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ -#line 704 "bison_parser.y" + case 85: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ +#line 710 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3653,17 +3656,17 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); (yyval.select_stmt)->withDescriptions = (yyvsp[-5].with_description_vec); } -#line 3657 "bison_parser.cpp" +#line 3660 "bison_parser.cpp" break; - case 87: /* select_within_set_operation_no_parentheses: select_clause */ -#line 722 "bison_parser.y" + case 88: /* select_within_set_operation_no_parentheses: select_clause */ +#line 728 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); } -#line 3663 "bison_parser.cpp" +#line 3666 "bison_parser.cpp" break; - case 88: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ -#line 723 "bison_parser.y" + case 89: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ +#line 729 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3672,23 +3675,23 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->push_back((yyvsp[-1].set_operator_t)); (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[0].select_stmt); } -#line 3676 "bison_parser.cpp" +#line 3679 "bison_parser.cpp" break; - case 89: /* select_with_paren: '(' select_no_paren ')' */ -#line 734 "bison_parser.y" + case 90: /* select_with_paren: '(' select_no_paren ')' */ +#line 740 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3682 "bison_parser.cpp" +#line 3685 "bison_parser.cpp" break; - case 90: /* select_with_paren: '(' select_with_paren ')' */ -#line 735 "bison_parser.y" + case 91: /* select_with_paren: '(' select_with_paren ')' */ +#line 741 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3688 "bison_parser.cpp" +#line 3691 "bison_parser.cpp" break; - case 91: /* select_no_paren: select_clause opt_order opt_limit */ -#line 739 "bison_parser.y" + case 92: /* select_no_paren: select_clause opt_order opt_limit */ +#line 745 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); (yyval.select_stmt)->order = (yyvsp[-1].order_vec); @@ -3699,11 +3702,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3703 "bison_parser.cpp" +#line 3706 "bison_parser.cpp" break; - case 92: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ -#line 749 "bison_parser.y" + case 93: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ +#line 755 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3714,63 +3717,63 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); } -#line 3718 "bison_parser.cpp" +#line 3721 "bison_parser.cpp" break; - case 93: /* set_operator: set_type opt_all */ -#line 762 "bison_parser.y" + case 94: /* set_operator: set_type opt_all */ +#line 768 "bison_parser.y" { (yyval.set_operator_t) = (yyvsp[-1].set_operator_t); (yyval.set_operator_t)->isAll = (yyvsp[0].bval); } -#line 3727 "bison_parser.cpp" +#line 3730 "bison_parser.cpp" break; - case 94: /* set_type: UNION */ -#line 769 "bison_parser.y" + case 95: /* set_type: UNION */ +#line 775 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetUnion; } -#line 3736 "bison_parser.cpp" +#line 3739 "bison_parser.cpp" break; - case 95: /* set_type: INTERSECT */ -#line 773 "bison_parser.y" + case 96: /* set_type: INTERSECT */ +#line 779 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetIntersect; } -#line 3745 "bison_parser.cpp" +#line 3748 "bison_parser.cpp" break; - case 96: /* set_type: EXCEPT */ -#line 777 "bison_parser.y" + case 97: /* set_type: EXCEPT */ +#line 783 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetExcept; } -#line 3754 "bison_parser.cpp" +#line 3757 "bison_parser.cpp" break; - case 97: /* opt_all: ALL */ -#line 784 "bison_parser.y" + case 98: /* opt_all: ALL */ +#line 790 "bison_parser.y" { (yyval.bval) = true; } -#line 3762 "bison_parser.cpp" +#line 3765 "bison_parser.cpp" break; - case 98: /* opt_all: %empty */ -#line 787 "bison_parser.y" + case 99: /* opt_all: %empty */ +#line 793 "bison_parser.y" { (yyval.bval) = false; } -#line 3770 "bison_parser.cpp" +#line 3773 "bison_parser.cpp" break; - case 99: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ -#line 793 "bison_parser.y" + case 100: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ +#line 799 "bison_parser.y" { (yyval.select_stmt) = new SelectStatement(); (yyval.select_stmt)->limit = (yyvsp[-5].limit); @@ -3780,213 +3783,213 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 3784 "bison_parser.cpp" +#line 3787 "bison_parser.cpp" break; - case 100: /* opt_distinct: DISTINCT */ -#line 805 "bison_parser.y" + case 101: /* opt_distinct: DISTINCT */ +#line 811 "bison_parser.y" { (yyval.bval) = true; } -#line 3790 "bison_parser.cpp" +#line 3793 "bison_parser.cpp" break; - case 101: /* opt_distinct: %empty */ -#line 806 "bison_parser.y" + case 102: /* opt_distinct: %empty */ +#line 812 "bison_parser.y" { (yyval.bval) = false; } -#line 3796 "bison_parser.cpp" +#line 3799 "bison_parser.cpp" break; - case 103: /* opt_from_clause: from_clause */ -#line 814 "bison_parser.y" + case 104: /* opt_from_clause: from_clause */ +#line 820 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 3802 "bison_parser.cpp" +#line 3805 "bison_parser.cpp" break; - case 104: /* opt_from_clause: %empty */ -#line 815 "bison_parser.y" + case 105: /* opt_from_clause: %empty */ +#line 821 "bison_parser.y" { (yyval.table) = nullptr; } -#line 3808 "bison_parser.cpp" +#line 3811 "bison_parser.cpp" break; - case 105: /* from_clause: FROM table_ref */ -#line 819 "bison_parser.y" + case 106: /* from_clause: FROM table_ref */ +#line 825 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 3814 "bison_parser.cpp" +#line 3817 "bison_parser.cpp" break; - case 106: /* opt_where: WHERE expr */ -#line 824 "bison_parser.y" + case 107: /* opt_where: WHERE expr */ +#line 830 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 3820 "bison_parser.cpp" +#line 3823 "bison_parser.cpp" break; - case 107: /* opt_where: %empty */ -#line 825 "bison_parser.y" + case 108: /* opt_where: %empty */ +#line 831 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 3826 "bison_parser.cpp" +#line 3829 "bison_parser.cpp" break; - case 108: /* opt_group: GROUP BY expr_list opt_having */ -#line 829 "bison_parser.y" + case 109: /* opt_group: GROUP BY expr_list opt_having */ +#line 835 "bison_parser.y" { (yyval.group_t) = new GroupByDescription(); (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 3836 "bison_parser.cpp" +#line 3839 "bison_parser.cpp" break; - case 109: /* opt_group: %empty */ -#line 834 "bison_parser.y" + case 110: /* opt_group: %empty */ +#line 840 "bison_parser.y" { (yyval.group_t) = nullptr; } -#line 3842 "bison_parser.cpp" +#line 3845 "bison_parser.cpp" break; - case 110: /* opt_having: HAVING expr */ -#line 838 "bison_parser.y" + case 111: /* opt_having: HAVING expr */ +#line 844 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 3848 "bison_parser.cpp" +#line 3851 "bison_parser.cpp" break; - case 111: /* opt_having: %empty */ -#line 839 "bison_parser.y" + case 112: /* opt_having: %empty */ +#line 845 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 3854 "bison_parser.cpp" +#line 3857 "bison_parser.cpp" break; - case 112: /* opt_order: ORDER BY order_list */ -#line 843 "bison_parser.y" + case 113: /* opt_order: ORDER BY order_list */ +#line 849 "bison_parser.y" { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 3860 "bison_parser.cpp" +#line 3863 "bison_parser.cpp" break; - case 113: /* opt_order: %empty */ -#line 844 "bison_parser.y" + case 114: /* opt_order: %empty */ +#line 850 "bison_parser.y" { (yyval.order_vec) = nullptr; } -#line 3866 "bison_parser.cpp" +#line 3869 "bison_parser.cpp" break; - case 114: /* order_list: order_desc */ -#line 848 "bison_parser.y" + case 115: /* order_list: order_desc */ +#line 854 "bison_parser.y" { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 3872 "bison_parser.cpp" +#line 3875 "bison_parser.cpp" break; - case 115: /* order_list: order_list ',' order_desc */ -#line 849 "bison_parser.y" + case 116: /* order_list: order_list ',' order_desc */ +#line 855 "bison_parser.y" { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 3878 "bison_parser.cpp" +#line 3881 "bison_parser.cpp" break; - case 116: /* order_desc: expr opt_order_type */ -#line 853 "bison_parser.y" + case 117: /* order_desc: expr opt_order_type */ +#line 859 "bison_parser.y" { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 3884 "bison_parser.cpp" +#line 3887 "bison_parser.cpp" break; - case 117: /* opt_order_type: ASC */ -#line 857 "bison_parser.y" + case 118: /* opt_order_type: ASC */ +#line 863 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 3890 "bison_parser.cpp" +#line 3893 "bison_parser.cpp" break; - case 118: /* opt_order_type: DESC */ -#line 858 "bison_parser.y" + case 119: /* opt_order_type: DESC */ +#line 864 "bison_parser.y" { (yyval.order_type) = kOrderDesc; } -#line 3896 "bison_parser.cpp" +#line 3899 "bison_parser.cpp" break; - case 119: /* opt_order_type: %empty */ -#line 859 "bison_parser.y" + case 120: /* opt_order_type: %empty */ +#line 865 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 3902 "bison_parser.cpp" +#line 3905 "bison_parser.cpp" break; - case 120: /* opt_top: TOP int_literal */ -#line 865 "bison_parser.y" + case 121: /* opt_top: TOP int_literal */ +#line 871 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 3908 "bison_parser.cpp" +#line 3911 "bison_parser.cpp" break; - case 121: /* opt_top: %empty */ -#line 866 "bison_parser.y" + case 122: /* opt_top: %empty */ +#line 872 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 3914 "bison_parser.cpp" +#line 3917 "bison_parser.cpp" break; - case 122: /* opt_limit: LIMIT expr */ -#line 870 "bison_parser.y" + case 123: /* opt_limit: LIMIT expr */ +#line 876 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 3920 "bison_parser.cpp" +#line 3923 "bison_parser.cpp" break; - case 123: /* opt_limit: OFFSET expr */ -#line 871 "bison_parser.y" + case 124: /* opt_limit: OFFSET expr */ +#line 877 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 3926 "bison_parser.cpp" +#line 3929 "bison_parser.cpp" break; - case 124: /* opt_limit: LIMIT expr OFFSET expr */ -#line 872 "bison_parser.y" + case 125: /* opt_limit: LIMIT expr OFFSET expr */ +#line 878 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 3932 "bison_parser.cpp" +#line 3935 "bison_parser.cpp" break; - case 125: /* opt_limit: LIMIT ALL */ -#line 873 "bison_parser.y" + case 126: /* opt_limit: LIMIT ALL */ +#line 879 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, nullptr); } -#line 3938 "bison_parser.cpp" +#line 3941 "bison_parser.cpp" break; - case 126: /* opt_limit: LIMIT ALL OFFSET expr */ -#line 874 "bison_parser.y" + case 127: /* opt_limit: LIMIT ALL OFFSET expr */ +#line 880 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 3944 "bison_parser.cpp" +#line 3947 "bison_parser.cpp" break; - case 127: /* opt_limit: %empty */ -#line 875 "bison_parser.y" + case 128: /* opt_limit: %empty */ +#line 881 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 3950 "bison_parser.cpp" +#line 3953 "bison_parser.cpp" break; - case 128: /* expr_list: expr_alias */ -#line 882 "bison_parser.y" + case 129: /* expr_list: expr_alias */ +#line 888 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3956 "bison_parser.cpp" +#line 3959 "bison_parser.cpp" break; - case 129: /* expr_list: expr_list ',' expr_alias */ -#line 883 "bison_parser.y" + case 130: /* expr_list: expr_list ',' expr_alias */ +#line 889 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3962 "bison_parser.cpp" +#line 3965 "bison_parser.cpp" break; - case 130: /* opt_literal_list: literal_list */ -#line 887 "bison_parser.y" + case 131: /* opt_literal_list: literal_list */ +#line 893 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[0].expr_vec); } -#line 3968 "bison_parser.cpp" +#line 3971 "bison_parser.cpp" break; - case 131: /* opt_literal_list: %empty */ -#line 888 "bison_parser.y" + case 132: /* opt_literal_list: %empty */ +#line 894 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 3974 "bison_parser.cpp" +#line 3977 "bison_parser.cpp" break; - case 132: /* literal_list: literal */ -#line 892 "bison_parser.y" + case 133: /* literal_list: literal */ +#line 898 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3980 "bison_parser.cpp" +#line 3983 "bison_parser.cpp" break; - case 133: /* literal_list: literal_list ',' literal */ -#line 893 "bison_parser.y" + case 134: /* literal_list: literal_list ',' literal */ +#line 899 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3986 "bison_parser.cpp" +#line 3989 "bison_parser.cpp" break; - case 134: /* expr_alias: expr opt_alias */ -#line 897 "bison_parser.y" + case 135: /* expr_alias: expr opt_alias */ +#line 903 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); if ((yyvsp[0].alias_t)) { @@ -3994,421 +3997,421 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].alias_t); } } -#line 3998 "bison_parser.cpp" +#line 4001 "bison_parser.cpp" break; - case 140: /* operand: '(' expr ')' */ -#line 915 "bison_parser.y" + case 141: /* operand: '(' expr ')' */ +#line 921 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); } -#line 4004 "bison_parser.cpp" +#line 4007 "bison_parser.cpp" break; - case 150: /* operand: '(' select_no_paren ')' */ -#line 925 "bison_parser.y" + case 151: /* operand: '(' select_no_paren ')' */ +#line 931 "bison_parser.y" { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 4010 "bison_parser.cpp" +#line 4013 "bison_parser.cpp" break; - case 153: /* unary_expr: '-' operand */ -#line 934 "bison_parser.y" + case 154: /* unary_expr: '-' operand */ +#line 940 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 4016 "bison_parser.cpp" +#line 4019 "bison_parser.cpp" break; - case 154: /* unary_expr: NOT operand */ -#line 935 "bison_parser.y" + case 155: /* unary_expr: NOT operand */ +#line 941 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 4022 "bison_parser.cpp" +#line 4025 "bison_parser.cpp" break; - case 155: /* unary_expr: operand ISNULL */ -#line 936 "bison_parser.y" + case 156: /* unary_expr: operand ISNULL */ +#line 942 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 4028 "bison_parser.cpp" +#line 4031 "bison_parser.cpp" break; - case 156: /* unary_expr: operand IS NULL */ -#line 937 "bison_parser.y" + case 157: /* unary_expr: operand IS NULL */ +#line 943 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 4034 "bison_parser.cpp" +#line 4037 "bison_parser.cpp" break; - case 157: /* unary_expr: operand IS NOT NULL */ -#line 938 "bison_parser.y" + case 158: /* unary_expr: operand IS NOT NULL */ +#line 944 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 4040 "bison_parser.cpp" +#line 4043 "bison_parser.cpp" break; - case 159: /* binary_expr: operand '-' operand */ -#line 943 "bison_parser.y" + case 160: /* binary_expr: operand '-' operand */ +#line 949 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 4046 "bison_parser.cpp" +#line 4049 "bison_parser.cpp" break; - case 160: /* binary_expr: operand '+' operand */ -#line 944 "bison_parser.y" + case 161: /* binary_expr: operand '+' operand */ +#line 950 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 4052 "bison_parser.cpp" +#line 4055 "bison_parser.cpp" break; - case 161: /* binary_expr: operand '/' operand */ -#line 945 "bison_parser.y" + case 162: /* binary_expr: operand '/' operand */ +#line 951 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 4058 "bison_parser.cpp" +#line 4061 "bison_parser.cpp" break; - case 162: /* binary_expr: operand '*' operand */ -#line 946 "bison_parser.y" + case 163: /* binary_expr: operand '*' operand */ +#line 952 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 4064 "bison_parser.cpp" +#line 4067 "bison_parser.cpp" break; - case 163: /* binary_expr: operand '%' operand */ -#line 947 "bison_parser.y" + case 164: /* binary_expr: operand '%' operand */ +#line 953 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 4070 "bison_parser.cpp" +#line 4073 "bison_parser.cpp" break; - case 164: /* binary_expr: operand '^' operand */ -#line 948 "bison_parser.y" + case 165: /* binary_expr: operand '^' operand */ +#line 954 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 4076 "bison_parser.cpp" +#line 4079 "bison_parser.cpp" break; - case 165: /* binary_expr: operand LIKE operand */ -#line 949 "bison_parser.y" + case 166: /* binary_expr: operand LIKE operand */ +#line 955 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 4082 "bison_parser.cpp" +#line 4085 "bison_parser.cpp" break; - case 166: /* binary_expr: operand NOT LIKE operand */ -#line 950 "bison_parser.y" + case 167: /* binary_expr: operand NOT LIKE operand */ +#line 956 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 4088 "bison_parser.cpp" +#line 4091 "bison_parser.cpp" break; - case 167: /* binary_expr: operand ILIKE operand */ -#line 951 "bison_parser.y" + case 168: /* binary_expr: operand ILIKE operand */ +#line 957 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 4094 "bison_parser.cpp" +#line 4097 "bison_parser.cpp" break; - case 168: /* binary_expr: operand CONCAT operand */ -#line 952 "bison_parser.y" + case 169: /* binary_expr: operand CONCAT operand */ +#line 958 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 4100 "bison_parser.cpp" +#line 4103 "bison_parser.cpp" break; - case 169: /* logic_expr: expr AND expr */ -#line 956 "bison_parser.y" + case 170: /* logic_expr: expr AND expr */ +#line 962 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 4106 "bison_parser.cpp" +#line 4109 "bison_parser.cpp" break; - case 170: /* logic_expr: expr OR expr */ -#line 957 "bison_parser.y" + case 171: /* logic_expr: expr OR expr */ +#line 963 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 4112 "bison_parser.cpp" +#line 4115 "bison_parser.cpp" break; - case 171: /* in_expr: operand IN '(' expr_list ')' */ -#line 961 "bison_parser.y" + case 172: /* in_expr: operand IN '(' expr_list ')' */ +#line 967 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 4118 "bison_parser.cpp" +#line 4121 "bison_parser.cpp" break; - case 172: /* in_expr: operand NOT IN '(' expr_list ')' */ -#line 962 "bison_parser.y" + case 173: /* in_expr: operand NOT IN '(' expr_list ')' */ +#line 968 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 4124 "bison_parser.cpp" +#line 4127 "bison_parser.cpp" break; - case 173: /* in_expr: operand IN '(' select_no_paren ')' */ -#line 963 "bison_parser.y" + case 174: /* in_expr: operand IN '(' select_no_paren ')' */ +#line 969 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 4130 "bison_parser.cpp" +#line 4133 "bison_parser.cpp" break; - case 174: /* in_expr: operand NOT IN '(' select_no_paren ')' */ -#line 964 "bison_parser.y" + case 175: /* in_expr: operand NOT IN '(' select_no_paren ')' */ +#line 970 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 4136 "bison_parser.cpp" +#line 4139 "bison_parser.cpp" break; - case 175: /* case_expr: CASE expr case_list END */ -#line 970 "bison_parser.y" + case 176: /* case_expr: CASE expr case_list END */ +#line 976 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } -#line 4142 "bison_parser.cpp" +#line 4145 "bison_parser.cpp" break; - case 176: /* case_expr: CASE expr case_list ELSE expr END */ -#line 971 "bison_parser.y" + case 177: /* case_expr: CASE expr case_list ELSE expr END */ +#line 977 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4148 "bison_parser.cpp" +#line 4151 "bison_parser.cpp" break; - case 177: /* case_expr: CASE case_list END */ -#line 972 "bison_parser.y" + case 178: /* case_expr: CASE case_list END */ +#line 978 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } -#line 4154 "bison_parser.cpp" +#line 4157 "bison_parser.cpp" break; - case 178: /* case_expr: CASE case_list ELSE expr END */ -#line 973 "bison_parser.y" + case 179: /* case_expr: CASE case_list ELSE expr END */ +#line 979 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4160 "bison_parser.cpp" +#line 4163 "bison_parser.cpp" break; - case 179: /* case_list: WHEN expr THEN expr */ -#line 977 "bison_parser.y" + case 180: /* case_list: WHEN expr THEN expr */ +#line 983 "bison_parser.y" { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4166 "bison_parser.cpp" +#line 4169 "bison_parser.cpp" break; - case 180: /* case_list: case_list WHEN expr THEN expr */ -#line 978 "bison_parser.y" + case 181: /* case_list: case_list WHEN expr THEN expr */ +#line 984 "bison_parser.y" { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4172 "bison_parser.cpp" +#line 4175 "bison_parser.cpp" break; - case 181: /* exists_expr: EXISTS '(' select_no_paren ')' */ -#line 982 "bison_parser.y" + case 182: /* exists_expr: EXISTS '(' select_no_paren ')' */ +#line 988 "bison_parser.y" { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 4178 "bison_parser.cpp" +#line 4181 "bison_parser.cpp" break; - case 182: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ -#line 983 "bison_parser.y" + case 183: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ +#line 989 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 4184 "bison_parser.cpp" +#line 4187 "bison_parser.cpp" break; - case 183: /* comp_expr: operand '=' operand */ -#line 987 "bison_parser.y" + case 184: /* comp_expr: operand '=' operand */ +#line 993 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4190 "bison_parser.cpp" +#line 4193 "bison_parser.cpp" break; - case 184: /* comp_expr: operand EQUALS operand */ -#line 988 "bison_parser.y" + case 185: /* comp_expr: operand EQUALS operand */ +#line 994 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4196 "bison_parser.cpp" +#line 4199 "bison_parser.cpp" break; - case 185: /* comp_expr: operand NOTEQUALS operand */ -#line 989 "bison_parser.y" + case 186: /* comp_expr: operand NOTEQUALS operand */ +#line 995 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 4202 "bison_parser.cpp" +#line 4205 "bison_parser.cpp" break; - case 186: /* comp_expr: operand '<' operand */ -#line 990 "bison_parser.y" + case 187: /* comp_expr: operand '<' operand */ +#line 996 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 4208 "bison_parser.cpp" +#line 4211 "bison_parser.cpp" break; - case 187: /* comp_expr: operand '>' operand */ -#line 991 "bison_parser.y" + case 188: /* comp_expr: operand '>' operand */ +#line 997 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 4214 "bison_parser.cpp" +#line 4217 "bison_parser.cpp" break; - case 188: /* comp_expr: operand LESSEQ operand */ -#line 992 "bison_parser.y" + case 189: /* comp_expr: operand LESSEQ operand */ +#line 998 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 4220 "bison_parser.cpp" +#line 4223 "bison_parser.cpp" break; - case 189: /* comp_expr: operand GREATEREQ operand */ -#line 993 "bison_parser.y" + case 190: /* comp_expr: operand GREATEREQ operand */ +#line 999 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 4226 "bison_parser.cpp" +#line 4229 "bison_parser.cpp" break; - case 190: /* function_expr: IDENTIFIER '(' ')' */ -#line 997 "bison_parser.y" + case 191: /* function_expr: IDENTIFIER '(' ')' */ +#line 1003 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 4232 "bison_parser.cpp" +#line 4235 "bison_parser.cpp" break; - case 191: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ -#line 998 "bison_parser.y" + case 192: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ +#line 1004 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 4238 "bison_parser.cpp" +#line 4241 "bison_parser.cpp" break; - case 192: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ -#line 1002 "bison_parser.y" + case 193: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ +#line 1008 "bison_parser.y" { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } -#line 4244 "bison_parser.cpp" +#line 4247 "bison_parser.cpp" break; - case 193: /* cast_expr: CAST '(' expr AS column_type ')' */ -#line 1006 "bison_parser.y" + case 194: /* cast_expr: CAST '(' expr AS column_type ')' */ +#line 1012 "bison_parser.y" { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } -#line 4250 "bison_parser.cpp" +#line 4253 "bison_parser.cpp" break; - case 194: /* datetime_field: SECOND */ -#line 1010 "bison_parser.y" + case 195: /* datetime_field: SECOND */ +#line 1016 "bison_parser.y" { (yyval.datetime_field) = kDatetimeSecond; } -#line 4256 "bison_parser.cpp" +#line 4259 "bison_parser.cpp" break; - case 195: /* datetime_field: MINUTE */ -#line 1011 "bison_parser.y" + case 196: /* datetime_field: MINUTE */ +#line 1017 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMinute; } -#line 4262 "bison_parser.cpp" +#line 4265 "bison_parser.cpp" break; - case 196: /* datetime_field: HOUR */ -#line 1012 "bison_parser.y" + case 197: /* datetime_field: HOUR */ +#line 1018 "bison_parser.y" { (yyval.datetime_field) = kDatetimeHour; } -#line 4268 "bison_parser.cpp" +#line 4271 "bison_parser.cpp" break; - case 197: /* datetime_field: DAY */ -#line 1013 "bison_parser.y" + case 198: /* datetime_field: DAY */ +#line 1019 "bison_parser.y" { (yyval.datetime_field) = kDatetimeDay; } -#line 4274 "bison_parser.cpp" +#line 4277 "bison_parser.cpp" break; - case 198: /* datetime_field: MONTH */ -#line 1014 "bison_parser.y" + case 199: /* datetime_field: MONTH */ +#line 1020 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMonth; } -#line 4280 "bison_parser.cpp" +#line 4283 "bison_parser.cpp" break; - case 199: /* datetime_field: YEAR */ -#line 1015 "bison_parser.y" + case 200: /* datetime_field: YEAR */ +#line 1021 "bison_parser.y" { (yyval.datetime_field) = kDatetimeYear; } -#line 4286 "bison_parser.cpp" +#line 4289 "bison_parser.cpp" break; - case 200: /* array_expr: ARRAY '[' expr_list ']' */ -#line 1019 "bison_parser.y" + case 201: /* array_expr: ARRAY '[' expr_list ']' */ +#line 1025 "bison_parser.y" { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 4292 "bison_parser.cpp" +#line 4295 "bison_parser.cpp" break; - case 201: /* array_index: operand '[' int_literal ']' */ -#line 1023 "bison_parser.y" + case 202: /* array_index: operand '[' int_literal ']' */ +#line 1029 "bison_parser.y" { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 4298 "bison_parser.cpp" +#line 4301 "bison_parser.cpp" break; - case 202: /* between_expr: operand BETWEEN operand AND operand */ -#line 1027 "bison_parser.y" + case 203: /* between_expr: operand BETWEEN operand AND operand */ +#line 1033 "bison_parser.y" { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4304 "bison_parser.cpp" +#line 4307 "bison_parser.cpp" break; - case 203: /* column_name: IDENTIFIER */ -#line 1031 "bison_parser.y" + case 204: /* column_name: IDENTIFIER */ +#line 1037 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 4310 "bison_parser.cpp" +#line 4313 "bison_parser.cpp" break; - case 204: /* column_name: IDENTIFIER '.' IDENTIFIER */ -#line 1032 "bison_parser.y" + case 205: /* column_name: IDENTIFIER '.' IDENTIFIER */ +#line 1038 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 4316 "bison_parser.cpp" +#line 4319 "bison_parser.cpp" break; - case 205: /* column_name: '*' */ -#line 1033 "bison_parser.y" + case 206: /* column_name: '*' */ +#line 1039 "bison_parser.y" { (yyval.expr) = Expr::makeStar(); } -#line 4322 "bison_parser.cpp" +#line 4325 "bison_parser.cpp" break; - case 206: /* column_name: IDENTIFIER '.' '*' */ -#line 1034 "bison_parser.y" + case 207: /* column_name: IDENTIFIER '.' '*' */ +#line 1040 "bison_parser.y" { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 4328 "bison_parser.cpp" +#line 4331 "bison_parser.cpp" break; - case 212: /* string_literal: STRING */ -#line 1046 "bison_parser.y" + case 213: /* string_literal: STRING */ +#line 1052 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 4334 "bison_parser.cpp" +#line 4337 "bison_parser.cpp" break; - case 213: /* bool_literal: TRUE */ -#line 1050 "bison_parser.y" + case 214: /* bool_literal: TRUE */ +#line 1056 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(true); } -#line 4340 "bison_parser.cpp" +#line 4343 "bison_parser.cpp" break; - case 214: /* bool_literal: FALSE */ -#line 1051 "bison_parser.y" + case 215: /* bool_literal: FALSE */ +#line 1057 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(false); } -#line 4346 "bison_parser.cpp" +#line 4349 "bison_parser.cpp" break; - case 215: /* num_literal: FLOATVAL */ -#line 1055 "bison_parser.y" + case 216: /* num_literal: FLOATVAL */ +#line 1061 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 4352 "bison_parser.cpp" +#line 4355 "bison_parser.cpp" break; - case 217: /* int_literal: INTVAL */ -#line 1060 "bison_parser.y" + case 218: /* int_literal: INTVAL */ +#line 1066 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 4358 "bison_parser.cpp" +#line 4361 "bison_parser.cpp" break; - case 218: /* null_literal: NULL */ -#line 1064 "bison_parser.y" + case 219: /* null_literal: NULL */ +#line 1070 "bison_parser.y" { (yyval.expr) = Expr::makeNullLiteral(); } -#line 4364 "bison_parser.cpp" +#line 4367 "bison_parser.cpp" break; - case 219: /* param_expr: '?' */ -#line 1068 "bison_parser.y" + case 220: /* param_expr: '?' */ +#line 1074 "bison_parser.y" { (yyval.expr) = Expr::makeParameter(yylloc.total_column); (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 4374 "bison_parser.cpp" +#line 4377 "bison_parser.cpp" break; - case 221: /* table_ref: table_ref_commalist ',' table_ref_atomic */ -#line 1081 "bison_parser.y" + case 222: /* table_ref: table_ref_commalist ',' table_ref_atomic */ +#line 1087 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); auto tbl = new TableRef(kTableCrossProduct); tbl->list = (yyvsp[-2].table_vec); (yyval.table) = tbl; } -#line 4385 "bison_parser.cpp" +#line 4388 "bison_parser.cpp" break; - case 225: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ -#line 1097 "bison_parser.y" + case 226: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ +#line 1103 "bison_parser.y" { auto tbl = new TableRef(kTableSelect); tbl->select = (yyvsp[-2].select_stmt); tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4396 "bison_parser.cpp" +#line 4399 "bison_parser.cpp" break; - case 226: /* table_ref_commalist: table_ref_atomic */ -#line 1106 "bison_parser.y" + case 227: /* table_ref_commalist: table_ref_atomic */ +#line 1112 "bison_parser.y" { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 4402 "bison_parser.cpp" +#line 4405 "bison_parser.cpp" break; - case 227: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ -#line 1107 "bison_parser.y" + case 228: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ +#line 1113 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 4408 "bison_parser.cpp" +#line 4411 "bison_parser.cpp" break; - case 228: /* table_ref_name: table_name opt_table_alias */ -#line 1112 "bison_parser.y" + case 229: /* table_ref_name: table_name opt_table_alias */ +#line 1118 "bison_parser.y" { auto tbl = new TableRef(kTableName); tbl->schema = (yyvsp[-1].table_name).schema; @@ -4416,115 +4419,121 @@ YYLTYPE yylloc = yyloc_default; tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4420 "bison_parser.cpp" +#line 4423 "bison_parser.cpp" break; - case 229: /* table_ref_name_no_alias: table_name */ -#line 1123 "bison_parser.y" + case 230: /* table_ref_name_no_alias: table_name */ +#line 1129 "bison_parser.y" { (yyval.table) = new TableRef(kTableName); (yyval.table)->schema = (yyvsp[0].table_name).schema; (yyval.table)->name = (yyvsp[0].table_name).name; } -#line 4430 "bison_parser.cpp" +#line 4433 "bison_parser.cpp" break; - case 230: /* table_name: IDENTIFIER */ -#line 1132 "bison_parser.y" + case 231: /* table_name: IDENTIFIER */ +#line 1138 "bison_parser.y" { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} -#line 4436 "bison_parser.cpp" +#line 4439 "bison_parser.cpp" break; - case 231: /* table_name: IDENTIFIER '.' IDENTIFIER */ -#line 1133 "bison_parser.y" + case 232: /* table_name: IDENTIFIER '.' IDENTIFIER */ +#line 1139 "bison_parser.y" { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } -#line 4442 "bison_parser.cpp" +#line 4445 "bison_parser.cpp" break; - case 232: /* opt_index_name: IDENTIFIER */ -#line 1137 "bison_parser.y" + case 233: /* opt_index_name: IDENTIFIER */ +#line 1143 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4448 "bison_parser.cpp" +#line 4451 "bison_parser.cpp" break; - case 233: /* opt_index_name: %empty */ -#line 1138 "bison_parser.y" + case 234: /* opt_index_name: %empty */ +#line 1144 "bison_parser.y" { (yyval.sval) = nullptr;} -#line 4454 "bison_parser.cpp" +#line 4457 "bison_parser.cpp" break; - case 235: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ -#line 1144 "bison_parser.y" + case 235: /* index_name: IDENTIFIER */ +#line 1148 "bison_parser.y" + { (yyval.sval) = (yyvsp[0].sval);} +#line 4463 "bison_parser.cpp" + break; + + case 237: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ +#line 1154 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } -#line 4460 "bison_parser.cpp" +#line 4469 "bison_parser.cpp" break; - case 237: /* opt_table_alias: %empty */ -#line 1150 "bison_parser.y" + case 239: /* opt_table_alias: %empty */ +#line 1160 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4466 "bison_parser.cpp" +#line 4475 "bison_parser.cpp" break; - case 238: /* alias: AS IDENTIFIER */ -#line 1155 "bison_parser.y" + case 240: /* alias: AS IDENTIFIER */ +#line 1165 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4472 "bison_parser.cpp" +#line 4481 "bison_parser.cpp" break; - case 239: /* alias: IDENTIFIER */ -#line 1156 "bison_parser.y" + case 241: /* alias: IDENTIFIER */ +#line 1166 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4478 "bison_parser.cpp" +#line 4487 "bison_parser.cpp" break; - case 241: /* opt_alias: %empty */ -#line 1162 "bison_parser.y" + case 243: /* opt_alias: %empty */ +#line 1172 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4484 "bison_parser.cpp" +#line 4493 "bison_parser.cpp" break; - case 243: /* opt_with_clause: %empty */ -#line 1172 "bison_parser.y" + case 245: /* opt_with_clause: %empty */ +#line 1182 "bison_parser.y" { (yyval.with_description_vec) = nullptr; } -#line 4490 "bison_parser.cpp" +#line 4499 "bison_parser.cpp" break; - case 244: /* with_clause: WITH with_description_list */ -#line 1176 "bison_parser.y" + case 246: /* with_clause: WITH with_description_list */ +#line 1186 "bison_parser.y" { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } -#line 4496 "bison_parser.cpp" +#line 4505 "bison_parser.cpp" break; - case 245: /* with_description_list: with_description */ -#line 1180 "bison_parser.y" + case 247: /* with_description_list: with_description */ +#line 1190 "bison_parser.y" { (yyval.with_description_vec) = new std::vector(); (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); } -#line 4505 "bison_parser.cpp" +#line 4514 "bison_parser.cpp" break; - case 246: /* with_description_list: with_description_list ',' with_description */ -#line 1184 "bison_parser.y" + case 248: /* with_description_list: with_description_list ',' with_description */ +#line 1194 "bison_parser.y" { (yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t)); (yyval.with_description_vec) = (yyvsp[-2].with_description_vec); } -#line 4514 "bison_parser.cpp" +#line 4523 "bison_parser.cpp" break; - case 247: /* with_description: IDENTIFIER AS select_with_paren */ -#line 1191 "bison_parser.y" + case 249: /* with_description: IDENTIFIER AS select_with_paren */ +#line 1201 "bison_parser.y" { (yyval.with_description_t) = new WithDescription(); (yyval.with_description_t)->alias = (yyvsp[-2].sval); (yyval.with_description_t)->select = (yyvsp[0].select_stmt); } -#line 4524 "bison_parser.cpp" +#line 4533 "bison_parser.cpp" break; - case 248: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ -#line 1205 "bison_parser.y" + case 250: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ +#line 1215 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4532,11 +4541,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 4536 "bison_parser.cpp" +#line 4545 "bison_parser.cpp" break; - case 249: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ -#line 1213 "bison_parser.y" + case 251: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ +#line 1223 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4545,11 +4554,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 4549 "bison_parser.cpp" +#line 4558 "bison_parser.cpp" break; - case 250: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ -#line 1223 "bison_parser.y" + case 252: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ +#line 1233 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4565,83 +4574,83 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } -#line 4569 "bison_parser.cpp" +#line 4578 "bison_parser.cpp" break; - case 251: /* opt_join_type: INNER */ -#line 1241 "bison_parser.y" + case 253: /* opt_join_type: INNER */ +#line 1251 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4575 "bison_parser.cpp" +#line 4584 "bison_parser.cpp" break; - case 252: /* opt_join_type: LEFT OUTER */ -#line 1242 "bison_parser.y" + case 254: /* opt_join_type: LEFT OUTER */ +#line 1252 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4581 "bison_parser.cpp" +#line 4590 "bison_parser.cpp" break; - case 253: /* opt_join_type: LEFT */ -#line 1243 "bison_parser.y" + case 255: /* opt_join_type: LEFT */ +#line 1253 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4587 "bison_parser.cpp" +#line 4596 "bison_parser.cpp" break; - case 254: /* opt_join_type: RIGHT OUTER */ -#line 1244 "bison_parser.y" + case 256: /* opt_join_type: RIGHT OUTER */ +#line 1254 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4593 "bison_parser.cpp" +#line 4602 "bison_parser.cpp" break; - case 255: /* opt_join_type: RIGHT */ -#line 1245 "bison_parser.y" + case 257: /* opt_join_type: RIGHT */ +#line 1255 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4599 "bison_parser.cpp" +#line 4608 "bison_parser.cpp" break; - case 256: /* opt_join_type: FULL OUTER */ -#line 1246 "bison_parser.y" + case 258: /* opt_join_type: FULL OUTER */ +#line 1256 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4605 "bison_parser.cpp" +#line 4614 "bison_parser.cpp" break; - case 257: /* opt_join_type: OUTER */ -#line 1247 "bison_parser.y" + case 259: /* opt_join_type: OUTER */ +#line 1257 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4611 "bison_parser.cpp" +#line 4620 "bison_parser.cpp" break; - case 258: /* opt_join_type: FULL */ -#line 1248 "bison_parser.y" + case 260: /* opt_join_type: FULL */ +#line 1258 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4617 "bison_parser.cpp" +#line 4626 "bison_parser.cpp" break; - case 259: /* opt_join_type: CROSS */ -#line 1249 "bison_parser.y" + case 261: /* opt_join_type: CROSS */ +#line 1259 "bison_parser.y" { (yyval.uval) = kJoinCross; } -#line 4623 "bison_parser.cpp" +#line 4632 "bison_parser.cpp" break; - case 260: /* opt_join_type: %empty */ -#line 1250 "bison_parser.y" + case 262: /* opt_join_type: %empty */ +#line 1260 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4629 "bison_parser.cpp" +#line 4638 "bison_parser.cpp" break; - case 264: /* ident_commalist: IDENTIFIER */ -#line 1270 "bison_parser.y" + case 266: /* ident_commalist: IDENTIFIER */ +#line 1280 "bison_parser.y" { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 4635 "bison_parser.cpp" +#line 4644 "bison_parser.cpp" break; - case 265: /* ident_commalist: ident_commalist ',' IDENTIFIER */ -#line 1271 "bison_parser.y" + case 267: /* ident_commalist: ident_commalist ',' IDENTIFIER */ +#line 1281 "bison_parser.y" { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 4641 "bison_parser.cpp" +#line 4650 "bison_parser.cpp" break; -#line 4645 "bison_parser.cpp" +#line 4654 "bison_parser.cpp" default: break; } @@ -4871,7 +4880,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 1274 "bison_parser.y" +#line 1284 "bison_parser.y" /********************************* ** Section 4: Additional C code diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 35fbae18..72081894 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -202,7 +202,8 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha %type drop_statement %type show_statement %type table_name -%type opt_index_name +%type opt_index_name +%type index_name %type file_path prepare_target_query %type opt_not_exists opt_exists opt_distinct opt_column_nullable opt_all %type opt_join_type @@ -603,6 +604,11 @@ drop_statement: $$->ifExists = false; $$->name = $3; } + | DROP INDEX index_name ON table_name { + $$ = new DropStatement(kDropIndex); + $$->name = $5.name; + $$->index_name = $3; + } ; opt_exists: @@ -1138,6 +1144,10 @@ opt_index_name: | /* empty */ { $$ = nullptr;} ; +index_name: + IDENTIFIER { $$ = $1;} + ; + table_alias: alias diff --git a/src/sql/DropStatement.h b/src/sql/DropStatement.h index dace494a..dc099f01 100755 --- a/src/sql/DropStatement.h +++ b/src/sql/DropStatement.h @@ -25,6 +25,7 @@ namespace hsql { bool ifExists; char* schema; char* name; + char* index_name; }; } // namespace hsql From 2d7d347dfd425dc89a2b66f1864e5893f5121708 Mon Sep 17 00:00:00 2001 From: simonstadlinger Date: Sat, 3 Jul 2021 15:38:30 +0200 Subject: [PATCH 04/73] Add character varying --- src/parser/bison_parser.cpp | 2708 ++++++++++++++++++----------------- src/parser/bison_parser.h | 250 ++-- src/parser/bison_parser.y | 3 +- src/parser/flex_lexer.cpp | 2224 ++++++++++++++-------------- src/parser/flex_lexer.h | 2 +- src/parser/flex_lexer.l | 2 + 6 files changed, 2630 insertions(+), 2559 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 033a5498..32fd1faa 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -160,254 +160,256 @@ enum yysymbol_kind_t YYSYMBOL_PREPARE = 26, /* PREPARE */ YYSYMBOL_PRIMARY = 27, /* PRIMARY */ YYSYMBOL_SCHEMAS = 28, /* SCHEMAS */ - YYSYMBOL_SPATIAL = 29, /* SPATIAL */ - YYSYMBOL_VARCHAR = 30, /* VARCHAR */ - YYSYMBOL_VIRTUAL = 31, /* VIRTUAL */ - YYSYMBOL_DESCRIBE = 32, /* DESCRIBE */ - YYSYMBOL_BEFORE = 33, /* BEFORE */ - YYSYMBOL_COLUMN = 34, /* COLUMN */ - YYSYMBOL_CREATE = 35, /* CREATE */ - YYSYMBOL_DELETE = 36, /* DELETE */ - YYSYMBOL_DIRECT = 37, /* DIRECT */ - YYSYMBOL_DOUBLE = 38, /* DOUBLE */ - YYSYMBOL_ESCAPE = 39, /* ESCAPE */ - YYSYMBOL_EXCEPT = 40, /* EXCEPT */ - YYSYMBOL_EXISTS = 41, /* EXISTS */ - YYSYMBOL_EXTRACT = 42, /* EXTRACT */ - YYSYMBOL_CAST = 43, /* CAST */ - YYSYMBOL_FORMAT = 44, /* FORMAT */ - YYSYMBOL_GLOBAL = 45, /* GLOBAL */ - YYSYMBOL_HAVING = 46, /* HAVING */ - YYSYMBOL_IMPORT = 47, /* IMPORT */ - YYSYMBOL_INSERT = 48, /* INSERT */ - YYSYMBOL_ISNULL = 49, /* ISNULL */ - YYSYMBOL_OFFSET = 50, /* OFFSET */ - YYSYMBOL_RENAME = 51, /* RENAME */ - YYSYMBOL_SCHEMA = 52, /* SCHEMA */ - YYSYMBOL_SELECT = 53, /* SELECT */ - YYSYMBOL_SORTED = 54, /* SORTED */ - YYSYMBOL_TABLES = 55, /* TABLES */ - YYSYMBOL_UNIQUE = 56, /* UNIQUE */ - YYSYMBOL_UNLOAD = 57, /* UNLOAD */ - YYSYMBOL_UPDATE = 58, /* UPDATE */ - YYSYMBOL_VALUES = 59, /* VALUES */ - YYSYMBOL_AFTER = 60, /* AFTER */ - YYSYMBOL_ALTER = 61, /* ALTER */ - YYSYMBOL_CROSS = 62, /* CROSS */ - YYSYMBOL_DELTA = 63, /* DELTA */ - YYSYMBOL_FLOAT = 64, /* FLOAT */ - YYSYMBOL_GROUP = 65, /* GROUP */ - YYSYMBOL_INDEX = 66, /* INDEX */ - YYSYMBOL_INNER = 67, /* INNER */ - YYSYMBOL_LIMIT = 68, /* LIMIT */ - YYSYMBOL_LOCAL = 69, /* LOCAL */ - YYSYMBOL_MERGE = 70, /* MERGE */ - YYSYMBOL_MINUS = 71, /* MINUS */ - YYSYMBOL_ORDER = 72, /* ORDER */ - YYSYMBOL_OUTER = 73, /* OUTER */ - YYSYMBOL_RIGHT = 74, /* RIGHT */ - YYSYMBOL_TABLE = 75, /* TABLE */ - YYSYMBOL_UNION = 76, /* UNION */ - YYSYMBOL_USING = 77, /* USING */ - YYSYMBOL_WHERE = 78, /* WHERE */ - YYSYMBOL_CALL = 79, /* CALL */ - YYSYMBOL_CASE = 80, /* CASE */ - YYSYMBOL_CHAR = 81, /* CHAR */ - YYSYMBOL_COPY = 82, /* COPY */ - YYSYMBOL_DATE = 83, /* DATE */ - YYSYMBOL_DATETIME = 84, /* DATETIME */ - YYSYMBOL_DESC = 85, /* DESC */ - YYSYMBOL_DROP = 86, /* DROP */ - YYSYMBOL_ELSE = 87, /* ELSE */ - YYSYMBOL_FILE = 88, /* FILE */ - YYSYMBOL_FROM = 89, /* FROM */ - YYSYMBOL_FULL = 90, /* FULL */ - YYSYMBOL_HASH = 91, /* HASH */ - YYSYMBOL_HINT = 92, /* HINT */ - YYSYMBOL_INTO = 93, /* INTO */ - YYSYMBOL_JOIN = 94, /* JOIN */ - YYSYMBOL_LEFT = 95, /* LEFT */ - YYSYMBOL_LIKE = 96, /* LIKE */ - YYSYMBOL_LOAD = 97, /* LOAD */ - YYSYMBOL_LONG = 98, /* LONG */ - YYSYMBOL_NULL = 99, /* NULL */ - YYSYMBOL_PLAN = 100, /* PLAN */ - YYSYMBOL_SHOW = 101, /* SHOW */ - YYSYMBOL_TEXT = 102, /* TEXT */ - YYSYMBOL_THEN = 103, /* THEN */ - YYSYMBOL_TIME = 104, /* TIME */ - YYSYMBOL_VIEW = 105, /* VIEW */ - YYSYMBOL_WHEN = 106, /* WHEN */ - YYSYMBOL_WITH = 107, /* WITH */ - YYSYMBOL_ADD = 108, /* ADD */ - YYSYMBOL_ALL = 109, /* ALL */ - YYSYMBOL_AND = 110, /* AND */ - YYSYMBOL_ASC = 111, /* ASC */ - YYSYMBOL_END = 112, /* END */ - YYSYMBOL_FOR = 113, /* FOR */ - YYSYMBOL_INT = 114, /* INT */ - YYSYMBOL_KEY = 115, /* KEY */ - YYSYMBOL_NOT = 116, /* NOT */ - YYSYMBOL_OFF = 117, /* OFF */ - YYSYMBOL_SET = 118, /* SET */ - YYSYMBOL_TOP = 119, /* TOP */ - YYSYMBOL_AS = 120, /* AS */ - YYSYMBOL_BY = 121, /* BY */ - YYSYMBOL_IF = 122, /* IF */ - YYSYMBOL_IN = 123, /* IN */ - YYSYMBOL_IS = 124, /* IS */ - YYSYMBOL_OF = 125, /* OF */ - YYSYMBOL_ON = 126, /* ON */ - YYSYMBOL_OR = 127, /* OR */ - YYSYMBOL_TO = 128, /* TO */ - YYSYMBOL_ARRAY = 129, /* ARRAY */ - YYSYMBOL_CONCAT = 130, /* CONCAT */ - YYSYMBOL_ILIKE = 131, /* ILIKE */ - YYSYMBOL_SECOND = 132, /* SECOND */ - YYSYMBOL_MINUTE = 133, /* MINUTE */ - YYSYMBOL_HOUR = 134, /* HOUR */ - YYSYMBOL_DAY = 135, /* DAY */ - YYSYMBOL_MONTH = 136, /* MONTH */ - YYSYMBOL_YEAR = 137, /* YEAR */ - YYSYMBOL_TRUE = 138, /* TRUE */ - YYSYMBOL_FALSE = 139, /* FALSE */ - YYSYMBOL_TRANSACTION = 140, /* TRANSACTION */ - YYSYMBOL_BEGIN = 141, /* BEGIN */ - YYSYMBOL_COMMIT = 142, /* COMMIT */ - YYSYMBOL_ROLLBACK = 143, /* ROLLBACK */ - YYSYMBOL_144_ = 144, /* '=' */ - YYSYMBOL_EQUALS = 145, /* EQUALS */ - YYSYMBOL_NOTEQUALS = 146, /* NOTEQUALS */ - YYSYMBOL_147_ = 147, /* '<' */ - YYSYMBOL_148_ = 148, /* '>' */ - YYSYMBOL_LESS = 149, /* LESS */ - YYSYMBOL_GREATER = 150, /* GREATER */ - YYSYMBOL_LESSEQ = 151, /* LESSEQ */ - YYSYMBOL_GREATEREQ = 152, /* GREATEREQ */ - YYSYMBOL_NOTNULL = 153, /* NOTNULL */ - YYSYMBOL_154_ = 154, /* '+' */ - YYSYMBOL_155_ = 155, /* '-' */ - YYSYMBOL_156_ = 156, /* '*' */ - YYSYMBOL_157_ = 157, /* '/' */ - YYSYMBOL_158_ = 158, /* '%' */ - YYSYMBOL_159_ = 159, /* '^' */ - YYSYMBOL_UMINUS = 160, /* UMINUS */ - YYSYMBOL_161_ = 161, /* '[' */ - YYSYMBOL_162_ = 162, /* ']' */ - YYSYMBOL_163_ = 163, /* '(' */ - YYSYMBOL_164_ = 164, /* ')' */ - YYSYMBOL_165_ = 165, /* '.' */ - YYSYMBOL_166_ = 166, /* ';' */ - YYSYMBOL_167_ = 167, /* ',' */ - YYSYMBOL_168_ = 168, /* '?' */ - YYSYMBOL_YYACCEPT = 169, /* $accept */ - YYSYMBOL_input = 170, /* input */ - YYSYMBOL_statement_list = 171, /* statement_list */ - YYSYMBOL_statement = 172, /* statement */ - YYSYMBOL_preparable_statement = 173, /* preparable_statement */ - YYSYMBOL_opt_hints = 174, /* opt_hints */ - YYSYMBOL_hint_list = 175, /* hint_list */ - YYSYMBOL_hint = 176, /* hint */ - YYSYMBOL_transaction_statement = 177, /* transaction_statement */ - YYSYMBOL_opt_transaction_keyword = 178, /* opt_transaction_keyword */ - YYSYMBOL_prepare_statement = 179, /* prepare_statement */ - YYSYMBOL_prepare_target_query = 180, /* prepare_target_query */ - YYSYMBOL_execute_statement = 181, /* execute_statement */ - YYSYMBOL_import_statement = 182, /* import_statement */ - YYSYMBOL_file_type = 183, /* file_type */ - YYSYMBOL_file_path = 184, /* file_path */ - YYSYMBOL_opt_file_type = 185, /* opt_file_type */ - YYSYMBOL_export_statement = 186, /* export_statement */ - YYSYMBOL_show_statement = 187, /* show_statement */ - YYSYMBOL_create_statement = 188, /* create_statement */ - YYSYMBOL_opt_not_exists = 189, /* opt_not_exists */ - YYSYMBOL_column_def_commalist = 190, /* column_def_commalist */ - YYSYMBOL_column_def = 191, /* column_def */ - YYSYMBOL_column_type = 192, /* column_type */ - YYSYMBOL_opt_column_nullable = 193, /* opt_column_nullable */ - YYSYMBOL_drop_statement = 194, /* drop_statement */ - YYSYMBOL_opt_exists = 195, /* opt_exists */ - YYSYMBOL_delete_statement = 196, /* delete_statement */ - YYSYMBOL_truncate_statement = 197, /* truncate_statement */ - YYSYMBOL_insert_statement = 198, /* insert_statement */ - YYSYMBOL_opt_column_list = 199, /* opt_column_list */ - YYSYMBOL_update_statement = 200, /* update_statement */ - YYSYMBOL_update_clause_commalist = 201, /* update_clause_commalist */ - YYSYMBOL_update_clause = 202, /* update_clause */ - YYSYMBOL_select_statement = 203, /* select_statement */ - YYSYMBOL_select_within_set_operation = 204, /* select_within_set_operation */ - YYSYMBOL_select_within_set_operation_no_parentheses = 205, /* select_within_set_operation_no_parentheses */ - YYSYMBOL_select_with_paren = 206, /* select_with_paren */ - YYSYMBOL_select_no_paren = 207, /* select_no_paren */ - YYSYMBOL_set_operator = 208, /* set_operator */ - YYSYMBOL_set_type = 209, /* set_type */ - YYSYMBOL_opt_all = 210, /* opt_all */ - YYSYMBOL_select_clause = 211, /* select_clause */ - YYSYMBOL_opt_distinct = 212, /* opt_distinct */ - YYSYMBOL_select_list = 213, /* select_list */ - YYSYMBOL_opt_from_clause = 214, /* opt_from_clause */ - YYSYMBOL_from_clause = 215, /* from_clause */ - YYSYMBOL_opt_where = 216, /* opt_where */ - YYSYMBOL_opt_group = 217, /* opt_group */ - YYSYMBOL_opt_having = 218, /* opt_having */ - YYSYMBOL_opt_order = 219, /* opt_order */ - YYSYMBOL_order_list = 220, /* order_list */ - YYSYMBOL_order_desc = 221, /* order_desc */ - YYSYMBOL_opt_order_type = 222, /* opt_order_type */ - YYSYMBOL_opt_top = 223, /* opt_top */ - YYSYMBOL_opt_limit = 224, /* opt_limit */ - YYSYMBOL_expr_list = 225, /* expr_list */ - YYSYMBOL_opt_literal_list = 226, /* opt_literal_list */ - YYSYMBOL_literal_list = 227, /* literal_list */ - YYSYMBOL_expr_alias = 228, /* expr_alias */ - YYSYMBOL_expr = 229, /* expr */ - YYSYMBOL_operand = 230, /* operand */ - YYSYMBOL_scalar_expr = 231, /* scalar_expr */ - YYSYMBOL_unary_expr = 232, /* unary_expr */ - YYSYMBOL_binary_expr = 233, /* binary_expr */ - YYSYMBOL_logic_expr = 234, /* logic_expr */ - YYSYMBOL_in_expr = 235, /* in_expr */ - YYSYMBOL_case_expr = 236, /* case_expr */ - YYSYMBOL_case_list = 237, /* case_list */ - YYSYMBOL_exists_expr = 238, /* exists_expr */ - YYSYMBOL_comp_expr = 239, /* comp_expr */ - YYSYMBOL_function_expr = 240, /* function_expr */ - YYSYMBOL_extract_expr = 241, /* extract_expr */ - YYSYMBOL_cast_expr = 242, /* cast_expr */ - YYSYMBOL_datetime_field = 243, /* datetime_field */ - YYSYMBOL_array_expr = 244, /* array_expr */ - YYSYMBOL_array_index = 245, /* array_index */ - YYSYMBOL_between_expr = 246, /* between_expr */ - YYSYMBOL_column_name = 247, /* column_name */ - YYSYMBOL_literal = 248, /* literal */ - YYSYMBOL_string_literal = 249, /* string_literal */ - YYSYMBOL_bool_literal = 250, /* bool_literal */ - YYSYMBOL_num_literal = 251, /* num_literal */ - YYSYMBOL_int_literal = 252, /* int_literal */ - YYSYMBOL_null_literal = 253, /* null_literal */ - YYSYMBOL_param_expr = 254, /* param_expr */ - YYSYMBOL_table_ref = 255, /* table_ref */ - YYSYMBOL_table_ref_atomic = 256, /* table_ref_atomic */ - YYSYMBOL_nonjoin_table_ref_atomic = 257, /* nonjoin_table_ref_atomic */ - YYSYMBOL_table_ref_commalist = 258, /* table_ref_commalist */ - YYSYMBOL_table_ref_name = 259, /* table_ref_name */ - YYSYMBOL_table_ref_name_no_alias = 260, /* table_ref_name_no_alias */ - YYSYMBOL_table_name = 261, /* table_name */ - YYSYMBOL_opt_index_name = 262, /* opt_index_name */ - YYSYMBOL_index_name = 263, /* index_name */ - YYSYMBOL_table_alias = 264, /* table_alias */ - YYSYMBOL_opt_table_alias = 265, /* opt_table_alias */ - YYSYMBOL_alias = 266, /* alias */ - YYSYMBOL_opt_alias = 267, /* opt_alias */ - YYSYMBOL_opt_with_clause = 268, /* opt_with_clause */ - YYSYMBOL_with_clause = 269, /* with_clause */ - YYSYMBOL_with_description_list = 270, /* with_description_list */ - YYSYMBOL_with_description = 271, /* with_description */ - YYSYMBOL_join_clause = 272, /* join_clause */ - YYSYMBOL_opt_join_type = 273, /* opt_join_type */ - YYSYMBOL_join_condition = 274, /* join_condition */ - YYSYMBOL_opt_semicolon = 275, /* opt_semicolon */ - YYSYMBOL_ident_commalist = 276 /* ident_commalist */ + YYSYMBOL_CHARACTER = 29, /* CHARACTER */ + YYSYMBOL_VARYING = 30, /* VARYING */ + YYSYMBOL_SPATIAL = 31, /* SPATIAL */ + YYSYMBOL_VARCHAR = 32, /* VARCHAR */ + YYSYMBOL_VIRTUAL = 33, /* VIRTUAL */ + YYSYMBOL_DESCRIBE = 34, /* DESCRIBE */ + YYSYMBOL_BEFORE = 35, /* BEFORE */ + YYSYMBOL_COLUMN = 36, /* COLUMN */ + YYSYMBOL_CREATE = 37, /* CREATE */ + YYSYMBOL_DELETE = 38, /* DELETE */ + YYSYMBOL_DIRECT = 39, /* DIRECT */ + YYSYMBOL_DOUBLE = 40, /* DOUBLE */ + YYSYMBOL_ESCAPE = 41, /* ESCAPE */ + YYSYMBOL_EXCEPT = 42, /* EXCEPT */ + YYSYMBOL_EXISTS = 43, /* EXISTS */ + YYSYMBOL_EXTRACT = 44, /* EXTRACT */ + YYSYMBOL_CAST = 45, /* CAST */ + YYSYMBOL_FORMAT = 46, /* FORMAT */ + YYSYMBOL_GLOBAL = 47, /* GLOBAL */ + YYSYMBOL_HAVING = 48, /* HAVING */ + YYSYMBOL_IMPORT = 49, /* IMPORT */ + YYSYMBOL_INSERT = 50, /* INSERT */ + YYSYMBOL_ISNULL = 51, /* ISNULL */ + YYSYMBOL_OFFSET = 52, /* OFFSET */ + YYSYMBOL_RENAME = 53, /* RENAME */ + YYSYMBOL_SCHEMA = 54, /* SCHEMA */ + YYSYMBOL_SELECT = 55, /* SELECT */ + YYSYMBOL_SORTED = 56, /* SORTED */ + YYSYMBOL_TABLES = 57, /* TABLES */ + YYSYMBOL_UNIQUE = 58, /* UNIQUE */ + YYSYMBOL_UNLOAD = 59, /* UNLOAD */ + YYSYMBOL_UPDATE = 60, /* UPDATE */ + YYSYMBOL_VALUES = 61, /* VALUES */ + YYSYMBOL_AFTER = 62, /* AFTER */ + YYSYMBOL_ALTER = 63, /* ALTER */ + YYSYMBOL_CROSS = 64, /* CROSS */ + YYSYMBOL_DELTA = 65, /* DELTA */ + YYSYMBOL_FLOAT = 66, /* FLOAT */ + YYSYMBOL_GROUP = 67, /* GROUP */ + YYSYMBOL_INDEX = 68, /* INDEX */ + YYSYMBOL_INNER = 69, /* INNER */ + YYSYMBOL_LIMIT = 70, /* LIMIT */ + YYSYMBOL_LOCAL = 71, /* LOCAL */ + YYSYMBOL_MERGE = 72, /* MERGE */ + YYSYMBOL_MINUS = 73, /* MINUS */ + YYSYMBOL_ORDER = 74, /* ORDER */ + YYSYMBOL_OUTER = 75, /* OUTER */ + YYSYMBOL_RIGHT = 76, /* RIGHT */ + YYSYMBOL_TABLE = 77, /* TABLE */ + YYSYMBOL_UNION = 78, /* UNION */ + YYSYMBOL_USING = 79, /* USING */ + YYSYMBOL_WHERE = 80, /* WHERE */ + YYSYMBOL_CALL = 81, /* CALL */ + YYSYMBOL_CASE = 82, /* CASE */ + YYSYMBOL_CHAR = 83, /* CHAR */ + YYSYMBOL_COPY = 84, /* COPY */ + YYSYMBOL_DATE = 85, /* DATE */ + YYSYMBOL_DATETIME = 86, /* DATETIME */ + YYSYMBOL_DESC = 87, /* DESC */ + YYSYMBOL_DROP = 88, /* DROP */ + YYSYMBOL_ELSE = 89, /* ELSE */ + YYSYMBOL_FILE = 90, /* FILE */ + YYSYMBOL_FROM = 91, /* FROM */ + YYSYMBOL_FULL = 92, /* FULL */ + YYSYMBOL_HASH = 93, /* HASH */ + YYSYMBOL_HINT = 94, /* HINT */ + YYSYMBOL_INTO = 95, /* INTO */ + YYSYMBOL_JOIN = 96, /* JOIN */ + YYSYMBOL_LEFT = 97, /* LEFT */ + YYSYMBOL_LIKE = 98, /* LIKE */ + YYSYMBOL_LOAD = 99, /* LOAD */ + YYSYMBOL_LONG = 100, /* LONG */ + YYSYMBOL_NULL = 101, /* NULL */ + YYSYMBOL_PLAN = 102, /* PLAN */ + YYSYMBOL_SHOW = 103, /* SHOW */ + YYSYMBOL_TEXT = 104, /* TEXT */ + YYSYMBOL_THEN = 105, /* THEN */ + YYSYMBOL_TIME = 106, /* TIME */ + YYSYMBOL_VIEW = 107, /* VIEW */ + YYSYMBOL_WHEN = 108, /* WHEN */ + YYSYMBOL_WITH = 109, /* WITH */ + YYSYMBOL_ADD = 110, /* ADD */ + YYSYMBOL_ALL = 111, /* ALL */ + YYSYMBOL_AND = 112, /* AND */ + YYSYMBOL_ASC = 113, /* ASC */ + YYSYMBOL_END = 114, /* END */ + YYSYMBOL_FOR = 115, /* FOR */ + YYSYMBOL_INT = 116, /* INT */ + YYSYMBOL_KEY = 117, /* KEY */ + YYSYMBOL_NOT = 118, /* NOT */ + YYSYMBOL_OFF = 119, /* OFF */ + YYSYMBOL_SET = 120, /* SET */ + YYSYMBOL_TOP = 121, /* TOP */ + YYSYMBOL_AS = 122, /* AS */ + YYSYMBOL_BY = 123, /* BY */ + YYSYMBOL_IF = 124, /* IF */ + YYSYMBOL_IN = 125, /* IN */ + YYSYMBOL_IS = 126, /* IS */ + YYSYMBOL_OF = 127, /* OF */ + YYSYMBOL_ON = 128, /* ON */ + YYSYMBOL_OR = 129, /* OR */ + YYSYMBOL_TO = 130, /* TO */ + YYSYMBOL_ARRAY = 131, /* ARRAY */ + YYSYMBOL_CONCAT = 132, /* CONCAT */ + YYSYMBOL_ILIKE = 133, /* ILIKE */ + YYSYMBOL_SECOND = 134, /* SECOND */ + YYSYMBOL_MINUTE = 135, /* MINUTE */ + YYSYMBOL_HOUR = 136, /* HOUR */ + YYSYMBOL_DAY = 137, /* DAY */ + YYSYMBOL_MONTH = 138, /* MONTH */ + YYSYMBOL_YEAR = 139, /* YEAR */ + YYSYMBOL_TRUE = 140, /* TRUE */ + YYSYMBOL_FALSE = 141, /* FALSE */ + YYSYMBOL_TRANSACTION = 142, /* TRANSACTION */ + YYSYMBOL_BEGIN = 143, /* BEGIN */ + YYSYMBOL_COMMIT = 144, /* COMMIT */ + YYSYMBOL_ROLLBACK = 145, /* ROLLBACK */ + YYSYMBOL_146_ = 146, /* '=' */ + YYSYMBOL_EQUALS = 147, /* EQUALS */ + YYSYMBOL_NOTEQUALS = 148, /* NOTEQUALS */ + YYSYMBOL_149_ = 149, /* '<' */ + YYSYMBOL_150_ = 150, /* '>' */ + YYSYMBOL_LESS = 151, /* LESS */ + YYSYMBOL_GREATER = 152, /* GREATER */ + YYSYMBOL_LESSEQ = 153, /* LESSEQ */ + YYSYMBOL_GREATEREQ = 154, /* GREATEREQ */ + YYSYMBOL_NOTNULL = 155, /* NOTNULL */ + YYSYMBOL_156_ = 156, /* '+' */ + YYSYMBOL_157_ = 157, /* '-' */ + YYSYMBOL_158_ = 158, /* '*' */ + YYSYMBOL_159_ = 159, /* '/' */ + YYSYMBOL_160_ = 160, /* '%' */ + YYSYMBOL_161_ = 161, /* '^' */ + YYSYMBOL_UMINUS = 162, /* UMINUS */ + YYSYMBOL_163_ = 163, /* '[' */ + YYSYMBOL_164_ = 164, /* ']' */ + YYSYMBOL_165_ = 165, /* '(' */ + YYSYMBOL_166_ = 166, /* ')' */ + YYSYMBOL_167_ = 167, /* '.' */ + YYSYMBOL_168_ = 168, /* ';' */ + YYSYMBOL_169_ = 169, /* ',' */ + YYSYMBOL_170_ = 170, /* '?' */ + YYSYMBOL_YYACCEPT = 171, /* $accept */ + YYSYMBOL_input = 172, /* input */ + YYSYMBOL_statement_list = 173, /* statement_list */ + YYSYMBOL_statement = 174, /* statement */ + YYSYMBOL_preparable_statement = 175, /* preparable_statement */ + YYSYMBOL_opt_hints = 176, /* opt_hints */ + YYSYMBOL_hint_list = 177, /* hint_list */ + YYSYMBOL_hint = 178, /* hint */ + YYSYMBOL_transaction_statement = 179, /* transaction_statement */ + YYSYMBOL_opt_transaction_keyword = 180, /* opt_transaction_keyword */ + YYSYMBOL_prepare_statement = 181, /* prepare_statement */ + YYSYMBOL_prepare_target_query = 182, /* prepare_target_query */ + YYSYMBOL_execute_statement = 183, /* execute_statement */ + YYSYMBOL_import_statement = 184, /* import_statement */ + YYSYMBOL_file_type = 185, /* file_type */ + YYSYMBOL_file_path = 186, /* file_path */ + YYSYMBOL_opt_file_type = 187, /* opt_file_type */ + YYSYMBOL_export_statement = 188, /* export_statement */ + YYSYMBOL_show_statement = 189, /* show_statement */ + YYSYMBOL_create_statement = 190, /* create_statement */ + YYSYMBOL_opt_not_exists = 191, /* opt_not_exists */ + YYSYMBOL_column_def_commalist = 192, /* column_def_commalist */ + YYSYMBOL_column_def = 193, /* column_def */ + YYSYMBOL_column_type = 194, /* column_type */ + YYSYMBOL_opt_column_nullable = 195, /* opt_column_nullable */ + YYSYMBOL_drop_statement = 196, /* drop_statement */ + YYSYMBOL_opt_exists = 197, /* opt_exists */ + YYSYMBOL_delete_statement = 198, /* delete_statement */ + YYSYMBOL_truncate_statement = 199, /* truncate_statement */ + YYSYMBOL_insert_statement = 200, /* insert_statement */ + YYSYMBOL_opt_column_list = 201, /* opt_column_list */ + YYSYMBOL_update_statement = 202, /* update_statement */ + YYSYMBOL_update_clause_commalist = 203, /* update_clause_commalist */ + YYSYMBOL_update_clause = 204, /* update_clause */ + YYSYMBOL_select_statement = 205, /* select_statement */ + YYSYMBOL_select_within_set_operation = 206, /* select_within_set_operation */ + YYSYMBOL_select_within_set_operation_no_parentheses = 207, /* select_within_set_operation_no_parentheses */ + YYSYMBOL_select_with_paren = 208, /* select_with_paren */ + YYSYMBOL_select_no_paren = 209, /* select_no_paren */ + YYSYMBOL_set_operator = 210, /* set_operator */ + YYSYMBOL_set_type = 211, /* set_type */ + YYSYMBOL_opt_all = 212, /* opt_all */ + YYSYMBOL_select_clause = 213, /* select_clause */ + YYSYMBOL_opt_distinct = 214, /* opt_distinct */ + YYSYMBOL_select_list = 215, /* select_list */ + YYSYMBOL_opt_from_clause = 216, /* opt_from_clause */ + YYSYMBOL_from_clause = 217, /* from_clause */ + YYSYMBOL_opt_where = 218, /* opt_where */ + YYSYMBOL_opt_group = 219, /* opt_group */ + YYSYMBOL_opt_having = 220, /* opt_having */ + YYSYMBOL_opt_order = 221, /* opt_order */ + YYSYMBOL_order_list = 222, /* order_list */ + YYSYMBOL_order_desc = 223, /* order_desc */ + YYSYMBOL_opt_order_type = 224, /* opt_order_type */ + YYSYMBOL_opt_top = 225, /* opt_top */ + YYSYMBOL_opt_limit = 226, /* opt_limit */ + YYSYMBOL_expr_list = 227, /* expr_list */ + YYSYMBOL_opt_literal_list = 228, /* opt_literal_list */ + YYSYMBOL_literal_list = 229, /* literal_list */ + YYSYMBOL_expr_alias = 230, /* expr_alias */ + YYSYMBOL_expr = 231, /* expr */ + YYSYMBOL_operand = 232, /* operand */ + YYSYMBOL_scalar_expr = 233, /* scalar_expr */ + YYSYMBOL_unary_expr = 234, /* unary_expr */ + YYSYMBOL_binary_expr = 235, /* binary_expr */ + YYSYMBOL_logic_expr = 236, /* logic_expr */ + YYSYMBOL_in_expr = 237, /* in_expr */ + YYSYMBOL_case_expr = 238, /* case_expr */ + YYSYMBOL_case_list = 239, /* case_list */ + YYSYMBOL_exists_expr = 240, /* exists_expr */ + YYSYMBOL_comp_expr = 241, /* comp_expr */ + YYSYMBOL_function_expr = 242, /* function_expr */ + YYSYMBOL_extract_expr = 243, /* extract_expr */ + YYSYMBOL_cast_expr = 244, /* cast_expr */ + YYSYMBOL_datetime_field = 245, /* datetime_field */ + YYSYMBOL_array_expr = 246, /* array_expr */ + YYSYMBOL_array_index = 247, /* array_index */ + YYSYMBOL_between_expr = 248, /* between_expr */ + YYSYMBOL_column_name = 249, /* column_name */ + YYSYMBOL_literal = 250, /* literal */ + YYSYMBOL_string_literal = 251, /* string_literal */ + YYSYMBOL_bool_literal = 252, /* bool_literal */ + YYSYMBOL_num_literal = 253, /* num_literal */ + YYSYMBOL_int_literal = 254, /* int_literal */ + YYSYMBOL_null_literal = 255, /* null_literal */ + YYSYMBOL_param_expr = 256, /* param_expr */ + YYSYMBOL_table_ref = 257, /* table_ref */ + YYSYMBOL_table_ref_atomic = 258, /* table_ref_atomic */ + YYSYMBOL_nonjoin_table_ref_atomic = 259, /* nonjoin_table_ref_atomic */ + YYSYMBOL_table_ref_commalist = 260, /* table_ref_commalist */ + YYSYMBOL_table_ref_name = 261, /* table_ref_name */ + YYSYMBOL_table_ref_name_no_alias = 262, /* table_ref_name_no_alias */ + YYSYMBOL_table_name = 263, /* table_name */ + YYSYMBOL_opt_index_name = 264, /* opt_index_name */ + YYSYMBOL_index_name = 265, /* index_name */ + YYSYMBOL_table_alias = 266, /* table_alias */ + YYSYMBOL_opt_table_alias = 267, /* opt_table_alias */ + YYSYMBOL_alias = 268, /* alias */ + YYSYMBOL_opt_alias = 269, /* opt_alias */ + YYSYMBOL_opt_with_clause = 270, /* opt_with_clause */ + YYSYMBOL_with_clause = 271, /* with_clause */ + YYSYMBOL_with_description_list = 272, /* with_description_list */ + YYSYMBOL_with_description = 273, /* with_description */ + YYSYMBOL_join_clause = 274, /* join_clause */ + YYSYMBOL_opt_join_type = 275, /* opt_join_type */ + YYSYMBOL_join_condition = 276, /* join_condition */ + YYSYMBOL_opt_semicolon = 277, /* opt_semicolon */ + YYSYMBOL_ident_commalist = 278 /* ident_commalist */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -732,19 +734,19 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 64 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 722 +#define YYLAST 820 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 169 +#define YYNTOKENS 171 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 108 /* YYNRULES -- Number of rules. */ -#define YYNRULES 267 +#define YYNRULES 268 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 488 +#define YYNSTATES 493 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 406 +#define YYMAXUTOK 408 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM @@ -761,13 +763,13 @@ static const yytype_uint8 yytranslate[] = 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 158, 2, 2, - 163, 164, 156, 154, 167, 155, 165, 157, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 166, - 147, 144, 148, 168, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 160, 2, 2, + 165, 166, 158, 156, 169, 157, 167, 159, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 168, + 149, 146, 150, 170, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 161, 2, 162, 159, 2, 2, 2, 2, 2, + 2, 163, 2, 164, 161, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -797,8 +799,8 @@ static const yytype_uint8 yytranslate[] = 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 142, 143, 145, - 146, 149, 150, 151, 152, 153, 160 + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 147, 148, 151, 152, 153, 154, 155, 162 }; #if HSQL_DEBUG @@ -811,27 +813,27 @@ static const yytype_int16 yyrline[] = 392, 399, 402, 406, 420, 426, 435, 452, 456, 459, 468, 482, 485, 490, 504, 517, 524, 531, 538, 549, 550, 554, 555, 559, 565, 566, 567, 568, 569, 570, - 571, 572, 573, 574, 578, 579, 580, 590, 596, 602, - 607, 615, 616, 625, 634, 647, 654, 665, 666, 676, - 685, 686, 690, 702, 706, 710, 724, 725, 728, 729, - 740, 741, 745, 755, 768, 775, 779, 783, 790, 793, - 799, 811, 812, 816, 820, 821, 825, 830, 831, 835, - 840, 844, 845, 849, 850, 854, 855, 859, 863, 864, - 865, 871, 872, 876, 877, 878, 879, 880, 881, 888, - 889, 893, 894, 898, 899, 903, 913, 914, 915, 916, - 917, 921, 922, 923, 924, 925, 926, 927, 928, 929, - 930, 931, 935, 936, 940, 941, 942, 943, 944, 948, + 571, 572, 573, 574, 575, 579, 580, 581, 591, 597, + 603, 608, 616, 617, 626, 635, 648, 655, 666, 667, + 677, 686, 687, 691, 703, 707, 711, 725, 726, 729, + 730, 741, 742, 746, 756, 769, 776, 780, 784, 791, + 794, 800, 812, 813, 817, 821, 822, 826, 831, 832, + 836, 841, 845, 846, 850, 851, 855, 856, 860, 864, + 865, 866, 872, 873, 877, 878, 879, 880, 881, 882, + 889, 890, 894, 895, 899, 900, 904, 914, 915, 916, + 917, 918, 922, 923, 924, 925, 926, 927, 928, 929, + 930, 931, 932, 936, 937, 941, 942, 943, 944, 945, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, - 962, 963, 967, 968, 969, 970, 976, 977, 978, 979, - 983, 984, 988, 989, 993, 994, 995, 996, 997, 998, - 999, 1003, 1004, 1008, 1012, 1016, 1017, 1018, 1019, 1020, - 1021, 1025, 1029, 1033, 1037, 1038, 1039, 1040, 1044, 1045, - 1046, 1047, 1048, 1052, 1056, 1057, 1061, 1062, 1066, 1070, - 1074, 1086, 1087, 1097, 1098, 1102, 1103, 1112, 1113, 1118, - 1129, 1138, 1139, 1143, 1144, 1148, 1153, 1154, 1159, 1160, - 1165, 1166, 1171, 1172, 1181, 1182, 1186, 1190, 1194, 1201, - 1214, 1222, 1232, 1251, 1252, 1253, 1254, 1255, 1256, 1257, - 1258, 1259, 1260, 1265, 1274, 1275, 1280, 1281 + 959, 963, 964, 968, 969, 970, 971, 977, 978, 979, + 980, 984, 985, 989, 990, 994, 995, 996, 997, 998, + 999, 1000, 1004, 1005, 1009, 1013, 1017, 1018, 1019, 1020, + 1021, 1022, 1026, 1030, 1034, 1038, 1039, 1040, 1041, 1045, + 1046, 1047, 1048, 1049, 1053, 1057, 1058, 1062, 1063, 1067, + 1071, 1075, 1087, 1088, 1098, 1099, 1103, 1104, 1113, 1114, + 1119, 1130, 1139, 1140, 1144, 1145, 1149, 1154, 1155, 1160, + 1161, 1166, 1167, 1172, 1173, 1182, 1183, 1187, 1191, 1195, + 1202, 1215, 1223, 1233, 1252, 1253, 1254, 1255, 1256, 1257, + 1258, 1259, 1260, 1261, 1266, 1275, 1276, 1281, 1282 }; #endif @@ -852,30 +854,30 @@ static const char *const yytname[] = "TEMPORARY", "TIMESTAMP", "DISTINCT", "NVARCHAR", "RESTRICT", "TRUNCATE", "ANALYZE", "BETWEEN", "CASCADE", "COLUMNS", "CONTROL", "DEFAULT", "EXECUTE", "EXPLAIN", "INTEGER", "NATURAL", "PREPARE", "PRIMARY", - "SCHEMAS", "SPATIAL", "VARCHAR", "VIRTUAL", "DESCRIBE", "BEFORE", - "COLUMN", "CREATE", "DELETE", "DIRECT", "DOUBLE", "ESCAPE", "EXCEPT", - "EXISTS", "EXTRACT", "CAST", "FORMAT", "GLOBAL", "HAVING", "IMPORT", - "INSERT", "ISNULL", "OFFSET", "RENAME", "SCHEMA", "SELECT", "SORTED", - "TABLES", "UNIQUE", "UNLOAD", "UPDATE", "VALUES", "AFTER", "ALTER", - "CROSS", "DELTA", "FLOAT", "GROUP", "INDEX", "INNER", "LIMIT", "LOCAL", - "MERGE", "MINUS", "ORDER", "OUTER", "RIGHT", "TABLE", "UNION", "USING", - "WHERE", "CALL", "CASE", "CHAR", "COPY", "DATE", "DATETIME", "DESC", - "DROP", "ELSE", "FILE", "FROM", "FULL", "HASH", "HINT", "INTO", "JOIN", - "LEFT", "LIKE", "LOAD", "LONG", "NULL", "PLAN", "SHOW", "TEXT", "THEN", - "TIME", "VIEW", "WHEN", "WITH", "ADD", "ALL", "AND", "ASC", "END", "FOR", - "INT", "KEY", "NOT", "OFF", "SET", "TOP", "AS", "BY", "IF", "IN", "IS", - "OF", "ON", "OR", "TO", "ARRAY", "CONCAT", "ILIKE", "SECOND", "MINUTE", - "HOUR", "DAY", "MONTH", "YEAR", "TRUE", "FALSE", "TRANSACTION", "BEGIN", - "COMMIT", "ROLLBACK", "'='", "EQUALS", "NOTEQUALS", "'<'", "'>'", "LESS", - "GREATER", "LESSEQ", "GREATEREQ", "NOTNULL", "'+'", "'-'", "'*'", "'/'", - "'%'", "'^'", "UMINUS", "'['", "']'", "'('", "')'", "'.'", "';'", "','", - "'?'", "$accept", "input", "statement_list", "statement", - "preparable_statement", "opt_hints", "hint_list", "hint", - "transaction_statement", "opt_transaction_keyword", "prepare_statement", - "prepare_target_query", "execute_statement", "import_statement", - "file_type", "file_path", "opt_file_type", "export_statement", - "show_statement", "create_statement", "opt_not_exists", - "column_def_commalist", "column_def", "column_type", + "SCHEMAS", "CHARACTER", "VARYING", "SPATIAL", "VARCHAR", "VIRTUAL", + "DESCRIBE", "BEFORE", "COLUMN", "CREATE", "DELETE", "DIRECT", "DOUBLE", + "ESCAPE", "EXCEPT", "EXISTS", "EXTRACT", "CAST", "FORMAT", "GLOBAL", + "HAVING", "IMPORT", "INSERT", "ISNULL", "OFFSET", "RENAME", "SCHEMA", + "SELECT", "SORTED", "TABLES", "UNIQUE", "UNLOAD", "UPDATE", "VALUES", + "AFTER", "ALTER", "CROSS", "DELTA", "FLOAT", "GROUP", "INDEX", "INNER", + "LIMIT", "LOCAL", "MERGE", "MINUS", "ORDER", "OUTER", "RIGHT", "TABLE", + "UNION", "USING", "WHERE", "CALL", "CASE", "CHAR", "COPY", "DATE", + "DATETIME", "DESC", "DROP", "ELSE", "FILE", "FROM", "FULL", "HASH", + "HINT", "INTO", "JOIN", "LEFT", "LIKE", "LOAD", "LONG", "NULL", "PLAN", + "SHOW", "TEXT", "THEN", "TIME", "VIEW", "WHEN", "WITH", "ADD", "ALL", + "AND", "ASC", "END", "FOR", "INT", "KEY", "NOT", "OFF", "SET", "TOP", + "AS", "BY", "IF", "IN", "IS", "OF", "ON", "OR", "TO", "ARRAY", "CONCAT", + "ILIKE", "SECOND", "MINUTE", "HOUR", "DAY", "MONTH", "YEAR", "TRUE", + "FALSE", "TRANSACTION", "BEGIN", "COMMIT", "ROLLBACK", "'='", "EQUALS", + "NOTEQUALS", "'<'", "'>'", "LESS", "GREATER", "LESSEQ", "GREATEREQ", + "NOTNULL", "'+'", "'-'", "'*'", "'/'", "'%'", "'^'", "UMINUS", "'['", + "']'", "'('", "')'", "'.'", "';'", "','", "'?'", "$accept", "input", + "statement_list", "statement", "preparable_statement", "opt_hints", + "hint_list", "hint", "transaction_statement", "opt_transaction_keyword", + "prepare_statement", "prepare_target_query", "execute_statement", + "import_statement", "file_type", "file_path", "opt_file_type", + "export_statement", "show_statement", "create_statement", + "opt_not_exists", "column_def_commalist", "column_def", "column_type", "opt_column_nullable", "drop_statement", "opt_exists", "delete_statement", "truncate_statement", "insert_statement", "opt_column_list", "update_statement", "update_clause_commalist", @@ -926,18 +928,19 @@ static const yytype_int16 yytoknum[] = 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, - 395, 396, 397, 398, 61, 399, 400, 60, 62, 401, - 402, 403, 404, 405, 43, 45, 42, 47, 37, 94, - 406, 91, 93, 40, 41, 46, 59, 44, 63 + 395, 396, 397, 398, 399, 400, 61, 401, 402, 60, + 62, 403, 404, 405, 406, 407, 43, 45, 42, 47, + 37, 94, 408, 91, 93, 40, 41, 46, 59, 44, + 63 }; #endif -#define YYPACT_NINF (-369) +#define YYPACT_NINF (-392) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF (-265) +#define YYTABLE_NINF (-266) #define yytable_value_is_error(Yyn) \ ((Yyn) == YYTABLE_NINF) @@ -946,55 +949,56 @@ static const yytype_int16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - 512, -6, 42, 116, 117, 42, -31, 38, 75, 91, - 42, 42, 113, 3, 195, 60, 60, 60, 211, 54, - -369, 114, -369, 114, -369, -369, -369, -369, -369, -369, - -369, -369, -369, -369, -369, -35, -369, 222, 82, -369, - 97, 197, -369, 271, 176, 176, 42, 305, 42, 191, - -369, -68, 310, 192, 192, 42, -369, 196, 148, -369, - -369, -369, -369, -369, -369, 507, -369, 228, -369, -369, - 203, -35, 53, -369, 199, -369, 330, 19, 344, -369, - 176, 234, 42, 42, 277, -369, 272, 221, 356, 360, - 360, -369, 259, 325, 42, 42, -369, 227, 195, -369, - 235, 385, 390, 246, 251, -369, -369, -369, -35, 299, - 295, -35, 29, -369, -369, -369, -369, -369, -369, -369, - -369, 253, 255, -369, -369, -369, -369, -369, -369, -369, - -369, -369, 294, 382, -49, 221, 258, -369, 360, 421, - 244, 281, -44, -369, 322, -369, 322, 42, -369, -369, - -369, -369, -369, 434, -369, -369, 258, -369, -369, 366, - -369, -369, 53, -369, -369, 258, 366, 258, 149, -369, - -369, 19, 42, -369, 436, 333, 438, 323, -87, 279, - 283, 284, 190, 289, 287, 320, -369, 238, 103, 354, - -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, - -369, -369, -369, -369, -369, -369, 358, -369, 180, 290, - -369, 258, 356, -369, 410, -369, -369, -369, 292, 185, - -369, 367, 293, -369, 36, 29, -35, 296, -369, -22, - 29, 103, 411, -12, -369, 301, 374, -369, 297, 201, - -369, 333, 4, 11, 412, 298, 258, 258, 56, 74, - 303, 320, 542, 258, 79, 304, -58, 258, 258, 320, - -369, 320, -29, 306, 174, 320, 320, 320, 320, 320, - 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, - 385, 42, -369, 464, 19, 103, -369, 305, 19, -369, - 434, 12, 277, -369, 258, -369, 468, -369, -369, -369, - -369, 258, -369, -369, -369, -369, 258, 258, 421, 360, - -369, 309, -369, -369, 311, -369, -369, -369, -369, -369, - 186, -369, 438, -369, -369, 258, -369, -369, 315, -369, - -369, -369, -369, -369, -369, 384, 157, 96, 95, 258, - 258, -369, 412, 386, -63, -369, -369, -369, 370, 476, - 561, 320, 318, 238, -369, 387, 326, 561, 561, 561, - 561, 98, 98, 98, 98, 79, 79, 51, 51, 51, - -88, 327, -369, -369, 206, -369, 208, -369, 333, -369, - -8, -369, 324, -369, 30, -369, 425, -369, -369, -369, - 103, 103, 215, -369, 486, 487, -369, 395, -369, -369, - 219, -369, 258, 297, 258, 258, -369, 224, 124, 331, - -369, 320, 561, 238, 332, 225, -369, -369, -369, -369, - 339, 403, -369, -369, -369, 443, 444, 445, 426, 12, - 518, -369, -369, -369, 402, -369, -369, 362, 364, -369, - -369, 50, 368, 103, 229, -369, 258, -369, 542, 371, - 240, -369, -369, 30, 12, -369, -369, -369, 12, 18, - 361, 258, -369, -369, -369, -369, -369, 103, -369, -369, - -369, -369, 479, 421, -18, 373, 258, 245, 258, -369, - 16, 103, -369, -369, 103, 365, 376, -369 + 527, 91, 103, 125, 169, 103, -10, 66, 134, 115, + 103, 103, 0, 63, 230, -48, -48, -48, 243, 76, + -392, 136, -392, 136, -392, -392, -392, -392, -392, -392, + -392, -392, -392, -392, -392, -1, -392, 252, 98, -392, + 111, 190, -392, 286, 167, 167, 103, 294, 103, 186, + -392, -58, 305, 188, 188, 103, -392, 202, 150, -392, + -392, -392, -392, -392, -392, 522, -392, 231, -392, -392, + 215, -1, 21, -392, 51, -392, 337, 13, 347, -392, + 167, 234, 103, 103, 277, -392, 278, 208, 382, 385, + 385, -392, 258, 350, 103, 103, -392, 225, 230, -392, + 229, 389, 384, 233, 235, -392, -392, -392, -1, 289, + 279, -1, 49, -392, -392, -392, -392, -392, -392, -392, + -392, 237, 236, -392, -392, -392, -392, -392, -392, -392, + -392, -392, 276, 363, -65, 208, 257, -392, 385, 404, + 158, 263, -60, -392, 301, -392, 301, 103, -392, -392, + -392, -392, -392, 408, -392, -392, 257, -392, -392, 339, + -392, -392, 21, -392, -392, 257, 339, 257, 146, -392, + -392, 13, 103, -392, 409, 307, 414, 297, 89, 259, + 260, 261, 191, 290, 265, 338, -392, 197, -51, 367, + -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, + -392, -392, -392, -392, -392, -392, 334, -392, 106, 267, + -392, 257, 382, -392, 387, -392, -392, -392, 269, 114, + -392, 344, 268, -392, 33, 49, -1, 272, -392, -25, + 49, -51, 386, -31, -392, 271, 352, -392, 704, 141, + -392, 307, 3, 19, 388, 242, 257, 257, 119, 78, + 280, 338, 561, 257, 48, 283, -77, 257, 257, 338, + -392, 338, -61, 285, 80, 338, 338, 338, 338, 338, + 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, + 389, 103, -392, 441, 13, -51, -392, 294, 13, -392, + 408, 11, 277, -392, 257, -392, 448, -392, -392, -392, + -392, 257, -392, -392, -392, -392, 257, 257, 404, 385, + -392, 422, 288, -392, -392, 292, -392, -392, -392, -392, + -392, 120, -392, 414, -392, -392, 257, -392, -392, 293, + -392, -392, -392, -392, -392, -392, 370, 137, -39, 85, + 257, 257, -392, 388, 356, 68, -392, -392, -392, 346, + 495, 599, 338, 311, 197, -392, 361, 303, 599, 599, + 599, 599, 314, 314, 314, 314, 48, 48, -5, -5, + -5, -98, 316, -392, -392, 148, -392, 152, -392, 307, + -392, 16, -392, 312, -392, 25, -392, 415, -392, -392, + -392, -51, -51, 160, -392, 318, 478, 480, -392, 390, + -392, -392, 161, -392, 257, 704, 257, 257, -392, 155, + 110, 321, -392, 338, 599, 197, 322, 184, -392, -392, + -392, -392, 323, 394, -392, -392, -392, 419, 423, 426, + 401, 11, 499, -392, -392, -392, 381, -392, -392, 500, + 341, 343, -392, -392, -43, 345, -51, 176, -392, 257, + -392, 561, 353, 194, -392, -392, 25, 11, -392, -392, + -392, 11, 154, 340, 257, 365, -392, -392, -392, -392, + -392, -51, -392, -392, -392, -392, 295, 404, -23, -392, + 368, 257, 200, 257, -392, 20, -51, -392, -392, -51, + 351, 366, -392 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -1002,71 +1006,72 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_int16 yydefact[] = { - 245, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 29, 29, 29, 0, 265, + 246, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 29, 29, 29, 0, 266, 3, 20, 18, 20, 17, 8, 9, 7, 11, 16, - 13, 14, 12, 15, 10, 0, 244, 0, 231, 74, - 32, 0, 43, 234, 50, 50, 0, 0, 0, 0, - 230, 0, 0, 72, 72, 0, 41, 0, 246, 247, - 28, 25, 27, 26, 1, 245, 2, 0, 6, 5, - 122, 0, 83, 84, 114, 69, 0, 132, 0, 233, - 50, 0, 0, 0, 108, 36, 0, 78, 0, 0, - 0, 235, 0, 0, 0, 0, 42, 0, 0, 4, - 0, 0, 102, 0, 0, 96, 97, 95, 0, 99, - 0, 0, 128, 232, 213, 216, 218, 219, 214, 215, - 220, 0, 131, 133, 208, 209, 210, 217, 211, 212, - 31, 30, 0, 0, 0, 78, 0, 73, 0, 0, - 0, 0, 108, 80, 39, 37, 39, 0, 71, 67, - 68, 249, 248, 0, 121, 101, 0, 91, 90, 114, - 87, 86, 88, 98, 94, 0, 114, 0, 0, 92, - 33, 0, 0, 49, 0, 245, 0, 0, 204, 0, - 0, 0, 0, 0, 0, 0, 206, 0, 107, 136, - 143, 144, 145, 138, 140, 146, 139, 159, 147, 148, - 149, 150, 142, 137, 152, 153, 0, 266, 0, 0, - 76, 0, 0, 79, 0, 35, 40, 70, 23, 0, - 21, 105, 103, 129, 243, 128, 0, 113, 115, 120, - 128, 124, 126, 123, 134, 0, 0, 46, 0, 0, - 51, 245, 102, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 155, 0, 154, 0, 0, 0, 0, 0, - 156, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 13, 14, 12, 15, 10, 0, 245, 0, 232, 75, + 32, 0, 43, 235, 50, 50, 0, 0, 0, 0, + 231, 0, 0, 73, 73, 0, 41, 0, 247, 248, + 28, 25, 27, 26, 1, 246, 2, 0, 6, 5, + 123, 0, 84, 85, 115, 70, 0, 133, 0, 234, + 50, 0, 0, 0, 109, 36, 0, 79, 0, 0, + 0, 236, 0, 0, 0, 0, 42, 0, 0, 4, + 0, 0, 103, 0, 0, 97, 98, 96, 0, 100, + 0, 0, 129, 233, 214, 217, 219, 220, 215, 216, + 221, 0, 132, 134, 209, 210, 211, 218, 212, 213, + 31, 30, 0, 0, 0, 79, 0, 74, 0, 0, + 0, 0, 109, 81, 39, 37, 39, 0, 72, 68, + 69, 250, 249, 0, 122, 102, 0, 92, 91, 115, + 88, 87, 89, 99, 95, 0, 115, 0, 0, 93, + 33, 0, 0, 49, 0, 246, 0, 0, 205, 0, + 0, 0, 0, 0, 0, 0, 207, 0, 108, 137, + 144, 145, 146, 139, 141, 147, 140, 160, 148, 149, + 150, 151, 143, 138, 153, 154, 0, 267, 0, 0, + 77, 0, 0, 80, 0, 35, 40, 71, 23, 0, + 21, 106, 104, 130, 244, 129, 0, 114, 116, 121, + 129, 125, 127, 124, 135, 0, 0, 46, 0, 0, + 51, 246, 103, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 156, 0, 155, 0, 0, 0, 0, 0, + 157, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 77, 0, 0, 82, 81, 0, 0, 19, - 0, 0, 108, 104, 0, 241, 0, 242, 135, 85, - 89, 0, 119, 118, 117, 93, 0, 0, 0, 0, - 55, 0, 58, 57, 0, 63, 62, 56, 61, 54, - 66, 45, 0, 48, 191, 0, 205, 207, 0, 195, - 196, 197, 198, 199, 200, 0, 0, 0, 0, 0, - 0, 178, 0, 0, 0, 151, 141, 170, 171, 0, - 166, 0, 0, 0, 157, 0, 169, 168, 184, 185, - 186, 187, 188, 189, 190, 161, 160, 163, 162, 164, - 165, 0, 34, 267, 0, 38, 0, 22, 245, 106, - 221, 223, 0, 225, 239, 224, 110, 130, 240, 116, - 127, 125, 0, 44, 0, 0, 64, 0, 53, 52, - 0, 182, 0, 0, 0, 0, 176, 0, 0, 0, - 201, 0, 167, 0, 0, 0, 158, 202, 75, 24, - 0, 0, 261, 253, 259, 257, 260, 255, 0, 0, - 0, 238, 229, 236, 0, 100, 47, 0, 0, 65, - 192, 0, 0, 180, 0, 179, 0, 183, 203, 0, - 0, 174, 172, 239, 0, 256, 258, 254, 0, 222, - 240, 0, 59, 60, 193, 194, 177, 181, 175, 173, - 226, 250, 262, 0, 112, 0, 0, 0, 0, 109, - 0, 263, 251, 237, 111, 204, 0, 252 + 0, 0, 78, 0, 0, 83, 82, 0, 0, 19, + 0, 0, 109, 105, 0, 242, 0, 243, 136, 86, + 90, 0, 120, 119, 118, 94, 0, 0, 0, 0, + 55, 0, 0, 58, 57, 0, 64, 63, 56, 62, + 54, 67, 45, 0, 48, 192, 0, 206, 208, 0, + 196, 197, 198, 199, 200, 201, 0, 0, 0, 0, + 0, 0, 179, 0, 0, 0, 152, 142, 171, 172, + 0, 167, 0, 0, 0, 158, 0, 170, 169, 185, + 186, 187, 188, 189, 190, 191, 162, 161, 164, 163, + 165, 166, 0, 34, 268, 0, 38, 0, 22, 246, + 107, 222, 224, 0, 226, 240, 225, 111, 131, 241, + 117, 128, 126, 0, 44, 0, 0, 0, 65, 0, + 53, 52, 0, 183, 0, 0, 0, 0, 177, 0, + 0, 0, 202, 0, 168, 0, 0, 0, 159, 203, + 76, 24, 0, 0, 262, 254, 260, 258, 261, 256, + 0, 0, 0, 239, 230, 237, 0, 101, 47, 0, + 0, 0, 66, 193, 0, 0, 181, 0, 180, 0, + 184, 204, 0, 0, 175, 173, 240, 0, 257, 259, + 255, 0, 223, 241, 0, 0, 59, 61, 194, 195, + 178, 182, 176, 174, 227, 251, 263, 0, 113, 60, + 0, 0, 0, 0, 110, 0, 264, 252, 238, 112, + 205, 0, 253 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -369, -369, -369, 466, -369, 514, -369, 260, -369, 84, - -369, -369, -369, -369, 262, -83, 399, -369, -369, -369, - 27, -369, 236, 154, -369, -369, 497, -369, -369, -369, - 427, -369, -369, 349, -173, -75, -369, 6, -70, -37, - -369, -369, -81, 321, -369, -369, -369, -116, -369, -369, - -102, -369, 263, -369, -369, -28, -244, -369, 23, 273, - -136, -135, -369, -369, -369, -369, -369, -369, 328, -369, - -369, -369, -369, -369, -369, -369, -369, -369, 86, -69, - -85, -369, -369, -91, -369, -369, -369, -368, 119, -369, - -369, -369, 1, -369, -369, -369, 115, 347, -369, -369, - -369, -369, 477, -369, -369, -369, -369, -295 + -392, -392, -392, 445, -392, 489, -392, 245, -392, 22, + -392, -392, -392, -392, 249, -83, 392, -392, -392, -392, + -21, -392, 216, 135, -392, -392, 487, -392, -392, -392, + 410, -392, -392, 331, -165, -67, -392, 8, -69, -47, + -392, -392, -66, 308, -392, -392, -392, -126, -392, -392, + 2, -392, 246, -392, -392, 28, -252, -392, -100, 264, + -136, -135, -392, -392, -392, -392, -392, -392, 304, -392, + -392, -392, -392, -392, -392, -392, -392, -392, 69, -68, + -85, -392, -392, -93, -392, -392, -392, -391, 94, -392, + -392, -392, 1, -392, -392, -392, 99, 333, -392, -392, + -392, -392, 464, -392, -392, -392, -392, -295 }; /* YYDEFGOTO[NTERM-NUM]. */ @@ -1074,15 +1079,15 @@ static const yytype_int16 yydefgoto[] = { 0, 18, 19, 20, 21, 68, 219, 220, 22, 61, 23, 131, 24, 25, 86, 144, 215, 26, 27, 28, - 82, 239, 240, 320, 398, 29, 94, 30, 31, 32, + 82, 239, 240, 321, 400, 29, 94, 30, 31, 32, 140, 33, 142, 143, 34, 159, 160, 161, 73, 108, - 109, 164, 74, 156, 221, 292, 293, 137, 435, 479, + 109, 164, 74, 156, 221, 292, 293, 137, 437, 484, 112, 227, 228, 304, 102, 169, 222, 121, 122, 223, 224, 189, 190, 191, 192, 193, 194, 195, 249, 196, - 197, 198, 199, 200, 335, 201, 202, 203, 204, 205, - 124, 125, 126, 127, 128, 129, 379, 380, 381, 382, - 383, 49, 384, 80, 92, 431, 432, 433, 298, 35, - 36, 58, 59, 385, 428, 482, 66, 208 + 197, 198, 199, 200, 336, 201, 202, 203, 204, 205, + 124, 125, 126, 127, 128, 129, 380, 381, 382, 383, + 384, 49, 385, 80, 92, 433, 434, 435, 298, 35, + 36, 58, 59, 386, 430, 487, 66, 208 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1090,243 +1095,264 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 188, 104, 237, 39, 145, 145, 42, 146, 123, 344, - 154, 50, 51, 392, 326, 38, 155, 421, 70, 485, - 37, 89, 55, 114, 115, 116, 213, 162, 478, 229, - 162, 231, 233, 295, 136, 43, 166, 111, 307, 295, - 174, 72, 265, 421, 44, 38, 248, 84, 252, 87, - 254, 256, 257, 145, 422, 206, 96, 225, 56, 423, - 90, 459, 105, 302, 230, 424, 425, 351, 323, 258, - 210, 175, 83, 280, 45, 285, 242, 103, 243, 167, - 422, 400, 426, 134, 135, 423, -262, 427, 257, 303, - 472, 424, 425, 106, 352, 149, 150, 168, 257, 410, - 62, 63, 234, 151, 294, 258, 346, 132, 426, 415, - 336, 337, -262, 427, 176, 258, 252, 255, 117, 40, - 41, 347, 348, 212, 349, 226, 350, 46, 71, 107, - 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, - 366, 367, 368, 369, 370, 162, 257, 260, 217, 294, - 430, 300, 178, 114, 115, 116, 296, 118, 119, -227, - 257, 339, 247, 258, 47, 229, 257, 327, 324, 450, - 390, 391, 186, 235, 328, 378, 386, 258, 477, 52, - 340, 265, 405, 258, 48, -228, 341, 120, 53, 371, - 179, 180, 181, 178, 114, 115, 116, 299, 57, 404, - 60, 340, 305, 407, 408, 420, 257, 406, 105, 265, - 279, 64, 280, 257, 464, 123, 412, 474, 54, 123, - 65, 67, 264, 258, 145, 75, 393, 446, 265, 182, - 258, 179, 180, 181, 257, 276, 277, 278, 279, 106, - 280, 178, 114, 115, 116, -265, -265, 76, 117, -265, - -265, 258, 274, 275, 276, 277, 278, 279, 232, 280, - 77, 178, 114, 115, 116, 183, 441, 257, 443, 444, - 182, 110, 409, 354, 79, 107, 448, 403, 184, 179, - 180, 181, 372, 414, 258, 396, 78, 118, 119, 117, - 355, 70, 178, 114, 115, 116, 247, 70, 81, 179, - 180, 181, 397, 209, 185, 186, 183, 374, 85, 88, - 467, 376, 187, 91, 93, 98, 97, 120, 182, 184, - 100, 310, 101, 178, 114, 115, 116, 311, 118, 119, - 250, 180, 181, 113, 257, 312, 445, 117, 182, 257, - 481, 466, 484, 449, 282, 185, 186, 283, 130, 289, - 133, 258, 290, 187, 183, 136, 258, 117, 120, 141, - 138, 313, 180, 181, 114, 321, 148, 184, 322, 182, - 418, 259, 419, 171, 183, 171, 118, 119, 314, 436, - 315, 316, 283, 440, 139, 147, 294, 184, 117, 452, - 71, 116, 294, 185, 186, 317, 118, 119, 153, 318, - 182, 187, 155, 260, 469, 251, 120, 294, 163, 483, - 157, 319, 283, 185, 186, 158, 165, 170, 184, 117, - 172, 187, 171, 173, 207, 211, 120, 118, 119, 214, - 329, 330, 331, 332, 333, 334, 251, 218, 110, 236, - 14, 238, 244, 241, 185, 186, 245, 246, 253, 184, - 261, 281, 187, 284, 287, 288, 291, 120, 118, 119, - 294, 306, 309, 301, 308, 70, 342, 373, 345, 353, - 262, 388, 394, 402, 395, 185, 186, 263, 264, 401, - 257, 413, 351, 187, 265, 266, 416, 280, 120, 417, - 434, 429, 437, 438, 439, 447, 451, 454, 267, 268, - 269, 270, 271, 453, 421, 272, 273, -264, 274, 275, - 276, 277, 278, 279, 1, 280, 455, 456, 457, 1, - 458, 460, 2, 461, 473, 260, 462, 2, 463, 3, - 243, 99, 465, 4, 3, 468, 480, 69, 4, 5, - 487, 422, 6, 7, 5, 216, 423, 6, 7, 375, - 377, 95, 424, 425, 8, 9, 475, 442, 399, 8, - 9, 286, 177, 325, 389, 10, 486, 387, 470, 426, - 10, 297, 261, 471, 427, 152, 338, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 411, 0, 0, 11, - 0, 260, 343, 12, 11, 0, 0, 0, 12, 0, - 264, 0, 0, 0, 0, 476, 265, 266, 13, 0, - 260, 0, 0, 13, 14, 0, 0, 0, 0, 14, - 267, 268, 269, 270, 271, 0, 0, 272, 273, 0, - 274, 275, 276, 277, 278, 279, 0, 280, 261, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 15, 16, - 17, 0, 0, 15, 16, 17, 0, -265, 343, 0, - 0, 0, 0, 0, 0, 0, 264, 0, 0, 0, - 0, 0, 265, 266, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 264, 267, 268, 269, 270, - 271, 265, -265, 272, 273, 0, 274, 275, 276, 277, - 278, 279, 0, 280, 0, -265, -265, -265, 270, 271, + 188, 345, 104, 39, 145, 145, 42, 146, 154, 123, + 237, 50, 51, 393, 38, 155, 213, 114, 115, 116, + 136, 307, 327, 490, 83, 483, 174, 111, 295, 229, + 105, 231, 233, 89, 265, 257, 295, 352, 62, 63, + 462, 423, 162, 72, 166, 162, 248, 84, 252, 87, + 254, 256, 258, 145, 70, 206, 96, 175, 43, 132, + 105, 257, 302, 106, 353, 280, 406, 44, 52, 257, + 476, 210, 90, 257, 402, 285, 324, 53, 258, 103, + 424, 257, 55, 134, 135, 425, 258, 257, 303, 347, + 258, 426, 427, 106, 60, 149, 150, 45, 258, 107, + 176, 167, 417, 234, 258, 151, 38, 54, 428, 212, + 337, 338, -263, 429, 117, 226, 252, 37, 255, 168, + 56, 348, 349, 468, 350, 110, 351, 265, 40, 107, + 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, + 367, 368, 369, 370, 371, 257, 294, 432, 217, 178, + 114, 115, 116, 118, 119, 296, 279, 46, 280, 300, + 162, 225, 258, 453, 71, 229, 387, 340, 230, 325, + 391, 392, 41, 235, 407, 329, 379, 328, 186, 423, + 265, 355, 482, 120, 375, -228, 341, 372, 377, 179, + 180, 181, 342, 341, 178, 114, 115, 116, 356, 408, + 178, 114, 115, 116, 409, 410, 276, 277, 278, 279, + 48, 280, 478, 70, 422, 449, 123, 414, 424, 209, + 123, 398, 257, 425, 145, 47, 394, 247, 182, 426, + 427, 257, 412, 57, 179, 180, 181, 294, 399, 258, + 179, 180, 181, 64, 65, 67, 428, 117, 258, 257, + -263, 429, 70, 299, 242, 75, 243, 232, 305, 405, + 178, 114, 115, 116, 183, 76, 258, 257, 444, 448, + 446, 447, 282, 182, 411, 283, 77, 184, 451, 182, + 289, 78, 373, 290, 258, 416, 118, 119, 257, 79, + 470, 81, 117, 178, 114, 115, 116, 85, 117, 247, + 179, 180, 181, 185, 186, 258, 88, 322, 91, 183, + 323, 187, 93, 471, 420, 183, 120, 171, 421, 98, + 423, 171, 184, -229, 97, 100, 438, 443, 184, 283, + 294, 118, 119, 250, 180, 181, 101, 118, 119, 182, + 113, 178, 114, 115, 116, 486, 452, 489, 185, 186, + 455, 130, 133, 294, 185, 186, 187, 136, 117, 424, + 473, 120, 187, 294, 425, 260, 488, 120, 138, 283, + 426, 427, 182, 139, 480, 183, 330, 331, 332, 333, + 334, 335, 180, 181, 259, 141, 147, 428, 184, 114, + 71, 117, 429, 148, 153, 116, 155, 118, 119, 157, + 163, 158, 165, 170, 172, 171, 173, 207, 251, 211, + 214, 218, 236, 110, 185, 186, 14, 238, 260, 241, + 182, 184, 187, 481, 244, 245, 246, 120, 253, 281, + 118, 119, 284, 287, 288, 291, 308, 294, 306, 117, + 264, 301, 309, 70, 374, 343, 265, 185, 186, 346, + 354, 389, 395, 396, 352, 187, 251, 397, 257, 403, + 120, 404, 418, -266, -266, 261, 280, -266, -266, 184, + 274, 275, 276, 277, 278, 279, 415, 280, 118, 119, + 419, 431, 436, 439, 440, 262, 441, 450, 454, 456, + 457, 442, 263, 264, 458, 185, 186, 461, 459, 265, + 266, 460, 463, 187, 464, 477, 465, 466, 120, 467, + 99, 469, 69, 267, 268, 269, 270, 271, 243, 472, + 272, 273, -265, 274, 275, 276, 277, 278, 279, 1, + 280, 479, 492, 485, 1, 378, 376, 2, 216, 401, + 445, 95, 2, 286, 3, 177, 260, 390, 4, 3, + 326, 475, 339, 4, 491, 474, 5, 297, 388, 6, + 7, 5, 152, 0, 6, 7, 0, 0, 0, 0, + 0, 8, 9, 0, 0, 0, 8, 9, 0, 0, + 0, 0, 10, 0, 0, 0, 0, 10, 0, 0, + 0, 0, 0, 261, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 11, 413, 0, 0, + 12, 11, 260, 344, 0, 12, 0, 0, 0, 0, + 0, 264, 0, 0, 0, 13, 0, 265, 266, 0, + 13, 14, 0, 0, 0, 0, 14, 0, 0, 0, + 0, 267, 268, 269, 270, 271, 0, 0, 272, 273, + 260, 274, 275, 276, 277, 278, 279, 0, 280, 261, + 0, 0, 0, 0, 0, 15, 16, 17, 0, 0, + 15, 16, 17, 0, 0, 0, 0, 0, 0, 344, + 0, 0, 0, 0, 0, 0, 0, 264, 0, 0, + 0, 0, 0, 265, 266, 0, 0, -266, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 267, 268, 269, + 270, 271, 0, 0, 272, 273, 0, 274, 275, 276, + 277, 278, 279, 0, 280, 264, 0, 0, 310, 0, + 0, 265, -266, 311, 0, 0, 312, 0, 0, 0, + 0, 0, 0, 0, 313, -266, -266, -266, 270, 271, 0, 0, 272, 273, 0, 274, 275, 276, 277, 278, - 279, 0, 280 + 279, 0, 280, 0, 0, 0, 0, 0, 0, 0, + 314, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 315, 0, 316, + 317, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 318, 0, 0, 0, 319, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 320 }; static const yytype_int16 yycheck[] = { - 136, 71, 175, 2, 89, 90, 5, 90, 77, 253, - 101, 10, 11, 308, 3, 3, 12, 25, 53, 3, - 26, 89, 19, 4, 5, 6, 142, 108, 46, 165, - 111, 167, 168, 3, 78, 66, 111, 74, 50, 3, - 89, 35, 130, 25, 75, 3, 182, 46, 183, 48, - 185, 187, 110, 138, 62, 138, 55, 159, 55, 67, - 128, 429, 9, 85, 166, 73, 74, 96, 241, 127, - 140, 120, 45, 161, 105, 211, 163, 71, 165, 50, - 62, 325, 90, 82, 83, 67, 94, 95, 110, 111, - 458, 73, 74, 40, 123, 94, 95, 68, 110, 162, - 16, 17, 171, 97, 167, 127, 164, 80, 90, 353, - 246, 247, 94, 95, 163, 127, 251, 187, 99, 3, - 3, 257, 258, 167, 259, 162, 261, 89, 163, 76, + 136, 253, 71, 2, 89, 90, 5, 90, 101, 77, + 175, 10, 11, 308, 3, 12, 142, 4, 5, 6, + 80, 52, 3, 3, 45, 48, 91, 74, 3, 165, + 9, 167, 168, 91, 132, 112, 3, 98, 16, 17, + 431, 25, 108, 35, 111, 111, 182, 46, 183, 48, + 185, 187, 129, 138, 55, 138, 55, 122, 68, 80, + 9, 112, 87, 42, 125, 163, 105, 77, 68, 112, + 461, 140, 130, 112, 326, 211, 241, 77, 129, 71, + 64, 112, 19, 82, 83, 69, 129, 112, 113, 166, + 129, 75, 76, 42, 142, 94, 95, 107, 129, 78, + 165, 52, 354, 171, 129, 97, 3, 107, 92, 169, + 246, 247, 96, 97, 101, 162, 251, 26, 187, 70, + 57, 257, 258, 166, 259, 74, 261, 132, 3, 78, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 226, 110, 49, 147, 167, - 120, 226, 3, 4, 5, 6, 120, 138, 139, 167, - 110, 87, 106, 127, 89, 301, 110, 156, 164, 413, - 306, 307, 156, 172, 244, 163, 292, 127, 473, 66, - 106, 130, 87, 127, 93, 167, 112, 168, 75, 280, - 41, 42, 43, 3, 4, 5, 6, 225, 3, 103, - 140, 106, 230, 339, 340, 378, 110, 112, 9, 130, - 159, 0, 161, 110, 164, 284, 351, 461, 105, 288, - 166, 107, 124, 127, 309, 3, 309, 103, 130, 80, - 127, 41, 42, 43, 110, 156, 157, 158, 159, 40, - 161, 3, 4, 5, 6, 147, 148, 165, 99, 151, - 152, 127, 154, 155, 156, 157, 158, 159, 109, 161, - 163, 3, 4, 5, 6, 116, 402, 110, 404, 405, - 80, 72, 342, 99, 3, 76, 411, 120, 129, 41, - 42, 43, 281, 353, 127, 99, 89, 138, 139, 99, - 116, 53, 3, 4, 5, 6, 106, 53, 122, 41, - 42, 43, 116, 59, 155, 156, 116, 284, 3, 118, - 446, 288, 163, 3, 122, 167, 120, 168, 80, 129, - 92, 24, 119, 3, 4, 5, 6, 30, 138, 139, - 41, 42, 43, 3, 110, 38, 112, 99, 80, 110, - 476, 112, 478, 413, 164, 155, 156, 167, 4, 164, - 116, 127, 167, 163, 116, 78, 127, 99, 168, 3, - 88, 64, 42, 43, 4, 164, 41, 129, 167, 80, - 164, 17, 164, 167, 116, 167, 138, 139, 81, 164, - 83, 84, 167, 164, 163, 126, 167, 129, 99, 164, - 163, 6, 167, 155, 156, 98, 138, 139, 163, 102, - 80, 163, 12, 49, 164, 116, 168, 167, 109, 164, - 164, 114, 167, 155, 156, 164, 121, 164, 129, 99, - 126, 163, 167, 41, 3, 144, 168, 138, 139, 107, - 132, 133, 134, 135, 136, 137, 116, 3, 72, 3, - 107, 3, 163, 120, 155, 156, 163, 163, 161, 129, - 96, 93, 163, 163, 44, 163, 89, 168, 138, 139, - 167, 50, 88, 167, 163, 53, 163, 3, 164, 163, - 116, 3, 163, 89, 163, 155, 156, 123, 124, 164, - 110, 163, 96, 163, 130, 131, 99, 161, 168, 162, - 65, 167, 6, 6, 99, 164, 164, 94, 144, 145, - 146, 147, 148, 164, 25, 151, 152, 0, 154, 155, - 156, 157, 158, 159, 7, 161, 73, 73, 73, 7, - 94, 3, 15, 121, 163, 49, 164, 15, 164, 22, - 165, 65, 164, 26, 22, 164, 163, 23, 26, 32, - 164, 62, 35, 36, 32, 146, 67, 35, 36, 287, - 290, 54, 73, 74, 47, 48, 77, 403, 322, 47, - 48, 212, 135, 242, 301, 58, 480, 294, 453, 90, - 58, 224, 96, 454, 95, 98, 248, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 110, -1, -1, 82, - -1, 49, 116, 86, 82, -1, -1, -1, 86, -1, - 124, -1, -1, -1, -1, 126, 130, 131, 101, -1, - 49, -1, -1, 101, 107, -1, -1, -1, -1, 107, - 144, 145, 146, 147, 148, -1, -1, 151, 152, -1, - 154, 155, 156, 157, 158, 159, -1, 161, 96, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 141, 142, - 143, -1, -1, 141, 142, 143, -1, 96, 116, -1, - -1, -1, -1, -1, -1, -1, 124, -1, -1, -1, - -1, -1, 130, 131, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 124, 144, 145, 146, 147, - 148, 130, 131, 151, 152, -1, 154, 155, 156, 157, - 158, 159, -1, 161, -1, 144, 145, 146, 147, 148, - -1, -1, 151, 152, -1, 154, 155, 156, 157, 158, - 159, -1, 161 + 275, 276, 277, 278, 279, 112, 169, 122, 147, 3, + 4, 5, 6, 140, 141, 122, 161, 91, 163, 226, + 226, 159, 129, 415, 165, 301, 292, 89, 166, 166, + 306, 307, 3, 172, 89, 244, 165, 158, 158, 25, + 132, 101, 477, 170, 284, 169, 108, 280, 288, 43, + 44, 45, 114, 108, 3, 4, 5, 6, 118, 114, + 3, 4, 5, 6, 340, 341, 158, 159, 160, 161, + 95, 163, 464, 55, 379, 105, 284, 352, 64, 61, + 288, 101, 112, 69, 309, 91, 309, 108, 82, 75, + 76, 112, 164, 3, 43, 44, 45, 169, 118, 129, + 43, 44, 45, 0, 168, 109, 92, 101, 129, 112, + 96, 97, 55, 225, 165, 3, 167, 111, 230, 122, + 3, 4, 5, 6, 118, 167, 129, 112, 404, 114, + 406, 407, 166, 82, 343, 169, 165, 131, 413, 82, + 166, 91, 281, 169, 129, 354, 140, 141, 112, 3, + 114, 124, 101, 3, 4, 5, 6, 3, 101, 108, + 43, 44, 45, 157, 158, 129, 120, 166, 3, 118, + 169, 165, 124, 449, 166, 118, 170, 169, 166, 169, + 25, 169, 131, 169, 122, 94, 166, 166, 131, 169, + 169, 140, 141, 43, 44, 45, 121, 140, 141, 82, + 3, 3, 4, 5, 6, 481, 415, 483, 157, 158, + 166, 4, 118, 169, 157, 158, 165, 80, 101, 64, + 166, 170, 165, 169, 69, 51, 166, 170, 90, 169, + 75, 76, 82, 165, 79, 118, 134, 135, 136, 137, + 138, 139, 44, 45, 17, 3, 128, 92, 131, 4, + 165, 101, 97, 43, 165, 6, 12, 140, 141, 166, + 111, 166, 123, 166, 128, 169, 43, 3, 118, 146, + 109, 3, 3, 74, 157, 158, 109, 3, 51, 122, + 82, 131, 165, 128, 165, 165, 165, 170, 163, 95, + 140, 141, 165, 46, 165, 91, 165, 169, 52, 101, + 126, 169, 90, 55, 3, 165, 132, 157, 158, 166, + 165, 3, 30, 165, 98, 165, 118, 165, 112, 166, + 170, 91, 101, 149, 150, 98, 163, 153, 154, 131, + 156, 157, 158, 159, 160, 161, 165, 163, 140, 141, + 164, 169, 67, 165, 6, 118, 6, 166, 166, 166, + 96, 101, 125, 126, 75, 157, 158, 96, 75, 132, + 133, 75, 3, 165, 123, 165, 6, 166, 170, 166, + 65, 166, 23, 146, 147, 148, 149, 150, 167, 166, + 153, 154, 0, 156, 157, 158, 159, 160, 161, 7, + 163, 166, 166, 165, 7, 290, 287, 15, 146, 323, + 405, 54, 15, 212, 22, 135, 51, 301, 26, 22, + 242, 457, 248, 26, 485, 456, 34, 224, 294, 37, + 38, 34, 98, -1, 37, 38, -1, -1, -1, -1, + -1, 49, 50, -1, -1, -1, 49, 50, -1, -1, + -1, -1, 60, -1, -1, -1, -1, 60, -1, -1, + -1, -1, -1, 98, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 84, 112, -1, -1, + 88, 84, 51, 118, -1, 88, -1, -1, -1, -1, + -1, 126, -1, -1, -1, 103, -1, 132, 133, -1, + 103, 109, -1, -1, -1, -1, 109, -1, -1, -1, + -1, 146, 147, 148, 149, 150, -1, -1, 153, 154, + 51, 156, 157, 158, 159, 160, 161, -1, 163, 98, + -1, -1, -1, -1, -1, 143, 144, 145, -1, -1, + 143, 144, 145, -1, -1, -1, -1, -1, -1, 118, + -1, -1, -1, -1, -1, -1, -1, 126, -1, -1, + -1, -1, -1, 132, 133, -1, -1, 98, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 146, 147, 148, + 149, 150, -1, -1, 153, 154, -1, 156, 157, 158, + 159, 160, 161, -1, 163, 126, -1, -1, 24, -1, + -1, 132, 133, 29, -1, -1, 32, -1, -1, -1, + -1, -1, -1, -1, 40, 146, 147, 148, 149, 150, + -1, -1, 153, 154, -1, 156, 157, 158, 159, 160, + 161, -1, 163, -1, -1, -1, -1, -1, -1, -1, + 66, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 83, -1, 85, + 86, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 100, -1, -1, -1, 104, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 116 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_int16 yystos[] = { - 0, 7, 15, 22, 26, 32, 35, 36, 47, 48, - 58, 82, 86, 101, 107, 141, 142, 143, 170, 171, - 172, 173, 177, 179, 181, 182, 186, 187, 188, 194, - 196, 197, 198, 200, 203, 268, 269, 26, 3, 261, - 3, 3, 261, 66, 75, 105, 89, 89, 93, 260, - 261, 261, 66, 75, 105, 19, 55, 3, 270, 271, - 140, 178, 178, 178, 0, 166, 275, 107, 174, 174, - 53, 163, 206, 207, 211, 3, 165, 163, 89, 3, - 262, 122, 189, 189, 261, 3, 183, 261, 118, 89, - 128, 3, 263, 122, 195, 195, 261, 120, 167, 172, - 92, 119, 223, 206, 207, 9, 40, 76, 208, 209, - 72, 208, 219, 3, 4, 5, 6, 99, 138, 139, - 168, 226, 227, 248, 249, 250, 251, 252, 253, 254, - 4, 180, 189, 116, 261, 261, 78, 216, 88, 163, - 199, 3, 201, 202, 184, 249, 184, 126, 41, 261, - 261, 206, 271, 163, 252, 12, 212, 164, 164, 204, - 205, 206, 211, 109, 210, 121, 204, 50, 68, 224, - 164, 167, 126, 41, 89, 120, 163, 199, 3, 41, - 42, 43, 80, 116, 129, 155, 156, 163, 229, 230, - 231, 232, 233, 234, 235, 236, 238, 239, 240, 241, - 242, 244, 245, 246, 247, 248, 184, 3, 276, 59, - 207, 144, 167, 216, 107, 185, 185, 261, 3, 175, - 176, 213, 225, 228, 229, 219, 208, 220, 221, 229, - 219, 229, 109, 229, 248, 261, 3, 203, 3, 190, - 191, 120, 163, 165, 163, 163, 163, 106, 229, 237, - 41, 116, 230, 161, 230, 207, 229, 110, 127, 17, - 49, 96, 116, 123, 124, 130, 131, 144, 145, 146, - 147, 148, 151, 152, 154, 155, 156, 157, 158, 159, - 161, 93, 164, 167, 163, 229, 202, 44, 163, 164, - 167, 89, 214, 215, 167, 3, 120, 266, 267, 224, - 204, 167, 85, 111, 222, 224, 50, 50, 163, 88, - 24, 30, 38, 64, 81, 83, 84, 98, 102, 114, - 192, 164, 167, 203, 164, 212, 3, 156, 207, 132, - 133, 134, 135, 136, 137, 243, 229, 229, 237, 87, - 106, 112, 163, 116, 225, 164, 164, 229, 229, 230, - 230, 96, 123, 163, 99, 116, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 252, 261, 3, 227, 183, 227, 176, 163, 255, - 256, 257, 258, 259, 261, 272, 216, 228, 3, 221, - 229, 229, 276, 184, 163, 163, 99, 116, 193, 191, - 225, 164, 89, 120, 103, 87, 112, 229, 229, 207, - 162, 110, 230, 163, 207, 225, 99, 162, 164, 164, - 203, 25, 62, 67, 73, 74, 90, 95, 273, 167, - 120, 264, 265, 266, 65, 217, 164, 6, 6, 99, - 164, 229, 192, 229, 229, 112, 103, 164, 230, 207, - 225, 164, 164, 164, 94, 73, 73, 73, 94, 256, - 3, 121, 164, 164, 164, 164, 112, 229, 164, 164, - 265, 257, 256, 163, 225, 77, 126, 276, 46, 218, - 163, 229, 274, 164, 229, 3, 247, 164 + 0, 7, 15, 22, 26, 34, 37, 38, 49, 50, + 60, 84, 88, 103, 109, 143, 144, 145, 172, 173, + 174, 175, 179, 181, 183, 184, 188, 189, 190, 196, + 198, 199, 200, 202, 205, 270, 271, 26, 3, 263, + 3, 3, 263, 68, 77, 107, 91, 91, 95, 262, + 263, 263, 68, 77, 107, 19, 57, 3, 272, 273, + 142, 180, 180, 180, 0, 168, 277, 109, 176, 176, + 55, 165, 208, 209, 213, 3, 167, 165, 91, 3, + 264, 124, 191, 191, 263, 3, 185, 263, 120, 91, + 130, 3, 265, 124, 197, 197, 263, 122, 169, 174, + 94, 121, 225, 208, 209, 9, 42, 78, 210, 211, + 74, 210, 221, 3, 4, 5, 6, 101, 140, 141, + 170, 228, 229, 250, 251, 252, 253, 254, 255, 256, + 4, 182, 191, 118, 263, 263, 80, 218, 90, 165, + 201, 3, 203, 204, 186, 251, 186, 128, 43, 263, + 263, 208, 273, 165, 254, 12, 214, 166, 166, 206, + 207, 208, 213, 111, 212, 123, 206, 52, 70, 226, + 166, 169, 128, 43, 91, 122, 165, 201, 3, 43, + 44, 45, 82, 118, 131, 157, 158, 165, 231, 232, + 233, 234, 235, 236, 237, 238, 240, 241, 242, 243, + 244, 246, 247, 248, 249, 250, 186, 3, 278, 61, + 209, 146, 169, 218, 109, 187, 187, 263, 3, 177, + 178, 215, 227, 230, 231, 221, 210, 222, 223, 231, + 221, 231, 111, 231, 250, 263, 3, 205, 3, 192, + 193, 122, 165, 167, 165, 165, 165, 108, 231, 239, + 43, 118, 232, 163, 232, 209, 231, 112, 129, 17, + 51, 98, 118, 125, 126, 132, 133, 146, 147, 148, + 149, 150, 153, 154, 156, 157, 158, 159, 160, 161, + 163, 95, 166, 169, 165, 231, 204, 46, 165, 166, + 169, 91, 216, 217, 169, 3, 122, 268, 269, 226, + 206, 169, 87, 113, 224, 226, 52, 52, 165, 90, + 24, 29, 32, 40, 66, 83, 85, 86, 100, 104, + 116, 194, 166, 169, 205, 166, 214, 3, 158, 209, + 134, 135, 136, 137, 138, 139, 245, 231, 231, 239, + 89, 108, 114, 165, 118, 227, 166, 166, 231, 231, + 232, 232, 98, 125, 165, 101, 118, 232, 232, 232, + 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, + 232, 232, 254, 263, 3, 229, 185, 229, 178, 165, + 257, 258, 259, 260, 261, 263, 274, 218, 230, 3, + 223, 231, 231, 278, 186, 30, 165, 165, 101, 118, + 195, 193, 227, 166, 91, 122, 105, 89, 114, 231, + 231, 209, 164, 112, 232, 165, 209, 227, 101, 164, + 166, 166, 205, 25, 64, 69, 75, 76, 92, 97, + 275, 169, 122, 266, 267, 268, 67, 219, 166, 165, + 6, 6, 101, 166, 231, 194, 231, 231, 114, 105, + 166, 232, 209, 227, 166, 166, 166, 96, 75, 75, + 75, 96, 258, 3, 123, 6, 166, 166, 166, 166, + 114, 231, 166, 166, 267, 259, 258, 165, 227, 166, + 79, 128, 278, 48, 220, 165, 231, 276, 166, 231, + 3, 249, 166 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_int16 yyr1[] = { - 0, 169, 170, 171, 171, 172, 172, 172, 172, 172, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 174, - 174, 175, 175, 176, 176, 177, 177, 177, 178, 178, - 179, 180, 181, 181, 182, 182, 183, 184, 185, 185, - 186, 187, 187, 187, 188, 188, 188, 188, 188, 189, - 189, 190, 190, 191, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 193, 193, 193, 194, 194, 194, - 194, 195, 195, 196, 197, 198, 198, 199, 199, 200, - 201, 201, 202, 203, 203, 203, 204, 204, 205, 205, - 206, 206, 207, 207, 208, 209, 209, 209, 210, 210, - 211, 212, 212, 213, 214, 214, 215, 216, 216, 217, - 217, 218, 218, 219, 219, 220, 220, 221, 222, 222, - 222, 223, 223, 224, 224, 224, 224, 224, 224, 225, - 225, 226, 226, 227, 227, 228, 229, 229, 229, 229, - 229, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 231, 231, 232, 232, 232, 232, 232, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 234, 234, 235, 235, 235, 235, 236, 236, 236, 236, - 237, 237, 238, 238, 239, 239, 239, 239, 239, 239, - 239, 240, 240, 241, 242, 243, 243, 243, 243, 243, - 243, 244, 245, 246, 247, 247, 247, 247, 248, 248, - 248, 248, 248, 249, 250, 250, 251, 251, 252, 253, - 254, 255, 255, 256, 256, 257, 257, 258, 258, 259, - 260, 261, 261, 262, 262, 263, 264, 264, 265, 265, - 266, 266, 267, 267, 268, 268, 269, 270, 270, 271, - 272, 272, 272, 273, 273, 273, 273, 273, 273, 273, - 273, 273, 273, 274, 275, 275, 276, 276 + 0, 171, 172, 173, 173, 174, 174, 174, 174, 174, + 175, 175, 175, 175, 175, 175, 175, 175, 175, 176, + 176, 177, 177, 178, 178, 179, 179, 179, 180, 180, + 181, 182, 183, 183, 184, 184, 185, 186, 187, 187, + 188, 189, 189, 189, 190, 190, 190, 190, 190, 191, + 191, 192, 192, 193, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 195, 195, 195, 196, 196, + 196, 196, 197, 197, 198, 199, 200, 200, 201, 201, + 202, 203, 203, 204, 205, 205, 205, 206, 206, 207, + 207, 208, 208, 209, 209, 210, 211, 211, 211, 212, + 212, 213, 214, 214, 215, 216, 216, 217, 218, 218, + 219, 219, 220, 220, 221, 221, 222, 222, 223, 224, + 224, 224, 225, 225, 226, 226, 226, 226, 226, 226, + 227, 227, 228, 228, 229, 229, 230, 231, 231, 231, + 231, 231, 232, 232, 232, 232, 232, 232, 232, 232, + 232, 232, 232, 233, 233, 234, 234, 234, 234, 234, + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + 235, 236, 236, 237, 237, 237, 237, 238, 238, 238, + 238, 239, 239, 240, 240, 241, 241, 241, 241, 241, + 241, 241, 242, 242, 243, 244, 245, 245, 245, 245, + 245, 245, 246, 247, 248, 249, 249, 249, 249, 250, + 250, 250, 250, 250, 251, 252, 252, 253, 253, 254, + 255, 256, 257, 257, 258, 258, 259, 259, 260, 260, + 261, 262, 263, 263, 264, 264, 265, 266, 266, 267, + 267, 268, 268, 269, 269, 270, 270, 271, 272, 272, + 273, 274, 274, 274, 275, 275, 275, 275, 275, 275, + 275, 275, 275, 275, 276, 277, 277, 278, 278 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -1338,27 +1364,27 @@ static const yytype_int8 yyr2[] = 4, 1, 2, 5, 7, 5, 1, 1, 3, 0, 5, 2, 3, 2, 8, 7, 6, 9, 7, 3, 0, 1, 3, 3, 1, 1, 1, 1, 1, 4, - 4, 1, 1, 1, 1, 2, 0, 4, 4, 3, - 5, 2, 0, 4, 2, 8, 5, 3, 0, 5, - 1, 3, 3, 2, 2, 6, 1, 1, 1, 3, - 3, 3, 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, - 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, 6, 1, 1, 1, 1, 1, - 1, 4, 4, 5, 1, 3, 1, 3, 1, 1, + 5, 4, 1, 1, 1, 1, 2, 0, 4, 4, + 3, 5, 2, 0, 4, 2, 8, 5, 3, 0, + 5, 1, 3, 3, 2, 2, 6, 1, 1, 1, + 3, 3, 3, 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, 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, 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, 0, 1, 1, 5, 1, 0, - 2, 1, 1, 0, 1, 0, 2, 1, 3, 3, - 4, 6, 8, 1, 2, 1, 2, 1, 2, 1, - 1, 1, 0, 1, 1, 0, 1, 3 + 1, 1, 1, 3, 1, 1, 1, 4, 1, 3, + 2, 1, 1, 3, 1, 0, 1, 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 }; @@ -1912,25 +1938,25 @@ yydestruct (const char *yymsg, case YYSYMBOL_IDENTIFIER: /* IDENTIFIER */ #line 149 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1916 "bison_parser.cpp" +#line 1942 "bison_parser.cpp" break; case YYSYMBOL_STRING: /* STRING */ #line 149 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1922 "bison_parser.cpp" +#line 1948 "bison_parser.cpp" break; case YYSYMBOL_FLOATVAL: /* FLOATVAL */ #line 147 "bison_parser.y" { } -#line 1928 "bison_parser.cpp" +#line 1954 "bison_parser.cpp" break; case YYSYMBOL_INTVAL: /* INTVAL */ #line 147 "bison_parser.y" { } -#line 1934 "bison_parser.cpp" +#line 1960 "bison_parser.cpp" break; case YYSYMBOL_statement_list: /* statement_list */ @@ -1943,19 +1969,19 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).stmt_vec)); } -#line 1947 "bison_parser.cpp" +#line 1973 "bison_parser.cpp" break; case YYSYMBOL_statement: /* statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 1953 "bison_parser.cpp" +#line 1979 "bison_parser.cpp" break; case YYSYMBOL_preparable_statement: /* preparable_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 1959 "bison_parser.cpp" +#line 1985 "bison_parser.cpp" break; case YYSYMBOL_opt_hints: /* opt_hints */ @@ -1968,7 +1994,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 1972 "bison_parser.cpp" +#line 1998 "bison_parser.cpp" break; case YYSYMBOL_hint_list: /* hint_list */ @@ -1981,85 +2007,85 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 1985 "bison_parser.cpp" +#line 2011 "bison_parser.cpp" break; case YYSYMBOL_hint: /* hint */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 1991 "bison_parser.cpp" +#line 2017 "bison_parser.cpp" break; case YYSYMBOL_transaction_statement: /* transaction_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).transaction_stmt)); } -#line 1997 "bison_parser.cpp" +#line 2023 "bison_parser.cpp" break; case YYSYMBOL_prepare_statement: /* prepare_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).prep_stmt)); } -#line 2003 "bison_parser.cpp" +#line 2029 "bison_parser.cpp" break; case YYSYMBOL_prepare_target_query: /* prepare_target_query */ #line 149 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2009 "bison_parser.cpp" +#line 2035 "bison_parser.cpp" break; case YYSYMBOL_execute_statement: /* execute_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).exec_stmt)); } -#line 2015 "bison_parser.cpp" +#line 2041 "bison_parser.cpp" break; case YYSYMBOL_import_statement: /* import_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).import_stmt)); } -#line 2021 "bison_parser.cpp" +#line 2047 "bison_parser.cpp" break; case YYSYMBOL_file_type: /* file_type */ #line 147 "bison_parser.y" { } -#line 2027 "bison_parser.cpp" +#line 2053 "bison_parser.cpp" break; case YYSYMBOL_file_path: /* file_path */ #line 149 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2033 "bison_parser.cpp" +#line 2059 "bison_parser.cpp" break; case YYSYMBOL_opt_file_type: /* opt_file_type */ #line 147 "bison_parser.y" { } -#line 2039 "bison_parser.cpp" +#line 2065 "bison_parser.cpp" break; case YYSYMBOL_export_statement: /* export_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).export_stmt)); } -#line 2045 "bison_parser.cpp" +#line 2071 "bison_parser.cpp" break; case YYSYMBOL_show_statement: /* show_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).show_stmt)); } -#line 2051 "bison_parser.cpp" +#line 2077 "bison_parser.cpp" break; case YYSYMBOL_create_statement: /* create_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).create_stmt)); } -#line 2057 "bison_parser.cpp" +#line 2083 "bison_parser.cpp" break; case YYSYMBOL_opt_not_exists: /* opt_not_exists */ #line 147 "bison_parser.y" { } -#line 2063 "bison_parser.cpp" +#line 2089 "bison_parser.cpp" break; case YYSYMBOL_column_def_commalist: /* column_def_commalist */ @@ -2072,55 +2098,55 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).column_vec)); } -#line 2076 "bison_parser.cpp" +#line 2102 "bison_parser.cpp" break; case YYSYMBOL_column_def: /* column_def */ #line 158 "bison_parser.y" { delete (((*yyvaluep).column_t)); } -#line 2082 "bison_parser.cpp" +#line 2108 "bison_parser.cpp" break; case YYSYMBOL_column_type: /* column_type */ #line 147 "bison_parser.y" { } -#line 2088 "bison_parser.cpp" +#line 2114 "bison_parser.cpp" break; case YYSYMBOL_opt_column_nullable: /* opt_column_nullable */ #line 147 "bison_parser.y" { } -#line 2094 "bison_parser.cpp" +#line 2120 "bison_parser.cpp" break; case YYSYMBOL_drop_statement: /* drop_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).drop_stmt)); } -#line 2100 "bison_parser.cpp" +#line 2126 "bison_parser.cpp" break; case YYSYMBOL_opt_exists: /* opt_exists */ #line 147 "bison_parser.y" { } -#line 2106 "bison_parser.cpp" +#line 2132 "bison_parser.cpp" break; case YYSYMBOL_delete_statement: /* delete_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2112 "bison_parser.cpp" +#line 2138 "bison_parser.cpp" break; case YYSYMBOL_truncate_statement: /* truncate_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2118 "bison_parser.cpp" +#line 2144 "bison_parser.cpp" break; case YYSYMBOL_insert_statement: /* insert_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).insert_stmt)); } -#line 2124 "bison_parser.cpp" +#line 2150 "bison_parser.cpp" break; case YYSYMBOL_opt_column_list: /* opt_column_list */ @@ -2133,13 +2159,13 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2137 "bison_parser.cpp" +#line 2163 "bison_parser.cpp" break; case YYSYMBOL_update_statement: /* update_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).update_stmt)); } -#line 2143 "bison_parser.cpp" +#line 2169 "bison_parser.cpp" break; case YYSYMBOL_update_clause_commalist: /* update_clause_commalist */ @@ -2152,73 +2178,73 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).update_vec)); } -#line 2156 "bison_parser.cpp" +#line 2182 "bison_parser.cpp" break; case YYSYMBOL_update_clause: /* update_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).update_t)); } -#line 2162 "bison_parser.cpp" +#line 2188 "bison_parser.cpp" break; case YYSYMBOL_select_statement: /* select_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2168 "bison_parser.cpp" +#line 2194 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation: /* select_within_set_operation */ #line 158 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2174 "bison_parser.cpp" +#line 2200 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation_no_parentheses: /* select_within_set_operation_no_parentheses */ #line 158 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2180 "bison_parser.cpp" +#line 2206 "bison_parser.cpp" break; case YYSYMBOL_select_with_paren: /* select_with_paren */ #line 158 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2186 "bison_parser.cpp" +#line 2212 "bison_parser.cpp" break; case YYSYMBOL_select_no_paren: /* select_no_paren */ #line 158 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2192 "bison_parser.cpp" +#line 2218 "bison_parser.cpp" break; case YYSYMBOL_set_operator: /* set_operator */ #line 158 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2198 "bison_parser.cpp" +#line 2224 "bison_parser.cpp" break; case YYSYMBOL_set_type: /* set_type */ #line 158 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2204 "bison_parser.cpp" +#line 2230 "bison_parser.cpp" break; case YYSYMBOL_opt_all: /* opt_all */ #line 147 "bison_parser.y" { } -#line 2210 "bison_parser.cpp" +#line 2236 "bison_parser.cpp" break; case YYSYMBOL_select_clause: /* select_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2216 "bison_parser.cpp" +#line 2242 "bison_parser.cpp" break; case YYSYMBOL_opt_distinct: /* opt_distinct */ #line 147 "bison_parser.y" { } -#line 2222 "bison_parser.cpp" +#line 2248 "bison_parser.cpp" break; case YYSYMBOL_select_list: /* select_list */ @@ -2231,37 +2257,37 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2235 "bison_parser.cpp" +#line 2261 "bison_parser.cpp" break; case YYSYMBOL_opt_from_clause: /* opt_from_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2241 "bison_parser.cpp" +#line 2267 "bison_parser.cpp" break; case YYSYMBOL_from_clause: /* from_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2247 "bison_parser.cpp" +#line 2273 "bison_parser.cpp" break; case YYSYMBOL_opt_where: /* opt_where */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2253 "bison_parser.cpp" +#line 2279 "bison_parser.cpp" break; case YYSYMBOL_opt_group: /* opt_group */ #line 158 "bison_parser.y" { delete (((*yyvaluep).group_t)); } -#line 2259 "bison_parser.cpp" +#line 2285 "bison_parser.cpp" break; case YYSYMBOL_opt_having: /* opt_having */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2265 "bison_parser.cpp" +#line 2291 "bison_parser.cpp" break; case YYSYMBOL_opt_order: /* opt_order */ @@ -2274,7 +2300,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2278 "bison_parser.cpp" +#line 2304 "bison_parser.cpp" break; case YYSYMBOL_order_list: /* order_list */ @@ -2287,31 +2313,31 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2291 "bison_parser.cpp" +#line 2317 "bison_parser.cpp" break; case YYSYMBOL_order_desc: /* order_desc */ #line 158 "bison_parser.y" { delete (((*yyvaluep).order)); } -#line 2297 "bison_parser.cpp" +#line 2323 "bison_parser.cpp" break; case YYSYMBOL_opt_order_type: /* opt_order_type */ #line 147 "bison_parser.y" { } -#line 2303 "bison_parser.cpp" +#line 2329 "bison_parser.cpp" break; case YYSYMBOL_opt_top: /* opt_top */ #line 158 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2309 "bison_parser.cpp" +#line 2335 "bison_parser.cpp" break; case YYSYMBOL_opt_limit: /* opt_limit */ #line 158 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2315 "bison_parser.cpp" +#line 2341 "bison_parser.cpp" break; case YYSYMBOL_expr_list: /* expr_list */ @@ -2324,7 +2350,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2328 "bison_parser.cpp" +#line 2354 "bison_parser.cpp" break; case YYSYMBOL_opt_literal_list: /* opt_literal_list */ @@ -2337,7 +2363,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2341 "bison_parser.cpp" +#line 2367 "bison_parser.cpp" break; case YYSYMBOL_literal_list: /* literal_list */ @@ -2350,187 +2376,187 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2354 "bison_parser.cpp" +#line 2380 "bison_parser.cpp" break; case YYSYMBOL_expr_alias: /* expr_alias */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2360 "bison_parser.cpp" +#line 2386 "bison_parser.cpp" break; case YYSYMBOL_expr: /* expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2366 "bison_parser.cpp" +#line 2392 "bison_parser.cpp" break; case YYSYMBOL_operand: /* operand */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2372 "bison_parser.cpp" +#line 2398 "bison_parser.cpp" break; case YYSYMBOL_scalar_expr: /* scalar_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2378 "bison_parser.cpp" +#line 2404 "bison_parser.cpp" break; case YYSYMBOL_unary_expr: /* unary_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2384 "bison_parser.cpp" +#line 2410 "bison_parser.cpp" break; case YYSYMBOL_binary_expr: /* binary_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2390 "bison_parser.cpp" +#line 2416 "bison_parser.cpp" break; case YYSYMBOL_logic_expr: /* logic_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2396 "bison_parser.cpp" +#line 2422 "bison_parser.cpp" break; case YYSYMBOL_in_expr: /* in_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2402 "bison_parser.cpp" +#line 2428 "bison_parser.cpp" break; case YYSYMBOL_case_expr: /* case_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2408 "bison_parser.cpp" +#line 2434 "bison_parser.cpp" break; case YYSYMBOL_case_list: /* case_list */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2414 "bison_parser.cpp" +#line 2440 "bison_parser.cpp" break; case YYSYMBOL_exists_expr: /* exists_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2420 "bison_parser.cpp" +#line 2446 "bison_parser.cpp" break; case YYSYMBOL_comp_expr: /* comp_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2426 "bison_parser.cpp" +#line 2452 "bison_parser.cpp" break; case YYSYMBOL_function_expr: /* function_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2432 "bison_parser.cpp" +#line 2458 "bison_parser.cpp" break; case YYSYMBOL_extract_expr: /* extract_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2438 "bison_parser.cpp" +#line 2464 "bison_parser.cpp" break; case YYSYMBOL_cast_expr: /* cast_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2444 "bison_parser.cpp" +#line 2470 "bison_parser.cpp" break; case YYSYMBOL_datetime_field: /* datetime_field */ #line 147 "bison_parser.y" { } -#line 2450 "bison_parser.cpp" +#line 2476 "bison_parser.cpp" break; case YYSYMBOL_array_expr: /* array_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2456 "bison_parser.cpp" +#line 2482 "bison_parser.cpp" break; case YYSYMBOL_array_index: /* array_index */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2462 "bison_parser.cpp" +#line 2488 "bison_parser.cpp" break; case YYSYMBOL_between_expr: /* between_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2468 "bison_parser.cpp" +#line 2494 "bison_parser.cpp" break; case YYSYMBOL_column_name: /* column_name */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2474 "bison_parser.cpp" +#line 2500 "bison_parser.cpp" break; case YYSYMBOL_literal: /* literal */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2480 "bison_parser.cpp" +#line 2506 "bison_parser.cpp" break; case YYSYMBOL_string_literal: /* string_literal */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2486 "bison_parser.cpp" +#line 2512 "bison_parser.cpp" break; case YYSYMBOL_bool_literal: /* bool_literal */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2492 "bison_parser.cpp" +#line 2518 "bison_parser.cpp" break; case YYSYMBOL_num_literal: /* num_literal */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2498 "bison_parser.cpp" +#line 2524 "bison_parser.cpp" break; case YYSYMBOL_int_literal: /* int_literal */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2504 "bison_parser.cpp" +#line 2530 "bison_parser.cpp" break; case YYSYMBOL_null_literal: /* null_literal */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2510 "bison_parser.cpp" +#line 2536 "bison_parser.cpp" break; case YYSYMBOL_param_expr: /* param_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2516 "bison_parser.cpp" +#line 2542 "bison_parser.cpp" break; case YYSYMBOL_table_ref: /* table_ref */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2522 "bison_parser.cpp" +#line 2548 "bison_parser.cpp" break; case YYSYMBOL_table_ref_atomic: /* table_ref_atomic */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2528 "bison_parser.cpp" +#line 2554 "bison_parser.cpp" break; case YYSYMBOL_nonjoin_table_ref_atomic: /* nonjoin_table_ref_atomic */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2534 "bison_parser.cpp" +#line 2560 "bison_parser.cpp" break; case YYSYMBOL_table_ref_commalist: /* table_ref_commalist */ @@ -2543,103 +2569,103 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).table_vec)); } -#line 2547 "bison_parser.cpp" +#line 2573 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name: /* table_ref_name */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2553 "bison_parser.cpp" +#line 2579 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name_no_alias: /* table_ref_name_no_alias */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2559 "bison_parser.cpp" +#line 2585 "bison_parser.cpp" break; case YYSYMBOL_table_name: /* table_name */ #line 148 "bison_parser.y" { free( (((*yyvaluep).table_name).name) ); free( (((*yyvaluep).table_name).schema) ); } -#line 2565 "bison_parser.cpp" +#line 2591 "bison_parser.cpp" break; case YYSYMBOL_opt_index_name: /* opt_index_name */ #line 149 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2571 "bison_parser.cpp" +#line 2597 "bison_parser.cpp" break; case YYSYMBOL_index_name: /* index_name */ #line 149 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2577 "bison_parser.cpp" +#line 2603 "bison_parser.cpp" break; case YYSYMBOL_table_alias: /* table_alias */ #line 158 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2583 "bison_parser.cpp" +#line 2609 "bison_parser.cpp" break; case YYSYMBOL_opt_table_alias: /* opt_table_alias */ #line 158 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2589 "bison_parser.cpp" +#line 2615 "bison_parser.cpp" break; case YYSYMBOL_alias: /* alias */ #line 158 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2595 "bison_parser.cpp" +#line 2621 "bison_parser.cpp" break; case YYSYMBOL_opt_alias: /* opt_alias */ #line 158 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2601 "bison_parser.cpp" +#line 2627 "bison_parser.cpp" break; case YYSYMBOL_opt_with_clause: /* opt_with_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2607 "bison_parser.cpp" +#line 2633 "bison_parser.cpp" break; case YYSYMBOL_with_clause: /* with_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2613 "bison_parser.cpp" +#line 2639 "bison_parser.cpp" break; case YYSYMBOL_with_description_list: /* with_description_list */ #line 158 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2619 "bison_parser.cpp" +#line 2645 "bison_parser.cpp" break; case YYSYMBOL_with_description: /* with_description */ #line 158 "bison_parser.y" { delete (((*yyvaluep).with_description_t)); } -#line 2625 "bison_parser.cpp" +#line 2651 "bison_parser.cpp" break; case YYSYMBOL_join_clause: /* join_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2631 "bison_parser.cpp" +#line 2657 "bison_parser.cpp" break; case YYSYMBOL_opt_join_type: /* opt_join_type */ #line 147 "bison_parser.y" { } -#line 2637 "bison_parser.cpp" +#line 2663 "bison_parser.cpp" break; case YYSYMBOL_join_condition: /* join_condition */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2643 "bison_parser.cpp" +#line 2669 "bison_parser.cpp" break; case YYSYMBOL_ident_commalist: /* ident_commalist */ @@ -2652,7 +2678,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2656 "bison_parser.cpp" +#line 2682 "bison_parser.cpp" break; default: @@ -2759,7 +2785,7 @@ YYLTYPE yylloc = yyloc_default; yylloc.string_length = 0; } -#line 2763 "bison_parser.cpp" +#line 2789 "bison_parser.cpp" yylsp[0] = yylloc; goto yysetstate; @@ -2987,7 +3013,7 @@ YYLTYPE yylloc = yyloc_default; } delete (yyvsp[-1].stmt_vec); } -#line 2991 "bison_parser.cpp" +#line 3017 "bison_parser.cpp" break; case 3: /* statement_list: statement */ @@ -2998,7 +3024,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.stmt_vec) = new std::vector(); (yyval.stmt_vec)->push_back((yyvsp[0].statement)); } -#line 3002 "bison_parser.cpp" +#line 3028 "bison_parser.cpp" break; case 4: /* statement_list: statement_list ';' statement */ @@ -3009,7 +3035,7 @@ YYLTYPE yylloc = yyloc_default; (yyvsp[-2].stmt_vec)->push_back((yyvsp[0].statement)); (yyval.stmt_vec) = (yyvsp[-2].stmt_vec); } -#line 3013 "bison_parser.cpp" +#line 3039 "bison_parser.cpp" break; case 5: /* statement: prepare_statement opt_hints */ @@ -3018,7 +3044,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3022 "bison_parser.cpp" +#line 3048 "bison_parser.cpp" break; case 6: /* statement: preparable_statement opt_hints */ @@ -3027,7 +3053,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.statement) = (yyvsp[-1].statement); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3031 "bison_parser.cpp" +#line 3057 "bison_parser.cpp" break; case 7: /* statement: show_statement */ @@ -3035,7 +3061,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.statement) = (yyvsp[0].show_stmt); } -#line 3039 "bison_parser.cpp" +#line 3065 "bison_parser.cpp" break; case 8: /* statement: import_statement */ @@ -3043,7 +3069,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.statement) = (yyvsp[0].import_stmt); } -#line 3047 "bison_parser.cpp" +#line 3073 "bison_parser.cpp" break; case 9: /* statement: export_statement */ @@ -3051,85 +3077,85 @@ YYLTYPE yylloc = yyloc_default; { (yyval.statement) = (yyvsp[0].export_stmt); } -#line 3055 "bison_parser.cpp" +#line 3081 "bison_parser.cpp" break; case 10: /* preparable_statement: select_statement */ #line 328 "bison_parser.y" { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 3061 "bison_parser.cpp" +#line 3087 "bison_parser.cpp" break; case 11: /* preparable_statement: create_statement */ #line 329 "bison_parser.y" { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 3067 "bison_parser.cpp" +#line 3093 "bison_parser.cpp" break; case 12: /* preparable_statement: insert_statement */ #line 330 "bison_parser.y" { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 3073 "bison_parser.cpp" +#line 3099 "bison_parser.cpp" break; case 13: /* preparable_statement: delete_statement */ #line 331 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3079 "bison_parser.cpp" +#line 3105 "bison_parser.cpp" break; case 14: /* preparable_statement: truncate_statement */ #line 332 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3085 "bison_parser.cpp" +#line 3111 "bison_parser.cpp" break; case 15: /* preparable_statement: update_statement */ #line 333 "bison_parser.y" { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 3091 "bison_parser.cpp" +#line 3117 "bison_parser.cpp" break; case 16: /* preparable_statement: drop_statement */ #line 334 "bison_parser.y" { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 3097 "bison_parser.cpp" +#line 3123 "bison_parser.cpp" break; case 17: /* preparable_statement: execute_statement */ #line 335 "bison_parser.y" { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 3103 "bison_parser.cpp" +#line 3129 "bison_parser.cpp" break; case 18: /* preparable_statement: transaction_statement */ #line 336 "bison_parser.y" { (yyval.statement) = (yyvsp[0].transaction_stmt); } -#line 3109 "bison_parser.cpp" +#line 3135 "bison_parser.cpp" break; case 19: /* opt_hints: WITH HINT '(' hint_list ')' */ #line 345 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 3115 "bison_parser.cpp" +#line 3141 "bison_parser.cpp" break; case 20: /* opt_hints: %empty */ #line 346 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 3121 "bison_parser.cpp" +#line 3147 "bison_parser.cpp" break; case 21: /* hint_list: hint */ #line 351 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3127 "bison_parser.cpp" +#line 3153 "bison_parser.cpp" break; case 22: /* hint_list: hint_list ',' hint */ #line 352 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3133 "bison_parser.cpp" +#line 3159 "bison_parser.cpp" break; case 23: /* hint: IDENTIFIER */ @@ -3138,7 +3164,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[0].sval); } -#line 3142 "bison_parser.cpp" +#line 3168 "bison_parser.cpp" break; case 24: /* hint: IDENTIFIER '(' literal_list ')' */ @@ -3148,7 +3174,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expr)->name = (yyvsp[-3].sval); (yyval.expr)->exprList = (yyvsp[-1].expr_vec); } -#line 3152 "bison_parser.cpp" +#line 3178 "bison_parser.cpp" break; case 25: /* transaction_statement: BEGIN opt_transaction_keyword */ @@ -3156,7 +3182,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.transaction_stmt) = new TransactionStatement(kBeginTransaction); } -#line 3160 "bison_parser.cpp" +#line 3186 "bison_parser.cpp" break; case 26: /* transaction_statement: ROLLBACK opt_transaction_keyword */ @@ -3164,7 +3190,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.transaction_stmt) = new TransactionStatement(kRollbackTransaction); } -#line 3168 "bison_parser.cpp" +#line 3194 "bison_parser.cpp" break; case 27: /* transaction_statement: COMMIT opt_transaction_keyword */ @@ -3172,7 +3198,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.transaction_stmt) = new TransactionStatement(kCommitTransaction); } -#line 3176 "bison_parser.cpp" +#line 3202 "bison_parser.cpp" break; case 30: /* prepare_statement: PREPARE IDENTIFIER FROM prepare_target_query */ @@ -3182,7 +3208,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.prep_stmt)->name = (yyvsp[-2].sval); (yyval.prep_stmt)->query = (yyvsp[0].sval); } -#line 3186 "bison_parser.cpp" +#line 3212 "bison_parser.cpp" break; case 32: /* execute_statement: EXECUTE IDENTIFIER */ @@ -3191,7 +3217,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[0].sval); } -#line 3195 "bison_parser.cpp" +#line 3221 "bison_parser.cpp" break; case 33: /* execute_statement: EXECUTE IDENTIFIER '(' opt_literal_list ')' */ @@ -3201,7 +3227,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.exec_stmt)->name = (yyvsp[-3].sval); (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); } -#line 3205 "bison_parser.cpp" +#line 3231 "bison_parser.cpp" break; case 34: /* import_statement: IMPORT FROM file_type FILE file_path INTO table_name */ @@ -3212,7 +3238,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.import_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3216 "bison_parser.cpp" +#line 3242 "bison_parser.cpp" break; case 35: /* import_statement: COPY table_name FROM file_path opt_file_type */ @@ -3223,7 +3249,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.import_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3227 "bison_parser.cpp" +#line 3253 "bison_parser.cpp" break; case 36: /* file_type: IDENTIFIER */ @@ -3242,13 +3268,13 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[0].sval)); } -#line 3246 "bison_parser.cpp" +#line 3272 "bison_parser.cpp" break; case 37: /* file_path: string_literal */ #line 452 "bison_parser.y" { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 3252 "bison_parser.cpp" +#line 3278 "bison_parser.cpp" break; case 38: /* opt_file_type: WITH FORMAT file_type */ @@ -3256,13 +3282,13 @@ YYLTYPE yylloc = yyloc_default; { (yyval.import_type_t) = (yyvsp[0].import_type_t); } -#line 3260 "bison_parser.cpp" +#line 3286 "bison_parser.cpp" break; case 39: /* opt_file_type: %empty */ #line 459 "bison_parser.y" { (yyval.import_type_t) = kImportAuto; } -#line 3266 "bison_parser.cpp" +#line 3292 "bison_parser.cpp" break; case 40: /* export_statement: COPY table_name TO file_path opt_file_type */ @@ -3273,7 +3299,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.export_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.export_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3277 "bison_parser.cpp" +#line 3303 "bison_parser.cpp" break; case 41: /* show_statement: SHOW TABLES */ @@ -3281,7 +3307,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.show_stmt) = new ShowStatement(kShowTables); } -#line 3285 "bison_parser.cpp" +#line 3311 "bison_parser.cpp" break; case 42: /* show_statement: SHOW COLUMNS table_name */ @@ -3291,7 +3317,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.show_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.show_stmt)->name = (yyvsp[0].table_name).name; } -#line 3295 "bison_parser.cpp" +#line 3321 "bison_parser.cpp" break; case 43: /* show_statement: DESCRIBE table_name */ @@ -3301,7 +3327,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.show_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.show_stmt)->name = (yyvsp[0].table_name).name; } -#line 3305 "bison_parser.cpp" +#line 3331 "bison_parser.cpp" break; case 44: /* create_statement: CREATE TABLE opt_not_exists table_name FROM IDENTIFIER FILE file_path */ @@ -3319,7 +3345,7 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].sval)); (yyval.create_stmt)->filePath = (yyvsp[0].sval); } -#line 3323 "bison_parser.cpp" +#line 3349 "bison_parser.cpp" break; case 45: /* create_statement: CREATE TABLE opt_not_exists table_name '(' column_def_commalist ')' */ @@ -3331,7 +3357,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->columns = (yyvsp[-1].column_vec); } -#line 3335 "bison_parser.cpp" +#line 3361 "bison_parser.cpp" break; case 46: /* create_statement: CREATE TABLE opt_not_exists table_name AS select_statement */ @@ -3343,7 +3369,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-2].table_name).name; (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3347 "bison_parser.cpp" +#line 3373 "bison_parser.cpp" break; case 47: /* create_statement: CREATE INDEX opt_index_name opt_not_exists ON table_name '(' ident_commalist ')' */ @@ -3355,7 +3381,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->indexColumns = (yyvsp[-1].str_vec); } -#line 3359 "bison_parser.cpp" +#line 3385 "bison_parser.cpp" break; case 48: /* create_statement: CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement */ @@ -3368,31 +3394,31 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3372 "bison_parser.cpp" +#line 3398 "bison_parser.cpp" break; case 49: /* opt_not_exists: IF NOT EXISTS */ #line 549 "bison_parser.y" { (yyval.bval) = true; } -#line 3378 "bison_parser.cpp" +#line 3404 "bison_parser.cpp" break; case 50: /* opt_not_exists: %empty */ #line 550 "bison_parser.y" { (yyval.bval) = false; } -#line 3384 "bison_parser.cpp" +#line 3410 "bison_parser.cpp" break; case 51: /* column_def_commalist: column_def */ #line 554 "bison_parser.y" { (yyval.column_vec) = new std::vector(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); } -#line 3390 "bison_parser.cpp" +#line 3416 "bison_parser.cpp" break; case 52: /* column_def_commalist: column_def_commalist ',' column_def */ #line 555 "bison_parser.y" { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } -#line 3396 "bison_parser.cpp" +#line 3422 "bison_parser.cpp" break; case 53: /* column_def: IDENTIFIER column_type opt_column_nullable */ @@ -3400,164 +3426,170 @@ YYLTYPE yylloc = yyloc_default; { (yyval.column_t) = new ColumnDefinition((yyvsp[-2].sval), (yyvsp[-1].column_type_t), (yyvsp[0].bval)); } -#line 3404 "bison_parser.cpp" +#line 3430 "bison_parser.cpp" break; case 54: /* column_type: INT */ #line 565 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3410 "bison_parser.cpp" +#line 3436 "bison_parser.cpp" break; case 55: /* column_type: INTEGER */ #line 566 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3416 "bison_parser.cpp" +#line 3442 "bison_parser.cpp" break; case 56: /* column_type: LONG */ #line 567 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::LONG}; } -#line 3422 "bison_parser.cpp" +#line 3448 "bison_parser.cpp" break; case 57: /* column_type: FLOAT */ #line 568 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3428 "bison_parser.cpp" +#line 3454 "bison_parser.cpp" break; case 58: /* column_type: DOUBLE */ #line 569 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } -#line 3434 "bison_parser.cpp" +#line 3460 "bison_parser.cpp" break; case 59: /* column_type: VARCHAR '(' INTVAL ')' */ #line 570 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3440 "bison_parser.cpp" +#line 3466 "bison_parser.cpp" break; - case 60: /* column_type: CHAR '(' INTVAL ')' */ + case 60: /* column_type: CHARACTER VARYING '(' INTVAL ')' */ #line 571 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } -#line 3446 "bison_parser.cpp" + { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } +#line 3472 "bison_parser.cpp" break; - case 61: /* column_type: TEXT */ + case 61: /* column_type: CHAR '(' INTVAL ')' */ #line 572 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } -#line 3452 "bison_parser.cpp" + { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } +#line 3478 "bison_parser.cpp" break; - case 62: /* column_type: DATETIME */ + case 62: /* column_type: TEXT */ #line 573 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } -#line 3458 "bison_parser.cpp" + { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } +#line 3484 "bison_parser.cpp" break; - case 63: /* column_type: DATE */ + case 63: /* column_type: DATETIME */ #line 574 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } +#line 3490 "bison_parser.cpp" + break; + + case 64: /* column_type: DATE */ +#line 575 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATE}; } -#line 3464 "bison_parser.cpp" +#line 3496 "bison_parser.cpp" break; - case 64: /* opt_column_nullable: NULL */ -#line 578 "bison_parser.y" + case 65: /* opt_column_nullable: NULL */ +#line 579 "bison_parser.y" { (yyval.bval) = true; } -#line 3470 "bison_parser.cpp" +#line 3502 "bison_parser.cpp" break; - case 65: /* opt_column_nullable: NOT NULL */ -#line 579 "bison_parser.y" + case 66: /* opt_column_nullable: NOT NULL */ +#line 580 "bison_parser.y" { (yyval.bval) = false; } -#line 3476 "bison_parser.cpp" +#line 3508 "bison_parser.cpp" break; - case 66: /* opt_column_nullable: %empty */ -#line 580 "bison_parser.y" + case 67: /* opt_column_nullable: %empty */ +#line 581 "bison_parser.y" { (yyval.bval) = false; } -#line 3482 "bison_parser.cpp" +#line 3514 "bison_parser.cpp" break; - case 67: /* drop_statement: DROP TABLE opt_exists table_name */ -#line 590 "bison_parser.y" + case 68: /* drop_statement: DROP TABLE opt_exists table_name */ +#line 591 "bison_parser.y" { (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 3493 "bison_parser.cpp" +#line 3525 "bison_parser.cpp" break; - case 68: /* drop_statement: DROP VIEW opt_exists table_name */ -#line 596 "bison_parser.y" + case 69: /* drop_statement: DROP VIEW opt_exists table_name */ +#line 597 "bison_parser.y" { (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 3504 "bison_parser.cpp" +#line 3536 "bison_parser.cpp" break; - case 69: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ -#line 602 "bison_parser.y" + case 70: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ +#line 603 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); (yyval.drop_stmt)->ifExists = false; (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 3514 "bison_parser.cpp" +#line 3546 "bison_parser.cpp" break; - case 70: /* drop_statement: DROP INDEX index_name ON table_name */ -#line 607 "bison_parser.y" + case 71: /* drop_statement: DROP INDEX index_name ON table_name */ +#line 608 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropIndex); (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; (yyval.drop_stmt)->index_name = (yyvsp[-2].sval); } -#line 3524 "bison_parser.cpp" +#line 3556 "bison_parser.cpp" break; - case 71: /* opt_exists: IF EXISTS */ -#line 615 "bison_parser.y" + case 72: /* opt_exists: IF EXISTS */ +#line 616 "bison_parser.y" { (yyval.bval) = true; } -#line 3530 "bison_parser.cpp" +#line 3562 "bison_parser.cpp" break; - case 72: /* opt_exists: %empty */ -#line 616 "bison_parser.y" + case 73: /* opt_exists: %empty */ +#line 617 "bison_parser.y" { (yyval.bval) = false; } -#line 3536 "bison_parser.cpp" +#line 3568 "bison_parser.cpp" break; - case 73: /* delete_statement: DELETE FROM table_name opt_where */ -#line 625 "bison_parser.y" + case 74: /* delete_statement: DELETE FROM table_name opt_where */ +#line 626 "bison_parser.y" { (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 3547 "bison_parser.cpp" +#line 3579 "bison_parser.cpp" break; - case 74: /* truncate_statement: TRUNCATE table_name */ -#line 634 "bison_parser.y" + case 75: /* truncate_statement: TRUNCATE table_name */ +#line 635 "bison_parser.y" { (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3557 "bison_parser.cpp" +#line 3589 "bison_parser.cpp" break; - case 75: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ -#line 647 "bison_parser.y" + case 76: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ +#line 648 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertValues); (yyval.insert_stmt)->schema = (yyvsp[-5].table_name).schema; @@ -3565,11 +3597,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } -#line 3569 "bison_parser.cpp" +#line 3601 "bison_parser.cpp" break; - case 76: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ -#line 654 "bison_parser.y" + case 77: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ +#line 655 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertSelect); (yyval.insert_stmt)->schema = (yyvsp[-2].table_name).schema; @@ -3577,74 +3609,74 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } -#line 3581 "bison_parser.cpp" +#line 3613 "bison_parser.cpp" break; - case 77: /* opt_column_list: '(' ident_commalist ')' */ -#line 665 "bison_parser.y" + case 78: /* opt_column_list: '(' ident_commalist ')' */ +#line 666 "bison_parser.y" { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 3587 "bison_parser.cpp" +#line 3619 "bison_parser.cpp" break; - case 78: /* opt_column_list: %empty */ -#line 666 "bison_parser.y" + case 79: /* opt_column_list: %empty */ +#line 667 "bison_parser.y" { (yyval.str_vec) = nullptr; } -#line 3593 "bison_parser.cpp" +#line 3625 "bison_parser.cpp" break; - case 79: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ -#line 676 "bison_parser.y" + case 80: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ +#line 677 "bison_parser.y" { (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 3604 "bison_parser.cpp" +#line 3636 "bison_parser.cpp" break; - case 80: /* update_clause_commalist: update_clause */ -#line 685 "bison_parser.y" + case 81: /* update_clause_commalist: update_clause */ +#line 686 "bison_parser.y" { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 3610 "bison_parser.cpp" +#line 3642 "bison_parser.cpp" break; - case 81: /* update_clause_commalist: update_clause_commalist ',' update_clause */ -#line 686 "bison_parser.y" + case 82: /* update_clause_commalist: update_clause_commalist ',' update_clause */ +#line 687 "bison_parser.y" { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 3616 "bison_parser.cpp" +#line 3648 "bison_parser.cpp" break; - case 82: /* update_clause: IDENTIFIER '=' expr */ -#line 690 "bison_parser.y" + case 83: /* update_clause: IDENTIFIER '=' expr */ +#line 691 "bison_parser.y" { (yyval.update_t) = new UpdateClause(); (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 3626 "bison_parser.cpp" +#line 3658 "bison_parser.cpp" break; - case 83: /* select_statement: opt_with_clause select_with_paren */ -#line 702 "bison_parser.y" + case 84: /* select_statement: opt_with_clause select_with_paren */ +#line 703 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3635 "bison_parser.cpp" +#line 3667 "bison_parser.cpp" break; - case 84: /* select_statement: opt_with_clause select_no_paren */ -#line 706 "bison_parser.y" + case 85: /* select_statement: opt_with_clause select_no_paren */ +#line 707 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3644 "bison_parser.cpp" +#line 3676 "bison_parser.cpp" break; - case 85: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ -#line 710 "bison_parser.y" + case 86: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ +#line 711 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3656,17 +3688,17 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); (yyval.select_stmt)->withDescriptions = (yyvsp[-5].with_description_vec); } -#line 3660 "bison_parser.cpp" +#line 3692 "bison_parser.cpp" break; - case 88: /* select_within_set_operation_no_parentheses: select_clause */ -#line 728 "bison_parser.y" + case 89: /* select_within_set_operation_no_parentheses: select_clause */ +#line 729 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); } -#line 3666 "bison_parser.cpp" +#line 3698 "bison_parser.cpp" break; - case 89: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ -#line 729 "bison_parser.y" + case 90: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ +#line 730 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3675,23 +3707,23 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->push_back((yyvsp[-1].set_operator_t)); (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[0].select_stmt); } -#line 3679 "bison_parser.cpp" +#line 3711 "bison_parser.cpp" break; - case 90: /* select_with_paren: '(' select_no_paren ')' */ -#line 740 "bison_parser.y" + case 91: /* select_with_paren: '(' select_no_paren ')' */ +#line 741 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3685 "bison_parser.cpp" +#line 3717 "bison_parser.cpp" break; - case 91: /* select_with_paren: '(' select_with_paren ')' */ -#line 741 "bison_parser.y" + case 92: /* select_with_paren: '(' select_with_paren ')' */ +#line 742 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3691 "bison_parser.cpp" +#line 3723 "bison_parser.cpp" break; - case 92: /* select_no_paren: select_clause opt_order opt_limit */ -#line 745 "bison_parser.y" + case 93: /* select_no_paren: select_clause opt_order opt_limit */ +#line 746 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); (yyval.select_stmt)->order = (yyvsp[-1].order_vec); @@ -3702,11 +3734,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3706 "bison_parser.cpp" +#line 3738 "bison_parser.cpp" break; - case 93: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ -#line 755 "bison_parser.y" + case 94: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ +#line 756 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3717,63 +3749,63 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); } -#line 3721 "bison_parser.cpp" +#line 3753 "bison_parser.cpp" break; - case 94: /* set_operator: set_type opt_all */ -#line 768 "bison_parser.y" + case 95: /* set_operator: set_type opt_all */ +#line 769 "bison_parser.y" { (yyval.set_operator_t) = (yyvsp[-1].set_operator_t); (yyval.set_operator_t)->isAll = (yyvsp[0].bval); } -#line 3730 "bison_parser.cpp" +#line 3762 "bison_parser.cpp" break; - case 95: /* set_type: UNION */ -#line 775 "bison_parser.y" + case 96: /* set_type: UNION */ +#line 776 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetUnion; } -#line 3739 "bison_parser.cpp" +#line 3771 "bison_parser.cpp" break; - case 96: /* set_type: INTERSECT */ -#line 779 "bison_parser.y" + case 97: /* set_type: INTERSECT */ +#line 780 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetIntersect; } -#line 3748 "bison_parser.cpp" +#line 3780 "bison_parser.cpp" break; - case 97: /* set_type: EXCEPT */ -#line 783 "bison_parser.y" + case 98: /* set_type: EXCEPT */ +#line 784 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetExcept; } -#line 3757 "bison_parser.cpp" +#line 3789 "bison_parser.cpp" break; - case 98: /* opt_all: ALL */ -#line 790 "bison_parser.y" + case 99: /* opt_all: ALL */ +#line 791 "bison_parser.y" { (yyval.bval) = true; } -#line 3765 "bison_parser.cpp" +#line 3797 "bison_parser.cpp" break; - case 99: /* opt_all: %empty */ -#line 793 "bison_parser.y" + case 100: /* opt_all: %empty */ +#line 794 "bison_parser.y" { (yyval.bval) = false; } -#line 3773 "bison_parser.cpp" +#line 3805 "bison_parser.cpp" break; - case 100: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ -#line 799 "bison_parser.y" + case 101: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ +#line 800 "bison_parser.y" { (yyval.select_stmt) = new SelectStatement(); (yyval.select_stmt)->limit = (yyvsp[-5].limit); @@ -3783,213 +3815,213 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 3787 "bison_parser.cpp" +#line 3819 "bison_parser.cpp" break; - case 101: /* opt_distinct: DISTINCT */ -#line 811 "bison_parser.y" + case 102: /* opt_distinct: DISTINCT */ +#line 812 "bison_parser.y" { (yyval.bval) = true; } -#line 3793 "bison_parser.cpp" +#line 3825 "bison_parser.cpp" break; - case 102: /* opt_distinct: %empty */ -#line 812 "bison_parser.y" + case 103: /* opt_distinct: %empty */ +#line 813 "bison_parser.y" { (yyval.bval) = false; } -#line 3799 "bison_parser.cpp" +#line 3831 "bison_parser.cpp" break; - case 104: /* opt_from_clause: from_clause */ -#line 820 "bison_parser.y" + case 105: /* opt_from_clause: from_clause */ +#line 821 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 3805 "bison_parser.cpp" +#line 3837 "bison_parser.cpp" break; - case 105: /* opt_from_clause: %empty */ -#line 821 "bison_parser.y" + case 106: /* opt_from_clause: %empty */ +#line 822 "bison_parser.y" { (yyval.table) = nullptr; } -#line 3811 "bison_parser.cpp" +#line 3843 "bison_parser.cpp" break; - case 106: /* from_clause: FROM table_ref */ -#line 825 "bison_parser.y" + case 107: /* from_clause: FROM table_ref */ +#line 826 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 3817 "bison_parser.cpp" +#line 3849 "bison_parser.cpp" break; - case 107: /* opt_where: WHERE expr */ -#line 830 "bison_parser.y" + case 108: /* opt_where: WHERE expr */ +#line 831 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 3823 "bison_parser.cpp" +#line 3855 "bison_parser.cpp" break; - case 108: /* opt_where: %empty */ -#line 831 "bison_parser.y" + case 109: /* opt_where: %empty */ +#line 832 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 3829 "bison_parser.cpp" +#line 3861 "bison_parser.cpp" break; - case 109: /* opt_group: GROUP BY expr_list opt_having */ -#line 835 "bison_parser.y" + case 110: /* opt_group: GROUP BY expr_list opt_having */ +#line 836 "bison_parser.y" { (yyval.group_t) = new GroupByDescription(); (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 3839 "bison_parser.cpp" +#line 3871 "bison_parser.cpp" break; - case 110: /* opt_group: %empty */ -#line 840 "bison_parser.y" + case 111: /* opt_group: %empty */ +#line 841 "bison_parser.y" { (yyval.group_t) = nullptr; } -#line 3845 "bison_parser.cpp" +#line 3877 "bison_parser.cpp" break; - case 111: /* opt_having: HAVING expr */ -#line 844 "bison_parser.y" + case 112: /* opt_having: HAVING expr */ +#line 845 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 3851 "bison_parser.cpp" +#line 3883 "bison_parser.cpp" break; - case 112: /* opt_having: %empty */ -#line 845 "bison_parser.y" + case 113: /* opt_having: %empty */ +#line 846 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 3857 "bison_parser.cpp" +#line 3889 "bison_parser.cpp" break; - case 113: /* opt_order: ORDER BY order_list */ -#line 849 "bison_parser.y" + case 114: /* opt_order: ORDER BY order_list */ +#line 850 "bison_parser.y" { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 3863 "bison_parser.cpp" +#line 3895 "bison_parser.cpp" break; - case 114: /* opt_order: %empty */ -#line 850 "bison_parser.y" + case 115: /* opt_order: %empty */ +#line 851 "bison_parser.y" { (yyval.order_vec) = nullptr; } -#line 3869 "bison_parser.cpp" +#line 3901 "bison_parser.cpp" break; - case 115: /* order_list: order_desc */ -#line 854 "bison_parser.y" + case 116: /* order_list: order_desc */ +#line 855 "bison_parser.y" { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 3875 "bison_parser.cpp" +#line 3907 "bison_parser.cpp" break; - case 116: /* order_list: order_list ',' order_desc */ -#line 855 "bison_parser.y" + case 117: /* order_list: order_list ',' order_desc */ +#line 856 "bison_parser.y" { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 3881 "bison_parser.cpp" +#line 3913 "bison_parser.cpp" break; - case 117: /* order_desc: expr opt_order_type */ -#line 859 "bison_parser.y" + case 118: /* order_desc: expr opt_order_type */ +#line 860 "bison_parser.y" { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 3887 "bison_parser.cpp" +#line 3919 "bison_parser.cpp" break; - case 118: /* opt_order_type: ASC */ -#line 863 "bison_parser.y" + case 119: /* opt_order_type: ASC */ +#line 864 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 3893 "bison_parser.cpp" +#line 3925 "bison_parser.cpp" break; - case 119: /* opt_order_type: DESC */ -#line 864 "bison_parser.y" + case 120: /* opt_order_type: DESC */ +#line 865 "bison_parser.y" { (yyval.order_type) = kOrderDesc; } -#line 3899 "bison_parser.cpp" +#line 3931 "bison_parser.cpp" break; - case 120: /* opt_order_type: %empty */ -#line 865 "bison_parser.y" + case 121: /* opt_order_type: %empty */ +#line 866 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 3905 "bison_parser.cpp" +#line 3937 "bison_parser.cpp" break; - case 121: /* opt_top: TOP int_literal */ -#line 871 "bison_parser.y" + case 122: /* opt_top: TOP int_literal */ +#line 872 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 3911 "bison_parser.cpp" +#line 3943 "bison_parser.cpp" break; - case 122: /* opt_top: %empty */ -#line 872 "bison_parser.y" + case 123: /* opt_top: %empty */ +#line 873 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 3917 "bison_parser.cpp" +#line 3949 "bison_parser.cpp" break; - case 123: /* opt_limit: LIMIT expr */ -#line 876 "bison_parser.y" + case 124: /* opt_limit: LIMIT expr */ +#line 877 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 3923 "bison_parser.cpp" +#line 3955 "bison_parser.cpp" break; - case 124: /* opt_limit: OFFSET expr */ -#line 877 "bison_parser.y" + case 125: /* opt_limit: OFFSET expr */ +#line 878 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 3929 "bison_parser.cpp" +#line 3961 "bison_parser.cpp" break; - case 125: /* opt_limit: LIMIT expr OFFSET expr */ -#line 878 "bison_parser.y" + case 126: /* opt_limit: LIMIT expr OFFSET expr */ +#line 879 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 3935 "bison_parser.cpp" +#line 3967 "bison_parser.cpp" break; - case 126: /* opt_limit: LIMIT ALL */ -#line 879 "bison_parser.y" + case 127: /* opt_limit: LIMIT ALL */ +#line 880 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, nullptr); } -#line 3941 "bison_parser.cpp" +#line 3973 "bison_parser.cpp" break; - case 127: /* opt_limit: LIMIT ALL OFFSET expr */ -#line 880 "bison_parser.y" + case 128: /* opt_limit: LIMIT ALL OFFSET expr */ +#line 881 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 3947 "bison_parser.cpp" +#line 3979 "bison_parser.cpp" break; - case 128: /* opt_limit: %empty */ -#line 881 "bison_parser.y" + case 129: /* opt_limit: %empty */ +#line 882 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 3953 "bison_parser.cpp" +#line 3985 "bison_parser.cpp" break; - case 129: /* expr_list: expr_alias */ -#line 888 "bison_parser.y" + case 130: /* expr_list: expr_alias */ +#line 889 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3959 "bison_parser.cpp" +#line 3991 "bison_parser.cpp" break; - case 130: /* expr_list: expr_list ',' expr_alias */ -#line 889 "bison_parser.y" + case 131: /* expr_list: expr_list ',' expr_alias */ +#line 890 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3965 "bison_parser.cpp" +#line 3997 "bison_parser.cpp" break; - case 131: /* opt_literal_list: literal_list */ -#line 893 "bison_parser.y" + case 132: /* opt_literal_list: literal_list */ +#line 894 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[0].expr_vec); } -#line 3971 "bison_parser.cpp" +#line 4003 "bison_parser.cpp" break; - case 132: /* opt_literal_list: %empty */ -#line 894 "bison_parser.y" + case 133: /* opt_literal_list: %empty */ +#line 895 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 3977 "bison_parser.cpp" +#line 4009 "bison_parser.cpp" break; - case 133: /* literal_list: literal */ -#line 898 "bison_parser.y" + case 134: /* literal_list: literal */ +#line 899 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3983 "bison_parser.cpp" +#line 4015 "bison_parser.cpp" break; - case 134: /* literal_list: literal_list ',' literal */ -#line 899 "bison_parser.y" + case 135: /* literal_list: literal_list ',' literal */ +#line 900 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3989 "bison_parser.cpp" +#line 4021 "bison_parser.cpp" break; - case 135: /* expr_alias: expr opt_alias */ -#line 903 "bison_parser.y" + case 136: /* expr_alias: expr opt_alias */ +#line 904 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); if ((yyvsp[0].alias_t)) { @@ -3997,421 +4029,421 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].alias_t); } } -#line 4001 "bison_parser.cpp" +#line 4033 "bison_parser.cpp" break; - case 141: /* operand: '(' expr ')' */ -#line 921 "bison_parser.y" + case 142: /* operand: '(' expr ')' */ +#line 922 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); } -#line 4007 "bison_parser.cpp" +#line 4039 "bison_parser.cpp" break; - case 151: /* operand: '(' select_no_paren ')' */ -#line 931 "bison_parser.y" + case 152: /* operand: '(' select_no_paren ')' */ +#line 932 "bison_parser.y" { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 4013 "bison_parser.cpp" +#line 4045 "bison_parser.cpp" break; - case 154: /* unary_expr: '-' operand */ -#line 940 "bison_parser.y" + case 155: /* unary_expr: '-' operand */ +#line 941 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 4019 "bison_parser.cpp" +#line 4051 "bison_parser.cpp" break; - case 155: /* unary_expr: NOT operand */ -#line 941 "bison_parser.y" + case 156: /* unary_expr: NOT operand */ +#line 942 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 4025 "bison_parser.cpp" +#line 4057 "bison_parser.cpp" break; - case 156: /* unary_expr: operand ISNULL */ -#line 942 "bison_parser.y" + case 157: /* unary_expr: operand ISNULL */ +#line 943 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 4031 "bison_parser.cpp" +#line 4063 "bison_parser.cpp" break; - case 157: /* unary_expr: operand IS NULL */ -#line 943 "bison_parser.y" + case 158: /* unary_expr: operand IS NULL */ +#line 944 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 4037 "bison_parser.cpp" +#line 4069 "bison_parser.cpp" break; - case 158: /* unary_expr: operand IS NOT NULL */ -#line 944 "bison_parser.y" + case 159: /* unary_expr: operand IS NOT NULL */ +#line 945 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 4043 "bison_parser.cpp" +#line 4075 "bison_parser.cpp" break; - case 160: /* binary_expr: operand '-' operand */ -#line 949 "bison_parser.y" + case 161: /* binary_expr: operand '-' operand */ +#line 950 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 4049 "bison_parser.cpp" +#line 4081 "bison_parser.cpp" break; - case 161: /* binary_expr: operand '+' operand */ -#line 950 "bison_parser.y" + case 162: /* binary_expr: operand '+' operand */ +#line 951 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 4055 "bison_parser.cpp" +#line 4087 "bison_parser.cpp" break; - case 162: /* binary_expr: operand '/' operand */ -#line 951 "bison_parser.y" + case 163: /* binary_expr: operand '/' operand */ +#line 952 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 4061 "bison_parser.cpp" +#line 4093 "bison_parser.cpp" break; - case 163: /* binary_expr: operand '*' operand */ -#line 952 "bison_parser.y" + case 164: /* binary_expr: operand '*' operand */ +#line 953 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 4067 "bison_parser.cpp" +#line 4099 "bison_parser.cpp" break; - case 164: /* binary_expr: operand '%' operand */ -#line 953 "bison_parser.y" + case 165: /* binary_expr: operand '%' operand */ +#line 954 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 4073 "bison_parser.cpp" +#line 4105 "bison_parser.cpp" break; - case 165: /* binary_expr: operand '^' operand */ -#line 954 "bison_parser.y" + case 166: /* binary_expr: operand '^' operand */ +#line 955 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 4079 "bison_parser.cpp" +#line 4111 "bison_parser.cpp" break; - case 166: /* binary_expr: operand LIKE operand */ -#line 955 "bison_parser.y" + case 167: /* binary_expr: operand LIKE operand */ +#line 956 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 4085 "bison_parser.cpp" +#line 4117 "bison_parser.cpp" break; - case 167: /* binary_expr: operand NOT LIKE operand */ -#line 956 "bison_parser.y" + case 168: /* binary_expr: operand NOT LIKE operand */ +#line 957 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 4091 "bison_parser.cpp" +#line 4123 "bison_parser.cpp" break; - case 168: /* binary_expr: operand ILIKE operand */ -#line 957 "bison_parser.y" + case 169: /* binary_expr: operand ILIKE operand */ +#line 958 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 4097 "bison_parser.cpp" +#line 4129 "bison_parser.cpp" break; - case 169: /* binary_expr: operand CONCAT operand */ -#line 958 "bison_parser.y" + case 170: /* binary_expr: operand CONCAT operand */ +#line 959 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 4103 "bison_parser.cpp" +#line 4135 "bison_parser.cpp" break; - case 170: /* logic_expr: expr AND expr */ -#line 962 "bison_parser.y" + case 171: /* logic_expr: expr AND expr */ +#line 963 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 4109 "bison_parser.cpp" +#line 4141 "bison_parser.cpp" break; - case 171: /* logic_expr: expr OR expr */ -#line 963 "bison_parser.y" + case 172: /* logic_expr: expr OR expr */ +#line 964 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 4115 "bison_parser.cpp" +#line 4147 "bison_parser.cpp" break; - case 172: /* in_expr: operand IN '(' expr_list ')' */ -#line 967 "bison_parser.y" + case 173: /* in_expr: operand IN '(' expr_list ')' */ +#line 968 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 4121 "bison_parser.cpp" +#line 4153 "bison_parser.cpp" break; - case 173: /* in_expr: operand NOT IN '(' expr_list ')' */ -#line 968 "bison_parser.y" + case 174: /* in_expr: operand NOT IN '(' expr_list ')' */ +#line 969 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 4127 "bison_parser.cpp" +#line 4159 "bison_parser.cpp" break; - case 174: /* in_expr: operand IN '(' select_no_paren ')' */ -#line 969 "bison_parser.y" + case 175: /* in_expr: operand IN '(' select_no_paren ')' */ +#line 970 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 4133 "bison_parser.cpp" +#line 4165 "bison_parser.cpp" break; - case 175: /* in_expr: operand NOT IN '(' select_no_paren ')' */ -#line 970 "bison_parser.y" + case 176: /* in_expr: operand NOT IN '(' select_no_paren ')' */ +#line 971 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 4139 "bison_parser.cpp" +#line 4171 "bison_parser.cpp" break; - case 176: /* case_expr: CASE expr case_list END */ -#line 976 "bison_parser.y" + case 177: /* case_expr: CASE expr case_list END */ +#line 977 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } -#line 4145 "bison_parser.cpp" +#line 4177 "bison_parser.cpp" break; - case 177: /* case_expr: CASE expr case_list ELSE expr END */ -#line 977 "bison_parser.y" + case 178: /* case_expr: CASE expr case_list ELSE expr END */ +#line 978 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4151 "bison_parser.cpp" +#line 4183 "bison_parser.cpp" break; - case 178: /* case_expr: CASE case_list END */ -#line 978 "bison_parser.y" + case 179: /* case_expr: CASE case_list END */ +#line 979 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } -#line 4157 "bison_parser.cpp" +#line 4189 "bison_parser.cpp" break; - case 179: /* case_expr: CASE case_list ELSE expr END */ -#line 979 "bison_parser.y" + case 180: /* case_expr: CASE case_list ELSE expr END */ +#line 980 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4163 "bison_parser.cpp" +#line 4195 "bison_parser.cpp" break; - case 180: /* case_list: WHEN expr THEN expr */ -#line 983 "bison_parser.y" + case 181: /* case_list: WHEN expr THEN expr */ +#line 984 "bison_parser.y" { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4169 "bison_parser.cpp" +#line 4201 "bison_parser.cpp" break; - case 181: /* case_list: case_list WHEN expr THEN expr */ -#line 984 "bison_parser.y" + case 182: /* case_list: case_list WHEN expr THEN expr */ +#line 985 "bison_parser.y" { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4175 "bison_parser.cpp" +#line 4207 "bison_parser.cpp" break; - case 182: /* exists_expr: EXISTS '(' select_no_paren ')' */ -#line 988 "bison_parser.y" + case 183: /* exists_expr: EXISTS '(' select_no_paren ')' */ +#line 989 "bison_parser.y" { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 4181 "bison_parser.cpp" +#line 4213 "bison_parser.cpp" break; - case 183: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ -#line 989 "bison_parser.y" + case 184: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ +#line 990 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 4187 "bison_parser.cpp" +#line 4219 "bison_parser.cpp" break; - case 184: /* comp_expr: operand '=' operand */ -#line 993 "bison_parser.y" + case 185: /* comp_expr: operand '=' operand */ +#line 994 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4193 "bison_parser.cpp" +#line 4225 "bison_parser.cpp" break; - case 185: /* comp_expr: operand EQUALS operand */ -#line 994 "bison_parser.y" + case 186: /* comp_expr: operand EQUALS operand */ +#line 995 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4199 "bison_parser.cpp" +#line 4231 "bison_parser.cpp" break; - case 186: /* comp_expr: operand NOTEQUALS operand */ -#line 995 "bison_parser.y" + case 187: /* comp_expr: operand NOTEQUALS operand */ +#line 996 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 4205 "bison_parser.cpp" +#line 4237 "bison_parser.cpp" break; - case 187: /* comp_expr: operand '<' operand */ -#line 996 "bison_parser.y" + case 188: /* comp_expr: operand '<' operand */ +#line 997 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 4211 "bison_parser.cpp" +#line 4243 "bison_parser.cpp" break; - case 188: /* comp_expr: operand '>' operand */ -#line 997 "bison_parser.y" + case 189: /* comp_expr: operand '>' operand */ +#line 998 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 4217 "bison_parser.cpp" +#line 4249 "bison_parser.cpp" break; - case 189: /* comp_expr: operand LESSEQ operand */ -#line 998 "bison_parser.y" + case 190: /* comp_expr: operand LESSEQ operand */ +#line 999 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 4223 "bison_parser.cpp" +#line 4255 "bison_parser.cpp" break; - case 190: /* comp_expr: operand GREATEREQ operand */ -#line 999 "bison_parser.y" + case 191: /* comp_expr: operand GREATEREQ operand */ +#line 1000 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 4229 "bison_parser.cpp" +#line 4261 "bison_parser.cpp" break; - case 191: /* function_expr: IDENTIFIER '(' ')' */ -#line 1003 "bison_parser.y" + case 192: /* function_expr: IDENTIFIER '(' ')' */ +#line 1004 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 4235 "bison_parser.cpp" +#line 4267 "bison_parser.cpp" break; - case 192: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ -#line 1004 "bison_parser.y" + case 193: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ +#line 1005 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 4241 "bison_parser.cpp" +#line 4273 "bison_parser.cpp" break; - case 193: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ -#line 1008 "bison_parser.y" + case 194: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ +#line 1009 "bison_parser.y" { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } -#line 4247 "bison_parser.cpp" +#line 4279 "bison_parser.cpp" break; - case 194: /* cast_expr: CAST '(' expr AS column_type ')' */ -#line 1012 "bison_parser.y" + case 195: /* cast_expr: CAST '(' expr AS column_type ')' */ +#line 1013 "bison_parser.y" { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } -#line 4253 "bison_parser.cpp" +#line 4285 "bison_parser.cpp" break; - case 195: /* datetime_field: SECOND */ -#line 1016 "bison_parser.y" + case 196: /* datetime_field: SECOND */ +#line 1017 "bison_parser.y" { (yyval.datetime_field) = kDatetimeSecond; } -#line 4259 "bison_parser.cpp" +#line 4291 "bison_parser.cpp" break; - case 196: /* datetime_field: MINUTE */ -#line 1017 "bison_parser.y" + case 197: /* datetime_field: MINUTE */ +#line 1018 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMinute; } -#line 4265 "bison_parser.cpp" +#line 4297 "bison_parser.cpp" break; - case 197: /* datetime_field: HOUR */ -#line 1018 "bison_parser.y" + case 198: /* datetime_field: HOUR */ +#line 1019 "bison_parser.y" { (yyval.datetime_field) = kDatetimeHour; } -#line 4271 "bison_parser.cpp" +#line 4303 "bison_parser.cpp" break; - case 198: /* datetime_field: DAY */ -#line 1019 "bison_parser.y" + case 199: /* datetime_field: DAY */ +#line 1020 "bison_parser.y" { (yyval.datetime_field) = kDatetimeDay; } -#line 4277 "bison_parser.cpp" +#line 4309 "bison_parser.cpp" break; - case 199: /* datetime_field: MONTH */ -#line 1020 "bison_parser.y" + case 200: /* datetime_field: MONTH */ +#line 1021 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMonth; } -#line 4283 "bison_parser.cpp" +#line 4315 "bison_parser.cpp" break; - case 200: /* datetime_field: YEAR */ -#line 1021 "bison_parser.y" + case 201: /* datetime_field: YEAR */ +#line 1022 "bison_parser.y" { (yyval.datetime_field) = kDatetimeYear; } -#line 4289 "bison_parser.cpp" +#line 4321 "bison_parser.cpp" break; - case 201: /* array_expr: ARRAY '[' expr_list ']' */ -#line 1025 "bison_parser.y" + case 202: /* array_expr: ARRAY '[' expr_list ']' */ +#line 1026 "bison_parser.y" { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 4295 "bison_parser.cpp" +#line 4327 "bison_parser.cpp" break; - case 202: /* array_index: operand '[' int_literal ']' */ -#line 1029 "bison_parser.y" + case 203: /* array_index: operand '[' int_literal ']' */ +#line 1030 "bison_parser.y" { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 4301 "bison_parser.cpp" +#line 4333 "bison_parser.cpp" break; - case 203: /* between_expr: operand BETWEEN operand AND operand */ -#line 1033 "bison_parser.y" + case 204: /* between_expr: operand BETWEEN operand AND operand */ +#line 1034 "bison_parser.y" { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4307 "bison_parser.cpp" +#line 4339 "bison_parser.cpp" break; - case 204: /* column_name: IDENTIFIER */ -#line 1037 "bison_parser.y" + case 205: /* column_name: IDENTIFIER */ +#line 1038 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 4313 "bison_parser.cpp" +#line 4345 "bison_parser.cpp" break; - case 205: /* column_name: IDENTIFIER '.' IDENTIFIER */ -#line 1038 "bison_parser.y" + case 206: /* column_name: IDENTIFIER '.' IDENTIFIER */ +#line 1039 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 4319 "bison_parser.cpp" +#line 4351 "bison_parser.cpp" break; - case 206: /* column_name: '*' */ -#line 1039 "bison_parser.y" + case 207: /* column_name: '*' */ +#line 1040 "bison_parser.y" { (yyval.expr) = Expr::makeStar(); } -#line 4325 "bison_parser.cpp" +#line 4357 "bison_parser.cpp" break; - case 207: /* column_name: IDENTIFIER '.' '*' */ -#line 1040 "bison_parser.y" + case 208: /* column_name: IDENTIFIER '.' '*' */ +#line 1041 "bison_parser.y" { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 4331 "bison_parser.cpp" +#line 4363 "bison_parser.cpp" break; - case 213: /* string_literal: STRING */ -#line 1052 "bison_parser.y" + case 214: /* string_literal: STRING */ +#line 1053 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 4337 "bison_parser.cpp" +#line 4369 "bison_parser.cpp" break; - case 214: /* bool_literal: TRUE */ -#line 1056 "bison_parser.y" + case 215: /* bool_literal: TRUE */ +#line 1057 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(true); } -#line 4343 "bison_parser.cpp" +#line 4375 "bison_parser.cpp" break; - case 215: /* bool_literal: FALSE */ -#line 1057 "bison_parser.y" + case 216: /* bool_literal: FALSE */ +#line 1058 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(false); } -#line 4349 "bison_parser.cpp" +#line 4381 "bison_parser.cpp" break; - case 216: /* num_literal: FLOATVAL */ -#line 1061 "bison_parser.y" + case 217: /* num_literal: FLOATVAL */ +#line 1062 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 4355 "bison_parser.cpp" +#line 4387 "bison_parser.cpp" break; - case 218: /* int_literal: INTVAL */ -#line 1066 "bison_parser.y" + case 219: /* int_literal: INTVAL */ +#line 1067 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 4361 "bison_parser.cpp" +#line 4393 "bison_parser.cpp" break; - case 219: /* null_literal: NULL */ -#line 1070 "bison_parser.y" + case 220: /* null_literal: NULL */ +#line 1071 "bison_parser.y" { (yyval.expr) = Expr::makeNullLiteral(); } -#line 4367 "bison_parser.cpp" +#line 4399 "bison_parser.cpp" break; - case 220: /* param_expr: '?' */ -#line 1074 "bison_parser.y" + case 221: /* param_expr: '?' */ +#line 1075 "bison_parser.y" { (yyval.expr) = Expr::makeParameter(yylloc.total_column); (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 4377 "bison_parser.cpp" +#line 4409 "bison_parser.cpp" break; - case 222: /* table_ref: table_ref_commalist ',' table_ref_atomic */ -#line 1087 "bison_parser.y" + case 223: /* table_ref: table_ref_commalist ',' table_ref_atomic */ +#line 1088 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); auto tbl = new TableRef(kTableCrossProduct); tbl->list = (yyvsp[-2].table_vec); (yyval.table) = tbl; } -#line 4388 "bison_parser.cpp" +#line 4420 "bison_parser.cpp" break; - case 226: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ -#line 1103 "bison_parser.y" + case 227: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ +#line 1104 "bison_parser.y" { auto tbl = new TableRef(kTableSelect); tbl->select = (yyvsp[-2].select_stmt); tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4399 "bison_parser.cpp" +#line 4431 "bison_parser.cpp" break; - case 227: /* table_ref_commalist: table_ref_atomic */ -#line 1112 "bison_parser.y" + case 228: /* table_ref_commalist: table_ref_atomic */ +#line 1113 "bison_parser.y" { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 4405 "bison_parser.cpp" +#line 4437 "bison_parser.cpp" break; - case 228: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ -#line 1113 "bison_parser.y" + case 229: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ +#line 1114 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 4411 "bison_parser.cpp" +#line 4443 "bison_parser.cpp" break; - case 229: /* table_ref_name: table_name opt_table_alias */ -#line 1118 "bison_parser.y" + case 230: /* table_ref_name: table_name opt_table_alias */ +#line 1119 "bison_parser.y" { auto tbl = new TableRef(kTableName); tbl->schema = (yyvsp[-1].table_name).schema; @@ -4419,121 +4451,121 @@ YYLTYPE yylloc = yyloc_default; tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4423 "bison_parser.cpp" +#line 4455 "bison_parser.cpp" break; - case 230: /* table_ref_name_no_alias: table_name */ -#line 1129 "bison_parser.y" + case 231: /* table_ref_name_no_alias: table_name */ +#line 1130 "bison_parser.y" { (yyval.table) = new TableRef(kTableName); (yyval.table)->schema = (yyvsp[0].table_name).schema; (yyval.table)->name = (yyvsp[0].table_name).name; } -#line 4433 "bison_parser.cpp" +#line 4465 "bison_parser.cpp" break; - case 231: /* table_name: IDENTIFIER */ -#line 1138 "bison_parser.y" + case 232: /* table_name: IDENTIFIER */ +#line 1139 "bison_parser.y" { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} -#line 4439 "bison_parser.cpp" +#line 4471 "bison_parser.cpp" break; - case 232: /* table_name: IDENTIFIER '.' IDENTIFIER */ -#line 1139 "bison_parser.y" + case 233: /* table_name: IDENTIFIER '.' IDENTIFIER */ +#line 1140 "bison_parser.y" { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } -#line 4445 "bison_parser.cpp" +#line 4477 "bison_parser.cpp" break; - case 233: /* opt_index_name: IDENTIFIER */ -#line 1143 "bison_parser.y" + case 234: /* opt_index_name: IDENTIFIER */ +#line 1144 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4451 "bison_parser.cpp" +#line 4483 "bison_parser.cpp" break; - case 234: /* opt_index_name: %empty */ -#line 1144 "bison_parser.y" + case 235: /* opt_index_name: %empty */ +#line 1145 "bison_parser.y" { (yyval.sval) = nullptr;} -#line 4457 "bison_parser.cpp" +#line 4489 "bison_parser.cpp" break; - case 235: /* index_name: IDENTIFIER */ -#line 1148 "bison_parser.y" + case 236: /* index_name: IDENTIFIER */ +#line 1149 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4463 "bison_parser.cpp" +#line 4495 "bison_parser.cpp" break; - case 237: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ -#line 1154 "bison_parser.y" + case 238: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ +#line 1155 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } -#line 4469 "bison_parser.cpp" +#line 4501 "bison_parser.cpp" break; - case 239: /* opt_table_alias: %empty */ -#line 1160 "bison_parser.y" + case 240: /* opt_table_alias: %empty */ +#line 1161 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4475 "bison_parser.cpp" +#line 4507 "bison_parser.cpp" break; - case 240: /* alias: AS IDENTIFIER */ -#line 1165 "bison_parser.y" + case 241: /* alias: AS IDENTIFIER */ +#line 1166 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4481 "bison_parser.cpp" +#line 4513 "bison_parser.cpp" break; - case 241: /* alias: IDENTIFIER */ -#line 1166 "bison_parser.y" + case 242: /* alias: IDENTIFIER */ +#line 1167 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4487 "bison_parser.cpp" +#line 4519 "bison_parser.cpp" break; - case 243: /* opt_alias: %empty */ -#line 1172 "bison_parser.y" + case 244: /* opt_alias: %empty */ +#line 1173 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4493 "bison_parser.cpp" +#line 4525 "bison_parser.cpp" break; - case 245: /* opt_with_clause: %empty */ -#line 1182 "bison_parser.y" + case 246: /* opt_with_clause: %empty */ +#line 1183 "bison_parser.y" { (yyval.with_description_vec) = nullptr; } -#line 4499 "bison_parser.cpp" +#line 4531 "bison_parser.cpp" break; - case 246: /* with_clause: WITH with_description_list */ -#line 1186 "bison_parser.y" + case 247: /* with_clause: WITH with_description_list */ +#line 1187 "bison_parser.y" { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } -#line 4505 "bison_parser.cpp" +#line 4537 "bison_parser.cpp" break; - case 247: /* with_description_list: with_description */ -#line 1190 "bison_parser.y" + case 248: /* with_description_list: with_description */ +#line 1191 "bison_parser.y" { (yyval.with_description_vec) = new std::vector(); (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); } -#line 4514 "bison_parser.cpp" +#line 4546 "bison_parser.cpp" break; - case 248: /* with_description_list: with_description_list ',' with_description */ -#line 1194 "bison_parser.y" + case 249: /* with_description_list: with_description_list ',' with_description */ +#line 1195 "bison_parser.y" { (yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t)); (yyval.with_description_vec) = (yyvsp[-2].with_description_vec); } -#line 4523 "bison_parser.cpp" +#line 4555 "bison_parser.cpp" break; - case 249: /* with_description: IDENTIFIER AS select_with_paren */ -#line 1201 "bison_parser.y" + case 250: /* with_description: IDENTIFIER AS select_with_paren */ +#line 1202 "bison_parser.y" { (yyval.with_description_t) = new WithDescription(); (yyval.with_description_t)->alias = (yyvsp[-2].sval); (yyval.with_description_t)->select = (yyvsp[0].select_stmt); } -#line 4533 "bison_parser.cpp" +#line 4565 "bison_parser.cpp" break; - case 250: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ -#line 1215 "bison_parser.y" + case 251: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ +#line 1216 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4541,11 +4573,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 4545 "bison_parser.cpp" +#line 4577 "bison_parser.cpp" break; - case 251: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ -#line 1223 "bison_parser.y" + case 252: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ +#line 1224 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4554,11 +4586,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 4558 "bison_parser.cpp" +#line 4590 "bison_parser.cpp" break; - case 252: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ -#line 1233 "bison_parser.y" + case 253: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ +#line 1234 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4574,83 +4606,83 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } -#line 4578 "bison_parser.cpp" +#line 4610 "bison_parser.cpp" break; - case 253: /* opt_join_type: INNER */ -#line 1251 "bison_parser.y" - { (yyval.uval) = kJoinInner; } -#line 4584 "bison_parser.cpp" - break; - - case 254: /* opt_join_type: LEFT OUTER */ + case 254: /* opt_join_type: INNER */ #line 1252 "bison_parser.y" - { (yyval.uval) = kJoinLeft; } -#line 4590 "bison_parser.cpp" + { (yyval.uval) = kJoinInner; } +#line 4616 "bison_parser.cpp" break; - case 255: /* opt_join_type: LEFT */ + case 255: /* opt_join_type: LEFT OUTER */ #line 1253 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4596 "bison_parser.cpp" +#line 4622 "bison_parser.cpp" break; - case 256: /* opt_join_type: RIGHT OUTER */ + case 256: /* opt_join_type: LEFT */ #line 1254 "bison_parser.y" - { (yyval.uval) = kJoinRight; } -#line 4602 "bison_parser.cpp" + { (yyval.uval) = kJoinLeft; } +#line 4628 "bison_parser.cpp" break; - case 257: /* opt_join_type: RIGHT */ + case 257: /* opt_join_type: RIGHT OUTER */ #line 1255 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4608 "bison_parser.cpp" +#line 4634 "bison_parser.cpp" break; - case 258: /* opt_join_type: FULL OUTER */ + case 258: /* opt_join_type: RIGHT */ #line 1256 "bison_parser.y" - { (yyval.uval) = kJoinFull; } -#line 4614 "bison_parser.cpp" + { (yyval.uval) = kJoinRight; } +#line 4640 "bison_parser.cpp" break; - case 259: /* opt_join_type: OUTER */ + case 259: /* opt_join_type: FULL OUTER */ #line 1257 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4620 "bison_parser.cpp" +#line 4646 "bison_parser.cpp" break; - case 260: /* opt_join_type: FULL */ + case 260: /* opt_join_type: OUTER */ #line 1258 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4626 "bison_parser.cpp" +#line 4652 "bison_parser.cpp" break; - case 261: /* opt_join_type: CROSS */ + case 261: /* opt_join_type: FULL */ #line 1259 "bison_parser.y" - { (yyval.uval) = kJoinCross; } -#line 4632 "bison_parser.cpp" + { (yyval.uval) = kJoinFull; } +#line 4658 "bison_parser.cpp" break; - case 262: /* opt_join_type: %empty */ + case 262: /* opt_join_type: CROSS */ #line 1260 "bison_parser.y" + { (yyval.uval) = kJoinCross; } +#line 4664 "bison_parser.cpp" + break; + + case 263: /* opt_join_type: %empty */ +#line 1261 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4638 "bison_parser.cpp" +#line 4670 "bison_parser.cpp" break; - case 266: /* ident_commalist: IDENTIFIER */ -#line 1280 "bison_parser.y" + case 267: /* ident_commalist: IDENTIFIER */ +#line 1281 "bison_parser.y" { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 4644 "bison_parser.cpp" +#line 4676 "bison_parser.cpp" break; - case 267: /* ident_commalist: ident_commalist ',' IDENTIFIER */ -#line 1281 "bison_parser.y" + case 268: /* ident_commalist: ident_commalist ',' IDENTIFIER */ +#line 1282 "bison_parser.y" { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 4650 "bison_parser.cpp" +#line 4682 "bison_parser.cpp" break; -#line 4654 "bison_parser.cpp" +#line 4686 "bison_parser.cpp" default: break; } @@ -4880,7 +4912,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 1284 "bison_parser.y" +#line 1285 "bison_parser.y" /********************************* ** Section 4: Additional C code diff --git a/src/parser/bison_parser.h b/src/parser/bison_parser.h index 034caa15..20d022ee 100644 --- a/src/parser/bison_parser.h +++ b/src/parser/bison_parser.h @@ -114,129 +114,131 @@ extern int hsql_debug; SQL_PREPARE = 281, /* PREPARE */ SQL_PRIMARY = 282, /* PRIMARY */ SQL_SCHEMAS = 283, /* SCHEMAS */ - SQL_SPATIAL = 284, /* SPATIAL */ - SQL_VARCHAR = 285, /* VARCHAR */ - SQL_VIRTUAL = 286, /* VIRTUAL */ - SQL_DESCRIBE = 287, /* DESCRIBE */ - SQL_BEFORE = 288, /* BEFORE */ - SQL_COLUMN = 289, /* COLUMN */ - SQL_CREATE = 290, /* CREATE */ - SQL_DELETE = 291, /* DELETE */ - SQL_DIRECT = 292, /* DIRECT */ - SQL_DOUBLE = 293, /* DOUBLE */ - SQL_ESCAPE = 294, /* ESCAPE */ - SQL_EXCEPT = 295, /* EXCEPT */ - SQL_EXISTS = 296, /* EXISTS */ - SQL_EXTRACT = 297, /* EXTRACT */ - SQL_CAST = 298, /* CAST */ - SQL_FORMAT = 299, /* FORMAT */ - SQL_GLOBAL = 300, /* GLOBAL */ - SQL_HAVING = 301, /* HAVING */ - SQL_IMPORT = 302, /* IMPORT */ - SQL_INSERT = 303, /* INSERT */ - SQL_ISNULL = 304, /* ISNULL */ - SQL_OFFSET = 305, /* OFFSET */ - SQL_RENAME = 306, /* RENAME */ - SQL_SCHEMA = 307, /* SCHEMA */ - SQL_SELECT = 308, /* SELECT */ - SQL_SORTED = 309, /* SORTED */ - SQL_TABLES = 310, /* TABLES */ - SQL_UNIQUE = 311, /* UNIQUE */ - SQL_UNLOAD = 312, /* UNLOAD */ - SQL_UPDATE = 313, /* UPDATE */ - SQL_VALUES = 314, /* VALUES */ - SQL_AFTER = 315, /* AFTER */ - SQL_ALTER = 316, /* ALTER */ - SQL_CROSS = 317, /* CROSS */ - SQL_DELTA = 318, /* DELTA */ - SQL_FLOAT = 319, /* FLOAT */ - SQL_GROUP = 320, /* GROUP */ - SQL_INDEX = 321, /* INDEX */ - SQL_INNER = 322, /* INNER */ - SQL_LIMIT = 323, /* LIMIT */ - SQL_LOCAL = 324, /* LOCAL */ - SQL_MERGE = 325, /* MERGE */ - SQL_MINUS = 326, /* MINUS */ - SQL_ORDER = 327, /* ORDER */ - SQL_OUTER = 328, /* OUTER */ - SQL_RIGHT = 329, /* RIGHT */ - SQL_TABLE = 330, /* TABLE */ - SQL_UNION = 331, /* UNION */ - SQL_USING = 332, /* USING */ - SQL_WHERE = 333, /* WHERE */ - SQL_CALL = 334, /* CALL */ - SQL_CASE = 335, /* CASE */ - SQL_CHAR = 336, /* CHAR */ - SQL_COPY = 337, /* COPY */ - SQL_DATE = 338, /* DATE */ - SQL_DATETIME = 339, /* DATETIME */ - SQL_DESC = 340, /* DESC */ - SQL_DROP = 341, /* DROP */ - SQL_ELSE = 342, /* ELSE */ - SQL_FILE = 343, /* FILE */ - SQL_FROM = 344, /* FROM */ - SQL_FULL = 345, /* FULL */ - SQL_HASH = 346, /* HASH */ - SQL_HINT = 347, /* HINT */ - SQL_INTO = 348, /* INTO */ - SQL_JOIN = 349, /* JOIN */ - SQL_LEFT = 350, /* LEFT */ - SQL_LIKE = 351, /* LIKE */ - SQL_LOAD = 352, /* LOAD */ - SQL_LONG = 353, /* LONG */ - SQL_NULL = 354, /* NULL */ - SQL_PLAN = 355, /* PLAN */ - SQL_SHOW = 356, /* SHOW */ - SQL_TEXT = 357, /* TEXT */ - SQL_THEN = 358, /* THEN */ - SQL_TIME = 359, /* TIME */ - SQL_VIEW = 360, /* VIEW */ - SQL_WHEN = 361, /* WHEN */ - SQL_WITH = 362, /* WITH */ - SQL_ADD = 363, /* ADD */ - SQL_ALL = 364, /* ALL */ - SQL_AND = 365, /* AND */ - SQL_ASC = 366, /* ASC */ - SQL_END = 367, /* END */ - SQL_FOR = 368, /* FOR */ - SQL_INT = 369, /* INT */ - SQL_KEY = 370, /* KEY */ - SQL_NOT = 371, /* NOT */ - SQL_OFF = 372, /* OFF */ - SQL_SET = 373, /* SET */ - SQL_TOP = 374, /* TOP */ - SQL_AS = 375, /* AS */ - SQL_BY = 376, /* BY */ - SQL_IF = 377, /* IF */ - SQL_IN = 378, /* IN */ - SQL_IS = 379, /* IS */ - SQL_OF = 380, /* OF */ - SQL_ON = 381, /* ON */ - SQL_OR = 382, /* OR */ - SQL_TO = 383, /* TO */ - SQL_ARRAY = 384, /* ARRAY */ - SQL_CONCAT = 385, /* CONCAT */ - SQL_ILIKE = 386, /* ILIKE */ - SQL_SECOND = 387, /* SECOND */ - SQL_MINUTE = 388, /* MINUTE */ - SQL_HOUR = 389, /* HOUR */ - SQL_DAY = 390, /* DAY */ - SQL_MONTH = 391, /* MONTH */ - SQL_YEAR = 392, /* YEAR */ - SQL_TRUE = 393, /* TRUE */ - SQL_FALSE = 394, /* FALSE */ - SQL_TRANSACTION = 395, /* TRANSACTION */ - SQL_BEGIN = 396, /* BEGIN */ - SQL_COMMIT = 397, /* COMMIT */ - SQL_ROLLBACK = 398, /* ROLLBACK */ - SQL_EQUALS = 399, /* EQUALS */ - SQL_NOTEQUALS = 400, /* NOTEQUALS */ - SQL_LESS = 401, /* LESS */ - SQL_GREATER = 402, /* GREATER */ - SQL_LESSEQ = 403, /* LESSEQ */ - SQL_GREATEREQ = 404, /* GREATEREQ */ - SQL_NOTNULL = 405, /* NOTNULL */ - SQL_UMINUS = 406 /* UMINUS */ + SQL_CHARACTER = 284, /* CHARACTER */ + SQL_VARYING = 285, /* VARYING */ + SQL_SPATIAL = 286, /* SPATIAL */ + SQL_VARCHAR = 287, /* VARCHAR */ + SQL_VIRTUAL = 288, /* VIRTUAL */ + SQL_DESCRIBE = 289, /* DESCRIBE */ + SQL_BEFORE = 290, /* BEFORE */ + SQL_COLUMN = 291, /* COLUMN */ + SQL_CREATE = 292, /* CREATE */ + SQL_DELETE = 293, /* DELETE */ + SQL_DIRECT = 294, /* DIRECT */ + SQL_DOUBLE = 295, /* DOUBLE */ + SQL_ESCAPE = 296, /* ESCAPE */ + SQL_EXCEPT = 297, /* EXCEPT */ + SQL_EXISTS = 298, /* EXISTS */ + SQL_EXTRACT = 299, /* EXTRACT */ + SQL_CAST = 300, /* CAST */ + SQL_FORMAT = 301, /* FORMAT */ + SQL_GLOBAL = 302, /* GLOBAL */ + SQL_HAVING = 303, /* HAVING */ + SQL_IMPORT = 304, /* IMPORT */ + SQL_INSERT = 305, /* INSERT */ + SQL_ISNULL = 306, /* ISNULL */ + SQL_OFFSET = 307, /* OFFSET */ + SQL_RENAME = 308, /* RENAME */ + SQL_SCHEMA = 309, /* SCHEMA */ + SQL_SELECT = 310, /* SELECT */ + SQL_SORTED = 311, /* SORTED */ + SQL_TABLES = 312, /* TABLES */ + SQL_UNIQUE = 313, /* UNIQUE */ + SQL_UNLOAD = 314, /* UNLOAD */ + SQL_UPDATE = 315, /* UPDATE */ + SQL_VALUES = 316, /* VALUES */ + SQL_AFTER = 317, /* AFTER */ + SQL_ALTER = 318, /* ALTER */ + SQL_CROSS = 319, /* CROSS */ + SQL_DELTA = 320, /* DELTA */ + SQL_FLOAT = 321, /* FLOAT */ + SQL_GROUP = 322, /* GROUP */ + SQL_INDEX = 323, /* INDEX */ + SQL_INNER = 324, /* INNER */ + SQL_LIMIT = 325, /* LIMIT */ + SQL_LOCAL = 326, /* LOCAL */ + SQL_MERGE = 327, /* MERGE */ + SQL_MINUS = 328, /* MINUS */ + SQL_ORDER = 329, /* ORDER */ + SQL_OUTER = 330, /* OUTER */ + SQL_RIGHT = 331, /* RIGHT */ + SQL_TABLE = 332, /* TABLE */ + SQL_UNION = 333, /* UNION */ + SQL_USING = 334, /* USING */ + SQL_WHERE = 335, /* WHERE */ + SQL_CALL = 336, /* CALL */ + SQL_CASE = 337, /* CASE */ + SQL_CHAR = 338, /* CHAR */ + SQL_COPY = 339, /* COPY */ + SQL_DATE = 340, /* DATE */ + SQL_DATETIME = 341, /* DATETIME */ + SQL_DESC = 342, /* DESC */ + SQL_DROP = 343, /* DROP */ + SQL_ELSE = 344, /* ELSE */ + SQL_FILE = 345, /* FILE */ + SQL_FROM = 346, /* FROM */ + SQL_FULL = 347, /* FULL */ + SQL_HASH = 348, /* HASH */ + SQL_HINT = 349, /* HINT */ + SQL_INTO = 350, /* INTO */ + SQL_JOIN = 351, /* JOIN */ + SQL_LEFT = 352, /* LEFT */ + SQL_LIKE = 353, /* LIKE */ + SQL_LOAD = 354, /* LOAD */ + SQL_LONG = 355, /* LONG */ + SQL_NULL = 356, /* NULL */ + SQL_PLAN = 357, /* PLAN */ + SQL_SHOW = 358, /* SHOW */ + SQL_TEXT = 359, /* TEXT */ + SQL_THEN = 360, /* THEN */ + SQL_TIME = 361, /* TIME */ + SQL_VIEW = 362, /* VIEW */ + SQL_WHEN = 363, /* WHEN */ + SQL_WITH = 364, /* WITH */ + SQL_ADD = 365, /* ADD */ + SQL_ALL = 366, /* ALL */ + SQL_AND = 367, /* AND */ + SQL_ASC = 368, /* ASC */ + SQL_END = 369, /* END */ + SQL_FOR = 370, /* FOR */ + SQL_INT = 371, /* INT */ + SQL_KEY = 372, /* KEY */ + SQL_NOT = 373, /* NOT */ + SQL_OFF = 374, /* OFF */ + SQL_SET = 375, /* SET */ + SQL_TOP = 376, /* TOP */ + SQL_AS = 377, /* AS */ + SQL_BY = 378, /* BY */ + SQL_IF = 379, /* IF */ + SQL_IN = 380, /* IN */ + SQL_IS = 381, /* IS */ + SQL_OF = 382, /* OF */ + SQL_ON = 383, /* ON */ + SQL_OR = 384, /* OR */ + SQL_TO = 385, /* TO */ + SQL_ARRAY = 386, /* ARRAY */ + SQL_CONCAT = 387, /* CONCAT */ + SQL_ILIKE = 388, /* ILIKE */ + SQL_SECOND = 389, /* SECOND */ + SQL_MINUTE = 390, /* MINUTE */ + SQL_HOUR = 391, /* HOUR */ + SQL_DAY = 392, /* DAY */ + SQL_MONTH = 393, /* MONTH */ + SQL_YEAR = 394, /* YEAR */ + SQL_TRUE = 395, /* TRUE */ + SQL_FALSE = 396, /* FALSE */ + SQL_TRANSACTION = 397, /* TRANSACTION */ + SQL_BEGIN = 398, /* BEGIN */ + SQL_COMMIT = 399, /* COMMIT */ + SQL_ROLLBACK = 400, /* ROLLBACK */ + SQL_EQUALS = 401, /* EQUALS */ + SQL_NOTEQUALS = 402, /* NOTEQUALS */ + SQL_LESS = 403, /* LESS */ + SQL_GREATER = 404, /* GREATER */ + SQL_LESSEQ = 405, /* LESSEQ */ + SQL_GREATEREQ = 406, /* GREATEREQ */ + SQL_NOTNULL = 407, /* NOTNULL */ + SQL_UMINUS = 408 /* UMINUS */ }; typedef enum hsql_tokentype hsql_token_kind_t; #endif @@ -293,7 +295,7 @@ union HSQL_STYPE std::vector* order_vec; std::vector* with_description_vec; -#line 297 "bison_parser.h" +#line 299 "bison_parser.h" }; typedef union HSQL_STYPE HSQL_STYPE; diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 72081894..5d65acf2 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -169,7 +169,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha %token DEALLOCATE PARAMETERS INTERSECT TEMPORARY TIMESTAMP %token DISTINCT NVARCHAR RESTRICT TRUNCATE ANALYZE BETWEEN %token CASCADE COLUMNS CONTROL DEFAULT EXECUTE EXPLAIN -%token INTEGER NATURAL PREPARE PRIMARY SCHEMAS +%token INTEGER NATURAL PREPARE PRIMARY SCHEMAS CHARACTER VARYING %token SPATIAL VARCHAR VIRTUAL DESCRIBE BEFORE COLUMN CREATE DELETE DIRECT %token DOUBLE ESCAPE EXCEPT EXISTS EXTRACT CAST FORMAT GLOBAL HAVING IMPORT %token INSERT ISNULL OFFSET RENAME SCHEMA SELECT SORTED @@ -568,6 +568,7 @@ column_type: | FLOAT { $$ = ColumnType{DataType::FLOAT}; } | DOUBLE { $$ = ColumnType{DataType::DOUBLE}; } | VARCHAR '(' INTVAL ')' { $$ = ColumnType{DataType::VARCHAR, $3}; } + | CHARACTER VARYING'(' INTVAL ')' { $$ = ColumnType{DataType::VARCHAR, $4}; } | CHAR '(' INTVAL ')' { $$ = ColumnType{DataType::CHAR, $3}; } | TEXT { $$ = ColumnType{DataType::TEXT}; } | DATETIME { $$ = ColumnType{DataType::DATETIME}; } diff --git a/src/parser/flex_lexer.cpp b/src/parser/flex_lexer.cpp index f1305f36..deb1689b 100644 --- a/src/parser/flex_lexer.cpp +++ b/src/parser/flex_lexer.cpp @@ -573,8 +573,8 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 159 -#define YY_END_OF_BUFFER 160 +#define YY_NUM_RULES 161 +#define YY_END_OF_BUFFER 162 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -582,27 +582,27 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[1120] = +static const flex_int16_t yy_accept[1138] = { 0, - 0, 0, 156, 156, 2, 2, 160, 158, 4, 4, - 158, 158, 147, 154, 147, 147, 151, 147, 147, 147, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 147, 156, 157, 2, 2, 3, + 0, 0, 158, 158, 2, 2, 162, 160, 4, 4, + 160, 160, 149, 156, 149, 149, 153, 149, 149, 149, + 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, + 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, + 155, 155, 155, 155, 149, 158, 159, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 4, 142, 0, 1, 0, - 149, 148, 151, 144, 143, 141, 145, 153, 153, 153, - - 153, 153, 153, 120, 153, 121, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 122, 153, 153, 123, 124, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 125, 126, 127, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 128, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 146, 156, 155, 2, + 2, 2, 2, 2, 2, 4, 144, 0, 1, 0, + 151, 150, 153, 146, 145, 143, 147, 155, 155, 155, + + 155, 155, 155, 122, 155, 123, 155, 155, 155, 155, + 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, + 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, + 124, 155, 155, 125, 126, 155, 155, 155, 155, 155, + 155, 155, 155, 155, 155, 155, 155, 127, 128, 129, + 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, + 155, 155, 155, 155, 155, 155, 130, 155, 155, 155, + 155, 155, 155, 155, 155, 155, 148, 158, 157, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -613,19 +613,19 @@ static const flex_int16_t yy_accept[1120] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 152, 0, 148, 108, 153, 109, 153, 153, - 110, 153, 111, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 132, 153, 153, 153, - - 153, 153, 153, 153, 153, 153, 112, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 113, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 114, 153, 153, 115, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 116, 153, 153, 117, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 118, 153, 153, 153, 153, 153, 153, 153, 153, - 119, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 2, 2, 2, 2, 2, 2, + 2, 2, 154, 0, 150, 110, 155, 111, 155, 155, + 112, 155, 113, 155, 155, 155, 155, 155, 155, 155, + 155, 155, 155, 155, 155, 155, 134, 155, 155, 155, + + 155, 155, 155, 155, 155, 155, 114, 155, 155, 155, + 155, 155, 155, 155, 155, 155, 115, 155, 155, 155, + 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, + 116, 155, 155, 117, 155, 155, 155, 155, 155, 155, + 155, 155, 155, 155, 118, 155, 155, 119, 155, 155, + 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, + 155, 120, 155, 155, 155, 155, 155, 155, 155, 155, + 121, 155, 155, 155, 155, 155, 155, 155, 155, 155, + 155, 155, 155, 155, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -637,20 +637,20 @@ static const flex_int16_t yy_accept[1120] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 0, 153, 153, 153, - - 153, 153, 153, 153, 78, 153, 79, 41, 80, 153, - 153, 153, 81, 153, 153, 82, 153, 153, 153, 153, - 84, 153, 153, 153, 85, 86, 153, 153, 153, 153, - 153, 153, 153, 87, 153, 153, 88, 89, 153, 153, - 90, 153, 91, 131, 153, 153, 153, 153, 153, 153, - 92, 153, 93, 94, 95, 153, 97, 153, 98, 153, - 153, 153, 153, 99, 153, 153, 153, 153, 153, 100, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 101, - 153, 153, 153, 153, 102, 103, 104, 153, 135, 153, - 153, 153, 153, 153, 153, 153, 153, 105, 153, 106, - - 153, 107, 134, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 0, 155, 155, 155, + + 155, 155, 155, 155, 80, 155, 81, 43, 82, 155, + 155, 155, 83, 155, 155, 84, 155, 155, 155, 155, + 86, 155, 155, 155, 87, 88, 155, 155, 155, 155, + 155, 155, 155, 89, 155, 155, 90, 91, 155, 155, + 92, 155, 93, 133, 155, 155, 155, 155, 155, 155, + 94, 155, 95, 96, 97, 155, 99, 155, 100, 155, + 155, 155, 155, 101, 155, 155, 155, 155, 155, 102, + 155, 155, 155, 155, 155, 155, 155, 155, 155, 103, + 155, 155, 155, 155, 104, 105, 106, 155, 137, 155, + 155, 155, 155, 155, 155, 155, 155, 155, 107, 155, + + 108, 155, 109, 136, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -662,15 +662,15 @@ static const flex_int16_t yy_accept[1120] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 0, 58, 59, 153, 60, 153, 138, 153, 153, 153, - 153, 153, 153, 61, 153, 153, 153, 153, 62, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 136, - 63, 153, 153, 64, 153, 96, 153, 65, 66, 153, - 153, 153, 153, 67, 68, 69, 70, 153, 133, 153, - 153, 153, 71, 72, 153, 153, 153, 153, 153, 73, - 153, 153, 153, 153, 153, 153, 74, 153, 153, 153, - 153, 75, 153, 153, 153, 76, 153, 153, 153, 77, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 0, 60, 61, 155, 62, 155, 140, 155, + 155, 155, 155, 155, 155, 155, 63, 155, 155, 155, + 155, 64, 155, 155, 155, 155, 155, 155, 155, 155, + 155, 155, 138, 65, 155, 155, 66, 155, 98, 155, + 67, 68, 155, 155, 155, 155, 69, 70, 71, 72, + 155, 135, 155, 155, 155, 73, 74, 155, 155, 155, + 155, 155, 75, 155, 155, 155, 155, 155, 155, 76, + 155, 155, 155, 155, 77, 155, 155, 155, 78, 155, + 155, 155, 155, 79, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -679,34 +679,36 @@ static const flex_int16_t yy_accept[1120] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 0, 153, 31, 153, 153, 32, 140, 153, 33, 153, - 153, 153, 34, 153, 35, 153, 36, 37, 38, 153, - 39, 153, 153, 42, 43, 44, 45, 46, 153, 153, - - 47, 130, 153, 153, 48, 153, 153, 153, 49, 153, - 153, 50, 129, 51, 52, 153, 53, 153, 153, 153, - 153, 54, 55, 56, 57, 153, 153, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 0, 155, 33, 155, + 155, 155, 34, 142, 155, 35, 155, 155, 155, 36, + 155, 37, 155, 38, 39, 40, 155, 41, 155, 155, + + 44, 45, 46, 47, 48, 155, 155, 49, 132, 155, + 155, 50, 155, 155, 155, 51, 155, 155, 52, 131, + 53, 54, 155, 55, 155, 155, 155, 155, 56, 57, + 58, 59, 155, 155, 155, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 0, 15, 16, 17, 18, 19, - 153, 153, 20, 153, 153, 21, 22, 40, 23, 153, + 2, 2, 2, 2, 0, 15, 16, 17, 155, 18, - 24, 153, 153, 25, 26, 153, 153, 27, 28, 153, - 153, 153, 153, 29, 30, 2, 2, 2, 2, 2, + 19, 155, 155, 20, 155, 155, 21, 22, 42, 23, + 155, 24, 155, 155, 25, 26, 155, 155, 27, 28, + 155, 155, 155, 155, 29, 31, 32, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 0, 83, 153, 10, - 11, 153, 12, 153, 13, 139, 153, 153, 153, 14, + 0, 155, 85, 155, 10, 11, 155, 12, 155, 13, + 141, 155, 155, 155, 14, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 0, 153, 7, 153, 8, 9, - 153, 2, 2, 2, 2, 2, 2, 2, 0, 5, - 6, 153, 2, 2, 2, 2, 0, 137, 2, 2, + 0, 30, 155, 7, 155, 8, 9, 155, 2, 2, + 2, 2, 2, 2, 2, 2, 0, 5, 6, 155, + 2, 2, 2, 2, 0, 139, 2, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, - 0, 2, 0, 2, 0, 2, 150, 2, 0 + 0, 2, 0, 2, 152, 2, 0 } ; static const YY_CHAR yy_ec[256] = @@ -753,18 +755,18 @@ static const YY_CHAR yy_meta[77] = 5, 5, 5, 5, 5, 1 } ; -static const flex_int16_t yy_base[1127] = +static const flex_int16_t yy_base[1145] = { 0, - 0, 0, 709, 681, 76, 0, 668, 4466, 151, 153, - 643, 0, 4466, 4466, 149, 148, 160, 159, 625, 619, + 0, 0, 709, 681, 76, 0, 668, 4550, 151, 153, + 643, 0, 4550, 4550, 149, 148, 160, 159, 625, 619, 156, 156, 164, 162, 172, 223, 198, 211, 215, 151, 168, 210, 255, 257, 263, 262, 0, 277, 307, 350, 284, 221, 258, 171, 540, 0, 600, 0, 295, 308, 561, 576, 0, 0, 331, 408, 419, 321, 542, 512, 438, 514, 568, 620, 668, 720, 328, 426, 768, 329, 311, 434, 500, 820, 868, 505, 421, 513, 918, 970, - 515, 570, 455, 423, 450, 351, 4466, 520, 4466, 512, - 1035, 1045, 1056, 4466, 4466, 4466, 4466, 0, 174, 282, + 515, 570, 455, 423, 450, 351, 4550, 520, 4550, 512, + 1035, 1045, 1056, 4550, 4550, 4550, 4550, 0, 174, 282, 336, 520, 296, 315, 557, 0, 345, 334, 568, 511, 327, 611, 569, 345, 419, 421, 441, 444, 631, 469, @@ -773,7 +775,7 @@ static const flex_int16_t yy_base[1127] = 631, 657, 667, 663, 669, 678, 690, 689, 0, 693, 681, 685, 722, 722, 720, 726, 724, 729, 737, 727, 725, 743, 749, 762, 772, 766, 767, 784, 779, 785, - 781, 785, 818, 787, 775, 798, 4466, 0, 4466, 0, + 781, 785, 818, 787, 775, 798, 4550, 0, 4550, 0, 389, 0, 512, 0, 499, 1066, 1076, 1087, 0, 0, 0, 0, 806, 824, 855, 859, 913, 860, 878, 922, @@ -784,7 +786,7 @@ static const flex_int16_t yy_base[1127] = 1361, 1397, 1398, 1360, 1401, 1414, 1392, 1435, 1433, 1443, 1447, 1465, 1451, 1468, 1403, 1487, 1501, 1489, 1503, 1505, 1531, 1506, 1541, 1555, 1520, 1556, 1572, 1577, 1554, 1580, - 1598, 0, 4466, 498, 1645, 0, 822, 0, 829, 827, + 1598, 0, 4550, 498, 1645, 0, 822, 0, 829, 827, 0, 839, 0, 828, 879, 872, 907, 1640, 907, 910, 919, 929, 956, 982, 973, 1082, 0, 1079, 1097, 1323, @@ -796,114 +798,116 @@ static const flex_int16_t yy_base[1127] = 1673, 1661, 1661, 1672, 1696, 1678, 1691, 1691, 1700, 1691, 1702, 0, 1685, 1689, 1690, 1699, 1697, 1694, 1701, 1711, 0, 1703, 1713, 1704, 1705, 1721, 1709, 1707, 1726, 1708, - 1719, 1739, 1743, 1734, 0, 495, 1779, 1756, 1757, 1758, - 1760, 1781, 1772, 1786, 1790, 1802, 1794, 1800, 1816, 1840, - - 1831, 1826, 1848, 1857, 1832, 1866, 1874, 1834, 1870, 1885, - 1880, 1891, 1910, 1896, 1909, 1925, 1920, 1914, 1926, 1948, - 1939, 1962, 1950, 1974, 1963, 1965, 1978, 1984, 2014, 2015, - 1993, 2019, 2017, 2045, 2032, 2053, 2054, 2051, 2076, 2070, - 2082, 2085, 2104, 2091, 2099, 2110, 2125, 2116, 2144, 2150, - 2158, 2153, 2159, 2174, 2169, 2183, 2187, 2195, 2212, 2204, - 2193, 2208, 2223, 2227, 2233, 2241, 2262, 2257, 2266, 2283, - 2267, 2281, 2275, 2278, 2306, 2292, 2300, 2316, 2321, 2329, - 2337, 2311, 2335, 2345, 2360, 2378, 2375, 2374, 2391, 2383, - 2408, 2414, 2389, 2437, 2440, 2429, 491, 1784, 1915, 1922, - - 1979, 1989, 2019, 2056, 0, 2092, 0, 0, 0, 2085, - 2102, 2126, 0, 2150, 2223, 2223, 2333, 2336, 2351, 2390, - 2407, 2426, 2435, 2437, 0, 0, 2434, 2437, 2436, 2438, - 2458, 2462, 2462, 0, 2448, 2469, 0, 0, 2472, 2463, - 0, 2469, 0, 0, 2482, 2470, 2467, 2475, 2478, 2491, - 0, 2487, 0, 0, 0, 2481, 0, 2490, 0, 2498, - 2485, 2499, 2490, 0, 2508, 2507, 2495, 2498, 2504, 0, - 2518, 2520, 2509, 2506, 2507, 2531, 2524, 2527, 2539, 0, - 2540, 2538, 2545, 2537, 0, 0, 2534, 2536, 0, 2553, - 2543, 2537, 2558, 2541, 2555, 2558, 2557, 0, 2545, 0, - - 2562, 0, 0, 474, 2573, 2582, 2570, 2571, 2592, 2594, - 2596, 2604, 2615, 2606, 2607, 2625, 2628, 2640, 2637, 2646, - 2659, 2656, 2665, 2661, 2678, 2689, 2700, 2702, 2713, 2710, - 2719, 2724, 2728, 2732, 2734, 2758, 2762, 2767, 2768, 2756, - 2773, 2792, 2802, 2786, 2796, 2821, 2826, 2808, 2818, 2830, - 2831, 2832, 2847, 2842, 2863, 2871, 2880, 2872, 2895, 2881, - 2885, 2886, 2916, 2897, 2914, 2925, 2926, 2935, 2937, 2965, - 2939, 2970, 2954, 2980, 2983, 2971, 2988, 3013, 3025, 3011, - 3024, 3014, 3042, 3047, 3050, 3065, 3053, 3068, 3079, 3076, - 3081, 3078, 3084, 3093, 3102, 3117, 3121, 3127, 3135, 3156, - - 3130, 3165, 3133, 3139, 3161, 3171, 3170, 3173, 3175, 3184, - 442, 0, 0, 2669, 0, 2691, 0, 2784, 2798, 2887, - 2945, 2965, 2989, 0, 2995, 3012, 3080, 3189, 0, 3192, - 3184, 3192, 3205, 3206, 3192, 3194, 3196, 3209, 3217, 0, - 0, 3204, 3214, 0, 3222, 0, 3210, 0, 0, 3212, - 3229, 3216, 3228, 0, 0, 0, 0, 3238, 0, 3243, - 3238, 3228, 0, 0, 3244, 3232, 3234, 3249, 3246, 0, - 3257, 3259, 3259, 3244, 3261, 3265, 3249, 3251, 3252, 3273, - 3277, 0, 3275, 3279, 3279, 0, 3267, 3287, 3288, 0, - 441, 3289, 3292, 3293, 3295, 3297, 3298, 3301, 3327, 3323, - - 3331, 3352, 3329, 3337, 3361, 3367, 3375, 3363, 3366, 3396, - 3391, 3412, 3397, 3415, 3425, 3426, 3436, 3451, 3449, 3434, - 3437, 3460, 3479, 3465, 3488, 3489, 3503, 3494, 3500, 3504, - 3505, 3528, 3533, 3529, 3534, 3537, 3538, 3539, 3543, 3572, - 3571, 3562, 3573, 3583, 3587, 3602, 3608, 3596, 3613, 3605, - 3631, 3641, 3639, 3647, 3657, 3673, 3671, 3679, 3675, 3701, - 3707, 3705, 3709, 3711, 3713, 3715, 3739, 3745, 3747, 3744, - 435, 3303, 0, 3298, 3333, 3357, 0, 3373, 0, 3393, - 3405, 3416, 0, 3469, 0, 3472, 0, 0, 0, 3495, - 0, 3570, 3582, 0, 0, 0, 0, 0, 3613, 3636, - - 0, 0, 3638, 3685, 0, 3672, 3723, 3726, 0, 3751, - 3753, 3741, 0, 0, 0, 3750, 0, 3765, 3767, 3771, - 3760, 0, 0, 0, 0, 3764, 3772, 434, 3781, 3783, - 3789, 3785, 3793, 3795, 3811, 3797, 3819, 3823, 3837, 3829, - 3862, 3833, 3863, 3847, 3851, 3865, 3873, 3875, 3887, 3891, - 3877, 3881, 3899, 3905, 3915, 3916, 3917, 3921, 3927, 3950, - 3949, 3931, 3940, 3939, 3953, 3961, 3985, 3991, 3979, 3975, - 3994, 4003, 4017, 4007, 4013, 4019, 4045, 4047, 4028, 4029, - 4053, 4057, 4058, 4061, 429, 0, 0, 0, 0, 0, - 3787, 3803, 0, 3841, 3888, 0, 0, 0, 0, 3967, - - 0, 3958, 4004, 0, 0, 4010, 4053, 0, 0, 4050, - 4061, 4064, 4082, 0, 0, 404, 4083, 4087, 4091, 4093, - 4097, 4099, 4116, 4101, 4102, 4127, 4125, 4131, 4133, 4135, - 4159, 4141, 4170, 4165, 4167, 4171, 4181, 4189, 4173, 4199, - 4211, 4205, 4215, 4207, 4221, 4229, 402, 0, 4108, 0, - 0, 4122, 0, 4162, 0, 0, 4156, 4166, 4229, 0, - 401, 4239, 4250, 4244, 4247, 4263, 4253, 4269, 4261, 4275, - 4279, 4287, 4311, 4293, 397, 4245, 0, 4271, 0, 0, - 4291, 396, 4303, 4317, 4319, 4321, 4327, 4335, 383, 0, - 0, 4315, 382, 4329, 4332, 4361, 376, 0, 342, 4353, - - 333, 331, 303, 291, 278, 255, 250, 245, 243, 240, - 235, 221, 226, 197, 187, 173, 4466, 0, 4466, 4435, - 4440, 181, 4445, 4450, 4455, 4460 + 1719, 1739, 1744, 1741, 0, 495, 1779, 1756, 1757, 1758, + 1760, 1782, 1772, 1790, 1788, 1791, 1794, 1806, 1820, 1844, + + 1823, 1845, 1848, 1858, 1857, 1893, 1860, 1876, 1879, 1890, + 1898, 1912, 1911, 1902, 1915, 1944, 1950, 1928, 1933, 1956, + 1946, 1965, 1967, 1982, 1986, 1984, 1995, 2000, 2010, 2024, + 2021, 2038, 2034, 2036, 2049, 2052, 2073, 2064, 2078, 2075, + 2087, 2089, 2108, 2090, 2103, 2104, 2126, 2127, 2138, 2144, + 2152, 2157, 2160, 2176, 2163, 2181, 2182, 2193, 2198, 2212, + 2194, 2195, 2234, 2235, 2236, 2250, 2252, 2249, 2284, 2266, + 2268, 2292, 2278, 2289, 2290, 2303, 2306, 2320, 2332, 2341, + 2342, 2338, 2344, 2346, 2372, 2374, 2377, 2380, 2396, 2390, + 2420, 2426, 2415, 2439, 2431, 2409, 491, 1782, 1799, 1835, + + 1861, 1934, 1942, 2019, 0, 2078, 0, 0, 2096, 2121, + 2136, 2148, 0, 2191, 2202, 2252, 2273, 2285, 2307, 2379, + 2385, 2430, 2434, 2434, 0, 0, 2439, 2443, 2444, 2448, + 2468, 2473, 2470, 0, 2457, 2478, 0, 0, 2480, 2469, + 0, 2473, 0, 0, 2483, 2471, 2466, 2475, 2476, 2491, + 0, 2485, 0, 0, 0, 2479, 0, 2488, 0, 2498, + 2491, 2497, 2489, 0, 2510, 2513, 2501, 2504, 2510, 0, + 2527, 2528, 2518, 2515, 2515, 2537, 2528, 2528, 2540, 0, + 2539, 2538, 2543, 2536, 0, 0, 2533, 2534, 0, 2551, + 2543, 2538, 2560, 2543, 2557, 2560, 2559, 2563, 0, 2552, + + 0, 2571, 0, 0, 474, 2577, 2580, 2572, 2582, 2588, + 2596, 2591, 2606, 2614, 2622, 2625, 2640, 2631, 2644, 2657, + 2654, 2665, 2659, 2668, 2682, 2698, 2693, 2703, 2711, 2719, + 2728, 2727, 2722, 2733, 2752, 2756, 2757, 2771, 2782, 2792, + 2781, 2787, 2796, 2797, 2806, 2810, 2825, 2831, 2827, 2840, + 2835, 2836, 2841, 2846, 2865, 2877, 2881, 2889, 2879, 2900, + 2895, 2903, 2905, 2931, 2913, 2937, 2935, 2939, 2954, 2945, + 2943, 2967, 2979, 2980, 2985, 2989, 3003, 2988, 2997, 3022, + 3013, 3034, 3031, 3055, 3056, 3057, 3043, 3065, 3067, 3095, + 3080, 3086, 3089, 3097, 3105, 3120, 3101, 3110, 3129, 3139, + + 3154, 3143, 3151, 3164, 3169, 3175, 3173, 3187, 3188, 3192, + 3197, 3205, 442, 0, 0, 2582, 0, 2694, 0, 2737, + 2744, 2764, 2759, 2856, 2904, 2949, 0, 3006, 3061, 3111, + 3141, 0, 3179, 3179, 3195, 3209, 3213, 3203, 3208, 3212, + 3223, 3230, 0, 0, 3214, 3226, 0, 3235, 0, 3223, + 0, 0, 3226, 3242, 3229, 3239, 0, 0, 0, 0, + 3247, 0, 3252, 3246, 3236, 0, 0, 3257, 3245, 3246, + 3261, 3258, 0, 3267, 3270, 3268, 3256, 3273, 3281, 3265, + 3267, 3266, 3286, 3287, 0, 3287, 3292, 3292, 0, 3281, + 3300, 3288, 3304, 0, 441, 3301, 3305, 3313, 3311, 3315, + + 3316, 3317, 3330, 3347, 3346, 3365, 3349, 3351, 3368, 3379, + 3381, 3397, 3389, 3400, 3419, 3414, 3413, 3405, 3435, 3438, + 3448, 3437, 3467, 3472, 3454, 3459, 3473, 3469, 3491, 3502, + 3505, 3508, 3507, 3510, 3521, 3513, 3539, 3544, 3542, 3545, + 3547, 3556, 3561, 3570, 3579, 3584, 3585, 3593, 3595, 3596, + 3621, 3624, 3598, 3629, 3619, 3654, 3659, 3658, 3672, 3663, + 3673, 3688, 3691, 3697, 3707, 3713, 3721, 3722, 3726, 3723, + 3737, 3745, 3751, 3767, 3762, 3761, 435, 3312, 0, 3317, + 3375, 3369, 3389, 0, 3539, 0, 3574, 3603, 3623, 0, + 3656, 0, 3669, 0, 0, 0, 3728, 0, 3747, 3748, + + 0, 0, 0, 0, 0, 3753, 3775, 0, 0, 3770, + 3783, 0, 3765, 3791, 3775, 0, 3798, 3799, 3785, 0, + 0, 0, 3793, 0, 3805, 3809, 3812, 3796, 0, 0, + 0, 0, 3799, 3811, 3808, 434, 3816, 3821, 3825, 3829, + 3831, 3830, 3833, 3847, 3835, 3875, 3866, 3869, 3865, 3900, + 3879, 3903, 3887, 3888, 3898, 3909, 3917, 3931, 3933, 3919, + 3932, 3941, 3942, 3943, 3971, 3954, 3965, 3973, 3976, 3986, + 3977, 3987, 3995, 3999, 4005, 4030, 4038, 4021, 4017, 4027, + 4039, 4049, 4040, 4075, 4084, 4072, 4073, 4081, 4089, 4090, + 4094, 4105, 4124, 4123, 429, 0, 0, 0, 4016, 0, + + 0, 4051, 4083, 0, 4112, 4098, 0, 0, 0, 0, + 4129, 0, 4116, 4133, 0, 0, 4119, 4129, 0, 0, + 4125, 4134, 4131, 4147, 0, 0, 0, 404, 4148, 4158, + 4159, 4163, 4164, 4167, 4172, 4180, 4177, 4181, 4198, 4182, + 4196, 4212, 4215, 4233, 4217, 4221, 4230, 4236, 4246, 4252, + 4249, 4251, 4254, 4275, 4284, 4270, 4286, 4287, 4289, 4300, + 402, 4153, 0, 4205, 0, 0, 4223, 0, 4278, 0, + 0, 4283, 4294, 4304, 0, 401, 4324, 4321, 4323, 4325, + 4326, 4339, 4329, 4342, 4340, 4357, 4358, 4363, 4375, 4380, + 397, 0, 4361, 0, 4377, 0, 0, 4382, 396, 4393, + + 4394, 4396, 4397, 4408, 4409, 4432, 383, 0, 0, 4389, + 382, 4426, 4430, 4445, 376, 0, 342, 4431, 333, 331, + 303, 291, 278, 255, 250, 245, 243, 240, 235, 221, + 226, 197, 187, 173, 4550, 0, 4550, 4519, 4524, 181, + 4529, 4534, 4539, 4544 } ; -static const flex_int16_t yy_def[1127] = +static const flex_int16_t yy_def[1145] = { 0, - 1119, 1, 1120, 1120, 1119, 5, 1119, 1119, 1119, 1119, - 1119, 1121, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1119, 1123, 1119, 1124, 1124, 1119, - 1124, 1125, 1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124, - 1126, 1126, 62, 62, 62, 62, 62, 62, 62, 62, + 1137, 1, 1138, 1138, 1137, 5, 1137, 1137, 1137, 1137, + 1137, 1139, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1137, 1141, 1137, 1142, 1142, 1137, + 1142, 1143, 1142, 1142, 1142, 1142, 1142, 1142, 1142, 1142, + 1144, 1144, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 1124, 1119, 1119, 1121, 1119, 1119, - 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1122, 1122, 1122, - - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1119, 1123, 1119, 1124, - 1124, 1124, 1125, 1124, 1124, 1124, 1124, 1124, 1124, 1124, - 1124, 1124, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 1142, 1137, 1137, 1139, 1137, 1137, + 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1140, 1140, 1140, + + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1137, 1141, 1137, 1142, + 1142, 1142, 1143, 1142, 1142, 1142, 1142, 1142, 1142, 1142, + 1142, 1142, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, @@ -912,19 +916,19 @@ static const flex_int16_t yy_def[1127] = 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 1124, 1119, 1119, 1119, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1124, 1124, 1124, 62, 62, 62, + 62, 1142, 1137, 1137, 1137, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1142, 1142, 1142, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, @@ -936,20 +940,20 @@ static const flex_int16_t yy_def[1127] = 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 1119, 1122, 1122, 1122, - - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - - 1122, 1122, 1122, 1124, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 1137, 1140, 1140, 1140, + + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + + 1140, 1140, 1140, 1140, 1142, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, @@ -961,15 +965,15 @@ static const flex_int16_t yy_def[1127] = 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 1119, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1124, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 1137, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1142, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, @@ -978,38 +982,40 @@ static const flex_int16_t yy_def[1127] = 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 1119, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1124, 62, 62, + 62, 62, 62, 62, 62, 62, 1137, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1142, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 1119, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, + 62, 62, 62, 62, 1137, 1140, 1140, 1140, 1140, 1140, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1124, 62, 62, 62, 62, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1142, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 1119, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1124, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 1119, 1122, 1122, 1122, 1122, 1122, - 1122, 1124, 62, 62, 62, 62, 62, 62, 1119, 1122, - 1122, 1122, 1124, 62, 62, 62, 1119, 1122, 1124, 62, - - 1119, 1124, 1119, 1124, 1119, 1124, 1119, 1124, 1119, 1124, - 1119, 1124, 1119, 1124, 1119, 1124, 1119, 1124, 0, 1119, - 1119, 1119, 1119, 1119, 1119, 1119 + 1137, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, + 1140, 1140, 1140, 1140, 1140, 1142, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 1137, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1142, 62, + + 62, 62, 62, 62, 62, 62, 1137, 1140, 1140, 1140, + 1142, 62, 62, 62, 1137, 1140, 1142, 62, 1137, 1142, + 1137, 1142, 1137, 1142, 1137, 1142, 1137, 1142, 1137, 1142, + 1137, 1142, 1137, 1142, 1137, 1142, 0, 1137, 1137, 1137, + 1137, 1137, 1137, 1137 } ; -static const flex_int16_t yy_nxt[4543] = +static const flex_int16_t yy_nxt[4627] = { 0, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, @@ -1031,42 +1037,42 @@ static const flex_int16_t yy_nxt[4543] = 91, 91, 91, 91, 91, 91, 91, 90, 92, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 94, 95, 99, 105, 100, 111, 98, 107, 136, 112, 101, - 1118, 102, 113, 108, 137, 103, 104, 176, 114, 276, + 1136, 102, 113, 108, 137, 103, 104, 176, 114, 276, - 109, 115, 106, 110, 1117, 116, 1116, 117, 99, 105, + 109, 115, 106, 110, 1135, 116, 1134, 117, 99, 105, 100, 111, 118, 107, 136, 112, 101, 119, 102, 113, 108, 137, 103, 104, 176, 114, 276, 109, 115, 106, - 110, 126, 116, 128, 117, 1115, 138, 127, 1114, 118, + 110, 126, 116, 128, 117, 1133, 138, 127, 1132, 118, 139, 129, 131, 172, 119, 120, 140, 130, 132, 133, - 134, 173, 1113, 121, 1112, 135, 122, 1111, 126, 123, - 128, 1110, 124, 138, 127, 125, 1109, 139, 129, 131, - 172, 1108, 120, 140, 130, 132, 133, 134, 173, 144, + 134, 173, 1131, 121, 1130, 135, 122, 1129, 126, 123, + 128, 1128, 124, 138, 127, 125, 1127, 139, 129, 131, + 172, 1126, 120, 140, 130, 132, 133, 134, 173, 144, 121, 141, 135, 122, 152, 142, 123, 174, 175, 124, - 148, 143, 125, 145, 1107, 153, 181, 86, 149, 146, + 148, 143, 125, 145, 1125, 153, 181, 86, 149, 146, - 147, 154, 150, 155, 1106, 151, 144, 156, 141, 86, - 86, 152, 142, 157, 174, 175, 1105, 148, 143, 169, + 147, 154, 150, 155, 1124, 151, 144, 156, 141, 86, + 86, 152, 142, 157, 174, 175, 1123, 148, 143, 169, 145, 170, 153, 277, 171, 149, 146, 147, 154, 150, 155, 158, 151, 159, 156, 282, 160, 232, 184, 283, - 157, 189, 190, 161, 162, 1104, 169, 1103, 170, 185, - 277, 171, 86, 86, 193, 193, 289, 193, 158, 1102, + 157, 189, 190, 161, 162, 1122, 169, 1121, 170, 185, + 277, 171, 86, 86, 193, 193, 289, 193, 158, 1120, 159, 221, 282, 160, 232, 231, 283, 222, 296, 278, 161, 162, 163, 297, 193, 193, 164, 279, 287, 165, 166, 193, 193, 289, 193, 288, 167, 304, 221, 168, - 181, 86, 231, 1101, 222, 296, 278, 1099, 1097, 163, + 181, 86, 231, 1119, 222, 296, 278, 1117, 1115, 163, - 297, 193, 193, 164, 279, 287, 165, 166, 1093, 1089, - 1082, 1075, 288, 167, 304, 1061, 168, 186, 186, 186, + 297, 193, 193, 164, 279, 287, 165, 166, 1111, 1107, + 1099, 1091, 288, 167, 304, 1076, 168, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 187, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 180, 180, - 1047, 180, 180, 180, 180, 180, 180, 193, 223, 271, - 1016, 985, 193, 928, 871, 305, 224, 180, 180, 180, + 1061, 180, 180, 180, 180, 180, 180, 193, 223, 271, + 1028, 995, 193, 936, 877, 305, 224, 180, 180, 180, 233, 306, 225, 194, 234, 195, 307, 193, 308, 193, 235, 196, 193, 197, 193, 223, 271, 198, 199, 193, - 193, 193, 305, 224, 269, 270, 791, 233, 306, 225, + 193, 193, 305, 224, 269, 270, 795, 233, 306, 225, 194, 234, 195, 307, 193, 308, 193, 235, 196, 193, - 197, 193, 314, 711, 198, 199, 604, 193, 193, 497, + 197, 193, 314, 713, 198, 199, 605, 193, 193, 497, 386, 269, 270, 180, 180, 180, 385, 180, 180, 180, 180, 180, 180, 274, 273, 272, 236, 247, 193, 314, 237, 193, 192, 180, 180, 180, 238, 294, 248, 250, @@ -1083,49 +1089,49 @@ static const flex_int16_t yy_nxt[4543] = 292, 204, 293, 298, 205, 302, 303, 321, 299, 97, 324, 193, 206, 193, 300, 96, 207, 325, 326, 322, 208, 301, 323, 327, 332, 309, 209, 310, 333, 210, - 298, 311, 334, 87, 335, 299, 193, 1119, 312, 206, + 298, 311, 334, 87, 335, 299, 193, 1137, 312, 206, 341, 300, 313, 207, 325, 326, 322, 208, 301, 323, 327, 332, 309, 209, 310, 333, 210, 47, 311, 334, 328, 335, 342, 193, 193, 312, 336, 341, 337, 313, 329, 211, 343, 212, 344, 330, 331, 338, 213, 339, 345, 346, 347, 214, 193, 47, 348, 328, 349, 342, - 340, 193, 350, 336, 351, 337, 1119, 329, 211, 343, + 340, 193, 350, 336, 351, 337, 1137, 329, 211, 343, 212, 344, 330, 331, 338, 213, 339, 345, 346, 347, 214, 193, 215, 348, 352, 349, 193, 340, 353, 350, 216, 351, 354, 217, 357, 355, 218, 358, 359, 219, - 356, 360, 220, 363, 364, 365, 193, 1119, 1119, 215, - 361, 352, 366, 193, 1119, 353, 1119, 216, 362, 354, + 356, 360, 220, 363, 364, 365, 193, 1137, 1137, 215, + 361, 352, 366, 193, 1137, 353, 1137, 216, 362, 354, 217, 357, 355, 218, 358, 359, 219, 356, 360, 220, 363, 364, 365, 193, 193, 226, 367, 361, 369, 366, 370, 227, 228, 229, 371, 362, 372, 368, 230, 374, - 376, 377, 375, 382, 193, 1119, 383, 1119, 378, 1119, + 376, 377, 375, 382, 193, 1137, 383, 1137, 378, 1137, 384, 193, 226, 367, 379, 369, 373, 370, 227, 228, 229, 371, 193, 372, 368, 230, 374, 376, 377, 375, 382, 193, 239, 383, 380, 378, 193, 384, 498, 388, - 193, 379, 193, 373, 1119, 499, 240, 381, 1119, 193, - 500, 501, 241, 242, 502, 1119, 193, 1119, 1119, 239, - 193, 380, 1119, 193, 1119, 498, 388, 193, 1119, 193, - 1119, 193, 499, 240, 381, 193, 193, 500, 501, 241, + 193, 379, 193, 373, 1137, 499, 240, 381, 1137, 193, + 500, 501, 241, 242, 502, 1137, 193, 1137, 1137, 239, + 193, 380, 1137, 193, 1137, 498, 388, 193, 1137, 193, + 1137, 193, 499, 240, 381, 193, 193, 500, 501, 241, 242, 502, 390, 193, 193, 243, 389, 193, 193, 394, 391, 193, 395, 244, 193, 193, 193, 245, 193, 503, - 246, 1119, 193, 193, 193, 1119, 504, 1119, 193, 390, - 1119, 193, 243, 389, 193, 193, 394, 391, 193, 395, + 246, 1137, 193, 193, 193, 1137, 504, 1137, 193, 390, + 1137, 193, 243, 389, 193, 193, 394, 391, 193, 395, 244, 193, 193, 193, 245, 392, 503, 246, 393, 193, 505, 193, 253, 504, 254, 193, 509, 255, 193, 396, - 397, 193, 510, 511, 256, 257, 1119, 1119, 1119, 193, - 1119, 1119, 392, 398, 193, 393, 193, 505, 193, 253, - 512, 254, 1119, 509, 255, 193, 396, 397, 193, 510, - 511, 256, 257, 406, 401, 426, 193, 193, 193, 1119, + 397, 193, 510, 511, 256, 257, 1137, 1137, 1137, 193, + 1137, 1137, 392, 398, 193, 393, 193, 505, 193, 253, + 512, 254, 1137, 509, 255, 193, 396, 397, 193, 510, + 511, 256, 257, 406, 401, 426, 193, 193, 193, 1137, 398, 193, 258, 407, 399, 193, 259, 512, 193, 260, 261, 400, 513, 193, 514, 193, 262, 193, 193, 263, - 406, 401, 426, 515, 193, 193, 193, 1119, 1119, 258, - 407, 399, 1119, 259, 1119, 193, 260, 261, 400, 513, - 193, 514, 1119, 262, 193, 193, 263, 1119, 1119, 1119, - 515, 1119, 1119, 193, 91, 91, 91, 91, 91, 91, + 406, 401, 426, 515, 193, 193, 193, 1137, 1137, 258, + 407, 399, 1137, 259, 1137, 193, 260, 261, 400, 513, + 193, 514, 1137, 262, 193, 193, 263, 1137, 1137, 1137, + 515, 1137, 1137, 193, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, 92, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 186, 186, 186, 186, 186, @@ -1133,47 +1139,47 @@ static const flex_int16_t yy_nxt[4543] = 387, 387, 387, 387, 387, 187, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 193, 193, 516, 193, - 193, 193, 517, 402, 403, 404, 1119, 405, 1119, 518, - 1119, 417, 408, 414, 415, 416, 193, 409, 1119, 193, - 193, 193, 1119, 193, 193, 516, 193, 193, 193, 517, + 193, 193, 517, 402, 403, 404, 1137, 405, 1137, 518, + 1137, 417, 408, 414, 415, 416, 193, 409, 1137, 193, + 193, 193, 1137, 193, 193, 516, 193, 193, 193, 517, 402, 403, 404, 420, 405, 193, 518, 193, 417, 408, 414, 415, 416, 193, 409, 410, 193, 193, 193, 193, - 411, 418, 419, 193, 1119, 193, 412, 193, 1119, 1119, + 411, 418, 419, 193, 1137, 193, 412, 193, 1137, 1137, 420, 193, 193, 413, 193, 193, 521, 522, 427, 193, - 1119, 523, 410, 193, 1119, 428, 193, 411, 418, 419, - 193, 193, 193, 412, 193, 193, 193, 1119, 193, 524, + 1137, 523, 410, 193, 1137, 428, 193, 411, 418, 419, + 193, 193, 193, 412, 193, 193, 193, 1137, 193, 524, - 413, 1119, 193, 521, 522, 427, 193, 193, 523, 429, + 413, 1137, 193, 521, 522, 427, 193, 193, 523, 429, 193, 421, 428, 422, 431, 193, 193, 423, 193, 193, - 1119, 1119, 193, 193, 424, 430, 524, 193, 425, 432, - 1119, 1119, 1119, 193, 193, 193, 429, 193, 421, 193, + 1137, 1137, 193, 193, 424, 430, 524, 193, 425, 432, + 1137, 1137, 1137, 193, 193, 193, 429, 193, 421, 193, 422, 431, 193, 193, 423, 193, 193, 433, 193, 193, 525, 424, 430, 193, 193, 425, 432, 193, 436, 193, 193, 437, 193, 438, 193, 193, 193, 434, 193, 193, 435, 193, 193, 193, 433, 193, 193, 525, 526, 193, - 193, 527, 439, 1119, 193, 436, 193, 528, 437, 1119, - 438, 193, 193, 1119, 434, 193, 193, 435, 193, 529, + 193, 527, 439, 1137, 193, 436, 193, 528, 437, 1137, + 438, 193, 193, 1137, 434, 193, 193, 435, 193, 529, - 193, 193, 1119, 193, 1119, 526, 193, 1119, 527, 439, - 444, 193, 1119, 1119, 528, 445, 193, 447, 193, 440, - 193, 193, 1119, 446, 530, 1119, 529, 531, 193, 441, + 193, 193, 1137, 193, 1137, 526, 193, 1137, 527, 439, + 444, 193, 1137, 1137, 528, 445, 193, 447, 193, 440, + 193, 193, 1137, 446, 530, 1137, 529, 531, 193, 441, 193, 193, 193, 193, 442, 443, 193, 444, 193, 448, 193, 449, 445, 193, 447, 453, 440, 193, 193, 519, - 446, 530, 193, 193, 531, 1119, 441, 1119, 193, 193, + 446, 530, 193, 193, 531, 1137, 441, 1137, 193, 193, 193, 442, 443, 193, 520, 193, 448, 193, 449, 450, - 532, 451, 453, 193, 454, 193, 519, 533, 1119, 193, - 193, 1119, 452, 1119, 455, 193, 193, 193, 193, 534, - 193, 520, 193, 193, 458, 193, 450, 532, 451, 1119, + 532, 451, 453, 193, 454, 193, 519, 533, 1137, 193, + 193, 1137, 452, 1137, 455, 193, 193, 193, 193, 534, + 193, 520, 193, 193, 458, 193, 450, 532, 451, 1137, 193, 454, 193, 456, 533, 457, 193, 193, 193, 452, 193, 455, 193, 193, 193, 193, 534, 193, 193, 459, - 193, 458, 193, 193, 193, 460, 461, 193, 1119, 193, - 456, 463, 457, 193, 193, 193, 1119, 193, 193, 475, - 193, 535, 1119, 193, 193, 193, 459, 193, 1119, 193, + 193, 458, 193, 193, 193, 460, 461, 193, 1137, 193, + 456, 463, 457, 193, 193, 193, 1137, 193, 193, 475, + 193, 535, 1137, 193, 193, 193, 459, 193, 1137, 193, 193, 193, 460, 461, 193, 462, 193, 464, 463, 465, - 193, 193, 1119, 466, 1119, 193, 475, 193, 535, 193, + 193, 193, 1137, 466, 1137, 193, 475, 193, 535, 193, 193, 193, 536, 193, 193, 469, 193, 193, 467, 193, - 471, 193, 462, 468, 464, 1119, 465, 193, 193, 193, + 471, 193, 462, 468, 464, 1137, 465, 193, 193, 193, 466, 193, 472, 193, 193, 537, 193, 193, 470, 536, 193, 473, 469, 538, 193, 467, 193, 471, 193, 474, @@ -1181,16 +1187,16 @@ static const flex_int16_t yy_nxt[4543] = 193, 193, 537, 477, 193, 470, 476, 193, 473, 193, 538, 481, 193, 193, 540, 193, 474, 479, 193, 478, 193, 193, 193, 483, 539, 488, 193, 193, 480, 193, - 477, 193, 193, 476, 193, 1119, 193, 193, 481, 193, + 477, 193, 193, 476, 193, 1137, 193, 193, 481, 193, 193, 540, 193, 484, 479, 482, 193, 193, 541, 542, - 483, 1119, 488, 193, 193, 480, 193, 193, 193, 193, - 494, 193, 193, 485, 193, 486, 489, 193, 487, 1119, - 484, 1119, 482, 193, 193, 541, 542, 1119, 193, 1119, + 483, 1137, 488, 193, 193, 480, 193, 193, 193, 193, + 494, 193, 193, 485, 193, 486, 489, 193, 487, 1137, + 484, 1137, 482, 193, 193, 541, 542, 1137, 193, 1137, 193, 193, 193, 492, 193, 490, 193, 494, 193, 193, - 485, 491, 486, 489, 193, 487, 493, 1119, 193, 543, + 485, 491, 486, 489, 193, 487, 493, 1137, 193, 543, 496, 495, 544, 193, 193, 193, 193, 193, 193, 193, - 492, 1119, 490, 193, 1119, 1119, 1119, 1119, 491, 1119, + 492, 1137, 490, 193, 1137, 1137, 1137, 1137, 491, 1137, 545, 546, 547, 493, 193, 193, 543, 496, 495, 544, 193, 193, 548, 193, 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, 506, 549, 507, 545, 546, 547, @@ -1203,317 +1209,326 @@ static const flex_int16_t yy_nxt[4543] = 575, 568, 569, 570, 576, 571, 577, 578, 579, 580, 581, 582, 583, 572, 584, 585, 586, 587, 588, 589, 591, 593, 592, 594, 595, 573, 574, 575, 590, 596, - 597, 576, 598, 577, 578, 579, 580, 581, 582, 583, - 599, 584, 585, 586, 587, 588, 589, 591, 593, 592, - 594, 595, 602, 603, 600, 590, 596, 597, 601, 598, - 1119, 1119, 193, 605, 193, 1119, 606, 599, 387, 387, - 387, 387, 387, 387, 387, 387, 387, 387, 193, 602, - - 603, 600, 193, 193, 193, 601, 193, 193, 608, 193, - 605, 193, 193, 606, 607, 1119, 193, 1119, 193, 1119, - 193, 1119, 1119, 712, 610, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 608, 193, 1119, 609, 193, - 193, 607, 193, 193, 611, 193, 193, 193, 193, 612, - 712, 610, 193, 193, 193, 193, 1119, 193, 193, 193, - 623, 1119, 193, 193, 613, 609, 614, 193, 617, 193, - 616, 611, 193, 193, 193, 193, 612, 193, 620, 193, - 193, 615, 618, 193, 193, 193, 193, 623, 621, 193, - 1119, 613, 193, 614, 193, 617, 193, 616, 619, 193, - - 193, 193, 625, 193, 193, 620, 193, 193, 615, 618, - 193, 193, 193, 193, 622, 621, 193, 626, 624, 193, - 193, 193, 629, 193, 1119, 619, 193, 193, 1119, 625, - 193, 193, 627, 193, 628, 193, 193, 193, 193, 193, - 633, 622, 193, 193, 626, 624, 193, 193, 631, 629, - 630, 193, 193, 193, 713, 193, 193, 632, 193, 627, - 193, 628, 193, 193, 193, 635, 193, 633, 714, 193, - 634, 193, 193, 193, 193, 631, 193, 630, 193, 193, - 1119, 713, 193, 193, 632, 193, 636, 193, 193, 193, - 637, 193, 635, 193, 193, 714, 193, 634, 193, 193, - - 193, 193, 639, 193, 641, 640, 642, 638, 193, 193, - 193, 193, 193, 636, 1119, 193, 193, 637, 193, 193, - 193, 193, 1119, 193, 193, 715, 645, 193, 716, 639, - 193, 641, 640, 642, 638, 193, 193, 193, 193, 193, - 193, 193, 646, 193, 1119, 193, 193, 193, 643, 644, - 1119, 193, 715, 645, 717, 716, 1119, 193, 193, 647, - 193, 193, 649, 193, 1119, 193, 193, 193, 193, 646, - 193, 193, 193, 1119, 648, 643, 644, 193, 193, 193, - 193, 717, 718, 652, 1119, 193, 647, 193, 193, 649, - 193, 193, 193, 651, 650, 1119, 654, 193, 193, 193, - - 193, 648, 193, 1119, 193, 193, 193, 193, 655, 718, - 652, 656, 653, 1119, 719, 1119, 193, 193, 193, 720, - 651, 650, 193, 654, 193, 193, 193, 193, 193, 193, - 657, 193, 721, 659, 660, 655, 193, 193, 656, 653, - 658, 719, 662, 193, 193, 193, 720, 1119, 1119, 193, - 193, 193, 193, 1119, 1119, 193, 193, 657, 193, 721, - 659, 660, 193, 193, 193, 722, 661, 658, 1119, 662, - 193, 193, 193, 1119, 663, 664, 193, 193, 193, 193, - 665, 666, 1119, 193, 193, 193, 1119, 667, 1119, 193, - 193, 723, 722, 661, 1119, 193, 193, 193, 193, 193, - - 193, 663, 664, 193, 193, 193, 193, 665, 666, 193, - 669, 193, 193, 193, 667, 193, 668, 193, 723, 674, - 193, 193, 193, 193, 1119, 670, 193, 193, 671, 193, - 193, 193, 193, 193, 675, 1119, 193, 669, 193, 193, - 193, 193, 193, 668, 673, 676, 674, 193, 193, 193, - 193, 672, 670, 193, 193, 671, 193, 193, 193, 193, - 193, 675, 677, 724, 725, 193, 193, 193, 193, 193, - 678, 673, 676, 193, 1119, 679, 193, 193, 672, 193, - 193, 193, 1119, 193, 680, 193, 193, 193, 193, 677, - 724, 725, 193, 684, 193, 682, 193, 678, 681, 1119, - - 193, 686, 679, 193, 193, 1119, 193, 193, 193, 193, - 193, 680, 193, 193, 193, 193, 683, 685, 193, 193, - 684, 193, 682, 1119, 193, 681, 193, 193, 686, 193, - 193, 193, 193, 688, 193, 193, 193, 694, 193, 193, - 193, 689, 193, 683, 685, 193, 193, 193, 193, 690, - 687, 193, 193, 193, 193, 193, 193, 193, 691, 193, - 688, 193, 193, 193, 694, 193, 726, 193, 689, 193, - 692, 193, 693, 193, 193, 193, 690, 687, 727, 193, - 695, 193, 193, 193, 193, 691, 696, 1119, 193, 193, - 193, 193, 728, 726, 193, 697, 701, 692, 193, 693, - - 193, 193, 193, 1119, 193, 727, 193, 695, 193, 193, - 193, 700, 729, 696, 698, 193, 699, 193, 193, 728, - 193, 193, 697, 701, 193, 703, 702, 193, 193, 193, - 706, 193, 704, 193, 193, 193, 193, 193, 700, 729, - 193, 698, 193, 699, 193, 1119, 730, 193, 193, 1119, - 731, 193, 703, 702, 193, 193, 193, 706, 705, 704, - 193, 193, 193, 193, 193, 732, 193, 193, 710, 709, - 733, 734, 707, 730, 735, 193, 708, 731, 736, 737, - 738, 193, 193, 193, 739, 705, 193, 193, 740, 741, - 193, 742, 732, 193, 743, 710, 709, 733, 734, 707, - - 744, 735, 193, 708, 745, 736, 737, 738, 746, 747, - 193, 739, 748, 193, 749, 740, 741, 750, 742, 751, - 753, 743, 754, 755, 756, 757, 758, 744, 759, 760, - 752, 745, 761, 762, 763, 746, 747, 764, 765, 748, - 766, 749, 767, 768, 750, 769, 751, 753, 770, 754, - 755, 756, 757, 758, 771, 759, 760, 752, 772, 761, - 762, 763, 773, 774, 764, 765, 775, 766, 776, 767, - 768, 777, 769, 778, 779, 770, 780, 781, 782, 783, - 784, 771, 785, 786, 787, 772, 788, 789, 790, 773, - 774, 1119, 1119, 775, 1119, 776, 193, 193, 777, 193, - - 778, 779, 1119, 780, 781, 782, 783, 784, 193, 785, - 786, 787, 792, 788, 789, 790, 794, 795, 193, 193, - 193, 793, 798, 193, 193, 1119, 193, 1119, 193, 797, - 193, 796, 193, 193, 1119, 193, 1119, 799, 193, 792, - 193, 193, 193, 794, 795, 193, 193, 193, 793, 798, - 193, 193, 193, 193, 193, 193, 797, 193, 796, 193, - 193, 193, 800, 193, 799, 193, 193, 193, 193, 193, - 801, 193, 193, 1119, 193, 1119, 802, 193, 193, 193, - 193, 193, 193, 193, 1119, 193, 193, 193, 193, 800, - 193, 193, 193, 193, 806, 1119, 804, 801, 193, 193, - - 803, 193, 193, 802, 193, 193, 805, 193, 1119, 193, - 193, 193, 193, 193, 193, 193, 872, 873, 193, 193, - 807, 806, 809, 804, 193, 1119, 193, 803, 193, 193, - 808, 193, 193, 805, 193, 193, 193, 811, 193, 193, - 812, 810, 193, 872, 873, 193, 193, 807, 193, 809, - 193, 193, 813, 193, 193, 193, 193, 808, 193, 193, - 193, 1119, 193, 193, 811, 193, 193, 812, 810, 814, - 193, 815, 193, 193, 193, 193, 1119, 193, 193, 813, - 193, 193, 820, 193, 193, 193, 193, 193, 193, 818, - 819, 1119, 193, 193, 193, 1119, 814, 193, 815, 193, - - 816, 193, 193, 817, 193, 193, 1119, 193, 193, 820, - 874, 193, 193, 193, 193, 193, 818, 819, 193, 193, - 193, 193, 193, 875, 822, 1119, 193, 816, 193, 193, - 817, 193, 193, 821, 193, 193, 1119, 874, 193, 193, - 193, 193, 193, 823, 193, 193, 193, 193, 193, 193, - 875, 822, 193, 825, 193, 193, 193, 193, 826, 193, - 821, 193, 1119, 824, 193, 193, 1119, 193, 193, 193, - 823, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 825, 193, 1119, 193, 193, 826, 827, 828, 193, 193, - 824, 193, 1119, 193, 193, 193, 1119, 193, 193, 193, - - 193, 1119, 829, 193, 193, 193, 193, 193, 831, 193, - 830, 193, 193, 827, 828, 193, 193, 193, 193, 832, - 193, 193, 876, 193, 193, 193, 193, 193, 833, 829, - 1119, 193, 193, 193, 193, 831, 193, 830, 193, 193, - 193, 193, 193, 193, 193, 193, 832, 835, 193, 876, - 193, 193, 836, 193, 193, 833, 1119, 834, 193, 193, - 193, 193, 193, 193, 1119, 193, 839, 193, 193, 193, - 193, 193, 193, 1119, 835, 837, 838, 1119, 193, 836, - 842, 193, 1119, 193, 834, 193, 877, 193, 193, 193, - 193, 193, 193, 839, 841, 1119, 193, 193, 193, 193, - - 193, 878, 837, 838, 840, 845, 193, 842, 193, 193, - 193, 193, 193, 877, 193, 879, 193, 193, 193, 843, - 1119, 841, 844, 193, 193, 880, 193, 193, 878, 193, - 1119, 840, 845, 193, 193, 846, 193, 193, 193, 193, - 193, 193, 879, 193, 193, 848, 843, 847, 881, 844, - 193, 193, 880, 193, 1119, 850, 193, 193, 1119, 193, - 193, 193, 846, 849, 193, 851, 193, 193, 193, 1119, - 193, 193, 848, 193, 847, 881, 193, 193, 193, 193, - 1119, 852, 850, 1119, 193, 853, 193, 193, 193, 854, - 849, 193, 851, 193, 855, 193, 193, 193, 193, 193, - - 193, 1119, 857, 193, 193, 193, 193, 193, 852, 856, - 193, 193, 853, 882, 193, 193, 854, 858, 193, 193, - 193, 855, 193, 193, 193, 193, 193, 193, 193, 857, - 193, 193, 193, 859, 193, 1119, 856, 193, 193, 193, - 882, 193, 860, 193, 858, 861, 193, 193, 193, 193, - 1119, 193, 193, 193, 193, 193, 193, 193, 1119, 867, - 859, 193, 862, 193, 1119, 193, 193, 193, 868, 860, - 193, 865, 861, 193, 193, 193, 193, 863, 864, 193, - 193, 193, 193, 193, 1119, 193, 867, 193, 193, 862, - 193, 193, 193, 866, 193, 868, 193, 193, 865, 870, - - 193, 193, 193, 193, 863, 864, 193, 193, 193, 193, - 193, 193, 193, 869, 193, 883, 193, 193, 193, 193, - 866, 193, 884, 193, 193, 885, 870, 886, 193, 193, - 193, 887, 888, 889, 193, 890, 891, 193, 193, 892, - 869, 893, 883, 193, 193, 894, 193, 895, 193, 884, - 896, 897, 885, 898, 886, 899, 900, 193, 887, 888, - 889, 901, 890, 891, 902, 903, 892, 904, 893, 905, - 906, 907, 894, 908, 895, 909, 910, 896, 897, 911, - 898, 912, 899, 900, 913, 914, 915, 916, 901, 917, - 918, 902, 903, 919, 904, 920, 905, 906, 907, 921, - - 908, 922, 909, 910, 923, 924, 911, 925, 912, 926, - 927, 913, 914, 915, 916, 193, 917, 918, 193, 193, - 919, 193, 920, 930, 193, 1119, 921, 931, 922, 986, - 1119, 923, 924, 987, 925, 193, 926, 927, 193, 193, - 929, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 930, 193, 932, 193, 931, 936, 986, 193, 933, 988, - 987, 1119, 193, 193, 1119, 193, 193, 929, 193, 193, - 193, 193, 934, 193, 193, 193, 193, 193, 193, 932, - 193, 1119, 936, 193, 193, 933, 988, 193, 935, 940, - 193, 937, 193, 193, 1119, 1119, 193, 989, 193, 934, - - 193, 193, 193, 938, 193, 193, 990, 193, 939, 193, - 193, 1119, 193, 193, 193, 935, 940, 193, 937, 193, - 193, 193, 193, 944, 989, 193, 941, 991, 193, 992, - 938, 1119, 942, 990, 193, 939, 193, 193, 193, 193, - 193, 945, 193, 193, 193, 1119, 1119, 943, 193, 193, - 944, 193, 193, 941, 991, 1119, 992, 993, 193, 942, - 193, 193, 193, 193, 193, 193, 946, 947, 945, 193, - 193, 193, 193, 950, 943, 193, 948, 193, 193, 193, - 193, 949, 193, 193, 993, 193, 193, 193, 193, 193, - 193, 193, 994, 946, 947, 193, 995, 193, 193, 193, - - 950, 951, 193, 948, 193, 193, 193, 193, 949, 193, - 193, 193, 952, 193, 193, 193, 953, 1119, 193, 994, - 193, 996, 193, 995, 193, 193, 193, 1119, 951, 193, - 193, 956, 193, 193, 193, 193, 1119, 1119, 193, 952, - 193, 193, 193, 953, 954, 955, 193, 193, 996, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 956, 193, - 193, 193, 193, 193, 193, 959, 958, 193, 957, 193, - 1119, 954, 955, 193, 193, 193, 193, 193, 193, 193, + 597, 576, 599, 577, 578, 579, 580, 581, 582, 583, + 600, 584, 585, 586, 587, 588, 589, 591, 593, 592, + 594, 595, 598, 603, 601, 590, 596, 597, 602, 599, + 604, 1137, 193, 606, 193, 1137, 607, 600, 387, 387, + 387, 387, 387, 387, 387, 387, 387, 387, 193, 598, + + 603, 601, 193, 193, 193, 602, 193, 604, 193, 193, + 606, 193, 609, 607, 193, 608, 193, 193, 193, 1137, + 193, 714, 1137, 1137, 611, 193, 1137, 610, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 715, 609, + 193, 193, 608, 193, 193, 193, 193, 193, 714, 193, + 612, 611, 193, 613, 610, 193, 1137, 1137, 1137, 193, + 1137, 193, 617, 193, 193, 715, 193, 193, 614, 193, + 615, 193, 1137, 193, 193, 1137, 193, 612, 1137, 193, + 613, 716, 619, 193, 193, 616, 193, 618, 1137, 617, + 193, 193, 1137, 193, 193, 614, 193, 615, 193, 620, + + 623, 193, 624, 621, 193, 193, 193, 717, 716, 619, + 193, 193, 616, 193, 618, 622, 193, 193, 193, 193, + 626, 193, 193, 625, 193, 193, 620, 623, 630, 624, + 621, 193, 193, 193, 717, 629, 193, 193, 627, 193, + 1137, 193, 622, 193, 193, 1137, 193, 626, 193, 193, + 625, 193, 193, 628, 634, 630, 631, 193, 193, 193, + 1137, 193, 629, 193, 193, 627, 193, 632, 193, 1137, + 193, 193, 636, 718, 193, 193, 193, 719, 635, 193, + 628, 634, 193, 631, 193, 193, 193, 633, 193, 637, + 193, 193, 193, 193, 632, 1137, 193, 193, 1137, 636, + + 718, 193, 193, 193, 719, 635, 193, 638, 193, 193, + 193, 193, 193, 193, 633, 639, 637, 193, 193, 193, + 193, 642, 643, 193, 641, 640, 193, 1137, 193, 193, + 193, 1137, 193, 1137, 638, 193, 193, 193, 193, 193, + 193, 193, 639, 1137, 644, 720, 193, 193, 642, 643, + 193, 641, 640, 193, 646, 193, 193, 193, 645, 193, + 193, 647, 193, 193, 193, 649, 1137, 193, 193, 1137, + 193, 644, 720, 193, 193, 193, 648, 193, 193, 650, + 193, 646, 193, 193, 193, 645, 1137, 193, 647, 193, + 193, 193, 649, 651, 193, 193, 653, 193, 193, 193, + + 721, 655, 193, 648, 193, 193, 650, 193, 1137, 193, + 193, 193, 652, 656, 654, 657, 193, 193, 722, 193, + 651, 193, 193, 653, 193, 193, 193, 721, 655, 193, + 193, 193, 660, 193, 658, 193, 193, 193, 661, 652, + 656, 654, 657, 193, 659, 722, 193, 1137, 193, 193, + 193, 193, 193, 663, 193, 723, 193, 193, 1137, 660, + 193, 658, 193, 193, 193, 661, 724, 662, 664, 665, + 193, 659, 193, 193, 666, 1137, 193, 193, 193, 193, + 663, 193, 723, 193, 193, 667, 193, 725, 668, 193, + 193, 193, 1137, 724, 662, 664, 665, 193, 193, 193, + + 193, 666, 193, 193, 670, 193, 193, 193, 193, 193, + 193, 193, 667, 193, 725, 668, 193, 193, 669, 193, + 675, 676, 193, 671, 193, 193, 672, 193, 193, 193, + 193, 670, 726, 193, 193, 193, 193, 673, 193, 193, + 193, 193, 727, 1137, 193, 669, 193, 675, 676, 193, + 671, 193, 674, 672, 193, 193, 677, 1137, 193, 726, + 193, 193, 193, 1137, 673, 193, 193, 193, 193, 727, + 678, 193, 1137, 679, 681, 193, 193, 1137, 193, 674, + 193, 193, 193, 677, 680, 193, 1137, 193, 193, 193, + 682, 1137, 193, 728, 685, 193, 193, 678, 193, 684, + + 679, 681, 193, 193, 687, 193, 729, 193, 193, 193, + 193, 680, 193, 683, 193, 193, 193, 682, 193, 193, + 728, 685, 193, 193, 193, 193, 684, 730, 686, 193, + 193, 687, 193, 729, 688, 193, 193, 193, 193, 193, + 683, 193, 193, 193, 689, 193, 193, 690, 731, 193, + 1137, 193, 193, 691, 730, 686, 193, 193, 193, 193, + 1137, 688, 193, 193, 695, 193, 193, 193, 193, 692, + 193, 689, 193, 193, 690, 731, 193, 694, 193, 193, + 691, 696, 693, 1137, 193, 193, 1137, 193, 193, 1137, + 193, 695, 193, 193, 193, 193, 692, 193, 697, 193, + + 193, 732, 702, 193, 694, 193, 193, 698, 696, 693, + 699, 193, 700, 701, 193, 193, 193, 193, 193, 193, + 193, 1137, 193, 193, 733, 697, 193, 193, 732, 702, + 193, 703, 704, 193, 698, 193, 193, 699, 1137, 700, + 701, 193, 193, 193, 705, 193, 193, 193, 712, 193, + 193, 733, 193, 193, 734, 193, 708, 193, 703, 704, + 711, 193, 193, 193, 735, 193, 706, 736, 193, 193, + 707, 705, 193, 193, 709, 712, 737, 193, 710, 193, + 738, 734, 193, 708, 193, 193, 739, 711, 193, 740, + 741, 735, 193, 706, 736, 742, 743, 707, 744, 193, + + 745, 709, 746, 737, 193, 710, 747, 738, 748, 749, + 750, 751, 193, 739, 752, 753, 740, 741, 756, 754, + 757, 758, 742, 743, 759, 744, 762, 745, 763, 746, + 755, 760, 761, 747, 764, 748, 749, 750, 751, 765, + 766, 752, 753, 767, 768, 756, 754, 757, 758, 769, + 770, 759, 771, 762, 772, 763, 773, 755, 760, 761, + 774, 764, 775, 776, 777, 778, 765, 766, 779, 780, + 767, 768, 781, 782, 783, 784, 769, 770, 785, 771, + 786, 772, 787, 773, 788, 789, 790, 774, 791, 775, + 776, 777, 778, 792, 793, 779, 780, 794, 193, 781, + + 782, 783, 784, 193, 1137, 785, 193, 786, 193, 787, + 1137, 788, 789, 790, 193, 791, 796, 802, 798, 797, + 792, 793, 193, 193, 794, 193, 193, 800, 799, 878, + 193, 801, 193, 193, 193, 193, 803, 193, 1137, 1137, + 193, 193, 193, 796, 802, 798, 797, 1137, 193, 193, + 193, 193, 193, 193, 800, 799, 878, 193, 801, 193, + 193, 193, 804, 803, 193, 805, 193, 193, 193, 193, + 193, 193, 1137, 1137, 806, 193, 1137, 193, 193, 193, + 193, 1137, 1137, 193, 193, 193, 193, 193, 1137, 804, + 193, 193, 805, 193, 193, 193, 807, 193, 193, 809, + + 193, 806, 1137, 193, 193, 193, 808, 193, 193, 810, + 193, 193, 193, 193, 193, 811, 1137, 193, 193, 193, + 879, 193, 1137, 807, 193, 814, 809, 193, 193, 193, + 193, 1137, 193, 808, 813, 193, 810, 193, 193, 193, + 812, 193, 811, 816, 193, 193, 193, 879, 193, 193, + 815, 193, 814, 193, 193, 193, 193, 193, 817, 193, + 818, 813, 1137, 880, 193, 193, 193, 812, 193, 881, + 816, 193, 193, 193, 193, 193, 193, 815, 193, 193, + 193, 193, 193, 193, 193, 817, 193, 818, 882, 819, + 880, 1137, 193, 820, 883, 193, 881, 193, 193, 821, + + 193, 193, 193, 193, 823, 193, 193, 825, 193, 193, + 193, 1137, 822, 193, 824, 882, 819, 193, 193, 827, + 820, 883, 193, 193, 193, 193, 821, 193, 193, 193, + 193, 823, 193, 193, 825, 193, 193, 826, 193, 822, + 193, 824, 193, 193, 193, 193, 827, 828, 1137, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 1137, 193, + 193, 193, 193, 193, 826, 193, 193, 831, 829, 193, + 193, 193, 193, 193, 828, 830, 1137, 193, 193, 193, + 193, 193, 193, 193, 193, 832, 193, 193, 193, 193, + 1137, 193, 193, 193, 831, 829, 1137, 884, 193, 193, + + 193, 1137, 830, 193, 193, 193, 1137, 193, 193, 193, + 833, 193, 832, 193, 193, 193, 834, 836, 193, 193, + 835, 193, 1137, 193, 884, 193, 193, 193, 837, 193, + 193, 193, 193, 838, 193, 193, 1137, 833, 193, 193, + 885, 193, 193, 834, 836, 1137, 193, 835, 193, 193, + 193, 193, 193, 193, 193, 837, 193, 193, 193, 193, + 838, 193, 193, 193, 1137, 841, 193, 885, 193, 193, + 840, 193, 839, 193, 844, 886, 193, 193, 193, 1137, + 193, 193, 845, 193, 193, 193, 193, 1137, 193, 193, + 193, 193, 841, 193, 842, 843, 193, 840, 193, 839, + + 193, 844, 886, 846, 193, 193, 847, 193, 193, 845, + 193, 193, 193, 193, 193, 193, 193, 1137, 193, 851, + 193, 842, 843, 193, 848, 193, 193, 193, 849, 193, + 846, 193, 193, 847, 193, 193, 887, 850, 193, 193, + 193, 193, 193, 193, 852, 1137, 851, 853, 193, 193, + 193, 848, 193, 193, 1137, 849, 193, 193, 193, 193, + 193, 193, 193, 887, 850, 1137, 193, 859, 193, 193, + 193, 852, 855, 854, 853, 193, 193, 193, 856, 1137, + 193, 193, 193, 193, 193, 1137, 193, 193, 1137, 193, + 857, 193, 858, 860, 859, 193, 193, 888, 1137, 855, + + 854, 193, 193, 193, 193, 856, 862, 193, 193, 193, + 193, 193, 193, 193, 1137, 193, 193, 857, 193, 858, + 860, 193, 863, 193, 888, 861, 193, 193, 193, 193, + 193, 193, 193, 862, 866, 193, 193, 1137, 193, 193, + 193, 193, 193, 193, 889, 864, 193, 193, 193, 863, + 193, 193, 861, 193, 193, 193, 193, 1137, 193, 193, + 865, 866, 193, 193, 867, 193, 193, 890, 193, 193, + 193, 889, 864, 193, 193, 193, 869, 193, 193, 871, + 193, 868, 193, 193, 870, 193, 1137, 865, 1137, 193, + 872, 867, 193, 193, 890, 193, 193, 193, 873, 193, + + 193, 193, 193, 869, 193, 874, 871, 193, 868, 891, + 193, 870, 193, 193, 193, 193, 193, 872, 876, 193, + 892, 193, 193, 193, 193, 873, 193, 193, 193, 875, + 893, 193, 874, 193, 193, 894, 891, 193, 193, 895, + 193, 193, 193, 193, 896, 876, 193, 892, 193, 897, + 193, 193, 898, 899, 900, 901, 875, 893, 193, 902, + 193, 193, 894, 903, 904, 193, 895, 905, 906, 907, + 193, 896, 908, 909, 910, 911, 897, 912, 193, 898, + 899, 900, 901, 913, 914, 915, 902, 916, 917, 918, + 903, 904, 919, 920, 905, 906, 907, 921, 922, 908, + + 909, 910, 911, 923, 912, 924, 925, 926, 927, 928, + 913, 914, 915, 929, 916, 917, 918, 930, 931, 919, + 920, 932, 933, 934, 921, 922, 935, 193, 1137, 1137, + 923, 193, 924, 925, 926, 927, 928, 193, 996, 193, + 929, 938, 193, 939, 930, 931, 1137, 193, 932, 933, + 934, 193, 997, 935, 193, 940, 193, 193, 193, 193, + 937, 193, 193, 193, 193, 996, 193, 1137, 938, 193, + 939, 941, 193, 193, 193, 193, 193, 945, 193, 997, + 1137, 942, 940, 193, 193, 944, 193, 937, 193, 193, + 193, 193, 193, 193, 193, 193, 1137, 193, 941, 193, + + 193, 998, 193, 193, 945, 193, 943, 193, 942, 946, + 999, 193, 944, 1137, 193, 949, 1137, 947, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 998, 1000, + 948, 953, 193, 943, 193, 193, 946, 999, 193, 193, + 193, 193, 949, 193, 947, 193, 193, 1137, 952, 950, + 193, 193, 193, 193, 193, 951, 1000, 948, 953, 193, + 193, 954, 193, 193, 193, 193, 193, 193, 1137, 1137, + 193, 1137, 193, 193, 193, 952, 950, 957, 193, 955, + 193, 193, 951, 193, 193, 193, 193, 193, 954, 956, + 193, 193, 193, 193, 193, 193, 959, 958, 193, 193, + + 193, 193, 961, 1137, 957, 193, 955, 193, 193, 1137, + 193, 193, 193, 193, 960, 193, 956, 193, 193, 193, + 193, 193, 193, 959, 958, 193, 193, 193, 193, 961, + 962, 193, 193, 193, 193, 1137, 193, 193, 1137, 965, + 193, 960, 193, 1137, 193, 193, 193, 193, 193, 963, + 1137, 193, 1137, 193, 193, 193, 193, 962, 193, 193, + 193, 193, 964, 193, 193, 193, 965, 193, 193, 1137, + 193, 193, 1001, 193, 193, 193, 963, 967, 193, 966, + 193, 193, 193, 193, 1137, 193, 193, 968, 193, 964, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 1001, + + 193, 969, 193, 1137, 967, 193, 966, 193, 1002, 193, + 193, 193, 193, 970, 968, 193, 193, 193, 193, 193, + 193, 193, 972, 193, 975, 193, 971, 1003, 969, 193, + 193, 193, 193, 1137, 193, 1002, 1137, 193, 193, 193, + 970, 193, 193, 193, 193, 193, 193, 193, 193, 972, + 193, 975, 193, 971, 1003, 193, 1137, 193, 193, 976, + 973, 1137, 1137, 974, 1004, 193, 193, 193, 193, 193, + 193, 193, 193, 1137, 193, 193, 977, 193, 1137, 1005, + 193, 978, 193, 979, 193, 193, 976, 973, 981, 193, + 974, 1004, 193, 1006, 193, 982, 1137, 193, 193, 193, + + 193, 1137, 193, 977, 193, 193, 1005, 193, 978, 193, + 979, 193, 193, 980, 193, 981, 193, 193, 193, 193, + 1006, 1137, 982, 193, 1137, 193, 193, 193, 983, 986, + 984, 193, 193, 193, 193, 987, 193, 193, 985, 193, + 980, 193, 1137, 193, 193, 193, 193, 193, 988, 990, + 193, 989, 193, 193, 1007, 983, 986, 984, 1137, 193, + 193, 193, 987, 193, 193, 985, 193, 193, 193, 193, + 193, 193, 193, 992, 193, 988, 990, 193, 989, 193, + 193, 1007, 1008, 193, 994, 991, 193, 193, 193, 1009, + 193, 193, 1010, 193, 193, 193, 193, 193, 193, 193, + + 992, 1011, 993, 1012, 193, 1013, 1014, 193, 193, 1008, + 193, 994, 991, 193, 193, 193, 1009, 1015, 193, 1010, + 193, 1016, 1017, 1018, 193, 1019, 1020, 1021, 1011, 993, + 1012, 1022, 1013, 1014, 193, 193, 1023, 1024, 1025, 1026, + 193, 1027, 1029, 1137, 1015, 1137, 1137, 193, 1016, 1017, + 1018, 193, 1019, 1020, 1021, 1031, 193, 193, 1022, 193, + 1030, 193, 193, 1023, 1024, 1025, 1026, 193, 1027, 1029, + 1033, 193, 1032, 193, 193, 193, 193, 193, 193, 193, + 1034, 193, 1031, 193, 193, 1137, 193, 1030, 193, 193, + 1036, 193, 193, 193, 193, 193, 1137, 1033, 193, 1032, + + 193, 193, 193, 193, 193, 193, 193, 1034, 193, 1035, + 1037, 193, 193, 193, 193, 193, 1137, 1036, 193, 193, + 193, 193, 193, 1038, 193, 193, 193, 1039, 193, 193, + 1137, 1137, 193, 193, 193, 1040, 1035, 1037, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 1137, 193, 193, + 1038, 193, 193, 193, 1039, 193, 193, 193, 193, 193, + 193, 193, 1040, 193, 1137, 193, 1041, 193, 193, 193, + 193, 193, 193, 193, 1042, 1137, 193, 193, 193, 193, + 1044, 1137, 193, 1137, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 1041, 193, 193, 193, 193, 1137, 193, + + 193, 1042, 193, 193, 193, 193, 193, 1044, 1046, 1045, + 1043, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 1137, 1048, 193, 193, 193, 193, 193, 193, 1047, 193, + 193, 193, 193, 193, 1137, 1046, 1045, 1043, 193, 193, + 193, 193, 1062, 193, 193, 1049, 193, 193, 1048, 193, + 193, 193, 193, 193, 1050, 1047, 193, 1137, 193, 193, + 193, 1052, 1051, 193, 193, 193, 193, 193, 193, 1062, + 193, 1137, 1049, 193, 193, 193, 193, 1063, 193, 1137, + 193, 1050, 1053, 193, 193, 193, 193, 1137, 1052, 1051, + 193, 193, 193, 193, 193, 193, 1056, 1054, 193, 193, + + 193, 193, 193, 193, 1063, 1064, 1055, 193, 1137, 1053, + 193, 193, 193, 193, 1057, 193, 193, 1137, 193, 193, + 193, 193, 193, 1056, 1054, 193, 193, 193, 193, 1137, + 193, 193, 1064, 1055, 193, 193, 193, 193, 1065, 1066, + 193, 1057, 193, 193, 1058, 193, 193, 193, 193, 193, + 193, 193, 1059, 1067, 193, 1068, 1060, 193, 193, 1069, + 1070, 1071, 193, 193, 1072, 1065, 1066, 193, 1073, 193, + 193, 1058, 1074, 1075, 193, 1137, 193, 193, 193, 1059, + 1067, 1137, 1068, 1060, 193, 193, 1069, 1070, 1071, 1077, + 193, 1072, 1092, 193, 193, 1073, 193, 193, 1078, 1074, + + 1075, 193, 1079, 193, 193, 193, 193, 1080, 193, 193, + 193, 193, 193, 193, 1137, 1137, 1077, 193, 193, 1092, + 193, 193, 193, 193, 193, 1078, 193, 193, 193, 1079, + 193, 193, 193, 193, 1080, 193, 193, 193, 193, 1081, + 193, 193, 193, 193, 193, 193, 1093, 193, 1137, 193, + 193, 193, 1137, 193, 193, 193, 1084, 1082, 193, 193, + 1083, 193, 193, 193, 1094, 193, 1081, 193, 193, 193, + 193, 193, 193, 1093, 193, 193, 193, 193, 193, 193, + 193, 1086, 193, 1084, 1082, 193, 193, 1083, 193, 193, + 193, 1094, 193, 1085, 193, 193, 193, 193, 193, 193, + + 193, 193, 193, 193, 193, 193, 193, 193, 1086, 193, + 193, 1089, 1090, 193, 1087, 193, 193, 1095, 1088, 193, + 1085, 193, 193, 193, 193, 193, 193, 193, 193, 1096, + 193, 1097, 193, 193, 1098, 193, 1137, 193, 1089, 1090, + 193, 1087, 193, 193, 1095, 1088, 193, 193, 193, 193, + 193, 193, 193, 193, 1137, 193, 1096, 193, 1097, 193, + 193, 1098, 193, 1100, 1101, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 959, 958, 960, 957, 193, 193, 193, 193, - - 961, 193, 193, 962, 1119, 997, 193, 193, 193, 193, - 193, 193, 193, 963, 1119, 193, 193, 193, 193, 193, - 1119, 960, 966, 998, 193, 193, 193, 961, 193, 193, - 962, 193, 997, 193, 193, 193, 193, 1119, 1119, 193, - 963, 964, 193, 967, 193, 193, 193, 965, 193, 966, - 998, 193, 999, 968, 193, 193, 193, 193, 193, 193, - 193, 193, 1000, 969, 970, 193, 193, 193, 964, 193, - 967, 1001, 1119, 193, 965, 193, 1119, 193, 193, 999, - 968, 193, 972, 193, 193, 193, 193, 193, 971, 1000, - 969, 970, 193, 193, 193, 973, 1119, 193, 1001, 193, - - 193, 193, 1119, 193, 193, 193, 1119, 1002, 1119, 972, - 193, 974, 193, 1003, 193, 971, 976, 193, 975, 193, - 193, 193, 973, 977, 193, 193, 193, 193, 193, 978, - 193, 193, 193, 193, 1002, 979, 980, 193, 974, 981, - 1003, 193, 1119, 976, 193, 975, 193, 193, 193, 1004, - 977, 193, 193, 193, 193, 193, 978, 193, 193, 193, - 193, 193, 979, 980, 193, 193, 981, 983, 193, 984, - 193, 193, 1005, 193, 193, 1006, 1004, 1007, 193, 982, - 193, 1008, 193, 1009, 193, 193, 193, 1010, 193, 1011, - 193, 193, 193, 193, 983, 1012, 984, 193, 193, 1005, - - 193, 1013, 1006, 1014, 1007, 1015, 982, 1017, 1008, 193, - 1009, 1019, 193, 1048, 1010, 193, 1011, 193, 193, 193, - 193, 193, 1012, 193, 1018, 1049, 1119, 193, 1013, 193, - 1014, 193, 1015, 1020, 1017, 193, 193, 193, 1019, 193, - 1048, 193, 193, 193, 1021, 193, 193, 1023, 193, 193, - 193, 1018, 1049, 1022, 193, 193, 193, 193, 193, 193, - 1020, 1119, 193, 193, 193, 193, 193, 1050, 193, 193, - 193, 1021, 193, 193, 1023, 193, 193, 193, 1024, 193, - 1022, 1119, 193, 193, 193, 1025, 193, 1026, 193, 193, - 193, 193, 193, 193, 1050, 1119, 193, 193, 1119, 1027, - - 193, 193, 193, 193, 193, 1024, 193, 193, 193, 193, - 193, 193, 1025, 193, 1026, 193, 193, 193, 193, 193, - 193, 193, 1028, 193, 193, 193, 1027, 193, 193, 1051, - 193, 193, 1029, 193, 193, 193, 193, 193, 193, 1119, - 193, 193, 193, 1031, 193, 193, 193, 193, 193, 1028, - 193, 193, 193, 193, 193, 1030, 1051, 193, 193, 1029, - 193, 193, 193, 193, 193, 1035, 193, 193, 193, 193, - 1031, 1033, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 1034, 1030, 1032, 193, 193, 193, 193, 193, 193, - 193, 1052, 1035, 193, 193, 193, 193, 1053, 1033, 1036, - - 193, 193, 193, 193, 193, 193, 193, 193, 1034, 1037, - 1032, 193, 193, 193, 193, 1038, 1119, 193, 1052, 1039, - 193, 193, 193, 193, 1053, 193, 1036, 1119, 193, 193, - 1054, 193, 193, 193, 193, 1041, 1037, 193, 193, 193, - 193, 1042, 1038, 193, 193, 193, 1039, 193, 193, 193, - 1040, 1055, 193, 193, 193, 193, 193, 1054, 193, 193, - 193, 1119, 1041, 193, 193, 193, 193, 193, 1042, 1043, - 193, 193, 193, 193, 193, 193, 193, 1040, 1055, 193, - 193, 193, 193, 193, 193, 1056, 193, 193, 1044, 1057, - 193, 193, 193, 193, 1046, 1058, 1043, 1045, 193, 193, - - 193, 193, 193, 193, 193, 1059, 193, 193, 1060, 193, - 193, 193, 1056, 193, 193, 1044, 1057, 193, 193, 193, - 193, 1046, 1058, 193, 1045, 1062, 193, 193, 1064, 193, - 193, 193, 1059, 193, 193, 1060, 193, 193, 1063, 193, - 193, 1119, 193, 193, 193, 193, 193, 193, 193, 1076, - 193, 193, 1062, 193, 193, 1064, 193, 193, 1119, 193, - 193, 193, 193, 1077, 193, 1063, 193, 193, 1065, 193, - 193, 193, 193, 193, 193, 193, 1076, 193, 193, 193, - 193, 193, 1119, 1066, 193, 193, 193, 193, 193, 193, - 1077, 1068, 1119, 193, 193, 1065, 193, 193, 193, 193, - - 193, 1078, 1079, 1080, 193, 193, 193, 193, 193, 1067, - 1066, 193, 193, 193, 193, 193, 193, 193, 1068, 193, - 193, 1070, 1069, 193, 193, 193, 193, 193, 1078, 1079, - 1080, 193, 193, 1074, 193, 193, 1067, 193, 193, 1072, - 193, 193, 193, 193, 193, 193, 193, 193, 1070, 1069, - 1071, 193, 193, 193, 193, 193, 1073, 193, 193, 1081, - 1074, 193, 193, 1119, 193, 193, 1072, 193, 193, 1119, - 193, 1090, 193, 193, 193, 193, 193, 1071, 193, 193, - 193, 1119, 193, 1073, 193, 193, 1081, 193, 193, 193, - 193, 1083, 193, 193, 193, 193, 193, 193, 1090, 193, - - 193, 193, 193, 193, 1084, 193, 193, 193, 1085, 193, - 1119, 1091, 193, 193, 193, 193, 193, 193, 1083, 193, - 193, 193, 193, 193, 1087, 1086, 193, 1092, 193, 1094, - 1119, 1084, 193, 193, 193, 1085, 193, 193, 1091, 193, - 193, 1088, 193, 193, 1119, 193, 193, 193, 193, 193, - 1098, 1087, 1086, 193, 1092, 193, 1094, 193, 193, 1095, - 193, 193, 1119, 193, 193, 193, 193, 193, 1088, 1119, - 193, 1096, 193, 193, 193, 193, 193, 1098, 193, 193, - 193, 193, 193, 1119, 193, 193, 1095, 193, 193, 1119, - 193, 1119, 193, 1119, 193, 1119, 1100, 1119, 1096, 193, - - 193, 1119, 193, 1119, 1119, 193, 193, 193, 193, 1119, - 1119, 1119, 1119, 1119, 193, 1119, 1119, 1119, 1119, 1119, - 1119, 1119, 1119, 1100, 1119, 1119, 193, 1119, 1119, 1119, - 1119, 1119, 1119, 1119, 193, 46, 46, 46, 46, 46, - 88, 1119, 1119, 88, 88, 178, 178, 178, 1119, 178, - 180, 1119, 180, 180, 180, 183, 1119, 183, 183, 183, - 193, 1119, 193, 193, 193, 7, 1119, 1119, 1119, 1119, - 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, - 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, - 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, - - 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, - 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, - 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, - 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, - 1119, 1119 + 1102, 1103, 193, 193, 193, 193, 193, 1108, 193, 193, + 1100, 1101, 193, 193, 193, 193, 193, 193, 193, 193, + + 1105, 193, 193, 193, 1104, 1106, 193, 1102, 1103, 193, + 193, 193, 193, 193, 1108, 193, 193, 1109, 1110, 193, + 1112, 193, 193, 193, 1116, 1137, 193, 1105, 193, 1137, + 193, 1104, 1106, 193, 193, 193, 193, 1113, 1137, 193, + 193, 1137, 193, 193, 1109, 1110, 193, 1112, 193, 193, + 193, 1116, 193, 193, 193, 193, 193, 193, 193, 1137, + 1137, 193, 193, 1137, 1113, 1137, 193, 193, 1114, 193, + 193, 193, 193, 1137, 1137, 1137, 193, 193, 193, 193, + 1118, 193, 193, 193, 193, 193, 1137, 1137, 1137, 1137, + 1137, 193, 1137, 1137, 1137, 1114, 1137, 1137, 193, 193, + + 1137, 1137, 1137, 193, 193, 193, 1137, 1118, 1137, 1137, + 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 193, 46, + 46, 46, 46, 46, 88, 1137, 1137, 88, 88, 178, + 178, 178, 1137, 178, 180, 1137, 180, 180, 180, 183, + 1137, 183, 183, 183, 193, 1137, 193, 193, 193, 7, + 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, + 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, + 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, + 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, + 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, + + 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, + 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, + 1137, 1137, 1137, 1137, 1137, 1137 } ; -static const flex_int16_t yy_chk[4543] = +static const flex_int16_t yy_chk[4627] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -1534,40 +1549,40 @@ static const flex_int16_t yy_chk[4543] = 5, 5, 9, 9, 10, 10, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, - 18, 21, 22, 21, 24, 1122, 23, 30, 24, 21, - 1116, 21, 24, 23, 31, 21, 21, 44, 24, 99, + 18, 21, 22, 21, 24, 1140, 23, 30, 24, 21, + 1134, 21, 24, 23, 31, 21, 21, 44, 24, 99, - 23, 24, 22, 23, 1115, 25, 1114, 25, 21, 22, + 23, 24, 22, 23, 1133, 25, 1132, 25, 21, 22, 21, 24, 25, 23, 30, 24, 21, 25, 21, 24, 23, 31, 21, 21, 44, 24, 99, 23, 24, 22, - 23, 27, 25, 28, 25, 1113, 32, 27, 1112, 25, + 23, 27, 25, 28, 25, 1131, 32, 27, 1130, 25, 32, 28, 29, 42, 25, 26, 32, 28, 29, 29, - 29, 42, 1111, 26, 1110, 29, 26, 1109, 27, 26, - 28, 1108, 26, 32, 27, 26, 1107, 32, 28, 29, - 42, 1106, 26, 32, 28, 29, 29, 29, 42, 34, + 29, 42, 1129, 26, 1128, 29, 26, 1127, 27, 26, + 28, 1126, 26, 32, 27, 26, 1125, 32, 28, 29, + 42, 1124, 26, 32, 28, 29, 29, 29, 42, 34, 26, 33, 29, 26, 36, 33, 26, 43, 43, 26, - 35, 33, 26, 34, 1105, 36, 49, 49, 35, 34, + 35, 33, 26, 34, 1123, 36, 49, 49, 35, 34, - 34, 36, 35, 38, 1104, 35, 34, 38, 33, 50, - 50, 36, 33, 38, 43, 43, 1103, 35, 33, 41, + 34, 36, 35, 38, 1122, 35, 34, 38, 33, 50, + 50, 36, 33, 38, 43, 43, 1121, 35, 33, 41, 34, 41, 36, 100, 41, 35, 34, 34, 36, 35, 38, 39, 35, 39, 38, 103, 39, 71, 55, 104, - 38, 58, 58, 39, 39, 1102, 41, 1101, 41, 55, - 100, 41, 86, 86, 67, 70, 108, 71, 39, 1099, + 38, 58, 58, 39, 39, 1120, 41, 1119, 41, 55, + 100, 41, 86, 86, 67, 70, 108, 71, 39, 1117, 39, 67, 103, 39, 71, 70, 104, 67, 111, 101, 39, 39, 40, 111, 67, 70, 40, 101, 107, 40, 40, 67, 70, 108, 71, 107, 40, 114, 67, 40, - 181, 181, 70, 1097, 67, 111, 101, 1093, 1089, 40, + 181, 181, 70, 1115, 67, 111, 101, 1111, 1107, 40, - 111, 67, 70, 40, 101, 107, 40, 40, 1082, 1075, - 1061, 1047, 107, 40, 114, 1016, 40, 56, 56, 56, + 111, 67, 70, 40, 101, 107, 40, 40, 1099, 1091, + 1076, 1061, 107, 40, 114, 1028, 40, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 61, 61, - 985, 61, 61, 61, 61, 61, 61, 77, 68, 84, - 928, 871, 68, 791, 711, 115, 68, 61, 61, 61, + 995, 61, 61, 61, 61, 61, 61, 77, 68, 84, + 936, 877, 68, 795, 713, 115, 68, 61, 61, 61, 72, 116, 68, 61, 72, 61, 117, 77, 118, 84, 72, 61, 68, 61, 77, 68, 84, 61, 61, 68, - 72, 83, 115, 68, 83, 83, 604, 72, 116, 68, + 72, 83, 115, 68, 83, 83, 605, 72, 116, 68, 61, 72, 61, 117, 77, 118, 84, 72, 61, 68, 61, 83, 120, 497, 61, 61, 386, 72, 83, 274, @@ -1709,312 +1724,321 @@ static const flex_int16_t yy_chk[4543] = 374, 375, 374, 376, 377, 355, 356, 357, 373, 378, 379, 358, 380, 359, 360, 361, 363, 364, 365, 366, 381, 367, 368, 369, 370, 372, 373, 374, 375, 374, - 376, 377, 383, 384, 382, 373, 378, 379, 382, 380, - 0, 0, 388, 389, 390, 0, 391, 381, 387, 387, - 387, 387, 387, 387, 387, 387, 387, 387, 393, 383, - - 384, 382, 388, 389, 390, 382, 391, 392, 394, 388, - 389, 390, 394, 391, 392, 0, 395, 0, 393, 0, - 397, 0, 0, 498, 397, 393, 398, 392, 396, 388, - 389, 390, 394, 391, 392, 394, 395, 0, 396, 394, - 397, 392, 399, 395, 398, 393, 398, 397, 396, 399, - 498, 397, 402, 398, 392, 396, 0, 401, 405, 394, - 408, 0, 399, 395, 400, 396, 400, 397, 402, 399, - 401, 398, 402, 398, 403, 396, 399, 401, 405, 402, - 408, 400, 403, 404, 401, 405, 400, 408, 406, 399, - 0, 400, 406, 400, 403, 402, 409, 401, 404, 402, - - 407, 403, 411, 404, 401, 405, 411, 408, 400, 403, - 404, 410, 406, 400, 407, 406, 409, 412, 410, 406, - 407, 403, 414, 409, 0, 404, 411, 407, 0, 411, - 404, 410, 412, 411, 413, 415, 413, 412, 410, 406, - 418, 407, 414, 409, 412, 410, 417, 407, 416, 414, - 415, 416, 419, 411, 499, 415, 413, 417, 410, 412, - 418, 413, 415, 413, 412, 421, 417, 418, 500, 414, - 420, 416, 419, 417, 420, 416, 423, 415, 416, 419, - 0, 499, 415, 413, 417, 421, 422, 418, 422, 425, - 423, 426, 421, 417, 420, 500, 423, 420, 416, 419, - - 424, 420, 425, 423, 427, 426, 428, 424, 422, 425, - 428, 426, 421, 422, 0, 422, 425, 423, 426, 431, - 424, 420, 0, 423, 427, 501, 431, 424, 502, 425, - 428, 427, 426, 428, 424, 422, 425, 428, 426, 431, - 429, 430, 432, 433, 0, 432, 431, 424, 429, 430, - 0, 427, 501, 431, 503, 502, 0, 428, 435, 433, - 429, 430, 435, 433, 0, 432, 431, 429, 430, 432, - 433, 434, 432, 0, 434, 429, 430, 438, 435, 436, - 437, 503, 504, 438, 0, 435, 433, 429, 430, 435, - 433, 434, 432, 437, 436, 0, 440, 438, 434, 436, - - 437, 434, 439, 0, 438, 435, 436, 437, 441, 504, - 438, 442, 439, 0, 506, 0, 440, 444, 434, 510, - 437, 436, 439, 440, 438, 445, 436, 437, 441, 439, - 443, 442, 511, 444, 445, 441, 446, 444, 442, 439, - 443, 506, 448, 440, 444, 445, 510, 0, 0, 439, - 443, 447, 445, 0, 0, 441, 446, 443, 442, 511, - 444, 445, 448, 446, 444, 512, 447, 443, 0, 448, - 449, 447, 445, 0, 449, 450, 450, 443, 447, 452, - 451, 452, 0, 446, 451, 453, 0, 453, 0, 448, - 449, 514, 512, 447, 0, 455, 450, 449, 447, 452, - - 454, 449, 450, 450, 451, 453, 452, 451, 452, 456, - 455, 451, 453, 457, 453, 455, 454, 449, 514, 461, - 454, 458, 455, 450, 0, 456, 452, 454, 458, 456, - 460, 451, 453, 457, 462, 0, 456, 455, 459, 461, - 457, 458, 455, 454, 460, 463, 461, 454, 458, 463, - 460, 459, 456, 464, 462, 458, 456, 460, 459, 465, - 457, 462, 464, 515, 516, 459, 461, 466, 458, 463, - 465, 460, 463, 464, 0, 466, 463, 460, 459, 465, - 464, 462, 0, 468, 467, 459, 465, 466, 467, 464, - 515, 516, 469, 471, 466, 469, 463, 465, 468, 0, - - 464, 473, 466, 468, 474, 0, 465, 472, 467, 470, - 468, 467, 469, 471, 466, 467, 470, 472, 476, 469, - 471, 473, 469, 0, 474, 468, 477, 472, 473, 470, - 468, 474, 475, 476, 472, 467, 470, 482, 476, 469, - 471, 477, 478, 470, 472, 476, 477, 479, 473, 478, - 475, 474, 475, 477, 472, 480, 470, 482, 479, 475, - 476, 483, 478, 481, 482, 476, 517, 479, 477, 478, - 480, 484, 481, 477, 479, 480, 478, 475, 518, 475, - 484, 483, 480, 481, 482, 479, 485, 0, 483, 478, - 481, 484, 519, 517, 479, 485, 488, 480, 484, 481, - - 488, 487, 480, 0, 486, 518, 485, 484, 483, 490, - 481, 487, 520, 485, 486, 493, 486, 489, 484, 519, - 488, 487, 485, 488, 486, 490, 489, 488, 487, 490, - 493, 486, 491, 485, 491, 493, 490, 489, 487, 520, - 492, 486, 493, 486, 489, 0, 521, 488, 487, 0, - 522, 486, 490, 489, 491, 496, 490, 493, 492, 491, - 492, 491, 493, 494, 489, 523, 495, 492, 496, 495, - 524, 527, 494, 521, 528, 496, 494, 522, 529, 530, - 531, 491, 496, 494, 532, 492, 495, 492, 533, 535, - 494, 536, 523, 495, 539, 496, 495, 524, 527, 494, - - 540, 528, 496, 494, 542, 529, 530, 531, 545, 546, - 494, 532, 547, 495, 548, 533, 535, 549, 536, 550, - 552, 539, 556, 558, 560, 561, 561, 540, 562, 563, - 550, 542, 565, 566, 567, 545, 546, 568, 569, 547, - 571, 548, 572, 573, 549, 574, 550, 552, 575, 556, - 558, 560, 561, 561, 576, 562, 563, 550, 577, 565, - 566, 567, 578, 579, 568, 569, 581, 571, 582, 572, - 573, 583, 574, 584, 587, 575, 588, 590, 591, 592, - 593, 576, 594, 595, 596, 577, 597, 599, 601, 578, - 579, 0, 0, 581, 0, 582, 607, 608, 583, 605, - - 584, 587, 0, 588, 590, 591, 592, 593, 606, 594, - 595, 596, 605, 597, 599, 601, 607, 608, 609, 605, - 610, 606, 611, 607, 608, 0, 605, 0, 606, 610, - 612, 609, 614, 615, 0, 606, 0, 613, 609, 605, - 610, 613, 611, 607, 608, 609, 605, 610, 606, 611, - 612, 616, 614, 615, 617, 606, 610, 612, 609, 614, - 615, 613, 617, 619, 613, 609, 618, 610, 613, 611, - 618, 616, 620, 0, 617, 0, 619, 612, 616, 614, - 615, 617, 622, 619, 0, 621, 618, 624, 613, 617, - 619, 623, 620, 618, 624, 0, 622, 618, 616, 620, - - 621, 617, 622, 619, 625, 621, 623, 624, 0, 622, - 619, 623, 621, 618, 624, 626, 714, 716, 623, 620, - 625, 624, 627, 622, 625, 0, 627, 621, 628, 622, - 626, 625, 621, 623, 624, 626, 630, 629, 623, 629, - 630, 628, 626, 714, 716, 631, 627, 625, 628, 627, - 632, 625, 631, 627, 633, 628, 630, 626, 634, 629, - 635, 0, 626, 630, 629, 631, 629, 630, 628, 634, - 632, 635, 631, 627, 633, 628, 0, 632, 634, 631, - 635, 633, 640, 630, 636, 634, 629, 635, 637, 638, - 639, 0, 631, 638, 639, 0, 634, 632, 635, 641, - - 636, 633, 640, 637, 636, 634, 0, 635, 637, 640, - 718, 636, 644, 638, 639, 637, 638, 639, 642, 641, - 638, 639, 645, 719, 643, 0, 641, 636, 643, 640, - 637, 636, 644, 642, 648, 637, 0, 718, 642, 644, - 638, 639, 645, 646, 649, 642, 641, 646, 643, 645, - 719, 643, 647, 649, 648, 643, 650, 651, 652, 644, - 642, 648, 0, 647, 649, 642, 0, 646, 654, 645, - 646, 649, 647, 653, 646, 643, 650, 651, 652, 647, - 649, 648, 0, 650, 651, 652, 653, 654, 654, 655, - 647, 649, 0, 653, 646, 654, 0, 656, 658, 647, - - 653, 0, 655, 650, 651, 652, 657, 660, 657, 655, - 656, 661, 662, 653, 654, 654, 655, 656, 658, 657, - 653, 659, 720, 664, 656, 658, 657, 660, 659, 655, - 0, 661, 662, 657, 660, 657, 655, 656, 661, 662, - 665, 659, 663, 664, 656, 658, 657, 665, 659, 720, - 664, 666, 667, 657, 660, 659, 0, 663, 661, 662, - 665, 668, 663, 669, 0, 671, 669, 665, 659, 663, - 664, 666, 667, 0, 665, 668, 668, 0, 666, 667, - 673, 668, 0, 669, 663, 671, 721, 665, 668, 663, - 669, 670, 671, 669, 672, 0, 672, 676, 666, 667, - - 673, 722, 668, 668, 670, 676, 674, 673, 668, 675, - 669, 670, 671, 721, 677, 723, 672, 676, 670, 674, - 0, 672, 675, 672, 676, 725, 674, 673, 722, 675, - 0, 670, 676, 674, 677, 678, 675, 680, 670, 678, - 682, 677, 723, 672, 676, 680, 674, 679, 726, 675, - 681, 679, 725, 674, 0, 682, 675, 680, 0, 678, - 682, 677, 678, 681, 680, 683, 678, 682, 683, 0, - 681, 679, 680, 684, 679, 726, 685, 681, 679, 687, - 0, 684, 682, 0, 680, 685, 678, 682, 683, 686, - 681, 686, 683, 684, 688, 683, 685, 681, 679, 687, - - 684, 0, 690, 685, 692, 689, 687, 691, 684, 689, - 693, 686, 685, 727, 688, 683, 686, 691, 686, 694, - 684, 688, 690, 685, 692, 689, 687, 691, 695, 690, - 693, 692, 689, 694, 691, 0, 689, 693, 686, 694, - 727, 688, 695, 696, 691, 697, 694, 697, 695, 690, - 0, 692, 689, 698, 691, 695, 701, 693, 0, 703, - 694, 699, 698, 696, 0, 704, 694, 697, 704, 695, - 696, 701, 697, 698, 697, 695, 701, 699, 700, 703, - 698, 699, 700, 701, 0, 704, 703, 705, 699, 698, - 696, 702, 704, 702, 697, 704, 707, 706, 701, 708, - - 698, 709, 700, 701, 699, 700, 703, 705, 699, 700, - 710, 702, 704, 706, 705, 728, 707, 706, 702, 708, - 702, 709, 730, 707, 706, 731, 708, 732, 709, 700, - 710, 733, 734, 735, 705, 736, 737, 710, 702, 738, - 706, 739, 728, 707, 706, 742, 708, 743, 709, 730, - 745, 747, 731, 750, 732, 751, 752, 710, 733, 734, - 735, 753, 736, 737, 758, 760, 738, 761, 739, 762, - 765, 766, 742, 767, 743, 768, 769, 745, 747, 771, - 750, 772, 751, 752, 773, 774, 775, 776, 753, 777, - 778, 758, 760, 779, 761, 780, 762, 765, 766, 781, - - 767, 783, 768, 769, 784, 785, 771, 787, 772, 788, - 789, 773, 774, 775, 776, 792, 777, 778, 793, 794, - 779, 795, 780, 796, 797, 0, 781, 798, 783, 872, - 0, 784, 785, 874, 787, 792, 788, 789, 793, 794, - 794, 795, 792, 796, 797, 793, 794, 798, 795, 800, - 796, 797, 799, 799, 798, 803, 872, 801, 800, 875, - 874, 0, 792, 804, 0, 793, 794, 794, 795, 800, - 796, 797, 801, 799, 798, 803, 800, 801, 802, 799, - 799, 0, 803, 804, 801, 800, 875, 805, 802, 808, - 804, 805, 809, 806, 0, 0, 800, 876, 802, 801, - - 799, 807, 803, 806, 801, 802, 878, 805, 807, 808, - 804, 0, 809, 806, 805, 802, 808, 811, 805, 809, - 806, 807, 810, 813, 876, 802, 810, 880, 807, 881, - 806, 0, 811, 878, 805, 807, 808, 811, 812, 809, - 806, 814, 810, 813, 811, 0, 0, 812, 807, 810, - 813, 815, 816, 810, 880, 0, 881, 882, 812, 811, - 820, 814, 817, 821, 811, 812, 815, 816, 814, 810, - 813, 815, 816, 819, 812, 819, 817, 818, 815, 816, - 820, 818, 817, 821, 882, 812, 822, 820, 814, 817, - 821, 824, 884, 815, 816, 819, 886, 818, 815, 816, - - 819, 822, 819, 817, 818, 823, 822, 820, 818, 817, - 821, 824, 823, 822, 825, 826, 825, 0, 824, 884, - 828, 890, 819, 886, 818, 823, 829, 0, 822, 827, - 830, 831, 823, 822, 825, 826, 0, 0, 824, 823, - 828, 825, 826, 825, 827, 830, 829, 828, 890, 827, - 830, 831, 823, 829, 832, 834, 827, 830, 831, 833, - 835, 825, 826, 836, 837, 838, 833, 828, 832, 839, - 0, 827, 830, 829, 832, 834, 827, 830, 831, 833, - 835, 832, 834, 836, 837, 838, 833, 835, 842, 839, - 836, 837, 838, 833, 840, 832, 839, 841, 840, 843, - - 841, 832, 834, 842, 0, 892, 833, 835, 842, 844, - 836, 837, 838, 845, 0, 842, 839, 841, 840, 843, - 0, 840, 848, 893, 841, 840, 843, 841, 846, 844, - 842, 850, 892, 845, 847, 842, 844, 0, 0, 849, - 845, 846, 848, 849, 841, 840, 843, 847, 846, 848, - 893, 850, 899, 851, 847, 846, 844, 851, 850, 849, - 845, 847, 900, 852, 853, 853, 849, 852, 846, 848, - 849, 903, 0, 854, 847, 846, 0, 851, 850, 899, - 851, 847, 855, 855, 851, 853, 849, 852, 854, 900, - 852, 853, 853, 854, 852, 856, 0, 857, 903, 856, - - 854, 859, 0, 855, 851, 858, 0, 904, 0, 855, - 855, 857, 853, 906, 852, 854, 859, 857, 858, 856, - 854, 859, 856, 860, 857, 858, 856, 860, 859, 861, - 855, 862, 858, 861, 904, 863, 864, 864, 857, 865, - 906, 866, 0, 859, 857, 858, 856, 860, 859, 907, - 860, 862, 858, 861, 860, 863, 861, 864, 862, 865, - 861, 866, 863, 864, 864, 867, 865, 868, 866, 869, - 870, 868, 908, 869, 860, 910, 907, 911, 862, 867, - 861, 912, 863, 916, 864, 867, 865, 918, 866, 919, - 870, 868, 867, 869, 868, 920, 869, 870, 868, 908, - - 869, 921, 910, 926, 911, 927, 867, 929, 912, 930, - 916, 932, 867, 991, 918, 931, 919, 870, 868, 933, - 869, 934, 920, 936, 931, 992, 0, 929, 921, 930, - 926, 932, 927, 933, 929, 931, 930, 935, 932, 933, - 991, 934, 931, 936, 935, 937, 933, 938, 934, 938, - 936, 931, 992, 937, 929, 940, 930, 935, 932, 942, - 933, 0, 931, 939, 935, 937, 933, 994, 934, 938, - 936, 935, 937, 944, 938, 940, 938, 945, 939, 942, - 937, 0, 940, 939, 935, 941, 942, 943, 941, 943, - 939, 946, 937, 944, 994, 0, 938, 945, 0, 947, - - 944, 948, 940, 951, 945, 939, 942, 952, 941, 943, - 939, 946, 941, 949, 943, 941, 943, 950, 946, 947, - 944, 948, 949, 951, 945, 953, 947, 952, 948, 995, - 951, 954, 950, 949, 952, 941, 943, 950, 946, 0, - 949, 955, 956, 957, 950, 953, 947, 958, 948, 949, - 951, 954, 953, 959, 952, 956, 995, 962, 954, 950, - 949, 955, 956, 957, 950, 964, 963, 958, 955, 956, - 957, 961, 953, 959, 958, 961, 960, 962, 954, 965, - 959, 963, 956, 960, 962, 964, 963, 966, 955, 956, - 957, 1000, 964, 963, 958, 961, 960, 1002, 961, 965, - - 959, 970, 961, 960, 962, 969, 965, 966, 963, 967, - 960, 967, 964, 963, 966, 968, 0, 968, 1000, 969, - 971, 970, 961, 960, 1002, 969, 965, 0, 970, 972, - 1003, 967, 969, 974, 966, 975, 967, 968, 967, 975, - 971, 976, 968, 973, 968, 976, 969, 971, 970, 972, - 973, 1006, 969, 974, 979, 980, 972, 1003, 967, 975, - 974, 0, 975, 973, 968, 976, 975, 971, 976, 977, - 973, 977, 976, 978, 979, 980, 972, 973, 1006, 981, - 974, 979, 980, 982, 983, 1007, 975, 984, 978, 1010, - 973, 977, 976, 978, 984, 1011, 977, 983, 977, 981, - - 978, 979, 980, 982, 983, 1012, 981, 984, 1013, 1017, - 982, 983, 1007, 1018, 984, 978, 1010, 1019, 977, 1020, - 978, 984, 1011, 1021, 983, 1022, 981, 1024, 1025, 1017, - 982, 983, 1012, 1018, 984, 1013, 1017, 1019, 1023, 1020, - 1018, 0, 1023, 1021, 1019, 1022, 1020, 1024, 1025, 1049, - 1021, 1027, 1022, 1026, 1024, 1025, 1017, 1028, 0, 1029, - 1018, 1030, 1023, 1052, 1019, 1023, 1020, 1032, 1026, 1023, - 1021, 1027, 1022, 1026, 1024, 1025, 1049, 1028, 1027, 1029, - 1026, 1030, 0, 1031, 1028, 1031, 1029, 1032, 1030, 1023, - 1052, 1034, 0, 1035, 1032, 1026, 1033, 1036, 1027, 1039, - - 1026, 1054, 1057, 1058, 1028, 1031, 1029, 1037, 1030, 1033, - 1031, 1034, 1031, 1035, 1032, 1038, 1033, 1036, 1034, 1039, - 1035, 1038, 1037, 1033, 1036, 1040, 1039, 1037, 1054, 1057, - 1058, 1042, 1031, 1044, 1037, 1038, 1033, 1041, 1034, 1042, - 1035, 1043, 1038, 1033, 1036, 1040, 1039, 1045, 1038, 1037, - 1041, 1042, 1040, 1044, 1037, 1046, 1043, 1041, 1042, 1059, - 1044, 1043, 1038, 0, 1041, 1062, 1042, 1045, 1043, 0, - 1064, 1076, 1040, 1065, 1045, 1046, 1063, 1041, 1042, 1067, - 1044, 0, 1046, 1043, 1041, 1062, 1059, 1069, 1043, 1066, - 1064, 1063, 1062, 1065, 1045, 1068, 1063, 1064, 1076, 1067, - - 1065, 1070, 1046, 1063, 1066, 1071, 1067, 1069, 1068, 1066, - 0, 1078, 1062, 1072, 1069, 1068, 1066, 1064, 1063, 1074, - 1065, 1070, 1068, 1063, 1072, 1071, 1067, 1081, 1070, 1083, - 0, 1066, 1071, 1072, 1069, 1068, 1066, 1073, 1078, 1074, - 1072, 1073, 1068, 1084, 0, 1085, 1074, 1086, 1070, 1083, - 1092, 1072, 1071, 1087, 1081, 1094, 1083, 1073, 1095, 1085, - 1072, 1088, 0, 1084, 1073, 1085, 1074, 1086, 1073, 0, - 1084, 1088, 1085, 1087, 1086, 1094, 1083, 1092, 1095, 1100, - 1087, 1088, 1094, 0, 1073, 1095, 1085, 1096, 1088, 0, - 1084, 0, 1085, 0, 1086, 0, 1096, 0, 1088, 1100, - - 1087, 0, 1094, 0, 0, 1095, 1100, 1096, 1088, 0, - 0, 0, 0, 0, 1096, 0, 0, 0, 0, 0, - 0, 0, 0, 1096, 0, 0, 1100, 0, 0, 0, - 0, 0, 0, 0, 1096, 1120, 1120, 1120, 1120, 1120, - 1121, 0, 0, 1121, 1121, 1123, 1123, 1123, 0, 1123, - 1124, 0, 1124, 1124, 1124, 1125, 0, 1125, 1125, 1125, - 1126, 0, 1126, 1126, 1126, 1119, 1119, 1119, 1119, 1119, - 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, - 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, - 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, - - 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, - 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, - 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, - 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, - 1119, 1119 + 376, 377, 379, 383, 382, 373, 378, 379, 382, 380, + 384, 0, 388, 389, 390, 0, 391, 381, 387, 387, + 387, 387, 387, 387, 387, 387, 387, 387, 393, 379, + + 383, 382, 388, 389, 390, 382, 391, 384, 392, 388, + 389, 390, 394, 391, 395, 392, 394, 396, 393, 0, + 397, 498, 0, 0, 397, 393, 0, 396, 392, 388, + 389, 390, 398, 391, 395, 392, 394, 396, 499, 394, + 397, 395, 392, 394, 396, 393, 399, 397, 498, 401, + 398, 397, 398, 399, 396, 392, 0, 0, 0, 398, + 0, 395, 401, 394, 396, 499, 399, 397, 400, 401, + 400, 402, 0, 399, 403, 0, 401, 398, 0, 398, + 399, 500, 403, 405, 404, 400, 407, 402, 0, 401, + 400, 402, 0, 399, 403, 400, 401, 400, 402, 404, + + 407, 403, 408, 405, 404, 409, 407, 501, 500, 403, + 405, 404, 400, 407, 402, 406, 410, 400, 402, 406, + 411, 403, 408, 410, 411, 409, 404, 407, 414, 408, + 405, 404, 409, 407, 501, 413, 410, 413, 412, 406, + 0, 415, 406, 410, 411, 0, 406, 411, 414, 408, + 410, 411, 409, 412, 418, 414, 415, 413, 412, 419, + 0, 415, 413, 410, 413, 412, 406, 416, 415, 0, + 416, 411, 421, 502, 418, 414, 417, 503, 420, 419, + 412, 418, 420, 415, 413, 412, 419, 417, 415, 422, + 416, 422, 421, 423, 416, 0, 417, 416, 0, 421, + + 502, 418, 420, 417, 503, 420, 419, 423, 424, 420, + 426, 422, 425, 423, 417, 424, 422, 416, 422, 421, + 423, 427, 428, 417, 426, 425, 428, 0, 424, 420, + 426, 0, 425, 0, 423, 424, 429, 426, 422, 425, + 423, 427, 424, 0, 429, 504, 428, 431, 427, 428, + 430, 426, 425, 428, 431, 424, 429, 426, 430, 425, + 433, 432, 434, 429, 432, 434, 0, 431, 427, 0, + 430, 429, 504, 428, 431, 435, 433, 430, 436, 435, + 433, 431, 434, 429, 432, 430, 0, 433, 432, 434, + 438, 432, 434, 436, 431, 435, 438, 430, 436, 437, + + 506, 440, 435, 433, 439, 436, 435, 433, 0, 434, + 438, 432, 437, 441, 439, 442, 444, 438, 509, 437, + 436, 440, 435, 438, 439, 436, 437, 506, 440, 445, + 446, 439, 444, 441, 443, 442, 444, 438, 445, 437, + 441, 439, 442, 444, 443, 509, 437, 0, 440, 445, + 446, 439, 447, 448, 443, 510, 445, 446, 0, 444, + 441, 443, 442, 444, 449, 445, 511, 447, 449, 450, + 450, 443, 447, 448, 451, 0, 445, 446, 451, 447, + 448, 443, 510, 452, 449, 452, 453, 512, 453, 455, + 450, 449, 0, 511, 447, 449, 450, 450, 451, 447, + + 448, 451, 454, 452, 455, 451, 453, 456, 457, 455, + 452, 449, 452, 453, 512, 453, 455, 450, 454, 458, + 461, 462, 454, 456, 459, 451, 458, 456, 457, 454, + 452, 455, 514, 453, 456, 457, 455, 459, 460, 458, + 461, 462, 515, 0, 459, 454, 458, 461, 462, 454, + 456, 459, 460, 458, 456, 457, 463, 0, 460, 514, + 463, 464, 465, 0, 459, 460, 458, 461, 462, 515, + 464, 459, 0, 465, 467, 468, 466, 0, 467, 460, + 463, 464, 465, 463, 466, 460, 0, 463, 464, 465, + 468, 0, 470, 516, 471, 468, 466, 464, 467, 470, + + 465, 467, 468, 466, 473, 467, 517, 463, 464, 465, + 469, 466, 470, 469, 471, 474, 475, 468, 472, 470, + 516, 471, 468, 466, 473, 467, 470, 518, 472, 476, + 469, 473, 477, 517, 475, 474, 475, 469, 472, 470, + 469, 471, 474, 475, 476, 472, 478, 477, 519, 476, + 0, 473, 477, 478, 518, 472, 476, 469, 479, 477, + 0, 475, 474, 475, 482, 472, 478, 480, 481, 479, + 483, 476, 484, 478, 477, 519, 476, 481, 479, 477, + 478, 484, 480, 0, 482, 479, 0, 480, 481, 0, + 483, 482, 484, 478, 480, 481, 479, 483, 485, 484, + + 486, 520, 488, 487, 481, 479, 488, 485, 484, 480, + 486, 482, 486, 487, 480, 481, 490, 483, 485, 484, + 486, 0, 489, 487, 521, 485, 488, 486, 520, 488, + 487, 489, 490, 488, 485, 496, 490, 486, 0, 486, + 487, 493, 489, 490, 491, 485, 491, 486, 496, 489, + 487, 521, 492, 488, 522, 496, 493, 495, 489, 490, + 495, 493, 496, 490, 523, 494, 491, 524, 493, 489, + 492, 491, 492, 491, 494, 496, 527, 495, 494, 492, + 528, 522, 496, 493, 495, 494, 529, 495, 493, 530, + 531, 523, 494, 491, 524, 532, 533, 492, 535, 492, + + 536, 494, 539, 527, 495, 494, 540, 528, 542, 545, + 546, 547, 494, 529, 548, 549, 530, 531, 552, 550, + 556, 558, 532, 533, 560, 535, 562, 536, 563, 539, + 550, 561, 561, 540, 565, 542, 545, 546, 547, 566, + 567, 548, 549, 568, 569, 552, 550, 556, 558, 571, + 572, 560, 573, 562, 574, 563, 575, 550, 561, 561, + 576, 565, 577, 578, 579, 581, 566, 567, 582, 583, + 568, 569, 584, 587, 588, 590, 571, 572, 591, 573, + 592, 574, 593, 575, 594, 595, 596, 576, 597, 577, + 578, 579, 581, 598, 600, 582, 583, 602, 608, 584, + + 587, 588, 590, 606, 0, 591, 607, 592, 609, 593, + 0, 594, 595, 596, 610, 597, 606, 612, 608, 607, + 598, 600, 611, 606, 602, 608, 607, 610, 609, 716, + 606, 611, 613, 607, 610, 609, 614, 612, 0, 0, + 614, 610, 611, 606, 612, 608, 607, 0, 615, 611, + 606, 616, 613, 607, 610, 609, 716, 618, 611, 613, + 614, 610, 617, 614, 612, 618, 617, 614, 615, 611, + 619, 616, 0, 0, 619, 615, 0, 618, 616, 613, + 621, 0, 0, 620, 618, 623, 617, 614, 0, 617, + 619, 622, 618, 617, 624, 615, 620, 619, 616, 623, + + 621, 619, 0, 620, 618, 623, 622, 621, 625, 624, + 620, 622, 623, 617, 624, 625, 0, 619, 622, 627, + 718, 624, 0, 620, 626, 628, 623, 621, 625, 628, + 620, 0, 623, 622, 627, 625, 624, 629, 622, 627, + 626, 624, 625, 630, 626, 630, 627, 718, 633, 628, + 629, 626, 628, 632, 631, 625, 628, 629, 631, 634, + 632, 627, 0, 720, 629, 630, 627, 626, 633, 721, + 630, 626, 630, 632, 631, 633, 628, 629, 635, 634, + 632, 631, 636, 637, 629, 631, 634, 632, 722, 635, + 720, 0, 630, 636, 723, 633, 721, 638, 635, 637, + + 632, 631, 636, 637, 639, 635, 634, 641, 639, 636, + 637, 0, 638, 642, 640, 722, 635, 638, 640, 644, + 636, 723, 643, 644, 638, 635, 637, 641, 639, 636, + 637, 639, 645, 642, 641, 639, 646, 643, 640, 638, + 642, 640, 643, 644, 638, 640, 644, 647, 0, 643, + 644, 647, 645, 649, 641, 639, 646, 648, 0, 645, + 642, 651, 652, 646, 643, 640, 650, 653, 648, 643, + 644, 647, 654, 649, 647, 650, 0, 648, 647, 645, + 649, 651, 652, 646, 648, 654, 650, 653, 651, 652, + 0, 655, 654, 650, 653, 648, 0, 724, 647, 654, + + 649, 0, 650, 656, 648, 659, 0, 657, 651, 652, + 655, 655, 654, 650, 653, 658, 656, 658, 655, 654, + 657, 661, 0, 656, 724, 659, 660, 657, 658, 662, + 656, 663, 659, 660, 657, 658, 0, 655, 655, 665, + 725, 661, 658, 656, 658, 0, 660, 657, 661, 662, + 656, 663, 659, 660, 657, 658, 662, 664, 663, 665, + 660, 667, 658, 666, 0, 668, 665, 725, 661, 671, + 666, 670, 664, 660, 670, 726, 662, 664, 663, 0, + 669, 667, 671, 666, 664, 668, 665, 0, 667, 671, + 666, 670, 668, 672, 669, 669, 671, 666, 670, 664, + + 669, 670, 726, 673, 664, 673, 674, 669, 667, 671, + 666, 675, 668, 672, 678, 676, 671, 0, 670, 679, + 672, 669, 669, 679, 675, 673, 674, 669, 676, 677, + 673, 675, 673, 674, 678, 676, 728, 677, 675, 681, + 672, 678, 676, 679, 680, 0, 679, 681, 680, 677, + 679, 675, 673, 674, 0, 676, 677, 683, 675, 681, + 682, 678, 676, 728, 677, 0, 681, 687, 680, 687, + 679, 680, 683, 682, 681, 680, 677, 683, 684, 0, + 682, 684, 685, 686, 683, 0, 681, 682, 0, 687, + 685, 688, 686, 689, 687, 680, 687, 729, 0, 683, + + 682, 684, 685, 686, 683, 684, 691, 682, 684, 685, + 686, 688, 692, 689, 0, 693, 687, 685, 688, 686, + 689, 690, 692, 694, 729, 690, 691, 697, 684, 685, + 686, 695, 692, 691, 698, 693, 698, 0, 688, 692, + 689, 690, 693, 694, 730, 695, 696, 697, 690, 692, + 694, 695, 690, 691, 697, 699, 698, 0, 695, 692, + 696, 698, 693, 698, 699, 700, 696, 731, 690, 702, + 694, 730, 695, 696, 697, 699, 701, 703, 695, 703, + 701, 700, 699, 698, 702, 700, 0, 696, 0, 702, + 704, 699, 700, 696, 731, 705, 702, 703, 705, 707, + + 701, 706, 699, 701, 703, 706, 703, 701, 700, 733, + 704, 702, 700, 708, 709, 705, 702, 704, 710, 707, + 734, 706, 705, 711, 703, 705, 707, 701, 706, 708, + 735, 712, 706, 708, 709, 736, 733, 704, 710, 737, + 708, 709, 705, 711, 738, 710, 707, 734, 706, 739, + 711, 712, 740, 741, 742, 745, 708, 735, 712, 746, + 708, 709, 736, 748, 750, 710, 737, 753, 754, 755, + 711, 738, 756, 761, 763, 764, 739, 765, 712, 740, + 741, 742, 745, 768, 769, 770, 746, 771, 772, 774, + 748, 750, 775, 776, 753, 754, 755, 777, 778, 756, + + 761, 763, 764, 779, 765, 780, 781, 782, 783, 784, + 768, 769, 770, 786, 771, 772, 774, 787, 788, 775, + 776, 790, 791, 792, 777, 778, 793, 796, 0, 0, + 779, 797, 780, 781, 782, 783, 784, 799, 878, 798, + 786, 800, 801, 802, 787, 788, 0, 796, 790, 791, + 792, 797, 880, 793, 796, 803, 803, 799, 797, 798, + 798, 800, 801, 802, 799, 878, 798, 0, 800, 801, + 802, 804, 805, 804, 796, 807, 803, 808, 797, 880, + 0, 805, 803, 803, 799, 807, 798, 798, 800, 801, + 802, 806, 805, 804, 809, 807, 0, 808, 804, 805, + + 804, 881, 807, 803, 808, 810, 806, 811, 805, 810, + 882, 806, 807, 0, 809, 813, 0, 811, 806, 805, + 804, 809, 807, 812, 808, 810, 814, 811, 881, 883, + 812, 818, 810, 806, 811, 813, 810, 882, 806, 817, + 816, 809, 813, 812, 811, 815, 814, 0, 817, 815, + 812, 818, 810, 814, 811, 816, 883, 812, 818, 817, + 816, 819, 813, 822, 820, 815, 817, 816, 0, 0, + 812, 0, 815, 814, 821, 817, 815, 822, 818, 820, + 825, 819, 816, 822, 820, 826, 817, 816, 819, 821, + 822, 820, 815, 823, 821, 828, 824, 823, 824, 827, + + 825, 821, 828, 0, 822, 826, 820, 825, 819, 0, + 822, 820, 826, 823, 827, 828, 821, 829, 824, 827, + 823, 821, 828, 824, 823, 824, 827, 825, 830, 828, + 830, 831, 826, 833, 832, 0, 834, 829, 0, 836, + 823, 827, 828, 0, 829, 824, 827, 835, 830, 832, + 0, 831, 0, 833, 832, 830, 834, 830, 831, 836, + 833, 832, 835, 834, 829, 837, 836, 835, 839, 0, + 838, 840, 885, 841, 835, 830, 832, 838, 831, 837, + 833, 832, 842, 834, 0, 837, 836, 843, 839, 835, + 838, 840, 837, 841, 835, 839, 844, 838, 840, 885, + + 841, 845, 842, 0, 838, 845, 837, 843, 887, 842, + 846, 847, 837, 846, 843, 839, 844, 838, 840, 848, + 841, 849, 850, 844, 853, 845, 847, 888, 845, 842, + 846, 847, 845, 0, 843, 887, 0, 846, 847, 848, + 846, 849, 850, 844, 853, 855, 848, 851, 849, 850, + 852, 853, 845, 847, 888, 854, 0, 846, 847, 854, + 851, 0, 0, 852, 889, 855, 848, 851, 849, 850, + 852, 853, 855, 0, 851, 854, 856, 852, 0, 891, + 856, 857, 854, 858, 858, 857, 854, 851, 860, 860, + 852, 889, 855, 893, 851, 861, 0, 852, 859, 861, + + 856, 0, 854, 856, 858, 857, 891, 856, 857, 860, + 858, 858, 857, 859, 862, 860, 860, 863, 859, 861, + 893, 0, 861, 864, 0, 859, 861, 856, 862, 865, + 863, 858, 857, 865, 862, 866, 860, 863, 864, 866, + 859, 862, 0, 864, 863, 859, 861, 867, 868, 870, + 864, 869, 869, 865, 897, 862, 865, 863, 0, 866, + 865, 862, 866, 871, 863, 864, 866, 867, 868, 870, + 864, 872, 869, 873, 867, 868, 870, 873, 869, 869, + 865, 897, 899, 871, 875, 872, 866, 876, 875, 900, + 871, 872, 906, 874, 867, 868, 870, 873, 872, 869, + + 873, 907, 874, 910, 873, 911, 913, 876, 875, 899, + 871, 875, 872, 874, 876, 875, 900, 914, 872, 906, + 874, 915, 917, 918, 873, 919, 923, 925, 907, 874, + 910, 926, 911, 913, 876, 875, 927, 928, 933, 934, + 874, 935, 937, 0, 914, 0, 0, 938, 915, 917, + 918, 939, 919, 923, 925, 940, 942, 941, 926, 943, + 939, 945, 937, 927, 928, 933, 934, 938, 935, 937, + 942, 939, 941, 944, 938, 940, 942, 941, 939, 943, + 944, 945, 940, 942, 941, 0, 943, 939, 945, 937, + 947, 949, 947, 944, 938, 948, 0, 942, 939, 941, + + 944, 946, 940, 942, 941, 951, 943, 944, 945, 946, + 948, 949, 947, 953, 954, 948, 0, 947, 949, 947, + 944, 946, 948, 950, 955, 951, 950, 952, 946, 952, + 0, 0, 951, 953, 954, 956, 946, 948, 949, 947, + 953, 954, 948, 957, 955, 960, 950, 0, 946, 952, + 950, 955, 951, 950, 952, 956, 952, 958, 961, 959, + 953, 954, 956, 957, 0, 960, 958, 962, 963, 964, + 957, 955, 960, 950, 959, 0, 952, 958, 961, 959, + 966, 0, 956, 0, 958, 961, 959, 962, 963, 964, + 957, 967, 960, 958, 962, 963, 964, 965, 0, 968, + + 966, 959, 969, 971, 958, 961, 959, 966, 970, 969, + 965, 967, 970, 972, 962, 963, 964, 965, 967, 968, + 0, 973, 969, 971, 965, 974, 968, 966, 972, 969, + 971, 975, 970, 972, 0, 970, 969, 965, 967, 970, + 972, 973, 999, 979, 965, 974, 968, 978, 973, 969, + 971, 975, 974, 980, 976, 972, 976, 0, 975, 970, + 972, 978, 977, 979, 977, 981, 983, 978, 973, 999, + 979, 0, 974, 980, 978, 982, 976, 1002, 975, 0, + 980, 976, 982, 976, 977, 981, 983, 0, 978, 977, + 979, 977, 981, 983, 978, 982, 986, 984, 986, 987, + + 980, 984, 982, 976, 1002, 1003, 985, 988, 0, 982, + 985, 977, 981, 983, 987, 989, 990, 0, 986, 987, + 991, 984, 982, 986, 984, 986, 987, 988, 984, 0, + 985, 992, 1003, 985, 988, 989, 990, 985, 1005, 1006, + 991, 987, 989, 990, 992, 986, 987, 991, 984, 994, + 993, 992, 993, 1011, 988, 1013, 994, 985, 992, 1014, + 1017, 1018, 989, 990, 1021, 1005, 1006, 991, 1022, 994, + 993, 992, 1023, 1024, 1029, 0, 994, 993, 992, 993, + 1011, 0, 1013, 994, 1030, 1031, 1014, 1017, 1018, 1032, + 1033, 1021, 1062, 1034, 1029, 1022, 994, 993, 1035, 1023, + + 1024, 1029, 1036, 1037, 1030, 1031, 1036, 1038, 1040, 1032, + 1033, 1030, 1031, 1034, 0, 0, 1032, 1033, 1035, 1062, + 1034, 1029, 1041, 1037, 1039, 1035, 1036, 1038, 1040, 1036, + 1037, 1030, 1031, 1036, 1038, 1040, 1032, 1033, 1042, 1039, + 1034, 1043, 1041, 1045, 1039, 1035, 1064, 1046, 0, 1041, + 1037, 1039, 0, 1036, 1038, 1040, 1047, 1044, 1042, 1044, + 1046, 1043, 1048, 1045, 1067, 1042, 1039, 1046, 1043, 1041, + 1045, 1039, 1049, 1064, 1046, 1051, 1047, 1052, 1050, 1044, + 1053, 1051, 1048, 1047, 1044, 1042, 1044, 1046, 1043, 1048, + 1045, 1067, 1049, 1050, 1046, 1051, 1056, 1052, 1050, 1049, + + 1053, 1054, 1051, 1047, 1052, 1050, 1044, 1053, 1051, 1048, + 1055, 1056, 1057, 1058, 1054, 1059, 1056, 1069, 1055, 1049, + 1050, 1054, 1051, 1056, 1052, 1050, 1060, 1053, 1054, 1072, + 1055, 1073, 1057, 1058, 1074, 1059, 0, 1055, 1056, 1057, + 1058, 1054, 1059, 1056, 1069, 1055, 1060, 1078, 1054, 1079, + 1077, 1080, 1081, 1060, 0, 1083, 1072, 1055, 1073, 1057, + 1058, 1074, 1059, 1077, 1079, 1082, 1085, 1078, 1084, 1079, + 1077, 1080, 1081, 1060, 1078, 1083, 1079, 1077, 1080, 1081, + 1082, 1084, 1083, 1086, 1087, 1082, 1085, 1093, 1084, 1088, + 1077, 1079, 1082, 1085, 1078, 1084, 1079, 1077, 1080, 1081, + + 1088, 1089, 1083, 1086, 1087, 1089, 1090, 1082, 1084, 1088, + 1086, 1087, 1082, 1085, 1093, 1084, 1088, 1095, 1098, 1100, + 1101, 1089, 1102, 1103, 1110, 0, 1090, 1088, 1089, 0, + 1086, 1087, 1089, 1090, 1104, 1105, 1088, 1103, 0, 1100, + 1101, 0, 1102, 1103, 1095, 1098, 1100, 1101, 1089, 1102, + 1103, 1110, 1112, 1090, 1104, 1105, 1113, 1118, 1106, 0, + 0, 1104, 1105, 0, 1103, 0, 1100, 1101, 1106, 1102, + 1103, 1114, 1112, 0, 0, 0, 1113, 1118, 1106, 1112, + 1114, 1104, 1105, 1113, 1118, 1106, 0, 0, 0, 0, + 0, 1114, 0, 0, 0, 1106, 0, 0, 1114, 1112, + + 0, 0, 0, 1113, 1118, 1106, 0, 1114, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1114, 1138, + 1138, 1138, 1138, 1138, 1139, 0, 0, 1139, 1139, 1141, + 1141, 1141, 0, 1141, 1142, 0, 1142, 1142, 1142, 1143, + 0, 1143, 1143, 1143, 1144, 0, 1144, 1144, 1144, 1137, + 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, + 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, + 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, + 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, + 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, + + 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, + 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, + 1137, 1137, 1137, 1137, 1137, 1137 } ; /* The intent behind this definition is that it'll catch @@ -2045,7 +2069,7 @@ static const flex_int16_t yy_chk[4543] = static thread_local std::stringstream strbuf; -#line 2048 "flex_lexer.cpp" +#line 2072 "flex_lexer.cpp" /*************************** ** Section 2: Rules @@ -2059,7 +2083,7 @@ static thread_local std::stringstream strbuf; /*************************** ** Section 3: Rules ***************************/ -#line 2062 "flex_lexer.cpp" +#line 2086 "flex_lexer.cpp" #define INITIAL 0 #define singlequotedstring 1 @@ -2346,7 +2370,7 @@ YY_DECL #line 57 "flex_lexer.l" -#line 2349 "flex_lexer.cpp" +#line 2373 "flex_lexer.cpp" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -2373,13 +2397,13 @@ YY_DECL while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 1120 ) + if ( yy_current_state >= 1138 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_current_state != 1119 ); + while ( yy_current_state != 1137 ); yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; @@ -2549,599 +2573,609 @@ TOKEN(VARCHAR) case 30: YY_RULE_SETUP #line 90 "flex_lexer.l" -TOKEN(VIRTUAL) +TOKEN(CHARACTER) YY_BREAK case 31: YY_RULE_SETUP #line 91 "flex_lexer.l" -TOKEN(BEFORE) +TOKEN(VARYING) YY_BREAK case 32: YY_RULE_SETUP #line 92 "flex_lexer.l" -TOKEN(COLUMN) +TOKEN(VIRTUAL) YY_BREAK case 33: YY_RULE_SETUP #line 93 "flex_lexer.l" -TOKEN(CREATE) +TOKEN(BEFORE) YY_BREAK case 34: YY_RULE_SETUP #line 94 "flex_lexer.l" -TOKEN(DELETE) +TOKEN(COLUMN) YY_BREAK case 35: YY_RULE_SETUP #line 95 "flex_lexer.l" -TOKEN(DIRECT) +TOKEN(CREATE) YY_BREAK case 36: YY_RULE_SETUP #line 96 "flex_lexer.l" -TOKEN(DOUBLE) +TOKEN(DELETE) YY_BREAK case 37: YY_RULE_SETUP #line 97 "flex_lexer.l" -TOKEN(ESCAPE) +TOKEN(DIRECT) YY_BREAK case 38: YY_RULE_SETUP #line 98 "flex_lexer.l" -TOKEN(EXCEPT) +TOKEN(DOUBLE) YY_BREAK case 39: YY_RULE_SETUP #line 99 "flex_lexer.l" -TOKEN(EXISTS) +TOKEN(ESCAPE) YY_BREAK case 40: YY_RULE_SETUP #line 100 "flex_lexer.l" -TOKEN(EXTRACT) +TOKEN(EXCEPT) YY_BREAK case 41: YY_RULE_SETUP #line 101 "flex_lexer.l" -TOKEN(CAST) +TOKEN(EXISTS) YY_BREAK case 42: YY_RULE_SETUP #line 102 "flex_lexer.l" -TOKEN(FORMAT) +TOKEN(EXTRACT) YY_BREAK case 43: YY_RULE_SETUP #line 103 "flex_lexer.l" -TOKEN(GLOBAL) +TOKEN(CAST) YY_BREAK case 44: YY_RULE_SETUP #line 104 "flex_lexer.l" -TOKEN(HAVING) +TOKEN(FORMAT) YY_BREAK case 45: YY_RULE_SETUP #line 105 "flex_lexer.l" -TOKEN(IMPORT) +TOKEN(GLOBAL) YY_BREAK case 46: YY_RULE_SETUP #line 106 "flex_lexer.l" -TOKEN(INSERT) +TOKEN(HAVING) YY_BREAK case 47: YY_RULE_SETUP #line 107 "flex_lexer.l" -TOKEN(ISNULL) +TOKEN(IMPORT) YY_BREAK case 48: YY_RULE_SETUP #line 108 "flex_lexer.l" -TOKEN(OFFSET) +TOKEN(INSERT) YY_BREAK case 49: YY_RULE_SETUP #line 109 "flex_lexer.l" -TOKEN(RENAME) +TOKEN(ISNULL) YY_BREAK case 50: YY_RULE_SETUP #line 110 "flex_lexer.l" -TOKEN(SCHEMA) +TOKEN(OFFSET) YY_BREAK case 51: YY_RULE_SETUP #line 111 "flex_lexer.l" -TOKEN(SELECT) +TOKEN(RENAME) YY_BREAK case 52: YY_RULE_SETUP #line 112 "flex_lexer.l" -TOKEN(SORTED) +TOKEN(SCHEMA) YY_BREAK case 53: YY_RULE_SETUP #line 113 "flex_lexer.l" -TOKEN(TABLES) +TOKEN(SELECT) YY_BREAK case 54: YY_RULE_SETUP #line 114 "flex_lexer.l" -TOKEN(UNIQUE) +TOKEN(SORTED) YY_BREAK case 55: YY_RULE_SETUP #line 115 "flex_lexer.l" -TOKEN(UNLOAD) +TOKEN(TABLES) YY_BREAK case 56: YY_RULE_SETUP #line 116 "flex_lexer.l" -TOKEN(UPDATE) +TOKEN(UNIQUE) YY_BREAK case 57: YY_RULE_SETUP #line 117 "flex_lexer.l" -TOKEN(VALUES) +TOKEN(UNLOAD) YY_BREAK case 58: YY_RULE_SETUP #line 118 "flex_lexer.l" -TOKEN(AFTER) +TOKEN(UPDATE) YY_BREAK case 59: YY_RULE_SETUP #line 119 "flex_lexer.l" -TOKEN(ALTER) +TOKEN(VALUES) YY_BREAK case 60: YY_RULE_SETUP #line 120 "flex_lexer.l" -TOKEN(ARRAY) +TOKEN(AFTER) YY_BREAK case 61: YY_RULE_SETUP #line 121 "flex_lexer.l" -TOKEN(CROSS) +TOKEN(ALTER) YY_BREAK case 62: YY_RULE_SETUP #line 122 "flex_lexer.l" -TOKEN(DELTA) +TOKEN(ARRAY) YY_BREAK case 63: YY_RULE_SETUP #line 123 "flex_lexer.l" -TOKEN(FLOAT) +TOKEN(CROSS) YY_BREAK case 64: YY_RULE_SETUP #line 124 "flex_lexer.l" -TOKEN(GROUP) +TOKEN(DELTA) YY_BREAK case 65: YY_RULE_SETUP #line 125 "flex_lexer.l" -TOKEN(INDEX) +TOKEN(FLOAT) YY_BREAK case 66: YY_RULE_SETUP #line 126 "flex_lexer.l" -TOKEN(INNER) +TOKEN(GROUP) YY_BREAK case 67: YY_RULE_SETUP #line 127 "flex_lexer.l" -TOKEN(LIMIT) +TOKEN(INDEX) YY_BREAK case 68: YY_RULE_SETUP #line 128 "flex_lexer.l" -TOKEN(LOCAL) +TOKEN(INNER) YY_BREAK case 69: YY_RULE_SETUP #line 129 "flex_lexer.l" -TOKEN(MERGE) +TOKEN(LIMIT) YY_BREAK case 70: YY_RULE_SETUP #line 130 "flex_lexer.l" -TOKEN(MINUS) +TOKEN(LOCAL) YY_BREAK case 71: YY_RULE_SETUP #line 131 "flex_lexer.l" -TOKEN(ORDER) +TOKEN(MERGE) YY_BREAK case 72: YY_RULE_SETUP #line 132 "flex_lexer.l" -TOKEN(OUTER) +TOKEN(MINUS) YY_BREAK case 73: YY_RULE_SETUP #line 133 "flex_lexer.l" -TOKEN(RIGHT) +TOKEN(ORDER) YY_BREAK case 74: YY_RULE_SETUP #line 134 "flex_lexer.l" -TOKEN(TABLE) +TOKEN(OUTER) YY_BREAK case 75: YY_RULE_SETUP #line 135 "flex_lexer.l" -TOKEN(UNION) +TOKEN(RIGHT) YY_BREAK case 76: YY_RULE_SETUP #line 136 "flex_lexer.l" -TOKEN(USING) +TOKEN(TABLE) YY_BREAK case 77: YY_RULE_SETUP #line 137 "flex_lexer.l" -TOKEN(WHERE) +TOKEN(UNION) YY_BREAK case 78: YY_RULE_SETUP #line 138 "flex_lexer.l" -TOKEN(CALL) +TOKEN(USING) YY_BREAK case 79: YY_RULE_SETUP #line 139 "flex_lexer.l" -TOKEN(CASE) +TOKEN(WHERE) YY_BREAK case 80: YY_RULE_SETUP #line 140 "flex_lexer.l" -TOKEN(CHAR) +TOKEN(CALL) YY_BREAK case 81: YY_RULE_SETUP #line 141 "flex_lexer.l" -TOKEN(COPY) +TOKEN(CASE) YY_BREAK case 82: YY_RULE_SETUP #line 142 "flex_lexer.l" -TOKEN(DATE) +TOKEN(CHAR) YY_BREAK case 83: YY_RULE_SETUP #line 143 "flex_lexer.l" -TOKEN(DATETIME) +TOKEN(COPY) YY_BREAK case 84: YY_RULE_SETUP #line 144 "flex_lexer.l" -TOKEN(DESC) +TOKEN(DATE) YY_BREAK case 85: YY_RULE_SETUP #line 145 "flex_lexer.l" -TOKEN(DROP) +TOKEN(DATETIME) YY_BREAK case 86: YY_RULE_SETUP #line 146 "flex_lexer.l" -TOKEN(ELSE) +TOKEN(DESC) YY_BREAK case 87: YY_RULE_SETUP #line 147 "flex_lexer.l" -TOKEN(FILE) +TOKEN(DROP) YY_BREAK case 88: YY_RULE_SETUP #line 148 "flex_lexer.l" -TOKEN(FROM) +TOKEN(ELSE) YY_BREAK case 89: YY_RULE_SETUP #line 149 "flex_lexer.l" -TOKEN(FULL) +TOKEN(FILE) YY_BREAK case 90: YY_RULE_SETUP #line 150 "flex_lexer.l" -TOKEN(HASH) +TOKEN(FROM) YY_BREAK case 91: YY_RULE_SETUP #line 151 "flex_lexer.l" -TOKEN(HINT) +TOKEN(FULL) YY_BREAK case 92: YY_RULE_SETUP #line 152 "flex_lexer.l" -TOKEN(INTO) +TOKEN(HASH) YY_BREAK case 93: YY_RULE_SETUP #line 153 "flex_lexer.l" -TOKEN(JOIN) +TOKEN(HINT) YY_BREAK case 94: YY_RULE_SETUP #line 154 "flex_lexer.l" -TOKEN(LEFT) +TOKEN(INTO) YY_BREAK case 95: YY_RULE_SETUP #line 155 "flex_lexer.l" -TOKEN(LIKE) +TOKEN(JOIN) YY_BREAK case 96: YY_RULE_SETUP #line 156 "flex_lexer.l" -TOKEN(ILIKE) +TOKEN(LEFT) YY_BREAK case 97: YY_RULE_SETUP #line 157 "flex_lexer.l" -TOKEN(LOAD) +TOKEN(LIKE) YY_BREAK case 98: YY_RULE_SETUP #line 158 "flex_lexer.l" -TOKEN(LONG) +TOKEN(ILIKE) YY_BREAK case 99: YY_RULE_SETUP #line 159 "flex_lexer.l" -TOKEN(NULL) +TOKEN(LOAD) YY_BREAK case 100: YY_RULE_SETUP #line 160 "flex_lexer.l" -TOKEN(PLAN) +TOKEN(LONG) YY_BREAK case 101: YY_RULE_SETUP #line 161 "flex_lexer.l" -TOKEN(SHOW) +TOKEN(NULL) YY_BREAK case 102: YY_RULE_SETUP #line 162 "flex_lexer.l" -TOKEN(TEXT) +TOKEN(PLAN) YY_BREAK case 103: YY_RULE_SETUP #line 163 "flex_lexer.l" -TOKEN(THEN) +TOKEN(SHOW) YY_BREAK case 104: YY_RULE_SETUP #line 164 "flex_lexer.l" -TOKEN(TIME) +TOKEN(TEXT) YY_BREAK case 105: YY_RULE_SETUP #line 165 "flex_lexer.l" -TOKEN(VIEW) +TOKEN(THEN) YY_BREAK case 106: YY_RULE_SETUP #line 166 "flex_lexer.l" -TOKEN(WHEN) +TOKEN(TIME) YY_BREAK case 107: YY_RULE_SETUP #line 167 "flex_lexer.l" -TOKEN(WITH) +TOKEN(VIEW) YY_BREAK case 108: YY_RULE_SETUP #line 168 "flex_lexer.l" -TOKEN(ADD) +TOKEN(WHEN) YY_BREAK case 109: YY_RULE_SETUP #line 169 "flex_lexer.l" -TOKEN(ALL) +TOKEN(WITH) YY_BREAK case 110: YY_RULE_SETUP #line 170 "flex_lexer.l" -TOKEN(AND) +TOKEN(ADD) YY_BREAK case 111: YY_RULE_SETUP #line 171 "flex_lexer.l" -TOKEN(ASC) +TOKEN(ALL) YY_BREAK case 112: YY_RULE_SETUP #line 172 "flex_lexer.l" -TOKEN(END) +TOKEN(AND) YY_BREAK case 113: YY_RULE_SETUP #line 173 "flex_lexer.l" -TOKEN(FOR) +TOKEN(ASC) YY_BREAK case 114: YY_RULE_SETUP #line 174 "flex_lexer.l" -TOKEN(INT) +TOKEN(END) YY_BREAK case 115: YY_RULE_SETUP #line 175 "flex_lexer.l" -TOKEN(KEY) +TOKEN(FOR) YY_BREAK case 116: YY_RULE_SETUP #line 176 "flex_lexer.l" -TOKEN(NOT) +TOKEN(INT) YY_BREAK case 117: YY_RULE_SETUP #line 177 "flex_lexer.l" -TOKEN(OFF) +TOKEN(KEY) YY_BREAK case 118: YY_RULE_SETUP #line 178 "flex_lexer.l" -TOKEN(SET) +TOKEN(NOT) YY_BREAK case 119: YY_RULE_SETUP #line 179 "flex_lexer.l" -TOKEN(TOP) +TOKEN(OFF) YY_BREAK case 120: YY_RULE_SETUP #line 180 "flex_lexer.l" -TOKEN(AS) +TOKEN(SET) YY_BREAK case 121: YY_RULE_SETUP #line 181 "flex_lexer.l" -TOKEN(BY) +TOKEN(TOP) YY_BREAK case 122: YY_RULE_SETUP #line 182 "flex_lexer.l" -TOKEN(IF) +TOKEN(AS) YY_BREAK case 123: YY_RULE_SETUP #line 183 "flex_lexer.l" -TOKEN(IN) +TOKEN(BY) YY_BREAK case 124: YY_RULE_SETUP #line 184 "flex_lexer.l" -TOKEN(IS) +TOKEN(IF) YY_BREAK case 125: YY_RULE_SETUP #line 185 "flex_lexer.l" -TOKEN(OF) +TOKEN(IN) YY_BREAK case 126: YY_RULE_SETUP #line 186 "flex_lexer.l" -TOKEN(ON) +TOKEN(IS) YY_BREAK case 127: YY_RULE_SETUP #line 187 "flex_lexer.l" -TOKEN(OR) +TOKEN(OF) YY_BREAK case 128: YY_RULE_SETUP #line 188 "flex_lexer.l" -TOKEN(TO) +TOKEN(ON) YY_BREAK case 129: YY_RULE_SETUP #line 189 "flex_lexer.l" -TOKEN(SECOND) +TOKEN(OR) YY_BREAK case 130: YY_RULE_SETUP #line 190 "flex_lexer.l" -TOKEN(MINUTE) +TOKEN(TO) YY_BREAK case 131: YY_RULE_SETUP #line 191 "flex_lexer.l" -TOKEN(HOUR) +TOKEN(SECOND) YY_BREAK case 132: YY_RULE_SETUP #line 192 "flex_lexer.l" -TOKEN(DAY) +TOKEN(MINUTE) YY_BREAK case 133: YY_RULE_SETUP #line 193 "flex_lexer.l" -TOKEN(MONTH) +TOKEN(HOUR) YY_BREAK case 134: YY_RULE_SETUP #line 194 "flex_lexer.l" -TOKEN(YEAR) +TOKEN(DAY) YY_BREAK case 135: YY_RULE_SETUP #line 195 "flex_lexer.l" -TOKEN(TRUE) +TOKEN(MONTH) YY_BREAK case 136: YY_RULE_SETUP #line 196 "flex_lexer.l" -TOKEN(FALSE) +TOKEN(YEAR) YY_BREAK case 137: YY_RULE_SETUP #line 197 "flex_lexer.l" -TOKEN(TRANSACTION) +TOKEN(TRUE) YY_BREAK case 138: YY_RULE_SETUP #line 198 "flex_lexer.l" -TOKEN(BEGIN) +TOKEN(FALSE) YY_BREAK case 139: YY_RULE_SETUP #line 199 "flex_lexer.l" -TOKEN(ROLLBACK) +TOKEN(TRANSACTION) YY_BREAK case 140: YY_RULE_SETUP #line 200 "flex_lexer.l" -TOKEN(COMMIT) +TOKEN(BEGIN) YY_BREAK -/* Allow =/== see https://sqlite.org/lang_expr.html#collateop */ case 141: YY_RULE_SETUP -#line 203 "flex_lexer.l" -TOKEN(EQUALS) +#line 201 "flex_lexer.l" +TOKEN(ROLLBACK) YY_BREAK case 142: YY_RULE_SETUP -#line 204 "flex_lexer.l" -TOKEN(NOTEQUALS) +#line 202 "flex_lexer.l" +TOKEN(COMMIT) YY_BREAK +/* Allow =/== see https://sqlite.org/lang_expr.html#collateop */ case 143: YY_RULE_SETUP #line 205 "flex_lexer.l" -TOKEN(NOTEQUALS) +TOKEN(EQUALS) YY_BREAK case 144: YY_RULE_SETUP #line 206 "flex_lexer.l" -TOKEN(LESSEQ) +TOKEN(NOTEQUALS) YY_BREAK case 145: YY_RULE_SETUP #line 207 "flex_lexer.l" -TOKEN(GREATEREQ) +TOKEN(NOTEQUALS) YY_BREAK case 146: YY_RULE_SETUP #line 208 "flex_lexer.l" -TOKEN(CONCAT) +TOKEN(LESSEQ) YY_BREAK case 147: YY_RULE_SETUP -#line 210 "flex_lexer.l" -{ return yytext[0]; } +#line 209 "flex_lexer.l" +TOKEN(GREATEREQ) YY_BREAK case 148: -#line 213 "flex_lexer.l" +YY_RULE_SETUP +#line 210 "flex_lexer.l" +TOKEN(CONCAT) + YY_BREAK case 149: YY_RULE_SETUP -#line 213 "flex_lexer.l" +#line 212 "flex_lexer.l" +{ return yytext[0]; } + YY_BREAK +case 150: +#line 215 "flex_lexer.l" +case 151: +YY_RULE_SETUP +#line 215 "flex_lexer.l" { yylval->fval = atof(yytext); return SQL_FLOATVAL; @@ -3152,17 +3186,17 @@ YY_RULE_SETUP * positive equivalent. We thus match for LLONG_MIN specifically. This is not an issue for floats, where * numeric_limits::lowest() == -numeric_limits::max(); */ -case 150: +case 152: YY_RULE_SETUP -#line 223 "flex_lexer.l" +#line 225 "flex_lexer.l" { yylval->ival = LLONG_MIN; return SQL_INTVAL; } YY_BREAK -case 151: +case 153: YY_RULE_SETUP -#line 228 "flex_lexer.l" +#line 230 "flex_lexer.l" { errno = 0; yylval->ival = strtoll(yytext, nullptr, 0); @@ -3173,59 +3207,59 @@ YY_RULE_SETUP return SQL_INTVAL; } YY_BREAK -case 152: +case 154: YY_RULE_SETUP -#line 238 "flex_lexer.l" +#line 240 "flex_lexer.l" { // Crop the leading and trailing quote char yylval->sval = hsql::substr(yytext, 1, strlen(yytext)-1); return SQL_IDENTIFIER; } YY_BREAK -case 153: +case 155: YY_RULE_SETUP -#line 244 "flex_lexer.l" +#line 246 "flex_lexer.l" { yylval->sval = strdup(yytext); return SQL_IDENTIFIER; } YY_BREAK -case 154: +case 156: YY_RULE_SETUP -#line 249 "flex_lexer.l" +#line 251 "flex_lexer.l" { BEGIN singlequotedstring; strbuf = std::stringstream{}; } YY_BREAK -case 155: +case 157: YY_RULE_SETUP -#line 250 "flex_lexer.l" +#line 252 "flex_lexer.l" { strbuf << '\''; } YY_BREAK -case 156: -/* rule 156 can match eol */ +case 158: +/* rule 158 can match eol */ YY_RULE_SETUP -#line 251 "flex_lexer.l" +#line 253 "flex_lexer.l" { strbuf << yytext; } YY_BREAK -case 157: +case 159: YY_RULE_SETUP -#line 252 "flex_lexer.l" +#line 254 "flex_lexer.l" { BEGIN 0; yylval->sval = strdup(strbuf.str().c_str()); return SQL_STRING; } YY_BREAK case YY_STATE_EOF(singlequotedstring): -#line 253 "flex_lexer.l" +#line 255 "flex_lexer.l" { fprintf(stderr, "[SQL-Lexer-Error] Unterminated string\n"); return 0; } YY_BREAK -case 158: +case 160: YY_RULE_SETUP -#line 255 "flex_lexer.l" +#line 257 "flex_lexer.l" { fprintf(stderr, "[SQL-Lexer-Error] Unknown Character: %c\n", yytext[0]); return 0; } YY_BREAK -case 159: +case 161: YY_RULE_SETUP -#line 258 "flex_lexer.l" +#line 260 "flex_lexer.l" ECHO; YY_BREAK -#line 3228 "flex_lexer.cpp" +#line 3262 "flex_lexer.cpp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(COMMENT): yyterminate(); @@ -3526,7 +3560,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 1120 ) + if ( yy_current_state >= 1138 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -3555,11 +3589,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 1120 ) + if ( yy_current_state >= 1138 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 1119); + yy_is_jam = (yy_current_state == 1137); (void)yyg; return yy_is_jam ? 0 : yy_current_state; @@ -4382,7 +4416,7 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 258 "flex_lexer.l" +#line 260 "flex_lexer.l" /*************************** ** Section 3: User code diff --git a/src/parser/flex_lexer.h b/src/parser/flex_lexer.h index b04c398e..370dd5e2 100644 --- a/src/parser/flex_lexer.h +++ b/src/parser/flex_lexer.h @@ -730,7 +730,7 @@ extern int yylex \ #undef yyTABLES_NAME #endif -#line 258 "flex_lexer.l" +#line 260 "flex_lexer.l" #line 736 "flex_lexer.h" diff --git a/src/parser/flex_lexer.l b/src/parser/flex_lexer.l index ba95755a..095a2345 100644 --- a/src/parser/flex_lexer.l +++ b/src/parser/flex_lexer.l @@ -87,6 +87,8 @@ PRIMARY TOKEN(PRIMARY) SCHEMAS TOKEN(SCHEMAS) SPATIAL TOKEN(SPATIAL) VARCHAR TOKEN(VARCHAR) +CHARACTER TOKEN(CHARACTER) +VARYING TOKEN(VARYING) VIRTUAL TOKEN(VIRTUAL) BEFORE TOKEN(BEFORE) COLUMN TOKEN(COLUMN) From 39da0b501600c2ebb11f059e5441d373b1b2f3a4 Mon Sep 17 00:00:00 2001 From: simonstadlinger Date: Sat, 3 Jul 2021 16:07:36 +0200 Subject: [PATCH 05/73] Add support for all other datatypes --- src/parser/bison_parser.cpp | 2760 ++++++++++++++++++----------------- src/parser/bison_parser.h | 250 ++-- src/parser/bison_parser.y | 5 +- src/parser/flex_lexer.cpp | 2735 +++++++++++++++++----------------- src/parser/flex_lexer.h | 2 +- src/parser/flex_lexer.l | 3 + src/sql/ColumnType.h | 3 +- src/sql/statements.cpp | 3 + 8 files changed, 2906 insertions(+), 2855 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 32fd1faa..4e0aedd2 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -162,254 +162,256 @@ enum yysymbol_kind_t YYSYMBOL_SCHEMAS = 28, /* SCHEMAS */ YYSYMBOL_CHARACTER = 29, /* CHARACTER */ YYSYMBOL_VARYING = 30, /* VARYING */ - YYSYMBOL_SPATIAL = 31, /* SPATIAL */ - YYSYMBOL_VARCHAR = 32, /* VARCHAR */ - YYSYMBOL_VIRTUAL = 33, /* VIRTUAL */ - YYSYMBOL_DESCRIBE = 34, /* DESCRIBE */ - YYSYMBOL_BEFORE = 35, /* BEFORE */ - YYSYMBOL_COLUMN = 36, /* COLUMN */ - YYSYMBOL_CREATE = 37, /* CREATE */ - YYSYMBOL_DELETE = 38, /* DELETE */ - YYSYMBOL_DIRECT = 39, /* DIRECT */ - YYSYMBOL_DOUBLE = 40, /* DOUBLE */ - YYSYMBOL_ESCAPE = 41, /* ESCAPE */ - YYSYMBOL_EXCEPT = 42, /* EXCEPT */ - YYSYMBOL_EXISTS = 43, /* EXISTS */ - YYSYMBOL_EXTRACT = 44, /* EXTRACT */ - YYSYMBOL_CAST = 45, /* CAST */ - YYSYMBOL_FORMAT = 46, /* FORMAT */ - YYSYMBOL_GLOBAL = 47, /* GLOBAL */ - YYSYMBOL_HAVING = 48, /* HAVING */ - YYSYMBOL_IMPORT = 49, /* IMPORT */ - YYSYMBOL_INSERT = 50, /* INSERT */ - YYSYMBOL_ISNULL = 51, /* ISNULL */ - YYSYMBOL_OFFSET = 52, /* OFFSET */ - YYSYMBOL_RENAME = 53, /* RENAME */ - YYSYMBOL_SCHEMA = 54, /* SCHEMA */ - YYSYMBOL_SELECT = 55, /* SELECT */ - YYSYMBOL_SORTED = 56, /* SORTED */ - YYSYMBOL_TABLES = 57, /* TABLES */ - YYSYMBOL_UNIQUE = 58, /* UNIQUE */ - YYSYMBOL_UNLOAD = 59, /* UNLOAD */ - YYSYMBOL_UPDATE = 60, /* UPDATE */ - YYSYMBOL_VALUES = 61, /* VALUES */ - YYSYMBOL_AFTER = 62, /* AFTER */ - YYSYMBOL_ALTER = 63, /* ALTER */ - YYSYMBOL_CROSS = 64, /* CROSS */ - YYSYMBOL_DELTA = 65, /* DELTA */ - YYSYMBOL_FLOAT = 66, /* FLOAT */ - YYSYMBOL_GROUP = 67, /* GROUP */ - YYSYMBOL_INDEX = 68, /* INDEX */ - YYSYMBOL_INNER = 69, /* INNER */ - YYSYMBOL_LIMIT = 70, /* LIMIT */ - YYSYMBOL_LOCAL = 71, /* LOCAL */ - YYSYMBOL_MERGE = 72, /* MERGE */ - YYSYMBOL_MINUS = 73, /* MINUS */ - YYSYMBOL_ORDER = 74, /* ORDER */ - YYSYMBOL_OUTER = 75, /* OUTER */ - YYSYMBOL_RIGHT = 76, /* RIGHT */ - YYSYMBOL_TABLE = 77, /* TABLE */ - YYSYMBOL_UNION = 78, /* UNION */ - YYSYMBOL_USING = 79, /* USING */ - YYSYMBOL_WHERE = 80, /* WHERE */ - YYSYMBOL_CALL = 81, /* CALL */ - YYSYMBOL_CASE = 82, /* CASE */ - YYSYMBOL_CHAR = 83, /* CHAR */ - YYSYMBOL_COPY = 84, /* COPY */ - YYSYMBOL_DATE = 85, /* DATE */ - YYSYMBOL_DATETIME = 86, /* DATETIME */ - YYSYMBOL_DESC = 87, /* DESC */ - YYSYMBOL_DROP = 88, /* DROP */ - YYSYMBOL_ELSE = 89, /* ELSE */ - YYSYMBOL_FILE = 90, /* FILE */ - YYSYMBOL_FROM = 91, /* FROM */ - YYSYMBOL_FULL = 92, /* FULL */ - YYSYMBOL_HASH = 93, /* HASH */ - YYSYMBOL_HINT = 94, /* HINT */ - YYSYMBOL_INTO = 95, /* INTO */ - YYSYMBOL_JOIN = 96, /* JOIN */ - YYSYMBOL_LEFT = 97, /* LEFT */ - YYSYMBOL_LIKE = 98, /* LIKE */ - YYSYMBOL_LOAD = 99, /* LOAD */ - YYSYMBOL_LONG = 100, /* LONG */ - YYSYMBOL_NULL = 101, /* NULL */ - YYSYMBOL_PLAN = 102, /* PLAN */ - YYSYMBOL_SHOW = 103, /* SHOW */ - YYSYMBOL_TEXT = 104, /* TEXT */ - YYSYMBOL_THEN = 105, /* THEN */ - YYSYMBOL_TIME = 106, /* TIME */ - YYSYMBOL_VIEW = 107, /* VIEW */ - YYSYMBOL_WHEN = 108, /* WHEN */ - YYSYMBOL_WITH = 109, /* WITH */ - YYSYMBOL_ADD = 110, /* ADD */ - YYSYMBOL_ALL = 111, /* ALL */ - YYSYMBOL_AND = 112, /* AND */ - YYSYMBOL_ASC = 113, /* ASC */ - YYSYMBOL_END = 114, /* END */ - YYSYMBOL_FOR = 115, /* FOR */ - YYSYMBOL_INT = 116, /* INT */ - YYSYMBOL_KEY = 117, /* KEY */ - YYSYMBOL_NOT = 118, /* NOT */ - YYSYMBOL_OFF = 119, /* OFF */ - YYSYMBOL_SET = 120, /* SET */ - YYSYMBOL_TOP = 121, /* TOP */ - YYSYMBOL_AS = 122, /* AS */ - YYSYMBOL_BY = 123, /* BY */ - YYSYMBOL_IF = 124, /* IF */ - YYSYMBOL_IN = 125, /* IN */ - YYSYMBOL_IS = 126, /* IS */ - YYSYMBOL_OF = 127, /* OF */ - YYSYMBOL_ON = 128, /* ON */ - YYSYMBOL_OR = 129, /* OR */ - YYSYMBOL_TO = 130, /* TO */ - YYSYMBOL_ARRAY = 131, /* ARRAY */ - YYSYMBOL_CONCAT = 132, /* CONCAT */ - YYSYMBOL_ILIKE = 133, /* ILIKE */ - YYSYMBOL_SECOND = 134, /* SECOND */ - YYSYMBOL_MINUTE = 135, /* MINUTE */ - YYSYMBOL_HOUR = 136, /* HOUR */ - YYSYMBOL_DAY = 137, /* DAY */ - YYSYMBOL_MONTH = 138, /* MONTH */ - YYSYMBOL_YEAR = 139, /* YEAR */ - YYSYMBOL_TRUE = 140, /* TRUE */ - YYSYMBOL_FALSE = 141, /* FALSE */ - YYSYMBOL_TRANSACTION = 142, /* TRANSACTION */ - YYSYMBOL_BEGIN = 143, /* BEGIN */ - YYSYMBOL_COMMIT = 144, /* COMMIT */ - YYSYMBOL_ROLLBACK = 145, /* ROLLBACK */ - YYSYMBOL_146_ = 146, /* '=' */ - YYSYMBOL_EQUALS = 147, /* EQUALS */ - YYSYMBOL_NOTEQUALS = 148, /* NOTEQUALS */ - YYSYMBOL_149_ = 149, /* '<' */ - YYSYMBOL_150_ = 150, /* '>' */ - YYSYMBOL_LESS = 151, /* LESS */ - YYSYMBOL_GREATER = 152, /* GREATER */ - YYSYMBOL_LESSEQ = 153, /* LESSEQ */ - YYSYMBOL_GREATEREQ = 154, /* GREATEREQ */ - YYSYMBOL_NOTNULL = 155, /* NOTNULL */ - YYSYMBOL_156_ = 156, /* '+' */ - YYSYMBOL_157_ = 157, /* '-' */ - YYSYMBOL_158_ = 158, /* '*' */ - YYSYMBOL_159_ = 159, /* '/' */ - YYSYMBOL_160_ = 160, /* '%' */ - YYSYMBOL_161_ = 161, /* '^' */ - YYSYMBOL_UMINUS = 162, /* UMINUS */ - YYSYMBOL_163_ = 163, /* '[' */ - YYSYMBOL_164_ = 164, /* ']' */ - YYSYMBOL_165_ = 165, /* '(' */ - YYSYMBOL_166_ = 166, /* ')' */ - YYSYMBOL_167_ = 167, /* '.' */ - YYSYMBOL_168_ = 168, /* ';' */ - YYSYMBOL_169_ = 169, /* ',' */ - YYSYMBOL_170_ = 170, /* '?' */ - YYSYMBOL_YYACCEPT = 171, /* $accept */ - YYSYMBOL_input = 172, /* input */ - YYSYMBOL_statement_list = 173, /* statement_list */ - YYSYMBOL_statement = 174, /* statement */ - YYSYMBOL_preparable_statement = 175, /* preparable_statement */ - YYSYMBOL_opt_hints = 176, /* opt_hints */ - YYSYMBOL_hint_list = 177, /* hint_list */ - YYSYMBOL_hint = 178, /* hint */ - YYSYMBOL_transaction_statement = 179, /* transaction_statement */ - YYSYMBOL_opt_transaction_keyword = 180, /* opt_transaction_keyword */ - YYSYMBOL_prepare_statement = 181, /* prepare_statement */ - YYSYMBOL_prepare_target_query = 182, /* prepare_target_query */ - YYSYMBOL_execute_statement = 183, /* execute_statement */ - YYSYMBOL_import_statement = 184, /* import_statement */ - YYSYMBOL_file_type = 185, /* file_type */ - YYSYMBOL_file_path = 186, /* file_path */ - YYSYMBOL_opt_file_type = 187, /* opt_file_type */ - YYSYMBOL_export_statement = 188, /* export_statement */ - YYSYMBOL_show_statement = 189, /* show_statement */ - YYSYMBOL_create_statement = 190, /* create_statement */ - YYSYMBOL_opt_not_exists = 191, /* opt_not_exists */ - YYSYMBOL_column_def_commalist = 192, /* column_def_commalist */ - YYSYMBOL_column_def = 193, /* column_def */ - YYSYMBOL_column_type = 194, /* column_type */ - YYSYMBOL_opt_column_nullable = 195, /* opt_column_nullable */ - YYSYMBOL_drop_statement = 196, /* drop_statement */ - YYSYMBOL_opt_exists = 197, /* opt_exists */ - YYSYMBOL_delete_statement = 198, /* delete_statement */ - YYSYMBOL_truncate_statement = 199, /* truncate_statement */ - YYSYMBOL_insert_statement = 200, /* insert_statement */ - YYSYMBOL_opt_column_list = 201, /* opt_column_list */ - YYSYMBOL_update_statement = 202, /* update_statement */ - YYSYMBOL_update_clause_commalist = 203, /* update_clause_commalist */ - YYSYMBOL_update_clause = 204, /* update_clause */ - YYSYMBOL_select_statement = 205, /* select_statement */ - YYSYMBOL_select_within_set_operation = 206, /* select_within_set_operation */ - YYSYMBOL_select_within_set_operation_no_parentheses = 207, /* select_within_set_operation_no_parentheses */ - YYSYMBOL_select_with_paren = 208, /* select_with_paren */ - YYSYMBOL_select_no_paren = 209, /* select_no_paren */ - YYSYMBOL_set_operator = 210, /* set_operator */ - YYSYMBOL_set_type = 211, /* set_type */ - YYSYMBOL_opt_all = 212, /* opt_all */ - YYSYMBOL_select_clause = 213, /* select_clause */ - YYSYMBOL_opt_distinct = 214, /* opt_distinct */ - YYSYMBOL_select_list = 215, /* select_list */ - YYSYMBOL_opt_from_clause = 216, /* opt_from_clause */ - YYSYMBOL_from_clause = 217, /* from_clause */ - YYSYMBOL_opt_where = 218, /* opt_where */ - YYSYMBOL_opt_group = 219, /* opt_group */ - YYSYMBOL_opt_having = 220, /* opt_having */ - YYSYMBOL_opt_order = 221, /* opt_order */ - YYSYMBOL_order_list = 222, /* order_list */ - YYSYMBOL_order_desc = 223, /* order_desc */ - YYSYMBOL_opt_order_type = 224, /* opt_order_type */ - YYSYMBOL_opt_top = 225, /* opt_top */ - YYSYMBOL_opt_limit = 226, /* opt_limit */ - YYSYMBOL_expr_list = 227, /* expr_list */ - YYSYMBOL_opt_literal_list = 228, /* opt_literal_list */ - YYSYMBOL_literal_list = 229, /* literal_list */ - YYSYMBOL_expr_alias = 230, /* expr_alias */ - YYSYMBOL_expr = 231, /* expr */ - YYSYMBOL_operand = 232, /* operand */ - YYSYMBOL_scalar_expr = 233, /* scalar_expr */ - YYSYMBOL_unary_expr = 234, /* unary_expr */ - YYSYMBOL_binary_expr = 235, /* binary_expr */ - YYSYMBOL_logic_expr = 236, /* logic_expr */ - YYSYMBOL_in_expr = 237, /* in_expr */ - YYSYMBOL_case_expr = 238, /* case_expr */ - YYSYMBOL_case_list = 239, /* case_list */ - YYSYMBOL_exists_expr = 240, /* exists_expr */ - YYSYMBOL_comp_expr = 241, /* comp_expr */ - YYSYMBOL_function_expr = 242, /* function_expr */ - YYSYMBOL_extract_expr = 243, /* extract_expr */ - YYSYMBOL_cast_expr = 244, /* cast_expr */ - YYSYMBOL_datetime_field = 245, /* datetime_field */ - YYSYMBOL_array_expr = 246, /* array_expr */ - YYSYMBOL_array_index = 247, /* array_index */ - YYSYMBOL_between_expr = 248, /* between_expr */ - YYSYMBOL_column_name = 249, /* column_name */ - YYSYMBOL_literal = 250, /* literal */ - YYSYMBOL_string_literal = 251, /* string_literal */ - YYSYMBOL_bool_literal = 252, /* bool_literal */ - YYSYMBOL_num_literal = 253, /* num_literal */ - YYSYMBOL_int_literal = 254, /* int_literal */ - YYSYMBOL_null_literal = 255, /* null_literal */ - YYSYMBOL_param_expr = 256, /* param_expr */ - YYSYMBOL_table_ref = 257, /* table_ref */ - YYSYMBOL_table_ref_atomic = 258, /* table_ref_atomic */ - YYSYMBOL_nonjoin_table_ref_atomic = 259, /* nonjoin_table_ref_atomic */ - YYSYMBOL_table_ref_commalist = 260, /* table_ref_commalist */ - YYSYMBOL_table_ref_name = 261, /* table_ref_name */ - YYSYMBOL_table_ref_name_no_alias = 262, /* table_ref_name_no_alias */ - YYSYMBOL_table_name = 263, /* table_name */ - YYSYMBOL_opt_index_name = 264, /* opt_index_name */ - YYSYMBOL_index_name = 265, /* index_name */ - YYSYMBOL_table_alias = 266, /* table_alias */ - YYSYMBOL_opt_table_alias = 267, /* opt_table_alias */ - YYSYMBOL_alias = 268, /* alias */ - YYSYMBOL_opt_alias = 269, /* opt_alias */ - YYSYMBOL_opt_with_clause = 270, /* opt_with_clause */ - YYSYMBOL_with_clause = 271, /* with_clause */ - YYSYMBOL_with_description_list = 272, /* with_description_list */ - YYSYMBOL_with_description = 273, /* with_description */ - YYSYMBOL_join_clause = 274, /* join_clause */ - YYSYMBOL_opt_join_type = 275, /* opt_join_type */ - YYSYMBOL_join_condition = 276, /* join_condition */ - YYSYMBOL_opt_semicolon = 277, /* opt_semicolon */ - YYSYMBOL_ident_commalist = 278 /* ident_commalist */ + YYSYMBOL_REAL = 31, /* REAL */ + YYSYMBOL_DECIMAL = 32, /* DECIMAL */ + YYSYMBOL_SPATIAL = 33, /* SPATIAL */ + YYSYMBOL_VARCHAR = 34, /* VARCHAR */ + YYSYMBOL_VIRTUAL = 35, /* VIRTUAL */ + YYSYMBOL_DESCRIBE = 36, /* DESCRIBE */ + YYSYMBOL_BEFORE = 37, /* BEFORE */ + YYSYMBOL_COLUMN = 38, /* COLUMN */ + YYSYMBOL_CREATE = 39, /* CREATE */ + YYSYMBOL_DELETE = 40, /* DELETE */ + YYSYMBOL_DIRECT = 41, /* DIRECT */ + YYSYMBOL_DOUBLE = 42, /* DOUBLE */ + YYSYMBOL_ESCAPE = 43, /* ESCAPE */ + YYSYMBOL_EXCEPT = 44, /* EXCEPT */ + YYSYMBOL_EXISTS = 45, /* EXISTS */ + YYSYMBOL_EXTRACT = 46, /* EXTRACT */ + YYSYMBOL_CAST = 47, /* CAST */ + YYSYMBOL_FORMAT = 48, /* FORMAT */ + YYSYMBOL_GLOBAL = 49, /* GLOBAL */ + YYSYMBOL_HAVING = 50, /* HAVING */ + YYSYMBOL_IMPORT = 51, /* IMPORT */ + YYSYMBOL_INSERT = 52, /* INSERT */ + YYSYMBOL_ISNULL = 53, /* ISNULL */ + YYSYMBOL_OFFSET = 54, /* OFFSET */ + YYSYMBOL_RENAME = 55, /* RENAME */ + YYSYMBOL_SCHEMA = 56, /* SCHEMA */ + YYSYMBOL_SELECT = 57, /* SELECT */ + YYSYMBOL_SORTED = 58, /* SORTED */ + YYSYMBOL_TABLES = 59, /* TABLES */ + YYSYMBOL_UNIQUE = 60, /* UNIQUE */ + YYSYMBOL_UNLOAD = 61, /* UNLOAD */ + YYSYMBOL_UPDATE = 62, /* UPDATE */ + YYSYMBOL_VALUES = 63, /* VALUES */ + YYSYMBOL_AFTER = 64, /* AFTER */ + YYSYMBOL_ALTER = 65, /* ALTER */ + YYSYMBOL_CROSS = 66, /* CROSS */ + YYSYMBOL_DELTA = 67, /* DELTA */ + YYSYMBOL_FLOAT = 68, /* FLOAT */ + YYSYMBOL_GROUP = 69, /* GROUP */ + YYSYMBOL_INDEX = 70, /* INDEX */ + YYSYMBOL_INNER = 71, /* INNER */ + YYSYMBOL_LIMIT = 72, /* LIMIT */ + YYSYMBOL_LOCAL = 73, /* LOCAL */ + YYSYMBOL_MERGE = 74, /* MERGE */ + YYSYMBOL_MINUS = 75, /* MINUS */ + YYSYMBOL_ORDER = 76, /* ORDER */ + YYSYMBOL_OUTER = 77, /* OUTER */ + YYSYMBOL_RIGHT = 78, /* RIGHT */ + YYSYMBOL_TABLE = 79, /* TABLE */ + YYSYMBOL_UNION = 80, /* UNION */ + YYSYMBOL_USING = 81, /* USING */ + YYSYMBOL_WHERE = 82, /* WHERE */ + YYSYMBOL_CALL = 83, /* CALL */ + YYSYMBOL_CASE = 84, /* CASE */ + YYSYMBOL_CHAR = 85, /* CHAR */ + YYSYMBOL_COPY = 86, /* COPY */ + YYSYMBOL_DATE = 87, /* DATE */ + YYSYMBOL_DATETIME = 88, /* DATETIME */ + YYSYMBOL_DESC = 89, /* DESC */ + YYSYMBOL_DROP = 90, /* DROP */ + YYSYMBOL_ELSE = 91, /* ELSE */ + YYSYMBOL_FILE = 92, /* FILE */ + YYSYMBOL_FROM = 93, /* FROM */ + YYSYMBOL_FULL = 94, /* FULL */ + YYSYMBOL_HASH = 95, /* HASH */ + YYSYMBOL_HINT = 96, /* HINT */ + YYSYMBOL_INTO = 97, /* INTO */ + YYSYMBOL_JOIN = 98, /* JOIN */ + YYSYMBOL_LEFT = 99, /* LEFT */ + YYSYMBOL_LIKE = 100, /* LIKE */ + YYSYMBOL_LOAD = 101, /* LOAD */ + YYSYMBOL_LONG = 102, /* LONG */ + YYSYMBOL_NULL = 103, /* NULL */ + YYSYMBOL_PLAN = 104, /* PLAN */ + YYSYMBOL_SHOW = 105, /* SHOW */ + YYSYMBOL_TEXT = 106, /* TEXT */ + YYSYMBOL_THEN = 107, /* THEN */ + YYSYMBOL_TIME = 108, /* TIME */ + YYSYMBOL_VIEW = 109, /* VIEW */ + YYSYMBOL_WHEN = 110, /* WHEN */ + YYSYMBOL_WITH = 111, /* WITH */ + YYSYMBOL_ADD = 112, /* ADD */ + YYSYMBOL_ALL = 113, /* ALL */ + YYSYMBOL_AND = 114, /* AND */ + YYSYMBOL_ASC = 115, /* ASC */ + YYSYMBOL_END = 116, /* END */ + YYSYMBOL_FOR = 117, /* FOR */ + YYSYMBOL_INT = 118, /* INT */ + YYSYMBOL_KEY = 119, /* KEY */ + YYSYMBOL_NOT = 120, /* NOT */ + YYSYMBOL_OFF = 121, /* OFF */ + YYSYMBOL_SET = 122, /* SET */ + YYSYMBOL_TOP = 123, /* TOP */ + YYSYMBOL_AS = 124, /* AS */ + YYSYMBOL_BY = 125, /* BY */ + YYSYMBOL_IF = 126, /* IF */ + YYSYMBOL_IN = 127, /* IN */ + YYSYMBOL_IS = 128, /* IS */ + YYSYMBOL_OF = 129, /* OF */ + YYSYMBOL_ON = 130, /* ON */ + YYSYMBOL_OR = 131, /* OR */ + YYSYMBOL_TO = 132, /* TO */ + YYSYMBOL_ARRAY = 133, /* ARRAY */ + YYSYMBOL_CONCAT = 134, /* CONCAT */ + YYSYMBOL_ILIKE = 135, /* ILIKE */ + YYSYMBOL_SECOND = 136, /* SECOND */ + YYSYMBOL_MINUTE = 137, /* MINUTE */ + YYSYMBOL_HOUR = 138, /* HOUR */ + YYSYMBOL_DAY = 139, /* DAY */ + YYSYMBOL_MONTH = 140, /* MONTH */ + YYSYMBOL_YEAR = 141, /* YEAR */ + YYSYMBOL_TRUE = 142, /* TRUE */ + YYSYMBOL_FALSE = 143, /* FALSE */ + YYSYMBOL_TRANSACTION = 144, /* TRANSACTION */ + YYSYMBOL_BEGIN = 145, /* BEGIN */ + YYSYMBOL_COMMIT = 146, /* COMMIT */ + YYSYMBOL_ROLLBACK = 147, /* ROLLBACK */ + YYSYMBOL_148_ = 148, /* '=' */ + YYSYMBOL_EQUALS = 149, /* EQUALS */ + YYSYMBOL_NOTEQUALS = 150, /* NOTEQUALS */ + YYSYMBOL_151_ = 151, /* '<' */ + YYSYMBOL_152_ = 152, /* '>' */ + YYSYMBOL_LESS = 153, /* LESS */ + YYSYMBOL_GREATER = 154, /* GREATER */ + YYSYMBOL_LESSEQ = 155, /* LESSEQ */ + YYSYMBOL_GREATEREQ = 156, /* GREATEREQ */ + YYSYMBOL_NOTNULL = 157, /* NOTNULL */ + YYSYMBOL_158_ = 158, /* '+' */ + YYSYMBOL_159_ = 159, /* '-' */ + YYSYMBOL_160_ = 160, /* '*' */ + YYSYMBOL_161_ = 161, /* '/' */ + YYSYMBOL_162_ = 162, /* '%' */ + YYSYMBOL_163_ = 163, /* '^' */ + YYSYMBOL_UMINUS = 164, /* UMINUS */ + YYSYMBOL_165_ = 165, /* '[' */ + YYSYMBOL_166_ = 166, /* ']' */ + YYSYMBOL_167_ = 167, /* '(' */ + YYSYMBOL_168_ = 168, /* ')' */ + YYSYMBOL_169_ = 169, /* '.' */ + YYSYMBOL_170_ = 170, /* ';' */ + YYSYMBOL_171_ = 171, /* ',' */ + YYSYMBOL_172_ = 172, /* '?' */ + YYSYMBOL_YYACCEPT = 173, /* $accept */ + YYSYMBOL_input = 174, /* input */ + YYSYMBOL_statement_list = 175, /* statement_list */ + YYSYMBOL_statement = 176, /* statement */ + YYSYMBOL_preparable_statement = 177, /* preparable_statement */ + YYSYMBOL_opt_hints = 178, /* opt_hints */ + YYSYMBOL_hint_list = 179, /* hint_list */ + YYSYMBOL_hint = 180, /* hint */ + YYSYMBOL_transaction_statement = 181, /* transaction_statement */ + YYSYMBOL_opt_transaction_keyword = 182, /* opt_transaction_keyword */ + YYSYMBOL_prepare_statement = 183, /* prepare_statement */ + YYSYMBOL_prepare_target_query = 184, /* prepare_target_query */ + YYSYMBOL_execute_statement = 185, /* execute_statement */ + YYSYMBOL_import_statement = 186, /* import_statement */ + YYSYMBOL_file_type = 187, /* file_type */ + YYSYMBOL_file_path = 188, /* file_path */ + YYSYMBOL_opt_file_type = 189, /* opt_file_type */ + YYSYMBOL_export_statement = 190, /* export_statement */ + YYSYMBOL_show_statement = 191, /* show_statement */ + YYSYMBOL_create_statement = 192, /* create_statement */ + YYSYMBOL_opt_not_exists = 193, /* opt_not_exists */ + YYSYMBOL_column_def_commalist = 194, /* column_def_commalist */ + YYSYMBOL_column_def = 195, /* column_def */ + YYSYMBOL_column_type = 196, /* column_type */ + YYSYMBOL_opt_column_nullable = 197, /* opt_column_nullable */ + YYSYMBOL_drop_statement = 198, /* drop_statement */ + YYSYMBOL_opt_exists = 199, /* opt_exists */ + YYSYMBOL_delete_statement = 200, /* delete_statement */ + YYSYMBOL_truncate_statement = 201, /* truncate_statement */ + YYSYMBOL_insert_statement = 202, /* insert_statement */ + YYSYMBOL_opt_column_list = 203, /* opt_column_list */ + YYSYMBOL_update_statement = 204, /* update_statement */ + YYSYMBOL_update_clause_commalist = 205, /* update_clause_commalist */ + YYSYMBOL_update_clause = 206, /* update_clause */ + YYSYMBOL_select_statement = 207, /* select_statement */ + YYSYMBOL_select_within_set_operation = 208, /* select_within_set_operation */ + YYSYMBOL_select_within_set_operation_no_parentheses = 209, /* select_within_set_operation_no_parentheses */ + YYSYMBOL_select_with_paren = 210, /* select_with_paren */ + YYSYMBOL_select_no_paren = 211, /* select_no_paren */ + YYSYMBOL_set_operator = 212, /* set_operator */ + YYSYMBOL_set_type = 213, /* set_type */ + YYSYMBOL_opt_all = 214, /* opt_all */ + YYSYMBOL_select_clause = 215, /* select_clause */ + YYSYMBOL_opt_distinct = 216, /* opt_distinct */ + YYSYMBOL_select_list = 217, /* select_list */ + YYSYMBOL_opt_from_clause = 218, /* opt_from_clause */ + YYSYMBOL_from_clause = 219, /* from_clause */ + YYSYMBOL_opt_where = 220, /* opt_where */ + YYSYMBOL_opt_group = 221, /* opt_group */ + YYSYMBOL_opt_having = 222, /* opt_having */ + YYSYMBOL_opt_order = 223, /* opt_order */ + YYSYMBOL_order_list = 224, /* order_list */ + YYSYMBOL_order_desc = 225, /* order_desc */ + YYSYMBOL_opt_order_type = 226, /* opt_order_type */ + YYSYMBOL_opt_top = 227, /* opt_top */ + YYSYMBOL_opt_limit = 228, /* opt_limit */ + YYSYMBOL_expr_list = 229, /* expr_list */ + YYSYMBOL_opt_literal_list = 230, /* opt_literal_list */ + YYSYMBOL_literal_list = 231, /* literal_list */ + YYSYMBOL_expr_alias = 232, /* expr_alias */ + YYSYMBOL_expr = 233, /* expr */ + YYSYMBOL_operand = 234, /* operand */ + YYSYMBOL_scalar_expr = 235, /* scalar_expr */ + YYSYMBOL_unary_expr = 236, /* unary_expr */ + YYSYMBOL_binary_expr = 237, /* binary_expr */ + YYSYMBOL_logic_expr = 238, /* logic_expr */ + YYSYMBOL_in_expr = 239, /* in_expr */ + YYSYMBOL_case_expr = 240, /* case_expr */ + YYSYMBOL_case_list = 241, /* case_list */ + YYSYMBOL_exists_expr = 242, /* exists_expr */ + YYSYMBOL_comp_expr = 243, /* comp_expr */ + YYSYMBOL_function_expr = 244, /* function_expr */ + YYSYMBOL_extract_expr = 245, /* extract_expr */ + YYSYMBOL_cast_expr = 246, /* cast_expr */ + YYSYMBOL_datetime_field = 247, /* datetime_field */ + YYSYMBOL_array_expr = 248, /* array_expr */ + YYSYMBOL_array_index = 249, /* array_index */ + YYSYMBOL_between_expr = 250, /* between_expr */ + YYSYMBOL_column_name = 251, /* column_name */ + YYSYMBOL_literal = 252, /* literal */ + YYSYMBOL_string_literal = 253, /* string_literal */ + YYSYMBOL_bool_literal = 254, /* bool_literal */ + YYSYMBOL_num_literal = 255, /* num_literal */ + YYSYMBOL_int_literal = 256, /* int_literal */ + YYSYMBOL_null_literal = 257, /* null_literal */ + YYSYMBOL_param_expr = 258, /* param_expr */ + YYSYMBOL_table_ref = 259, /* table_ref */ + YYSYMBOL_table_ref_atomic = 260, /* table_ref_atomic */ + YYSYMBOL_nonjoin_table_ref_atomic = 261, /* nonjoin_table_ref_atomic */ + YYSYMBOL_table_ref_commalist = 262, /* table_ref_commalist */ + YYSYMBOL_table_ref_name = 263, /* table_ref_name */ + YYSYMBOL_table_ref_name_no_alias = 264, /* table_ref_name_no_alias */ + YYSYMBOL_table_name = 265, /* table_name */ + YYSYMBOL_opt_index_name = 266, /* opt_index_name */ + YYSYMBOL_index_name = 267, /* index_name */ + YYSYMBOL_table_alias = 268, /* table_alias */ + YYSYMBOL_opt_table_alias = 269, /* opt_table_alias */ + YYSYMBOL_alias = 270, /* alias */ + YYSYMBOL_opt_alias = 271, /* opt_alias */ + YYSYMBOL_opt_with_clause = 272, /* opt_with_clause */ + YYSYMBOL_with_clause = 273, /* with_clause */ + YYSYMBOL_with_description_list = 274, /* with_description_list */ + YYSYMBOL_with_description = 275, /* with_description */ + YYSYMBOL_join_clause = 276, /* join_clause */ + YYSYMBOL_opt_join_type = 277, /* opt_join_type */ + YYSYMBOL_join_condition = 278, /* join_condition */ + YYSYMBOL_opt_semicolon = 279, /* opt_semicolon */ + YYSYMBOL_ident_commalist = 280 /* ident_commalist */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -734,19 +736,19 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 64 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 820 +#define YYLAST 736 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 171 +#define YYNTOKENS 173 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 108 /* YYNRULES -- Number of rules. */ -#define YYNRULES 268 +#define YYNRULES 271 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 493 +#define YYNSTATES 501 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 408 +#define YYMAXUTOK 410 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM @@ -763,13 +765,13 @@ static const yytype_uint8 yytranslate[] = 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 160, 2, 2, - 165, 166, 158, 156, 169, 157, 167, 159, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 168, - 149, 146, 150, 170, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 162, 2, 2, + 167, 168, 160, 158, 171, 159, 169, 161, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 170, + 151, 148, 152, 172, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 163, 2, 164, 161, 2, 2, 2, 2, 2, + 2, 165, 2, 166, 163, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -800,7 +802,8 @@ static const yytype_uint8 yytranslate[] = 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 147, 148, 151, 152, 153, 154, 155, 162 + 145, 146, 147, 149, 150, 153, 154, 155, 156, 157, + 164 }; #if HSQL_DEBUG @@ -813,27 +816,28 @@ static const yytype_int16 yyrline[] = 392, 399, 402, 406, 420, 426, 435, 452, 456, 459, 468, 482, 485, 490, 504, 517, 524, 531, 538, 549, 550, 554, 555, 559, 565, 566, 567, 568, 569, 570, - 571, 572, 573, 574, 575, 579, 580, 581, 591, 597, - 603, 608, 616, 617, 626, 635, 648, 655, 666, 667, - 677, 686, 687, 691, 703, 707, 711, 725, 726, 729, - 730, 741, 742, 746, 756, 769, 776, 780, 784, 791, - 794, 800, 812, 813, 817, 821, 822, 826, 831, 832, - 836, 841, 845, 846, 850, 851, 855, 856, 860, 864, - 865, 866, 872, 873, 877, 878, 879, 880, 881, 882, - 889, 890, 894, 895, 899, 900, 904, 914, 915, 916, - 917, 918, 922, 923, 924, 925, 926, 927, 928, 929, - 930, 931, 932, 936, 937, 941, 942, 943, 944, 945, - 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, - 959, 963, 964, 968, 969, 970, 971, 977, 978, 979, - 980, 984, 985, 989, 990, 994, 995, 996, 997, 998, - 999, 1000, 1004, 1005, 1009, 1013, 1017, 1018, 1019, 1020, - 1021, 1022, 1026, 1030, 1034, 1038, 1039, 1040, 1041, 1045, - 1046, 1047, 1048, 1049, 1053, 1057, 1058, 1062, 1063, 1067, - 1071, 1075, 1087, 1088, 1098, 1099, 1103, 1104, 1113, 1114, - 1119, 1130, 1139, 1140, 1144, 1145, 1149, 1154, 1155, 1160, - 1161, 1166, 1167, 1172, 1173, 1182, 1183, 1187, 1191, 1195, - 1202, 1215, 1223, 1233, 1252, 1253, 1254, 1255, 1256, 1257, - 1258, 1259, 1260, 1261, 1266, 1275, 1276, 1281, 1282 + 571, 572, 573, 574, 575, 576, 577, 578, 582, 583, + 584, 594, 600, 606, 611, 619, 620, 629, 638, 651, + 658, 669, 670, 680, 689, 690, 694, 706, 710, 714, + 728, 729, 732, 733, 744, 745, 749, 759, 772, 779, + 783, 787, 794, 797, 803, 815, 816, 820, 824, 825, + 829, 834, 835, 839, 844, 848, 849, 853, 854, 858, + 859, 863, 867, 868, 869, 875, 876, 880, 881, 882, + 883, 884, 885, 892, 893, 897, 898, 902, 903, 907, + 917, 918, 919, 920, 921, 925, 926, 927, 928, 929, + 930, 931, 932, 933, 934, 935, 939, 940, 944, 945, + 946, 947, 948, 952, 953, 954, 955, 956, 957, 958, + 959, 960, 961, 962, 966, 967, 971, 972, 973, 974, + 980, 981, 982, 983, 987, 988, 992, 993, 997, 998, + 999, 1000, 1001, 1002, 1003, 1007, 1008, 1012, 1016, 1020, + 1021, 1022, 1023, 1024, 1025, 1029, 1033, 1037, 1041, 1042, + 1043, 1044, 1048, 1049, 1050, 1051, 1052, 1056, 1060, 1061, + 1065, 1066, 1070, 1074, 1078, 1090, 1091, 1101, 1102, 1106, + 1107, 1116, 1117, 1122, 1133, 1142, 1143, 1147, 1148, 1152, + 1157, 1158, 1163, 1164, 1169, 1170, 1175, 1176, 1185, 1186, + 1190, 1194, 1198, 1205, 1218, 1226, 1236, 1255, 1256, 1257, + 1258, 1259, 1260, 1261, 1262, 1263, 1264, 1269, 1278, 1279, + 1284, 1285 }; #endif @@ -854,30 +858,31 @@ static const char *const yytname[] = "TEMPORARY", "TIMESTAMP", "DISTINCT", "NVARCHAR", "RESTRICT", "TRUNCATE", "ANALYZE", "BETWEEN", "CASCADE", "COLUMNS", "CONTROL", "DEFAULT", "EXECUTE", "EXPLAIN", "INTEGER", "NATURAL", "PREPARE", "PRIMARY", - "SCHEMAS", "CHARACTER", "VARYING", "SPATIAL", "VARCHAR", "VIRTUAL", - "DESCRIBE", "BEFORE", "COLUMN", "CREATE", "DELETE", "DIRECT", "DOUBLE", - "ESCAPE", "EXCEPT", "EXISTS", "EXTRACT", "CAST", "FORMAT", "GLOBAL", - "HAVING", "IMPORT", "INSERT", "ISNULL", "OFFSET", "RENAME", "SCHEMA", - "SELECT", "SORTED", "TABLES", "UNIQUE", "UNLOAD", "UPDATE", "VALUES", - "AFTER", "ALTER", "CROSS", "DELTA", "FLOAT", "GROUP", "INDEX", "INNER", - "LIMIT", "LOCAL", "MERGE", "MINUS", "ORDER", "OUTER", "RIGHT", "TABLE", - "UNION", "USING", "WHERE", "CALL", "CASE", "CHAR", "COPY", "DATE", - "DATETIME", "DESC", "DROP", "ELSE", "FILE", "FROM", "FULL", "HASH", - "HINT", "INTO", "JOIN", "LEFT", "LIKE", "LOAD", "LONG", "NULL", "PLAN", - "SHOW", "TEXT", "THEN", "TIME", "VIEW", "WHEN", "WITH", "ADD", "ALL", - "AND", "ASC", "END", "FOR", "INT", "KEY", "NOT", "OFF", "SET", "TOP", - "AS", "BY", "IF", "IN", "IS", "OF", "ON", "OR", "TO", "ARRAY", "CONCAT", - "ILIKE", "SECOND", "MINUTE", "HOUR", "DAY", "MONTH", "YEAR", "TRUE", - "FALSE", "TRANSACTION", "BEGIN", "COMMIT", "ROLLBACK", "'='", "EQUALS", - "NOTEQUALS", "'<'", "'>'", "LESS", "GREATER", "LESSEQ", "GREATEREQ", - "NOTNULL", "'+'", "'-'", "'*'", "'/'", "'%'", "'^'", "UMINUS", "'['", - "']'", "'('", "')'", "'.'", "';'", "','", "'?'", "$accept", "input", - "statement_list", "statement", "preparable_statement", "opt_hints", - "hint_list", "hint", "transaction_statement", "opt_transaction_keyword", - "prepare_statement", "prepare_target_query", "execute_statement", - "import_statement", "file_type", "file_path", "opt_file_type", - "export_statement", "show_statement", "create_statement", - "opt_not_exists", "column_def_commalist", "column_def", "column_type", + "SCHEMAS", "CHARACTER", "VARYING", "REAL", "DECIMAL", "SPATIAL", + "VARCHAR", "VIRTUAL", "DESCRIBE", "BEFORE", "COLUMN", "CREATE", "DELETE", + "DIRECT", "DOUBLE", "ESCAPE", "EXCEPT", "EXISTS", "EXTRACT", "CAST", + "FORMAT", "GLOBAL", "HAVING", "IMPORT", "INSERT", "ISNULL", "OFFSET", + "RENAME", "SCHEMA", "SELECT", "SORTED", "TABLES", "UNIQUE", "UNLOAD", + "UPDATE", "VALUES", "AFTER", "ALTER", "CROSS", "DELTA", "FLOAT", "GROUP", + "INDEX", "INNER", "LIMIT", "LOCAL", "MERGE", "MINUS", "ORDER", "OUTER", + "RIGHT", "TABLE", "UNION", "USING", "WHERE", "CALL", "CASE", "CHAR", + "COPY", "DATE", "DATETIME", "DESC", "DROP", "ELSE", "FILE", "FROM", + "FULL", "HASH", "HINT", "INTO", "JOIN", "LEFT", "LIKE", "LOAD", "LONG", + "NULL", "PLAN", "SHOW", "TEXT", "THEN", "TIME", "VIEW", "WHEN", "WITH", + "ADD", "ALL", "AND", "ASC", "END", "FOR", "INT", "KEY", "NOT", "OFF", + "SET", "TOP", "AS", "BY", "IF", "IN", "IS", "OF", "ON", "OR", "TO", + "ARRAY", "CONCAT", "ILIKE", "SECOND", "MINUTE", "HOUR", "DAY", "MONTH", + "YEAR", "TRUE", "FALSE", "TRANSACTION", "BEGIN", "COMMIT", "ROLLBACK", + "'='", "EQUALS", "NOTEQUALS", "'<'", "'>'", "LESS", "GREATER", "LESSEQ", + "GREATEREQ", "NOTNULL", "'+'", "'-'", "'*'", "'/'", "'%'", "'^'", + "UMINUS", "'['", "']'", "'('", "')'", "'.'", "';'", "','", "'?'", + "$accept", "input", "statement_list", "statement", + "preparable_statement", "opt_hints", "hint_list", "hint", + "transaction_statement", "opt_transaction_keyword", "prepare_statement", + "prepare_target_query", "execute_statement", "import_statement", + "file_type", "file_path", "opt_file_type", "export_statement", + "show_statement", "create_statement", "opt_not_exists", + "column_def_commalist", "column_def", "column_type", "opt_column_nullable", "drop_statement", "opt_exists", "delete_statement", "truncate_statement", "insert_statement", "opt_column_list", "update_statement", "update_clause_commalist", @@ -928,19 +933,19 @@ static const yytype_int16 yytoknum[] = 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, - 395, 396, 397, 398, 399, 400, 61, 401, 402, 60, - 62, 403, 404, 405, 406, 407, 43, 45, 42, 47, - 37, 94, 408, 91, 93, 40, 41, 46, 59, 44, - 63 + 395, 396, 397, 398, 399, 400, 401, 402, 61, 403, + 404, 60, 62, 405, 406, 407, 408, 409, 43, 45, + 42, 47, 37, 94, 410, 91, 93, 40, 41, 46, + 59, 44, 63 }; #endif -#define YYPACT_NINF (-392) +#define YYPACT_NINF (-379) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF (-266) +#define YYTABLE_NINF (-269) #define yytable_value_is_error(Yyn) \ ((Yyn) == YYTABLE_NINF) @@ -949,56 +954,57 @@ static const yytype_int16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - 527, 91, 103, 125, 169, 103, -10, 66, 134, 115, - 103, 103, 0, 63, 230, -48, -48, -48, 243, 76, - -392, 136, -392, 136, -392, -392, -392, -392, -392, -392, - -392, -392, -392, -392, -392, -1, -392, 252, 98, -392, - 111, 190, -392, 286, 167, 167, 103, 294, 103, 186, - -392, -58, 305, 188, 188, 103, -392, 202, 150, -392, - -392, -392, -392, -392, -392, 522, -392, 231, -392, -392, - 215, -1, 21, -392, 51, -392, 337, 13, 347, -392, - 167, 234, 103, 103, 277, -392, 278, 208, 382, 385, - 385, -392, 258, 350, 103, 103, -392, 225, 230, -392, - 229, 389, 384, 233, 235, -392, -392, -392, -1, 289, - 279, -1, 49, -392, -392, -392, -392, -392, -392, -392, - -392, 237, 236, -392, -392, -392, -392, -392, -392, -392, - -392, -392, 276, 363, -65, 208, 257, -392, 385, 404, - 158, 263, -60, -392, 301, -392, 301, 103, -392, -392, - -392, -392, -392, 408, -392, -392, 257, -392, -392, 339, - -392, -392, 21, -392, -392, 257, 339, 257, 146, -392, - -392, 13, 103, -392, 409, 307, 414, 297, 89, 259, - 260, 261, 191, 290, 265, 338, -392, 197, -51, 367, - -392, -392, -392, -392, -392, -392, -392, -392, -392, -392, - -392, -392, -392, -392, -392, -392, 334, -392, 106, 267, - -392, 257, 382, -392, 387, -392, -392, -392, 269, 114, - -392, 344, 268, -392, 33, 49, -1, 272, -392, -25, - 49, -51, 386, -31, -392, 271, 352, -392, 704, 141, - -392, 307, 3, 19, 388, 242, 257, 257, 119, 78, - 280, 338, 561, 257, 48, 283, -77, 257, 257, 338, - -392, 338, -61, 285, 80, 338, 338, 338, 338, 338, - 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, - 389, 103, -392, 441, 13, -51, -392, 294, 13, -392, - 408, 11, 277, -392, 257, -392, 448, -392, -392, -392, - -392, 257, -392, -392, -392, -392, 257, 257, 404, 385, - -392, 422, 288, -392, -392, 292, -392, -392, -392, -392, - -392, 120, -392, 414, -392, -392, 257, -392, -392, 293, - -392, -392, -392, -392, -392, -392, 370, 137, -39, 85, - 257, 257, -392, 388, 356, 68, -392, -392, -392, 346, - 495, 599, 338, 311, 197, -392, 361, 303, 599, 599, - 599, 599, 314, 314, 314, 314, 48, 48, -5, -5, - -5, -98, 316, -392, -392, 148, -392, 152, -392, 307, - -392, 16, -392, 312, -392, 25, -392, 415, -392, -392, - -392, -51, -51, 160, -392, 318, 478, 480, -392, 390, - -392, -392, 161, -392, 257, 704, 257, 257, -392, 155, - 110, 321, -392, 338, 599, 197, 322, 184, -392, -392, - -392, -392, 323, 394, -392, -392, -392, 419, 423, 426, - 401, 11, 499, -392, -392, -392, 381, -392, -392, 500, - 341, 343, -392, -392, -43, 345, -51, 176, -392, 257, - -392, 561, 353, 194, -392, -392, 25, 11, -392, -392, - -392, 11, 154, 340, 257, 365, -392, -392, -392, -392, - -392, -51, -392, -392, -392, -392, 295, 404, -23, -392, - 368, 257, 200, 257, -392, 20, -51, -392, -392, -51, - 351, 366, -392 + 521, 41, 78, 97, 160, 78, 112, 38, 74, 108, + 78, 78, 125, 15, 172, 39, 39, 39, 239, 98, + -379, 159, -379, 159, -379, -379, -379, -379, -379, -379, + -379, -379, -379, -379, -379, -3, -379, 266, 110, -379, + 116, 204, -379, 301, 183, 183, 78, 307, 78, 194, + -379, -55, 314, 201, 201, 78, -379, 209, 161, -379, + -379, -379, -379, -379, -379, 516, -379, 243, -379, -379, + 217, -3, 81, -379, 21, -379, 342, 12, 343, -379, + 183, 226, 78, 78, 275, -379, 256, 210, 358, 394, + 394, -379, 271, 360, 78, 78, -379, 236, 172, -379, + 237, 400, 396, 241, 242, -379, -379, -379, -3, 294, + 286, -3, -14, -379, -379, -379, -379, -379, -379, -379, + -379, 245, 244, -379, -379, -379, -379, -379, -379, -379, + -379, -379, 284, 373, -60, 210, 297, -379, 394, 417, + 42, 274, -57, -379, 312, -379, 312, 78, -379, -379, + -379, -379, -379, 422, -379, -379, 297, -379, -379, 352, + -379, -379, 81, -379, -379, 297, 352, 297, 147, -379, + -379, 12, 78, -379, 428, 321, 430, 310, 63, 269, + 276, 277, 153, 318, 280, 332, -379, 208, 174, 359, + -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, + -379, -379, -379, -379, -379, -379, 344, -379, 35, 279, + -379, 297, 358, -379, 399, -379, -379, -379, 281, 93, + -379, 349, 278, -379, 66, -14, -3, 282, -379, 113, + -14, 174, 401, -27, -379, 283, 362, -379, 395, 158, + -379, 321, 11, 16, 405, 233, 297, 297, 126, 71, + 291, 332, 552, 297, 86, 298, -52, 297, 297, 332, + -379, 332, -18, 300, 0, 332, 332, 332, 332, 332, + 332, 332, 332, 332, 332, 332, 332, 332, 332, 332, + 400, 78, -379, 465, 12, 174, -379, 307, 12, -379, + 422, 10, 275, -379, 297, -379, 467, -379, -379, -379, + -379, 297, -379, -379, -379, -379, 297, 297, 417, 394, + -379, 441, -379, 305, 306, -379, -379, 309, -379, -379, + -379, -379, -379, -379, 195, -379, 430, -379, -379, 297, + -379, -379, 313, -379, -379, -379, -379, -379, -379, 391, + 128, 102, 119, 297, 297, -379, 405, 388, -47, -379, + -379, -379, 375, 495, 571, 332, 328, 208, -379, 393, + 333, 571, 571, 571, 571, 232, 232, 232, 232, 86, + 86, -36, -36, -36, -97, 334, -379, -379, 163, -379, + 185, -379, 321, -379, -5, -379, 331, -379, 23, -379, + 436, -379, -379, -379, 174, 174, 187, -379, 339, 506, + 519, 520, -379, 424, -379, -379, 191, -379, 297, 395, + 297, 297, -379, 127, 131, 361, -379, 332, 571, 208, + 364, 214, -379, -379, -379, -379, 365, 432, -379, -379, + -379, 457, 458, 460, 442, 10, 536, -379, -379, -379, + 416, -379, -379, 538, 374, 378, 381, -379, -379, 55, + 382, 174, 177, -379, 297, -379, 552, 383, 218, -379, + -379, 23, 10, -379, -379, -379, 10, 14, 386, 297, + 390, 548, -379, -379, -379, -379, -379, 174, -379, -379, + -379, -379, 200, 417, -22, -379, 397, 392, 297, 228, + 297, -379, -379, 18, 174, -379, -379, 174, 402, 398, + -379 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -1006,72 +1012,73 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_int16 yydefact[] = { - 246, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 29, 29, 29, 0, 266, + 249, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 29, 29, 29, 0, 269, 3, 20, 18, 20, 17, 8, 9, 7, 11, 16, - 13, 14, 12, 15, 10, 0, 245, 0, 232, 75, - 32, 0, 43, 235, 50, 50, 0, 0, 0, 0, - 231, 0, 0, 73, 73, 0, 41, 0, 247, 248, - 28, 25, 27, 26, 1, 246, 2, 0, 6, 5, - 123, 0, 84, 85, 115, 70, 0, 133, 0, 234, - 50, 0, 0, 0, 109, 36, 0, 79, 0, 0, - 0, 236, 0, 0, 0, 0, 42, 0, 0, 4, - 0, 0, 103, 0, 0, 97, 98, 96, 0, 100, - 0, 0, 129, 233, 214, 217, 219, 220, 215, 216, - 221, 0, 132, 134, 209, 210, 211, 218, 212, 213, - 31, 30, 0, 0, 0, 79, 0, 74, 0, 0, - 0, 0, 109, 81, 39, 37, 39, 0, 72, 68, - 69, 250, 249, 0, 122, 102, 0, 92, 91, 115, - 88, 87, 89, 99, 95, 0, 115, 0, 0, 93, - 33, 0, 0, 49, 0, 246, 0, 0, 205, 0, - 0, 0, 0, 0, 0, 0, 207, 0, 108, 137, - 144, 145, 146, 139, 141, 147, 140, 160, 148, 149, - 150, 151, 143, 138, 153, 154, 0, 267, 0, 0, - 77, 0, 0, 80, 0, 35, 40, 71, 23, 0, - 21, 106, 104, 130, 244, 129, 0, 114, 116, 121, - 129, 125, 127, 124, 135, 0, 0, 46, 0, 0, - 51, 246, 103, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 156, 0, 155, 0, 0, 0, 0, 0, - 157, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 13, 14, 12, 15, 10, 0, 248, 0, 235, 78, + 32, 0, 43, 238, 50, 50, 0, 0, 0, 0, + 234, 0, 0, 76, 76, 0, 41, 0, 250, 251, + 28, 25, 27, 26, 1, 249, 2, 0, 6, 5, + 126, 0, 87, 88, 118, 73, 0, 136, 0, 237, + 50, 0, 0, 0, 112, 36, 0, 82, 0, 0, + 0, 239, 0, 0, 0, 0, 42, 0, 0, 4, + 0, 0, 106, 0, 0, 100, 101, 99, 0, 103, + 0, 0, 132, 236, 217, 220, 222, 223, 218, 219, + 224, 0, 135, 137, 212, 213, 214, 221, 215, 216, + 31, 30, 0, 0, 0, 82, 0, 77, 0, 0, + 0, 0, 112, 84, 39, 37, 39, 0, 75, 71, + 72, 253, 252, 0, 125, 105, 0, 95, 94, 118, + 91, 90, 92, 102, 98, 0, 118, 0, 0, 96, + 33, 0, 0, 49, 0, 249, 0, 0, 208, 0, + 0, 0, 0, 0, 0, 0, 210, 0, 111, 140, + 147, 148, 149, 142, 144, 150, 143, 163, 151, 152, + 153, 154, 146, 141, 156, 157, 0, 270, 0, 0, + 80, 0, 0, 83, 0, 35, 40, 74, 23, 0, + 21, 109, 107, 133, 247, 132, 0, 117, 119, 124, + 132, 128, 130, 127, 138, 0, 0, 46, 0, 0, + 51, 249, 106, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 159, 0, 158, 0, 0, 0, 0, 0, + 160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 78, 0, 0, 83, 82, 0, 0, 19, - 0, 0, 109, 105, 0, 242, 0, 243, 136, 86, - 90, 0, 120, 119, 118, 94, 0, 0, 0, 0, - 55, 0, 0, 58, 57, 0, 64, 63, 56, 62, - 54, 67, 45, 0, 48, 192, 0, 206, 208, 0, - 196, 197, 198, 199, 200, 201, 0, 0, 0, 0, - 0, 0, 179, 0, 0, 0, 152, 142, 171, 172, - 0, 167, 0, 0, 0, 158, 0, 170, 169, 185, - 186, 187, 188, 189, 190, 191, 162, 161, 164, 163, - 165, 166, 0, 34, 268, 0, 38, 0, 22, 246, - 107, 222, 224, 0, 226, 240, 225, 111, 131, 241, - 117, 128, 126, 0, 44, 0, 0, 0, 65, 0, - 53, 52, 0, 183, 0, 0, 0, 0, 177, 0, - 0, 0, 202, 0, 168, 0, 0, 0, 159, 203, - 76, 24, 0, 0, 262, 254, 260, 258, 261, 256, - 0, 0, 0, 239, 230, 237, 0, 101, 47, 0, - 0, 0, 66, 193, 0, 0, 181, 0, 180, 0, - 184, 204, 0, 0, 175, 173, 240, 0, 257, 259, - 255, 0, 223, 241, 0, 0, 59, 61, 194, 195, - 178, 182, 176, 174, 227, 251, 263, 0, 113, 60, - 0, 0, 0, 0, 110, 0, 264, 252, 238, 112, - 205, 0, 253 + 0, 0, 81, 0, 0, 86, 85, 0, 0, 19, + 0, 0, 112, 108, 0, 245, 0, 246, 139, 89, + 93, 0, 123, 122, 121, 97, 0, 0, 0, 0, + 55, 0, 60, 0, 0, 59, 57, 0, 67, 66, + 56, 64, 65, 54, 70, 45, 0, 48, 195, 0, + 209, 211, 0, 199, 200, 201, 202, 203, 204, 0, + 0, 0, 0, 0, 0, 182, 0, 0, 0, 155, + 145, 174, 175, 0, 170, 0, 0, 0, 161, 0, + 173, 172, 188, 189, 190, 191, 192, 193, 194, 165, + 164, 167, 166, 168, 169, 0, 34, 271, 0, 38, + 0, 22, 249, 110, 225, 227, 0, 229, 243, 228, + 114, 134, 244, 120, 131, 129, 0, 44, 0, 0, + 0, 0, 68, 0, 53, 52, 0, 186, 0, 0, + 0, 0, 180, 0, 0, 0, 205, 0, 171, 0, + 0, 0, 162, 206, 79, 24, 0, 0, 265, 257, + 263, 261, 264, 259, 0, 0, 0, 242, 233, 240, + 0, 104, 47, 0, 0, 0, 0, 69, 196, 0, + 0, 184, 0, 183, 0, 187, 207, 0, 0, 178, + 176, 243, 0, 260, 262, 258, 0, 226, 244, 0, + 0, 0, 61, 63, 197, 198, 181, 185, 179, 177, + 230, 254, 266, 0, 116, 62, 0, 0, 0, 0, + 0, 113, 58, 0, 267, 255, 241, 115, 208, 0, + 256 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -392, -392, -392, 445, -392, 489, -392, 245, -392, 22, - -392, -392, -392, -392, 249, -83, 392, -392, -392, -392, - -21, -392, 216, 135, -392, -392, 487, -392, -392, -392, - 410, -392, -392, 331, -165, -67, -392, 8, -69, -47, - -392, -392, -66, 308, -392, -392, -392, -126, -392, -392, - 2, -392, 246, -392, -392, 28, -252, -392, -100, 264, - -136, -135, -392, -392, -392, -392, -392, -392, 304, -392, - -392, -392, -392, -392, -392, -392, -392, -392, 69, -68, - -85, -392, -392, -93, -392, -392, -392, -391, 94, -392, - -392, -392, 1, -392, -392, -392, 99, 333, -392, -392, - -392, -392, 464, -392, -392, -392, -392, -295 + -379, -379, -379, 497, -379, 540, -379, 285, -379, 27, + -379, -379, -379, -379, 287, -83, 418, -379, -379, -379, + -9, -379, 250, 168, -379, -379, 515, -379, -379, -379, + 435, -379, -379, 367, -165, -96, -379, -11, -70, -39, + -379, -379, -66, 338, -379, -379, -379, -120, -379, -379, + -118, -379, 288, -379, -379, -29, -251, -379, -225, 290, + -136, -133, -379, -379, -379, -379, -379, -379, 337, -379, + -379, -379, -379, -379, -379, -379, -379, -379, 88, -69, + -85, -379, -379, -92, -379, -379, -379, -378, 120, -379, + -379, -379, 1, -379, -379, -379, 129, 363, -379, -379, + -379, -379, 488, -379, -379, -379, -379, -294 }; /* YYDEFGOTO[NTERM-NUM]. */ @@ -1079,15 +1086,15 @@ static const yytype_int16 yydefgoto[] = { 0, 18, 19, 20, 21, 68, 219, 220, 22, 61, 23, 131, 24, 25, 86, 144, 215, 26, 27, 28, - 82, 239, 240, 321, 400, 29, 94, 30, 31, 32, + 82, 239, 240, 324, 404, 29, 94, 30, 31, 32, 140, 33, 142, 143, 34, 159, 160, 161, 73, 108, - 109, 164, 74, 156, 221, 292, 293, 137, 437, 484, + 109, 164, 74, 156, 221, 292, 293, 137, 441, 491, 112, 227, 228, 304, 102, 169, 222, 121, 122, 223, 224, 189, 190, 191, 192, 193, 194, 195, 249, 196, - 197, 198, 199, 200, 336, 201, 202, 203, 204, 205, - 124, 125, 126, 127, 128, 129, 380, 381, 382, 383, - 384, 49, 385, 80, 92, 433, 434, 435, 298, 35, - 36, 58, 59, 386, 430, 487, 66, 208 + 197, 198, 199, 200, 339, 201, 202, 203, 204, 205, + 124, 125, 126, 127, 128, 129, 383, 384, 385, 386, + 387, 49, 388, 80, 92, 437, 438, 439, 298, 35, + 36, 58, 59, 389, 434, 495, 66, 208 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1095,264 +1102,248 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 188, 345, 104, 39, 145, 145, 42, 146, 154, 123, - 237, 50, 51, 393, 38, 155, 213, 114, 115, 116, - 136, 307, 327, 490, 83, 483, 174, 111, 295, 229, - 105, 231, 233, 89, 265, 257, 295, 352, 62, 63, - 462, 423, 162, 72, 166, 162, 248, 84, 252, 87, - 254, 256, 258, 145, 70, 206, 96, 175, 43, 132, - 105, 257, 302, 106, 353, 280, 406, 44, 52, 257, - 476, 210, 90, 257, 402, 285, 324, 53, 258, 103, - 424, 257, 55, 134, 135, 425, 258, 257, 303, 347, - 258, 426, 427, 106, 60, 149, 150, 45, 258, 107, - 176, 167, 417, 234, 258, 151, 38, 54, 428, 212, - 337, 338, -263, 429, 117, 226, 252, 37, 255, 168, - 56, 348, 349, 468, 350, 110, 351, 265, 40, 107, - 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, - 367, 368, 369, 370, 371, 257, 294, 432, 217, 178, - 114, 115, 116, 118, 119, 296, 279, 46, 280, 300, - 162, 225, 258, 453, 71, 229, 387, 340, 230, 325, - 391, 392, 41, 235, 407, 329, 379, 328, 186, 423, - 265, 355, 482, 120, 375, -228, 341, 372, 377, 179, - 180, 181, 342, 341, 178, 114, 115, 116, 356, 408, - 178, 114, 115, 116, 409, 410, 276, 277, 278, 279, - 48, 280, 478, 70, 422, 449, 123, 414, 424, 209, - 123, 398, 257, 425, 145, 47, 394, 247, 182, 426, - 427, 257, 412, 57, 179, 180, 181, 294, 399, 258, - 179, 180, 181, 64, 65, 67, 428, 117, 258, 257, - -263, 429, 70, 299, 242, 75, 243, 232, 305, 405, - 178, 114, 115, 116, 183, 76, 258, 257, 444, 448, - 446, 447, 282, 182, 411, 283, 77, 184, 451, 182, - 289, 78, 373, 290, 258, 416, 118, 119, 257, 79, - 470, 81, 117, 178, 114, 115, 116, 85, 117, 247, - 179, 180, 181, 185, 186, 258, 88, 322, 91, 183, - 323, 187, 93, 471, 420, 183, 120, 171, 421, 98, - 423, 171, 184, -229, 97, 100, 438, 443, 184, 283, - 294, 118, 119, 250, 180, 181, 101, 118, 119, 182, - 113, 178, 114, 115, 116, 486, 452, 489, 185, 186, - 455, 130, 133, 294, 185, 186, 187, 136, 117, 424, - 473, 120, 187, 294, 425, 260, 488, 120, 138, 283, - 426, 427, 182, 139, 480, 183, 330, 331, 332, 333, - 334, 335, 180, 181, 259, 141, 147, 428, 184, 114, - 71, 117, 429, 148, 153, 116, 155, 118, 119, 157, - 163, 158, 165, 170, 172, 171, 173, 207, 251, 211, - 214, 218, 236, 110, 185, 186, 14, 238, 260, 241, - 182, 184, 187, 481, 244, 245, 246, 120, 253, 281, - 118, 119, 284, 287, 288, 291, 308, 294, 306, 117, - 264, 301, 309, 70, 374, 343, 265, 185, 186, 346, - 354, 389, 395, 396, 352, 187, 251, 397, 257, 403, - 120, 404, 418, -266, -266, 261, 280, -266, -266, 184, - 274, 275, 276, 277, 278, 279, 415, 280, 118, 119, - 419, 431, 436, 439, 440, 262, 441, 450, 454, 456, - 457, 442, 263, 264, 458, 185, 186, 461, 459, 265, - 266, 460, 463, 187, 464, 477, 465, 466, 120, 467, - 99, 469, 69, 267, 268, 269, 270, 271, 243, 472, - 272, 273, -265, 274, 275, 276, 277, 278, 279, 1, - 280, 479, 492, 485, 1, 378, 376, 2, 216, 401, - 445, 95, 2, 286, 3, 177, 260, 390, 4, 3, - 326, 475, 339, 4, 491, 474, 5, 297, 388, 6, - 7, 5, 152, 0, 6, 7, 0, 0, 0, 0, - 0, 8, 9, 0, 0, 0, 8, 9, 0, 0, - 0, 0, 10, 0, 0, 0, 0, 10, 0, 0, - 0, 0, 0, 261, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 11, 413, 0, 0, - 12, 11, 260, 344, 0, 12, 0, 0, 0, 0, - 0, 264, 0, 0, 0, 13, 0, 265, 266, 0, - 13, 14, 0, 0, 0, 0, 14, 0, 0, 0, - 0, 267, 268, 269, 270, 271, 0, 0, 272, 273, - 260, 274, 275, 276, 277, 278, 279, 0, 280, 261, - 0, 0, 0, 0, 0, 15, 16, 17, 0, 0, - 15, 16, 17, 0, 0, 0, 0, 0, 0, 344, - 0, 0, 0, 0, 0, 0, 0, 264, 0, 0, - 0, 0, 0, 265, 266, 0, 0, -266, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 267, 268, 269, - 270, 271, 0, 0, 272, 273, 0, 274, 275, 276, - 277, 278, 279, 0, 280, 264, 0, 0, 310, 0, - 0, 265, -266, 311, 0, 0, 312, 0, 0, 0, - 0, 0, 0, 0, 313, -266, -266, -266, 270, 271, - 0, 0, 272, 273, 0, 274, 275, 276, 277, 278, - 279, 0, 280, 0, 0, 0, 0, 0, 0, 0, - 314, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 315, 0, 316, - 317, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 318, 0, 0, 0, 319, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 320 + 188, 104, 348, 39, 145, 145, 42, 146, 123, 154, + 237, 50, 51, 38, 396, 166, 114, 115, 116, 330, + 427, 498, 213, 155, 72, 136, 295, 307, 490, 229, + 105, 231, 233, 174, 55, 111, 83, 265, 89, 427, + 167, 225, 162, 62, 63, 162, 248, 84, 230, 87, + 252, 256, 254, 145, 70, 206, 96, 467, 168, 378, + 103, 428, 257, 380, 175, 106, 429, 37, 280, 295, + 210, 132, 430, 431, 56, 285, 327, 90, 406, 258, + 428, 38, 355, 134, 135, 429, 151, 257, 482, 432, + 105, 430, 431, -266, 433, 149, 150, 110, 265, 70, + 40, 107, 234, 358, 258, 209, 421, 176, 432, 356, + 340, 341, -266, 433, 212, 117, 350, 255, 252, 416, + 359, 351, 352, 226, 294, 106, 353, 279, 354, 280, + 300, 46, 360, 361, 362, 363, 364, 365, 366, 367, + 368, 369, 370, 371, 372, 373, 374, 436, 217, 294, + 178, 114, 115, 116, 118, 119, 178, 114, 115, 116, + 162, 107, 343, 41, 71, 229, -231, 47, 458, 257, + 394, 395, 390, 235, 332, 57, 331, 382, 186, 328, + 257, 344, 43, 60, 120, -232, 258, 345, 375, 489, + 296, 44, 179, 180, 181, 52, 299, 258, 179, 180, + 181, 305, 302, 282, 53, 48, 283, 413, 414, 410, + 411, 178, 114, 115, 116, 123, 257, 426, 484, 123, + 265, 45, 418, 474, 145, 427, 397, 257, 303, 344, + 242, 182, 243, 258, 54, 412, 247, 182, 454, 64, + 257, 257, 257, 453, 258, 257, 276, 277, 278, 279, + 117, 280, 409, 179, 180, 181, 117, 258, 258, 258, + 232, 289, 258, 247, 290, 70, 428, 183, 65, 75, + 67, 429, 449, 183, 451, 452, 415, 430, 431, 76, + 184, 487, 376, 77, 456, 260, 184, 420, 257, 118, + 119, 257, 182, 476, 432, 118, 119, 78, 402, 433, + 178, 114, 115, 116, 79, 258, 185, 186, 258, 81, + 85, 117, 185, 186, 187, 403, 88, 91, 477, 120, + 187, 178, 114, 115, 116, 120, 325, 93, 183, 326, + 488, 424, 98, 97, 171, 178, 114, 115, 116, 100, + 101, 184, 179, 180, 181, 113, 133, 130, 138, 457, + 118, 119, 494, 425, 497, 442, 171, 136, 283, 448, + 264, 141, 294, 250, 180, 181, 265, 185, 186, 333, + 334, 335, 336, 337, 338, 187, 259, 139, 180, 181, + 120, 182, 460, -269, -269, 294, 479, -269, -269, 294, + 274, 275, 276, 277, 278, 279, 496, 280, 114, 283, + 117, 147, 182, 71, 153, 148, 116, 163, 155, 157, + 158, 165, 260, 170, 172, 171, 182, 183, 173, 310, + 207, 117, 211, 214, 311, 218, 312, 313, 110, 314, + 184, 236, 14, 238, 241, 117, 244, 315, 251, 118, + 119, 281, 291, 245, 246, 253, 284, 287, 288, 294, + 308, 184, 251, 301, 309, 306, 185, 186, 346, 261, + 118, 119, 70, 316, 187, 184, 349, 357, 377, 120, + 392, 398, 399, 400, 118, 119, 401, 185, 186, 262, + 317, 407, 318, 319, 408, 187, 263, 264, 355, 257, + 120, 185, 186, 265, 266, 419, 422, 320, 280, 187, + 423, 321, 435, 322, 120, 440, 443, 267, 268, 269, + 270, 271, 444, 323, 272, 273, -268, 274, 275, 276, + 277, 278, 279, 1, 280, 445, 446, 447, 1, 455, + 462, 2, 459, 461, 463, 464, 2, 465, 3, 468, + 466, 469, 4, 3, 470, 471, 472, 4, 260, 473, + 475, 478, 5, 483, 486, 6, 7, 5, 485, 493, + 6, 7, 99, 69, 216, 492, 500, 8, 9, 95, + 177, 243, 8, 9, 379, 381, 405, 450, 10, 286, + 329, 499, 481, 10, 391, 342, 152, 297, 0, 393, + 480, 0, 0, 0, 0, 261, 0, 0, 0, 0, + 0, 0, 11, 0, 0, 260, 12, 11, 0, 417, + 0, 12, 0, 0, 0, 347, 0, 0, 0, 0, + 0, 13, 0, 264, 260, 0, 13, 14, 0, 265, + 266, 0, 14, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 267, 268, 269, 270, 271, 0, 0, + 272, 273, 261, 274, 275, 276, 277, 278, 279, 0, + 280, 15, 16, 17, 0, 0, 15, 16, 17, 0, + 0, -269, 347, 0, 0, 0, 0, 0, 0, 0, + 264, 0, 0, 0, 0, 0, 265, 266, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 264, + 267, 268, 269, 270, 271, 265, -269, 272, 273, 0, + 274, 275, 276, 277, 278, 279, 0, 280, 0, -269, + -269, -269, 270, 271, 0, 0, 272, 273, 0, 274, + 275, 276, 277, 278, 279, 0, 280 }; static const yytype_int16 yycheck[] = { - 136, 253, 71, 2, 89, 90, 5, 90, 101, 77, - 175, 10, 11, 308, 3, 12, 142, 4, 5, 6, - 80, 52, 3, 3, 45, 48, 91, 74, 3, 165, - 9, 167, 168, 91, 132, 112, 3, 98, 16, 17, - 431, 25, 108, 35, 111, 111, 182, 46, 183, 48, - 185, 187, 129, 138, 55, 138, 55, 122, 68, 80, - 9, 112, 87, 42, 125, 163, 105, 77, 68, 112, - 461, 140, 130, 112, 326, 211, 241, 77, 129, 71, - 64, 112, 19, 82, 83, 69, 129, 112, 113, 166, - 129, 75, 76, 42, 142, 94, 95, 107, 129, 78, - 165, 52, 354, 171, 129, 97, 3, 107, 92, 169, - 246, 247, 96, 97, 101, 162, 251, 26, 187, 70, - 57, 257, 258, 166, 259, 74, 261, 132, 3, 78, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 112, 169, 122, 147, 3, - 4, 5, 6, 140, 141, 122, 161, 91, 163, 226, - 226, 159, 129, 415, 165, 301, 292, 89, 166, 166, - 306, 307, 3, 172, 89, 244, 165, 158, 158, 25, - 132, 101, 477, 170, 284, 169, 108, 280, 288, 43, - 44, 45, 114, 108, 3, 4, 5, 6, 118, 114, - 3, 4, 5, 6, 340, 341, 158, 159, 160, 161, - 95, 163, 464, 55, 379, 105, 284, 352, 64, 61, - 288, 101, 112, 69, 309, 91, 309, 108, 82, 75, - 76, 112, 164, 3, 43, 44, 45, 169, 118, 129, - 43, 44, 45, 0, 168, 109, 92, 101, 129, 112, - 96, 97, 55, 225, 165, 3, 167, 111, 230, 122, - 3, 4, 5, 6, 118, 167, 129, 112, 404, 114, - 406, 407, 166, 82, 343, 169, 165, 131, 413, 82, - 166, 91, 281, 169, 129, 354, 140, 141, 112, 3, - 114, 124, 101, 3, 4, 5, 6, 3, 101, 108, - 43, 44, 45, 157, 158, 129, 120, 166, 3, 118, - 169, 165, 124, 449, 166, 118, 170, 169, 166, 169, - 25, 169, 131, 169, 122, 94, 166, 166, 131, 169, - 169, 140, 141, 43, 44, 45, 121, 140, 141, 82, - 3, 3, 4, 5, 6, 481, 415, 483, 157, 158, - 166, 4, 118, 169, 157, 158, 165, 80, 101, 64, - 166, 170, 165, 169, 69, 51, 166, 170, 90, 169, - 75, 76, 82, 165, 79, 118, 134, 135, 136, 137, - 138, 139, 44, 45, 17, 3, 128, 92, 131, 4, - 165, 101, 97, 43, 165, 6, 12, 140, 141, 166, - 111, 166, 123, 166, 128, 169, 43, 3, 118, 146, - 109, 3, 3, 74, 157, 158, 109, 3, 51, 122, - 82, 131, 165, 128, 165, 165, 165, 170, 163, 95, - 140, 141, 165, 46, 165, 91, 165, 169, 52, 101, - 126, 169, 90, 55, 3, 165, 132, 157, 158, 166, - 165, 3, 30, 165, 98, 165, 118, 165, 112, 166, - 170, 91, 101, 149, 150, 98, 163, 153, 154, 131, - 156, 157, 158, 159, 160, 161, 165, 163, 140, 141, - 164, 169, 67, 165, 6, 118, 6, 166, 166, 166, - 96, 101, 125, 126, 75, 157, 158, 96, 75, 132, - 133, 75, 3, 165, 123, 165, 6, 166, 170, 166, - 65, 166, 23, 146, 147, 148, 149, 150, 167, 166, - 153, 154, 0, 156, 157, 158, 159, 160, 161, 7, - 163, 166, 166, 165, 7, 290, 287, 15, 146, 323, - 405, 54, 15, 212, 22, 135, 51, 301, 26, 22, - 242, 457, 248, 26, 485, 456, 34, 224, 294, 37, - 38, 34, 98, -1, 37, 38, -1, -1, -1, -1, - -1, 49, 50, -1, -1, -1, 49, 50, -1, -1, - -1, -1, 60, -1, -1, -1, -1, 60, -1, -1, - -1, -1, -1, 98, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 84, 112, -1, -1, - 88, 84, 51, 118, -1, 88, -1, -1, -1, -1, - -1, 126, -1, -1, -1, 103, -1, 132, 133, -1, - 103, 109, -1, -1, -1, -1, 109, -1, -1, -1, - -1, 146, 147, 148, 149, 150, -1, -1, 153, 154, - 51, 156, 157, 158, 159, 160, 161, -1, 163, 98, - -1, -1, -1, -1, -1, 143, 144, 145, -1, -1, - 143, 144, 145, -1, -1, -1, -1, -1, -1, 118, - -1, -1, -1, -1, -1, -1, -1, 126, -1, -1, - -1, -1, -1, 132, 133, -1, -1, 98, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 146, 147, 148, - 149, 150, -1, -1, 153, 154, -1, 156, 157, 158, - 159, 160, 161, -1, 163, 126, -1, -1, 24, -1, - -1, 132, 133, 29, -1, -1, 32, -1, -1, -1, - -1, -1, -1, -1, 40, 146, 147, 148, 149, 150, - -1, -1, 153, 154, -1, 156, 157, 158, 159, 160, - 161, -1, 163, -1, -1, -1, -1, -1, -1, -1, - 66, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 83, -1, 85, - 86, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 100, -1, -1, -1, 104, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 116 + 136, 71, 253, 2, 89, 90, 5, 90, 77, 101, + 175, 10, 11, 3, 308, 111, 4, 5, 6, 3, + 25, 3, 142, 12, 35, 82, 3, 54, 50, 165, + 9, 167, 168, 93, 19, 74, 45, 134, 93, 25, + 54, 159, 108, 16, 17, 111, 182, 46, 166, 48, + 183, 187, 185, 138, 57, 138, 55, 435, 72, 284, + 71, 66, 114, 288, 124, 44, 71, 26, 165, 3, + 140, 80, 77, 78, 59, 211, 241, 132, 329, 131, + 66, 3, 100, 82, 83, 71, 97, 114, 466, 94, + 9, 77, 78, 98, 99, 94, 95, 76, 134, 57, + 3, 80, 171, 103, 131, 63, 357, 167, 94, 127, + 246, 247, 98, 99, 171, 103, 168, 187, 251, 166, + 120, 257, 258, 162, 171, 44, 259, 163, 261, 165, + 226, 93, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 124, 147, 171, + 3, 4, 5, 6, 142, 143, 3, 4, 5, 6, + 226, 80, 91, 3, 167, 301, 171, 93, 419, 114, + 306, 307, 292, 172, 244, 3, 160, 167, 160, 168, + 114, 110, 70, 144, 172, 171, 131, 116, 280, 483, + 124, 79, 45, 46, 47, 70, 225, 131, 45, 46, + 47, 230, 89, 168, 79, 97, 171, 343, 344, 107, + 91, 3, 4, 5, 6, 284, 114, 382, 469, 288, + 134, 109, 355, 168, 309, 25, 309, 114, 115, 110, + 167, 84, 169, 131, 109, 116, 110, 84, 107, 0, + 114, 114, 114, 116, 131, 114, 160, 161, 162, 163, + 103, 165, 124, 45, 46, 47, 103, 131, 131, 131, + 113, 168, 131, 110, 171, 57, 66, 120, 170, 3, + 111, 71, 408, 120, 410, 411, 346, 77, 78, 169, + 133, 81, 281, 167, 417, 53, 133, 357, 114, 142, + 143, 114, 84, 116, 94, 142, 143, 93, 103, 99, + 3, 4, 5, 6, 3, 131, 159, 160, 131, 126, + 3, 103, 159, 160, 167, 120, 122, 3, 454, 172, + 167, 3, 4, 5, 6, 172, 168, 126, 120, 171, + 130, 168, 171, 124, 171, 3, 4, 5, 6, 96, + 123, 133, 45, 46, 47, 3, 120, 4, 92, 419, + 142, 143, 488, 168, 490, 168, 171, 82, 171, 168, + 128, 3, 171, 45, 46, 47, 134, 159, 160, 136, + 137, 138, 139, 140, 141, 167, 17, 167, 46, 47, + 172, 84, 168, 151, 152, 171, 168, 155, 156, 171, + 158, 159, 160, 161, 162, 163, 168, 165, 4, 171, + 103, 130, 84, 167, 167, 45, 6, 113, 12, 168, + 168, 125, 53, 168, 130, 171, 84, 120, 45, 24, + 3, 103, 148, 111, 29, 3, 31, 32, 76, 34, + 133, 3, 111, 3, 124, 103, 167, 42, 120, 142, + 143, 97, 93, 167, 167, 165, 167, 48, 167, 171, + 167, 133, 120, 171, 92, 54, 159, 160, 167, 100, + 142, 143, 57, 68, 167, 133, 168, 167, 3, 172, + 3, 30, 167, 167, 142, 143, 167, 159, 160, 120, + 85, 168, 87, 88, 93, 167, 127, 128, 100, 114, + 172, 159, 160, 134, 135, 167, 103, 102, 165, 167, + 166, 106, 171, 108, 172, 69, 167, 148, 149, 150, + 151, 152, 6, 118, 155, 156, 0, 158, 159, 160, + 161, 162, 163, 7, 165, 6, 6, 103, 7, 168, + 98, 15, 168, 168, 77, 77, 15, 77, 22, 3, + 98, 125, 26, 22, 6, 171, 168, 26, 53, 168, + 168, 168, 36, 167, 6, 39, 40, 36, 168, 167, + 39, 40, 65, 23, 146, 168, 168, 51, 52, 54, + 135, 169, 51, 52, 287, 290, 326, 409, 62, 212, + 242, 493, 462, 62, 294, 248, 98, 224, -1, 301, + 461, -1, -1, -1, -1, 100, -1, -1, -1, -1, + -1, -1, 86, -1, -1, 53, 90, 86, -1, 114, + -1, 90, -1, -1, -1, 120, -1, -1, -1, -1, + -1, 105, -1, 128, 53, -1, 105, 111, -1, 134, + 135, -1, 111, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 148, 149, 150, 151, 152, -1, -1, + 155, 156, 100, 158, 159, 160, 161, 162, 163, -1, + 165, 145, 146, 147, -1, -1, 145, 146, 147, -1, + -1, 100, 120, -1, -1, -1, -1, -1, -1, -1, + 128, -1, -1, -1, -1, -1, 134, 135, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 128, + 148, 149, 150, 151, 152, 134, 135, 155, 156, -1, + 158, 159, 160, 161, 162, 163, -1, 165, -1, 148, + 149, 150, 151, 152, -1, -1, 155, 156, -1, 158, + 159, 160, 161, 162, 163, -1, 165 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_int16 yystos[] = { - 0, 7, 15, 22, 26, 34, 37, 38, 49, 50, - 60, 84, 88, 103, 109, 143, 144, 145, 172, 173, - 174, 175, 179, 181, 183, 184, 188, 189, 190, 196, - 198, 199, 200, 202, 205, 270, 271, 26, 3, 263, - 3, 3, 263, 68, 77, 107, 91, 91, 95, 262, - 263, 263, 68, 77, 107, 19, 57, 3, 272, 273, - 142, 180, 180, 180, 0, 168, 277, 109, 176, 176, - 55, 165, 208, 209, 213, 3, 167, 165, 91, 3, - 264, 124, 191, 191, 263, 3, 185, 263, 120, 91, - 130, 3, 265, 124, 197, 197, 263, 122, 169, 174, - 94, 121, 225, 208, 209, 9, 42, 78, 210, 211, - 74, 210, 221, 3, 4, 5, 6, 101, 140, 141, - 170, 228, 229, 250, 251, 252, 253, 254, 255, 256, - 4, 182, 191, 118, 263, 263, 80, 218, 90, 165, - 201, 3, 203, 204, 186, 251, 186, 128, 43, 263, - 263, 208, 273, 165, 254, 12, 214, 166, 166, 206, - 207, 208, 213, 111, 212, 123, 206, 52, 70, 226, - 166, 169, 128, 43, 91, 122, 165, 201, 3, 43, - 44, 45, 82, 118, 131, 157, 158, 165, 231, 232, - 233, 234, 235, 236, 237, 238, 240, 241, 242, 243, - 244, 246, 247, 248, 249, 250, 186, 3, 278, 61, - 209, 146, 169, 218, 109, 187, 187, 263, 3, 177, - 178, 215, 227, 230, 231, 221, 210, 222, 223, 231, - 221, 231, 111, 231, 250, 263, 3, 205, 3, 192, - 193, 122, 165, 167, 165, 165, 165, 108, 231, 239, - 43, 118, 232, 163, 232, 209, 231, 112, 129, 17, - 51, 98, 118, 125, 126, 132, 133, 146, 147, 148, - 149, 150, 153, 154, 156, 157, 158, 159, 160, 161, - 163, 95, 166, 169, 165, 231, 204, 46, 165, 166, - 169, 91, 216, 217, 169, 3, 122, 268, 269, 226, - 206, 169, 87, 113, 224, 226, 52, 52, 165, 90, - 24, 29, 32, 40, 66, 83, 85, 86, 100, 104, - 116, 194, 166, 169, 205, 166, 214, 3, 158, 209, - 134, 135, 136, 137, 138, 139, 245, 231, 231, 239, - 89, 108, 114, 165, 118, 227, 166, 166, 231, 231, - 232, 232, 98, 125, 165, 101, 118, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 254, 263, 3, 229, 185, 229, 178, 165, - 257, 258, 259, 260, 261, 263, 274, 218, 230, 3, - 223, 231, 231, 278, 186, 30, 165, 165, 101, 118, - 195, 193, 227, 166, 91, 122, 105, 89, 114, 231, - 231, 209, 164, 112, 232, 165, 209, 227, 101, 164, - 166, 166, 205, 25, 64, 69, 75, 76, 92, 97, - 275, 169, 122, 266, 267, 268, 67, 219, 166, 165, - 6, 6, 101, 166, 231, 194, 231, 231, 114, 105, - 166, 232, 209, 227, 166, 166, 166, 96, 75, 75, - 75, 96, 258, 3, 123, 6, 166, 166, 166, 166, - 114, 231, 166, 166, 267, 259, 258, 165, 227, 166, - 79, 128, 278, 48, 220, 165, 231, 276, 166, 231, - 3, 249, 166 + 0, 7, 15, 22, 26, 36, 39, 40, 51, 52, + 62, 86, 90, 105, 111, 145, 146, 147, 174, 175, + 176, 177, 181, 183, 185, 186, 190, 191, 192, 198, + 200, 201, 202, 204, 207, 272, 273, 26, 3, 265, + 3, 3, 265, 70, 79, 109, 93, 93, 97, 264, + 265, 265, 70, 79, 109, 19, 59, 3, 274, 275, + 144, 182, 182, 182, 0, 170, 279, 111, 178, 178, + 57, 167, 210, 211, 215, 3, 169, 167, 93, 3, + 266, 126, 193, 193, 265, 3, 187, 265, 122, 93, + 132, 3, 267, 126, 199, 199, 265, 124, 171, 176, + 96, 123, 227, 210, 211, 9, 44, 80, 212, 213, + 76, 212, 223, 3, 4, 5, 6, 103, 142, 143, + 172, 230, 231, 252, 253, 254, 255, 256, 257, 258, + 4, 184, 193, 120, 265, 265, 82, 220, 92, 167, + 203, 3, 205, 206, 188, 253, 188, 130, 45, 265, + 265, 210, 275, 167, 256, 12, 216, 168, 168, 208, + 209, 210, 215, 113, 214, 125, 208, 54, 72, 228, + 168, 171, 130, 45, 93, 124, 167, 203, 3, 45, + 46, 47, 84, 120, 133, 159, 160, 167, 233, 234, + 235, 236, 237, 238, 239, 240, 242, 243, 244, 245, + 246, 248, 249, 250, 251, 252, 188, 3, 280, 63, + 211, 148, 171, 220, 111, 189, 189, 265, 3, 179, + 180, 217, 229, 232, 233, 223, 212, 224, 225, 233, + 223, 233, 113, 233, 252, 265, 3, 207, 3, 194, + 195, 124, 167, 169, 167, 167, 167, 110, 233, 241, + 45, 120, 234, 165, 234, 211, 233, 114, 131, 17, + 53, 100, 120, 127, 128, 134, 135, 148, 149, 150, + 151, 152, 155, 156, 158, 159, 160, 161, 162, 163, + 165, 97, 168, 171, 167, 233, 206, 48, 167, 168, + 171, 93, 218, 219, 171, 3, 124, 270, 271, 228, + 208, 171, 89, 115, 226, 228, 54, 54, 167, 92, + 24, 29, 31, 32, 34, 42, 68, 85, 87, 88, + 102, 106, 108, 118, 196, 168, 171, 207, 168, 216, + 3, 160, 211, 136, 137, 138, 139, 140, 141, 247, + 233, 233, 241, 91, 110, 116, 167, 120, 229, 168, + 168, 233, 233, 234, 234, 100, 127, 167, 103, 120, + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 256, 265, 3, 231, 187, + 231, 180, 167, 259, 260, 261, 262, 263, 265, 276, + 220, 232, 3, 225, 233, 233, 280, 188, 30, 167, + 167, 167, 103, 120, 197, 195, 229, 168, 93, 124, + 107, 91, 116, 233, 233, 211, 166, 114, 234, 167, + 211, 229, 103, 166, 168, 168, 207, 25, 66, 71, + 77, 78, 94, 99, 277, 171, 124, 268, 269, 270, + 69, 221, 168, 167, 6, 6, 6, 103, 168, 233, + 196, 233, 233, 116, 107, 168, 234, 211, 229, 168, + 168, 168, 98, 77, 77, 77, 98, 260, 3, 125, + 6, 171, 168, 168, 168, 168, 116, 233, 168, 168, + 269, 261, 260, 167, 229, 168, 6, 81, 130, 280, + 50, 222, 168, 167, 233, 278, 168, 233, 3, 251, + 168 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_int16 yyr1[] = { - 0, 171, 172, 173, 173, 174, 174, 174, 174, 174, - 175, 175, 175, 175, 175, 175, 175, 175, 175, 176, - 176, 177, 177, 178, 178, 179, 179, 179, 180, 180, - 181, 182, 183, 183, 184, 184, 185, 186, 187, 187, - 188, 189, 189, 189, 190, 190, 190, 190, 190, 191, - 191, 192, 192, 193, 194, 194, 194, 194, 194, 194, - 194, 194, 194, 194, 194, 195, 195, 195, 196, 196, - 196, 196, 197, 197, 198, 199, 200, 200, 201, 201, - 202, 203, 203, 204, 205, 205, 205, 206, 206, 207, - 207, 208, 208, 209, 209, 210, 211, 211, 211, 212, - 212, 213, 214, 214, 215, 216, 216, 217, 218, 218, - 219, 219, 220, 220, 221, 221, 222, 222, 223, 224, - 224, 224, 225, 225, 226, 226, 226, 226, 226, 226, - 227, 227, 228, 228, 229, 229, 230, 231, 231, 231, - 231, 231, 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 233, 233, 234, 234, 234, 234, 234, - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235, 236, 236, 237, 237, 237, 237, 238, 238, 238, - 238, 239, 239, 240, 240, 241, 241, 241, 241, 241, - 241, 241, 242, 242, 243, 244, 245, 245, 245, 245, - 245, 245, 246, 247, 248, 249, 249, 249, 249, 250, - 250, 250, 250, 250, 251, 252, 252, 253, 253, 254, - 255, 256, 257, 257, 258, 258, 259, 259, 260, 260, - 261, 262, 263, 263, 264, 264, 265, 266, 266, 267, - 267, 268, 268, 269, 269, 270, 270, 271, 272, 272, - 273, 274, 274, 274, 275, 275, 275, 275, 275, 275, - 275, 275, 275, 275, 276, 277, 277, 278, 278 + 0, 173, 174, 175, 175, 176, 176, 176, 176, 176, + 177, 177, 177, 177, 177, 177, 177, 177, 177, 178, + 178, 179, 179, 180, 180, 181, 181, 181, 182, 182, + 183, 184, 185, 185, 186, 186, 187, 188, 189, 189, + 190, 191, 191, 191, 192, 192, 192, 192, 192, 193, + 193, 194, 194, 195, 196, 196, 196, 196, 196, 196, + 196, 196, 196, 196, 196, 196, 196, 196, 197, 197, + 197, 198, 198, 198, 198, 199, 199, 200, 201, 202, + 202, 203, 203, 204, 205, 205, 206, 207, 207, 207, + 208, 208, 209, 209, 210, 210, 211, 211, 212, 213, + 213, 213, 214, 214, 215, 216, 216, 217, 218, 218, + 219, 220, 220, 221, 221, 222, 222, 223, 223, 224, + 224, 225, 226, 226, 226, 227, 227, 228, 228, 228, + 228, 228, 228, 229, 229, 230, 230, 231, 231, 232, + 233, 233, 233, 233, 233, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 235, 235, 236, 236, + 236, 236, 236, 237, 237, 237, 237, 237, 237, 237, + 237, 237, 237, 237, 238, 238, 239, 239, 239, 239, + 240, 240, 240, 240, 241, 241, 242, 242, 243, 243, + 243, 243, 243, 243, 243, 244, 244, 245, 246, 247, + 247, 247, 247, 247, 247, 248, 249, 250, 251, 251, + 251, 251, 252, 252, 252, 252, 252, 253, 254, 254, + 255, 255, 256, 257, 258, 259, 259, 260, 260, 261, + 261, 262, 262, 263, 264, 265, 265, 266, 266, 267, + 268, 268, 269, 269, 270, 270, 271, 271, 272, 272, + 273, 274, 274, 275, 276, 276, 276, 277, 277, 277, + 277, 277, 277, 277, 277, 277, 277, 278, 279, 279, + 280, 280 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -1363,28 +1354,29 @@ static const yytype_int8 yyr2[] = 0, 1, 3, 1, 4, 2, 2, 2, 1, 0, 4, 1, 2, 5, 7, 5, 1, 1, 3, 0, 5, 2, 3, 2, 8, 7, 6, 9, 7, 3, - 0, 1, 3, 3, 1, 1, 1, 1, 1, 4, - 5, 4, 1, 1, 1, 1, 2, 0, 4, 4, - 3, 5, 2, 0, 4, 2, 8, 5, 3, 0, - 5, 1, 3, 3, 2, 2, 6, 1, 1, 1, - 3, 3, 3, 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, 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, 6, 1, 1, 1, 1, - 1, 1, 4, 4, 5, 1, 3, 1, 3, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 3, 1, 1, 1, 4, 1, 3, - 2, 1, 1, 3, 1, 0, 1, 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 + 0, 1, 3, 3, 1, 1, 1, 1, 6, 1, + 1, 4, 5, 4, 1, 1, 1, 1, 1, 2, + 0, 4, 4, 3, 5, 2, 0, 4, 2, 8, + 5, 3, 0, 5, 1, 3, 3, 2, 2, 6, + 1, 1, 1, 3, 3, 3, 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, 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, 6, 1, + 1, 1, 1, 1, 1, 4, 4, 5, 1, 3, + 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, + 4, 1, 3, 2, 1, 1, 3, 1, 0, 1, + 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 }; @@ -1938,25 +1930,25 @@ yydestruct (const char *yymsg, case YYSYMBOL_IDENTIFIER: /* IDENTIFIER */ #line 149 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1942 "bison_parser.cpp" +#line 1934 "bison_parser.cpp" break; case YYSYMBOL_STRING: /* STRING */ #line 149 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1948 "bison_parser.cpp" +#line 1940 "bison_parser.cpp" break; case YYSYMBOL_FLOATVAL: /* FLOATVAL */ #line 147 "bison_parser.y" { } -#line 1954 "bison_parser.cpp" +#line 1946 "bison_parser.cpp" break; case YYSYMBOL_INTVAL: /* INTVAL */ #line 147 "bison_parser.y" { } -#line 1960 "bison_parser.cpp" +#line 1952 "bison_parser.cpp" break; case YYSYMBOL_statement_list: /* statement_list */ @@ -1969,19 +1961,19 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).stmt_vec)); } -#line 1973 "bison_parser.cpp" +#line 1965 "bison_parser.cpp" break; case YYSYMBOL_statement: /* statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 1979 "bison_parser.cpp" +#line 1971 "bison_parser.cpp" break; case YYSYMBOL_preparable_statement: /* preparable_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 1985 "bison_parser.cpp" +#line 1977 "bison_parser.cpp" break; case YYSYMBOL_opt_hints: /* opt_hints */ @@ -1994,7 +1986,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 1998 "bison_parser.cpp" +#line 1990 "bison_parser.cpp" break; case YYSYMBOL_hint_list: /* hint_list */ @@ -2007,85 +1999,85 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2011 "bison_parser.cpp" +#line 2003 "bison_parser.cpp" break; case YYSYMBOL_hint: /* hint */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2017 "bison_parser.cpp" +#line 2009 "bison_parser.cpp" break; case YYSYMBOL_transaction_statement: /* transaction_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).transaction_stmt)); } -#line 2023 "bison_parser.cpp" +#line 2015 "bison_parser.cpp" break; case YYSYMBOL_prepare_statement: /* prepare_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).prep_stmt)); } -#line 2029 "bison_parser.cpp" +#line 2021 "bison_parser.cpp" break; case YYSYMBOL_prepare_target_query: /* prepare_target_query */ #line 149 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2035 "bison_parser.cpp" +#line 2027 "bison_parser.cpp" break; case YYSYMBOL_execute_statement: /* execute_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).exec_stmt)); } -#line 2041 "bison_parser.cpp" +#line 2033 "bison_parser.cpp" break; case YYSYMBOL_import_statement: /* import_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).import_stmt)); } -#line 2047 "bison_parser.cpp" +#line 2039 "bison_parser.cpp" break; case YYSYMBOL_file_type: /* file_type */ #line 147 "bison_parser.y" { } -#line 2053 "bison_parser.cpp" +#line 2045 "bison_parser.cpp" break; case YYSYMBOL_file_path: /* file_path */ #line 149 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2059 "bison_parser.cpp" +#line 2051 "bison_parser.cpp" break; case YYSYMBOL_opt_file_type: /* opt_file_type */ #line 147 "bison_parser.y" { } -#line 2065 "bison_parser.cpp" +#line 2057 "bison_parser.cpp" break; case YYSYMBOL_export_statement: /* export_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).export_stmt)); } -#line 2071 "bison_parser.cpp" +#line 2063 "bison_parser.cpp" break; case YYSYMBOL_show_statement: /* show_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).show_stmt)); } -#line 2077 "bison_parser.cpp" +#line 2069 "bison_parser.cpp" break; case YYSYMBOL_create_statement: /* create_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).create_stmt)); } -#line 2083 "bison_parser.cpp" +#line 2075 "bison_parser.cpp" break; case YYSYMBOL_opt_not_exists: /* opt_not_exists */ #line 147 "bison_parser.y" { } -#line 2089 "bison_parser.cpp" +#line 2081 "bison_parser.cpp" break; case YYSYMBOL_column_def_commalist: /* column_def_commalist */ @@ -2098,55 +2090,55 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).column_vec)); } -#line 2102 "bison_parser.cpp" +#line 2094 "bison_parser.cpp" break; case YYSYMBOL_column_def: /* column_def */ #line 158 "bison_parser.y" { delete (((*yyvaluep).column_t)); } -#line 2108 "bison_parser.cpp" +#line 2100 "bison_parser.cpp" break; case YYSYMBOL_column_type: /* column_type */ #line 147 "bison_parser.y" { } -#line 2114 "bison_parser.cpp" +#line 2106 "bison_parser.cpp" break; case YYSYMBOL_opt_column_nullable: /* opt_column_nullable */ #line 147 "bison_parser.y" { } -#line 2120 "bison_parser.cpp" +#line 2112 "bison_parser.cpp" break; case YYSYMBOL_drop_statement: /* drop_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).drop_stmt)); } -#line 2126 "bison_parser.cpp" +#line 2118 "bison_parser.cpp" break; case YYSYMBOL_opt_exists: /* opt_exists */ #line 147 "bison_parser.y" { } -#line 2132 "bison_parser.cpp" +#line 2124 "bison_parser.cpp" break; case YYSYMBOL_delete_statement: /* delete_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2138 "bison_parser.cpp" +#line 2130 "bison_parser.cpp" break; case YYSYMBOL_truncate_statement: /* truncate_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2144 "bison_parser.cpp" +#line 2136 "bison_parser.cpp" break; case YYSYMBOL_insert_statement: /* insert_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).insert_stmt)); } -#line 2150 "bison_parser.cpp" +#line 2142 "bison_parser.cpp" break; case YYSYMBOL_opt_column_list: /* opt_column_list */ @@ -2159,13 +2151,13 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2163 "bison_parser.cpp" +#line 2155 "bison_parser.cpp" break; case YYSYMBOL_update_statement: /* update_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).update_stmt)); } -#line 2169 "bison_parser.cpp" +#line 2161 "bison_parser.cpp" break; case YYSYMBOL_update_clause_commalist: /* update_clause_commalist */ @@ -2178,73 +2170,73 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).update_vec)); } -#line 2182 "bison_parser.cpp" +#line 2174 "bison_parser.cpp" break; case YYSYMBOL_update_clause: /* update_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).update_t)); } -#line 2188 "bison_parser.cpp" +#line 2180 "bison_parser.cpp" break; case YYSYMBOL_select_statement: /* select_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2194 "bison_parser.cpp" +#line 2186 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation: /* select_within_set_operation */ #line 158 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2200 "bison_parser.cpp" +#line 2192 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation_no_parentheses: /* select_within_set_operation_no_parentheses */ #line 158 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2206 "bison_parser.cpp" +#line 2198 "bison_parser.cpp" break; case YYSYMBOL_select_with_paren: /* select_with_paren */ #line 158 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2212 "bison_parser.cpp" +#line 2204 "bison_parser.cpp" break; case YYSYMBOL_select_no_paren: /* select_no_paren */ #line 158 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2218 "bison_parser.cpp" +#line 2210 "bison_parser.cpp" break; case YYSYMBOL_set_operator: /* set_operator */ #line 158 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2224 "bison_parser.cpp" +#line 2216 "bison_parser.cpp" break; case YYSYMBOL_set_type: /* set_type */ #line 158 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2230 "bison_parser.cpp" +#line 2222 "bison_parser.cpp" break; case YYSYMBOL_opt_all: /* opt_all */ #line 147 "bison_parser.y" { } -#line 2236 "bison_parser.cpp" +#line 2228 "bison_parser.cpp" break; case YYSYMBOL_select_clause: /* select_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2242 "bison_parser.cpp" +#line 2234 "bison_parser.cpp" break; case YYSYMBOL_opt_distinct: /* opt_distinct */ #line 147 "bison_parser.y" { } -#line 2248 "bison_parser.cpp" +#line 2240 "bison_parser.cpp" break; case YYSYMBOL_select_list: /* select_list */ @@ -2257,37 +2249,37 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2261 "bison_parser.cpp" +#line 2253 "bison_parser.cpp" break; case YYSYMBOL_opt_from_clause: /* opt_from_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2267 "bison_parser.cpp" +#line 2259 "bison_parser.cpp" break; case YYSYMBOL_from_clause: /* from_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2273 "bison_parser.cpp" +#line 2265 "bison_parser.cpp" break; case YYSYMBOL_opt_where: /* opt_where */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2279 "bison_parser.cpp" +#line 2271 "bison_parser.cpp" break; case YYSYMBOL_opt_group: /* opt_group */ #line 158 "bison_parser.y" { delete (((*yyvaluep).group_t)); } -#line 2285 "bison_parser.cpp" +#line 2277 "bison_parser.cpp" break; case YYSYMBOL_opt_having: /* opt_having */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2291 "bison_parser.cpp" +#line 2283 "bison_parser.cpp" break; case YYSYMBOL_opt_order: /* opt_order */ @@ -2300,7 +2292,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2304 "bison_parser.cpp" +#line 2296 "bison_parser.cpp" break; case YYSYMBOL_order_list: /* order_list */ @@ -2313,31 +2305,31 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2317 "bison_parser.cpp" +#line 2309 "bison_parser.cpp" break; case YYSYMBOL_order_desc: /* order_desc */ #line 158 "bison_parser.y" { delete (((*yyvaluep).order)); } -#line 2323 "bison_parser.cpp" +#line 2315 "bison_parser.cpp" break; case YYSYMBOL_opt_order_type: /* opt_order_type */ #line 147 "bison_parser.y" { } -#line 2329 "bison_parser.cpp" +#line 2321 "bison_parser.cpp" break; case YYSYMBOL_opt_top: /* opt_top */ #line 158 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2335 "bison_parser.cpp" +#line 2327 "bison_parser.cpp" break; case YYSYMBOL_opt_limit: /* opt_limit */ #line 158 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2341 "bison_parser.cpp" +#line 2333 "bison_parser.cpp" break; case YYSYMBOL_expr_list: /* expr_list */ @@ -2350,7 +2342,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2354 "bison_parser.cpp" +#line 2346 "bison_parser.cpp" break; case YYSYMBOL_opt_literal_list: /* opt_literal_list */ @@ -2363,7 +2355,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2367 "bison_parser.cpp" +#line 2359 "bison_parser.cpp" break; case YYSYMBOL_literal_list: /* literal_list */ @@ -2376,187 +2368,187 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2380 "bison_parser.cpp" +#line 2372 "bison_parser.cpp" break; case YYSYMBOL_expr_alias: /* expr_alias */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2386 "bison_parser.cpp" +#line 2378 "bison_parser.cpp" break; case YYSYMBOL_expr: /* expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2392 "bison_parser.cpp" +#line 2384 "bison_parser.cpp" break; case YYSYMBOL_operand: /* operand */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2398 "bison_parser.cpp" +#line 2390 "bison_parser.cpp" break; case YYSYMBOL_scalar_expr: /* scalar_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2404 "bison_parser.cpp" +#line 2396 "bison_parser.cpp" break; case YYSYMBOL_unary_expr: /* unary_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2410 "bison_parser.cpp" +#line 2402 "bison_parser.cpp" break; case YYSYMBOL_binary_expr: /* binary_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2416 "bison_parser.cpp" +#line 2408 "bison_parser.cpp" break; case YYSYMBOL_logic_expr: /* logic_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2422 "bison_parser.cpp" +#line 2414 "bison_parser.cpp" break; case YYSYMBOL_in_expr: /* in_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2428 "bison_parser.cpp" +#line 2420 "bison_parser.cpp" break; case YYSYMBOL_case_expr: /* case_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2434 "bison_parser.cpp" +#line 2426 "bison_parser.cpp" break; case YYSYMBOL_case_list: /* case_list */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2440 "bison_parser.cpp" +#line 2432 "bison_parser.cpp" break; case YYSYMBOL_exists_expr: /* exists_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2446 "bison_parser.cpp" +#line 2438 "bison_parser.cpp" break; case YYSYMBOL_comp_expr: /* comp_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2452 "bison_parser.cpp" +#line 2444 "bison_parser.cpp" break; case YYSYMBOL_function_expr: /* function_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2458 "bison_parser.cpp" +#line 2450 "bison_parser.cpp" break; case YYSYMBOL_extract_expr: /* extract_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2464 "bison_parser.cpp" +#line 2456 "bison_parser.cpp" break; case YYSYMBOL_cast_expr: /* cast_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2470 "bison_parser.cpp" +#line 2462 "bison_parser.cpp" break; case YYSYMBOL_datetime_field: /* datetime_field */ #line 147 "bison_parser.y" { } -#line 2476 "bison_parser.cpp" +#line 2468 "bison_parser.cpp" break; case YYSYMBOL_array_expr: /* array_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2482 "bison_parser.cpp" +#line 2474 "bison_parser.cpp" break; case YYSYMBOL_array_index: /* array_index */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2488 "bison_parser.cpp" +#line 2480 "bison_parser.cpp" break; case YYSYMBOL_between_expr: /* between_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2494 "bison_parser.cpp" +#line 2486 "bison_parser.cpp" break; case YYSYMBOL_column_name: /* column_name */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2500 "bison_parser.cpp" +#line 2492 "bison_parser.cpp" break; case YYSYMBOL_literal: /* literal */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2506 "bison_parser.cpp" +#line 2498 "bison_parser.cpp" break; case YYSYMBOL_string_literal: /* string_literal */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2512 "bison_parser.cpp" +#line 2504 "bison_parser.cpp" break; case YYSYMBOL_bool_literal: /* bool_literal */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2518 "bison_parser.cpp" +#line 2510 "bison_parser.cpp" break; case YYSYMBOL_num_literal: /* num_literal */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2524 "bison_parser.cpp" +#line 2516 "bison_parser.cpp" break; case YYSYMBOL_int_literal: /* int_literal */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2530 "bison_parser.cpp" +#line 2522 "bison_parser.cpp" break; case YYSYMBOL_null_literal: /* null_literal */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2536 "bison_parser.cpp" +#line 2528 "bison_parser.cpp" break; case YYSYMBOL_param_expr: /* param_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2542 "bison_parser.cpp" +#line 2534 "bison_parser.cpp" break; case YYSYMBOL_table_ref: /* table_ref */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2548 "bison_parser.cpp" +#line 2540 "bison_parser.cpp" break; case YYSYMBOL_table_ref_atomic: /* table_ref_atomic */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2554 "bison_parser.cpp" +#line 2546 "bison_parser.cpp" break; case YYSYMBOL_nonjoin_table_ref_atomic: /* nonjoin_table_ref_atomic */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2560 "bison_parser.cpp" +#line 2552 "bison_parser.cpp" break; case YYSYMBOL_table_ref_commalist: /* table_ref_commalist */ @@ -2569,103 +2561,103 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).table_vec)); } -#line 2573 "bison_parser.cpp" +#line 2565 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name: /* table_ref_name */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2579 "bison_parser.cpp" +#line 2571 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name_no_alias: /* table_ref_name_no_alias */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2585 "bison_parser.cpp" +#line 2577 "bison_parser.cpp" break; case YYSYMBOL_table_name: /* table_name */ #line 148 "bison_parser.y" { free( (((*yyvaluep).table_name).name) ); free( (((*yyvaluep).table_name).schema) ); } -#line 2591 "bison_parser.cpp" +#line 2583 "bison_parser.cpp" break; case YYSYMBOL_opt_index_name: /* opt_index_name */ #line 149 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2597 "bison_parser.cpp" +#line 2589 "bison_parser.cpp" break; case YYSYMBOL_index_name: /* index_name */ #line 149 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2603 "bison_parser.cpp" +#line 2595 "bison_parser.cpp" break; case YYSYMBOL_table_alias: /* table_alias */ #line 158 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2609 "bison_parser.cpp" +#line 2601 "bison_parser.cpp" break; case YYSYMBOL_opt_table_alias: /* opt_table_alias */ #line 158 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2615 "bison_parser.cpp" +#line 2607 "bison_parser.cpp" break; case YYSYMBOL_alias: /* alias */ #line 158 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2621 "bison_parser.cpp" +#line 2613 "bison_parser.cpp" break; case YYSYMBOL_opt_alias: /* opt_alias */ #line 158 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2627 "bison_parser.cpp" +#line 2619 "bison_parser.cpp" break; case YYSYMBOL_opt_with_clause: /* opt_with_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2633 "bison_parser.cpp" +#line 2625 "bison_parser.cpp" break; case YYSYMBOL_with_clause: /* with_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2639 "bison_parser.cpp" +#line 2631 "bison_parser.cpp" break; case YYSYMBOL_with_description_list: /* with_description_list */ #line 158 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2645 "bison_parser.cpp" +#line 2637 "bison_parser.cpp" break; case YYSYMBOL_with_description: /* with_description */ #line 158 "bison_parser.y" { delete (((*yyvaluep).with_description_t)); } -#line 2651 "bison_parser.cpp" +#line 2643 "bison_parser.cpp" break; case YYSYMBOL_join_clause: /* join_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2657 "bison_parser.cpp" +#line 2649 "bison_parser.cpp" break; case YYSYMBOL_opt_join_type: /* opt_join_type */ #line 147 "bison_parser.y" { } -#line 2663 "bison_parser.cpp" +#line 2655 "bison_parser.cpp" break; case YYSYMBOL_join_condition: /* join_condition */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2669 "bison_parser.cpp" +#line 2661 "bison_parser.cpp" break; case YYSYMBOL_ident_commalist: /* ident_commalist */ @@ -2678,7 +2670,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2682 "bison_parser.cpp" +#line 2674 "bison_parser.cpp" break; default: @@ -2785,7 +2777,7 @@ YYLTYPE yylloc = yyloc_default; yylloc.string_length = 0; } -#line 2789 "bison_parser.cpp" +#line 2781 "bison_parser.cpp" yylsp[0] = yylloc; goto yysetstate; @@ -3013,7 +3005,7 @@ YYLTYPE yylloc = yyloc_default; } delete (yyvsp[-1].stmt_vec); } -#line 3017 "bison_parser.cpp" +#line 3009 "bison_parser.cpp" break; case 3: /* statement_list: statement */ @@ -3024,7 +3016,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.stmt_vec) = new std::vector(); (yyval.stmt_vec)->push_back((yyvsp[0].statement)); } -#line 3028 "bison_parser.cpp" +#line 3020 "bison_parser.cpp" break; case 4: /* statement_list: statement_list ';' statement */ @@ -3035,7 +3027,7 @@ YYLTYPE yylloc = yyloc_default; (yyvsp[-2].stmt_vec)->push_back((yyvsp[0].statement)); (yyval.stmt_vec) = (yyvsp[-2].stmt_vec); } -#line 3039 "bison_parser.cpp" +#line 3031 "bison_parser.cpp" break; case 5: /* statement: prepare_statement opt_hints */ @@ -3044,7 +3036,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3048 "bison_parser.cpp" +#line 3040 "bison_parser.cpp" break; case 6: /* statement: preparable_statement opt_hints */ @@ -3053,7 +3045,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.statement) = (yyvsp[-1].statement); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3057 "bison_parser.cpp" +#line 3049 "bison_parser.cpp" break; case 7: /* statement: show_statement */ @@ -3061,7 +3053,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.statement) = (yyvsp[0].show_stmt); } -#line 3065 "bison_parser.cpp" +#line 3057 "bison_parser.cpp" break; case 8: /* statement: import_statement */ @@ -3069,7 +3061,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.statement) = (yyvsp[0].import_stmt); } -#line 3073 "bison_parser.cpp" +#line 3065 "bison_parser.cpp" break; case 9: /* statement: export_statement */ @@ -3077,85 +3069,85 @@ YYLTYPE yylloc = yyloc_default; { (yyval.statement) = (yyvsp[0].export_stmt); } -#line 3081 "bison_parser.cpp" +#line 3073 "bison_parser.cpp" break; case 10: /* preparable_statement: select_statement */ #line 328 "bison_parser.y" { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 3087 "bison_parser.cpp" +#line 3079 "bison_parser.cpp" break; case 11: /* preparable_statement: create_statement */ #line 329 "bison_parser.y" { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 3093 "bison_parser.cpp" +#line 3085 "bison_parser.cpp" break; case 12: /* preparable_statement: insert_statement */ #line 330 "bison_parser.y" { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 3099 "bison_parser.cpp" +#line 3091 "bison_parser.cpp" break; case 13: /* preparable_statement: delete_statement */ #line 331 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3105 "bison_parser.cpp" +#line 3097 "bison_parser.cpp" break; case 14: /* preparable_statement: truncate_statement */ #line 332 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3111 "bison_parser.cpp" +#line 3103 "bison_parser.cpp" break; case 15: /* preparable_statement: update_statement */ #line 333 "bison_parser.y" { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 3117 "bison_parser.cpp" +#line 3109 "bison_parser.cpp" break; case 16: /* preparable_statement: drop_statement */ #line 334 "bison_parser.y" { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 3123 "bison_parser.cpp" +#line 3115 "bison_parser.cpp" break; case 17: /* preparable_statement: execute_statement */ #line 335 "bison_parser.y" { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 3129 "bison_parser.cpp" +#line 3121 "bison_parser.cpp" break; case 18: /* preparable_statement: transaction_statement */ #line 336 "bison_parser.y" { (yyval.statement) = (yyvsp[0].transaction_stmt); } -#line 3135 "bison_parser.cpp" +#line 3127 "bison_parser.cpp" break; case 19: /* opt_hints: WITH HINT '(' hint_list ')' */ #line 345 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 3141 "bison_parser.cpp" +#line 3133 "bison_parser.cpp" break; case 20: /* opt_hints: %empty */ #line 346 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 3147 "bison_parser.cpp" +#line 3139 "bison_parser.cpp" break; case 21: /* hint_list: hint */ #line 351 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3153 "bison_parser.cpp" +#line 3145 "bison_parser.cpp" break; case 22: /* hint_list: hint_list ',' hint */ #line 352 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3159 "bison_parser.cpp" +#line 3151 "bison_parser.cpp" break; case 23: /* hint: IDENTIFIER */ @@ -3164,7 +3156,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[0].sval); } -#line 3168 "bison_parser.cpp" +#line 3160 "bison_parser.cpp" break; case 24: /* hint: IDENTIFIER '(' literal_list ')' */ @@ -3174,7 +3166,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expr)->name = (yyvsp[-3].sval); (yyval.expr)->exprList = (yyvsp[-1].expr_vec); } -#line 3178 "bison_parser.cpp" +#line 3170 "bison_parser.cpp" break; case 25: /* transaction_statement: BEGIN opt_transaction_keyword */ @@ -3182,7 +3174,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.transaction_stmt) = new TransactionStatement(kBeginTransaction); } -#line 3186 "bison_parser.cpp" +#line 3178 "bison_parser.cpp" break; case 26: /* transaction_statement: ROLLBACK opt_transaction_keyword */ @@ -3190,7 +3182,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.transaction_stmt) = new TransactionStatement(kRollbackTransaction); } -#line 3194 "bison_parser.cpp" +#line 3186 "bison_parser.cpp" break; case 27: /* transaction_statement: COMMIT opt_transaction_keyword */ @@ -3198,7 +3190,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.transaction_stmt) = new TransactionStatement(kCommitTransaction); } -#line 3202 "bison_parser.cpp" +#line 3194 "bison_parser.cpp" break; case 30: /* prepare_statement: PREPARE IDENTIFIER FROM prepare_target_query */ @@ -3208,7 +3200,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.prep_stmt)->name = (yyvsp[-2].sval); (yyval.prep_stmt)->query = (yyvsp[0].sval); } -#line 3212 "bison_parser.cpp" +#line 3204 "bison_parser.cpp" break; case 32: /* execute_statement: EXECUTE IDENTIFIER */ @@ -3217,7 +3209,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[0].sval); } -#line 3221 "bison_parser.cpp" +#line 3213 "bison_parser.cpp" break; case 33: /* execute_statement: EXECUTE IDENTIFIER '(' opt_literal_list ')' */ @@ -3227,7 +3219,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.exec_stmt)->name = (yyvsp[-3].sval); (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); } -#line 3231 "bison_parser.cpp" +#line 3223 "bison_parser.cpp" break; case 34: /* import_statement: IMPORT FROM file_type FILE file_path INTO table_name */ @@ -3238,7 +3230,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.import_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3242 "bison_parser.cpp" +#line 3234 "bison_parser.cpp" break; case 35: /* import_statement: COPY table_name FROM file_path opt_file_type */ @@ -3249,7 +3241,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.import_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3253 "bison_parser.cpp" +#line 3245 "bison_parser.cpp" break; case 36: /* file_type: IDENTIFIER */ @@ -3268,13 +3260,13 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[0].sval)); } -#line 3272 "bison_parser.cpp" +#line 3264 "bison_parser.cpp" break; case 37: /* file_path: string_literal */ #line 452 "bison_parser.y" { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 3278 "bison_parser.cpp" +#line 3270 "bison_parser.cpp" break; case 38: /* opt_file_type: WITH FORMAT file_type */ @@ -3282,13 +3274,13 @@ YYLTYPE yylloc = yyloc_default; { (yyval.import_type_t) = (yyvsp[0].import_type_t); } -#line 3286 "bison_parser.cpp" +#line 3278 "bison_parser.cpp" break; case 39: /* opt_file_type: %empty */ #line 459 "bison_parser.y" { (yyval.import_type_t) = kImportAuto; } -#line 3292 "bison_parser.cpp" +#line 3284 "bison_parser.cpp" break; case 40: /* export_statement: COPY table_name TO file_path opt_file_type */ @@ -3299,7 +3291,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.export_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.export_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3303 "bison_parser.cpp" +#line 3295 "bison_parser.cpp" break; case 41: /* show_statement: SHOW TABLES */ @@ -3307,7 +3299,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.show_stmt) = new ShowStatement(kShowTables); } -#line 3311 "bison_parser.cpp" +#line 3303 "bison_parser.cpp" break; case 42: /* show_statement: SHOW COLUMNS table_name */ @@ -3317,7 +3309,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.show_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.show_stmt)->name = (yyvsp[0].table_name).name; } -#line 3321 "bison_parser.cpp" +#line 3313 "bison_parser.cpp" break; case 43: /* show_statement: DESCRIBE table_name */ @@ -3327,7 +3319,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.show_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.show_stmt)->name = (yyvsp[0].table_name).name; } -#line 3331 "bison_parser.cpp" +#line 3323 "bison_parser.cpp" break; case 44: /* create_statement: CREATE TABLE opt_not_exists table_name FROM IDENTIFIER FILE file_path */ @@ -3345,7 +3337,7 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].sval)); (yyval.create_stmt)->filePath = (yyvsp[0].sval); } -#line 3349 "bison_parser.cpp" +#line 3341 "bison_parser.cpp" break; case 45: /* create_statement: CREATE TABLE opt_not_exists table_name '(' column_def_commalist ')' */ @@ -3357,7 +3349,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->columns = (yyvsp[-1].column_vec); } -#line 3361 "bison_parser.cpp" +#line 3353 "bison_parser.cpp" break; case 46: /* create_statement: CREATE TABLE opt_not_exists table_name AS select_statement */ @@ -3369,7 +3361,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-2].table_name).name; (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3373 "bison_parser.cpp" +#line 3365 "bison_parser.cpp" break; case 47: /* create_statement: CREATE INDEX opt_index_name opt_not_exists ON table_name '(' ident_commalist ')' */ @@ -3381,7 +3373,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->indexColumns = (yyvsp[-1].str_vec); } -#line 3385 "bison_parser.cpp" +#line 3377 "bison_parser.cpp" break; case 48: /* create_statement: CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement */ @@ -3394,31 +3386,31 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3398 "bison_parser.cpp" +#line 3390 "bison_parser.cpp" break; case 49: /* opt_not_exists: IF NOT EXISTS */ #line 549 "bison_parser.y" { (yyval.bval) = true; } -#line 3404 "bison_parser.cpp" +#line 3396 "bison_parser.cpp" break; case 50: /* opt_not_exists: %empty */ #line 550 "bison_parser.y" { (yyval.bval) = false; } -#line 3410 "bison_parser.cpp" +#line 3402 "bison_parser.cpp" break; case 51: /* column_def_commalist: column_def */ #line 554 "bison_parser.y" { (yyval.column_vec) = new std::vector(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); } -#line 3416 "bison_parser.cpp" +#line 3408 "bison_parser.cpp" break; case 52: /* column_def_commalist: column_def_commalist ',' column_def */ #line 555 "bison_parser.y" { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } -#line 3422 "bison_parser.cpp" +#line 3414 "bison_parser.cpp" break; case 53: /* column_def: IDENTIFIER column_type opt_column_nullable */ @@ -3426,170 +3418,188 @@ YYLTYPE yylloc = yyloc_default; { (yyval.column_t) = new ColumnDefinition((yyvsp[-2].sval), (yyvsp[-1].column_type_t), (yyvsp[0].bval)); } -#line 3430 "bison_parser.cpp" +#line 3422 "bison_parser.cpp" break; case 54: /* column_type: INT */ #line 565 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3436 "bison_parser.cpp" +#line 3428 "bison_parser.cpp" break; case 55: /* column_type: INTEGER */ #line 566 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3442 "bison_parser.cpp" +#line 3434 "bison_parser.cpp" break; case 56: /* column_type: LONG */ #line 567 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::LONG}; } -#line 3448 "bison_parser.cpp" +#line 3440 "bison_parser.cpp" break; case 57: /* column_type: FLOAT */ #line 568 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3454 "bison_parser.cpp" +#line 3446 "bison_parser.cpp" break; - case 58: /* column_type: DOUBLE */ + case 58: /* column_type: DECIMAL '(' INTVAL ',' INTVAL ')' */ #line 569 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } -#line 3460 "bison_parser.cpp" + { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } +#line 3452 "bison_parser.cpp" break; - case 59: /* column_type: VARCHAR '(' INTVAL ')' */ + case 59: /* column_type: DOUBLE */ #line 570 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3466 "bison_parser.cpp" + { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } +#line 3458 "bison_parser.cpp" break; - case 60: /* column_type: CHARACTER VARYING '(' INTVAL ')' */ + case 60: /* column_type: REAL */ #line 571 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3472 "bison_parser.cpp" + { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } +#line 3464 "bison_parser.cpp" break; - case 61: /* column_type: CHAR '(' INTVAL ')' */ + case 61: /* column_type: VARCHAR '(' INTVAL ')' */ #line 572 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } -#line 3478 "bison_parser.cpp" + { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } +#line 3470 "bison_parser.cpp" break; - case 62: /* column_type: TEXT */ + case 62: /* column_type: CHARACTER VARYING '(' INTVAL ')' */ #line 573 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } -#line 3484 "bison_parser.cpp" + { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } +#line 3476 "bison_parser.cpp" break; - case 63: /* column_type: DATETIME */ + case 63: /* column_type: CHAR '(' INTVAL ')' */ #line 574 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } -#line 3490 "bison_parser.cpp" + { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } +#line 3482 "bison_parser.cpp" break; - case 64: /* column_type: DATE */ + case 64: /* column_type: TEXT */ #line 575 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } +#line 3488 "bison_parser.cpp" + break; + + case 65: /* column_type: TIME */ +#line 576 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::TIME}; } +#line 3494 "bison_parser.cpp" + break; + + case 66: /* column_type: DATETIME */ +#line 577 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } +#line 3500 "bison_parser.cpp" + break; + + case 67: /* column_type: DATE */ +#line 578 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATE}; } -#line 3496 "bison_parser.cpp" +#line 3506 "bison_parser.cpp" break; - case 65: /* opt_column_nullable: NULL */ -#line 579 "bison_parser.y" + case 68: /* opt_column_nullable: NULL */ +#line 582 "bison_parser.y" { (yyval.bval) = true; } -#line 3502 "bison_parser.cpp" +#line 3512 "bison_parser.cpp" break; - case 66: /* opt_column_nullable: NOT NULL */ -#line 580 "bison_parser.y" + case 69: /* opt_column_nullable: NOT NULL */ +#line 583 "bison_parser.y" { (yyval.bval) = false; } -#line 3508 "bison_parser.cpp" +#line 3518 "bison_parser.cpp" break; - case 67: /* opt_column_nullable: %empty */ -#line 581 "bison_parser.y" + case 70: /* opt_column_nullable: %empty */ +#line 584 "bison_parser.y" { (yyval.bval) = false; } -#line 3514 "bison_parser.cpp" +#line 3524 "bison_parser.cpp" break; - case 68: /* drop_statement: DROP TABLE opt_exists table_name */ -#line 591 "bison_parser.y" + case 71: /* drop_statement: DROP TABLE opt_exists table_name */ +#line 594 "bison_parser.y" { (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 3525 "bison_parser.cpp" +#line 3535 "bison_parser.cpp" break; - case 69: /* drop_statement: DROP VIEW opt_exists table_name */ -#line 597 "bison_parser.y" + case 72: /* drop_statement: DROP VIEW opt_exists table_name */ +#line 600 "bison_parser.y" { (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 3536 "bison_parser.cpp" +#line 3546 "bison_parser.cpp" break; - case 70: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ -#line 603 "bison_parser.y" + case 73: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ +#line 606 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); (yyval.drop_stmt)->ifExists = false; (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 3546 "bison_parser.cpp" +#line 3556 "bison_parser.cpp" break; - case 71: /* drop_statement: DROP INDEX index_name ON table_name */ -#line 608 "bison_parser.y" + case 74: /* drop_statement: DROP INDEX index_name ON table_name */ +#line 611 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropIndex); (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; (yyval.drop_stmt)->index_name = (yyvsp[-2].sval); } -#line 3556 "bison_parser.cpp" +#line 3566 "bison_parser.cpp" break; - case 72: /* opt_exists: IF EXISTS */ -#line 616 "bison_parser.y" + case 75: /* opt_exists: IF EXISTS */ +#line 619 "bison_parser.y" { (yyval.bval) = true; } -#line 3562 "bison_parser.cpp" +#line 3572 "bison_parser.cpp" break; - case 73: /* opt_exists: %empty */ -#line 617 "bison_parser.y" + case 76: /* opt_exists: %empty */ +#line 620 "bison_parser.y" { (yyval.bval) = false; } -#line 3568 "bison_parser.cpp" +#line 3578 "bison_parser.cpp" break; - case 74: /* delete_statement: DELETE FROM table_name opt_where */ -#line 626 "bison_parser.y" + case 77: /* delete_statement: DELETE FROM table_name opt_where */ +#line 629 "bison_parser.y" { (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 3579 "bison_parser.cpp" +#line 3589 "bison_parser.cpp" break; - case 75: /* truncate_statement: TRUNCATE table_name */ -#line 635 "bison_parser.y" + case 78: /* truncate_statement: TRUNCATE table_name */ +#line 638 "bison_parser.y" { (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3589 "bison_parser.cpp" +#line 3599 "bison_parser.cpp" break; - case 76: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ -#line 648 "bison_parser.y" + case 79: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ +#line 651 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertValues); (yyval.insert_stmt)->schema = (yyvsp[-5].table_name).schema; @@ -3597,11 +3607,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } -#line 3601 "bison_parser.cpp" +#line 3611 "bison_parser.cpp" break; - case 77: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ -#line 655 "bison_parser.y" + case 80: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ +#line 658 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertSelect); (yyval.insert_stmt)->schema = (yyvsp[-2].table_name).schema; @@ -3609,74 +3619,74 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } -#line 3613 "bison_parser.cpp" +#line 3623 "bison_parser.cpp" break; - case 78: /* opt_column_list: '(' ident_commalist ')' */ -#line 666 "bison_parser.y" + case 81: /* opt_column_list: '(' ident_commalist ')' */ +#line 669 "bison_parser.y" { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 3619 "bison_parser.cpp" +#line 3629 "bison_parser.cpp" break; - case 79: /* opt_column_list: %empty */ -#line 667 "bison_parser.y" + case 82: /* opt_column_list: %empty */ +#line 670 "bison_parser.y" { (yyval.str_vec) = nullptr; } -#line 3625 "bison_parser.cpp" +#line 3635 "bison_parser.cpp" break; - case 80: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ -#line 677 "bison_parser.y" + case 83: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ +#line 680 "bison_parser.y" { (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 3636 "bison_parser.cpp" +#line 3646 "bison_parser.cpp" break; - case 81: /* update_clause_commalist: update_clause */ -#line 686 "bison_parser.y" + case 84: /* update_clause_commalist: update_clause */ +#line 689 "bison_parser.y" { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 3642 "bison_parser.cpp" +#line 3652 "bison_parser.cpp" break; - case 82: /* update_clause_commalist: update_clause_commalist ',' update_clause */ -#line 687 "bison_parser.y" + case 85: /* update_clause_commalist: update_clause_commalist ',' update_clause */ +#line 690 "bison_parser.y" { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 3648 "bison_parser.cpp" +#line 3658 "bison_parser.cpp" break; - case 83: /* update_clause: IDENTIFIER '=' expr */ -#line 691 "bison_parser.y" + case 86: /* update_clause: IDENTIFIER '=' expr */ +#line 694 "bison_parser.y" { (yyval.update_t) = new UpdateClause(); (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 3658 "bison_parser.cpp" +#line 3668 "bison_parser.cpp" break; - case 84: /* select_statement: opt_with_clause select_with_paren */ -#line 703 "bison_parser.y" + case 87: /* select_statement: opt_with_clause select_with_paren */ +#line 706 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3667 "bison_parser.cpp" +#line 3677 "bison_parser.cpp" break; - case 85: /* select_statement: opt_with_clause select_no_paren */ -#line 707 "bison_parser.y" + case 88: /* select_statement: opt_with_clause select_no_paren */ +#line 710 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3676 "bison_parser.cpp" +#line 3686 "bison_parser.cpp" break; - case 86: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ -#line 711 "bison_parser.y" + case 89: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ +#line 714 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3688,17 +3698,17 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); (yyval.select_stmt)->withDescriptions = (yyvsp[-5].with_description_vec); } -#line 3692 "bison_parser.cpp" +#line 3702 "bison_parser.cpp" break; - case 89: /* select_within_set_operation_no_parentheses: select_clause */ -#line 729 "bison_parser.y" + case 92: /* select_within_set_operation_no_parentheses: select_clause */ +#line 732 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); } -#line 3698 "bison_parser.cpp" +#line 3708 "bison_parser.cpp" break; - case 90: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ -#line 730 "bison_parser.y" + case 93: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ +#line 733 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3707,23 +3717,23 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->push_back((yyvsp[-1].set_operator_t)); (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[0].select_stmt); } -#line 3711 "bison_parser.cpp" +#line 3721 "bison_parser.cpp" break; - case 91: /* select_with_paren: '(' select_no_paren ')' */ -#line 741 "bison_parser.y" + case 94: /* select_with_paren: '(' select_no_paren ')' */ +#line 744 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3717 "bison_parser.cpp" +#line 3727 "bison_parser.cpp" break; - case 92: /* select_with_paren: '(' select_with_paren ')' */ -#line 742 "bison_parser.y" + case 95: /* select_with_paren: '(' select_with_paren ')' */ +#line 745 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3723 "bison_parser.cpp" +#line 3733 "bison_parser.cpp" break; - case 93: /* select_no_paren: select_clause opt_order opt_limit */ -#line 746 "bison_parser.y" + case 96: /* select_no_paren: select_clause opt_order opt_limit */ +#line 749 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); (yyval.select_stmt)->order = (yyvsp[-1].order_vec); @@ -3734,11 +3744,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3738 "bison_parser.cpp" +#line 3748 "bison_parser.cpp" break; - case 94: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ -#line 756 "bison_parser.y" + case 97: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ +#line 759 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3749,63 +3759,63 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); } -#line 3753 "bison_parser.cpp" +#line 3763 "bison_parser.cpp" break; - case 95: /* set_operator: set_type opt_all */ -#line 769 "bison_parser.y" + case 98: /* set_operator: set_type opt_all */ +#line 772 "bison_parser.y" { (yyval.set_operator_t) = (yyvsp[-1].set_operator_t); (yyval.set_operator_t)->isAll = (yyvsp[0].bval); } -#line 3762 "bison_parser.cpp" +#line 3772 "bison_parser.cpp" break; - case 96: /* set_type: UNION */ -#line 776 "bison_parser.y" + case 99: /* set_type: UNION */ +#line 779 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetUnion; } -#line 3771 "bison_parser.cpp" +#line 3781 "bison_parser.cpp" break; - case 97: /* set_type: INTERSECT */ -#line 780 "bison_parser.y" + case 100: /* set_type: INTERSECT */ +#line 783 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetIntersect; } -#line 3780 "bison_parser.cpp" +#line 3790 "bison_parser.cpp" break; - case 98: /* set_type: EXCEPT */ -#line 784 "bison_parser.y" + case 101: /* set_type: EXCEPT */ +#line 787 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetExcept; } -#line 3789 "bison_parser.cpp" +#line 3799 "bison_parser.cpp" break; - case 99: /* opt_all: ALL */ -#line 791 "bison_parser.y" + case 102: /* opt_all: ALL */ +#line 794 "bison_parser.y" { (yyval.bval) = true; } -#line 3797 "bison_parser.cpp" +#line 3807 "bison_parser.cpp" break; - case 100: /* opt_all: %empty */ -#line 794 "bison_parser.y" + case 103: /* opt_all: %empty */ +#line 797 "bison_parser.y" { (yyval.bval) = false; } -#line 3805 "bison_parser.cpp" +#line 3815 "bison_parser.cpp" break; - case 101: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ -#line 800 "bison_parser.y" + case 104: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ +#line 803 "bison_parser.y" { (yyval.select_stmt) = new SelectStatement(); (yyval.select_stmt)->limit = (yyvsp[-5].limit); @@ -3815,213 +3825,213 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 3819 "bison_parser.cpp" +#line 3829 "bison_parser.cpp" break; - case 102: /* opt_distinct: DISTINCT */ -#line 812 "bison_parser.y" + case 105: /* opt_distinct: DISTINCT */ +#line 815 "bison_parser.y" { (yyval.bval) = true; } -#line 3825 "bison_parser.cpp" +#line 3835 "bison_parser.cpp" break; - case 103: /* opt_distinct: %empty */ -#line 813 "bison_parser.y" + case 106: /* opt_distinct: %empty */ +#line 816 "bison_parser.y" { (yyval.bval) = false; } -#line 3831 "bison_parser.cpp" +#line 3841 "bison_parser.cpp" break; - case 105: /* opt_from_clause: from_clause */ -#line 821 "bison_parser.y" + case 108: /* opt_from_clause: from_clause */ +#line 824 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 3837 "bison_parser.cpp" +#line 3847 "bison_parser.cpp" break; - case 106: /* opt_from_clause: %empty */ -#line 822 "bison_parser.y" + case 109: /* opt_from_clause: %empty */ +#line 825 "bison_parser.y" { (yyval.table) = nullptr; } -#line 3843 "bison_parser.cpp" +#line 3853 "bison_parser.cpp" break; - case 107: /* from_clause: FROM table_ref */ -#line 826 "bison_parser.y" + case 110: /* from_clause: FROM table_ref */ +#line 829 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 3849 "bison_parser.cpp" +#line 3859 "bison_parser.cpp" break; - case 108: /* opt_where: WHERE expr */ -#line 831 "bison_parser.y" + case 111: /* opt_where: WHERE expr */ +#line 834 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 3855 "bison_parser.cpp" +#line 3865 "bison_parser.cpp" break; - case 109: /* opt_where: %empty */ -#line 832 "bison_parser.y" + case 112: /* opt_where: %empty */ +#line 835 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 3861 "bison_parser.cpp" +#line 3871 "bison_parser.cpp" break; - case 110: /* opt_group: GROUP BY expr_list opt_having */ -#line 836 "bison_parser.y" + case 113: /* opt_group: GROUP BY expr_list opt_having */ +#line 839 "bison_parser.y" { (yyval.group_t) = new GroupByDescription(); (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 3871 "bison_parser.cpp" +#line 3881 "bison_parser.cpp" break; - case 111: /* opt_group: %empty */ -#line 841 "bison_parser.y" + case 114: /* opt_group: %empty */ +#line 844 "bison_parser.y" { (yyval.group_t) = nullptr; } -#line 3877 "bison_parser.cpp" +#line 3887 "bison_parser.cpp" break; - case 112: /* opt_having: HAVING expr */ -#line 845 "bison_parser.y" + case 115: /* opt_having: HAVING expr */ +#line 848 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 3883 "bison_parser.cpp" +#line 3893 "bison_parser.cpp" break; - case 113: /* opt_having: %empty */ -#line 846 "bison_parser.y" + case 116: /* opt_having: %empty */ +#line 849 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 3889 "bison_parser.cpp" +#line 3899 "bison_parser.cpp" break; - case 114: /* opt_order: ORDER BY order_list */ -#line 850 "bison_parser.y" + case 117: /* opt_order: ORDER BY order_list */ +#line 853 "bison_parser.y" { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 3895 "bison_parser.cpp" +#line 3905 "bison_parser.cpp" break; - case 115: /* opt_order: %empty */ -#line 851 "bison_parser.y" + case 118: /* opt_order: %empty */ +#line 854 "bison_parser.y" { (yyval.order_vec) = nullptr; } -#line 3901 "bison_parser.cpp" +#line 3911 "bison_parser.cpp" break; - case 116: /* order_list: order_desc */ -#line 855 "bison_parser.y" + case 119: /* order_list: order_desc */ +#line 858 "bison_parser.y" { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 3907 "bison_parser.cpp" +#line 3917 "bison_parser.cpp" break; - case 117: /* order_list: order_list ',' order_desc */ -#line 856 "bison_parser.y" + case 120: /* order_list: order_list ',' order_desc */ +#line 859 "bison_parser.y" { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 3913 "bison_parser.cpp" +#line 3923 "bison_parser.cpp" break; - case 118: /* order_desc: expr opt_order_type */ -#line 860 "bison_parser.y" + case 121: /* order_desc: expr opt_order_type */ +#line 863 "bison_parser.y" { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 3919 "bison_parser.cpp" +#line 3929 "bison_parser.cpp" break; - case 119: /* opt_order_type: ASC */ -#line 864 "bison_parser.y" + case 122: /* opt_order_type: ASC */ +#line 867 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 3925 "bison_parser.cpp" +#line 3935 "bison_parser.cpp" break; - case 120: /* opt_order_type: DESC */ -#line 865 "bison_parser.y" + case 123: /* opt_order_type: DESC */ +#line 868 "bison_parser.y" { (yyval.order_type) = kOrderDesc; } -#line 3931 "bison_parser.cpp" +#line 3941 "bison_parser.cpp" break; - case 121: /* opt_order_type: %empty */ -#line 866 "bison_parser.y" + case 124: /* opt_order_type: %empty */ +#line 869 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 3937 "bison_parser.cpp" +#line 3947 "bison_parser.cpp" break; - case 122: /* opt_top: TOP int_literal */ -#line 872 "bison_parser.y" + case 125: /* opt_top: TOP int_literal */ +#line 875 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 3943 "bison_parser.cpp" +#line 3953 "bison_parser.cpp" break; - case 123: /* opt_top: %empty */ -#line 873 "bison_parser.y" + case 126: /* opt_top: %empty */ +#line 876 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 3949 "bison_parser.cpp" +#line 3959 "bison_parser.cpp" break; - case 124: /* opt_limit: LIMIT expr */ -#line 877 "bison_parser.y" + case 127: /* opt_limit: LIMIT expr */ +#line 880 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 3955 "bison_parser.cpp" +#line 3965 "bison_parser.cpp" break; - case 125: /* opt_limit: OFFSET expr */ -#line 878 "bison_parser.y" + case 128: /* opt_limit: OFFSET expr */ +#line 881 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 3961 "bison_parser.cpp" +#line 3971 "bison_parser.cpp" break; - case 126: /* opt_limit: LIMIT expr OFFSET expr */ -#line 879 "bison_parser.y" + case 129: /* opt_limit: LIMIT expr OFFSET expr */ +#line 882 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 3967 "bison_parser.cpp" +#line 3977 "bison_parser.cpp" break; - case 127: /* opt_limit: LIMIT ALL */ -#line 880 "bison_parser.y" + case 130: /* opt_limit: LIMIT ALL */ +#line 883 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, nullptr); } -#line 3973 "bison_parser.cpp" +#line 3983 "bison_parser.cpp" break; - case 128: /* opt_limit: LIMIT ALL OFFSET expr */ -#line 881 "bison_parser.y" + case 131: /* opt_limit: LIMIT ALL OFFSET expr */ +#line 884 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 3979 "bison_parser.cpp" +#line 3989 "bison_parser.cpp" break; - case 129: /* opt_limit: %empty */ -#line 882 "bison_parser.y" + case 132: /* opt_limit: %empty */ +#line 885 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 3985 "bison_parser.cpp" +#line 3995 "bison_parser.cpp" break; - case 130: /* expr_list: expr_alias */ -#line 889 "bison_parser.y" + case 133: /* expr_list: expr_alias */ +#line 892 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3991 "bison_parser.cpp" +#line 4001 "bison_parser.cpp" break; - case 131: /* expr_list: expr_list ',' expr_alias */ -#line 890 "bison_parser.y" + case 134: /* expr_list: expr_list ',' expr_alias */ +#line 893 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3997 "bison_parser.cpp" +#line 4007 "bison_parser.cpp" break; - case 132: /* opt_literal_list: literal_list */ -#line 894 "bison_parser.y" + case 135: /* opt_literal_list: literal_list */ +#line 897 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[0].expr_vec); } -#line 4003 "bison_parser.cpp" +#line 4013 "bison_parser.cpp" break; - case 133: /* opt_literal_list: %empty */ -#line 895 "bison_parser.y" + case 136: /* opt_literal_list: %empty */ +#line 898 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 4009 "bison_parser.cpp" +#line 4019 "bison_parser.cpp" break; - case 134: /* literal_list: literal */ -#line 899 "bison_parser.y" + case 137: /* literal_list: literal */ +#line 902 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4015 "bison_parser.cpp" +#line 4025 "bison_parser.cpp" break; - case 135: /* literal_list: literal_list ',' literal */ -#line 900 "bison_parser.y" + case 138: /* literal_list: literal_list ',' literal */ +#line 903 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4021 "bison_parser.cpp" +#line 4031 "bison_parser.cpp" break; - case 136: /* expr_alias: expr opt_alias */ -#line 904 "bison_parser.y" + case 139: /* expr_alias: expr opt_alias */ +#line 907 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); if ((yyvsp[0].alias_t)) { @@ -4029,421 +4039,421 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].alias_t); } } -#line 4033 "bison_parser.cpp" +#line 4043 "bison_parser.cpp" break; - case 142: /* operand: '(' expr ')' */ -#line 922 "bison_parser.y" + case 145: /* operand: '(' expr ')' */ +#line 925 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); } -#line 4039 "bison_parser.cpp" +#line 4049 "bison_parser.cpp" break; - case 152: /* operand: '(' select_no_paren ')' */ -#line 932 "bison_parser.y" + case 155: /* operand: '(' select_no_paren ')' */ +#line 935 "bison_parser.y" { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 4045 "bison_parser.cpp" +#line 4055 "bison_parser.cpp" break; - case 155: /* unary_expr: '-' operand */ -#line 941 "bison_parser.y" + case 158: /* unary_expr: '-' operand */ +#line 944 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 4051 "bison_parser.cpp" +#line 4061 "bison_parser.cpp" break; - case 156: /* unary_expr: NOT operand */ -#line 942 "bison_parser.y" + case 159: /* unary_expr: NOT operand */ +#line 945 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 4057 "bison_parser.cpp" +#line 4067 "bison_parser.cpp" break; - case 157: /* unary_expr: operand ISNULL */ -#line 943 "bison_parser.y" + case 160: /* unary_expr: operand ISNULL */ +#line 946 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 4063 "bison_parser.cpp" +#line 4073 "bison_parser.cpp" break; - case 158: /* unary_expr: operand IS NULL */ -#line 944 "bison_parser.y" + case 161: /* unary_expr: operand IS NULL */ +#line 947 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 4069 "bison_parser.cpp" +#line 4079 "bison_parser.cpp" break; - case 159: /* unary_expr: operand IS NOT NULL */ -#line 945 "bison_parser.y" + case 162: /* unary_expr: operand IS NOT NULL */ +#line 948 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 4075 "bison_parser.cpp" +#line 4085 "bison_parser.cpp" break; - case 161: /* binary_expr: operand '-' operand */ -#line 950 "bison_parser.y" + case 164: /* binary_expr: operand '-' operand */ +#line 953 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 4081 "bison_parser.cpp" +#line 4091 "bison_parser.cpp" break; - case 162: /* binary_expr: operand '+' operand */ -#line 951 "bison_parser.y" + case 165: /* binary_expr: operand '+' operand */ +#line 954 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 4087 "bison_parser.cpp" +#line 4097 "bison_parser.cpp" break; - case 163: /* binary_expr: operand '/' operand */ -#line 952 "bison_parser.y" + case 166: /* binary_expr: operand '/' operand */ +#line 955 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 4093 "bison_parser.cpp" +#line 4103 "bison_parser.cpp" break; - case 164: /* binary_expr: operand '*' operand */ -#line 953 "bison_parser.y" + case 167: /* binary_expr: operand '*' operand */ +#line 956 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 4099 "bison_parser.cpp" +#line 4109 "bison_parser.cpp" break; - case 165: /* binary_expr: operand '%' operand */ -#line 954 "bison_parser.y" + case 168: /* binary_expr: operand '%' operand */ +#line 957 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 4105 "bison_parser.cpp" +#line 4115 "bison_parser.cpp" break; - case 166: /* binary_expr: operand '^' operand */ -#line 955 "bison_parser.y" + case 169: /* binary_expr: operand '^' operand */ +#line 958 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 4111 "bison_parser.cpp" +#line 4121 "bison_parser.cpp" break; - case 167: /* binary_expr: operand LIKE operand */ -#line 956 "bison_parser.y" + case 170: /* binary_expr: operand LIKE operand */ +#line 959 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 4117 "bison_parser.cpp" +#line 4127 "bison_parser.cpp" break; - case 168: /* binary_expr: operand NOT LIKE operand */ -#line 957 "bison_parser.y" + case 171: /* binary_expr: operand NOT LIKE operand */ +#line 960 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 4123 "bison_parser.cpp" +#line 4133 "bison_parser.cpp" break; - case 169: /* binary_expr: operand ILIKE operand */ -#line 958 "bison_parser.y" + case 172: /* binary_expr: operand ILIKE operand */ +#line 961 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 4129 "bison_parser.cpp" +#line 4139 "bison_parser.cpp" break; - case 170: /* binary_expr: operand CONCAT operand */ -#line 959 "bison_parser.y" + case 173: /* binary_expr: operand CONCAT operand */ +#line 962 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 4135 "bison_parser.cpp" +#line 4145 "bison_parser.cpp" break; - case 171: /* logic_expr: expr AND expr */ -#line 963 "bison_parser.y" + case 174: /* logic_expr: expr AND expr */ +#line 966 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 4141 "bison_parser.cpp" +#line 4151 "bison_parser.cpp" break; - case 172: /* logic_expr: expr OR expr */ -#line 964 "bison_parser.y" + case 175: /* logic_expr: expr OR expr */ +#line 967 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 4147 "bison_parser.cpp" +#line 4157 "bison_parser.cpp" break; - case 173: /* in_expr: operand IN '(' expr_list ')' */ -#line 968 "bison_parser.y" + case 176: /* in_expr: operand IN '(' expr_list ')' */ +#line 971 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 4153 "bison_parser.cpp" +#line 4163 "bison_parser.cpp" break; - case 174: /* in_expr: operand NOT IN '(' expr_list ')' */ -#line 969 "bison_parser.y" + case 177: /* in_expr: operand NOT IN '(' expr_list ')' */ +#line 972 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 4159 "bison_parser.cpp" +#line 4169 "bison_parser.cpp" break; - case 175: /* in_expr: operand IN '(' select_no_paren ')' */ -#line 970 "bison_parser.y" + case 178: /* in_expr: operand IN '(' select_no_paren ')' */ +#line 973 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 4165 "bison_parser.cpp" +#line 4175 "bison_parser.cpp" break; - case 176: /* in_expr: operand NOT IN '(' select_no_paren ')' */ -#line 971 "bison_parser.y" + case 179: /* in_expr: operand NOT IN '(' select_no_paren ')' */ +#line 974 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 4171 "bison_parser.cpp" +#line 4181 "bison_parser.cpp" break; - case 177: /* case_expr: CASE expr case_list END */ -#line 977 "bison_parser.y" + case 180: /* case_expr: CASE expr case_list END */ +#line 980 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } -#line 4177 "bison_parser.cpp" +#line 4187 "bison_parser.cpp" break; - case 178: /* case_expr: CASE expr case_list ELSE expr END */ -#line 978 "bison_parser.y" + case 181: /* case_expr: CASE expr case_list ELSE expr END */ +#line 981 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4183 "bison_parser.cpp" +#line 4193 "bison_parser.cpp" break; - case 179: /* case_expr: CASE case_list END */ -#line 979 "bison_parser.y" + case 182: /* case_expr: CASE case_list END */ +#line 982 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } -#line 4189 "bison_parser.cpp" +#line 4199 "bison_parser.cpp" break; - case 180: /* case_expr: CASE case_list ELSE expr END */ -#line 980 "bison_parser.y" + case 183: /* case_expr: CASE case_list ELSE expr END */ +#line 983 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4195 "bison_parser.cpp" +#line 4205 "bison_parser.cpp" break; - case 181: /* case_list: WHEN expr THEN expr */ -#line 984 "bison_parser.y" + case 184: /* case_list: WHEN expr THEN expr */ +#line 987 "bison_parser.y" { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4201 "bison_parser.cpp" +#line 4211 "bison_parser.cpp" break; - case 182: /* case_list: case_list WHEN expr THEN expr */ -#line 985 "bison_parser.y" + case 185: /* case_list: case_list WHEN expr THEN expr */ +#line 988 "bison_parser.y" { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4207 "bison_parser.cpp" +#line 4217 "bison_parser.cpp" break; - case 183: /* exists_expr: EXISTS '(' select_no_paren ')' */ -#line 989 "bison_parser.y" + case 186: /* exists_expr: EXISTS '(' select_no_paren ')' */ +#line 992 "bison_parser.y" { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 4213 "bison_parser.cpp" +#line 4223 "bison_parser.cpp" break; - case 184: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ -#line 990 "bison_parser.y" + case 187: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ +#line 993 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 4219 "bison_parser.cpp" +#line 4229 "bison_parser.cpp" break; - case 185: /* comp_expr: operand '=' operand */ -#line 994 "bison_parser.y" + case 188: /* comp_expr: operand '=' operand */ +#line 997 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4225 "bison_parser.cpp" +#line 4235 "bison_parser.cpp" break; - case 186: /* comp_expr: operand EQUALS operand */ -#line 995 "bison_parser.y" + case 189: /* comp_expr: operand EQUALS operand */ +#line 998 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4231 "bison_parser.cpp" +#line 4241 "bison_parser.cpp" break; - case 187: /* comp_expr: operand NOTEQUALS operand */ -#line 996 "bison_parser.y" + case 190: /* comp_expr: operand NOTEQUALS operand */ +#line 999 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 4237 "bison_parser.cpp" +#line 4247 "bison_parser.cpp" break; - case 188: /* comp_expr: operand '<' operand */ -#line 997 "bison_parser.y" + case 191: /* comp_expr: operand '<' operand */ +#line 1000 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 4243 "bison_parser.cpp" +#line 4253 "bison_parser.cpp" break; - case 189: /* comp_expr: operand '>' operand */ -#line 998 "bison_parser.y" + case 192: /* comp_expr: operand '>' operand */ +#line 1001 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 4249 "bison_parser.cpp" +#line 4259 "bison_parser.cpp" break; - case 190: /* comp_expr: operand LESSEQ operand */ -#line 999 "bison_parser.y" + case 193: /* comp_expr: operand LESSEQ operand */ +#line 1002 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 4255 "bison_parser.cpp" +#line 4265 "bison_parser.cpp" break; - case 191: /* comp_expr: operand GREATEREQ operand */ -#line 1000 "bison_parser.y" + case 194: /* comp_expr: operand GREATEREQ operand */ +#line 1003 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 4261 "bison_parser.cpp" +#line 4271 "bison_parser.cpp" break; - case 192: /* function_expr: IDENTIFIER '(' ')' */ -#line 1004 "bison_parser.y" + case 195: /* function_expr: IDENTIFIER '(' ')' */ +#line 1007 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 4267 "bison_parser.cpp" +#line 4277 "bison_parser.cpp" break; - case 193: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ -#line 1005 "bison_parser.y" + case 196: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ +#line 1008 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 4273 "bison_parser.cpp" +#line 4283 "bison_parser.cpp" break; - case 194: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ -#line 1009 "bison_parser.y" + case 197: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ +#line 1012 "bison_parser.y" { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } -#line 4279 "bison_parser.cpp" +#line 4289 "bison_parser.cpp" break; - case 195: /* cast_expr: CAST '(' expr AS column_type ')' */ -#line 1013 "bison_parser.y" + case 198: /* cast_expr: CAST '(' expr AS column_type ')' */ +#line 1016 "bison_parser.y" { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } -#line 4285 "bison_parser.cpp" +#line 4295 "bison_parser.cpp" break; - case 196: /* datetime_field: SECOND */ -#line 1017 "bison_parser.y" + case 199: /* datetime_field: SECOND */ +#line 1020 "bison_parser.y" { (yyval.datetime_field) = kDatetimeSecond; } -#line 4291 "bison_parser.cpp" +#line 4301 "bison_parser.cpp" break; - case 197: /* datetime_field: MINUTE */ -#line 1018 "bison_parser.y" + case 200: /* datetime_field: MINUTE */ +#line 1021 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMinute; } -#line 4297 "bison_parser.cpp" +#line 4307 "bison_parser.cpp" break; - case 198: /* datetime_field: HOUR */ -#line 1019 "bison_parser.y" + case 201: /* datetime_field: HOUR */ +#line 1022 "bison_parser.y" { (yyval.datetime_field) = kDatetimeHour; } -#line 4303 "bison_parser.cpp" +#line 4313 "bison_parser.cpp" break; - case 199: /* datetime_field: DAY */ -#line 1020 "bison_parser.y" + case 202: /* datetime_field: DAY */ +#line 1023 "bison_parser.y" { (yyval.datetime_field) = kDatetimeDay; } -#line 4309 "bison_parser.cpp" +#line 4319 "bison_parser.cpp" break; - case 200: /* datetime_field: MONTH */ -#line 1021 "bison_parser.y" + case 203: /* datetime_field: MONTH */ +#line 1024 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMonth; } -#line 4315 "bison_parser.cpp" +#line 4325 "bison_parser.cpp" break; - case 201: /* datetime_field: YEAR */ -#line 1022 "bison_parser.y" + case 204: /* datetime_field: YEAR */ +#line 1025 "bison_parser.y" { (yyval.datetime_field) = kDatetimeYear; } -#line 4321 "bison_parser.cpp" +#line 4331 "bison_parser.cpp" break; - case 202: /* array_expr: ARRAY '[' expr_list ']' */ -#line 1026 "bison_parser.y" + case 205: /* array_expr: ARRAY '[' expr_list ']' */ +#line 1029 "bison_parser.y" { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 4327 "bison_parser.cpp" +#line 4337 "bison_parser.cpp" break; - case 203: /* array_index: operand '[' int_literal ']' */ -#line 1030 "bison_parser.y" + case 206: /* array_index: operand '[' int_literal ']' */ +#line 1033 "bison_parser.y" { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 4333 "bison_parser.cpp" +#line 4343 "bison_parser.cpp" break; - case 204: /* between_expr: operand BETWEEN operand AND operand */ -#line 1034 "bison_parser.y" + case 207: /* between_expr: operand BETWEEN operand AND operand */ +#line 1037 "bison_parser.y" { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4339 "bison_parser.cpp" +#line 4349 "bison_parser.cpp" break; - case 205: /* column_name: IDENTIFIER */ -#line 1038 "bison_parser.y" + case 208: /* column_name: IDENTIFIER */ +#line 1041 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 4345 "bison_parser.cpp" +#line 4355 "bison_parser.cpp" break; - case 206: /* column_name: IDENTIFIER '.' IDENTIFIER */ -#line 1039 "bison_parser.y" + case 209: /* column_name: IDENTIFIER '.' IDENTIFIER */ +#line 1042 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 4351 "bison_parser.cpp" +#line 4361 "bison_parser.cpp" break; - case 207: /* column_name: '*' */ -#line 1040 "bison_parser.y" + case 210: /* column_name: '*' */ +#line 1043 "bison_parser.y" { (yyval.expr) = Expr::makeStar(); } -#line 4357 "bison_parser.cpp" +#line 4367 "bison_parser.cpp" break; - case 208: /* column_name: IDENTIFIER '.' '*' */ -#line 1041 "bison_parser.y" + case 211: /* column_name: IDENTIFIER '.' '*' */ +#line 1044 "bison_parser.y" { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 4363 "bison_parser.cpp" +#line 4373 "bison_parser.cpp" break; - case 214: /* string_literal: STRING */ -#line 1053 "bison_parser.y" + case 217: /* string_literal: STRING */ +#line 1056 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 4369 "bison_parser.cpp" +#line 4379 "bison_parser.cpp" break; - case 215: /* bool_literal: TRUE */ -#line 1057 "bison_parser.y" + case 218: /* bool_literal: TRUE */ +#line 1060 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(true); } -#line 4375 "bison_parser.cpp" +#line 4385 "bison_parser.cpp" break; - case 216: /* bool_literal: FALSE */ -#line 1058 "bison_parser.y" + case 219: /* bool_literal: FALSE */ +#line 1061 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(false); } -#line 4381 "bison_parser.cpp" +#line 4391 "bison_parser.cpp" break; - case 217: /* num_literal: FLOATVAL */ -#line 1062 "bison_parser.y" + case 220: /* num_literal: FLOATVAL */ +#line 1065 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 4387 "bison_parser.cpp" +#line 4397 "bison_parser.cpp" break; - case 219: /* int_literal: INTVAL */ -#line 1067 "bison_parser.y" + case 222: /* int_literal: INTVAL */ +#line 1070 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 4393 "bison_parser.cpp" +#line 4403 "bison_parser.cpp" break; - case 220: /* null_literal: NULL */ -#line 1071 "bison_parser.y" + case 223: /* null_literal: NULL */ +#line 1074 "bison_parser.y" { (yyval.expr) = Expr::makeNullLiteral(); } -#line 4399 "bison_parser.cpp" +#line 4409 "bison_parser.cpp" break; - case 221: /* param_expr: '?' */ -#line 1075 "bison_parser.y" + case 224: /* param_expr: '?' */ +#line 1078 "bison_parser.y" { (yyval.expr) = Expr::makeParameter(yylloc.total_column); (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 4409 "bison_parser.cpp" +#line 4419 "bison_parser.cpp" break; - case 223: /* table_ref: table_ref_commalist ',' table_ref_atomic */ -#line 1088 "bison_parser.y" + case 226: /* table_ref: table_ref_commalist ',' table_ref_atomic */ +#line 1091 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); auto tbl = new TableRef(kTableCrossProduct); tbl->list = (yyvsp[-2].table_vec); (yyval.table) = tbl; } -#line 4420 "bison_parser.cpp" +#line 4430 "bison_parser.cpp" break; - case 227: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ -#line 1104 "bison_parser.y" + case 230: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ +#line 1107 "bison_parser.y" { auto tbl = new TableRef(kTableSelect); tbl->select = (yyvsp[-2].select_stmt); tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4431 "bison_parser.cpp" +#line 4441 "bison_parser.cpp" break; - case 228: /* table_ref_commalist: table_ref_atomic */ -#line 1113 "bison_parser.y" + case 231: /* table_ref_commalist: table_ref_atomic */ +#line 1116 "bison_parser.y" { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 4437 "bison_parser.cpp" +#line 4447 "bison_parser.cpp" break; - case 229: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ -#line 1114 "bison_parser.y" + case 232: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ +#line 1117 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 4443 "bison_parser.cpp" +#line 4453 "bison_parser.cpp" break; - case 230: /* table_ref_name: table_name opt_table_alias */ -#line 1119 "bison_parser.y" + case 233: /* table_ref_name: table_name opt_table_alias */ +#line 1122 "bison_parser.y" { auto tbl = new TableRef(kTableName); tbl->schema = (yyvsp[-1].table_name).schema; @@ -4451,121 +4461,121 @@ YYLTYPE yylloc = yyloc_default; tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4455 "bison_parser.cpp" +#line 4465 "bison_parser.cpp" break; - case 231: /* table_ref_name_no_alias: table_name */ -#line 1130 "bison_parser.y" + case 234: /* table_ref_name_no_alias: table_name */ +#line 1133 "bison_parser.y" { (yyval.table) = new TableRef(kTableName); (yyval.table)->schema = (yyvsp[0].table_name).schema; (yyval.table)->name = (yyvsp[0].table_name).name; } -#line 4465 "bison_parser.cpp" +#line 4475 "bison_parser.cpp" break; - case 232: /* table_name: IDENTIFIER */ -#line 1139 "bison_parser.y" + case 235: /* table_name: IDENTIFIER */ +#line 1142 "bison_parser.y" { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} -#line 4471 "bison_parser.cpp" +#line 4481 "bison_parser.cpp" break; - case 233: /* table_name: IDENTIFIER '.' IDENTIFIER */ -#line 1140 "bison_parser.y" + case 236: /* table_name: IDENTIFIER '.' IDENTIFIER */ +#line 1143 "bison_parser.y" { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } -#line 4477 "bison_parser.cpp" +#line 4487 "bison_parser.cpp" break; - case 234: /* opt_index_name: IDENTIFIER */ -#line 1144 "bison_parser.y" + case 237: /* opt_index_name: IDENTIFIER */ +#line 1147 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4483 "bison_parser.cpp" +#line 4493 "bison_parser.cpp" break; - case 235: /* opt_index_name: %empty */ -#line 1145 "bison_parser.y" + case 238: /* opt_index_name: %empty */ +#line 1148 "bison_parser.y" { (yyval.sval) = nullptr;} -#line 4489 "bison_parser.cpp" +#line 4499 "bison_parser.cpp" break; - case 236: /* index_name: IDENTIFIER */ -#line 1149 "bison_parser.y" + case 239: /* index_name: IDENTIFIER */ +#line 1152 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4495 "bison_parser.cpp" +#line 4505 "bison_parser.cpp" break; - case 238: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ -#line 1155 "bison_parser.y" + case 241: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ +#line 1158 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } -#line 4501 "bison_parser.cpp" +#line 4511 "bison_parser.cpp" break; - case 240: /* opt_table_alias: %empty */ -#line 1161 "bison_parser.y" + case 243: /* opt_table_alias: %empty */ +#line 1164 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4507 "bison_parser.cpp" +#line 4517 "bison_parser.cpp" break; - case 241: /* alias: AS IDENTIFIER */ -#line 1166 "bison_parser.y" + case 244: /* alias: AS IDENTIFIER */ +#line 1169 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4513 "bison_parser.cpp" +#line 4523 "bison_parser.cpp" break; - case 242: /* alias: IDENTIFIER */ -#line 1167 "bison_parser.y" + case 245: /* alias: IDENTIFIER */ +#line 1170 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4519 "bison_parser.cpp" +#line 4529 "bison_parser.cpp" break; - case 244: /* opt_alias: %empty */ -#line 1173 "bison_parser.y" + case 247: /* opt_alias: %empty */ +#line 1176 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4525 "bison_parser.cpp" +#line 4535 "bison_parser.cpp" break; - case 246: /* opt_with_clause: %empty */ -#line 1183 "bison_parser.y" + case 249: /* opt_with_clause: %empty */ +#line 1186 "bison_parser.y" { (yyval.with_description_vec) = nullptr; } -#line 4531 "bison_parser.cpp" +#line 4541 "bison_parser.cpp" break; - case 247: /* with_clause: WITH with_description_list */ -#line 1187 "bison_parser.y" + case 250: /* with_clause: WITH with_description_list */ +#line 1190 "bison_parser.y" { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } -#line 4537 "bison_parser.cpp" +#line 4547 "bison_parser.cpp" break; - case 248: /* with_description_list: with_description */ -#line 1191 "bison_parser.y" + case 251: /* with_description_list: with_description */ +#line 1194 "bison_parser.y" { (yyval.with_description_vec) = new std::vector(); (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); } -#line 4546 "bison_parser.cpp" +#line 4556 "bison_parser.cpp" break; - case 249: /* with_description_list: with_description_list ',' with_description */ -#line 1195 "bison_parser.y" + case 252: /* with_description_list: with_description_list ',' with_description */ +#line 1198 "bison_parser.y" { (yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t)); (yyval.with_description_vec) = (yyvsp[-2].with_description_vec); } -#line 4555 "bison_parser.cpp" +#line 4565 "bison_parser.cpp" break; - case 250: /* with_description: IDENTIFIER AS select_with_paren */ -#line 1202 "bison_parser.y" + case 253: /* with_description: IDENTIFIER AS select_with_paren */ +#line 1205 "bison_parser.y" { (yyval.with_description_t) = new WithDescription(); (yyval.with_description_t)->alias = (yyvsp[-2].sval); (yyval.with_description_t)->select = (yyvsp[0].select_stmt); } -#line 4565 "bison_parser.cpp" +#line 4575 "bison_parser.cpp" break; - case 251: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ -#line 1216 "bison_parser.y" + case 254: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ +#line 1219 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4573,11 +4583,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 4577 "bison_parser.cpp" +#line 4587 "bison_parser.cpp" break; - case 252: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ -#line 1224 "bison_parser.y" + case 255: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ +#line 1227 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4586,11 +4596,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 4590 "bison_parser.cpp" +#line 4600 "bison_parser.cpp" break; - case 253: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ -#line 1234 "bison_parser.y" + case 256: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ +#line 1237 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4606,83 +4616,83 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } -#line 4610 "bison_parser.cpp" +#line 4620 "bison_parser.cpp" break; - case 254: /* opt_join_type: INNER */ -#line 1252 "bison_parser.y" + case 257: /* opt_join_type: INNER */ +#line 1255 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4616 "bison_parser.cpp" +#line 4626 "bison_parser.cpp" break; - case 255: /* opt_join_type: LEFT OUTER */ -#line 1253 "bison_parser.y" + case 258: /* opt_join_type: LEFT OUTER */ +#line 1256 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4622 "bison_parser.cpp" +#line 4632 "bison_parser.cpp" break; - case 256: /* opt_join_type: LEFT */ -#line 1254 "bison_parser.y" + case 259: /* opt_join_type: LEFT */ +#line 1257 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4628 "bison_parser.cpp" +#line 4638 "bison_parser.cpp" break; - case 257: /* opt_join_type: RIGHT OUTER */ -#line 1255 "bison_parser.y" + case 260: /* opt_join_type: RIGHT OUTER */ +#line 1258 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4634 "bison_parser.cpp" +#line 4644 "bison_parser.cpp" break; - case 258: /* opt_join_type: RIGHT */ -#line 1256 "bison_parser.y" + case 261: /* opt_join_type: RIGHT */ +#line 1259 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4640 "bison_parser.cpp" +#line 4650 "bison_parser.cpp" break; - case 259: /* opt_join_type: FULL OUTER */ -#line 1257 "bison_parser.y" + case 262: /* opt_join_type: FULL OUTER */ +#line 1260 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4646 "bison_parser.cpp" +#line 4656 "bison_parser.cpp" break; - case 260: /* opt_join_type: OUTER */ -#line 1258 "bison_parser.y" + case 263: /* opt_join_type: OUTER */ +#line 1261 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4652 "bison_parser.cpp" +#line 4662 "bison_parser.cpp" break; - case 261: /* opt_join_type: FULL */ -#line 1259 "bison_parser.y" + case 264: /* opt_join_type: FULL */ +#line 1262 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4658 "bison_parser.cpp" +#line 4668 "bison_parser.cpp" break; - case 262: /* opt_join_type: CROSS */ -#line 1260 "bison_parser.y" + case 265: /* opt_join_type: CROSS */ +#line 1263 "bison_parser.y" { (yyval.uval) = kJoinCross; } -#line 4664 "bison_parser.cpp" +#line 4674 "bison_parser.cpp" break; - case 263: /* opt_join_type: %empty */ -#line 1261 "bison_parser.y" + case 266: /* opt_join_type: %empty */ +#line 1264 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4670 "bison_parser.cpp" +#line 4680 "bison_parser.cpp" break; - case 267: /* ident_commalist: IDENTIFIER */ -#line 1281 "bison_parser.y" + case 270: /* ident_commalist: IDENTIFIER */ +#line 1284 "bison_parser.y" { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 4676 "bison_parser.cpp" +#line 4686 "bison_parser.cpp" break; - case 268: /* ident_commalist: ident_commalist ',' IDENTIFIER */ -#line 1282 "bison_parser.y" + case 271: /* ident_commalist: ident_commalist ',' IDENTIFIER */ +#line 1285 "bison_parser.y" { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 4682 "bison_parser.cpp" +#line 4692 "bison_parser.cpp" break; -#line 4686 "bison_parser.cpp" +#line 4696 "bison_parser.cpp" default: break; } @@ -4912,7 +4922,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 1285 "bison_parser.y" +#line 1288 "bison_parser.y" /********************************* ** Section 4: Additional C code diff --git a/src/parser/bison_parser.h b/src/parser/bison_parser.h index 20d022ee..73ced33a 100644 --- a/src/parser/bison_parser.h +++ b/src/parser/bison_parser.h @@ -116,129 +116,131 @@ extern int hsql_debug; SQL_SCHEMAS = 283, /* SCHEMAS */ SQL_CHARACTER = 284, /* CHARACTER */ SQL_VARYING = 285, /* VARYING */ - SQL_SPATIAL = 286, /* SPATIAL */ - SQL_VARCHAR = 287, /* VARCHAR */ - SQL_VIRTUAL = 288, /* VIRTUAL */ - SQL_DESCRIBE = 289, /* DESCRIBE */ - SQL_BEFORE = 290, /* BEFORE */ - SQL_COLUMN = 291, /* COLUMN */ - SQL_CREATE = 292, /* CREATE */ - SQL_DELETE = 293, /* DELETE */ - SQL_DIRECT = 294, /* DIRECT */ - SQL_DOUBLE = 295, /* DOUBLE */ - SQL_ESCAPE = 296, /* ESCAPE */ - SQL_EXCEPT = 297, /* EXCEPT */ - SQL_EXISTS = 298, /* EXISTS */ - SQL_EXTRACT = 299, /* EXTRACT */ - SQL_CAST = 300, /* CAST */ - SQL_FORMAT = 301, /* FORMAT */ - SQL_GLOBAL = 302, /* GLOBAL */ - SQL_HAVING = 303, /* HAVING */ - SQL_IMPORT = 304, /* IMPORT */ - SQL_INSERT = 305, /* INSERT */ - SQL_ISNULL = 306, /* ISNULL */ - SQL_OFFSET = 307, /* OFFSET */ - SQL_RENAME = 308, /* RENAME */ - SQL_SCHEMA = 309, /* SCHEMA */ - SQL_SELECT = 310, /* SELECT */ - SQL_SORTED = 311, /* SORTED */ - SQL_TABLES = 312, /* TABLES */ - SQL_UNIQUE = 313, /* UNIQUE */ - SQL_UNLOAD = 314, /* UNLOAD */ - SQL_UPDATE = 315, /* UPDATE */ - SQL_VALUES = 316, /* VALUES */ - SQL_AFTER = 317, /* AFTER */ - SQL_ALTER = 318, /* ALTER */ - SQL_CROSS = 319, /* CROSS */ - SQL_DELTA = 320, /* DELTA */ - SQL_FLOAT = 321, /* FLOAT */ - SQL_GROUP = 322, /* GROUP */ - SQL_INDEX = 323, /* INDEX */ - SQL_INNER = 324, /* INNER */ - SQL_LIMIT = 325, /* LIMIT */ - SQL_LOCAL = 326, /* LOCAL */ - SQL_MERGE = 327, /* MERGE */ - SQL_MINUS = 328, /* MINUS */ - SQL_ORDER = 329, /* ORDER */ - SQL_OUTER = 330, /* OUTER */ - SQL_RIGHT = 331, /* RIGHT */ - SQL_TABLE = 332, /* TABLE */ - SQL_UNION = 333, /* UNION */ - SQL_USING = 334, /* USING */ - SQL_WHERE = 335, /* WHERE */ - SQL_CALL = 336, /* CALL */ - SQL_CASE = 337, /* CASE */ - SQL_CHAR = 338, /* CHAR */ - SQL_COPY = 339, /* COPY */ - SQL_DATE = 340, /* DATE */ - SQL_DATETIME = 341, /* DATETIME */ - SQL_DESC = 342, /* DESC */ - SQL_DROP = 343, /* DROP */ - SQL_ELSE = 344, /* ELSE */ - SQL_FILE = 345, /* FILE */ - SQL_FROM = 346, /* FROM */ - SQL_FULL = 347, /* FULL */ - SQL_HASH = 348, /* HASH */ - SQL_HINT = 349, /* HINT */ - SQL_INTO = 350, /* INTO */ - SQL_JOIN = 351, /* JOIN */ - SQL_LEFT = 352, /* LEFT */ - SQL_LIKE = 353, /* LIKE */ - SQL_LOAD = 354, /* LOAD */ - SQL_LONG = 355, /* LONG */ - SQL_NULL = 356, /* NULL */ - SQL_PLAN = 357, /* PLAN */ - SQL_SHOW = 358, /* SHOW */ - SQL_TEXT = 359, /* TEXT */ - SQL_THEN = 360, /* THEN */ - SQL_TIME = 361, /* TIME */ - SQL_VIEW = 362, /* VIEW */ - SQL_WHEN = 363, /* WHEN */ - SQL_WITH = 364, /* WITH */ - SQL_ADD = 365, /* ADD */ - SQL_ALL = 366, /* ALL */ - SQL_AND = 367, /* AND */ - SQL_ASC = 368, /* ASC */ - SQL_END = 369, /* END */ - SQL_FOR = 370, /* FOR */ - SQL_INT = 371, /* INT */ - SQL_KEY = 372, /* KEY */ - SQL_NOT = 373, /* NOT */ - SQL_OFF = 374, /* OFF */ - SQL_SET = 375, /* SET */ - SQL_TOP = 376, /* TOP */ - SQL_AS = 377, /* AS */ - SQL_BY = 378, /* BY */ - SQL_IF = 379, /* IF */ - SQL_IN = 380, /* IN */ - SQL_IS = 381, /* IS */ - SQL_OF = 382, /* OF */ - SQL_ON = 383, /* ON */ - SQL_OR = 384, /* OR */ - SQL_TO = 385, /* TO */ - SQL_ARRAY = 386, /* ARRAY */ - SQL_CONCAT = 387, /* CONCAT */ - SQL_ILIKE = 388, /* ILIKE */ - SQL_SECOND = 389, /* SECOND */ - SQL_MINUTE = 390, /* MINUTE */ - SQL_HOUR = 391, /* HOUR */ - SQL_DAY = 392, /* DAY */ - SQL_MONTH = 393, /* MONTH */ - SQL_YEAR = 394, /* YEAR */ - SQL_TRUE = 395, /* TRUE */ - SQL_FALSE = 396, /* FALSE */ - SQL_TRANSACTION = 397, /* TRANSACTION */ - SQL_BEGIN = 398, /* BEGIN */ - SQL_COMMIT = 399, /* COMMIT */ - SQL_ROLLBACK = 400, /* ROLLBACK */ - SQL_EQUALS = 401, /* EQUALS */ - SQL_NOTEQUALS = 402, /* NOTEQUALS */ - SQL_LESS = 403, /* LESS */ - SQL_GREATER = 404, /* GREATER */ - SQL_LESSEQ = 405, /* LESSEQ */ - SQL_GREATEREQ = 406, /* GREATEREQ */ - SQL_NOTNULL = 407, /* NOTNULL */ - SQL_UMINUS = 408 /* UMINUS */ + SQL_REAL = 286, /* REAL */ + SQL_DECIMAL = 287, /* DECIMAL */ + SQL_SPATIAL = 288, /* SPATIAL */ + SQL_VARCHAR = 289, /* VARCHAR */ + SQL_VIRTUAL = 290, /* VIRTUAL */ + SQL_DESCRIBE = 291, /* DESCRIBE */ + SQL_BEFORE = 292, /* BEFORE */ + SQL_COLUMN = 293, /* COLUMN */ + SQL_CREATE = 294, /* CREATE */ + SQL_DELETE = 295, /* DELETE */ + SQL_DIRECT = 296, /* DIRECT */ + SQL_DOUBLE = 297, /* DOUBLE */ + SQL_ESCAPE = 298, /* ESCAPE */ + SQL_EXCEPT = 299, /* EXCEPT */ + SQL_EXISTS = 300, /* EXISTS */ + SQL_EXTRACT = 301, /* EXTRACT */ + SQL_CAST = 302, /* CAST */ + SQL_FORMAT = 303, /* FORMAT */ + SQL_GLOBAL = 304, /* GLOBAL */ + SQL_HAVING = 305, /* HAVING */ + SQL_IMPORT = 306, /* IMPORT */ + SQL_INSERT = 307, /* INSERT */ + SQL_ISNULL = 308, /* ISNULL */ + SQL_OFFSET = 309, /* OFFSET */ + SQL_RENAME = 310, /* RENAME */ + SQL_SCHEMA = 311, /* SCHEMA */ + SQL_SELECT = 312, /* SELECT */ + SQL_SORTED = 313, /* SORTED */ + SQL_TABLES = 314, /* TABLES */ + SQL_UNIQUE = 315, /* UNIQUE */ + SQL_UNLOAD = 316, /* UNLOAD */ + SQL_UPDATE = 317, /* UPDATE */ + SQL_VALUES = 318, /* VALUES */ + SQL_AFTER = 319, /* AFTER */ + SQL_ALTER = 320, /* ALTER */ + SQL_CROSS = 321, /* CROSS */ + SQL_DELTA = 322, /* DELTA */ + SQL_FLOAT = 323, /* FLOAT */ + SQL_GROUP = 324, /* GROUP */ + SQL_INDEX = 325, /* INDEX */ + SQL_INNER = 326, /* INNER */ + SQL_LIMIT = 327, /* LIMIT */ + SQL_LOCAL = 328, /* LOCAL */ + SQL_MERGE = 329, /* MERGE */ + SQL_MINUS = 330, /* MINUS */ + SQL_ORDER = 331, /* ORDER */ + SQL_OUTER = 332, /* OUTER */ + SQL_RIGHT = 333, /* RIGHT */ + SQL_TABLE = 334, /* TABLE */ + SQL_UNION = 335, /* UNION */ + SQL_USING = 336, /* USING */ + SQL_WHERE = 337, /* WHERE */ + SQL_CALL = 338, /* CALL */ + SQL_CASE = 339, /* CASE */ + SQL_CHAR = 340, /* CHAR */ + SQL_COPY = 341, /* COPY */ + SQL_DATE = 342, /* DATE */ + SQL_DATETIME = 343, /* DATETIME */ + SQL_DESC = 344, /* DESC */ + SQL_DROP = 345, /* DROP */ + SQL_ELSE = 346, /* ELSE */ + SQL_FILE = 347, /* FILE */ + SQL_FROM = 348, /* FROM */ + SQL_FULL = 349, /* FULL */ + SQL_HASH = 350, /* HASH */ + SQL_HINT = 351, /* HINT */ + SQL_INTO = 352, /* INTO */ + SQL_JOIN = 353, /* JOIN */ + SQL_LEFT = 354, /* LEFT */ + SQL_LIKE = 355, /* LIKE */ + SQL_LOAD = 356, /* LOAD */ + SQL_LONG = 357, /* LONG */ + SQL_NULL = 358, /* NULL */ + SQL_PLAN = 359, /* PLAN */ + SQL_SHOW = 360, /* SHOW */ + SQL_TEXT = 361, /* TEXT */ + SQL_THEN = 362, /* THEN */ + SQL_TIME = 363, /* TIME */ + SQL_VIEW = 364, /* VIEW */ + SQL_WHEN = 365, /* WHEN */ + SQL_WITH = 366, /* WITH */ + SQL_ADD = 367, /* ADD */ + SQL_ALL = 368, /* ALL */ + SQL_AND = 369, /* AND */ + SQL_ASC = 370, /* ASC */ + SQL_END = 371, /* END */ + SQL_FOR = 372, /* FOR */ + SQL_INT = 373, /* INT */ + SQL_KEY = 374, /* KEY */ + SQL_NOT = 375, /* NOT */ + SQL_OFF = 376, /* OFF */ + SQL_SET = 377, /* SET */ + SQL_TOP = 378, /* TOP */ + SQL_AS = 379, /* AS */ + SQL_BY = 380, /* BY */ + SQL_IF = 381, /* IF */ + SQL_IN = 382, /* IN */ + SQL_IS = 383, /* IS */ + SQL_OF = 384, /* OF */ + SQL_ON = 385, /* ON */ + SQL_OR = 386, /* OR */ + SQL_TO = 387, /* TO */ + SQL_ARRAY = 388, /* ARRAY */ + SQL_CONCAT = 389, /* CONCAT */ + SQL_ILIKE = 390, /* ILIKE */ + SQL_SECOND = 391, /* SECOND */ + SQL_MINUTE = 392, /* MINUTE */ + SQL_HOUR = 393, /* HOUR */ + SQL_DAY = 394, /* DAY */ + SQL_MONTH = 395, /* MONTH */ + SQL_YEAR = 396, /* YEAR */ + SQL_TRUE = 397, /* TRUE */ + SQL_FALSE = 398, /* FALSE */ + SQL_TRANSACTION = 399, /* TRANSACTION */ + SQL_BEGIN = 400, /* BEGIN */ + SQL_COMMIT = 401, /* COMMIT */ + SQL_ROLLBACK = 402, /* ROLLBACK */ + SQL_EQUALS = 403, /* EQUALS */ + SQL_NOTEQUALS = 404, /* NOTEQUALS */ + SQL_LESS = 405, /* LESS */ + SQL_GREATER = 406, /* GREATER */ + SQL_LESSEQ = 407, /* LESSEQ */ + SQL_GREATEREQ = 408, /* GREATEREQ */ + SQL_NOTNULL = 409, /* NOTNULL */ + SQL_UMINUS = 410 /* UMINUS */ }; typedef enum hsql_tokentype hsql_token_kind_t; #endif @@ -295,7 +297,7 @@ union HSQL_STYPE std::vector* order_vec; std::vector* with_description_vec; -#line 299 "bison_parser.h" +#line 301 "bison_parser.h" }; typedef union HSQL_STYPE HSQL_STYPE; diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 5d65acf2..66714211 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -169,7 +169,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha %token DEALLOCATE PARAMETERS INTERSECT TEMPORARY TIMESTAMP %token DISTINCT NVARCHAR RESTRICT TRUNCATE ANALYZE BETWEEN %token CASCADE COLUMNS CONTROL DEFAULT EXECUTE EXPLAIN -%token INTEGER NATURAL PREPARE PRIMARY SCHEMAS CHARACTER VARYING +%token INTEGER NATURAL PREPARE PRIMARY SCHEMAS CHARACTER VARYING REAL DECIMAL %token SPATIAL VARCHAR VIRTUAL DESCRIBE BEFORE COLUMN CREATE DELETE DIRECT %token DOUBLE ESCAPE EXCEPT EXISTS EXTRACT CAST FORMAT GLOBAL HAVING IMPORT %token INSERT ISNULL OFFSET RENAME SCHEMA SELECT SORTED @@ -566,11 +566,14 @@ column_type: | INTEGER { $$ = ColumnType{DataType::INT}; } | LONG { $$ = ColumnType{DataType::LONG}; } | FLOAT { $$ = ColumnType{DataType::FLOAT}; } + | DECIMAL '(' INTVAL ',' INTVAL ')' { $$ = ColumnType{DataType::FLOAT}; } | DOUBLE { $$ = ColumnType{DataType::DOUBLE}; } + | REAL { $$ = ColumnType{DataType::FLOAT}; } | VARCHAR '(' INTVAL ')' { $$ = ColumnType{DataType::VARCHAR, $3}; } | CHARACTER VARYING'(' INTVAL ')' { $$ = ColumnType{DataType::VARCHAR, $4}; } | CHAR '(' INTVAL ')' { $$ = ColumnType{DataType::CHAR, $3}; } | TEXT { $$ = ColumnType{DataType::TEXT}; } + | TIME { $$ = ColumnType{DataType::TIME}; } | DATETIME { $$ = ColumnType{DataType::DATETIME}; } | DATE { $$ = ColumnType{DataType::DATE}; } ; diff --git a/src/parser/flex_lexer.cpp b/src/parser/flex_lexer.cpp index deb1689b..47fd636a 100644 --- a/src/parser/flex_lexer.cpp +++ b/src/parser/flex_lexer.cpp @@ -573,8 +573,8 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 161 -#define YY_END_OF_BUFFER 162 +#define YY_NUM_RULES 164 +#define YY_END_OF_BUFFER 165 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -582,27 +582,27 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[1138] = +static const flex_int16_t yy_accept[1152] = { 0, - 0, 0, 158, 158, 2, 2, 162, 160, 4, 4, - 160, 160, 149, 156, 149, 149, 153, 149, 149, 149, - 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, - 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, - 155, 155, 155, 155, 149, 158, 159, 2, 2, 3, + 0, 0, 161, 161, 2, 2, 165, 163, 4, 4, + 163, 163, 152, 159, 152, 152, 156, 152, 152, 152, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 152, 161, 162, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 4, 144, 0, 1, 0, - 151, 150, 153, 146, 145, 143, 147, 155, 155, 155, - - 155, 155, 155, 122, 155, 123, 155, 155, 155, 155, - 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, - 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, - 124, 155, 155, 125, 126, 155, 155, 155, 155, 155, - 155, 155, 155, 155, 155, 155, 155, 127, 128, 129, - 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, - 155, 155, 155, 155, 155, 155, 130, 155, 155, 155, - 155, 155, 155, 155, 155, 155, 148, 158, 157, 2, + 2, 2, 2, 2, 2, 4, 147, 0, 1, 0, + 154, 153, 156, 149, 148, 146, 150, 158, 158, 158, + + 158, 158, 158, 125, 158, 126, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 127, 158, 158, 128, 129, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 130, 131, 132, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 133, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 151, 161, 160, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -613,19 +613,19 @@ static const flex_int16_t yy_accept[1138] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 154, 0, 150, 110, 155, 111, 155, 155, - 112, 155, 113, 155, 155, 155, 155, 155, 155, 155, - 155, 155, 155, 155, 155, 155, 134, 155, 155, 155, - - 155, 155, 155, 155, 155, 155, 114, 155, 155, 155, - 155, 155, 155, 155, 155, 155, 115, 155, 155, 155, - 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, - 116, 155, 155, 117, 155, 155, 155, 155, 155, 155, - 155, 155, 155, 155, 118, 155, 155, 119, 155, 155, - 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, - 155, 120, 155, 155, 155, 155, 155, 155, 155, 155, - 121, 155, 155, 155, 155, 155, 155, 155, 155, 155, - 155, 155, 155, 155, 2, 2, 2, 2, 2, 2, + 2, 2, 157, 0, 153, 113, 158, 114, 158, 158, + 115, 158, 116, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 137, 158, 158, 158, + + 158, 158, 158, 158, 158, 158, 158, 117, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 118, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 119, 158, 158, 120, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 121, 158, 158, 122, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 123, 158, 158, 158, 158, 158, 158, + 158, 158, 124, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -637,21 +637,20 @@ static const flex_int16_t yy_accept[1138] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 0, 155, 155, 155, - - 155, 155, 155, 155, 80, 155, 81, 43, 82, 155, - 155, 155, 83, 155, 155, 84, 155, 155, 155, 155, - 86, 155, 155, 155, 87, 88, 155, 155, 155, 155, - 155, 155, 155, 89, 155, 155, 90, 91, 155, 155, - 92, 155, 93, 133, 155, 155, 155, 155, 155, 155, - 94, 155, 95, 96, 97, 155, 99, 155, 100, 155, - 155, 155, 155, 101, 155, 155, 155, 155, 155, 102, - 155, 155, 155, 155, 155, 155, 155, 155, 155, 103, - 155, 155, 155, 155, 104, 105, 106, 155, 137, 155, - 155, 155, 155, 155, 155, 155, 155, 155, 107, 155, - - 108, 155, 109, 136, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + + 0, 158, 158, 158, 158, 158, 158, 158, 83, 158, + 84, 46, 85, 158, 158, 158, 86, 158, 158, 87, + 158, 158, 158, 158, 158, 89, 158, 158, 158, 90, + 91, 158, 158, 158, 158, 158, 158, 158, 92, 158, + 158, 93, 94, 158, 158, 95, 158, 96, 136, 158, + 158, 158, 158, 158, 158, 97, 158, 98, 99, 100, + 158, 102, 158, 103, 158, 158, 158, 158, 104, 158, + 158, 158, 158, 158, 105, 158, 158, 34, 158, 158, + 158, 158, 158, 158, 158, 106, 158, 158, 158, 158, + 107, 108, 32, 158, 140, 158, 158, 158, 158, 158, + + 158, 158, 158, 158, 110, 158, 111, 158, 112, 139, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -660,55 +659,58 @@ static const flex_int16_t yy_accept[1138] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 0, 60, 61, 155, 62, 155, 140, 155, - 155, 155, 155, 155, 155, 155, 63, 155, 155, 155, - 155, 64, 155, 155, 155, 155, 155, 155, 155, 155, - 155, 155, 138, 65, 155, 155, 66, 155, 98, 155, - 67, 68, 155, 155, 155, 155, 69, 70, 71, 72, - 155, 135, 155, 155, 155, 73, 74, 155, 155, 155, - 155, 155, 75, 155, 155, 155, 155, 155, 155, 76, - 155, 155, 155, 155, 77, 155, 155, 155, 78, 155, - 155, 155, 155, 79, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 0, 63, 64, 158, 65, 158, 143, 158, 158, 158, + 158, 158, 158, 158, 66, 158, 158, 158, 158, 158, + 67, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 141, 68, 158, 158, 69, 158, 101, 158, 70, + 71, 158, 158, 158, 158, 72, 73, 74, 75, 158, + 138, 158, 158, 158, 76, 77, 158, 158, 158, 158, + 158, 78, 158, 158, 158, 158, 158, 158, 79, 158, + 158, 158, 158, 80, 158, 158, 158, 81, 158, 158, + + 158, 158, 82, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 0, 155, 33, 155, - 155, 155, 34, 142, 155, 35, 155, 155, 155, 36, - 155, 37, 155, 38, 39, 40, 155, 41, 155, 155, - - 44, 45, 46, 47, 48, 155, 155, 49, 132, 155, - 155, 50, 155, 155, 155, 51, 155, 155, 52, 131, - 53, 54, 155, 55, 155, 155, 155, 155, 56, 57, - 58, 59, 155, 155, 155, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 0, 158, 36, 158, + 158, 158, 37, 145, 158, 38, 158, 158, 158, 158, + + 39, 158, 40, 158, 41, 42, 43, 158, 44, 158, + 158, 47, 48, 49, 50, 51, 158, 158, 52, 135, + 158, 158, 53, 158, 158, 158, 54, 158, 158, 55, + 134, 56, 57, 158, 58, 158, 158, 158, 158, 59, + 60, 61, 62, 158, 158, 158, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 0, 15, 16, 17, 155, 18, - 19, 155, 155, 20, 155, 155, 21, 22, 42, 23, - 155, 24, 155, 155, 25, 26, 155, 155, 27, 28, - 155, 155, 155, 155, 29, 31, 32, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 0, 15, 16, 17, + 158, 18, 19, 158, 158, 33, 20, 158, 158, 21, + 22, 45, 23, 158, 24, 158, 158, 25, 26, 158, + 158, 27, 28, 158, 158, 158, 158, 29, 31, 35, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 0, 155, 85, 155, 10, 11, 155, 12, 155, 13, - 141, 155, 155, 155, 14, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 0, 158, 88, 158, 10, 11, + 158, 12, 158, 13, 144, 158, 158, 158, 14, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 0, 30, 155, 7, 155, 8, 9, 155, 2, 2, - 2, 2, 2, 2, 2, 2, 0, 5, 6, 155, - 2, 2, 2, 2, 0, 139, 2, 2, 0, 2, - 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, - 0, 2, 0, 2, 152, 2, 0 + 2, 2, 2, 2, 0, 30, 158, 7, 158, 8, + 9, 158, 2, 2, 2, 2, 2, 2, 2, 2, + 0, 5, 6, 158, 2, 2, 2, 2, 0, 142, + 2, 2, 0, 2, 0, 2, 0, 2, 0, 2, + 0, 2, 0, 2, 0, 2, 0, 2, 155, 2, + 0 } ; static const YY_CHAR yy_ec[256] = @@ -755,159 +757,160 @@ static const YY_CHAR yy_meta[77] = 5, 5, 5, 5, 5, 1 } ; -static const flex_int16_t yy_base[1145] = +static const flex_int16_t yy_base[1159] = { 0, - 0, 0, 709, 681, 76, 0, 668, 4550, 151, 153, - 643, 0, 4550, 4550, 149, 148, 160, 159, 625, 619, + 0, 0, 720, 709, 76, 0, 688, 4601, 151, 153, + 647, 0, 4601, 4601, 149, 148, 160, 159, 643, 625, 156, 156, 164, 162, 172, 223, 198, 211, 215, 151, 168, 210, 255, 257, 263, 262, 0, 277, 307, 350, - 284, 221, 258, 171, 540, 0, 600, 0, 295, 308, - 561, 576, 0, 0, 331, 408, 419, 321, 542, 512, + 284, 221, 258, 171, 564, 0, 609, 0, 295, 308, + 586, 576, 0, 0, 331, 408, 419, 321, 542, 512, 438, 514, 568, 620, 668, 720, 328, 426, 768, 329, 311, 434, 500, 820, 868, 505, 421, 513, 918, 970, - 515, 570, 455, 423, 450, 351, 4550, 520, 4550, 512, - 1035, 1045, 1056, 4550, 4550, 4550, 4550, 0, 174, 282, + 515, 570, 455, 423, 450, 351, 4601, 520, 4601, 512, + 1035, 1045, 1056, 4601, 4601, 4601, 4601, 0, 174, 282, 336, 520, 296, 315, 557, 0, 345, 334, 568, 511, - 327, 611, 569, 345, 419, 421, 441, 444, 631, 469, - 515, 520, 552, 557, 562, 563, 574, 609, 578, 605, - 0, 618, 616, 665, 619, 628, 616, 637, 664, 685, - 631, 657, 667, 663, 669, 678, 690, 689, 0, 693, - 681, 685, 722, 722, 720, 726, 724, 729, 737, 727, - 725, 743, 749, 762, 772, 766, 767, 784, 779, 785, - 781, 785, 818, 787, 775, 798, 4550, 0, 4550, 0, + 327, 611, 570, 345, 419, 421, 441, 444, 631, 469, + 515, 520, 542, 555, 560, 559, 563, 609, 578, 605, + 0, 618, 616, 665, 619, 628, 618, 643, 664, 685, + 650, 657, 667, 663, 669, 678, 690, 691, 0, 697, + 683, 704, 722, 722, 750, 726, 722, 728, 764, 724, + 725, 743, 773, 764, 774, 770, 769, 796, 777, 788, + 786, 787, 818, 822, 808, 828, 4601, 0, 4601, 0, 389, 0, 512, 0, 499, 1066, 1076, 1087, 0, 0, - 0, 0, 806, 824, 855, 859, 913, 860, 878, 922, - - 872, 961, 962, 1080, 957, 1081, 1133, 1084, 1083, 1085, - 1121, 1137, 1119, 1187, 952, 1145, 1149, 1170, 1189, 1181, - 1193, 1211, 1227, 1223, 1219, 1222, 1233, 1245, 1294, 1275, - 1285, 1277, 1290, 1307, 1347, 1306, 1339, 1349, 1362, 1364, - 1361, 1397, 1398, 1360, 1401, 1414, 1392, 1435, 1433, 1443, - 1447, 1465, 1451, 1468, 1403, 1487, 1501, 1489, 1503, 1505, - 1531, 1506, 1541, 1555, 1520, 1556, 1572, 1577, 1554, 1580, - 1598, 0, 4550, 498, 1645, 0, 822, 0, 829, 827, - 0, 839, 0, 828, 879, 872, 907, 1640, 907, 910, - 919, 929, 956, 982, 973, 1082, 0, 1079, 1097, 1323, - - 1152, 1151, 1140, 1176, 1213, 1252, 0, 1259, 1261, 1275, - 1284, 1294, 1331, 1337, 1363, 1419, 1438, 1461, 1470, 1494, - 1492, 1539, 1539, 1578, 1583, 1608, 1605, 1616, 1626, 1639, - 1644, 1630, 1638, 0, 1633, 1649, 1646, 1652, 1656, 1654, - 1655, 1642, 1644, 1644, 0, 1654, 1649, 1649, 1664, 1668, - 1673, 1661, 1661, 1672, 1696, 1678, 1691, 1691, 1700, 1691, - 1702, 0, 1685, 1689, 1690, 1699, 1697, 1694, 1701, 1711, - 0, 1703, 1713, 1704, 1705, 1721, 1709, 1707, 1726, 1708, - 1719, 1739, 1744, 1741, 0, 495, 1779, 1756, 1757, 1758, - 1760, 1782, 1772, 1790, 1788, 1791, 1794, 1806, 1820, 1844, - - 1823, 1845, 1848, 1858, 1857, 1893, 1860, 1876, 1879, 1890, - 1898, 1912, 1911, 1902, 1915, 1944, 1950, 1928, 1933, 1956, - 1946, 1965, 1967, 1982, 1986, 1984, 1995, 2000, 2010, 2024, - 2021, 2038, 2034, 2036, 2049, 2052, 2073, 2064, 2078, 2075, - 2087, 2089, 2108, 2090, 2103, 2104, 2126, 2127, 2138, 2144, - 2152, 2157, 2160, 2176, 2163, 2181, 2182, 2193, 2198, 2212, - 2194, 2195, 2234, 2235, 2236, 2250, 2252, 2249, 2284, 2266, - 2268, 2292, 2278, 2289, 2290, 2303, 2306, 2320, 2332, 2341, - 2342, 2338, 2344, 2346, 2372, 2374, 2377, 2380, 2396, 2390, - 2420, 2426, 2415, 2439, 2431, 2409, 491, 1782, 1799, 1835, - - 1861, 1934, 1942, 2019, 0, 2078, 0, 0, 2096, 2121, - 2136, 2148, 0, 2191, 2202, 2252, 2273, 2285, 2307, 2379, - 2385, 2430, 2434, 2434, 0, 0, 2439, 2443, 2444, 2448, - 2468, 2473, 2470, 0, 2457, 2478, 0, 0, 2480, 2469, - 0, 2473, 0, 0, 2483, 2471, 2466, 2475, 2476, 2491, - 0, 2485, 0, 0, 0, 2479, 0, 2488, 0, 2498, - 2491, 2497, 2489, 0, 2510, 2513, 2501, 2504, 2510, 0, - 2527, 2528, 2518, 2515, 2515, 2537, 2528, 2528, 2540, 0, - 2539, 2538, 2543, 2536, 0, 0, 2533, 2534, 0, 2551, - 2543, 2538, 2560, 2543, 2557, 2560, 2559, 2563, 0, 2552, - - 0, 2571, 0, 0, 474, 2577, 2580, 2572, 2582, 2588, - 2596, 2591, 2606, 2614, 2622, 2625, 2640, 2631, 2644, 2657, - 2654, 2665, 2659, 2668, 2682, 2698, 2693, 2703, 2711, 2719, - 2728, 2727, 2722, 2733, 2752, 2756, 2757, 2771, 2782, 2792, - 2781, 2787, 2796, 2797, 2806, 2810, 2825, 2831, 2827, 2840, - 2835, 2836, 2841, 2846, 2865, 2877, 2881, 2889, 2879, 2900, - 2895, 2903, 2905, 2931, 2913, 2937, 2935, 2939, 2954, 2945, - 2943, 2967, 2979, 2980, 2985, 2989, 3003, 2988, 2997, 3022, - 3013, 3034, 3031, 3055, 3056, 3057, 3043, 3065, 3067, 3095, - 3080, 3086, 3089, 3097, 3105, 3120, 3101, 3110, 3129, 3139, - - 3154, 3143, 3151, 3164, 3169, 3175, 3173, 3187, 3188, 3192, - 3197, 3205, 442, 0, 0, 2582, 0, 2694, 0, 2737, - 2744, 2764, 2759, 2856, 2904, 2949, 0, 3006, 3061, 3111, - 3141, 0, 3179, 3179, 3195, 3209, 3213, 3203, 3208, 3212, - 3223, 3230, 0, 0, 3214, 3226, 0, 3235, 0, 3223, - 0, 0, 3226, 3242, 3229, 3239, 0, 0, 0, 0, - 3247, 0, 3252, 3246, 3236, 0, 0, 3257, 3245, 3246, - 3261, 3258, 0, 3267, 3270, 3268, 3256, 3273, 3281, 3265, - 3267, 3266, 3286, 3287, 0, 3287, 3292, 3292, 0, 3281, - 3300, 3288, 3304, 0, 441, 3301, 3305, 3313, 3311, 3315, - - 3316, 3317, 3330, 3347, 3346, 3365, 3349, 3351, 3368, 3379, - 3381, 3397, 3389, 3400, 3419, 3414, 3413, 3405, 3435, 3438, - 3448, 3437, 3467, 3472, 3454, 3459, 3473, 3469, 3491, 3502, - 3505, 3508, 3507, 3510, 3521, 3513, 3539, 3544, 3542, 3545, - 3547, 3556, 3561, 3570, 3579, 3584, 3585, 3593, 3595, 3596, - 3621, 3624, 3598, 3629, 3619, 3654, 3659, 3658, 3672, 3663, - 3673, 3688, 3691, 3697, 3707, 3713, 3721, 3722, 3726, 3723, - 3737, 3745, 3751, 3767, 3762, 3761, 435, 3312, 0, 3317, - 3375, 3369, 3389, 0, 3539, 0, 3574, 3603, 3623, 0, - 3656, 0, 3669, 0, 0, 0, 3728, 0, 3747, 3748, - - 0, 0, 0, 0, 0, 3753, 3775, 0, 0, 3770, - 3783, 0, 3765, 3791, 3775, 0, 3798, 3799, 3785, 0, - 0, 0, 3793, 0, 3805, 3809, 3812, 3796, 0, 0, - 0, 0, 3799, 3811, 3808, 434, 3816, 3821, 3825, 3829, - 3831, 3830, 3833, 3847, 3835, 3875, 3866, 3869, 3865, 3900, - 3879, 3903, 3887, 3888, 3898, 3909, 3917, 3931, 3933, 3919, - 3932, 3941, 3942, 3943, 3971, 3954, 3965, 3973, 3976, 3986, - 3977, 3987, 3995, 3999, 4005, 4030, 4038, 4021, 4017, 4027, - 4039, 4049, 4040, 4075, 4084, 4072, 4073, 4081, 4089, 4090, - 4094, 4105, 4124, 4123, 429, 0, 0, 0, 4016, 0, - - 0, 4051, 4083, 0, 4112, 4098, 0, 0, 0, 0, - 4129, 0, 4116, 4133, 0, 0, 4119, 4129, 0, 0, - 4125, 4134, 4131, 4147, 0, 0, 0, 404, 4148, 4158, - 4159, 4163, 4164, 4167, 4172, 4180, 4177, 4181, 4198, 4182, - 4196, 4212, 4215, 4233, 4217, 4221, 4230, 4236, 4246, 4252, - 4249, 4251, 4254, 4275, 4284, 4270, 4286, 4287, 4289, 4300, - 402, 4153, 0, 4205, 0, 0, 4223, 0, 4278, 0, - 0, 4283, 4294, 4304, 0, 401, 4324, 4321, 4323, 4325, - 4326, 4339, 4329, 4342, 4340, 4357, 4358, 4363, 4375, 4380, - 397, 0, 4361, 0, 4377, 0, 0, 4382, 396, 4393, - - 4394, 4396, 4397, 4408, 4409, 4432, 383, 0, 0, 4389, - 382, 4426, 4430, 4445, 376, 0, 342, 4431, 333, 331, - 303, 291, 278, 255, 250, 245, 243, 240, 235, 221, - 226, 197, 187, 173, 4550, 0, 4550, 4519, 4524, 181, - 4529, 4534, 4539, 4544 + 0, 0, 826, 835, 856, 859, 913, 887, 872, 922, + + 905, 961, 962, 1080, 957, 1081, 1133, 1085, 1119, 1083, + 1097, 1122, 1143, 1193, 1145, 1175, 1178, 959, 1196, 1187, + 1217, 1219, 1228, 1232, 1183, 1137, 1247, 1238, 1296, 1253, + 1257, 1270, 1281, 1306, 1331, 1335, 1298, 1350, 1346, 1349, + 1365, 1383, 1380, 1374, 1405, 1402, 1413, 1415, 1414, 1450, + 1454, 1448, 1469, 1478, 1480, 1502, 1508, 1513, 1524, 1389, + 1518, 1519, 1552, 1554, 1563, 1573, 1596, 1567, 1467, 1591, + 1602, 0, 4601, 498, 1667, 0, 825, 0, 833, 831, + 0, 852, 0, 880, 916, 908, 937, 1619, 963, 962, + 979, 1067, 1066, 1154, 1140, 1159, 0, 1166, 1181, 1240, + + 1315, 1262, 1286, 1277, 1296, 1325, 1344, 0, 1364, 1368, + 1422, 1410, 1432, 1444, 1451, 1479, 1513, 1515, 1570, 1579, + 1600, 1592, 1609, 1611, 1606, 1624, 1634, 1631, 1645, 1647, + 1660, 1663, 1646, 1656, 0, 1651, 1669, 1666, 1672, 1679, + 1674, 1675, 1662, 1664, 1664, 0, 1674, 1669, 1669, 1684, + 1685, 1690, 1679, 1680, 1686, 1688, 1703, 1686, 1711, 1709, + 1717, 1709, 1720, 0, 1705, 1709, 1710, 1720, 1718, 1715, + 1722, 1732, 0, 1724, 1736, 1725, 1724, 1742, 1730, 1724, + 1750, 1724, 1734, 1764, 1750, 1742, 0, 495, 1800, 1774, + 1778, 1779, 1793, 1795, 1796, 1807, 1808, 1831, 1832, 1819, + + 1849, 1847, 1857, 1865, 1853, 1871, 1875, 1903, 1887, 1890, + 1905, 1909, 1911, 1924, 1933, 1941, 1935, 1949, 1957, 1959, + 1945, 1963, 1978, 1967, 1995, 1989, 2011, 1999, 2007, 2008, + 2017, 2033, 2043, 2049, 2062, 2057, 2071, 2061, 2052, 2093, + 2097, 2075, 2087, 2105, 2111, 2116, 2119, 2128, 2127, 2141, + 2145, 2167, 2150, 2173, 2179, 2182, 2185, 2195, 2203, 2204, + 2218, 2221, 2213, 2216, 2235, 2253, 2247, 2258, 2264, 2259, + 2275, 2277, 2287, 2281, 2289, 2303, 2312, 2318, 2326, 2327, + 2337, 2341, 2356, 2343, 2372, 2335, 2360, 2377, 2389, 2400, + 2391, 2406, 2414, 2415, 2432, 2445, 2440, 2464, 2448, 2456, + + 491, 1798, 1804, 1813, 1899, 1960, 1993, 2023, 0, 2119, + 0, 0, 2155, 2151, 2176, 2177, 0, 2336, 2352, 2380, + 2410, 2435, 2438, 2451, 2475, 2461, 2482, 2481, 2479, 0, + 0, 2477, 2478, 2478, 2482, 2503, 2506, 2505, 0, 2491, + 2512, 0, 0, 2513, 2499, 0, 2505, 0, 0, 2517, + 2505, 2500, 2507, 2509, 2521, 0, 2518, 0, 0, 0, + 2512, 0, 2521, 0, 2530, 2524, 2528, 2527, 0, 2544, + 2543, 2535, 2538, 2545, 0, 2560, 2563, 0, 2552, 2549, + 2548, 2567, 2560, 2562, 2574, 0, 2573, 2570, 2576, 2567, + 0, 0, 2565, 2567, 0, 2584, 2575, 2569, 2592, 2577, + + 2591, 2594, 2593, 2593, 0, 2586, 0, 2605, 0, 0, + 474, 2613, 2614, 2610, 2616, 2618, 2635, 2622, 2639, 2650, + 2647, 2648, 2656, 2664, 2681, 2680, 2678, 2689, 2710, 2702, + 2706, 2715, 2718, 2732, 2743, 2755, 2756, 2760, 2777, 2758, + 2769, 2788, 2798, 2794, 2786, 2823, 2831, 2773, 2812, 2829, + 2842, 2840, 2848, 2857, 2852, 2861, 2873, 2874, 2883, 2885, + 2898, 2896, 2906, 2914, 2935, 2897, 2929, 2931, 2939, 2940, + 2950, 2952, 2973, 2968, 2969, 2990, 2971, 3006, 2994, 3024, + 3003, 3025, 3027, 3028, 3039, 3060, 3061, 3042, 3070, 3079, + 3076, 3101, 3102, 3073, 3113, 3104, 3112, 3130, 3115, 3136, + + 3127, 3144, 3152, 3155, 3158, 3167, 3180, 3168, 3190, 3203, + 3204, 3181, 3209, 3221, 3220, 3222, 3226, 3234, 3235, 3243, + 442, 0, 0, 2666, 0, 2692, 0, 2721, 2865, 2888, + 2948, 2966, 2975, 3002, 0, 3054, 3058, 3118, 3109, 3170, + 0, 3228, 3229, 3248, 3258, 3260, 3249, 3251, 3258, 3270, + 3277, 0, 0, 3261, 3270, 0, 3276, 0, 3264, 0, + 0, 3265, 3283, 3272, 3281, 0, 0, 0, 0, 3289, + 0, 3296, 3291, 3280, 0, 0, 3296, 3284, 3285, 3300, + 3304, 0, 3313, 3315, 3313, 3299, 3318, 3322, 3306, 3313, + 3313, 3333, 3334, 0, 3331, 3333, 3333, 0, 3320, 3341, + + 3331, 3346, 0, 441, 3343, 3346, 3351, 3348, 3354, 3362, + 3365, 3377, 3386, 3387, 3400, 3408, 3402, 3405, 3417, 3416, + 3450, 3431, 3439, 3440, 3468, 3454, 3462, 3456, 3480, 3490, + 3491, 3494, 3516, 3504, 3492, 3522, 3525, 3546, 3528, 3554, + 3530, 3544, 3558, 3562, 3579, 3568, 3570, 3596, 3587, 3592, + 3598, 3600, 3602, 3604, 3632, 3633, 3641, 3637, 3638, 3642, + 3654, 3673, 3650, 3671, 3672, 3707, 3708, 3696, 3690, 3725, + 3733, 3744, 3746, 3721, 3742, 3761, 3747, 3750, 3776, 3778, + 3779, 3787, 3804, 3809, 3815, 3790, 435, 3352, 0, 3374, + 3430, 3519, 3594, 0, 3606, 0, 3674, 3689, 3705, 3777, + + 0, 3798, 0, 3814, 0, 0, 0, 3813, 0, 3807, + 3805, 0, 0, 0, 0, 0, 3808, 3830, 0, 0, + 3825, 3837, 0, 3826, 3844, 3826, 0, 3851, 3852, 3838, + 0, 0, 0, 3846, 0, 3858, 3859, 3860, 3846, 0, + 0, 0, 0, 3850, 3862, 3858, 434, 3866, 3867, 3869, + 3875, 3883, 3897, 3899, 3900, 3901, 3915, 3931, 3932, 3940, + 3937, 3968, 3943, 3971, 3953, 3954, 3977, 3983, 3985, 3993, + 3994, 3999, 4007, 4008, 4011, 4017, 4039, 4022, 4023, 4033, + 4056, 4051, 4045, 4062, 4048, 4061, 4067, 4093, 4099, 4096, + 4085, 4101, 4102, 4127, 4111, 4139, 4145, 4144, 4136, 4130, + + 4133, 4155, 4167, 4176, 4179, 4190, 429, 0, 0, 0, + 3906, 0, 0, 3909, 3922, 0, 0, 3949, 3974, 0, + 0, 0, 0, 4059, 0, 4060, 4125, 0, 0, 4158, + 4178, 0, 0, 4172, 4180, 4178, 4195, 0, 0, 0, + 404, 4198, 4201, 4207, 4209, 4213, 4219, 4230, 4235, 4232, + 4241, 4243, 4249, 4247, 4251, 4253, 4265, 4283, 4275, 4284, + 4286, 4287, 4289, 4305, 4315, 4299, 4317, 4338, 4341, 4339, + 4323, 4340, 4353, 4355, 402, 4288, 0, 4303, 0, 0, + 4314, 0, 4344, 0, 0, 4343, 4358, 4367, 0, 401, + 4379, 4374, 4389, 4383, 4391, 4393, 4395, 4412, 4397, 4407, + + 4423, 4437, 4429, 4441, 397, 0, 4428, 0, 4431, 0, + 0, 4436, 396, 4447, 4451, 4462, 4463, 4465, 4466, 4481, + 383, 0, 0, 4444, 382, 4479, 4487, 4496, 376, 0, + 342, 4495, 333, 331, 303, 291, 278, 255, 250, 245, + 243, 240, 235, 221, 226, 197, 187, 173, 4601, 0, + 4601, 4570, 4575, 181, 4580, 4585, 4590, 4595 } ; -static const flex_int16_t yy_def[1145] = +static const flex_int16_t yy_def[1159] = { 0, - 1137, 1, 1138, 1138, 1137, 5, 1137, 1137, 1137, 1137, - 1137, 1139, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1137, 1141, 1137, 1142, 1142, 1137, - 1142, 1143, 1142, 1142, 1142, 1142, 1142, 1142, 1142, 1142, - 1144, 1144, 62, 62, 62, 62, 62, 62, 62, 62, + 1151, 1, 1152, 1152, 1151, 5, 1151, 1151, 1151, 1151, + 1151, 1153, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1151, 1155, 1151, 1156, 1156, 1151, + 1156, 1157, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1158, 1158, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 1142, 1137, 1137, 1139, 1137, 1137, - 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1140, 1140, 1140, - - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1137, 1141, 1137, 1142, - 1142, 1142, 1143, 1142, 1142, 1142, 1142, 1142, 1142, 1142, - 1142, 1142, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 1156, 1151, 1151, 1153, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1154, 1154, 1154, + + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1151, 1155, 1151, 1156, + 1156, 1156, 1157, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, @@ -916,19 +919,19 @@ static const flex_int16_t yy_def[1145] = 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 1142, 1137, 1137, 1137, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1142, 1142, 1142, 62, 62, 62, + 62, 1156, 1151, 1151, 1151, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1156, 1156, 1156, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, @@ -940,21 +943,21 @@ static const flex_int16_t yy_def[1145] = 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 1137, 1140, 1140, 1140, - - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - - 1140, 1140, 1140, 1140, 1142, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + + 1151, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1156, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, @@ -965,57 +968,58 @@ static const flex_int16_t yy_def[1145] = 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 1137, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1142, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 1151, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + + 1154, 1154, 1154, 1156, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 1137, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1142, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 1151, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1156, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 1137, 1140, 1140, 1140, 1140, 1140, - - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1142, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + + 62, 62, 62, 62, 62, 62, 1151, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1156, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 1137, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, - 1140, 1140, 1140, 1140, 1140, 1142, 62, 62, 62, 62, + 62, 62, 62, 62, 1151, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1156, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 1137, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1142, 62, - 62, 62, 62, 62, 62, 62, 1137, 1140, 1140, 1140, - 1142, 62, 62, 62, 1137, 1140, 1142, 62, 1137, 1142, - 1137, 1142, 1137, 1142, 1137, 1142, 1137, 1142, 1137, 1142, - 1137, 1142, 1137, 1142, 1137, 1142, 0, 1137, 1137, 1137, - 1137, 1137, 1137, 1137 + 62, 62, 62, 62, 1151, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1156, 62, 62, 62, 62, 62, 62, 62, + 1151, 1154, 1154, 1154, 1156, 62, 62, 62, 1151, 1154, + 1156, 62, 1151, 1156, 1151, 1156, 1151, 1156, 1151, 1156, + 1151, 1156, 1151, 1156, 1151, 1156, 1151, 1156, 1151, 1156, + 0, 1151, 1151, 1151, 1151, 1151, 1151, 1151 } ; -static const flex_int16_t yy_nxt[4627] = +static const flex_int16_t yy_nxt[4678] = { 0, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, @@ -1037,498 +1041,503 @@ static const flex_int16_t yy_nxt[4627] = 91, 91, 91, 91, 91, 91, 91, 90, 92, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 94, 95, 99, 105, 100, 111, 98, 107, 136, 112, 101, - 1136, 102, 113, 108, 137, 103, 104, 176, 114, 276, + 1150, 102, 113, 108, 137, 103, 104, 176, 114, 276, - 109, 115, 106, 110, 1135, 116, 1134, 117, 99, 105, + 109, 115, 106, 110, 1149, 116, 1148, 117, 99, 105, 100, 111, 118, 107, 136, 112, 101, 119, 102, 113, 108, 137, 103, 104, 176, 114, 276, 109, 115, 106, - 110, 126, 116, 128, 117, 1133, 138, 127, 1132, 118, + 110, 126, 116, 128, 117, 1147, 138, 127, 1146, 118, 139, 129, 131, 172, 119, 120, 140, 130, 132, 133, - 134, 173, 1131, 121, 1130, 135, 122, 1129, 126, 123, - 128, 1128, 124, 138, 127, 125, 1127, 139, 129, 131, - 172, 1126, 120, 140, 130, 132, 133, 134, 173, 144, + 134, 173, 1145, 121, 1144, 135, 122, 1143, 126, 123, + 128, 1142, 124, 138, 127, 125, 1141, 139, 129, 131, + 172, 1140, 120, 140, 130, 132, 133, 134, 173, 144, 121, 141, 135, 122, 152, 142, 123, 174, 175, 124, - 148, 143, 125, 145, 1125, 153, 181, 86, 149, 146, + 148, 143, 125, 145, 1139, 153, 181, 86, 149, 146, - 147, 154, 150, 155, 1124, 151, 144, 156, 141, 86, - 86, 152, 142, 157, 174, 175, 1123, 148, 143, 169, + 147, 154, 150, 155, 1138, 151, 144, 156, 141, 86, + 86, 152, 142, 157, 174, 175, 1137, 148, 143, 169, 145, 170, 153, 277, 171, 149, 146, 147, 154, 150, 155, 158, 151, 159, 156, 282, 160, 232, 184, 283, - 157, 189, 190, 161, 162, 1122, 169, 1121, 170, 185, - 277, 171, 86, 86, 193, 193, 289, 193, 158, 1120, + 157, 189, 190, 161, 162, 1136, 169, 1135, 170, 185, + 277, 171, 86, 86, 193, 193, 289, 193, 158, 1134, 159, 221, 282, 160, 232, 231, 283, 222, 296, 278, 161, 162, 163, 297, 193, 193, 164, 279, 287, 165, - 166, 193, 193, 289, 193, 288, 167, 304, 221, 168, - 181, 86, 231, 1119, 222, 296, 278, 1117, 1115, 163, + 166, 193, 193, 289, 193, 288, 167, 305, 221, 168, + 181, 86, 231, 1133, 222, 296, 278, 1131, 1129, 163, - 297, 193, 193, 164, 279, 287, 165, 166, 1111, 1107, - 1099, 1091, 288, 167, 304, 1076, 168, 186, 186, 186, + 297, 193, 193, 164, 279, 287, 165, 166, 1125, 1121, + 1113, 1105, 288, 167, 305, 1090, 168, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 187, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 180, 180, - 1061, 180, 180, 180, 180, 180, 180, 193, 223, 271, - 1028, 995, 193, 936, 877, 305, 224, 180, 180, 180, - 233, 306, 225, 194, 234, 195, 307, 193, 308, 193, + 1075, 180, 180, 180, 180, 180, 180, 193, 223, 271, + 1041, 1007, 193, 947, 887, 306, 224, 180, 180, 180, + 233, 307, 225, 194, 234, 195, 308, 193, 309, 193, 235, 196, 193, 197, 193, 223, 271, 198, 199, 193, - 193, 193, 305, 224, 269, 270, 795, 233, 306, 225, - 194, 234, 195, 307, 193, 308, 193, 235, 196, 193, + 193, 193, 306, 224, 269, 270, 804, 233, 307, 225, + 194, 234, 195, 308, 193, 309, 193, 235, 196, 193, - 197, 193, 314, 713, 198, 199, 605, 193, 193, 497, - 386, 269, 270, 180, 180, 180, 385, 180, 180, 180, - 180, 180, 180, 274, 273, 272, 236, 247, 193, 314, + 197, 193, 315, 721, 198, 199, 611, 193, 193, 501, + 388, 269, 270, 180, 180, 180, 387, 180, 180, 180, + 180, 180, 180, 274, 273, 272, 236, 247, 193, 315, 237, 193, 192, 180, 180, 180, 238, 294, 248, 250, - 200, 193, 280, 251, 249, 281, 193, 295, 315, 252, - 264, 193, 265, 236, 247, 266, 316, 237, 193, 193, + 200, 193, 280, 251, 249, 281, 193, 295, 316, 252, + 264, 193, 265, 236, 247, 266, 317, 237, 193, 193, 201, 193, 191, 238, 294, 248, 250, 200, 193, 280, - 251, 249, 281, 193, 295, 315, 252, 264, 193, 265, - 180, 182, 266, 316, 284, 285, 193, 201, 193, 180, - 202, 317, 267, 318, 193, 319, 193, 203, 286, 320, - - 268, 290, 291, 292, 204, 293, 179, 205, 302, 303, - 321, 284, 285, 324, 193, 177, 193, 202, 317, 267, - 318, 193, 319, 193, 203, 286, 320, 268, 290, 291, - 292, 204, 293, 298, 205, 302, 303, 321, 299, 97, - 324, 193, 206, 193, 300, 96, 207, 325, 326, 322, - 208, 301, 323, 327, 332, 309, 209, 310, 333, 210, - 298, 311, 334, 87, 335, 299, 193, 1137, 312, 206, - 341, 300, 313, 207, 325, 326, 322, 208, 301, 323, - 327, 332, 309, 209, 310, 333, 210, 47, 311, 334, - 328, 335, 342, 193, 193, 312, 336, 341, 337, 313, - - 329, 211, 343, 212, 344, 330, 331, 338, 213, 339, - 345, 346, 347, 214, 193, 47, 348, 328, 349, 342, - 340, 193, 350, 336, 351, 337, 1137, 329, 211, 343, - 212, 344, 330, 331, 338, 213, 339, 345, 346, 347, - 214, 193, 215, 348, 352, 349, 193, 340, 353, 350, - 216, 351, 354, 217, 357, 355, 218, 358, 359, 219, - 356, 360, 220, 363, 364, 365, 193, 1137, 1137, 215, - 361, 352, 366, 193, 1137, 353, 1137, 216, 362, 354, - 217, 357, 355, 218, 358, 359, 219, 356, 360, 220, - 363, 364, 365, 193, 193, 226, 367, 361, 369, 366, - - 370, 227, 228, 229, 371, 362, 372, 368, 230, 374, - 376, 377, 375, 382, 193, 1137, 383, 1137, 378, 1137, - 384, 193, 226, 367, 379, 369, 373, 370, 227, 228, - 229, 371, 193, 372, 368, 230, 374, 376, 377, 375, - 382, 193, 239, 383, 380, 378, 193, 384, 498, 388, - 193, 379, 193, 373, 1137, 499, 240, 381, 1137, 193, - 500, 501, 241, 242, 502, 1137, 193, 1137, 1137, 239, - 193, 380, 1137, 193, 1137, 498, 388, 193, 1137, 193, - 1137, 193, 499, 240, 381, 193, 193, 500, 501, 241, - 242, 502, 390, 193, 193, 243, 389, 193, 193, 394, - - 391, 193, 395, 244, 193, 193, 193, 245, 193, 503, - 246, 1137, 193, 193, 193, 1137, 504, 1137, 193, 390, - 1137, 193, 243, 389, 193, 193, 394, 391, 193, 395, - 244, 193, 193, 193, 245, 392, 503, 246, 393, 193, - 505, 193, 253, 504, 254, 193, 509, 255, 193, 396, - 397, 193, 510, 511, 256, 257, 1137, 1137, 1137, 193, - 1137, 1137, 392, 398, 193, 393, 193, 505, 193, 253, - 512, 254, 1137, 509, 255, 193, 396, 397, 193, 510, - 511, 256, 257, 406, 401, 426, 193, 193, 193, 1137, - 398, 193, 258, 407, 399, 193, 259, 512, 193, 260, - - 261, 400, 513, 193, 514, 193, 262, 193, 193, 263, - 406, 401, 426, 515, 193, 193, 193, 1137, 1137, 258, - 407, 399, 1137, 259, 1137, 193, 260, 261, 400, 513, - 193, 514, 1137, 262, 193, 193, 263, 1137, 1137, 1137, - 515, 1137, 1137, 193, 91, 91, 91, 91, 91, 91, + 251, 249, 281, 193, 295, 316, 252, 264, 193, 265, + 180, 318, 266, 317, 284, 285, 193, 201, 193, 180, + 202, 319, 267, 320, 193, 321, 193, 203, 286, 322, + + 268, 290, 291, 292, 204, 293, 182, 205, 318, 303, + 304, 284, 285, 325, 193, 179, 193, 202, 319, 267, + 320, 193, 321, 193, 203, 286, 322, 268, 290, 291, + 292, 204, 293, 298, 205, 299, 303, 304, 300, 177, + 325, 193, 206, 193, 301, 97, 207, 326, 327, 323, + 208, 302, 324, 328, 333, 310, 209, 311, 334, 210, + 298, 312, 299, 96, 335, 300, 193, 87, 313, 206, + 336, 301, 314, 207, 326, 327, 323, 208, 302, 324, + 328, 333, 310, 209, 311, 334, 210, 1151, 312, 342, + 329, 335, 343, 193, 193, 313, 337, 336, 338, 314, + + 330, 211, 344, 212, 345, 331, 332, 339, 213, 340, + 346, 347, 348, 214, 193, 47, 342, 329, 349, 343, + 341, 193, 350, 337, 351, 338, 47, 330, 211, 344, + 212, 345, 331, 332, 339, 213, 340, 346, 347, 348, + 214, 193, 215, 352, 353, 349, 193, 341, 354, 350, + 216, 351, 355, 217, 359, 360, 218, 361, 1151, 219, + 365, 1151, 220, 1151, 366, 367, 193, 1151, 1151, 215, + 352, 353, 356, 193, 1151, 354, 1151, 216, 1151, 355, + 217, 359, 360, 218, 361, 357, 219, 365, 362, 220, + 358, 366, 367, 193, 193, 226, 368, 363, 369, 356, + + 371, 227, 228, 229, 372, 364, 373, 376, 230, 370, + 377, 1151, 357, 378, 193, 362, 379, 358, 374, 1151, + 380, 193, 226, 368, 363, 369, 381, 371, 227, 228, + 229, 372, 364, 373, 376, 230, 370, 377, 375, 1151, + 378, 193, 239, 379, 382, 374, 193, 380, 384, 385, + 386, 502, 193, 381, 1151, 1151, 240, 383, 1151, 503, + 390, 193, 241, 242, 504, 375, 193, 1151, 1151, 239, + 1151, 382, 193, 193, 505, 384, 385, 386, 502, 193, + 1151, 193, 193, 240, 383, 193, 503, 390, 193, 241, + 242, 504, 392, 193, 193, 243, 397, 391, 193, 193, + + 393, 505, 193, 244, 1151, 193, 1151, 245, 193, 193, + 246, 1151, 193, 193, 193, 1151, 506, 1151, 193, 392, + 1151, 193, 243, 397, 391, 193, 396, 393, 1151, 193, + 244, 193, 193, 193, 245, 394, 1151, 246, 395, 193, + 193, 193, 253, 506, 254, 193, 507, 255, 193, 398, + 399, 193, 508, 396, 256, 257, 1151, 1151, 193, 193, + 193, 1151, 394, 400, 193, 395, 193, 1151, 193, 253, + 509, 254, 1151, 507, 255, 193, 398, 399, 193, 508, + 1151, 256, 257, 408, 403, 193, 193, 193, 193, 1151, + 400, 193, 258, 409, 401, 193, 259, 509, 432, 260, + + 261, 402, 513, 193, 514, 193, 262, 193, 193, 263, + 408, 403, 193, 515, 193, 193, 193, 1151, 1151, 258, + 409, 401, 1151, 259, 1151, 432, 260, 261, 402, 513, + 193, 514, 193, 262, 193, 193, 263, 1151, 1151, 1151, + 515, 1151, 1151, 193, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, 92, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 387, 387, 387, 387, 387, - 387, 387, 387, 387, 387, 187, 188, 188, 188, 188, + 186, 186, 186, 186, 186, 389, 389, 389, 389, 389, + 389, 389, 389, 389, 389, 187, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 193, 193, 516, 193, - 193, 193, 517, 402, 403, 404, 1137, 405, 1137, 518, - 1137, 417, 408, 414, 415, 416, 193, 409, 1137, 193, - 193, 193, 1137, 193, 193, 516, 193, 193, 193, 517, - 402, 403, 404, 420, 405, 193, 518, 193, 417, 408, - 414, 415, 416, 193, 409, 410, 193, 193, 193, 193, - 411, 418, 419, 193, 1137, 193, 412, 193, 1137, 1137, - 420, 193, 193, 413, 193, 193, 521, 522, 427, 193, - 1137, 523, 410, 193, 1137, 428, 193, 411, 418, 419, - 193, 193, 193, 412, 193, 193, 193, 1137, 193, 524, - - 413, 1137, 193, 521, 522, 427, 193, 193, 523, 429, - 193, 421, 428, 422, 431, 193, 193, 423, 193, 193, - 1137, 1137, 193, 193, 424, 430, 524, 193, 425, 432, - 1137, 1137, 1137, 193, 193, 193, 429, 193, 421, 193, - 422, 431, 193, 193, 423, 193, 193, 433, 193, 193, - 525, 424, 430, 193, 193, 425, 432, 193, 436, 193, - 193, 437, 193, 438, 193, 193, 193, 434, 193, 193, - 435, 193, 193, 193, 433, 193, 193, 525, 526, 193, - 193, 527, 439, 1137, 193, 436, 193, 528, 437, 1137, - 438, 193, 193, 1137, 434, 193, 193, 435, 193, 529, - - 193, 193, 1137, 193, 1137, 526, 193, 1137, 527, 439, - 444, 193, 1137, 1137, 528, 445, 193, 447, 193, 440, - 193, 193, 1137, 446, 530, 1137, 529, 531, 193, 441, - 193, 193, 193, 193, 442, 443, 193, 444, 193, 448, - 193, 449, 445, 193, 447, 453, 440, 193, 193, 519, - 446, 530, 193, 193, 531, 1137, 441, 1137, 193, 193, - 193, 442, 443, 193, 520, 193, 448, 193, 449, 450, - 532, 451, 453, 193, 454, 193, 519, 533, 1137, 193, - 193, 1137, 452, 1137, 455, 193, 193, 193, 193, 534, - 193, 520, 193, 193, 458, 193, 450, 532, 451, 1137, - - 193, 454, 193, 456, 533, 457, 193, 193, 193, 452, - 193, 455, 193, 193, 193, 193, 534, 193, 193, 459, - 193, 458, 193, 193, 193, 460, 461, 193, 1137, 193, - 456, 463, 457, 193, 193, 193, 1137, 193, 193, 475, - 193, 535, 1137, 193, 193, 193, 459, 193, 1137, 193, - 193, 193, 460, 461, 193, 462, 193, 464, 463, 465, - 193, 193, 1137, 466, 1137, 193, 475, 193, 535, 193, - 193, 193, 536, 193, 193, 469, 193, 193, 467, 193, - 471, 193, 462, 468, 464, 1137, 465, 193, 193, 193, - 466, 193, 472, 193, 193, 537, 193, 193, 470, 536, - - 193, 473, 469, 538, 193, 467, 193, 471, 193, 474, - 468, 193, 478, 193, 193, 193, 193, 539, 193, 472, - 193, 193, 537, 477, 193, 470, 476, 193, 473, 193, - 538, 481, 193, 193, 540, 193, 474, 479, 193, 478, - 193, 193, 193, 483, 539, 488, 193, 193, 480, 193, - 477, 193, 193, 476, 193, 1137, 193, 193, 481, 193, - 193, 540, 193, 484, 479, 482, 193, 193, 541, 542, - 483, 1137, 488, 193, 193, 480, 193, 193, 193, 193, - 494, 193, 193, 485, 193, 486, 489, 193, 487, 1137, - 484, 1137, 482, 193, 193, 541, 542, 1137, 193, 1137, - - 193, 193, 193, 492, 193, 490, 193, 494, 193, 193, - 485, 491, 486, 489, 193, 487, 493, 1137, 193, 543, - 496, 495, 544, 193, 193, 193, 193, 193, 193, 193, - 492, 1137, 490, 193, 1137, 1137, 1137, 1137, 491, 1137, - 545, 546, 547, 493, 193, 193, 543, 496, 495, 544, - 193, 193, 548, 193, 275, 275, 275, 275, 275, 275, - 275, 275, 275, 275, 506, 549, 507, 545, 546, 547, - 550, 193, 552, 553, 554, 555, 556, 557, 558, 548, - 551, 508, 559, 560, 561, 562, 563, 564, 565, 566, - 567, 506, 549, 507, 568, 569, 570, 550, 571, 552, - - 553, 554, 555, 556, 557, 558, 572, 551, 508, 559, - 560, 561, 562, 563, 564, 565, 566, 567, 573, 574, - 575, 568, 569, 570, 576, 571, 577, 578, 579, 580, - 581, 582, 583, 572, 584, 585, 586, 587, 588, 589, - 591, 593, 592, 594, 595, 573, 574, 575, 590, 596, - 597, 576, 599, 577, 578, 579, 580, 581, 582, 583, - 600, 584, 585, 586, 587, 588, 589, 591, 593, 592, - 594, 595, 598, 603, 601, 590, 596, 597, 602, 599, - 604, 1137, 193, 606, 193, 1137, 607, 600, 387, 387, - 387, 387, 387, 387, 387, 387, 387, 387, 193, 598, - - 603, 601, 193, 193, 193, 602, 193, 604, 193, 193, - 606, 193, 609, 607, 193, 608, 193, 193, 193, 1137, - 193, 714, 1137, 1137, 611, 193, 1137, 610, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 715, 609, - 193, 193, 608, 193, 193, 193, 193, 193, 714, 193, - 612, 611, 193, 613, 610, 193, 1137, 1137, 1137, 193, - 1137, 193, 617, 193, 193, 715, 193, 193, 614, 193, - 615, 193, 1137, 193, 193, 1137, 193, 612, 1137, 193, - 613, 716, 619, 193, 193, 616, 193, 618, 1137, 617, - 193, 193, 1137, 193, 193, 614, 193, 615, 193, 620, - - 623, 193, 624, 621, 193, 193, 193, 717, 716, 619, - 193, 193, 616, 193, 618, 622, 193, 193, 193, 193, - 626, 193, 193, 625, 193, 193, 620, 623, 630, 624, - 621, 193, 193, 193, 717, 629, 193, 193, 627, 193, - 1137, 193, 622, 193, 193, 1137, 193, 626, 193, 193, - 625, 193, 193, 628, 634, 630, 631, 193, 193, 193, - 1137, 193, 629, 193, 193, 627, 193, 632, 193, 1137, - 193, 193, 636, 718, 193, 193, 193, 719, 635, 193, - 628, 634, 193, 631, 193, 193, 193, 633, 193, 637, - 193, 193, 193, 193, 632, 1137, 193, 193, 1137, 636, - - 718, 193, 193, 193, 719, 635, 193, 638, 193, 193, - 193, 193, 193, 193, 633, 639, 637, 193, 193, 193, - 193, 642, 643, 193, 641, 640, 193, 1137, 193, 193, - 193, 1137, 193, 1137, 638, 193, 193, 193, 193, 193, - 193, 193, 639, 1137, 644, 720, 193, 193, 642, 643, - 193, 641, 640, 193, 646, 193, 193, 193, 645, 193, - 193, 647, 193, 193, 193, 649, 1137, 193, 193, 1137, - 193, 644, 720, 193, 193, 193, 648, 193, 193, 650, - 193, 646, 193, 193, 193, 645, 1137, 193, 647, 193, - 193, 193, 649, 651, 193, 193, 653, 193, 193, 193, - - 721, 655, 193, 648, 193, 193, 650, 193, 1137, 193, - 193, 193, 652, 656, 654, 657, 193, 193, 722, 193, - 651, 193, 193, 653, 193, 193, 193, 721, 655, 193, - 193, 193, 660, 193, 658, 193, 193, 193, 661, 652, - 656, 654, 657, 193, 659, 722, 193, 1137, 193, 193, - 193, 193, 193, 663, 193, 723, 193, 193, 1137, 660, - 193, 658, 193, 193, 193, 661, 724, 662, 664, 665, - 193, 659, 193, 193, 666, 1137, 193, 193, 193, 193, - 663, 193, 723, 193, 193, 667, 193, 725, 668, 193, - 193, 193, 1137, 724, 662, 664, 665, 193, 193, 193, - - 193, 666, 193, 193, 670, 193, 193, 193, 193, 193, - 193, 193, 667, 193, 725, 668, 193, 193, 669, 193, - 675, 676, 193, 671, 193, 193, 672, 193, 193, 193, - 193, 670, 726, 193, 193, 193, 193, 673, 193, 193, - 193, 193, 727, 1137, 193, 669, 193, 675, 676, 193, - 671, 193, 674, 672, 193, 193, 677, 1137, 193, 726, - 193, 193, 193, 1137, 673, 193, 193, 193, 193, 727, - 678, 193, 1137, 679, 681, 193, 193, 1137, 193, 674, - 193, 193, 193, 677, 680, 193, 1137, 193, 193, 193, - 682, 1137, 193, 728, 685, 193, 193, 678, 193, 684, - - 679, 681, 193, 193, 687, 193, 729, 193, 193, 193, - 193, 680, 193, 683, 193, 193, 193, 682, 193, 193, - 728, 685, 193, 193, 193, 193, 684, 730, 686, 193, - 193, 687, 193, 729, 688, 193, 193, 193, 193, 193, - 683, 193, 193, 193, 689, 193, 193, 690, 731, 193, - 1137, 193, 193, 691, 730, 686, 193, 193, 193, 193, - 1137, 688, 193, 193, 695, 193, 193, 193, 193, 692, - 193, 689, 193, 193, 690, 731, 193, 694, 193, 193, - 691, 696, 693, 1137, 193, 193, 1137, 193, 193, 1137, - 193, 695, 193, 193, 193, 193, 692, 193, 697, 193, - - 193, 732, 702, 193, 694, 193, 193, 698, 696, 693, - 699, 193, 700, 701, 193, 193, 193, 193, 193, 193, - 193, 1137, 193, 193, 733, 697, 193, 193, 732, 702, - 193, 703, 704, 193, 698, 193, 193, 699, 1137, 700, - 701, 193, 193, 193, 705, 193, 193, 193, 712, 193, - 193, 733, 193, 193, 734, 193, 708, 193, 703, 704, - 711, 193, 193, 193, 735, 193, 706, 736, 193, 193, - 707, 705, 193, 193, 709, 712, 737, 193, 710, 193, - 738, 734, 193, 708, 193, 193, 739, 711, 193, 740, - 741, 735, 193, 706, 736, 742, 743, 707, 744, 193, - - 745, 709, 746, 737, 193, 710, 747, 738, 748, 749, - 750, 751, 193, 739, 752, 753, 740, 741, 756, 754, - 757, 758, 742, 743, 759, 744, 762, 745, 763, 746, - 755, 760, 761, 747, 764, 748, 749, 750, 751, 765, - 766, 752, 753, 767, 768, 756, 754, 757, 758, 769, - 770, 759, 771, 762, 772, 763, 773, 755, 760, 761, - 774, 764, 775, 776, 777, 778, 765, 766, 779, 780, - 767, 768, 781, 782, 783, 784, 769, 770, 785, 771, - 786, 772, 787, 773, 788, 789, 790, 774, 791, 775, - 776, 777, 778, 792, 793, 779, 780, 794, 193, 781, - - 782, 783, 784, 193, 1137, 785, 193, 786, 193, 787, - 1137, 788, 789, 790, 193, 791, 796, 802, 798, 797, - 792, 793, 193, 193, 794, 193, 193, 800, 799, 878, - 193, 801, 193, 193, 193, 193, 803, 193, 1137, 1137, - 193, 193, 193, 796, 802, 798, 797, 1137, 193, 193, - 193, 193, 193, 193, 800, 799, 878, 193, 801, 193, - 193, 193, 804, 803, 193, 805, 193, 193, 193, 193, - 193, 193, 1137, 1137, 806, 193, 1137, 193, 193, 193, - 193, 1137, 1137, 193, 193, 193, 193, 193, 1137, 804, - 193, 193, 805, 193, 193, 193, 807, 193, 193, 809, - - 193, 806, 1137, 193, 193, 193, 808, 193, 193, 810, - 193, 193, 193, 193, 193, 811, 1137, 193, 193, 193, - 879, 193, 1137, 807, 193, 814, 809, 193, 193, 193, - 193, 1137, 193, 808, 813, 193, 810, 193, 193, 193, - 812, 193, 811, 816, 193, 193, 193, 879, 193, 193, - 815, 193, 814, 193, 193, 193, 193, 193, 817, 193, - 818, 813, 1137, 880, 193, 193, 193, 812, 193, 881, - 816, 193, 193, 193, 193, 193, 193, 815, 193, 193, - 193, 193, 193, 193, 193, 817, 193, 818, 882, 819, - 880, 1137, 193, 820, 883, 193, 881, 193, 193, 821, - - 193, 193, 193, 193, 823, 193, 193, 825, 193, 193, - 193, 1137, 822, 193, 824, 882, 819, 193, 193, 827, - 820, 883, 193, 193, 193, 193, 821, 193, 193, 193, - 193, 823, 193, 193, 825, 193, 193, 826, 193, 822, - 193, 824, 193, 193, 193, 193, 827, 828, 1137, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 1137, 193, - 193, 193, 193, 193, 826, 193, 193, 831, 829, 193, - 193, 193, 193, 193, 828, 830, 1137, 193, 193, 193, - 193, 193, 193, 193, 193, 832, 193, 193, 193, 193, - 1137, 193, 193, 193, 831, 829, 1137, 884, 193, 193, - - 193, 1137, 830, 193, 193, 193, 1137, 193, 193, 193, - 833, 193, 832, 193, 193, 193, 834, 836, 193, 193, - 835, 193, 1137, 193, 884, 193, 193, 193, 837, 193, - 193, 193, 193, 838, 193, 193, 1137, 833, 193, 193, - 885, 193, 193, 834, 836, 1137, 193, 835, 193, 193, - 193, 193, 193, 193, 193, 837, 193, 193, 193, 193, - 838, 193, 193, 193, 1137, 841, 193, 885, 193, 193, - 840, 193, 839, 193, 844, 886, 193, 193, 193, 1137, - 193, 193, 845, 193, 193, 193, 193, 1137, 193, 193, - 193, 193, 841, 193, 842, 843, 193, 840, 193, 839, - - 193, 844, 886, 846, 193, 193, 847, 193, 193, 845, - 193, 193, 193, 193, 193, 193, 193, 1137, 193, 851, - 193, 842, 843, 193, 848, 193, 193, 193, 849, 193, - 846, 193, 193, 847, 193, 193, 887, 850, 193, 193, - 193, 193, 193, 193, 852, 1137, 851, 853, 193, 193, - 193, 848, 193, 193, 1137, 849, 193, 193, 193, 193, - 193, 193, 193, 887, 850, 1137, 193, 859, 193, 193, - 193, 852, 855, 854, 853, 193, 193, 193, 856, 1137, - 193, 193, 193, 193, 193, 1137, 193, 193, 1137, 193, - 857, 193, 858, 860, 859, 193, 193, 888, 1137, 855, - - 854, 193, 193, 193, 193, 856, 862, 193, 193, 193, - 193, 193, 193, 193, 1137, 193, 193, 857, 193, 858, - 860, 193, 863, 193, 888, 861, 193, 193, 193, 193, - 193, 193, 193, 862, 866, 193, 193, 1137, 193, 193, - 193, 193, 193, 193, 889, 864, 193, 193, 193, 863, - 193, 193, 861, 193, 193, 193, 193, 1137, 193, 193, - 865, 866, 193, 193, 867, 193, 193, 890, 193, 193, - 193, 889, 864, 193, 193, 193, 869, 193, 193, 871, - 193, 868, 193, 193, 870, 193, 1137, 865, 1137, 193, - 872, 867, 193, 193, 890, 193, 193, 193, 873, 193, - - 193, 193, 193, 869, 193, 874, 871, 193, 868, 891, - 193, 870, 193, 193, 193, 193, 193, 872, 876, 193, - 892, 193, 193, 193, 193, 873, 193, 193, 193, 875, - 893, 193, 874, 193, 193, 894, 891, 193, 193, 895, - 193, 193, 193, 193, 896, 876, 193, 892, 193, 897, - 193, 193, 898, 899, 900, 901, 875, 893, 193, 902, - 193, 193, 894, 903, 904, 193, 895, 905, 906, 907, - 193, 896, 908, 909, 910, 911, 897, 912, 193, 898, - 899, 900, 901, 913, 914, 915, 902, 916, 917, 918, - 903, 904, 919, 920, 905, 906, 907, 921, 922, 908, - - 909, 910, 911, 923, 912, 924, 925, 926, 927, 928, - 913, 914, 915, 929, 916, 917, 918, 930, 931, 919, - 920, 932, 933, 934, 921, 922, 935, 193, 1137, 1137, - 923, 193, 924, 925, 926, 927, 928, 193, 996, 193, - 929, 938, 193, 939, 930, 931, 1137, 193, 932, 933, - 934, 193, 997, 935, 193, 940, 193, 193, 193, 193, - 937, 193, 193, 193, 193, 996, 193, 1137, 938, 193, - 939, 941, 193, 193, 193, 193, 193, 945, 193, 997, - 1137, 942, 940, 193, 193, 944, 193, 937, 193, 193, - 193, 193, 193, 193, 193, 193, 1137, 193, 941, 193, - - 193, 998, 193, 193, 945, 193, 943, 193, 942, 946, - 999, 193, 944, 1137, 193, 949, 1137, 947, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 998, 1000, - 948, 953, 193, 943, 193, 193, 946, 999, 193, 193, - 193, 193, 949, 193, 947, 193, 193, 1137, 952, 950, - 193, 193, 193, 193, 193, 951, 1000, 948, 953, 193, - 193, 954, 193, 193, 193, 193, 193, 193, 1137, 1137, - 193, 1137, 193, 193, 193, 952, 950, 957, 193, 955, - 193, 193, 951, 193, 193, 193, 193, 193, 954, 956, - 193, 193, 193, 193, 193, 193, 959, 958, 193, 193, - - 193, 193, 961, 1137, 957, 193, 955, 193, 193, 1137, - 193, 193, 193, 193, 960, 193, 956, 193, 193, 193, - 193, 193, 193, 959, 958, 193, 193, 193, 193, 961, - 962, 193, 193, 193, 193, 1137, 193, 193, 1137, 965, - 193, 960, 193, 1137, 193, 193, 193, 193, 193, 963, - 1137, 193, 1137, 193, 193, 193, 193, 962, 193, 193, - 193, 193, 964, 193, 193, 193, 965, 193, 193, 1137, - 193, 193, 1001, 193, 193, 193, 963, 967, 193, 966, - 193, 193, 193, 193, 1137, 193, 193, 968, 193, 964, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 1001, - - 193, 969, 193, 1137, 967, 193, 966, 193, 1002, 193, - 193, 193, 193, 970, 968, 193, 193, 193, 193, 193, - 193, 193, 972, 193, 975, 193, 971, 1003, 969, 193, - 193, 193, 193, 1137, 193, 1002, 1137, 193, 193, 193, - 970, 193, 193, 193, 193, 193, 193, 193, 193, 972, - 193, 975, 193, 971, 1003, 193, 1137, 193, 193, 976, - 973, 1137, 1137, 974, 1004, 193, 193, 193, 193, 193, - 193, 193, 193, 1137, 193, 193, 977, 193, 1137, 1005, - 193, 978, 193, 979, 193, 193, 976, 973, 981, 193, - 974, 1004, 193, 1006, 193, 982, 1137, 193, 193, 193, - - 193, 1137, 193, 977, 193, 193, 1005, 193, 978, 193, - 979, 193, 193, 980, 193, 981, 193, 193, 193, 193, - 1006, 1137, 982, 193, 1137, 193, 193, 193, 983, 986, - 984, 193, 193, 193, 193, 987, 193, 193, 985, 193, - 980, 193, 1137, 193, 193, 193, 193, 193, 988, 990, - 193, 989, 193, 193, 1007, 983, 986, 984, 1137, 193, - 193, 193, 987, 193, 193, 985, 193, 193, 193, 193, - 193, 193, 193, 992, 193, 988, 990, 193, 989, 193, - 193, 1007, 1008, 193, 994, 991, 193, 193, 193, 1009, - 193, 193, 1010, 193, 193, 193, 193, 193, 193, 193, - - 992, 1011, 993, 1012, 193, 1013, 1014, 193, 193, 1008, - 193, 994, 991, 193, 193, 193, 1009, 1015, 193, 1010, - 193, 1016, 1017, 1018, 193, 1019, 1020, 1021, 1011, 993, - 1012, 1022, 1013, 1014, 193, 193, 1023, 1024, 1025, 1026, - 193, 1027, 1029, 1137, 1015, 1137, 1137, 193, 1016, 1017, - 1018, 193, 1019, 1020, 1021, 1031, 193, 193, 1022, 193, - 1030, 193, 193, 1023, 1024, 1025, 1026, 193, 1027, 1029, - 1033, 193, 1032, 193, 193, 193, 193, 193, 193, 193, - 1034, 193, 1031, 193, 193, 1137, 193, 1030, 193, 193, - 1036, 193, 193, 193, 193, 193, 1137, 1033, 193, 1032, - - 193, 193, 193, 193, 193, 193, 193, 1034, 193, 1035, - 1037, 193, 193, 193, 193, 193, 1137, 1036, 193, 193, - 193, 193, 193, 1038, 193, 193, 193, 1039, 193, 193, - 1137, 1137, 193, 193, 193, 1040, 1035, 1037, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 1137, 193, 193, - 1038, 193, 193, 193, 1039, 193, 193, 193, 193, 193, - 193, 193, 1040, 193, 1137, 193, 1041, 193, 193, 193, - 193, 193, 193, 193, 1042, 1137, 193, 193, 193, 193, - 1044, 1137, 193, 1137, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 1041, 193, 193, 193, 193, 1137, 193, - - 193, 1042, 193, 193, 193, 193, 193, 1044, 1046, 1045, - 1043, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 1137, 1048, 193, 193, 193, 193, 193, 193, 1047, 193, - 193, 193, 193, 193, 1137, 1046, 1045, 1043, 193, 193, - 193, 193, 1062, 193, 193, 1049, 193, 193, 1048, 193, - 193, 193, 193, 193, 1050, 1047, 193, 1137, 193, 193, - 193, 1052, 1051, 193, 193, 193, 193, 193, 193, 1062, - 193, 1137, 1049, 193, 193, 193, 193, 1063, 193, 1137, - 193, 1050, 1053, 193, 193, 193, 193, 1137, 1052, 1051, - 193, 193, 193, 193, 193, 193, 1056, 1054, 193, 193, - - 193, 193, 193, 193, 1063, 1064, 1055, 193, 1137, 1053, - 193, 193, 193, 193, 1057, 193, 193, 1137, 193, 193, - 193, 193, 193, 1056, 1054, 193, 193, 193, 193, 1137, - 193, 193, 1064, 1055, 193, 193, 193, 193, 1065, 1066, - 193, 1057, 193, 193, 1058, 193, 193, 193, 193, 193, - 193, 193, 1059, 1067, 193, 1068, 1060, 193, 193, 1069, - 1070, 1071, 193, 193, 1072, 1065, 1066, 193, 1073, 193, - 193, 1058, 1074, 1075, 193, 1137, 193, 193, 193, 1059, - 1067, 1137, 1068, 1060, 193, 193, 1069, 1070, 1071, 1077, - 193, 1072, 1092, 193, 193, 1073, 193, 193, 1078, 1074, - - 1075, 193, 1079, 193, 193, 193, 193, 1080, 193, 193, - 193, 193, 193, 193, 1137, 1137, 1077, 193, 193, 1092, - 193, 193, 193, 193, 193, 1078, 193, 193, 193, 1079, - 193, 193, 193, 193, 1080, 193, 193, 193, 193, 1081, - 193, 193, 193, 193, 193, 193, 1093, 193, 1137, 193, - 193, 193, 1137, 193, 193, 193, 1084, 1082, 193, 193, - 1083, 193, 193, 193, 1094, 193, 1081, 193, 193, 193, - 193, 193, 193, 1093, 193, 193, 193, 193, 193, 193, - 193, 1086, 193, 1084, 1082, 193, 193, 1083, 193, 193, - 193, 1094, 193, 1085, 193, 193, 193, 193, 193, 193, - - 193, 193, 193, 193, 193, 193, 193, 193, 1086, 193, - 193, 1089, 1090, 193, 1087, 193, 193, 1095, 1088, 193, - 1085, 193, 193, 193, 193, 193, 193, 193, 193, 1096, - 193, 1097, 193, 193, 1098, 193, 1137, 193, 1089, 1090, - 193, 1087, 193, 193, 1095, 1088, 193, 193, 193, 193, - 193, 193, 193, 193, 1137, 193, 1096, 193, 1097, 193, - 193, 1098, 193, 1100, 1101, 193, 193, 193, 193, 193, + 1151, 193, 517, 404, 405, 406, 1151, 407, 1151, 420, + 1151, 1151, 410, 193, 417, 418, 193, 411, 1151, 193, + 1151, 193, 1151, 193, 193, 516, 193, 421, 193, 517, + 404, 405, 406, 193, 407, 193, 420, 422, 193, 410, + 193, 417, 418, 193, 411, 412, 193, 413, 193, 193, + 414, 419, 1151, 193, 421, 193, 415, 423, 193, 193, + 193, 193, 193, 416, 422, 193, 518, 1151, 429, 193, + 519, 1151, 412, 193, 413, 520, 193, 414, 419, 193, + 193, 193, 193, 415, 423, 193, 193, 1151, 193, 521, + + 416, 193, 1151, 518, 193, 429, 193, 519, 430, 193, + 193, 522, 520, 193, 431, 1151, 193, 424, 193, 425, + 434, 193, 193, 426, 193, 440, 521, 1151, 193, 193, + 427, 193, 433, 193, 428, 430, 193, 1151, 522, 193, + 193, 431, 193, 193, 424, 193, 425, 434, 193, 193, + 426, 193, 440, 435, 193, 436, 193, 427, 193, 433, + 193, 428, 523, 193, 193, 193, 193, 439, 437, 193, + 193, 438, 193, 193, 193, 442, 1151, 441, 193, 193, + 435, 193, 436, 193, 193, 193, 526, 448, 447, 523, + 193, 193, 193, 193, 439, 437, 193, 1151, 438, 193, + + 193, 193, 442, 193, 441, 193, 193, 193, 450, 1151, + 193, 193, 527, 526, 448, 447, 449, 1151, 528, 529, + 193, 443, 193, 193, 193, 1151, 193, 193, 1151, 1151, + 193, 444, 193, 457, 193, 450, 445, 446, 451, 527, + 452, 524, 193, 449, 193, 528, 529, 1151, 443, 193, + 1151, 193, 193, 453, 193, 454, 525, 193, 444, 193, + 457, 193, 530, 445, 446, 451, 455, 452, 524, 193, + 531, 193, 193, 1151, 456, 193, 193, 193, 1151, 193, + 453, 193, 454, 525, 193, 458, 532, 459, 193, 530, + 460, 193, 193, 455, 533, 193, 193, 531, 461, 193, + + 193, 456, 193, 193, 193, 462, 193, 463, 193, 193, + 1151, 193, 458, 532, 459, 485, 1151, 460, 193, 193, + 193, 533, 193, 193, 1151, 461, 193, 193, 193, 193, + 464, 193, 462, 193, 463, 193, 193, 467, 193, 193, + 468, 193, 485, 465, 469, 1151, 534, 193, 193, 1151, + 535, 193, 466, 193, 1151, 193, 193, 464, 193, 193, + 193, 193, 193, 1151, 467, 536, 193, 468, 193, 1151, + 465, 469, 470, 534, 193, 193, 193, 535, 193, 466, + 193, 474, 473, 537, 1151, 471, 193, 193, 193, 1151, + 472, 538, 536, 498, 193, 193, 193, 1151, 475, 470, + + 193, 193, 476, 193, 193, 539, 193, 193, 474, 473, + 537, 477, 471, 193, 1151, 193, 479, 472, 538, 478, + 498, 193, 193, 193, 193, 475, 193, 193, 193, 476, + 481, 193, 539, 193, 193, 540, 482, 1151, 477, 193, + 193, 480, 193, 479, 193, 193, 478, 1151, 193, 541, + 193, 193, 486, 193, 193, 193, 487, 481, 483, 193, + 1151, 193, 540, 482, 193, 193, 193, 1151, 480, 484, + 193, 193, 193, 1151, 488, 193, 541, 193, 193, 486, + 193, 193, 1151, 487, 490, 483, 193, 491, 492, 193, + 1151, 193, 193, 496, 489, 1151, 484, 193, 193, 193, + + 193, 488, 1151, 493, 542, 193, 497, 193, 1151, 193, + 1151, 490, 543, 193, 491, 492, 193, 193, 1151, 193, + 496, 489, 193, 544, 500, 193, 193, 193, 193, 494, + 493, 542, 499, 497, 545, 495, 193, 193, 546, 543, + 193, 547, 193, 510, 193, 511, 193, 548, 193, 193, + 544, 500, 1151, 1151, 1151, 193, 494, 1151, 1151, 499, + 512, 545, 495, 549, 193, 546, 550, 551, 547, 193, + 510, 552, 511, 553, 548, 193, 275, 275, 275, 275, + 275, 275, 275, 275, 275, 275, 554, 512, 557, 555, + 549, 558, 559, 550, 551, 560, 561, 562, 552, 556, + + 553, 563, 564, 565, 566, 567, 568, 569, 570, 571, + 572, 573, 574, 554, 575, 557, 555, 576, 558, 559, + 577, 578, 560, 561, 562, 579, 556, 580, 563, 564, + 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, + 581, 575, 582, 583, 576, 584, 585, 577, 578, 586, + 587, 588, 579, 589, 580, 590, 591, 592, 593, 594, + 599, 597, 595, 598, 600, 601, 602, 581, 605, 582, + 583, 596, 584, 585, 603, 606, 586, 587, 588, 609, + 589, 610, 590, 591, 592, 593, 594, 599, 597, 595, + 598, 600, 601, 602, 1151, 605, 604, 1151, 596, 607, + + 193, 603, 606, 608, 612, 193, 609, 1151, 610, 389, + 389, 389, 389, 389, 389, 389, 389, 389, 389, 613, + 193, 193, 193, 604, 193, 193, 607, 193, 614, 615, + 608, 612, 193, 193, 193, 1151, 1151, 722, 1151, 193, + 1151, 193, 193, 723, 1151, 193, 613, 193, 193, 193, + 1151, 193, 193, 193, 193, 614, 615, 193, 193, 724, + 193, 193, 617, 618, 722, 193, 193, 616, 193, 193, + 723, 620, 193, 621, 1151, 193, 1151, 193, 193, 193, + 193, 193, 619, 193, 193, 193, 724, 625, 622, 617, + 618, 193, 193, 193, 616, 193, 623, 193, 620, 193, + + 621, 193, 193, 193, 193, 193, 193, 624, 1151, 619, + 193, 193, 626, 193, 625, 622, 630, 193, 193, 1151, + 193, 627, 193, 623, 193, 628, 193, 629, 193, 193, + 193, 193, 1151, 193, 624, 193, 193, 193, 193, 626, + 193, 632, 631, 630, 193, 725, 633, 1151, 627, 193, + 193, 193, 628, 1151, 629, 193, 193, 193, 193, 634, + 193, 637, 193, 193, 193, 636, 1151, 193, 632, 631, + 193, 641, 725, 633, 635, 193, 193, 193, 193, 193, + 639, 193, 193, 193, 193, 193, 634, 193, 637, 193, + 638, 193, 636, 643, 193, 193, 640, 193, 641, 726, + + 642, 635, 193, 193, 193, 193, 193, 639, 193, 193, + 193, 1151, 193, 193, 193, 193, 193, 638, 193, 644, + 643, 193, 193, 640, 193, 193, 726, 642, 727, 645, + 193, 193, 193, 193, 649, 193, 193, 193, 647, 650, + 193, 193, 193, 193, 646, 193, 644, 648, 193, 728, + 1151, 193, 193, 193, 193, 727, 645, 193, 1151, 193, + 193, 649, 193, 193, 193, 647, 650, 651, 193, 193, + 193, 646, 193, 1151, 648, 193, 728, 652, 193, 193, + 193, 193, 653, 193, 193, 654, 193, 193, 193, 193, + 193, 657, 1151, 658, 651, 193, 193, 193, 193, 655, + + 656, 193, 193, 193, 652, 193, 193, 193, 193, 653, + 193, 661, 654, 662, 193, 193, 193, 193, 657, 193, + 658, 193, 193, 193, 193, 193, 655, 656, 193, 660, + 193, 663, 659, 193, 193, 193, 1151, 664, 661, 193, + 662, 729, 665, 193, 193, 193, 193, 1151, 193, 1151, + 193, 193, 666, 193, 193, 1151, 660, 193, 663, 659, + 193, 667, 193, 668, 664, 193, 193, 193, 729, 665, + 193, 670, 193, 193, 193, 672, 193, 730, 193, 666, + 193, 193, 669, 1151, 193, 731, 1151, 193, 667, 193, + 668, 193, 193, 193, 193, 673, 193, 671, 670, 193, + + 193, 193, 672, 193, 730, 193, 732, 674, 193, 669, + 675, 193, 731, 193, 193, 1151, 733, 1151, 193, 193, + 193, 193, 673, 193, 671, 193, 193, 676, 193, 193, + 193, 193, 193, 732, 674, 193, 677, 675, 193, 193, + 193, 193, 682, 733, 193, 678, 193, 193, 193, 193, + 193, 679, 193, 681, 676, 193, 193, 193, 193, 193, + 680, 683, 193, 677, 193, 1151, 193, 193, 193, 682, + 1151, 193, 678, 193, 193, 684, 193, 193, 679, 193, + 681, 193, 685, 1151, 193, 193, 193, 680, 683, 193, + 193, 193, 688, 193, 193, 686, 1151, 689, 687, 193, + + 193, 193, 684, 193, 193, 193, 193, 193, 193, 685, + 193, 193, 193, 193, 692, 693, 691, 193, 690, 688, + 193, 193, 686, 193, 689, 687, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 1151, 193, 695, 694, + 193, 692, 693, 691, 193, 690, 1151, 1151, 193, 193, + 193, 1151, 193, 193, 193, 1151, 193, 1151, 193, 1151, + 193, 703, 193, 193, 193, 695, 694, 193, 697, 193, + 696, 193, 193, 193, 699, 1151, 193, 734, 698, 193, + 193, 193, 193, 193, 701, 193, 193, 193, 703, 193, + 193, 193, 735, 700, 193, 697, 193, 696, 193, 193, + + 193, 699, 193, 193, 734, 698, 193, 702, 193, 193, + 193, 701, 704, 193, 193, 705, 193, 193, 193, 735, + 700, 736, 1151, 193, 706, 193, 193, 709, 710, 193, + 193, 1151, 193, 193, 702, 193, 707, 193, 708, 704, + 193, 193, 705, 737, 193, 193, 193, 1151, 736, 711, + 193, 706, 193, 193, 709, 710, 713, 712, 193, 193, + 193, 193, 193, 707, 193, 708, 193, 193, 193, 738, + 737, 193, 1151, 193, 193, 1151, 711, 719, 714, 193, + 739, 716, 193, 713, 712, 193, 193, 193, 193, 715, + 193, 193, 740, 193, 193, 720, 738, 741, 193, 717, + + 742, 193, 193, 718, 719, 714, 743, 739, 716, 193, + 193, 744, 745, 193, 746, 747, 715, 193, 193, 740, + 748, 193, 720, 749, 741, 750, 717, 742, 751, 193, + 718, 752, 753, 743, 754, 755, 756, 193, 744, 745, + 757, 746, 747, 758, 759, 760, 761, 748, 762, 763, + 749, 765, 750, 766, 767, 751, 768, 771, 752, 753, + 764, 754, 755, 756, 769, 770, 772, 757, 773, 774, + 758, 759, 760, 761, 775, 762, 763, 776, 765, 777, + 766, 767, 778, 768, 771, 779, 780, 764, 781, 782, + 783, 769, 770, 772, 784, 773, 774, 785, 786, 787, + + 788, 775, 789, 790, 776, 791, 777, 792, 793, 778, + 794, 795, 779, 780, 796, 781, 782, 783, 797, 798, + 799, 784, 800, 801, 785, 786, 787, 788, 802, 789, + 790, 803, 791, 1151, 792, 793, 193, 794, 795, 193, + 193, 796, 193, 1151, 193, 797, 798, 799, 811, 800, + 801, 1151, 805, 806, 1151, 802, 807, 809, 803, 193, + 193, 193, 808, 193, 193, 193, 193, 193, 193, 193, + 810, 193, 812, 193, 193, 811, 193, 1151, 813, 805, + 806, 193, 193, 807, 809, 193, 193, 193, 193, 808, + 193, 193, 193, 193, 193, 193, 193, 810, 814, 812, + + 193, 193, 193, 193, 193, 813, 193, 193, 193, 193, + 193, 815, 193, 888, 1151, 193, 1151, 193, 889, 816, + 193, 193, 1151, 193, 193, 814, 193, 193, 193, 193, + 817, 193, 193, 193, 193, 193, 193, 193, 815, 820, + 888, 193, 193, 819, 193, 889, 816, 890, 193, 821, + 818, 193, 193, 193, 193, 193, 193, 817, 193, 193, + 822, 193, 193, 193, 193, 824, 820, 1151, 193, 193, + 819, 193, 1151, 823, 890, 193, 821, 818, 193, 193, + 826, 193, 193, 193, 193, 193, 193, 822, 193, 193, + 827, 193, 824, 1151, 825, 193, 193, 1151, 1151, 835, + + 823, 193, 193, 193, 193, 193, 193, 826, 193, 193, + 828, 193, 193, 193, 193, 193, 193, 827, 1151, 193, + 193, 825, 193, 193, 193, 829, 835, 832, 193, 193, + 193, 193, 193, 193, 193, 830, 831, 828, 193, 193, + 193, 193, 193, 1151, 193, 833, 193, 193, 1151, 193, + 193, 193, 829, 834, 832, 193, 1151, 193, 193, 193, + 1151, 193, 830, 831, 837, 193, 193, 193, 193, 193, + 836, 193, 833, 1151, 193, 193, 193, 193, 193, 838, + 834, 1151, 193, 193, 193, 193, 193, 193, 193, 839, + 891, 837, 1151, 193, 193, 193, 193, 836, 193, 193, + + 193, 193, 193, 193, 193, 193, 838, 193, 840, 193, + 193, 841, 892, 193, 193, 193, 839, 891, 1151, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 1151, 193, + 193, 193, 193, 1151, 193, 840, 193, 842, 841, 892, + 193, 843, 193, 193, 193, 844, 193, 193, 1151, 193, + 193, 193, 193, 845, 1151, 193, 193, 193, 193, 193, + 193, 193, 848, 846, 842, 193, 193, 193, 843, 193, + 193, 193, 844, 1151, 847, 193, 193, 193, 193, 193, + 845, 193, 193, 893, 193, 193, 193, 193, 193, 848, + 846, 849, 193, 193, 193, 851, 193, 193, 193, 193, + + 854, 847, 193, 193, 193, 193, 850, 894, 193, 1151, + 893, 895, 193, 193, 193, 193, 193, 193, 849, 193, + 193, 193, 851, 193, 193, 193, 193, 854, 896, 857, + 852, 853, 193, 850, 894, 1151, 193, 1151, 895, 1151, + 193, 193, 193, 193, 193, 855, 193, 193, 856, 193, + 193, 193, 193, 193, 193, 896, 857, 852, 853, 193, + 1151, 1151, 860, 193, 858, 193, 859, 193, 193, 1151, + 193, 193, 855, 193, 193, 856, 193, 193, 193, 193, + 193, 193, 861, 862, 897, 193, 193, 193, 193, 860, + 1151, 858, 193, 859, 898, 193, 193, 193, 193, 193, + + 193, 193, 193, 1151, 863, 193, 193, 193, 868, 861, + 862, 897, 193, 193, 193, 193, 193, 865, 864, 193, + 1151, 898, 193, 193, 866, 193, 193, 193, 193, 193, + 193, 863, 193, 193, 193, 868, 867, 869, 870, 193, + 899, 872, 900, 193, 865, 864, 193, 193, 193, 193, + 193, 866, 193, 193, 193, 193, 193, 193, 193, 193, + 871, 193, 193, 867, 869, 870, 193, 899, 872, 900, + 193, 1151, 873, 193, 193, 193, 193, 193, 193, 1151, + 193, 193, 193, 193, 193, 193, 193, 871, 193, 193, + 193, 876, 874, 193, 193, 875, 901, 193, 193, 873, + + 193, 193, 1151, 193, 193, 193, 193, 882, 193, 193, + 878, 193, 879, 193, 193, 877, 193, 193, 876, 874, + 193, 193, 875, 901, 1151, 193, 193, 193, 193, 193, + 193, 193, 881, 193, 882, 193, 193, 878, 883, 879, + 193, 193, 877, 193, 880, 1151, 193, 193, 193, 193, + 193, 884, 193, 193, 193, 193, 193, 193, 902, 881, + 886, 193, 193, 193, 885, 883, 193, 193, 193, 193, + 903, 880, 193, 193, 193, 193, 193, 193, 884, 193, + 193, 193, 193, 904, 905, 902, 906, 886, 193, 193, + 907, 885, 908, 193, 193, 193, 193, 903, 909, 193, + + 910, 911, 912, 913, 914, 915, 916, 193, 193, 917, + 904, 905, 918, 906, 919, 920, 193, 907, 921, 908, + 922, 923, 924, 925, 926, 909, 927, 910, 911, 912, + 913, 914, 915, 916, 928, 929, 917, 930, 931, 918, + 932, 919, 920, 933, 934, 921, 935, 922, 923, 924, + 925, 926, 936, 927, 937, 938, 939, 940, 941, 942, + 943, 928, 929, 944, 930, 931, 945, 932, 946, 193, + 933, 934, 193, 935, 193, 1151, 1151, 193, 1008, 936, + 949, 937, 938, 939, 940, 941, 942, 943, 193, 193, + 944, 950, 193, 945, 193, 946, 193, 193, 948, 193, + + 193, 193, 951, 193, 193, 1008, 1151, 949, 193, 1009, + 952, 193, 193, 193, 1151, 193, 193, 1151, 950, 193, + 1151, 193, 953, 193, 193, 948, 193, 193, 956, 951, + 193, 193, 193, 193, 193, 193, 1009, 952, 193, 193, + 193, 954, 193, 193, 955, 1151, 193, 957, 193, 953, + 193, 193, 958, 193, 193, 956, 1010, 193, 193, 193, + 193, 193, 193, 193, 960, 961, 193, 1151, 954, 193, + 193, 955, 959, 193, 957, 193, 193, 193, 193, 958, + 193, 193, 965, 1010, 193, 193, 193, 1151, 193, 193, + 193, 960, 961, 193, 193, 963, 193, 964, 962, 959, + + 193, 1151, 193, 193, 193, 1151, 966, 193, 193, 965, + 1151, 1151, 193, 193, 193, 193, 193, 193, 193, 1151, + 193, 193, 963, 193, 964, 962, 193, 193, 971, 193, + 193, 967, 968, 966, 969, 193, 193, 193, 193, 1151, + 193, 193, 193, 193, 193, 193, 970, 193, 193, 1151, + 193, 193, 1151, 193, 193, 971, 193, 193, 967, 968, + 1011, 969, 193, 193, 193, 193, 972, 193, 193, 193, + 193, 193, 193, 970, 193, 193, 193, 193, 193, 973, + 193, 193, 974, 193, 193, 975, 1151, 1011, 193, 193, + 193, 1151, 193, 972, 977, 193, 193, 193, 193, 193, + + 193, 193, 1151, 193, 193, 193, 973, 193, 193, 974, + 978, 193, 975, 193, 193, 193, 193, 193, 193, 193, + 976, 977, 193, 193, 193, 193, 193, 193, 980, 979, + 193, 193, 193, 193, 1012, 193, 1151, 978, 193, 1013, + 193, 193, 193, 193, 193, 193, 193, 976, 193, 193, + 193, 193, 193, 193, 981, 980, 979, 193, 193, 193, + 193, 1012, 982, 193, 193, 193, 1013, 193, 984, 193, + 1151, 193, 1151, 193, 1151, 193, 987, 193, 193, 193, + 193, 981, 983, 193, 193, 193, 193, 193, 193, 982, + 193, 193, 1151, 985, 193, 984, 193, 193, 193, 193, + + 193, 988, 1151, 987, 1151, 193, 193, 193, 1014, 983, + 193, 193, 986, 1015, 193, 193, 193, 193, 193, 193, + 985, 991, 193, 193, 193, 193, 193, 193, 988, 989, + 990, 992, 1151, 193, 193, 1014, 193, 1151, 1016, 986, + 1015, 1151, 193, 193, 193, 193, 193, 193, 991, 193, + 993, 193, 1151, 193, 193, 994, 989, 990, 992, 193, + 193, 193, 997, 193, 998, 1016, 1151, 193, 193, 193, + 193, 193, 193, 193, 193, 1151, 1000, 993, 193, 193, + 193, 193, 994, 999, 995, 996, 193, 193, 193, 997, + 193, 998, 193, 193, 193, 193, 193, 193, 193, 193, + + 193, 1001, 193, 1000, 1002, 193, 193, 193, 1151, 1151, + 999, 995, 996, 193, 193, 193, 193, 193, 1017, 193, + 193, 1018, 193, 193, 193, 193, 1004, 1003, 1001, 193, + 193, 1002, 193, 193, 193, 193, 193, 1006, 1019, 1020, + 193, 193, 1021, 193, 1005, 1017, 1022, 1023, 1018, 193, + 193, 193, 193, 1004, 1003, 193, 1024, 193, 1025, 1026, + 193, 193, 193, 193, 1006, 1019, 1020, 1027, 193, 1021, + 1028, 1005, 1029, 1022, 1023, 1030, 1031, 193, 1032, 1033, + 1034, 1035, 193, 1024, 1036, 1025, 1026, 1037, 193, 1038, + 1039, 1040, 1042, 193, 1027, 193, 1151, 1028, 1151, 1029, + + 1151, 1044, 1030, 1031, 1043, 1032, 1033, 1034, 1035, 193, + 1151, 1036, 193, 193, 1037, 193, 1038, 1039, 1040, 1042, + 193, 193, 193, 193, 1045, 193, 193, 193, 1044, 193, + 1151, 1043, 1076, 1047, 1151, 1077, 193, 1046, 1151, 193, + 193, 193, 193, 193, 1078, 193, 193, 193, 193, 1048, + 193, 1045, 193, 193, 193, 1049, 193, 193, 193, 1076, + 1047, 193, 1077, 193, 1046, 1050, 193, 1151, 193, 193, + 193, 1078, 193, 193, 193, 1079, 1048, 193, 193, 193, + 193, 1051, 1049, 193, 193, 193, 193, 1151, 193, 193, + 193, 1052, 1050, 193, 193, 1053, 193, 193, 1151, 193, + + 193, 1151, 1079, 193, 193, 193, 193, 193, 1051, 1054, + 193, 193, 1151, 193, 193, 1080, 193, 193, 1052, 193, + 193, 193, 1053, 193, 193, 193, 193, 193, 1055, 193, + 193, 193, 1151, 193, 193, 1056, 1054, 193, 193, 193, + 193, 193, 1080, 193, 193, 193, 193, 193, 1058, 193, + 193, 1151, 193, 193, 193, 1055, 193, 193, 193, 193, + 193, 193, 1056, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 1060, 1062, 1058, 193, 193, 1057, 193, + 193, 193, 193, 1081, 193, 193, 193, 193, 193, 1059, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 1082, + + 1060, 1062, 193, 1061, 193, 1057, 193, 1063, 193, 193, + 1081, 193, 193, 193, 193, 193, 1059, 1064, 193, 193, + 193, 193, 193, 1065, 193, 193, 1082, 193, 193, 193, + 1061, 193, 1151, 1151, 1063, 193, 1066, 193, 193, 193, + 193, 1151, 193, 1151, 1064, 193, 193, 193, 193, 193, + 1065, 1083, 193, 193, 193, 193, 193, 193, 193, 193, + 1067, 1068, 193, 1066, 193, 193, 193, 1069, 1070, 193, + 193, 193, 193, 193, 193, 193, 193, 1071, 1083, 193, + 193, 193, 193, 193, 193, 193, 193, 1067, 1068, 193, + 193, 193, 193, 193, 1069, 1070, 1151, 193, 193, 1084, + + 193, 193, 193, 193, 1071, 193, 193, 1073, 193, 193, + 1085, 1086, 193, 193, 1087, 1072, 193, 193, 193, 1088, + 193, 1089, 193, 1074, 193, 193, 1084, 193, 193, 193, + 1151, 1151, 193, 193, 1073, 1091, 193, 1085, 1086, 193, + 193, 1087, 1072, 193, 193, 193, 1088, 193, 1089, 193, + 1074, 193, 193, 193, 193, 193, 1092, 1093, 193, 193, + 193, 193, 1091, 193, 1151, 193, 193, 193, 1151, 1094, + 1151, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 1092, 1093, 193, 193, 193, 193, 193, + 1095, 193, 193, 193, 193, 193, 1094, 193, 1151, 193, + + 193, 193, 193, 193, 193, 193, 193, 1096, 193, 193, + 193, 193, 1098, 193, 193, 193, 193, 1095, 193, 1151, + 193, 193, 193, 1097, 193, 193, 193, 1106, 193, 193, + 193, 193, 193, 193, 1096, 193, 193, 193, 193, 1098, + 193, 193, 193, 193, 1107, 193, 1099, 1100, 193, 1104, + 1097, 193, 193, 1151, 1106, 1108, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 1102, 1103, 193, 193, 193, 193, 193, 1108, 193, 193, - 1100, 1101, 193, 193, 193, 193, 193, 193, 193, 193, - - 1105, 193, 193, 193, 1104, 1106, 193, 1102, 1103, 193, - 193, 193, 193, 193, 1108, 193, 193, 1109, 1110, 193, - 1112, 193, 193, 193, 1116, 1137, 193, 1105, 193, 1137, - 193, 1104, 1106, 193, 193, 193, 193, 1113, 1137, 193, - 193, 1137, 193, 193, 1109, 1110, 193, 1112, 193, 193, - 193, 1116, 193, 193, 193, 193, 193, 193, 193, 1137, - 1137, 193, 193, 1137, 1113, 1137, 193, 193, 1114, 193, - 193, 193, 193, 1137, 1137, 1137, 193, 193, 193, 193, - 1118, 193, 193, 193, 193, 193, 1137, 1137, 1137, 1137, - 1137, 193, 1137, 1137, 1137, 1114, 1137, 1137, 193, 193, - - 1137, 1137, 1137, 193, 193, 193, 1137, 1118, 1137, 1137, - 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 193, 46, - 46, 46, 46, 46, 88, 1137, 1137, 88, 88, 178, - 178, 178, 1137, 178, 180, 1137, 180, 180, 180, 183, - 1137, 183, 183, 183, 193, 1137, 193, 193, 193, 7, - 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, - 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, - 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, - 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, - 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, - - 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, - 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, - 1137, 1137, 1137, 1137, 1137, 1137 + 193, 1107, 193, 1099, 1100, 1102, 1104, 1101, 193, 193, + 1103, 193, 1108, 1109, 193, 193, 193, 193, 193, 1110, + 193, 193, 193, 193, 193, 1111, 193, 1112, 1151, 193, + + 193, 193, 1102, 1151, 1101, 193, 193, 1103, 193, 193, + 1109, 193, 193, 193, 193, 193, 1110, 193, 1114, 193, + 193, 193, 1111, 193, 1112, 193, 193, 193, 193, 193, + 1115, 1151, 193, 193, 1116, 193, 193, 193, 193, 193, + 1151, 193, 193, 193, 193, 1114, 193, 193, 193, 193, + 193, 1117, 193, 193, 1122, 193, 193, 1115, 193, 1120, + 193, 1116, 193, 193, 193, 193, 193, 193, 193, 1118, + 193, 1123, 1124, 193, 1119, 193, 193, 1126, 1117, 1130, + 193, 1122, 193, 193, 1151, 193, 1120, 193, 193, 193, + 193, 193, 193, 193, 193, 1151, 1118, 193, 1123, 1124, + + 193, 1119, 193, 1127, 1126, 193, 1130, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 1128, 193, 193, + 193, 193, 193, 1151, 193, 193, 1151, 193, 1151, 1151, + 1127, 1132, 193, 193, 193, 193, 193, 1151, 193, 193, + 193, 193, 193, 1151, 1128, 1151, 1151, 1151, 193, 193, + 1151, 1151, 193, 1151, 193, 1151, 1151, 1151, 1132, 1151, + 193, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 193, 193, + 46, 46, 46, 46, 46, 88, 1151, 1151, 88, 88, + 178, 178, 178, 1151, 178, 180, 1151, 180, 180, 180, + 183, 1151, 183, 183, 183, 193, 1151, 193, 193, 193, + + 7, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151 } ; -static const flex_int16_t yy_chk[4627] = +static const flex_int16_t yy_chk[4678] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -1549,43 +1558,43 @@ static const flex_int16_t yy_chk[4627] = 5, 5, 9, 9, 10, 10, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, - 18, 21, 22, 21, 24, 1140, 23, 30, 24, 21, - 1134, 21, 24, 23, 31, 21, 21, 44, 24, 99, + 18, 21, 22, 21, 24, 1154, 23, 30, 24, 21, + 1148, 21, 24, 23, 31, 21, 21, 44, 24, 99, - 23, 24, 22, 23, 1133, 25, 1132, 25, 21, 22, + 23, 24, 22, 23, 1147, 25, 1146, 25, 21, 22, 21, 24, 25, 23, 30, 24, 21, 25, 21, 24, 23, 31, 21, 21, 44, 24, 99, 23, 24, 22, - 23, 27, 25, 28, 25, 1131, 32, 27, 1130, 25, + 23, 27, 25, 28, 25, 1145, 32, 27, 1144, 25, 32, 28, 29, 42, 25, 26, 32, 28, 29, 29, - 29, 42, 1129, 26, 1128, 29, 26, 1127, 27, 26, - 28, 1126, 26, 32, 27, 26, 1125, 32, 28, 29, - 42, 1124, 26, 32, 28, 29, 29, 29, 42, 34, + 29, 42, 1143, 26, 1142, 29, 26, 1141, 27, 26, + 28, 1140, 26, 32, 27, 26, 1139, 32, 28, 29, + 42, 1138, 26, 32, 28, 29, 29, 29, 42, 34, 26, 33, 29, 26, 36, 33, 26, 43, 43, 26, - 35, 33, 26, 34, 1123, 36, 49, 49, 35, 34, + 35, 33, 26, 34, 1137, 36, 49, 49, 35, 34, - 34, 36, 35, 38, 1122, 35, 34, 38, 33, 50, - 50, 36, 33, 38, 43, 43, 1121, 35, 33, 41, + 34, 36, 35, 38, 1136, 35, 34, 38, 33, 50, + 50, 36, 33, 38, 43, 43, 1135, 35, 33, 41, 34, 41, 36, 100, 41, 35, 34, 34, 36, 35, 38, 39, 35, 39, 38, 103, 39, 71, 55, 104, - 38, 58, 58, 39, 39, 1120, 41, 1119, 41, 55, - 100, 41, 86, 86, 67, 70, 108, 71, 39, 1117, + 38, 58, 58, 39, 39, 1134, 41, 1133, 41, 55, + 100, 41, 86, 86, 67, 70, 108, 71, 39, 1131, 39, 67, 103, 39, 71, 70, 104, 67, 111, 101, 39, 39, 40, 111, 67, 70, 40, 101, 107, 40, 40, 67, 70, 108, 71, 107, 40, 114, 67, 40, - 181, 181, 70, 1115, 67, 111, 101, 1111, 1107, 40, + 181, 181, 70, 1129, 67, 111, 101, 1125, 1121, 40, - 111, 67, 70, 40, 101, 107, 40, 40, 1099, 1091, - 1076, 1061, 107, 40, 114, 1028, 40, 56, 56, 56, + 111, 67, 70, 40, 101, 107, 40, 40, 1113, 1105, + 1090, 1075, 107, 40, 114, 1041, 40, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 61, 61, - 995, 61, 61, 61, 61, 61, 61, 77, 68, 84, - 936, 877, 68, 795, 713, 115, 68, 61, 61, 61, + 1007, 61, 61, 61, 61, 61, 61, 77, 68, 84, + 947, 887, 68, 804, 721, 115, 68, 61, 61, 61, 72, 116, 68, 61, 72, 61, 117, 77, 118, 84, 72, 61, 68, 61, 77, 68, 84, 61, 61, 68, - 72, 83, 115, 68, 83, 83, 605, 72, 116, 68, + 72, 83, 115, 68, 83, 83, 611, 72, 116, 68, 61, 72, 61, 117, 77, 118, 84, 72, 61, 68, - 61, 83, 120, 497, 61, 61, 386, 72, 83, 274, + 61, 83, 120, 501, 61, 61, 388, 72, 83, 274, 185, 83, 83, 61, 62, 62, 183, 62, 62, 62, 62, 62, 62, 90, 88, 85, 73, 76, 83, 120, 73, 76, 60, 62, 62, 62, 73, 110, 76, 78, @@ -1593,452 +1602,457 @@ static const flex_int16_t yy_chk[4627] = 81, 76, 81, 73, 76, 81, 122, 73, 76, 78, 62, 81, 59, 73, 110, 76, 78, 62, 81, 102, 78, 76, 102, 73, 110, 121, 78, 81, 76, 81, - 52, 51, 81, 122, 105, 105, 78, 62, 81, 62, - 63, 123, 82, 124, 63, 125, 82, 63, 105, 126, - - 82, 109, 109, 109, 63, 109, 47, 63, 113, 113, - 127, 105, 105, 129, 63, 45, 82, 63, 123, 82, - 124, 63, 125, 82, 63, 105, 126, 82, 109, 109, - 109, 63, 109, 112, 63, 113, 113, 127, 112, 20, - 129, 63, 64, 82, 112, 19, 64, 130, 132, 128, + 52, 123, 81, 122, 105, 105, 78, 62, 81, 62, + 63, 124, 82, 125, 63, 126, 82, 63, 105, 127, + + 82, 109, 109, 109, 63, 109, 51, 63, 123, 113, + 113, 105, 105, 129, 63, 47, 82, 63, 124, 82, + 125, 63, 126, 82, 63, 105, 127, 82, 109, 109, + 109, 63, 109, 112, 63, 112, 113, 113, 112, 45, + 129, 63, 64, 82, 112, 20, 64, 130, 132, 128, 64, 112, 128, 133, 135, 119, 64, 119, 136, 64, - 112, 119, 137, 11, 138, 112, 64, 7, 119, 64, - 141, 112, 119, 64, 130, 132, 128, 64, 112, 128, - 133, 135, 119, 64, 119, 136, 64, 4, 119, 137, - 134, 138, 142, 64, 65, 119, 139, 141, 139, 119, + 112, 119, 112, 19, 137, 112, 64, 11, 119, 64, + 138, 112, 119, 64, 130, 132, 128, 64, 112, 128, + 133, 135, 119, 64, 119, 136, 64, 7, 119, 141, + 134, 137, 142, 64, 65, 119, 139, 138, 139, 119, 134, 65, 143, 65, 144, 134, 134, 140, 65, 140, - 145, 146, 147, 65, 65, 3, 148, 134, 150, 142, - 140, 65, 151, 139, 152, 139, 0, 134, 65, 143, + 145, 146, 147, 65, 65, 4, 141, 134, 148, 142, + 140, 65, 150, 139, 151, 139, 3, 134, 65, 143, 65, 144, 134, 134, 140, 65, 140, 145, 146, 147, - 65, 65, 66, 148, 153, 150, 66, 140, 154, 151, - 66, 152, 154, 66, 156, 155, 66, 157, 158, 66, - 155, 159, 66, 160, 161, 162, 66, 0, 0, 66, - 159, 153, 163, 66, 0, 154, 0, 66, 159, 154, - 66, 156, 155, 66, 157, 158, 66, 155, 159, 66, - 160, 161, 162, 66, 69, 69, 164, 159, 165, 163, - - 166, 69, 69, 69, 167, 159, 168, 164, 69, 169, - 170, 171, 169, 174, 69, 0, 175, 0, 172, 0, - 176, 69, 69, 164, 172, 165, 168, 166, 69, 69, - 69, 167, 193, 168, 164, 69, 169, 170, 171, 169, - 174, 69, 74, 175, 173, 172, 74, 176, 277, 194, - 194, 172, 193, 168, 0, 279, 74, 173, 0, 193, - 280, 282, 74, 74, 284, 0, 74, 0, 0, 74, - 194, 173, 0, 74, 0, 277, 194, 194, 0, 193, - 0, 195, 279, 74, 173, 196, 198, 280, 282, 74, - 74, 284, 196, 74, 75, 75, 195, 194, 201, 198, - - 196, 195, 199, 75, 199, 196, 198, 75, 195, 285, - 75, 0, 196, 198, 75, 0, 286, 0, 201, 196, - 0, 75, 75, 195, 199, 201, 198, 196, 195, 199, - 75, 199, 196, 198, 75, 197, 285, 75, 197, 197, - 287, 75, 79, 286, 79, 201, 289, 79, 200, 200, - 200, 199, 290, 291, 79, 79, 0, 0, 0, 197, - 0, 0, 197, 200, 79, 197, 197, 287, 200, 79, - 292, 79, 0, 289, 79, 200, 200, 200, 215, 290, - 291, 79, 79, 205, 203, 215, 197, 202, 203, 0, - 200, 79, 80, 205, 202, 200, 80, 292, 215, 80, - - 80, 202, 293, 205, 294, 215, 80, 202, 203, 80, - 205, 203, 215, 295, 202, 203, 80, 0, 0, 80, - 205, 202, 0, 80, 0, 215, 80, 80, 202, 293, - 205, 294, 0, 80, 202, 203, 80, 0, 0, 0, - 295, 0, 0, 80, 91, 91, 91, 91, 91, 91, + 65, 65, 66, 152, 153, 148, 66, 140, 154, 150, + 66, 151, 154, 66, 156, 157, 66, 158, 0, 66, + 160, 0, 66, 0, 161, 162, 66, 0, 0, 66, + 152, 153, 155, 66, 0, 154, 0, 66, 0, 154, + 66, 156, 157, 66, 158, 155, 66, 160, 159, 66, + 155, 161, 162, 66, 69, 69, 163, 159, 164, 155, + + 165, 69, 69, 69, 166, 159, 167, 169, 69, 164, + 169, 0, 155, 170, 69, 159, 171, 155, 168, 0, + 172, 69, 69, 163, 159, 164, 172, 165, 69, 69, + 69, 166, 159, 167, 169, 69, 164, 169, 168, 0, + 170, 69, 74, 171, 173, 168, 74, 172, 174, 175, + 176, 277, 193, 172, 0, 0, 74, 173, 0, 279, + 194, 194, 74, 74, 280, 168, 74, 0, 0, 74, + 0, 173, 193, 74, 282, 174, 175, 176, 277, 193, + 0, 194, 195, 74, 173, 196, 279, 194, 194, 74, + 74, 280, 196, 74, 75, 75, 199, 195, 199, 193, + + 196, 282, 195, 75, 0, 196, 0, 75, 194, 195, + 75, 0, 196, 198, 75, 0, 284, 0, 199, 196, + 0, 75, 75, 199, 195, 199, 198, 196, 0, 195, + 75, 201, 196, 198, 75, 197, 0, 75, 197, 197, + 198, 75, 79, 284, 79, 199, 285, 79, 200, 200, + 200, 201, 286, 198, 79, 79, 0, 0, 201, 197, + 198, 0, 197, 200, 79, 197, 197, 0, 200, 79, + 287, 79, 0, 285, 79, 200, 200, 200, 201, 286, + 0, 79, 79, 205, 203, 218, 197, 202, 203, 0, + 200, 79, 80, 205, 202, 200, 80, 287, 218, 80, + + 80, 202, 289, 205, 290, 218, 80, 202, 203, 80, + 205, 203, 218, 291, 202, 203, 80, 0, 0, 80, + 205, 202, 0, 80, 0, 218, 80, 80, 202, 289, + 205, 290, 218, 80, 202, 203, 80, 0, 0, 0, + 291, 0, 0, 80, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 188, 188, 188, 188, 188, - 188, 188, 188, 188, 188, 188, 204, 206, 296, 209, - 208, 210, 298, 204, 204, 204, 0, 204, 0, 299, - 0, 210, 206, 208, 208, 209, 204, 206, 0, 209, - 208, 210, 0, 204, 206, 296, 209, 208, 210, 298, - 204, 204, 204, 213, 204, 213, 299, 211, 210, 206, - 208, 208, 209, 204, 206, 207, 209, 208, 210, 207, - 207, 211, 212, 212, 0, 213, 207, 211, 0, 0, - 213, 216, 213, 207, 211, 217, 301, 302, 216, 207, - 0, 303, 207, 212, 0, 217, 207, 207, 211, 212, - 212, 216, 213, 207, 211, 217, 218, 0, 216, 304, - - 207, 0, 217, 301, 302, 216, 207, 220, 303, 218, - 212, 214, 217, 214, 220, 219, 218, 214, 216, 221, - 0, 0, 217, 218, 214, 219, 304, 220, 214, 221, - 0, 0, 0, 214, 220, 219, 218, 222, 214, 221, - 214, 220, 219, 218, 214, 225, 221, 222, 226, 224, - 305, 214, 219, 223, 220, 214, 221, 222, 224, 227, - 214, 225, 219, 227, 222, 225, 221, 223, 226, 224, - 223, 228, 225, 223, 222, 226, 224, 305, 306, 227, - 223, 308, 228, 0, 222, 224, 227, 309, 225, 0, - 227, 228, 225, 0, 223, 226, 224, 223, 228, 310, - - 223, 230, 0, 232, 0, 306, 227, 0, 308, 228, - 230, 231, 0, 0, 309, 231, 233, 233, 228, 229, - 229, 230, 0, 232, 311, 0, 310, 312, 230, 229, - 232, 231, 236, 234, 229, 229, 233, 230, 231, 234, - 229, 234, 231, 233, 233, 236, 229, 229, 230, 300, - 232, 311, 236, 234, 312, 0, 229, 0, 231, 236, - 234, 229, 229, 233, 300, 237, 234, 229, 234, 235, - 313, 235, 236, 235, 237, 238, 300, 314, 0, 236, - 234, 0, 235, 0, 238, 237, 244, 241, 239, 315, - 240, 300, 237, 235, 241, 238, 235, 313, 235, 0, - - 235, 237, 238, 239, 314, 240, 244, 241, 239, 235, - 240, 238, 237, 244, 241, 239, 315, 240, 247, 242, - 235, 241, 238, 242, 243, 243, 245, 245, 0, 255, - 239, 247, 240, 244, 241, 239, 0, 240, 247, 255, - 246, 316, 0, 242, 243, 247, 242, 245, 0, 255, - 242, 243, 243, 245, 245, 246, 255, 248, 247, 249, - 246, 248, 0, 249, 0, 247, 255, 246, 316, 250, - 242, 243, 317, 251, 245, 251, 255, 253, 250, 249, - 253, 248, 246, 250, 248, 0, 249, 246, 248, 250, - 249, 252, 254, 251, 254, 318, 250, 253, 252, 317, - - 251, 254, 251, 319, 253, 250, 249, 253, 248, 254, - 250, 252, 258, 256, 254, 258, 250, 320, 252, 254, - 251, 254, 318, 257, 253, 252, 256, 257, 254, 259, - 319, 260, 262, 256, 321, 258, 254, 259, 252, 258, - 256, 254, 258, 262, 320, 265, 265, 257, 259, 259, - 257, 260, 262, 256, 257, 0, 259, 261, 260, 262, - 256, 321, 258, 263, 259, 261, 265, 263, 322, 323, - 262, 0, 265, 265, 257, 259, 259, 261, 260, 262, - 269, 264, 266, 263, 261, 264, 266, 263, 264, 0, - 263, 0, 261, 265, 263, 322, 323, 0, 267, 0, - - 269, 264, 266, 268, 261, 267, 270, 269, 264, 266, - 263, 267, 264, 266, 263, 264, 268, 0, 267, 324, - 271, 270, 325, 268, 271, 267, 270, 269, 264, 266, - 268, 0, 267, 270, 0, 0, 0, 0, 267, 0, - 326, 327, 328, 268, 271, 267, 324, 271, 270, 325, - 268, 271, 329, 270, 275, 275, 275, 275, 275, 275, - 275, 275, 275, 275, 288, 330, 288, 326, 327, 328, - 331, 271, 332, 333, 335, 336, 337, 338, 339, 329, - 331, 288, 340, 341, 342, 343, 344, 346, 347, 348, - 349, 288, 330, 288, 350, 351, 352, 331, 353, 332, - - 333, 335, 336, 337, 338, 339, 354, 331, 288, 340, - 341, 342, 343, 344, 346, 347, 348, 349, 355, 356, - 357, 350, 351, 352, 358, 353, 359, 360, 361, 363, - 364, 365, 366, 354, 367, 368, 369, 370, 372, 373, - 374, 375, 374, 376, 377, 355, 356, 357, 373, 378, - 379, 358, 380, 359, 360, 361, 363, 364, 365, 366, - 381, 367, 368, 369, 370, 372, 373, 374, 375, 374, - 376, 377, 379, 383, 382, 373, 378, 379, 382, 380, - 384, 0, 388, 389, 390, 0, 391, 381, 387, 387, - 387, 387, 387, 387, 387, 387, 387, 387, 393, 379, - - 383, 382, 388, 389, 390, 382, 391, 384, 392, 388, - 389, 390, 394, 391, 395, 392, 394, 396, 393, 0, - 397, 498, 0, 0, 397, 393, 0, 396, 392, 388, - 389, 390, 398, 391, 395, 392, 394, 396, 499, 394, - 397, 395, 392, 394, 396, 393, 399, 397, 498, 401, - 398, 397, 398, 399, 396, 392, 0, 0, 0, 398, - 0, 395, 401, 394, 396, 499, 399, 397, 400, 401, - 400, 402, 0, 399, 403, 0, 401, 398, 0, 398, - 399, 500, 403, 405, 404, 400, 407, 402, 0, 401, - 400, 402, 0, 399, 403, 400, 401, 400, 402, 404, - - 407, 403, 408, 405, 404, 409, 407, 501, 500, 403, - 405, 404, 400, 407, 402, 406, 410, 400, 402, 406, - 411, 403, 408, 410, 411, 409, 404, 407, 414, 408, - 405, 404, 409, 407, 501, 413, 410, 413, 412, 406, - 0, 415, 406, 410, 411, 0, 406, 411, 414, 408, - 410, 411, 409, 412, 418, 414, 415, 413, 412, 419, - 0, 415, 413, 410, 413, 412, 406, 416, 415, 0, - 416, 411, 421, 502, 418, 414, 417, 503, 420, 419, - 412, 418, 420, 415, 413, 412, 419, 417, 415, 422, - 416, 422, 421, 423, 416, 0, 417, 416, 0, 421, - - 502, 418, 420, 417, 503, 420, 419, 423, 424, 420, - 426, 422, 425, 423, 417, 424, 422, 416, 422, 421, - 423, 427, 428, 417, 426, 425, 428, 0, 424, 420, - 426, 0, 425, 0, 423, 424, 429, 426, 422, 425, - 423, 427, 424, 0, 429, 504, 428, 431, 427, 428, - 430, 426, 425, 428, 431, 424, 429, 426, 430, 425, - 433, 432, 434, 429, 432, 434, 0, 431, 427, 0, - 430, 429, 504, 428, 431, 435, 433, 430, 436, 435, - 433, 431, 434, 429, 432, 430, 0, 433, 432, 434, - 438, 432, 434, 436, 431, 435, 438, 430, 436, 437, - - 506, 440, 435, 433, 439, 436, 435, 433, 0, 434, - 438, 432, 437, 441, 439, 442, 444, 438, 509, 437, - 436, 440, 435, 438, 439, 436, 437, 506, 440, 445, - 446, 439, 444, 441, 443, 442, 444, 438, 445, 437, - 441, 439, 442, 444, 443, 509, 437, 0, 440, 445, - 446, 439, 447, 448, 443, 510, 445, 446, 0, 444, - 441, 443, 442, 444, 449, 445, 511, 447, 449, 450, - 450, 443, 447, 448, 451, 0, 445, 446, 451, 447, - 448, 443, 510, 452, 449, 452, 453, 512, 453, 455, - 450, 449, 0, 511, 447, 449, 450, 450, 451, 447, - - 448, 451, 454, 452, 455, 451, 453, 456, 457, 455, - 452, 449, 452, 453, 512, 453, 455, 450, 454, 458, - 461, 462, 454, 456, 459, 451, 458, 456, 457, 454, - 452, 455, 514, 453, 456, 457, 455, 459, 460, 458, - 461, 462, 515, 0, 459, 454, 458, 461, 462, 454, - 456, 459, 460, 458, 456, 457, 463, 0, 460, 514, - 463, 464, 465, 0, 459, 460, 458, 461, 462, 515, - 464, 459, 0, 465, 467, 468, 466, 0, 467, 460, - 463, 464, 465, 463, 466, 460, 0, 463, 464, 465, - 468, 0, 470, 516, 471, 468, 466, 464, 467, 470, - - 465, 467, 468, 466, 473, 467, 517, 463, 464, 465, - 469, 466, 470, 469, 471, 474, 475, 468, 472, 470, - 516, 471, 468, 466, 473, 467, 470, 518, 472, 476, - 469, 473, 477, 517, 475, 474, 475, 469, 472, 470, - 469, 471, 474, 475, 476, 472, 478, 477, 519, 476, - 0, 473, 477, 478, 518, 472, 476, 469, 479, 477, - 0, 475, 474, 475, 482, 472, 478, 480, 481, 479, - 483, 476, 484, 478, 477, 519, 476, 481, 479, 477, - 478, 484, 480, 0, 482, 479, 0, 480, 481, 0, - 483, 482, 484, 478, 480, 481, 479, 483, 485, 484, - - 486, 520, 488, 487, 481, 479, 488, 485, 484, 480, - 486, 482, 486, 487, 480, 481, 490, 483, 485, 484, - 486, 0, 489, 487, 521, 485, 488, 486, 520, 488, - 487, 489, 490, 488, 485, 496, 490, 486, 0, 486, - 487, 493, 489, 490, 491, 485, 491, 486, 496, 489, - 487, 521, 492, 488, 522, 496, 493, 495, 489, 490, - 495, 493, 496, 490, 523, 494, 491, 524, 493, 489, - 492, 491, 492, 491, 494, 496, 527, 495, 494, 492, - 528, 522, 496, 493, 495, 494, 529, 495, 493, 530, - 531, 523, 494, 491, 524, 532, 533, 492, 535, 492, - - 536, 494, 539, 527, 495, 494, 540, 528, 542, 545, - 546, 547, 494, 529, 548, 549, 530, 531, 552, 550, - 556, 558, 532, 533, 560, 535, 562, 536, 563, 539, - 550, 561, 561, 540, 565, 542, 545, 546, 547, 566, - 567, 548, 549, 568, 569, 552, 550, 556, 558, 571, - 572, 560, 573, 562, 574, 563, 575, 550, 561, 561, - 576, 565, 577, 578, 579, 581, 566, 567, 582, 583, - 568, 569, 584, 587, 588, 590, 571, 572, 591, 573, - 592, 574, 593, 575, 594, 595, 596, 576, 597, 577, - 578, 579, 581, 598, 600, 582, 583, 602, 608, 584, - - 587, 588, 590, 606, 0, 591, 607, 592, 609, 593, - 0, 594, 595, 596, 610, 597, 606, 612, 608, 607, - 598, 600, 611, 606, 602, 608, 607, 610, 609, 716, - 606, 611, 613, 607, 610, 609, 614, 612, 0, 0, - 614, 610, 611, 606, 612, 608, 607, 0, 615, 611, - 606, 616, 613, 607, 610, 609, 716, 618, 611, 613, - 614, 610, 617, 614, 612, 618, 617, 614, 615, 611, - 619, 616, 0, 0, 619, 615, 0, 618, 616, 613, - 621, 0, 0, 620, 618, 623, 617, 614, 0, 617, - 619, 622, 618, 617, 624, 615, 620, 619, 616, 623, - - 621, 619, 0, 620, 618, 623, 622, 621, 625, 624, - 620, 622, 623, 617, 624, 625, 0, 619, 622, 627, - 718, 624, 0, 620, 626, 628, 623, 621, 625, 628, - 620, 0, 623, 622, 627, 625, 624, 629, 622, 627, - 626, 624, 625, 630, 626, 630, 627, 718, 633, 628, - 629, 626, 628, 632, 631, 625, 628, 629, 631, 634, - 632, 627, 0, 720, 629, 630, 627, 626, 633, 721, - 630, 626, 630, 632, 631, 633, 628, 629, 635, 634, - 632, 631, 636, 637, 629, 631, 634, 632, 722, 635, - 720, 0, 630, 636, 723, 633, 721, 638, 635, 637, - - 632, 631, 636, 637, 639, 635, 634, 641, 639, 636, - 637, 0, 638, 642, 640, 722, 635, 638, 640, 644, - 636, 723, 643, 644, 638, 635, 637, 641, 639, 636, - 637, 639, 645, 642, 641, 639, 646, 643, 640, 638, - 642, 640, 643, 644, 638, 640, 644, 647, 0, 643, - 644, 647, 645, 649, 641, 639, 646, 648, 0, 645, - 642, 651, 652, 646, 643, 640, 650, 653, 648, 643, - 644, 647, 654, 649, 647, 650, 0, 648, 647, 645, - 649, 651, 652, 646, 648, 654, 650, 653, 651, 652, - 0, 655, 654, 650, 653, 648, 0, 724, 647, 654, - - 649, 0, 650, 656, 648, 659, 0, 657, 651, 652, - 655, 655, 654, 650, 653, 658, 656, 658, 655, 654, - 657, 661, 0, 656, 724, 659, 660, 657, 658, 662, - 656, 663, 659, 660, 657, 658, 0, 655, 655, 665, - 725, 661, 658, 656, 658, 0, 660, 657, 661, 662, - 656, 663, 659, 660, 657, 658, 662, 664, 663, 665, - 660, 667, 658, 666, 0, 668, 665, 725, 661, 671, - 666, 670, 664, 660, 670, 726, 662, 664, 663, 0, - 669, 667, 671, 666, 664, 668, 665, 0, 667, 671, - 666, 670, 668, 672, 669, 669, 671, 666, 670, 664, - - 669, 670, 726, 673, 664, 673, 674, 669, 667, 671, - 666, 675, 668, 672, 678, 676, 671, 0, 670, 679, - 672, 669, 669, 679, 675, 673, 674, 669, 676, 677, - 673, 675, 673, 674, 678, 676, 728, 677, 675, 681, - 672, 678, 676, 679, 680, 0, 679, 681, 680, 677, - 679, 675, 673, 674, 0, 676, 677, 683, 675, 681, - 682, 678, 676, 728, 677, 0, 681, 687, 680, 687, - 679, 680, 683, 682, 681, 680, 677, 683, 684, 0, - 682, 684, 685, 686, 683, 0, 681, 682, 0, 687, - 685, 688, 686, 689, 687, 680, 687, 729, 0, 683, - - 682, 684, 685, 686, 683, 684, 691, 682, 684, 685, - 686, 688, 692, 689, 0, 693, 687, 685, 688, 686, - 689, 690, 692, 694, 729, 690, 691, 697, 684, 685, - 686, 695, 692, 691, 698, 693, 698, 0, 688, 692, - 689, 690, 693, 694, 730, 695, 696, 697, 690, 692, - 694, 695, 690, 691, 697, 699, 698, 0, 695, 692, - 696, 698, 693, 698, 699, 700, 696, 731, 690, 702, - 694, 730, 695, 696, 697, 699, 701, 703, 695, 703, - 701, 700, 699, 698, 702, 700, 0, 696, 0, 702, - 704, 699, 700, 696, 731, 705, 702, 703, 705, 707, - - 701, 706, 699, 701, 703, 706, 703, 701, 700, 733, - 704, 702, 700, 708, 709, 705, 702, 704, 710, 707, - 734, 706, 705, 711, 703, 705, 707, 701, 706, 708, - 735, 712, 706, 708, 709, 736, 733, 704, 710, 737, - 708, 709, 705, 711, 738, 710, 707, 734, 706, 739, - 711, 712, 740, 741, 742, 745, 708, 735, 712, 746, - 708, 709, 736, 748, 750, 710, 737, 753, 754, 755, - 711, 738, 756, 761, 763, 764, 739, 765, 712, 740, - 741, 742, 745, 768, 769, 770, 746, 771, 772, 774, - 748, 750, 775, 776, 753, 754, 755, 777, 778, 756, - - 761, 763, 764, 779, 765, 780, 781, 782, 783, 784, - 768, 769, 770, 786, 771, 772, 774, 787, 788, 775, - 776, 790, 791, 792, 777, 778, 793, 796, 0, 0, - 779, 797, 780, 781, 782, 783, 784, 799, 878, 798, - 786, 800, 801, 802, 787, 788, 0, 796, 790, 791, - 792, 797, 880, 793, 796, 803, 803, 799, 797, 798, - 798, 800, 801, 802, 799, 878, 798, 0, 800, 801, - 802, 804, 805, 804, 796, 807, 803, 808, 797, 880, - 0, 805, 803, 803, 799, 807, 798, 798, 800, 801, - 802, 806, 805, 804, 809, 807, 0, 808, 804, 805, - - 804, 881, 807, 803, 808, 810, 806, 811, 805, 810, - 882, 806, 807, 0, 809, 813, 0, 811, 806, 805, - 804, 809, 807, 812, 808, 810, 814, 811, 881, 883, - 812, 818, 810, 806, 811, 813, 810, 882, 806, 817, - 816, 809, 813, 812, 811, 815, 814, 0, 817, 815, - 812, 818, 810, 814, 811, 816, 883, 812, 818, 817, - 816, 819, 813, 822, 820, 815, 817, 816, 0, 0, - 812, 0, 815, 814, 821, 817, 815, 822, 818, 820, - 825, 819, 816, 822, 820, 826, 817, 816, 819, 821, - 822, 820, 815, 823, 821, 828, 824, 823, 824, 827, - - 825, 821, 828, 0, 822, 826, 820, 825, 819, 0, - 822, 820, 826, 823, 827, 828, 821, 829, 824, 827, - 823, 821, 828, 824, 823, 824, 827, 825, 830, 828, - 830, 831, 826, 833, 832, 0, 834, 829, 0, 836, - 823, 827, 828, 0, 829, 824, 827, 835, 830, 832, - 0, 831, 0, 833, 832, 830, 834, 830, 831, 836, - 833, 832, 835, 834, 829, 837, 836, 835, 839, 0, - 838, 840, 885, 841, 835, 830, 832, 838, 831, 837, - 833, 832, 842, 834, 0, 837, 836, 843, 839, 835, - 838, 840, 837, 841, 835, 839, 844, 838, 840, 885, - - 841, 845, 842, 0, 838, 845, 837, 843, 887, 842, - 846, 847, 837, 846, 843, 839, 844, 838, 840, 848, - 841, 849, 850, 844, 853, 845, 847, 888, 845, 842, - 846, 847, 845, 0, 843, 887, 0, 846, 847, 848, - 846, 849, 850, 844, 853, 855, 848, 851, 849, 850, - 852, 853, 845, 847, 888, 854, 0, 846, 847, 854, - 851, 0, 0, 852, 889, 855, 848, 851, 849, 850, - 852, 853, 855, 0, 851, 854, 856, 852, 0, 891, - 856, 857, 854, 858, 858, 857, 854, 851, 860, 860, - 852, 889, 855, 893, 851, 861, 0, 852, 859, 861, - - 856, 0, 854, 856, 858, 857, 891, 856, 857, 860, - 858, 858, 857, 859, 862, 860, 860, 863, 859, 861, - 893, 0, 861, 864, 0, 859, 861, 856, 862, 865, - 863, 858, 857, 865, 862, 866, 860, 863, 864, 866, - 859, 862, 0, 864, 863, 859, 861, 867, 868, 870, - 864, 869, 869, 865, 897, 862, 865, 863, 0, 866, - 865, 862, 866, 871, 863, 864, 866, 867, 868, 870, - 864, 872, 869, 873, 867, 868, 870, 873, 869, 869, - 865, 897, 899, 871, 875, 872, 866, 876, 875, 900, - 871, 872, 906, 874, 867, 868, 870, 873, 872, 869, - - 873, 907, 874, 910, 873, 911, 913, 876, 875, 899, - 871, 875, 872, 874, 876, 875, 900, 914, 872, 906, - 874, 915, 917, 918, 873, 919, 923, 925, 907, 874, - 910, 926, 911, 913, 876, 875, 927, 928, 933, 934, - 874, 935, 937, 0, 914, 0, 0, 938, 915, 917, - 918, 939, 919, 923, 925, 940, 942, 941, 926, 943, - 939, 945, 937, 927, 928, 933, 934, 938, 935, 937, - 942, 939, 941, 944, 938, 940, 942, 941, 939, 943, - 944, 945, 940, 942, 941, 0, 943, 939, 945, 937, - 947, 949, 947, 944, 938, 948, 0, 942, 939, 941, - - 944, 946, 940, 942, 941, 951, 943, 944, 945, 946, - 948, 949, 947, 953, 954, 948, 0, 947, 949, 947, - 944, 946, 948, 950, 955, 951, 950, 952, 946, 952, - 0, 0, 951, 953, 954, 956, 946, 948, 949, 947, - 953, 954, 948, 957, 955, 960, 950, 0, 946, 952, - 950, 955, 951, 950, 952, 956, 952, 958, 961, 959, - 953, 954, 956, 957, 0, 960, 958, 962, 963, 964, - 957, 955, 960, 950, 959, 0, 952, 958, 961, 959, - 966, 0, 956, 0, 958, 961, 959, 962, 963, 964, - 957, 967, 960, 958, 962, 963, 964, 965, 0, 968, - - 966, 959, 969, 971, 958, 961, 959, 966, 970, 969, - 965, 967, 970, 972, 962, 963, 964, 965, 967, 968, - 0, 973, 969, 971, 965, 974, 968, 966, 972, 969, - 971, 975, 970, 972, 0, 970, 969, 965, 967, 970, - 972, 973, 999, 979, 965, 974, 968, 978, 973, 969, - 971, 975, 974, 980, 976, 972, 976, 0, 975, 970, - 972, 978, 977, 979, 977, 981, 983, 978, 973, 999, - 979, 0, 974, 980, 978, 982, 976, 1002, 975, 0, - 980, 976, 982, 976, 977, 981, 983, 0, 978, 977, - 979, 977, 981, 983, 978, 982, 986, 984, 986, 987, - - 980, 984, 982, 976, 1002, 1003, 985, 988, 0, 982, - 985, 977, 981, 983, 987, 989, 990, 0, 986, 987, - 991, 984, 982, 986, 984, 986, 987, 988, 984, 0, - 985, 992, 1003, 985, 988, 989, 990, 985, 1005, 1006, - 991, 987, 989, 990, 992, 986, 987, 991, 984, 994, - 993, 992, 993, 1011, 988, 1013, 994, 985, 992, 1014, - 1017, 1018, 989, 990, 1021, 1005, 1006, 991, 1022, 994, - 993, 992, 1023, 1024, 1029, 0, 994, 993, 992, 993, - 1011, 0, 1013, 994, 1030, 1031, 1014, 1017, 1018, 1032, - 1033, 1021, 1062, 1034, 1029, 1022, 994, 993, 1035, 1023, - - 1024, 1029, 1036, 1037, 1030, 1031, 1036, 1038, 1040, 1032, - 1033, 1030, 1031, 1034, 0, 0, 1032, 1033, 1035, 1062, - 1034, 1029, 1041, 1037, 1039, 1035, 1036, 1038, 1040, 1036, - 1037, 1030, 1031, 1036, 1038, 1040, 1032, 1033, 1042, 1039, - 1034, 1043, 1041, 1045, 1039, 1035, 1064, 1046, 0, 1041, - 1037, 1039, 0, 1036, 1038, 1040, 1047, 1044, 1042, 1044, - 1046, 1043, 1048, 1045, 1067, 1042, 1039, 1046, 1043, 1041, - 1045, 1039, 1049, 1064, 1046, 1051, 1047, 1052, 1050, 1044, - 1053, 1051, 1048, 1047, 1044, 1042, 1044, 1046, 1043, 1048, - 1045, 1067, 1049, 1050, 1046, 1051, 1056, 1052, 1050, 1049, - - 1053, 1054, 1051, 1047, 1052, 1050, 1044, 1053, 1051, 1048, - 1055, 1056, 1057, 1058, 1054, 1059, 1056, 1069, 1055, 1049, - 1050, 1054, 1051, 1056, 1052, 1050, 1060, 1053, 1054, 1072, - 1055, 1073, 1057, 1058, 1074, 1059, 0, 1055, 1056, 1057, - 1058, 1054, 1059, 1056, 1069, 1055, 1060, 1078, 1054, 1079, - 1077, 1080, 1081, 1060, 0, 1083, 1072, 1055, 1073, 1057, - 1058, 1074, 1059, 1077, 1079, 1082, 1085, 1078, 1084, 1079, - 1077, 1080, 1081, 1060, 1078, 1083, 1079, 1077, 1080, 1081, - 1082, 1084, 1083, 1086, 1087, 1082, 1085, 1093, 1084, 1088, - 1077, 1079, 1082, 1085, 1078, 1084, 1079, 1077, 1080, 1081, - - 1088, 1089, 1083, 1086, 1087, 1089, 1090, 1082, 1084, 1088, - 1086, 1087, 1082, 1085, 1093, 1084, 1088, 1095, 1098, 1100, - 1101, 1089, 1102, 1103, 1110, 0, 1090, 1088, 1089, 0, - 1086, 1087, 1089, 1090, 1104, 1105, 1088, 1103, 0, 1100, - 1101, 0, 1102, 1103, 1095, 1098, 1100, 1101, 1089, 1102, - 1103, 1110, 1112, 1090, 1104, 1105, 1113, 1118, 1106, 0, - 0, 1104, 1105, 0, 1103, 0, 1100, 1101, 1106, 1102, - 1103, 1114, 1112, 0, 0, 0, 1113, 1118, 1106, 1112, - 1114, 1104, 1105, 1113, 1118, 1106, 0, 0, 0, 0, - 0, 1114, 0, 0, 0, 1106, 0, 0, 1114, 1112, - - 0, 0, 0, 1113, 1118, 1106, 0, 1114, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1114, 1138, - 1138, 1138, 1138, 1138, 1139, 0, 0, 1139, 1139, 1141, - 1141, 1141, 0, 1141, 1142, 0, 1142, 1142, 1142, 1143, - 0, 1143, 1143, 1143, 1144, 0, 1144, 1144, 1144, 1137, - 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, - 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, - 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, - 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, - 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, - - 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, - 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, - 1137, 1137, 1137, 1137, 1137, 1137 + 188, 188, 188, 188, 188, 188, 204, 206, 292, 210, + 0, 208, 293, 204, 204, 204, 0, 204, 0, 210, + 0, 0, 206, 211, 208, 208, 204, 206, 0, 210, + 0, 208, 0, 204, 206, 292, 210, 211, 208, 293, + 204, 204, 204, 211, 204, 209, 210, 212, 212, 206, + 211, 208, 208, 204, 206, 207, 210, 207, 208, 207, + 207, 209, 0, 226, 211, 209, 207, 213, 212, 213, + 211, 215, 209, 207, 212, 212, 294, 0, 215, 207, + 295, 0, 207, 226, 207, 296, 207, 207, 209, 213, + 226, 215, 209, 207, 213, 212, 213, 0, 215, 298, + + 207, 216, 0, 294, 217, 215, 207, 295, 216, 225, + 226, 299, 296, 220, 217, 0, 213, 214, 215, 214, + 220, 216, 219, 214, 217, 225, 298, 0, 216, 225, + 214, 217, 219, 220, 214, 216, 225, 0, 299, 214, + 220, 217, 219, 221, 214, 222, 214, 220, 216, 219, + 214, 217, 225, 221, 223, 222, 225, 214, 224, 219, + 220, 214, 300, 221, 228, 222, 214, 224, 223, 219, + 221, 223, 222, 227, 223, 228, 0, 227, 224, 230, + 221, 223, 222, 231, 228, 224, 302, 231, 230, 300, + 221, 228, 222, 227, 224, 223, 232, 0, 223, 230, + + 227, 223, 228, 231, 227, 224, 230, 233, 233, 0, + 231, 228, 303, 302, 231, 230, 232, 0, 304, 305, + 227, 229, 229, 232, 237, 0, 230, 233, 0, 0, + 231, 229, 234, 237, 233, 233, 229, 229, 234, 303, + 234, 301, 229, 232, 237, 304, 305, 0, 229, 229, + 0, 237, 234, 235, 233, 235, 301, 235, 229, 234, + 237, 236, 306, 229, 229, 234, 235, 234, 301, 229, + 307, 237, 239, 0, 236, 240, 238, 235, 0, 234, + 235, 236, 235, 301, 235, 238, 309, 239, 236, 306, + 240, 241, 239, 235, 310, 240, 238, 307, 241, 239, + + 244, 236, 240, 238, 235, 242, 243, 243, 236, 242, + 0, 241, 238, 309, 239, 260, 0, 240, 241, 239, + 244, 310, 240, 238, 0, 241, 243, 244, 246, 242, + 245, 245, 242, 243, 243, 260, 242, 248, 241, 247, + 249, 248, 260, 246, 249, 0, 311, 244, 246, 0, + 312, 245, 247, 243, 0, 246, 242, 245, 245, 247, + 249, 248, 260, 0, 248, 313, 247, 249, 248, 0, + 246, 249, 250, 311, 252, 246, 250, 312, 245, 247, + 251, 252, 251, 314, 0, 250, 247, 249, 248, 0, + 250, 315, 313, 269, 252, 253, 250, 0, 253, 250, + + 251, 252, 254, 250, 254, 316, 255, 251, 252, 251, + 314, 254, 250, 269, 0, 253, 255, 250, 315, 254, + 269, 252, 253, 250, 254, 253, 255, 251, 256, 254, + 257, 254, 316, 255, 257, 317, 258, 0, 254, 258, + 269, 256, 253, 255, 261, 262, 254, 0, 256, 318, + 259, 254, 261, 255, 257, 256, 262, 257, 259, 258, + 0, 257, 317, 258, 261, 262, 258, 0, 256, 259, + 259, 261, 262, 0, 263, 256, 318, 259, 263, 261, + 264, 257, 0, 262, 264, 259, 258, 264, 265, 265, + 0, 261, 262, 268, 263, 0, 259, 259, 263, 266, + + 264, 263, 0, 266, 319, 263, 268, 264, 0, 265, + 0, 264, 320, 268, 264, 265, 265, 270, 0, 266, + 268, 263, 267, 321, 271, 263, 266, 264, 271, 267, + 266, 319, 270, 268, 322, 267, 265, 270, 323, 320, + 268, 324, 267, 288, 270, 288, 266, 325, 271, 267, + 321, 271, 0, 0, 0, 271, 267, 0, 0, 270, + 288, 322, 267, 326, 270, 323, 327, 328, 324, 267, + 288, 329, 288, 330, 325, 271, 275, 275, 275, 275, + 275, 275, 275, 275, 275, 275, 331, 288, 333, 332, + 326, 334, 336, 327, 328, 337, 338, 339, 329, 332, + + 330, 340, 341, 342, 343, 344, 345, 347, 348, 349, + 350, 351, 352, 331, 353, 333, 332, 354, 334, 336, + 355, 356, 337, 338, 339, 357, 332, 358, 340, 341, + 342, 343, 344, 345, 347, 348, 349, 350, 351, 352, + 359, 353, 360, 361, 354, 362, 363, 355, 356, 365, + 366, 367, 357, 368, 358, 369, 370, 371, 372, 374, + 377, 376, 375, 376, 378, 379, 380, 359, 382, 360, + 361, 375, 362, 363, 381, 383, 365, 366, 367, 385, + 368, 386, 369, 370, 371, 372, 374, 377, 376, 375, + 376, 378, 379, 380, 0, 382, 381, 0, 375, 384, + + 390, 381, 383, 384, 391, 392, 385, 0, 386, 389, + 389, 389, 389, 389, 389, 389, 389, 389, 389, 393, + 390, 394, 395, 381, 391, 392, 384, 390, 394, 396, + 384, 391, 392, 396, 397, 0, 0, 502, 0, 393, + 0, 394, 395, 503, 0, 400, 393, 390, 394, 395, + 0, 391, 392, 396, 397, 394, 396, 398, 399, 504, + 396, 397, 399, 400, 502, 400, 393, 398, 394, 395, + 503, 402, 400, 402, 0, 401, 0, 398, 399, 405, + 396, 397, 401, 403, 398, 399, 504, 405, 402, 399, + 400, 404, 400, 402, 398, 401, 403, 406, 402, 405, + + 402, 407, 401, 403, 398, 399, 405, 404, 0, 401, + 403, 404, 406, 409, 405, 402, 410, 406, 404, 0, + 402, 407, 401, 403, 406, 408, 405, 409, 407, 408, + 403, 411, 0, 409, 404, 412, 410, 413, 404, 406, + 409, 413, 412, 410, 406, 505, 414, 0, 407, 408, + 414, 411, 408, 0, 409, 412, 408, 413, 411, 415, + 409, 417, 412, 410, 413, 416, 0, 416, 413, 412, + 414, 421, 505, 414, 415, 418, 408, 414, 411, 415, + 419, 417, 412, 419, 413, 420, 415, 416, 417, 422, + 418, 421, 416, 424, 416, 418, 420, 414, 421, 506, + + 423, 415, 418, 419, 423, 420, 415, 419, 417, 422, + 419, 0, 420, 424, 416, 426, 422, 418, 421, 425, + 424, 425, 418, 420, 423, 428, 506, 423, 507, 426, + 419, 423, 420, 429, 430, 426, 422, 427, 428, 431, + 424, 425, 426, 431, 427, 428, 425, 429, 425, 508, + 0, 423, 428, 429, 430, 507, 426, 427, 0, 432, + 429, 430, 426, 431, 427, 428, 431, 432, 425, 433, + 431, 427, 428, 0, 429, 434, 508, 433, 439, 432, + 429, 430, 434, 436, 427, 435, 432, 438, 435, 433, + 431, 438, 0, 439, 432, 434, 433, 437, 439, 436, + + 437, 442, 434, 436, 433, 439, 432, 438, 435, 434, + 436, 442, 435, 443, 438, 435, 433, 437, 438, 440, + 439, 442, 434, 441, 437, 439, 436, 437, 442, 441, + 436, 444, 440, 443, 438, 435, 0, 445, 442, 440, + 443, 510, 446, 441, 437, 447, 440, 0, 442, 0, + 441, 444, 446, 449, 448, 0, 441, 445, 444, 440, + 443, 447, 446, 448, 445, 447, 440, 450, 510, 446, + 441, 451, 447, 449, 448, 453, 453, 513, 444, 446, + 449, 448, 450, 0, 445, 514, 0, 450, 447, 446, + 448, 451, 447, 452, 450, 454, 453, 452, 451, 454, + + 449, 448, 453, 453, 513, 455, 515, 455, 456, 450, + 456, 457, 514, 452, 450, 0, 516, 0, 451, 454, + 452, 458, 454, 453, 452, 455, 454, 457, 456, 459, + 460, 457, 455, 515, 455, 456, 458, 456, 457, 463, + 452, 458, 464, 516, 461, 459, 454, 462, 458, 459, + 460, 461, 455, 463, 457, 456, 459, 460, 457, 463, + 462, 465, 464, 458, 461, 0, 463, 462, 458, 464, + 0, 461, 459, 467, 462, 466, 459, 460, 461, 466, + 463, 465, 467, 0, 468, 470, 463, 462, 465, 464, + 469, 461, 470, 467, 462, 468, 0, 471, 469, 466, + + 467, 471, 466, 472, 468, 470, 466, 474, 465, 467, + 469, 468, 470, 473, 474, 475, 473, 469, 472, 470, + 467, 471, 468, 472, 471, 469, 466, 474, 471, 476, + 472, 468, 470, 473, 474, 475, 0, 469, 477, 476, + 473, 474, 475, 473, 478, 472, 0, 0, 471, 476, + 472, 0, 479, 480, 474, 0, 476, 0, 477, 0, + 473, 486, 475, 481, 478, 477, 476, 482, 480, 484, + 479, 478, 479, 480, 482, 0, 476, 518, 481, 479, + 480, 486, 483, 481, 484, 477, 487, 482, 486, 484, + 481, 478, 519, 483, 482, 480, 484, 479, 485, 479, + + 480, 482, 483, 488, 518, 481, 487, 485, 486, 483, + 481, 484, 488, 487, 482, 489, 484, 491, 485, 519, + 483, 520, 0, 488, 489, 485, 490, 491, 492, 483, + 488, 0, 492, 487, 485, 489, 490, 491, 490, 488, + 493, 494, 489, 521, 491, 485, 490, 0, 520, 493, + 488, 489, 492, 490, 491, 492, 495, 494, 495, 492, + 493, 494, 489, 490, 491, 490, 497, 493, 494, 522, + 521, 496, 0, 490, 499, 0, 493, 499, 495, 492, + 523, 497, 500, 495, 494, 495, 497, 493, 494, 496, + 498, 496, 524, 497, 499, 500, 522, 525, 496, 498, + + 526, 499, 500, 498, 499, 495, 527, 523, 497, 500, + 498, 528, 529, 497, 532, 533, 496, 498, 496, 524, + 534, 499, 500, 535, 525, 536, 498, 526, 537, 500, + 498, 538, 540, 527, 541, 544, 545, 498, 528, 529, + 547, 532, 533, 550, 551, 552, 553, 534, 554, 555, + 535, 557, 536, 561, 563, 537, 565, 567, 538, 540, + 555, 541, 544, 545, 566, 566, 568, 547, 570, 571, + 550, 551, 552, 553, 572, 554, 555, 573, 557, 574, + 561, 563, 576, 565, 567, 577, 579, 555, 580, 581, + 582, 566, 566, 568, 583, 570, 571, 584, 585, 587, + + 588, 572, 589, 590, 573, 593, 574, 594, 596, 576, + 597, 598, 577, 579, 599, 580, 581, 582, 600, 601, + 602, 583, 603, 604, 584, 585, 587, 588, 606, 589, + 590, 608, 593, 0, 594, 596, 614, 597, 598, 612, + 613, 599, 615, 0, 616, 600, 601, 602, 618, 603, + 604, 0, 612, 613, 0, 606, 614, 616, 608, 612, + 613, 617, 615, 614, 616, 619, 612, 613, 618, 615, + 617, 616, 620, 621, 622, 618, 620, 0, 623, 612, + 613, 617, 623, 614, 616, 619, 612, 613, 617, 615, + 624, 616, 619, 621, 622, 618, 620, 617, 624, 620, + + 621, 622, 623, 620, 627, 623, 626, 625, 617, 623, + 624, 625, 619, 724, 0, 628, 0, 624, 726, 626, + 621, 622, 0, 620, 627, 624, 626, 625, 630, 623, + 628, 627, 631, 626, 625, 628, 629, 624, 625, 631, + 724, 632, 628, 630, 633, 726, 626, 728, 630, 632, + 629, 627, 631, 626, 625, 630, 629, 628, 634, 631, + 633, 632, 628, 629, 633, 635, 631, 0, 632, 635, + 630, 633, 0, 634, 728, 630, 632, 629, 634, 631, + 637, 636, 637, 629, 640, 634, 638, 633, 632, 635, + 638, 633, 635, 0, 636, 641, 635, 0, 0, 648, + + 634, 636, 637, 639, 640, 634, 638, 637, 636, 637, + 639, 640, 645, 638, 642, 641, 635, 638, 0, 648, + 644, 636, 641, 639, 643, 642, 648, 645, 636, 637, + 639, 640, 645, 638, 642, 643, 644, 639, 649, 645, + 644, 642, 641, 0, 643, 646, 648, 644, 0, 646, + 639, 643, 642, 647, 645, 650, 0, 647, 649, 645, + 0, 642, 643, 644, 651, 649, 652, 644, 651, 646, + 650, 643, 646, 0, 653, 650, 646, 647, 655, 654, + 647, 0, 650, 654, 647, 649, 652, 656, 651, 655, + 729, 651, 0, 652, 653, 651, 646, 650, 655, 657, + + 658, 653, 650, 654, 647, 655, 654, 656, 657, 659, + 654, 660, 730, 652, 656, 651, 655, 729, 0, 657, + 658, 653, 662, 666, 661, 655, 657, 658, 0, 659, + 654, 660, 663, 0, 656, 657, 659, 661, 660, 730, + 664, 662, 662, 666, 661, 663, 657, 658, 0, 662, + 666, 661, 663, 664, 0, 667, 659, 668, 660, 663, + 664, 665, 667, 665, 661, 669, 670, 664, 662, 662, + 666, 661, 663, 0, 665, 667, 671, 668, 672, 663, + 664, 665, 667, 731, 668, 669, 670, 664, 665, 667, + 665, 671, 669, 670, 674, 675, 671, 677, 672, 673, + + 677, 665, 667, 671, 668, 672, 673, 732, 665, 0, + 731, 733, 669, 670, 674, 675, 676, 677, 671, 673, + 679, 674, 675, 671, 677, 672, 673, 677, 734, 681, + 676, 676, 678, 673, 732, 0, 676, 0, 733, 0, + 679, 674, 675, 676, 677, 678, 673, 679, 680, 681, + 680, 682, 678, 683, 684, 734, 681, 676, 676, 678, + 0, 0, 684, 676, 682, 685, 683, 679, 688, 0, + 680, 682, 678, 683, 684, 680, 681, 680, 682, 678, + 683, 684, 686, 687, 736, 685, 686, 687, 688, 684, + 0, 682, 685, 683, 737, 688, 689, 680, 682, 694, + + 683, 684, 691, 0, 689, 690, 686, 687, 694, 686, + 687, 736, 685, 686, 687, 688, 689, 691, 690, 694, + 0, 737, 691, 689, 692, 690, 694, 692, 693, 691, + 696, 689, 690, 686, 687, 694, 693, 695, 697, 695, + 738, 699, 739, 689, 691, 690, 694, 692, 693, 691, + 696, 692, 690, 701, 692, 693, 698, 696, 697, 695, + 698, 699, 700, 693, 695, 697, 695, 738, 699, 739, + 702, 0, 700, 701, 692, 693, 698, 696, 703, 0, + 701, 704, 700, 698, 705, 697, 695, 698, 699, 700, + 702, 706, 703, 706, 708, 704, 740, 702, 703, 700, + + 701, 704, 0, 698, 705, 703, 707, 712, 704, 700, + 708, 705, 709, 706, 708, 707, 709, 702, 706, 703, + 706, 708, 704, 740, 0, 703, 707, 712, 704, 710, + 711, 705, 711, 707, 712, 713, 709, 708, 713, 709, + 706, 708, 707, 709, 710, 0, 715, 714, 716, 710, + 711, 714, 717, 707, 712, 713, 710, 711, 742, 711, + 718, 719, 713, 709, 716, 713, 715, 714, 716, 720, + 743, 710, 717, 715, 714, 716, 710, 711, 714, 717, + 718, 719, 713, 744, 745, 742, 746, 718, 719, 720, + 747, 716, 748, 715, 714, 716, 720, 743, 749, 717, + + 750, 751, 754, 755, 757, 759, 762, 718, 719, 763, + 744, 745, 764, 746, 765, 770, 720, 747, 772, 748, + 773, 774, 777, 778, 779, 749, 780, 750, 751, 754, + 755, 757, 759, 762, 781, 783, 763, 784, 785, 764, + 786, 765, 770, 787, 788, 772, 789, 773, 774, 777, + 778, 779, 790, 780, 791, 792, 793, 795, 796, 797, + 799, 781, 783, 800, 784, 785, 801, 786, 802, 805, + 787, 788, 806, 789, 808, 0, 0, 807, 888, 790, + 809, 791, 792, 793, 795, 796, 797, 799, 810, 805, + 800, 811, 806, 801, 808, 802, 805, 807, 807, 806, + + 809, 808, 812, 812, 807, 888, 0, 809, 810, 890, + 813, 811, 813, 814, 0, 810, 805, 0, 811, 806, + 0, 808, 814, 812, 807, 807, 815, 809, 817, 812, + 812, 818, 813, 814, 816, 810, 890, 813, 811, 813, + 814, 815, 820, 819, 816, 0, 815, 819, 817, 814, + 812, 818, 820, 815, 816, 817, 891, 822, 818, 813, + 814, 816, 820, 819, 822, 823, 824, 0, 815, 820, + 819, 816, 821, 815, 819, 817, 821, 822, 818, 820, + 826, 816, 828, 891, 822, 823, 824, 0, 827, 820, + 819, 822, 823, 824, 825, 826, 821, 827, 825, 821, + + 826, 0, 828, 821, 822, 0, 829, 826, 827, 828, + 0, 0, 823, 824, 825, 827, 830, 831, 835, 0, + 832, 825, 826, 821, 827, 825, 829, 826, 834, 828, + 834, 830, 831, 829, 832, 827, 830, 831, 835, 0, + 832, 825, 833, 830, 831, 835, 833, 832, 836, 0, + 834, 837, 0, 829, 839, 834, 841, 834, 830, 831, + 892, 832, 833, 830, 831, 835, 837, 832, 836, 833, + 842, 837, 838, 833, 839, 836, 841, 834, 837, 838, + 840, 839, 840, 841, 843, 842, 0, 892, 844, 833, + 842, 0, 838, 837, 846, 836, 847, 842, 837, 838, + + 840, 839, 0, 841, 843, 845, 838, 840, 844, 840, + 847, 843, 842, 849, 846, 844, 847, 842, 850, 838, + 845, 846, 848, 847, 851, 845, 852, 840, 853, 848, + 854, 843, 845, 849, 893, 844, 0, 847, 850, 895, + 849, 846, 848, 847, 851, 850, 852, 845, 853, 848, + 854, 851, 845, 852, 855, 853, 848, 854, 855, 856, + 849, 893, 856, 858, 859, 850, 895, 857, 860, 848, + 0, 851, 0, 852, 0, 853, 863, 854, 855, 856, + 861, 855, 857, 858, 859, 855, 856, 857, 860, 856, + 858, 859, 0, 861, 857, 860, 863, 864, 865, 862, + + 861, 864, 0, 863, 0, 855, 856, 861, 897, 857, + 858, 859, 862, 898, 857, 860, 869, 864, 865, 862, + 861, 868, 868, 863, 864, 865, 862, 861, 864, 866, + 867, 869, 0, 866, 867, 897, 869, 0, 899, 862, + 898, 0, 868, 869, 864, 865, 862, 874, 868, 868, + 870, 870, 0, 866, 867, 871, 866, 867, 869, 871, + 866, 867, 874, 869, 875, 899, 0, 874, 875, 868, + 872, 870, 873, 877, 874, 0, 878, 870, 870, 871, + 866, 867, 871, 876, 872, 873, 871, 876, 875, 874, + 872, 875, 873, 877, 874, 875, 878, 872, 870, 873, + + 877, 879, 879, 878, 880, 881, 871, 876, 0, 0, + 876, 872, 873, 882, 876, 875, 886, 872, 900, 873, + 877, 902, 879, 878, 880, 881, 883, 882, 879, 879, + 883, 880, 881, 882, 876, 884, 886, 885, 904, 908, + 882, 885, 910, 886, 884, 900, 911, 917, 902, 879, + 883, 880, 881, 883, 882, 884, 918, 883, 921, 922, + 882, 885, 884, 886, 885, 904, 908, 924, 885, 910, + 925, 884, 926, 911, 917, 928, 929, 883, 930, 934, + 936, 937, 884, 918, 938, 921, 922, 939, 885, 944, + 945, 946, 948, 949, 924, 950, 0, 925, 0, 926, + + 0, 951, 928, 929, 950, 930, 934, 936, 937, 952, + 0, 938, 948, 949, 939, 950, 944, 945, 946, 948, + 949, 951, 950, 953, 952, 954, 955, 956, 951, 952, + 0, 950, 1011, 955, 0, 1014, 952, 953, 0, 948, + 949, 957, 950, 953, 1015, 954, 955, 956, 951, 957, + 953, 952, 954, 955, 956, 958, 952, 958, 959, 1011, + 955, 957, 1014, 961, 953, 959, 960, 0, 957, 963, + 953, 1015, 954, 955, 956, 1018, 957, 958, 959, 965, + 966, 960, 958, 961, 958, 959, 960, 0, 957, 963, + 961, 962, 959, 960, 962, 964, 963, 964, 0, 965, + + 966, 0, 1018, 967, 958, 959, 965, 966, 960, 968, + 961, 969, 0, 960, 962, 1019, 963, 964, 962, 970, + 971, 962, 964, 967, 964, 972, 965, 966, 970, 968, + 967, 969, 0, 973, 974, 971, 968, 975, 969, 970, + 971, 962, 1019, 976, 964, 972, 970, 971, 978, 979, + 967, 0, 972, 973, 974, 970, 968, 975, 969, 980, + 973, 974, 971, 976, 975, 977, 970, 971, 978, 979, + 976, 983, 972, 982, 985, 978, 979, 982, 977, 980, + 973, 974, 981, 1024, 975, 977, 980, 986, 984, 981, + 976, 983, 977, 987, 985, 978, 979, 982, 983, 1026, + + 982, 985, 981, 984, 982, 977, 980, 986, 984, 981, + 1024, 991, 977, 987, 986, 984, 981, 988, 983, 988, + 987, 985, 990, 989, 982, 989, 1026, 992, 993, 981, + 984, 991, 0, 0, 986, 984, 990, 995, 991, 988, + 987, 0, 990, 0, 988, 989, 988, 992, 993, 990, + 989, 1027, 989, 994, 992, 993, 1000, 995, 991, 1001, + 994, 996, 999, 990, 995, 996, 988, 997, 998, 990, + 998, 997, 989, 994, 992, 993, 1000, 999, 1027, 1001, + 994, 1002, 999, 1000, 995, 996, 1001, 994, 996, 999, + 998, 997, 996, 1003, 997, 998, 0, 998, 997, 1030, + + 994, 1002, 1004, 1000, 999, 1005, 1001, 1005, 1002, 999, + 1031, 1034, 996, 1003, 1035, 1004, 1006, 998, 997, 1036, + 1003, 1037, 1004, 1006, 1042, 1005, 1030, 1043, 1002, 1004, + 0, 0, 1005, 1044, 1005, 1045, 1006, 1031, 1034, 1046, + 1003, 1035, 1004, 1006, 1042, 1047, 1036, 1043, 1037, 1004, + 1006, 1042, 1005, 1044, 1043, 1045, 1048, 1049, 1050, 1046, + 1044, 1049, 1045, 1006, 0, 1047, 1046, 1051, 0, 1052, + 0, 1042, 1047, 1054, 1043, 1053, 1048, 1055, 1050, 1056, + 1044, 1049, 1045, 1048, 1049, 1050, 1046, 1051, 1049, 1052, + 1053, 1057, 1047, 1054, 1051, 1053, 1052, 1055, 0, 1056, + + 1054, 1059, 1053, 1048, 1055, 1050, 1056, 1058, 1049, 1058, + 1060, 1057, 1061, 1062, 1051, 1063, 1052, 1053, 1057, 0, + 1054, 1059, 1053, 1060, 1055, 1066, 1056, 1076, 1059, 1058, + 1060, 1064, 1061, 1062, 1058, 1063, 1058, 1060, 1057, 1061, + 1062, 1065, 1063, 1067, 1078, 1066, 1064, 1065, 1059, 1071, + 1060, 1064, 1066, 0, 1076, 1081, 1058, 1060, 1064, 1061, + 1062, 1065, 1063, 1067, 1068, 1070, 1072, 1069, 1065, 1071, + 1067, 1078, 1066, 1064, 1065, 1069, 1071, 1068, 1064, 1073, + 1070, 1074, 1081, 1083, 1068, 1070, 1072, 1069, 1065, 1086, + 1067, 1068, 1070, 1072, 1069, 1087, 1071, 1088, 0, 1073, + + 1092, 1074, 1069, 0, 1068, 1091, 1073, 1070, 1074, 1094, + 1083, 1068, 1070, 1072, 1069, 1093, 1086, 1095, 1091, 1096, + 1092, 1097, 1087, 1099, 1088, 1091, 1073, 1092, 1074, 1094, + 1093, 0, 1091, 1100, 1096, 1093, 1094, 1095, 1098, 1096, + 0, 1097, 1093, 1099, 1095, 1091, 1096, 1092, 1097, 1101, + 1099, 1098, 1091, 1100, 1107, 1103, 1094, 1093, 1098, 1103, + 1100, 1096, 1093, 1102, 1095, 1098, 1096, 1104, 1097, 1101, + 1099, 1109, 1112, 1114, 1102, 1103, 1101, 1115, 1098, 1124, + 1100, 1107, 1103, 1102, 0, 1098, 1103, 1104, 1116, 1117, + 1102, 1118, 1119, 1114, 1104, 0, 1101, 1115, 1109, 1112, + + 1114, 1102, 1103, 1117, 1115, 1126, 1124, 1120, 1116, 1117, + 1102, 1118, 1119, 1127, 1104, 1116, 1117, 1120, 1118, 1119, + 1114, 1132, 1128, 0, 1115, 1126, 0, 1120, 0, 0, + 1117, 1128, 1126, 1127, 1120, 1116, 1117, 0, 1118, 1119, + 1127, 1132, 1128, 0, 1120, 0, 0, 0, 1132, 1128, + 0, 0, 1126, 0, 1120, 0, 0, 0, 1128, 0, + 1127, 0, 0, 0, 0, 0, 0, 0, 1132, 1128, + 1152, 1152, 1152, 1152, 1152, 1153, 0, 0, 1153, 1153, + 1155, 1155, 1155, 0, 1155, 1156, 0, 1156, 1156, 1156, + 1157, 0, 1157, 1157, 1157, 1158, 0, 1158, 1158, 1158, + + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151 } ; /* The intent behind this definition is that it'll catch @@ -2069,7 +2083,7 @@ static const flex_int16_t yy_chk[4627] = static thread_local std::stringstream strbuf; -#line 2072 "flex_lexer.cpp" +#line 2086 "flex_lexer.cpp" /*************************** ** Section 2: Rules @@ -2083,7 +2097,7 @@ static thread_local std::stringstream strbuf; /*************************** ** Section 3: Rules ***************************/ -#line 2086 "flex_lexer.cpp" +#line 2100 "flex_lexer.cpp" #define INITIAL 0 #define singlequotedstring 1 @@ -2370,7 +2384,7 @@ YY_DECL #line 57 "flex_lexer.l" -#line 2373 "flex_lexer.cpp" +#line 2387 "flex_lexer.cpp" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -2397,13 +2411,13 @@ YY_DECL while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 1138 ) + if ( yy_current_state >= 1152 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_current_state != 1137 ); + while ( yy_current_state != 1151 ); yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; @@ -2583,599 +2597,614 @@ TOKEN(VARYING) case 32: YY_RULE_SETUP #line 92 "flex_lexer.l" -TOKEN(VIRTUAL) +TOKEN(TIME) YY_BREAK case 33: YY_RULE_SETUP #line 93 "flex_lexer.l" -TOKEN(BEFORE) +TOKEN(DECIMAL) YY_BREAK case 34: YY_RULE_SETUP #line 94 "flex_lexer.l" -TOKEN(COLUMN) +TOKEN(REAL) YY_BREAK case 35: YY_RULE_SETUP #line 95 "flex_lexer.l" -TOKEN(CREATE) +TOKEN(VIRTUAL) YY_BREAK case 36: YY_RULE_SETUP #line 96 "flex_lexer.l" -TOKEN(DELETE) +TOKEN(BEFORE) YY_BREAK case 37: YY_RULE_SETUP #line 97 "flex_lexer.l" -TOKEN(DIRECT) +TOKEN(COLUMN) YY_BREAK case 38: YY_RULE_SETUP #line 98 "flex_lexer.l" -TOKEN(DOUBLE) +TOKEN(CREATE) YY_BREAK case 39: YY_RULE_SETUP #line 99 "flex_lexer.l" -TOKEN(ESCAPE) +TOKEN(DELETE) YY_BREAK case 40: YY_RULE_SETUP #line 100 "flex_lexer.l" -TOKEN(EXCEPT) +TOKEN(DIRECT) YY_BREAK case 41: YY_RULE_SETUP #line 101 "flex_lexer.l" -TOKEN(EXISTS) +TOKEN(DOUBLE) YY_BREAK case 42: YY_RULE_SETUP #line 102 "flex_lexer.l" -TOKEN(EXTRACT) +TOKEN(ESCAPE) YY_BREAK case 43: YY_RULE_SETUP #line 103 "flex_lexer.l" -TOKEN(CAST) +TOKEN(EXCEPT) YY_BREAK case 44: YY_RULE_SETUP #line 104 "flex_lexer.l" -TOKEN(FORMAT) +TOKEN(EXISTS) YY_BREAK case 45: YY_RULE_SETUP #line 105 "flex_lexer.l" -TOKEN(GLOBAL) +TOKEN(EXTRACT) YY_BREAK case 46: YY_RULE_SETUP #line 106 "flex_lexer.l" -TOKEN(HAVING) +TOKEN(CAST) YY_BREAK case 47: YY_RULE_SETUP #line 107 "flex_lexer.l" -TOKEN(IMPORT) +TOKEN(FORMAT) YY_BREAK case 48: YY_RULE_SETUP #line 108 "flex_lexer.l" -TOKEN(INSERT) +TOKEN(GLOBAL) YY_BREAK case 49: YY_RULE_SETUP #line 109 "flex_lexer.l" -TOKEN(ISNULL) +TOKEN(HAVING) YY_BREAK case 50: YY_RULE_SETUP #line 110 "flex_lexer.l" -TOKEN(OFFSET) +TOKEN(IMPORT) YY_BREAK case 51: YY_RULE_SETUP #line 111 "flex_lexer.l" -TOKEN(RENAME) +TOKEN(INSERT) YY_BREAK case 52: YY_RULE_SETUP #line 112 "flex_lexer.l" -TOKEN(SCHEMA) +TOKEN(ISNULL) YY_BREAK case 53: YY_RULE_SETUP #line 113 "flex_lexer.l" -TOKEN(SELECT) +TOKEN(OFFSET) YY_BREAK case 54: YY_RULE_SETUP #line 114 "flex_lexer.l" -TOKEN(SORTED) +TOKEN(RENAME) YY_BREAK case 55: YY_RULE_SETUP #line 115 "flex_lexer.l" -TOKEN(TABLES) +TOKEN(SCHEMA) YY_BREAK case 56: YY_RULE_SETUP #line 116 "flex_lexer.l" -TOKEN(UNIQUE) +TOKEN(SELECT) YY_BREAK case 57: YY_RULE_SETUP #line 117 "flex_lexer.l" -TOKEN(UNLOAD) +TOKEN(SORTED) YY_BREAK case 58: YY_RULE_SETUP #line 118 "flex_lexer.l" -TOKEN(UPDATE) +TOKEN(TABLES) YY_BREAK case 59: YY_RULE_SETUP #line 119 "flex_lexer.l" -TOKEN(VALUES) +TOKEN(UNIQUE) YY_BREAK case 60: YY_RULE_SETUP #line 120 "flex_lexer.l" -TOKEN(AFTER) +TOKEN(UNLOAD) YY_BREAK case 61: YY_RULE_SETUP #line 121 "flex_lexer.l" -TOKEN(ALTER) +TOKEN(UPDATE) YY_BREAK case 62: YY_RULE_SETUP #line 122 "flex_lexer.l" -TOKEN(ARRAY) +TOKEN(VALUES) YY_BREAK case 63: YY_RULE_SETUP #line 123 "flex_lexer.l" -TOKEN(CROSS) +TOKEN(AFTER) YY_BREAK case 64: YY_RULE_SETUP #line 124 "flex_lexer.l" -TOKEN(DELTA) +TOKEN(ALTER) YY_BREAK case 65: YY_RULE_SETUP #line 125 "flex_lexer.l" -TOKEN(FLOAT) +TOKEN(ARRAY) YY_BREAK case 66: YY_RULE_SETUP #line 126 "flex_lexer.l" -TOKEN(GROUP) +TOKEN(CROSS) YY_BREAK case 67: YY_RULE_SETUP #line 127 "flex_lexer.l" -TOKEN(INDEX) +TOKEN(DELTA) YY_BREAK case 68: YY_RULE_SETUP #line 128 "flex_lexer.l" -TOKEN(INNER) +TOKEN(FLOAT) YY_BREAK case 69: YY_RULE_SETUP #line 129 "flex_lexer.l" -TOKEN(LIMIT) +TOKEN(GROUP) YY_BREAK case 70: YY_RULE_SETUP #line 130 "flex_lexer.l" -TOKEN(LOCAL) +TOKEN(INDEX) YY_BREAK case 71: YY_RULE_SETUP #line 131 "flex_lexer.l" -TOKEN(MERGE) +TOKEN(INNER) YY_BREAK case 72: YY_RULE_SETUP #line 132 "flex_lexer.l" -TOKEN(MINUS) +TOKEN(LIMIT) YY_BREAK case 73: YY_RULE_SETUP #line 133 "flex_lexer.l" -TOKEN(ORDER) +TOKEN(LOCAL) YY_BREAK case 74: YY_RULE_SETUP #line 134 "flex_lexer.l" -TOKEN(OUTER) +TOKEN(MERGE) YY_BREAK case 75: YY_RULE_SETUP #line 135 "flex_lexer.l" -TOKEN(RIGHT) +TOKEN(MINUS) YY_BREAK case 76: YY_RULE_SETUP #line 136 "flex_lexer.l" -TOKEN(TABLE) +TOKEN(ORDER) YY_BREAK case 77: YY_RULE_SETUP #line 137 "flex_lexer.l" -TOKEN(UNION) +TOKEN(OUTER) YY_BREAK case 78: YY_RULE_SETUP #line 138 "flex_lexer.l" -TOKEN(USING) +TOKEN(RIGHT) YY_BREAK case 79: YY_RULE_SETUP #line 139 "flex_lexer.l" -TOKEN(WHERE) +TOKEN(TABLE) YY_BREAK case 80: YY_RULE_SETUP #line 140 "flex_lexer.l" -TOKEN(CALL) +TOKEN(UNION) YY_BREAK case 81: YY_RULE_SETUP #line 141 "flex_lexer.l" -TOKEN(CASE) +TOKEN(USING) YY_BREAK case 82: YY_RULE_SETUP #line 142 "flex_lexer.l" -TOKEN(CHAR) +TOKEN(WHERE) YY_BREAK case 83: YY_RULE_SETUP #line 143 "flex_lexer.l" -TOKEN(COPY) +TOKEN(CALL) YY_BREAK case 84: YY_RULE_SETUP #line 144 "flex_lexer.l" -TOKEN(DATE) +TOKEN(CASE) YY_BREAK case 85: YY_RULE_SETUP #line 145 "flex_lexer.l" -TOKEN(DATETIME) +TOKEN(CHAR) YY_BREAK case 86: YY_RULE_SETUP #line 146 "flex_lexer.l" -TOKEN(DESC) +TOKEN(COPY) YY_BREAK case 87: YY_RULE_SETUP #line 147 "flex_lexer.l" -TOKEN(DROP) +TOKEN(DATE) YY_BREAK case 88: YY_RULE_SETUP #line 148 "flex_lexer.l" -TOKEN(ELSE) +TOKEN(DATETIME) YY_BREAK case 89: YY_RULE_SETUP #line 149 "flex_lexer.l" -TOKEN(FILE) +TOKEN(DESC) YY_BREAK case 90: YY_RULE_SETUP #line 150 "flex_lexer.l" -TOKEN(FROM) +TOKEN(DROP) YY_BREAK case 91: YY_RULE_SETUP #line 151 "flex_lexer.l" -TOKEN(FULL) +TOKEN(ELSE) YY_BREAK case 92: YY_RULE_SETUP #line 152 "flex_lexer.l" -TOKEN(HASH) +TOKEN(FILE) YY_BREAK case 93: YY_RULE_SETUP #line 153 "flex_lexer.l" -TOKEN(HINT) +TOKEN(FROM) YY_BREAK case 94: YY_RULE_SETUP #line 154 "flex_lexer.l" -TOKEN(INTO) +TOKEN(FULL) YY_BREAK case 95: YY_RULE_SETUP #line 155 "flex_lexer.l" -TOKEN(JOIN) +TOKEN(HASH) YY_BREAK case 96: YY_RULE_SETUP #line 156 "flex_lexer.l" -TOKEN(LEFT) +TOKEN(HINT) YY_BREAK case 97: YY_RULE_SETUP #line 157 "flex_lexer.l" -TOKEN(LIKE) +TOKEN(INTO) YY_BREAK case 98: YY_RULE_SETUP #line 158 "flex_lexer.l" -TOKEN(ILIKE) +TOKEN(JOIN) YY_BREAK case 99: YY_RULE_SETUP #line 159 "flex_lexer.l" -TOKEN(LOAD) +TOKEN(LEFT) YY_BREAK case 100: YY_RULE_SETUP #line 160 "flex_lexer.l" -TOKEN(LONG) +TOKEN(LIKE) YY_BREAK case 101: YY_RULE_SETUP #line 161 "flex_lexer.l" -TOKEN(NULL) +TOKEN(ILIKE) YY_BREAK case 102: YY_RULE_SETUP #line 162 "flex_lexer.l" -TOKEN(PLAN) +TOKEN(LOAD) YY_BREAK case 103: YY_RULE_SETUP #line 163 "flex_lexer.l" -TOKEN(SHOW) +TOKEN(LONG) YY_BREAK case 104: YY_RULE_SETUP #line 164 "flex_lexer.l" -TOKEN(TEXT) +TOKEN(NULL) YY_BREAK case 105: YY_RULE_SETUP #line 165 "flex_lexer.l" -TOKEN(THEN) +TOKEN(PLAN) YY_BREAK case 106: YY_RULE_SETUP #line 166 "flex_lexer.l" -TOKEN(TIME) +TOKEN(SHOW) YY_BREAK case 107: YY_RULE_SETUP #line 167 "flex_lexer.l" -TOKEN(VIEW) +TOKEN(TEXT) YY_BREAK case 108: YY_RULE_SETUP #line 168 "flex_lexer.l" -TOKEN(WHEN) +TOKEN(THEN) YY_BREAK case 109: YY_RULE_SETUP #line 169 "flex_lexer.l" -TOKEN(WITH) +TOKEN(TIME) YY_BREAK case 110: YY_RULE_SETUP #line 170 "flex_lexer.l" -TOKEN(ADD) +TOKEN(VIEW) YY_BREAK case 111: YY_RULE_SETUP #line 171 "flex_lexer.l" -TOKEN(ALL) +TOKEN(WHEN) YY_BREAK case 112: YY_RULE_SETUP #line 172 "flex_lexer.l" -TOKEN(AND) +TOKEN(WITH) YY_BREAK case 113: YY_RULE_SETUP #line 173 "flex_lexer.l" -TOKEN(ASC) +TOKEN(ADD) YY_BREAK case 114: YY_RULE_SETUP #line 174 "flex_lexer.l" -TOKEN(END) +TOKEN(ALL) YY_BREAK case 115: YY_RULE_SETUP #line 175 "flex_lexer.l" -TOKEN(FOR) +TOKEN(AND) YY_BREAK case 116: YY_RULE_SETUP #line 176 "flex_lexer.l" -TOKEN(INT) +TOKEN(ASC) YY_BREAK case 117: YY_RULE_SETUP #line 177 "flex_lexer.l" -TOKEN(KEY) +TOKEN(END) YY_BREAK case 118: YY_RULE_SETUP #line 178 "flex_lexer.l" -TOKEN(NOT) +TOKEN(FOR) YY_BREAK case 119: YY_RULE_SETUP #line 179 "flex_lexer.l" -TOKEN(OFF) +TOKEN(INT) YY_BREAK case 120: YY_RULE_SETUP #line 180 "flex_lexer.l" -TOKEN(SET) +TOKEN(KEY) YY_BREAK case 121: YY_RULE_SETUP #line 181 "flex_lexer.l" -TOKEN(TOP) +TOKEN(NOT) YY_BREAK case 122: YY_RULE_SETUP #line 182 "flex_lexer.l" -TOKEN(AS) +TOKEN(OFF) YY_BREAK case 123: YY_RULE_SETUP #line 183 "flex_lexer.l" -TOKEN(BY) +TOKEN(SET) YY_BREAK case 124: YY_RULE_SETUP #line 184 "flex_lexer.l" -TOKEN(IF) +TOKEN(TOP) YY_BREAK case 125: YY_RULE_SETUP #line 185 "flex_lexer.l" -TOKEN(IN) +TOKEN(AS) YY_BREAK case 126: YY_RULE_SETUP #line 186 "flex_lexer.l" -TOKEN(IS) +TOKEN(BY) YY_BREAK case 127: YY_RULE_SETUP #line 187 "flex_lexer.l" -TOKEN(OF) +TOKEN(IF) YY_BREAK case 128: YY_RULE_SETUP #line 188 "flex_lexer.l" -TOKEN(ON) +TOKEN(IN) YY_BREAK case 129: YY_RULE_SETUP #line 189 "flex_lexer.l" -TOKEN(OR) +TOKEN(IS) YY_BREAK case 130: YY_RULE_SETUP #line 190 "flex_lexer.l" -TOKEN(TO) +TOKEN(OF) YY_BREAK case 131: YY_RULE_SETUP #line 191 "flex_lexer.l" -TOKEN(SECOND) +TOKEN(ON) YY_BREAK case 132: YY_RULE_SETUP #line 192 "flex_lexer.l" -TOKEN(MINUTE) +TOKEN(OR) YY_BREAK case 133: YY_RULE_SETUP #line 193 "flex_lexer.l" -TOKEN(HOUR) +TOKEN(TO) YY_BREAK case 134: YY_RULE_SETUP #line 194 "flex_lexer.l" -TOKEN(DAY) +TOKEN(SECOND) YY_BREAK case 135: YY_RULE_SETUP #line 195 "flex_lexer.l" -TOKEN(MONTH) +TOKEN(MINUTE) YY_BREAK case 136: YY_RULE_SETUP #line 196 "flex_lexer.l" -TOKEN(YEAR) +TOKEN(HOUR) YY_BREAK case 137: YY_RULE_SETUP #line 197 "flex_lexer.l" -TOKEN(TRUE) +TOKEN(DAY) YY_BREAK case 138: YY_RULE_SETUP #line 198 "flex_lexer.l" -TOKEN(FALSE) +TOKEN(MONTH) YY_BREAK case 139: YY_RULE_SETUP #line 199 "flex_lexer.l" -TOKEN(TRANSACTION) +TOKEN(YEAR) YY_BREAK case 140: YY_RULE_SETUP #line 200 "flex_lexer.l" -TOKEN(BEGIN) +TOKEN(TRUE) YY_BREAK case 141: YY_RULE_SETUP #line 201 "flex_lexer.l" -TOKEN(ROLLBACK) +TOKEN(FALSE) YY_BREAK case 142: YY_RULE_SETUP #line 202 "flex_lexer.l" -TOKEN(COMMIT) +TOKEN(TRANSACTION) YY_BREAK -/* Allow =/== see https://sqlite.org/lang_expr.html#collateop */ case 143: YY_RULE_SETUP -#line 205 "flex_lexer.l" -TOKEN(EQUALS) +#line 203 "flex_lexer.l" +TOKEN(BEGIN) YY_BREAK case 144: YY_RULE_SETUP -#line 206 "flex_lexer.l" -TOKEN(NOTEQUALS) +#line 204 "flex_lexer.l" +TOKEN(ROLLBACK) YY_BREAK case 145: YY_RULE_SETUP -#line 207 "flex_lexer.l" -TOKEN(NOTEQUALS) +#line 205 "flex_lexer.l" +TOKEN(COMMIT) YY_BREAK +/* Allow =/== see https://sqlite.org/lang_expr.html#collateop */ case 146: YY_RULE_SETUP #line 208 "flex_lexer.l" -TOKEN(LESSEQ) +TOKEN(EQUALS) YY_BREAK case 147: YY_RULE_SETUP #line 209 "flex_lexer.l" -TOKEN(GREATEREQ) +TOKEN(NOTEQUALS) YY_BREAK case 148: YY_RULE_SETUP #line 210 "flex_lexer.l" -TOKEN(CONCAT) +TOKEN(NOTEQUALS) YY_BREAK case 149: YY_RULE_SETUP -#line 212 "flex_lexer.l" -{ return yytext[0]; } +#line 211 "flex_lexer.l" +TOKEN(LESSEQ) YY_BREAK case 150: -#line 215 "flex_lexer.l" +YY_RULE_SETUP +#line 212 "flex_lexer.l" +TOKEN(GREATEREQ) + YY_BREAK case 151: YY_RULE_SETUP +#line 213 "flex_lexer.l" +TOKEN(CONCAT) + YY_BREAK +case 152: +YY_RULE_SETUP #line 215 "flex_lexer.l" +{ return yytext[0]; } + YY_BREAK +case 153: +#line 218 "flex_lexer.l" +case 154: +YY_RULE_SETUP +#line 218 "flex_lexer.l" { yylval->fval = atof(yytext); return SQL_FLOATVAL; @@ -3186,17 +3215,17 @@ YY_RULE_SETUP * positive equivalent. We thus match for LLONG_MIN specifically. This is not an issue for floats, where * numeric_limits::lowest() == -numeric_limits::max(); */ -case 152: +case 155: YY_RULE_SETUP -#line 225 "flex_lexer.l" +#line 228 "flex_lexer.l" { yylval->ival = LLONG_MIN; return SQL_INTVAL; } YY_BREAK -case 153: +case 156: YY_RULE_SETUP -#line 230 "flex_lexer.l" +#line 233 "flex_lexer.l" { errno = 0; yylval->ival = strtoll(yytext, nullptr, 0); @@ -3207,59 +3236,59 @@ YY_RULE_SETUP return SQL_INTVAL; } YY_BREAK -case 154: +case 157: YY_RULE_SETUP -#line 240 "flex_lexer.l" +#line 243 "flex_lexer.l" { // Crop the leading and trailing quote char yylval->sval = hsql::substr(yytext, 1, strlen(yytext)-1); return SQL_IDENTIFIER; } YY_BREAK -case 155: +case 158: YY_RULE_SETUP -#line 246 "flex_lexer.l" +#line 249 "flex_lexer.l" { yylval->sval = strdup(yytext); return SQL_IDENTIFIER; } YY_BREAK -case 156: +case 159: YY_RULE_SETUP -#line 251 "flex_lexer.l" +#line 254 "flex_lexer.l" { BEGIN singlequotedstring; strbuf = std::stringstream{}; } YY_BREAK -case 157: +case 160: YY_RULE_SETUP -#line 252 "flex_lexer.l" +#line 255 "flex_lexer.l" { strbuf << '\''; } YY_BREAK -case 158: -/* rule 158 can match eol */ +case 161: +/* rule 161 can match eol */ YY_RULE_SETUP -#line 253 "flex_lexer.l" +#line 256 "flex_lexer.l" { strbuf << yytext; } YY_BREAK -case 159: +case 162: YY_RULE_SETUP -#line 254 "flex_lexer.l" +#line 257 "flex_lexer.l" { BEGIN 0; yylval->sval = strdup(strbuf.str().c_str()); return SQL_STRING; } YY_BREAK case YY_STATE_EOF(singlequotedstring): -#line 255 "flex_lexer.l" +#line 258 "flex_lexer.l" { fprintf(stderr, "[SQL-Lexer-Error] Unterminated string\n"); return 0; } YY_BREAK -case 160: +case 163: YY_RULE_SETUP -#line 257 "flex_lexer.l" +#line 260 "flex_lexer.l" { fprintf(stderr, "[SQL-Lexer-Error] Unknown Character: %c\n", yytext[0]); return 0; } YY_BREAK -case 161: +case 164: YY_RULE_SETUP -#line 260 "flex_lexer.l" +#line 263 "flex_lexer.l" ECHO; YY_BREAK -#line 3262 "flex_lexer.cpp" +#line 3291 "flex_lexer.cpp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(COMMENT): yyterminate(); @@ -3560,7 +3589,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 1138 ) + if ( yy_current_state >= 1152 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -3589,11 +3618,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 1138 ) + if ( yy_current_state >= 1152 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 1137); + yy_is_jam = (yy_current_state == 1151); (void)yyg; return yy_is_jam ? 0 : yy_current_state; @@ -4416,7 +4445,7 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 260 "flex_lexer.l" +#line 263 "flex_lexer.l" /*************************** ** Section 3: User code diff --git a/src/parser/flex_lexer.h b/src/parser/flex_lexer.h index 370dd5e2..18a2d3ba 100644 --- a/src/parser/flex_lexer.h +++ b/src/parser/flex_lexer.h @@ -730,7 +730,7 @@ extern int yylex \ #undef yyTABLES_NAME #endif -#line 260 "flex_lexer.l" +#line 263 "flex_lexer.l" #line 736 "flex_lexer.h" diff --git a/src/parser/flex_lexer.l b/src/parser/flex_lexer.l index 095a2345..92a6bee8 100644 --- a/src/parser/flex_lexer.l +++ b/src/parser/flex_lexer.l @@ -89,6 +89,9 @@ SPATIAL TOKEN(SPATIAL) VARCHAR TOKEN(VARCHAR) CHARACTER TOKEN(CHARACTER) VARYING TOKEN(VARYING) +TIME TOKEN(TIME) +DECIMAL TOKEN(DECIMAL) +REAL TOKEN(REAL) VIRTUAL TOKEN(VIRTUAL) BEFORE TOKEN(BEFORE) COLUMN TOKEN(COLUMN) diff --git a/src/sql/ColumnType.h b/src/sql/ColumnType.h index e5e10ec9..5e9117ff 100755 --- a/src/sql/ColumnType.h +++ b/src/sql/ColumnType.h @@ -14,7 +14,8 @@ namespace hsql { VARCHAR, TEXT, DATETIME, - DATE + DATE, + TIME, }; // Represents the type of a column, e.g., FLOAT or VARCHAR(10) diff --git a/src/sql/statements.cpp b/src/sql/statements.cpp index 6b422c37..56aeb36d 100755 --- a/src/sql/statements.cpp +++ b/src/sql/statements.cpp @@ -60,6 +60,9 @@ namespace hsql { case DataType::DATE: stream << "DATE"; break; + case DataType::TIME: + stream << "TIME"; + break; } return stream; } From 241b65262b39e0a06dd6b13dc7b68a9f739b8516 Mon Sep 17 00:00:00 2001 From: Jostafarr Date: Tue, 6 Jul 2021 10:31:20 +0200 Subject: [PATCH 06/73] adds keyconstraint functionality --- src/sql/CreateStatement.h | 12 ++++++++++++ src/sql/statements.cpp | 15 +++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/src/sql/CreateStatement.h b/src/sql/CreateStatement.h index 56e78192..99509942 100755 --- a/src/sql/CreateStatement.h +++ b/src/sql/CreateStatement.h @@ -10,6 +10,17 @@ namespace hsql { struct SelectStatement; + // Represents definition of a key constraint + struct KeyConstraints { + KeyConstraints(char* keyType, std::unordered_set columnIDs); + virtual ~KeyConstraints(); + + enum struct KeyType {PRIMARY_KEY, UNIQUE}; + + KeyType type; + std::unordered_set columnIDs; + }; + // Represents definition of a table column struct ColumnDefinition { ColumnDefinition(char* name, ColumnType type, bool nullable); @@ -41,6 +52,7 @@ namespace hsql { char* indexName; // default: nullptr std::vector* indexColumns; std::vector* columns; // default: nullptr + std::vector* keyConstraints; // default: nullptr std::vector* viewColumns; SelectStatement* select; }; diff --git a/src/sql/statements.cpp b/src/sql/statements.cpp index 56aeb36d..6e529302 100755 --- a/src/sql/statements.cpp +++ b/src/sql/statements.cpp @@ -2,6 +2,13 @@ namespace hsql { + // KeyConstraints + KeyConstraints::KeyConstraints(KeyType keyType, std::unordered_set columnIDs) : + type(keyType), + columnIDs(columnIDs) { }; + + KeyConstraints::~KeyConstraints() { } + // ColumnDefinition ColumnDefinition::ColumnDefinition(char* name, ColumnType type, bool nullable) : name(name), @@ -77,6 +84,7 @@ namespace hsql { schema(nullptr), tableName(nullptr), columns(nullptr), + keyConstraints(nullptr), viewColumns(nullptr), select(nullptr) {}; @@ -93,6 +101,13 @@ namespace hsql { delete columns; } + if (keyConstraints != nullptr) { + for (Keyconstraints* def : *keyConstraints) { + delete def; + } + delete keyConstraints; + } + if (viewColumns != nullptr) { for (char* column : *viewColumns) { free(column); From 4e37b385e7220a8cf934f39efb4a98cc765ce153 Mon Sep 17 00:00:00 2001 From: Moritz Spranger Date: Tue, 6 Jul 2021 11:34:02 +0200 Subject: [PATCH 07/73] Add unique types for decimal, real and varchar_varying --- src/parser/bison_parser.y | 6 +++--- src/sql/ColumnType.h | 3 +++ src/sql/statements.cpp | 9 +++++++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 66714211..c4b82d11 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -566,11 +566,11 @@ column_type: | INTEGER { $$ = ColumnType{DataType::INT}; } | LONG { $$ = ColumnType{DataType::LONG}; } | FLOAT { $$ = ColumnType{DataType::FLOAT}; } - | DECIMAL '(' INTVAL ',' INTVAL ')' { $$ = ColumnType{DataType::FLOAT}; } + | DECIMAL '(' INTVAL ',' INTVAL ')' { $$ = ColumnType{DataType::DECIMAL}; } | DOUBLE { $$ = ColumnType{DataType::DOUBLE}; } - | REAL { $$ = ColumnType{DataType::FLOAT}; } + | REAL { $$ = ColumnType{DataType::REAL}; } | VARCHAR '(' INTVAL ')' { $$ = ColumnType{DataType::VARCHAR, $3}; } - | CHARACTER VARYING'(' INTVAL ')' { $$ = ColumnType{DataType::VARCHAR, $4}; } + | CHARACTER VARYING'(' INTVAL ')' { $$ = ColumnType{DataType::VARCHAR_VARYING, $4}; } | CHAR '(' INTVAL ')' { $$ = ColumnType{DataType::CHAR, $3}; } | TEXT { $$ = ColumnType{DataType::TEXT}; } | TIME { $$ = ColumnType{DataType::TIME}; } diff --git a/src/sql/ColumnType.h b/src/sql/ColumnType.h index 5e9117ff..67a1b65f 100755 --- a/src/sql/ColumnType.h +++ b/src/sql/ColumnType.h @@ -10,8 +10,11 @@ namespace hsql { LONG, FLOAT, DOUBLE, + DECIMAL, + REAL, CHAR, VARCHAR, + VARCHAR_VARYING, TEXT, DATETIME, DATE, diff --git a/src/sql/statements.cpp b/src/sql/statements.cpp index 56aeb36d..a08d6334 100755 --- a/src/sql/statements.cpp +++ b/src/sql/statements.cpp @@ -45,6 +45,15 @@ namespace hsql { case DataType::DOUBLE: stream << "DOUBLE"; break; + case DataType::DECIMAL: + stream << "DECIMAL"; + break; + case DataType::REAL: + stream << "REAL"; + break; + case DataType::VARCHAR_VARYING: + stream << "VARCHAR_VARYING(" << column_type.length << ")"; + break; case DataType::CHAR: stream << "CHAR(" << column_type.length << ")"; break; From e4ec784b36293081abaddb6aab0e5aada6cfcde5 Mon Sep 17 00:00:00 2001 From: Jostafarr Date: Tue, 6 Jul 2021 11:39:49 +0200 Subject: [PATCH 08/73] added tablekeyconstraint to parser --- src/parser/bison_parser.y | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 66714211..51cb585f 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -122,6 +122,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha hsql::DatetimeField datetime_field; hsql::LimitDescription* limit; hsql::ColumnDefinition* column_t; + hsql::TableKeyConstraint table_key_constraint_t; hsql::ColumnType column_type_t; hsql::ImportType import_type_t; hsql::GroupByDescription* group_t; @@ -138,6 +139,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha std::vector* expr_vec; std::vector* order_vec; std::vector* with_description_vec; + std::vector table_key_constraint_vec; } @@ -220,6 +222,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha %type datetime_field %type column_def %type column_type +%type table_key_constraint %type update_clause %type opt_group %type opt_table_alias table_alias opt_alias alias @@ -236,6 +239,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha %type opt_with_clause with_clause with_description_list %type update_clause_commalist %type column_def_commalist +%type opt_table_key_constraints /****************************** ** Token Precedence and Associativity @@ -514,7 +518,7 @@ create_statement: free($6); $$->filePath = $8; } - | CREATE TABLE opt_not_exists table_name '(' column_def_commalist ')' { + | CREATE TABLE opt_not_exists table_name '(' column_def_commalist opt_table_key_constraints ')' { $$ = new CreateStatement(kCreateTable); $$->ifNotExists = $3; $$->schema = $4.schema; @@ -584,6 +588,15 @@ opt_column_nullable: | /* empty */ { $$ = false; } ; +opt_table_key_constraints: + table_key_constraint {$$ = new std::vector(); $$->push_back($1); } + | opt_table_key_constraints table_key_constraint { $1->push_back($2); $$ = $1; } + | /* empty */ {$$ = new std::vector(); } + ; + +table_key_constaint: + ',' PRIMARY KEY '(' ident_commalist ')' { $$ = TableKeyConstraint{KeyType::PRIMARY_KEY, $5}; } + | ',' UNIQUE '(' ident_commalist ')' { $$ = TableKeyConstraint{KeyType::UNIQUE, $4}; } /****************************** * Drop Statement * DROP TABLE students; From 5649940a5ff066e9db830e7324e4e49469b9a5bc Mon Sep 17 00:00:00 2001 From: Jostafarr Date: Tue, 6 Jul 2021 12:32:26 +0200 Subject: [PATCH 09/73] WIP --- src/parser/bison_parser.cpp | 4045 ++++++++++++++++++----------------- src/parser/bison_parser.h | 330 ++- src/parser/bison_parser.y | 2 +- src/sql/CreateStatement.h | 14 +- src/sql/statements.cpp | 9 +- 5 files changed, 2206 insertions(+), 2194 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 4e0aedd2..34b834fe 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.7.6. */ +/* A Bison parser, made by GNU Bison 3.5.1. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -34,10 +34,6 @@ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ -/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, - especially those whose name start with YY_ or yy_. They are - private implementation details that can be changed or removed. */ - /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. @@ -45,11 +41,14 @@ define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ -/* Identify Bison output, and Bison version. */ -#define YYBISON 30706 +/* 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 string. */ -#define YYBISON_VERSION "3.7.6" +/* Bison version. */ +#define YYBISON_VERSION "3.5.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -103,7 +102,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha } -#line 107 "bison_parser.cpp" +#line 106 "bison_parser.cpp" # ifndef YY_CAST # ifdef __cplusplus @@ -126,295 +125,302 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha # endif # endif -#include "bison_parser.h" -/* Symbol kind. */ -enum yysymbol_kind_t +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 1 +#endif + +/* Use api.header.include to #include this header + instead of duplicating it here. */ +#ifndef YY_HSQL_BISON_PARSER_H_INCLUDED +# define YY_HSQL_BISON_PARSER_H_INCLUDED +/* Debug traces. */ +#ifndef HSQL_DEBUG +# if defined YYDEBUG +#if YYDEBUG +# define HSQL_DEBUG 1 +# else +# define HSQL_DEBUG 0 +# endif +# else /* ! defined YYDEBUG */ +# define HSQL_DEBUG 0 +# endif /* ! defined YYDEBUG */ +#endif /* ! defined HSQL_DEBUG */ +#if HSQL_DEBUG +extern int hsql_debug; +#endif +/* "%code requires" blocks. */ +#line 35 "bison_parser.y" + +// %code requires block + +#include "../sql/statements.h" +#include "../SQLParserResult.h" +#include "parser_typedef.h" + +// Auto update column and line number +#define YY_USER_ACTION \ + yylloc->first_line = yylloc->last_line; \ + yylloc->first_column = yylloc->last_column; \ + for(int i = 0; yytext[i] != '\0'; i++) { \ + yylloc->total_column++; \ + yylloc->string_length++; \ + if(yytext[i] == '\n') { \ + yylloc->last_line++; \ + yylloc->last_column = 0; \ + } \ + else { \ + yylloc->last_column++; \ + } \ + } + +#line 181 "bison_parser.cpp" + +/* Token type. */ +#ifndef HSQL_TOKENTYPE +# define HSQL_TOKENTYPE + enum hsql_tokentype + { + SQL_IDENTIFIER = 258, + SQL_STRING = 259, + SQL_FLOATVAL = 260, + SQL_INTVAL = 261, + SQL_DEALLOCATE = 262, + SQL_PARAMETERS = 263, + SQL_INTERSECT = 264, + SQL_TEMPORARY = 265, + SQL_TIMESTAMP = 266, + SQL_DISTINCT = 267, + SQL_NVARCHAR = 268, + SQL_RESTRICT = 269, + SQL_TRUNCATE = 270, + SQL_ANALYZE = 271, + SQL_BETWEEN = 272, + SQL_CASCADE = 273, + SQL_COLUMNS = 274, + SQL_CONTROL = 275, + SQL_DEFAULT = 276, + SQL_EXECUTE = 277, + SQL_EXPLAIN = 278, + SQL_INTEGER = 279, + SQL_NATURAL = 280, + SQL_PREPARE = 281, + SQL_PRIMARY = 282, + SQL_SCHEMAS = 283, + SQL_CHARACTER = 284, + SQL_VARYING = 285, + SQL_REAL = 286, + SQL_DECIMAL = 287, + SQL_SPATIAL = 288, + SQL_VARCHAR = 289, + SQL_VIRTUAL = 290, + SQL_DESCRIBE = 291, + SQL_BEFORE = 292, + SQL_COLUMN = 293, + SQL_CREATE = 294, + SQL_DELETE = 295, + SQL_DIRECT = 296, + SQL_DOUBLE = 297, + SQL_ESCAPE = 298, + SQL_EXCEPT = 299, + SQL_EXISTS = 300, + SQL_EXTRACT = 301, + SQL_CAST = 302, + SQL_FORMAT = 303, + SQL_GLOBAL = 304, + SQL_HAVING = 305, + SQL_IMPORT = 306, + SQL_INSERT = 307, + SQL_ISNULL = 308, + SQL_OFFSET = 309, + SQL_RENAME = 310, + SQL_SCHEMA = 311, + SQL_SELECT = 312, + SQL_SORTED = 313, + SQL_TABLES = 314, + SQL_UNIQUE = 315, + SQL_UNLOAD = 316, + SQL_UPDATE = 317, + SQL_VALUES = 318, + SQL_AFTER = 319, + SQL_ALTER = 320, + SQL_CROSS = 321, + SQL_DELTA = 322, + SQL_FLOAT = 323, + SQL_GROUP = 324, + SQL_INDEX = 325, + SQL_INNER = 326, + SQL_LIMIT = 327, + SQL_LOCAL = 328, + SQL_MERGE = 329, + SQL_MINUS = 330, + SQL_ORDER = 331, + SQL_OUTER = 332, + SQL_RIGHT = 333, + SQL_TABLE = 334, + SQL_UNION = 335, + SQL_USING = 336, + SQL_WHERE = 337, + SQL_CALL = 338, + SQL_CASE = 339, + SQL_CHAR = 340, + SQL_COPY = 341, + SQL_DATE = 342, + SQL_DATETIME = 343, + SQL_DESC = 344, + SQL_DROP = 345, + SQL_ELSE = 346, + SQL_FILE = 347, + SQL_FROM = 348, + SQL_FULL = 349, + SQL_HASH = 350, + SQL_HINT = 351, + SQL_INTO = 352, + SQL_JOIN = 353, + SQL_LEFT = 354, + SQL_LIKE = 355, + SQL_LOAD = 356, + SQL_LONG = 357, + SQL_NULL = 358, + SQL_PLAN = 359, + SQL_SHOW = 360, + SQL_TEXT = 361, + SQL_THEN = 362, + SQL_TIME = 363, + SQL_VIEW = 364, + SQL_WHEN = 365, + SQL_WITH = 366, + SQL_ADD = 367, + SQL_ALL = 368, + SQL_AND = 369, + SQL_ASC = 370, + SQL_END = 371, + SQL_FOR = 372, + SQL_INT = 373, + SQL_KEY = 374, + SQL_NOT = 375, + SQL_OFF = 376, + SQL_SET = 377, + SQL_TOP = 378, + SQL_AS = 379, + SQL_BY = 380, + SQL_IF = 381, + SQL_IN = 382, + SQL_IS = 383, + SQL_OF = 384, + SQL_ON = 385, + SQL_OR = 386, + SQL_TO = 387, + SQL_ARRAY = 388, + SQL_CONCAT = 389, + SQL_ILIKE = 390, + SQL_SECOND = 391, + SQL_MINUTE = 392, + SQL_HOUR = 393, + SQL_DAY = 394, + SQL_MONTH = 395, + SQL_YEAR = 396, + SQL_TRUE = 397, + SQL_FALSE = 398, + SQL_TRANSACTION = 399, + SQL_BEGIN = 400, + SQL_COMMIT = 401, + SQL_ROLLBACK = 402, + SQL_EQUALS = 403, + SQL_NOTEQUALS = 404, + SQL_LESS = 405, + SQL_GREATER = 406, + SQL_LESSEQ = 407, + SQL_GREATEREQ = 408, + SQL_NOTNULL = 409, + SQL_UMINUS = 410 + }; +#endif + +/* Value type. */ +#if ! defined HSQL_STYPE && ! defined HSQL_STYPE_IS_DECLARED +union HSQL_STYPE +{ +#line 95 "bison_parser.y" + + double fval; + int64_t ival; + char* sval; + uintmax_t uval; + bool bval; + + hsql::SQLStatement* statement; + hsql::SelectStatement* select_stmt; + hsql::ImportStatement* import_stmt; + hsql::ExportStatement* export_stmt; + hsql::CreateStatement* create_stmt; + hsql::InsertStatement* insert_stmt; + hsql::DeleteStatement* delete_stmt; + hsql::UpdateStatement* update_stmt; + hsql::DropStatement* drop_stmt; + hsql::PrepareStatement* prep_stmt; + hsql::ExecuteStatement* exec_stmt; + hsql::ShowStatement* show_stmt; + hsql::TransactionStatement* transaction_stmt; + + hsql::TableName table_name; + hsql::TableRef* table; + hsql::Expr* expr; + hsql::OrderDescription* order; + hsql::OrderType order_type; + hsql::WithDescription* with_description_t; + hsql::DatetimeField datetime_field; + hsql::LimitDescription* limit; + hsql::ColumnDefinition* column_t; + hsql::TableKeyConstraint table_key_constraint_t; + hsql::ColumnType column_type_t; + hsql::ImportType import_type_t; + hsql::GroupByDescription* group_t; + hsql::UpdateClause* update_t; + hsql::Alias* alias_t; + hsql::SetOperation* set_operator_t; + + std::vector* stmt_vec; + + std::vector* str_vec; + std::vector* table_vec; + std::vector* column_vec; + std::vector* update_vec; + std::vector* expr_vec; + std::vector* order_vec; + std::vector* with_description_vec; + std::vector table_key_constraint_vec; + +#line 398 "bison_parser.cpp" + +}; +typedef union HSQL_STYPE HSQL_STYPE; +# define HSQL_STYPE_IS_TRIVIAL 1 +# define HSQL_STYPE_IS_DECLARED 1 +#endif + +/* Location type. */ +#if ! defined HSQL_LTYPE && ! defined HSQL_LTYPE_IS_DECLARED +typedef struct HSQL_LTYPE HSQL_LTYPE; +struct HSQL_LTYPE { - YYSYMBOL_YYEMPTY = -2, - YYSYMBOL_YYEOF = 0, /* "end of file" */ - YYSYMBOL_YYerror = 1, /* error */ - YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ - YYSYMBOL_IDENTIFIER = 3, /* IDENTIFIER */ - YYSYMBOL_STRING = 4, /* STRING */ - YYSYMBOL_FLOATVAL = 5, /* FLOATVAL */ - YYSYMBOL_INTVAL = 6, /* INTVAL */ - YYSYMBOL_DEALLOCATE = 7, /* DEALLOCATE */ - YYSYMBOL_PARAMETERS = 8, /* PARAMETERS */ - YYSYMBOL_INTERSECT = 9, /* INTERSECT */ - YYSYMBOL_TEMPORARY = 10, /* TEMPORARY */ - YYSYMBOL_TIMESTAMP = 11, /* TIMESTAMP */ - YYSYMBOL_DISTINCT = 12, /* DISTINCT */ - YYSYMBOL_NVARCHAR = 13, /* NVARCHAR */ - YYSYMBOL_RESTRICT = 14, /* RESTRICT */ - YYSYMBOL_TRUNCATE = 15, /* TRUNCATE */ - YYSYMBOL_ANALYZE = 16, /* ANALYZE */ - YYSYMBOL_BETWEEN = 17, /* BETWEEN */ - YYSYMBOL_CASCADE = 18, /* CASCADE */ - YYSYMBOL_COLUMNS = 19, /* COLUMNS */ - YYSYMBOL_CONTROL = 20, /* CONTROL */ - YYSYMBOL_DEFAULT = 21, /* DEFAULT */ - YYSYMBOL_EXECUTE = 22, /* EXECUTE */ - YYSYMBOL_EXPLAIN = 23, /* EXPLAIN */ - YYSYMBOL_INTEGER = 24, /* INTEGER */ - YYSYMBOL_NATURAL = 25, /* NATURAL */ - YYSYMBOL_PREPARE = 26, /* PREPARE */ - YYSYMBOL_PRIMARY = 27, /* PRIMARY */ - YYSYMBOL_SCHEMAS = 28, /* SCHEMAS */ - YYSYMBOL_CHARACTER = 29, /* CHARACTER */ - YYSYMBOL_VARYING = 30, /* VARYING */ - YYSYMBOL_REAL = 31, /* REAL */ - YYSYMBOL_DECIMAL = 32, /* DECIMAL */ - YYSYMBOL_SPATIAL = 33, /* SPATIAL */ - YYSYMBOL_VARCHAR = 34, /* VARCHAR */ - YYSYMBOL_VIRTUAL = 35, /* VIRTUAL */ - YYSYMBOL_DESCRIBE = 36, /* DESCRIBE */ - YYSYMBOL_BEFORE = 37, /* BEFORE */ - YYSYMBOL_COLUMN = 38, /* COLUMN */ - YYSYMBOL_CREATE = 39, /* CREATE */ - YYSYMBOL_DELETE = 40, /* DELETE */ - YYSYMBOL_DIRECT = 41, /* DIRECT */ - YYSYMBOL_DOUBLE = 42, /* DOUBLE */ - YYSYMBOL_ESCAPE = 43, /* ESCAPE */ - YYSYMBOL_EXCEPT = 44, /* EXCEPT */ - YYSYMBOL_EXISTS = 45, /* EXISTS */ - YYSYMBOL_EXTRACT = 46, /* EXTRACT */ - YYSYMBOL_CAST = 47, /* CAST */ - YYSYMBOL_FORMAT = 48, /* FORMAT */ - YYSYMBOL_GLOBAL = 49, /* GLOBAL */ - YYSYMBOL_HAVING = 50, /* HAVING */ - YYSYMBOL_IMPORT = 51, /* IMPORT */ - YYSYMBOL_INSERT = 52, /* INSERT */ - YYSYMBOL_ISNULL = 53, /* ISNULL */ - YYSYMBOL_OFFSET = 54, /* OFFSET */ - YYSYMBOL_RENAME = 55, /* RENAME */ - YYSYMBOL_SCHEMA = 56, /* SCHEMA */ - YYSYMBOL_SELECT = 57, /* SELECT */ - YYSYMBOL_SORTED = 58, /* SORTED */ - YYSYMBOL_TABLES = 59, /* TABLES */ - YYSYMBOL_UNIQUE = 60, /* UNIQUE */ - YYSYMBOL_UNLOAD = 61, /* UNLOAD */ - YYSYMBOL_UPDATE = 62, /* UPDATE */ - YYSYMBOL_VALUES = 63, /* VALUES */ - YYSYMBOL_AFTER = 64, /* AFTER */ - YYSYMBOL_ALTER = 65, /* ALTER */ - YYSYMBOL_CROSS = 66, /* CROSS */ - YYSYMBOL_DELTA = 67, /* DELTA */ - YYSYMBOL_FLOAT = 68, /* FLOAT */ - YYSYMBOL_GROUP = 69, /* GROUP */ - YYSYMBOL_INDEX = 70, /* INDEX */ - YYSYMBOL_INNER = 71, /* INNER */ - YYSYMBOL_LIMIT = 72, /* LIMIT */ - YYSYMBOL_LOCAL = 73, /* LOCAL */ - YYSYMBOL_MERGE = 74, /* MERGE */ - YYSYMBOL_MINUS = 75, /* MINUS */ - YYSYMBOL_ORDER = 76, /* ORDER */ - YYSYMBOL_OUTER = 77, /* OUTER */ - YYSYMBOL_RIGHT = 78, /* RIGHT */ - YYSYMBOL_TABLE = 79, /* TABLE */ - YYSYMBOL_UNION = 80, /* UNION */ - YYSYMBOL_USING = 81, /* USING */ - YYSYMBOL_WHERE = 82, /* WHERE */ - YYSYMBOL_CALL = 83, /* CALL */ - YYSYMBOL_CASE = 84, /* CASE */ - YYSYMBOL_CHAR = 85, /* CHAR */ - YYSYMBOL_COPY = 86, /* COPY */ - YYSYMBOL_DATE = 87, /* DATE */ - YYSYMBOL_DATETIME = 88, /* DATETIME */ - YYSYMBOL_DESC = 89, /* DESC */ - YYSYMBOL_DROP = 90, /* DROP */ - YYSYMBOL_ELSE = 91, /* ELSE */ - YYSYMBOL_FILE = 92, /* FILE */ - YYSYMBOL_FROM = 93, /* FROM */ - YYSYMBOL_FULL = 94, /* FULL */ - YYSYMBOL_HASH = 95, /* HASH */ - YYSYMBOL_HINT = 96, /* HINT */ - YYSYMBOL_INTO = 97, /* INTO */ - YYSYMBOL_JOIN = 98, /* JOIN */ - YYSYMBOL_LEFT = 99, /* LEFT */ - YYSYMBOL_LIKE = 100, /* LIKE */ - YYSYMBOL_LOAD = 101, /* LOAD */ - YYSYMBOL_LONG = 102, /* LONG */ - YYSYMBOL_NULL = 103, /* NULL */ - YYSYMBOL_PLAN = 104, /* PLAN */ - YYSYMBOL_SHOW = 105, /* SHOW */ - YYSYMBOL_TEXT = 106, /* TEXT */ - YYSYMBOL_THEN = 107, /* THEN */ - YYSYMBOL_TIME = 108, /* TIME */ - YYSYMBOL_VIEW = 109, /* VIEW */ - YYSYMBOL_WHEN = 110, /* WHEN */ - YYSYMBOL_WITH = 111, /* WITH */ - YYSYMBOL_ADD = 112, /* ADD */ - YYSYMBOL_ALL = 113, /* ALL */ - YYSYMBOL_AND = 114, /* AND */ - YYSYMBOL_ASC = 115, /* ASC */ - YYSYMBOL_END = 116, /* END */ - YYSYMBOL_FOR = 117, /* FOR */ - YYSYMBOL_INT = 118, /* INT */ - YYSYMBOL_KEY = 119, /* KEY */ - YYSYMBOL_NOT = 120, /* NOT */ - YYSYMBOL_OFF = 121, /* OFF */ - YYSYMBOL_SET = 122, /* SET */ - YYSYMBOL_TOP = 123, /* TOP */ - YYSYMBOL_AS = 124, /* AS */ - YYSYMBOL_BY = 125, /* BY */ - YYSYMBOL_IF = 126, /* IF */ - YYSYMBOL_IN = 127, /* IN */ - YYSYMBOL_IS = 128, /* IS */ - YYSYMBOL_OF = 129, /* OF */ - YYSYMBOL_ON = 130, /* ON */ - YYSYMBOL_OR = 131, /* OR */ - YYSYMBOL_TO = 132, /* TO */ - YYSYMBOL_ARRAY = 133, /* ARRAY */ - YYSYMBOL_CONCAT = 134, /* CONCAT */ - YYSYMBOL_ILIKE = 135, /* ILIKE */ - YYSYMBOL_SECOND = 136, /* SECOND */ - YYSYMBOL_MINUTE = 137, /* MINUTE */ - YYSYMBOL_HOUR = 138, /* HOUR */ - YYSYMBOL_DAY = 139, /* DAY */ - YYSYMBOL_MONTH = 140, /* MONTH */ - YYSYMBOL_YEAR = 141, /* YEAR */ - YYSYMBOL_TRUE = 142, /* TRUE */ - YYSYMBOL_FALSE = 143, /* FALSE */ - YYSYMBOL_TRANSACTION = 144, /* TRANSACTION */ - YYSYMBOL_BEGIN = 145, /* BEGIN */ - YYSYMBOL_COMMIT = 146, /* COMMIT */ - YYSYMBOL_ROLLBACK = 147, /* ROLLBACK */ - YYSYMBOL_148_ = 148, /* '=' */ - YYSYMBOL_EQUALS = 149, /* EQUALS */ - YYSYMBOL_NOTEQUALS = 150, /* NOTEQUALS */ - YYSYMBOL_151_ = 151, /* '<' */ - YYSYMBOL_152_ = 152, /* '>' */ - YYSYMBOL_LESS = 153, /* LESS */ - YYSYMBOL_GREATER = 154, /* GREATER */ - YYSYMBOL_LESSEQ = 155, /* LESSEQ */ - YYSYMBOL_GREATEREQ = 156, /* GREATEREQ */ - YYSYMBOL_NOTNULL = 157, /* NOTNULL */ - YYSYMBOL_158_ = 158, /* '+' */ - YYSYMBOL_159_ = 159, /* '-' */ - YYSYMBOL_160_ = 160, /* '*' */ - YYSYMBOL_161_ = 161, /* '/' */ - YYSYMBOL_162_ = 162, /* '%' */ - YYSYMBOL_163_ = 163, /* '^' */ - YYSYMBOL_UMINUS = 164, /* UMINUS */ - YYSYMBOL_165_ = 165, /* '[' */ - YYSYMBOL_166_ = 166, /* ']' */ - YYSYMBOL_167_ = 167, /* '(' */ - YYSYMBOL_168_ = 168, /* ')' */ - YYSYMBOL_169_ = 169, /* '.' */ - YYSYMBOL_170_ = 170, /* ';' */ - YYSYMBOL_171_ = 171, /* ',' */ - YYSYMBOL_172_ = 172, /* '?' */ - YYSYMBOL_YYACCEPT = 173, /* $accept */ - YYSYMBOL_input = 174, /* input */ - YYSYMBOL_statement_list = 175, /* statement_list */ - YYSYMBOL_statement = 176, /* statement */ - YYSYMBOL_preparable_statement = 177, /* preparable_statement */ - YYSYMBOL_opt_hints = 178, /* opt_hints */ - YYSYMBOL_hint_list = 179, /* hint_list */ - YYSYMBOL_hint = 180, /* hint */ - YYSYMBOL_transaction_statement = 181, /* transaction_statement */ - YYSYMBOL_opt_transaction_keyword = 182, /* opt_transaction_keyword */ - YYSYMBOL_prepare_statement = 183, /* prepare_statement */ - YYSYMBOL_prepare_target_query = 184, /* prepare_target_query */ - YYSYMBOL_execute_statement = 185, /* execute_statement */ - YYSYMBOL_import_statement = 186, /* import_statement */ - YYSYMBOL_file_type = 187, /* file_type */ - YYSYMBOL_file_path = 188, /* file_path */ - YYSYMBOL_opt_file_type = 189, /* opt_file_type */ - YYSYMBOL_export_statement = 190, /* export_statement */ - YYSYMBOL_show_statement = 191, /* show_statement */ - YYSYMBOL_create_statement = 192, /* create_statement */ - YYSYMBOL_opt_not_exists = 193, /* opt_not_exists */ - YYSYMBOL_column_def_commalist = 194, /* column_def_commalist */ - YYSYMBOL_column_def = 195, /* column_def */ - YYSYMBOL_column_type = 196, /* column_type */ - YYSYMBOL_opt_column_nullable = 197, /* opt_column_nullable */ - YYSYMBOL_drop_statement = 198, /* drop_statement */ - YYSYMBOL_opt_exists = 199, /* opt_exists */ - YYSYMBOL_delete_statement = 200, /* delete_statement */ - YYSYMBOL_truncate_statement = 201, /* truncate_statement */ - YYSYMBOL_insert_statement = 202, /* insert_statement */ - YYSYMBOL_opt_column_list = 203, /* opt_column_list */ - YYSYMBOL_update_statement = 204, /* update_statement */ - YYSYMBOL_update_clause_commalist = 205, /* update_clause_commalist */ - YYSYMBOL_update_clause = 206, /* update_clause */ - YYSYMBOL_select_statement = 207, /* select_statement */ - YYSYMBOL_select_within_set_operation = 208, /* select_within_set_operation */ - YYSYMBOL_select_within_set_operation_no_parentheses = 209, /* select_within_set_operation_no_parentheses */ - YYSYMBOL_select_with_paren = 210, /* select_with_paren */ - YYSYMBOL_select_no_paren = 211, /* select_no_paren */ - YYSYMBOL_set_operator = 212, /* set_operator */ - YYSYMBOL_set_type = 213, /* set_type */ - YYSYMBOL_opt_all = 214, /* opt_all */ - YYSYMBOL_select_clause = 215, /* select_clause */ - YYSYMBOL_opt_distinct = 216, /* opt_distinct */ - YYSYMBOL_select_list = 217, /* select_list */ - YYSYMBOL_opt_from_clause = 218, /* opt_from_clause */ - YYSYMBOL_from_clause = 219, /* from_clause */ - YYSYMBOL_opt_where = 220, /* opt_where */ - YYSYMBOL_opt_group = 221, /* opt_group */ - YYSYMBOL_opt_having = 222, /* opt_having */ - YYSYMBOL_opt_order = 223, /* opt_order */ - YYSYMBOL_order_list = 224, /* order_list */ - YYSYMBOL_order_desc = 225, /* order_desc */ - YYSYMBOL_opt_order_type = 226, /* opt_order_type */ - YYSYMBOL_opt_top = 227, /* opt_top */ - YYSYMBOL_opt_limit = 228, /* opt_limit */ - YYSYMBOL_expr_list = 229, /* expr_list */ - YYSYMBOL_opt_literal_list = 230, /* opt_literal_list */ - YYSYMBOL_literal_list = 231, /* literal_list */ - YYSYMBOL_expr_alias = 232, /* expr_alias */ - YYSYMBOL_expr = 233, /* expr */ - YYSYMBOL_operand = 234, /* operand */ - YYSYMBOL_scalar_expr = 235, /* scalar_expr */ - YYSYMBOL_unary_expr = 236, /* unary_expr */ - YYSYMBOL_binary_expr = 237, /* binary_expr */ - YYSYMBOL_logic_expr = 238, /* logic_expr */ - YYSYMBOL_in_expr = 239, /* in_expr */ - YYSYMBOL_case_expr = 240, /* case_expr */ - YYSYMBOL_case_list = 241, /* case_list */ - YYSYMBOL_exists_expr = 242, /* exists_expr */ - YYSYMBOL_comp_expr = 243, /* comp_expr */ - YYSYMBOL_function_expr = 244, /* function_expr */ - YYSYMBOL_extract_expr = 245, /* extract_expr */ - YYSYMBOL_cast_expr = 246, /* cast_expr */ - YYSYMBOL_datetime_field = 247, /* datetime_field */ - YYSYMBOL_array_expr = 248, /* array_expr */ - YYSYMBOL_array_index = 249, /* array_index */ - YYSYMBOL_between_expr = 250, /* between_expr */ - YYSYMBOL_column_name = 251, /* column_name */ - YYSYMBOL_literal = 252, /* literal */ - YYSYMBOL_string_literal = 253, /* string_literal */ - YYSYMBOL_bool_literal = 254, /* bool_literal */ - YYSYMBOL_num_literal = 255, /* num_literal */ - YYSYMBOL_int_literal = 256, /* int_literal */ - YYSYMBOL_null_literal = 257, /* null_literal */ - YYSYMBOL_param_expr = 258, /* param_expr */ - YYSYMBOL_table_ref = 259, /* table_ref */ - YYSYMBOL_table_ref_atomic = 260, /* table_ref_atomic */ - YYSYMBOL_nonjoin_table_ref_atomic = 261, /* nonjoin_table_ref_atomic */ - YYSYMBOL_table_ref_commalist = 262, /* table_ref_commalist */ - YYSYMBOL_table_ref_name = 263, /* table_ref_name */ - YYSYMBOL_table_ref_name_no_alias = 264, /* table_ref_name_no_alias */ - YYSYMBOL_table_name = 265, /* table_name */ - YYSYMBOL_opt_index_name = 266, /* opt_index_name */ - YYSYMBOL_index_name = 267, /* index_name */ - YYSYMBOL_table_alias = 268, /* table_alias */ - YYSYMBOL_opt_table_alias = 269, /* opt_table_alias */ - YYSYMBOL_alias = 270, /* alias */ - YYSYMBOL_opt_alias = 271, /* opt_alias */ - YYSYMBOL_opt_with_clause = 272, /* opt_with_clause */ - YYSYMBOL_with_clause = 273, /* with_clause */ - YYSYMBOL_with_description_list = 274, /* with_description_list */ - YYSYMBOL_with_description = 275, /* with_description */ - YYSYMBOL_join_clause = 276, /* join_clause */ - YYSYMBOL_opt_join_type = 277, /* opt_join_type */ - YYSYMBOL_join_condition = 278, /* join_condition */ - YYSYMBOL_opt_semicolon = 279, /* opt_semicolon */ - YYSYMBOL_ident_commalist = 280 /* ident_commalist */ + int first_line; + int first_column; + int last_line; + int last_column; }; -typedef enum yysymbol_kind_t yysymbol_kind_t; +# define HSQL_LTYPE_IS_DECLARED 1 +# define HSQL_LTYPE_IS_TRIVIAL 1 +#endif + + + +int hsql_parse (hsql::SQLParserResult* result, yyscan_t scanner); +#endif /* !YY_HSQL_BISON_PARSER_H_INCLUDED */ @@ -455,18 +461,6 @@ typedef int_least16_t yytype_int16; typedef short yytype_int16; #endif -/* Work around bug in HP-UX 11.23, which defines these macros - incorrectly for preprocessor constants. This workaround can likely - be removed in 2023, as HPE has promised support for HP-UX 11.23 - (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of - . */ -#ifdef __hpux -# undef UINT_LEAST8_MAX -# undef UINT_LEAST16_MAX -# define UINT_LEAST8_MAX 255 -# define UINT_LEAST16_MAX 65535 -#endif - #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ @@ -526,7 +520,6 @@ typedef int yytype_uint16; #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) - /* Stored state numbers (used for stacks). */ typedef yytype_int16 yy_state_t; @@ -545,7 +538,6 @@ typedef int yy_state_fast_t; # endif #endif - #ifndef YY_ATTRIBUTE_PURE # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) @@ -564,9 +556,9 @@ typedef int yy_state_fast_t; /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YY_USE(E) ((void) (E)) +# define YYUSE(E) ((void) (E)) #else -# define YY_USE(E) /* empty */ +# define YYUSE(E) /* empty */ #endif #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ @@ -603,7 +595,7 @@ typedef int yy_state_fast_t; #define YY_ASSERT(E) ((void) (0 && (E))) -#if 1 +#if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -668,7 +660,8 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif -#endif /* 1 */ +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + #if (! defined yyoverflow \ && (! defined __cplusplus \ @@ -736,27 +729,25 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 64 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 736 +#define YYLAST 859 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 173 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 108 +#define YYNNTS 110 /* YYNRULES -- Number of rules. */ -#define YYNRULES 271 +#define YYNRULES 276 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 501 +#define YYNSTATES 514 -/* YYMAXUTOK -- Last valid token kind. */ +#define YYUNDEFTOK 2 #define YYMAXUTOK 410 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ -#define YYTRANSLATE(YYX) \ - (0 <= (YYX) && (YYX) <= YYMAXUTOK \ - ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ - : YYSYMBOL_YYUNDEF) +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ @@ -810,70 +801,63 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 271, 271, 292, 298, 307, 311, 315, 318, 321, - 328, 329, 330, 331, 332, 333, 334, 335, 336, 345, - 346, 351, 352, 356, 360, 372, 375, 378, 384, 385, - 392, 399, 402, 406, 420, 426, 435, 452, 456, 459, - 468, 482, 485, 490, 504, 517, 524, 531, 538, 549, - 550, 554, 555, 559, 565, 566, 567, 568, 569, 570, - 571, 572, 573, 574, 575, 576, 577, 578, 582, 583, - 584, 594, 600, 606, 611, 619, 620, 629, 638, 651, - 658, 669, 670, 680, 689, 690, 694, 706, 710, 714, - 728, 729, 732, 733, 744, 745, 749, 759, 772, 779, - 783, 787, 794, 797, 803, 815, 816, 820, 824, 825, - 829, 834, 835, 839, 844, 848, 849, 853, 854, 858, - 859, 863, 867, 868, 869, 875, 876, 880, 881, 882, - 883, 884, 885, 892, 893, 897, 898, 902, 903, 907, - 917, 918, 919, 920, 921, 925, 926, 927, 928, 929, - 930, 931, 932, 933, 934, 935, 939, 940, 944, 945, - 946, 947, 948, 952, 953, 954, 955, 956, 957, 958, - 959, 960, 961, 962, 966, 967, 971, 972, 973, 974, - 980, 981, 982, 983, 987, 988, 992, 993, 997, 998, - 999, 1000, 1001, 1002, 1003, 1007, 1008, 1012, 1016, 1020, - 1021, 1022, 1023, 1024, 1025, 1029, 1033, 1037, 1041, 1042, - 1043, 1044, 1048, 1049, 1050, 1051, 1052, 1056, 1060, 1061, - 1065, 1066, 1070, 1074, 1078, 1090, 1091, 1101, 1102, 1106, - 1107, 1116, 1117, 1122, 1133, 1142, 1143, 1147, 1148, 1152, - 1157, 1158, 1163, 1164, 1169, 1170, 1175, 1176, 1185, 1186, - 1190, 1194, 1198, 1205, 1218, 1226, 1236, 1255, 1256, 1257, - 1258, 1259, 1260, 1261, 1262, 1263, 1264, 1269, 1278, 1279, - 1284, 1285 + 0, 275, 275, 296, 302, 311, 315, 319, 322, 325, + 332, 333, 334, 335, 336, 337, 338, 339, 340, 349, + 350, 355, 356, 360, 364, 376, 379, 382, 388, 389, + 396, 403, 406, 410, 424, 430, 439, 456, 460, 463, + 472, 486, 489, 494, 508, 521, 528, 535, 542, 553, + 554, 558, 559, 563, 569, 570, 571, 572, 573, 574, + 575, 576, 577, 578, 579, 580, 581, 582, 586, 587, + 588, 592, 593, 594, 598, 599, 607, 613, 619, 624, + 632, 633, 642, 651, 664, 671, 682, 683, 693, 702, + 703, 707, 719, 723, 727, 741, 742, 745, 746, 757, + 758, 762, 772, 785, 792, 796, 800, 807, 810, 816, + 828, 829, 833, 837, 838, 842, 847, 848, 852, 857, + 861, 862, 866, 867, 871, 872, 876, 880, 881, 882, + 888, 889, 893, 894, 895, 896, 897, 898, 905, 906, + 910, 911, 915, 916, 920, 930, 931, 932, 933, 934, + 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, + 948, 952, 953, 957, 958, 959, 960, 961, 965, 966, + 967, 968, 969, 970, 971, 972, 973, 974, 975, 979, + 980, 984, 985, 986, 987, 993, 994, 995, 996, 1000, + 1001, 1005, 1006, 1010, 1011, 1012, 1013, 1014, 1015, 1016, + 1020, 1021, 1025, 1029, 1033, 1034, 1035, 1036, 1037, 1038, + 1042, 1046, 1050, 1054, 1055, 1056, 1057, 1061, 1062, 1063, + 1064, 1065, 1069, 1073, 1074, 1078, 1079, 1083, 1087, 1091, + 1103, 1104, 1114, 1115, 1119, 1120, 1129, 1130, 1135, 1146, + 1155, 1156, 1160, 1161, 1165, 1170, 1171, 1176, 1177, 1182, + 1183, 1188, 1189, 1198, 1199, 1203, 1207, 1211, 1218, 1231, + 1239, 1249, 1268, 1269, 1270, 1271, 1272, 1273, 1274, 1275, + 1276, 1277, 1282, 1291, 1292, 1297, 1298 }; #endif -/** Accessing symbol of state STATE. */ -#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) - -#if 1 -/* The user-facing name of the symbol whose (internal) number is - YYSYMBOL. No bounds checking. */ -static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; - +#if HSQL_DEBUG || YYERROR_VERBOSE || 1 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { - "\"end of file\"", "error", "\"invalid token\"", "IDENTIFIER", "STRING", - "FLOATVAL", "INTVAL", "DEALLOCATE", "PARAMETERS", "INTERSECT", - "TEMPORARY", "TIMESTAMP", "DISTINCT", "NVARCHAR", "RESTRICT", "TRUNCATE", - "ANALYZE", "BETWEEN", "CASCADE", "COLUMNS", "CONTROL", "DEFAULT", - "EXECUTE", "EXPLAIN", "INTEGER", "NATURAL", "PREPARE", "PRIMARY", - "SCHEMAS", "CHARACTER", "VARYING", "REAL", "DECIMAL", "SPATIAL", - "VARCHAR", "VIRTUAL", "DESCRIBE", "BEFORE", "COLUMN", "CREATE", "DELETE", - "DIRECT", "DOUBLE", "ESCAPE", "EXCEPT", "EXISTS", "EXTRACT", "CAST", - "FORMAT", "GLOBAL", "HAVING", "IMPORT", "INSERT", "ISNULL", "OFFSET", - "RENAME", "SCHEMA", "SELECT", "SORTED", "TABLES", "UNIQUE", "UNLOAD", - "UPDATE", "VALUES", "AFTER", "ALTER", "CROSS", "DELTA", "FLOAT", "GROUP", - "INDEX", "INNER", "LIMIT", "LOCAL", "MERGE", "MINUS", "ORDER", "OUTER", - "RIGHT", "TABLE", "UNION", "USING", "WHERE", "CALL", "CASE", "CHAR", - "COPY", "DATE", "DATETIME", "DESC", "DROP", "ELSE", "FILE", "FROM", - "FULL", "HASH", "HINT", "INTO", "JOIN", "LEFT", "LIKE", "LOAD", "LONG", - "NULL", "PLAN", "SHOW", "TEXT", "THEN", "TIME", "VIEW", "WHEN", "WITH", - "ADD", "ALL", "AND", "ASC", "END", "FOR", "INT", "KEY", "NOT", "OFF", - "SET", "TOP", "AS", "BY", "IF", "IN", "IS", "OF", "ON", "OR", "TO", - "ARRAY", "CONCAT", "ILIKE", "SECOND", "MINUTE", "HOUR", "DAY", "MONTH", - "YEAR", "TRUE", "FALSE", "TRANSACTION", "BEGIN", "COMMIT", "ROLLBACK", - "'='", "EQUALS", "NOTEQUALS", "'<'", "'>'", "LESS", "GREATER", "LESSEQ", + "$end", "error", "$undefined", "IDENTIFIER", "STRING", "FLOATVAL", + "INTVAL", "DEALLOCATE", "PARAMETERS", "INTERSECT", "TEMPORARY", + "TIMESTAMP", "DISTINCT", "NVARCHAR", "RESTRICT", "TRUNCATE", "ANALYZE", + "BETWEEN", "CASCADE", "COLUMNS", "CONTROL", "DEFAULT", "EXECUTE", + "EXPLAIN", "INTEGER", "NATURAL", "PREPARE", "PRIMARY", "SCHEMAS", + "CHARACTER", "VARYING", "REAL", "DECIMAL", "SPATIAL", "VARCHAR", + "VIRTUAL", "DESCRIBE", "BEFORE", "COLUMN", "CREATE", "DELETE", "DIRECT", + "DOUBLE", "ESCAPE", "EXCEPT", "EXISTS", "EXTRACT", "CAST", "FORMAT", + "GLOBAL", "HAVING", "IMPORT", "INSERT", "ISNULL", "OFFSET", "RENAME", + "SCHEMA", "SELECT", "SORTED", "TABLES", "UNIQUE", "UNLOAD", "UPDATE", + "VALUES", "AFTER", "ALTER", "CROSS", "DELTA", "FLOAT", "GROUP", "INDEX", + "INNER", "LIMIT", "LOCAL", "MERGE", "MINUS", "ORDER", "OUTER", "RIGHT", + "TABLE", "UNION", "USING", "WHERE", "CALL", "CASE", "CHAR", "COPY", + "DATE", "DATETIME", "DESC", "DROP", "ELSE", "FILE", "FROM", "FULL", + "HASH", "HINT", "INTO", "JOIN", "LEFT", "LIKE", "LOAD", "LONG", "NULL", + "PLAN", "SHOW", "TEXT", "THEN", "TIME", "VIEW", "WHEN", "WITH", "ADD", + "ALL", "AND", "ASC", "END", "FOR", "INT", "KEY", "NOT", "OFF", "SET", + "TOP", "AS", "BY", "IF", "IN", "IS", "OF", "ON", "OR", "TO", "ARRAY", + "CONCAT", "ILIKE", "SECOND", "MINUTE", "HOUR", "DAY", "MONTH", "YEAR", + "TRUE", "FALSE", "TRANSACTION", "BEGIN", "COMMIT", "ROLLBACK", "'='", + "EQUALS", "NOTEQUALS", "'<'", "'>'", "LESS", "GREATER", "LESSEQ", "GREATEREQ", "NOTNULL", "'+'", "'-'", "'*'", "'/'", "'%'", "'^'", "UMINUS", "'['", "']'", "'('", "')'", "'.'", "';'", "','", "'?'", "$accept", "input", "statement_list", "statement", @@ -883,7 +867,8 @@ static const char *const yytname[] = "file_type", "file_path", "opt_file_type", "export_statement", "show_statement", "create_statement", "opt_not_exists", "column_def_commalist", "column_def", "column_type", - "opt_column_nullable", "drop_statement", "opt_exists", + "opt_column_nullable", "opt_table_key_constraints", + "table_key_constraint", "drop_statement", "opt_exists", "delete_statement", "truncate_statement", "insert_statement", "opt_column_list", "update_statement", "update_clause_commalist", "update_clause", "select_statement", "select_within_set_operation", @@ -906,15 +891,9 @@ static const char *const yytname[] = "with_description", "join_clause", "opt_join_type", "join_condition", "opt_semicolon", "ident_commalist", YY_NULLPTR }; - -static const char * -yysymbol_name (yysymbol_kind_t yysymbol) -{ - return yytname[yysymbol]; -} #endif -#ifdef YYPRINT +# ifdef YYPRINT /* YYTOKNUM[NUM] -- (External) token number corresponding to the (internal) symbol number NUM (which must be that of a token). */ static const yytype_int16 yytoknum[] = @@ -938,14 +917,14 @@ static const yytype_int16 yytoknum[] = 42, 47, 37, 94, 410, 91, 93, 40, 41, 46, 59, 44, 63 }; -#endif +# endif -#define YYPACT_NINF (-379) +#define YYPACT_NINF (-403) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF (-269) +#define YYTABLE_NINF (-274) #define yytable_value_is_error(Yyn) \ ((Yyn) == YYTABLE_NINF) @@ -954,57 +933,58 @@ static const yytype_int16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - 521, 41, 78, 97, 160, 78, 112, 38, 74, 108, - 78, 78, 125, 15, 172, 39, 39, 39, 239, 98, - -379, 159, -379, 159, -379, -379, -379, -379, -379, -379, - -379, -379, -379, -379, -379, -3, -379, 266, 110, -379, - 116, 204, -379, 301, 183, 183, 78, 307, 78, 194, - -379, -55, 314, 201, 201, 78, -379, 209, 161, -379, - -379, -379, -379, -379, -379, 516, -379, 243, -379, -379, - 217, -3, 81, -379, 21, -379, 342, 12, 343, -379, - 183, 226, 78, 78, 275, -379, 256, 210, 358, 394, - 394, -379, 271, 360, 78, 78, -379, 236, 172, -379, - 237, 400, 396, 241, 242, -379, -379, -379, -3, 294, - 286, -3, -14, -379, -379, -379, -379, -379, -379, -379, - -379, 245, 244, -379, -379, -379, -379, -379, -379, -379, - -379, -379, 284, 373, -60, 210, 297, -379, 394, 417, - 42, 274, -57, -379, 312, -379, 312, 78, -379, -379, - -379, -379, -379, 422, -379, -379, 297, -379, -379, 352, - -379, -379, 81, -379, -379, 297, 352, 297, 147, -379, - -379, 12, 78, -379, 428, 321, 430, 310, 63, 269, - 276, 277, 153, 318, 280, 332, -379, 208, 174, 359, - -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, - -379, -379, -379, -379, -379, -379, 344, -379, 35, 279, - -379, 297, 358, -379, 399, -379, -379, -379, 281, 93, - -379, 349, 278, -379, 66, -14, -3, 282, -379, 113, - -14, 174, 401, -27, -379, 283, 362, -379, 395, 158, - -379, 321, 11, 16, 405, 233, 297, 297, 126, 71, - 291, 332, 552, 297, 86, 298, -52, 297, 297, 332, - -379, 332, -18, 300, 0, 332, 332, 332, 332, 332, - 332, 332, 332, 332, 332, 332, 332, 332, 332, 332, - 400, 78, -379, 465, 12, 174, -379, 307, 12, -379, - 422, 10, 275, -379, 297, -379, 467, -379, -379, -379, - -379, 297, -379, -379, -379, -379, 297, 297, 417, 394, - -379, 441, -379, 305, 306, -379, -379, 309, -379, -379, - -379, -379, -379, -379, 195, -379, 430, -379, -379, 297, - -379, -379, 313, -379, -379, -379, -379, -379, -379, 391, - 128, 102, 119, 297, 297, -379, 405, 388, -47, -379, - -379, -379, 375, 495, 571, 332, 328, 208, -379, 393, - 333, 571, 571, 571, 571, 232, 232, 232, 232, 86, - 86, -36, -36, -36, -97, 334, -379, -379, 163, -379, - 185, -379, 321, -379, -5, -379, 331, -379, 23, -379, - 436, -379, -379, -379, 174, 174, 187, -379, 339, 506, - 519, 520, -379, 424, -379, -379, 191, -379, 297, 395, - 297, 297, -379, 127, 131, 361, -379, 332, 571, 208, - 364, 214, -379, -379, -379, -379, 365, 432, -379, -379, - -379, 457, 458, 460, 442, 10, 536, -379, -379, -379, - 416, -379, -379, 538, 374, 378, 381, -379, -379, 55, - 382, 174, 177, -379, 297, -379, 552, 383, 218, -379, - -379, 23, 10, -379, -379, -379, 10, 14, 386, 297, - 390, 548, -379, -379, -379, -379, -379, 174, -379, -379, - -379, -379, 200, 417, -22, -379, 397, 392, 297, 228, - 297, -379, -379, 18, 174, -379, -379, 174, 402, 398, - -379 + 555, 19, 30, 66, 82, 30, -16, 34, 98, -6, + 30, 30, -8, 6, 103, -19, -19, -19, 175, 28, + -403, 69, -403, 69, -403, -403, -403, -403, -403, -403, + -403, -403, -403, -403, -403, -14, -403, 222, 65, -403, + 39, 145, -403, 242, 120, 120, 30, 250, 30, 135, + -403, -66, 265, 143, 143, 30, -403, 151, 115, -403, + -403, -403, -403, -403, -403, 497, -403, 183, -403, -403, + 164, -14, 32, -403, 114, -403, 293, 13, 298, -403, + 120, 186, 30, 30, 215, -403, 220, 146, 321, 327, + 327, -403, 195, 287, 30, 30, -403, 166, 103, -403, + 170, 333, 329, 184, 190, -403, -403, -403, -14, 241, + 238, -14, 26, -403, -403, -403, -403, -403, -403, -403, + -403, 199, 205, -403, -403, -403, -403, -403, -403, -403, + -403, -403, 247, 344, -67, 146, 258, -403, 327, 382, + -2, 248, -58, -403, 279, -403, 279, 30, -403, -403, + -403, -403, -403, 392, -403, -403, 258, -403, -403, 322, + -403, -403, 32, -403, -403, 258, 322, 258, 84, -403, + -403, 13, 30, -403, 394, 299, 401, 288, -75, 246, + 249, 252, 156, 289, 255, 304, -403, 227, 55, 340, + -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, + -403, -403, -403, -403, -403, -403, 317, -403, 87, 254, + -403, 258, 321, -403, 367, -403, -403, -403, 256, 172, + -403, 334, 257, -403, 33, 26, -14, 262, -403, 74, + 26, 55, 372, -32, -403, 267, 337, -403, 741, 264, + -403, 299, 11, 12, 379, 243, 258, 258, 108, 104, + 271, 304, 563, 258, 157, 273, 53, 258, 258, 304, + -403, 304, -41, 272, 4, 304, 304, 304, 304, 304, + 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, + 333, 30, -403, 439, 13, 55, -403, 250, 13, -403, + 392, 10, 215, -403, 258, -403, 441, -403, -403, -403, + -403, 258, -403, -403, -403, -403, 258, 258, 382, 327, + -403, 413, -403, 278, 283, -403, -403, 284, -403, -403, + -403, -403, -403, -403, 80, 37, 177, -403, -403, -403, + 258, -403, -403, 285, -403, -403, -403, -403, -403, -403, + 359, 136, 140, 125, 258, 258, -403, 379, 354, -52, + -403, -403, -403, 341, 519, 599, 304, 290, 227, -403, + 355, 294, 599, 599, 599, 599, 635, 635, 635, 635, + 157, 157, -60, -60, -60, -86, 296, -403, -403, 178, + -403, 185, -403, 299, -403, 440, -403, 295, -403, 25, + -403, 400, -403, -403, -403, 55, 55, 191, -403, 303, + 466, 467, 471, -403, 375, -403, 360, 313, -403, -403, + 17, -403, 197, -403, 258, 741, 258, 258, -403, 169, + 207, 314, -403, 304, 599, 227, 315, 203, -403, -403, + -403, -403, 316, 383, -403, -403, -403, 408, 409, 410, + 395, 10, 504, -403, -403, -403, 384, -403, -403, 502, + 339, 345, 346, -403, 348, 382, -403, 68, 352, 55, + 213, -403, 258, -403, 563, 353, 204, -403, -403, 25, + 10, -403, -403, -403, 10, 469, 349, 258, 356, 516, + -403, -403, 382, 234, -403, -403, -403, 55, -403, -403, + -403, -403, 171, 382, -20, -403, 357, 235, -403, 361, + 258, 240, 258, -403, -403, -403, 18, 55, -403, -403, + 55, 358, 362, -403 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -1012,89 +992,90 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_int16 yydefact[] = { - 249, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 29, 29, 29, 0, 269, + 254, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 29, 29, 29, 0, 274, 3, 20, 18, 20, 17, 8, 9, 7, 11, 16, - 13, 14, 12, 15, 10, 0, 248, 0, 235, 78, - 32, 0, 43, 238, 50, 50, 0, 0, 0, 0, - 234, 0, 0, 76, 76, 0, 41, 0, 250, 251, - 28, 25, 27, 26, 1, 249, 2, 0, 6, 5, - 126, 0, 87, 88, 118, 73, 0, 136, 0, 237, - 50, 0, 0, 0, 112, 36, 0, 82, 0, 0, - 0, 239, 0, 0, 0, 0, 42, 0, 0, 4, - 0, 0, 106, 0, 0, 100, 101, 99, 0, 103, - 0, 0, 132, 236, 217, 220, 222, 223, 218, 219, - 224, 0, 135, 137, 212, 213, 214, 221, 215, 216, - 31, 30, 0, 0, 0, 82, 0, 77, 0, 0, - 0, 0, 112, 84, 39, 37, 39, 0, 75, 71, - 72, 253, 252, 0, 125, 105, 0, 95, 94, 118, - 91, 90, 92, 102, 98, 0, 118, 0, 0, 96, - 33, 0, 0, 49, 0, 249, 0, 0, 208, 0, - 0, 0, 0, 0, 0, 0, 210, 0, 111, 140, - 147, 148, 149, 142, 144, 150, 143, 163, 151, 152, - 153, 154, 146, 141, 156, 157, 0, 270, 0, 0, - 80, 0, 0, 83, 0, 35, 40, 74, 23, 0, - 21, 109, 107, 133, 247, 132, 0, 117, 119, 124, - 132, 128, 130, 127, 138, 0, 0, 46, 0, 0, - 51, 249, 106, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 159, 0, 158, 0, 0, 0, 0, 0, - 160, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 13, 14, 12, 15, 10, 0, 253, 0, 240, 83, + 32, 0, 43, 243, 50, 50, 0, 0, 0, 0, + 239, 0, 0, 81, 81, 0, 41, 0, 255, 256, + 28, 25, 27, 26, 1, 254, 2, 0, 6, 5, + 131, 0, 92, 93, 123, 78, 0, 141, 0, 242, + 50, 0, 0, 0, 117, 36, 0, 87, 0, 0, + 0, 244, 0, 0, 0, 0, 42, 0, 0, 4, + 0, 0, 111, 0, 0, 105, 106, 104, 0, 108, + 0, 0, 137, 241, 222, 225, 227, 228, 223, 224, + 229, 0, 140, 142, 217, 218, 219, 226, 220, 221, + 31, 30, 0, 0, 0, 87, 0, 82, 0, 0, + 0, 0, 117, 89, 39, 37, 39, 0, 80, 76, + 77, 258, 257, 0, 130, 110, 0, 100, 99, 123, + 96, 95, 97, 107, 103, 0, 123, 0, 0, 101, + 33, 0, 0, 49, 0, 254, 0, 0, 213, 0, + 0, 0, 0, 0, 0, 0, 215, 0, 116, 145, + 152, 153, 154, 147, 149, 155, 148, 168, 156, 157, + 158, 159, 151, 146, 161, 162, 0, 275, 0, 0, + 85, 0, 0, 88, 0, 35, 40, 79, 23, 0, + 21, 114, 112, 138, 252, 137, 0, 122, 124, 129, + 137, 133, 135, 132, 143, 0, 0, 46, 0, 73, + 51, 254, 111, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 164, 0, 163, 0, 0, 0, 0, 0, + 165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 81, 0, 0, 86, 85, 0, 0, 19, - 0, 0, 112, 108, 0, 245, 0, 246, 139, 89, - 93, 0, 123, 122, 121, 97, 0, 0, 0, 0, + 0, 0, 86, 0, 0, 91, 90, 0, 0, 19, + 0, 0, 117, 113, 0, 250, 0, 251, 144, 94, + 98, 0, 128, 127, 126, 102, 0, 0, 0, 0, 55, 0, 60, 0, 0, 59, 57, 0, 67, 66, - 56, 64, 65, 54, 70, 45, 0, 48, 195, 0, - 209, 211, 0, 199, 200, 201, 202, 203, 204, 0, - 0, 0, 0, 0, 0, 182, 0, 0, 0, 155, - 145, 174, 175, 0, 170, 0, 0, 0, 161, 0, - 173, 172, 188, 189, 190, 191, 192, 193, 194, 165, - 164, 167, 166, 168, 169, 0, 34, 271, 0, 38, - 0, 22, 249, 110, 225, 227, 0, 229, 243, 228, - 114, 134, 244, 120, 131, 129, 0, 44, 0, 0, - 0, 0, 68, 0, 53, 52, 0, 186, 0, 0, - 0, 0, 180, 0, 0, 0, 205, 0, 171, 0, - 0, 0, 162, 206, 79, 24, 0, 0, 265, 257, - 263, 261, 264, 259, 0, 0, 0, 242, 233, 240, - 0, 104, 47, 0, 0, 0, 0, 69, 196, 0, - 0, 184, 0, 183, 0, 187, 207, 0, 0, 178, - 176, 243, 0, 260, 262, 258, 0, 226, 244, 0, - 0, 0, 61, 63, 197, 198, 181, 185, 179, 177, - 230, 254, 266, 0, 116, 62, 0, 0, 0, 0, - 0, 113, 58, 0, 267, 255, 241, 115, 208, 0, - 256 + 56, 64, 65, 54, 70, 0, 0, 71, 48, 200, + 0, 214, 216, 0, 204, 205, 206, 207, 208, 209, + 0, 0, 0, 0, 0, 0, 187, 0, 0, 0, + 160, 150, 179, 180, 0, 175, 0, 0, 0, 166, + 0, 178, 177, 193, 194, 195, 196, 197, 198, 199, + 170, 169, 172, 171, 173, 174, 0, 34, 276, 0, + 38, 0, 22, 254, 115, 230, 232, 0, 234, 248, + 233, 119, 139, 249, 125, 136, 134, 0, 44, 0, + 0, 0, 0, 68, 0, 53, 0, 0, 52, 45, + 0, 72, 0, 191, 0, 0, 0, 0, 185, 0, + 0, 0, 210, 0, 176, 0, 0, 0, 167, 211, + 84, 24, 0, 0, 270, 262, 268, 266, 269, 264, + 0, 0, 0, 247, 238, 245, 0, 109, 47, 0, + 0, 0, 0, 69, 0, 0, 201, 0, 0, 189, + 0, 188, 0, 192, 212, 0, 0, 183, 181, 248, + 0, 265, 267, 263, 0, 231, 249, 0, 0, 0, + 61, 63, 0, 0, 202, 203, 186, 190, 184, 182, + 235, 259, 271, 0, 121, 62, 0, 0, 75, 0, + 0, 0, 0, 118, 58, 74, 0, 272, 260, 246, + 120, 213, 0, 261 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -379, -379, -379, 497, -379, 540, -379, 285, -379, 27, - -379, -379, -379, -379, 287, -83, 418, -379, -379, -379, - -9, -379, 250, 168, -379, -379, 515, -379, -379, -379, - 435, -379, -379, 367, -165, -96, -379, -11, -70, -39, - -379, -379, -66, 338, -379, -379, -379, -120, -379, -379, - -118, -379, 288, -379, -379, -29, -251, -379, -225, 290, - -136, -133, -379, -379, -379, -379, -379, -379, 337, -379, - -379, -379, -379, -379, -379, -379, -379, -379, 88, -69, - -85, -379, -379, -92, -379, -379, -379, -378, 120, -379, - -379, -379, 1, -379, -379, -379, 129, 363, -379, -379, - -379, -379, 488, -379, -379, -379, -379, -294 + -403, -403, -403, 461, -403, 506, -403, 251, -403, 196, + -403, -403, -403, -403, 244, -85, 386, -403, -403, -403, + -7, -403, 217, 128, -403, -403, 218, -403, 491, -403, + -403, -403, 415, -403, -403, 342, -173, -76, -403, 7, + -70, -54, -403, -403, -74, 309, -403, -403, -403, -126, + -403, -403, -99, -403, 259, -403, -403, -110, -249, -403, + -77, 261, -136, -133, -403, -403, -403, -403, -403, -403, + 305, -403, -403, -403, -403, -403, -403, -403, -403, -403, + 46, -69, -80, -403, -403, -87, -403, -403, -403, -402, + 86, -403, -403, -403, 1, -403, -403, -403, 88, 347, + -403, -403, -403, -403, 460, -403, -403, -403, -403, -301 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - 0, 18, 19, 20, 21, 68, 219, 220, 22, 61, + -1, 18, 19, 20, 21, 68, 219, 220, 22, 61, 23, 131, 24, 25, 86, 144, 215, 26, 27, 28, - 82, 239, 240, 324, 404, 29, 94, 30, 31, 32, - 140, 33, 142, 143, 34, 159, 160, 161, 73, 108, - 109, 164, 74, 156, 221, 292, 293, 137, 441, 491, - 112, 227, 228, 304, 102, 169, 222, 121, 122, 223, - 224, 189, 190, 191, 192, 193, 194, 195, 249, 196, - 197, 198, 199, 200, 339, 201, 202, 203, 204, 205, - 124, 125, 126, 127, 128, 129, 383, 384, 385, 386, - 387, 49, 388, 80, 92, 437, 438, 439, 298, 35, - 36, 58, 59, 389, 434, 495, 66, 208 + 82, 239, 240, 324, 405, 326, 327, 29, 94, 30, + 31, 32, 140, 33, 142, 143, 34, 159, 160, 161, + 73, 108, 109, 164, 74, 156, 221, 292, 293, 137, + 447, 503, 112, 227, 228, 304, 102, 169, 222, 121, + 122, 223, 224, 189, 190, 191, 192, 193, 194, 195, + 249, 196, 197, 198, 199, 200, 340, 201, 202, 203, + 204, 205, 124, 125, 126, 127, 128, 129, 384, 385, + 386, 387, 388, 49, 389, 80, 92, 443, 444, 445, + 298, 35, 36, 58, 59, 390, 440, 508, 66, 208 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1102,158 +1083,182 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 188, 104, 348, 39, 145, 145, 42, 146, 123, 154, - 237, 50, 51, 38, 396, 166, 114, 115, 116, 330, - 427, 498, 213, 155, 72, 136, 295, 307, 490, 229, - 105, 231, 233, 174, 55, 111, 83, 265, 89, 427, - 167, 225, 162, 62, 63, 162, 248, 84, 230, 87, - 252, 256, 254, 145, 70, 206, 96, 467, 168, 378, - 103, 428, 257, 380, 175, 106, 429, 37, 280, 295, - 210, 132, 430, 431, 56, 285, 327, 90, 406, 258, - 428, 38, 355, 134, 135, 429, 151, 257, 482, 432, - 105, 430, 431, -266, 433, 149, 150, 110, 265, 70, - 40, 107, 234, 358, 258, 209, 421, 176, 432, 356, - 340, 341, -266, 433, 212, 117, 350, 255, 252, 416, - 359, 351, 352, 226, 294, 106, 353, 279, 354, 280, - 300, 46, 360, 361, 362, 363, 364, 365, 366, 367, - 368, 369, 370, 371, 372, 373, 374, 436, 217, 294, - 178, 114, 115, 116, 118, 119, 178, 114, 115, 116, - 162, 107, 343, 41, 71, 229, -231, 47, 458, 257, - 394, 395, 390, 235, 332, 57, 331, 382, 186, 328, - 257, 344, 43, 60, 120, -232, 258, 345, 375, 489, - 296, 44, 179, 180, 181, 52, 299, 258, 179, 180, - 181, 305, 302, 282, 53, 48, 283, 413, 414, 410, - 411, 178, 114, 115, 116, 123, 257, 426, 484, 123, - 265, 45, 418, 474, 145, 427, 397, 257, 303, 344, - 242, 182, 243, 258, 54, 412, 247, 182, 454, 64, - 257, 257, 257, 453, 258, 257, 276, 277, 278, 279, - 117, 280, 409, 179, 180, 181, 117, 258, 258, 258, - 232, 289, 258, 247, 290, 70, 428, 183, 65, 75, - 67, 429, 449, 183, 451, 452, 415, 430, 431, 76, - 184, 487, 376, 77, 456, 260, 184, 420, 257, 118, - 119, 257, 182, 476, 432, 118, 119, 78, 402, 433, - 178, 114, 115, 116, 79, 258, 185, 186, 258, 81, - 85, 117, 185, 186, 187, 403, 88, 91, 477, 120, - 187, 178, 114, 115, 116, 120, 325, 93, 183, 326, - 488, 424, 98, 97, 171, 178, 114, 115, 116, 100, - 101, 184, 179, 180, 181, 113, 133, 130, 138, 457, - 118, 119, 494, 425, 497, 442, 171, 136, 283, 448, - 264, 141, 294, 250, 180, 181, 265, 185, 186, 333, - 334, 335, 336, 337, 338, 187, 259, 139, 180, 181, - 120, 182, 460, -269, -269, 294, 479, -269, -269, 294, - 274, 275, 276, 277, 278, 279, 496, 280, 114, 283, - 117, 147, 182, 71, 153, 148, 116, 163, 155, 157, - 158, 165, 260, 170, 172, 171, 182, 183, 173, 310, - 207, 117, 211, 214, 311, 218, 312, 313, 110, 314, - 184, 236, 14, 238, 241, 117, 244, 315, 251, 118, - 119, 281, 291, 245, 246, 253, 284, 287, 288, 294, - 308, 184, 251, 301, 309, 306, 185, 186, 346, 261, - 118, 119, 70, 316, 187, 184, 349, 357, 377, 120, - 392, 398, 399, 400, 118, 119, 401, 185, 186, 262, - 317, 407, 318, 319, 408, 187, 263, 264, 355, 257, - 120, 185, 186, 265, 266, 419, 422, 320, 280, 187, - 423, 321, 435, 322, 120, 440, 443, 267, 268, 269, - 270, 271, 444, 323, 272, 273, -268, 274, 275, 276, - 277, 278, 279, 1, 280, 445, 446, 447, 1, 455, - 462, 2, 459, 461, 463, 464, 2, 465, 3, 468, - 466, 469, 4, 3, 470, 471, 472, 4, 260, 473, - 475, 478, 5, 483, 486, 6, 7, 5, 485, 493, - 6, 7, 99, 69, 216, 492, 500, 8, 9, 95, - 177, 243, 8, 9, 379, 381, 405, 450, 10, 286, - 329, 499, 481, 10, 391, 342, 152, 297, 0, 393, - 480, 0, 0, 0, 0, 261, 0, 0, 0, 0, - 0, 0, 11, 0, 0, 260, 12, 11, 0, 417, - 0, 12, 0, 0, 0, 347, 0, 0, 0, 0, - 0, 13, 0, 264, 260, 0, 13, 14, 0, 265, - 266, 0, 14, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 267, 268, 269, 270, 271, 0, 0, - 272, 273, 261, 274, 275, 276, 277, 278, 279, 0, - 280, 15, 16, 17, 0, 0, 15, 16, 17, 0, - 0, -269, 347, 0, 0, 0, 0, 0, 0, 0, - 264, 0, 0, 0, 0, 0, 265, 266, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 264, - 267, 268, 269, 270, 271, 265, -269, 272, 273, 0, - 274, 275, 276, 277, 278, 279, 0, 280, 0, -269, - -269, -269, 270, 271, 0, 0, 272, 273, 0, 274, - 275, 276, 277, 278, 279, 0, 280 + 188, 104, 237, 39, 349, 146, 42, 397, 123, 145, + 145, 50, 51, 38, 154, 331, 213, 114, 115, 116, + 111, 511, 307, 155, 136, 55, 174, 89, 295, 229, + 502, 231, 233, 38, 162, 166, 295, 162, 83, 475, + 238, 105, 72, 70, 406, 37, 248, 84, 265, 87, + 252, 256, 254, 206, 43, 70, 96, 175, 145, 356, + 225, 209, 52, 44, 406, 56, 90, 230, 328, 40, + 210, 53, 492, 132, 265, 285, 106, 407, 103, 280, + 167, 412, 257, 134, 135, 41, 357, 178, 114, 115, + 116, 48, 242, 45, 243, 149, 150, 407, 168, 258, + 176, 54, 234, 279, 151, 280, 57, 359, 226, 427, + 341, 342, 107, 212, 422, 299, 117, 255, 252, 294, + 305, 352, 353, 105, 360, 60, 354, 46, 355, 179, + 180, 181, 361, 362, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 257, 217, 442, + 300, 294, 162, 71, 483, 118, 119, 296, 106, 178, + 114, 115, 116, 302, 258, 229, 391, 257, 182, 257, + 395, 396, 332, 235, 333, 64, 466, 383, 186, 329, + 67, 497, 257, 403, 258, 120, 258, 117, 257, 303, + 110, 47, 501, 376, 107, 344, 433, 232, 65, 258, + 404, 179, 180, 181, 183, 258, 77, 379, 419, 420, + 432, 381, 62, 63, 345, 123, 417, 184, 247, 123, + 346, 351, 257, 424, 398, 75, 118, 119, 494, 145, + 178, 114, 115, 116, 76, 345, 484, 434, 78, 258, + 182, 418, 435, 185, 186, 79, 81, 416, 436, 437, + 257, 187, 499, 85, 257, 282, 120, 88, 283, 117, + 415, 178, 114, 115, 116, 438, 247, 258, 91, 93, + 439, 258, 179, 180, 181, 97, 183, 421, 457, 100, + 459, 460, 377, 257, 70, 461, 98, 101, 426, 184, + 464, 265, 178, 114, 115, 116, 113, 136, 118, 119, + 258, 500, 130, 179, 180, 181, 133, 178, 114, 115, + 116, 182, 138, 139, 462, 185, 186, 276, 277, 278, + 279, 257, 280, 187, 141, 147, 487, 257, 120, 486, + 117, 114, 148, 71, 250, 180, 181, 153, 258, 116, + 289, 155, 182, 290, 258, 409, 430, 183, 410, 171, + 180, 181, 157, 431, 163, 465, 171, 259, 158, 448, + 184, 117, 283, 165, 507, 456, 510, 170, 294, 118, + 119, 468, 489, 182, 294, 294, 171, 172, 183, 334, + 335, 336, 337, 338, 339, 207, 185, 186, 182, 173, + 214, 184, 117, 260, 187, 218, 211, 236, 110, 120, + 118, 119, 498, 505, 238, 283, 283, 117, 509, 251, + 14, 283, 241, 244, 281, 287, 245, 185, 186, 246, + 253, 284, 184, 288, 251, 187, 306, 291, 294, 309, + 120, 118, 119, 301, 308, 325, 70, 184, 347, 358, + 261, 350, 378, 399, 393, 400, 118, 119, 185, 186, + 401, 402, 414, 413, 356, 257, 187, 425, 428, 280, + 262, 120, 429, 185, 186, 433, 441, 263, 264, 446, + 449, 187, 450, 451, 265, 266, 120, 452, 453, 454, + 455, 470, 463, 467, 469, 471, 472, 473, 267, 268, + 269, 270, 271, 474, 433, 272, 273, -273, 274, 275, + 276, 277, 278, 279, 1, 280, 434, 476, 478, 477, + 479, 435, 2, 480, 481, 482, 493, 436, 437, 3, + 485, 488, 496, 4, 495, 504, 99, 243, 506, 69, + 513, 380, 216, 5, 438, 434, 6, 7, -271, 439, + 435, 382, 408, 458, 411, 95, 436, 437, 8, 9, + 177, 330, 512, 343, 286, 392, 491, 490, 152, 10, + 394, 0, 1, 438, 0, 0, 0, -271, 439, 0, + 2, 297, 260, 0, 0, 0, 0, 3, 0, 0, + 0, 4, 0, 11, 0, 0, 0, 12, 0, 0, + 0, 5, 0, 0, 6, 7, 0, 0, 0, 0, + 0, 0, 13, 0, 0, 0, 8, 9, 14, 0, + 0, -236, 0, 0, 0, 0, 260, 10, 0, 261, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 423, 0, 0, 0, 0, 0, 348, + -237, 11, 15, 16, 17, 12, 0, 264, 0, 0, + 0, 0, 260, 265, 266, 0, 0, 0, 0, 0, + 13, 0, 0, 261, 0, 0, 14, 267, 268, 269, + 270, 271, 0, 0, 272, 273, 0, 274, 275, 276, + 277, 278, 279, 348, 280, 0, 0, 0, 260, 0, + 0, 264, 0, 0, 0, 0, 0, 265, 266, -274, + 15, 16, 17, 0, 0, 0, 0, 0, 0, 0, + 0, 267, 268, 269, 270, 271, 0, 0, 272, 273, + 0, 274, 275, 276, 277, 278, 279, 264, 280, 0, + 0, 0, 0, 265, -274, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -274, -274, -274, + 270, 271, 0, 0, 272, 273, 0, 274, 275, 276, + 277, 278, 279, 264, 280, 310, 0, 0, 0, 265, + 311, 0, 312, 313, 0, 314, 0, 0, 0, 0, + 0, 0, 0, 315, 0, 0, -274, -274, 0, 0, + -274, -274, 0, 274, 275, 276, 277, 278, 279, 0, + 280, 0, 0, 0, 0, 0, 0, 0, 0, 316, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 317, 0, 318, 319, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 320, 0, 0, 0, 321, 0, 322, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 323 }; static const yytype_int16 yycheck[] = { - 136, 71, 253, 2, 89, 90, 5, 90, 77, 101, - 175, 10, 11, 3, 308, 111, 4, 5, 6, 3, - 25, 3, 142, 12, 35, 82, 3, 54, 50, 165, - 9, 167, 168, 93, 19, 74, 45, 134, 93, 25, - 54, 159, 108, 16, 17, 111, 182, 46, 166, 48, - 183, 187, 185, 138, 57, 138, 55, 435, 72, 284, - 71, 66, 114, 288, 124, 44, 71, 26, 165, 3, - 140, 80, 77, 78, 59, 211, 241, 132, 329, 131, - 66, 3, 100, 82, 83, 71, 97, 114, 466, 94, - 9, 77, 78, 98, 99, 94, 95, 76, 134, 57, - 3, 80, 171, 103, 131, 63, 357, 167, 94, 127, - 246, 247, 98, 99, 171, 103, 168, 187, 251, 166, - 120, 257, 258, 162, 171, 44, 259, 163, 261, 165, - 226, 93, 265, 266, 267, 268, 269, 270, 271, 272, - 273, 274, 275, 276, 277, 278, 279, 124, 147, 171, - 3, 4, 5, 6, 142, 143, 3, 4, 5, 6, - 226, 80, 91, 3, 167, 301, 171, 93, 419, 114, - 306, 307, 292, 172, 244, 3, 160, 167, 160, 168, - 114, 110, 70, 144, 172, 171, 131, 116, 280, 483, - 124, 79, 45, 46, 47, 70, 225, 131, 45, 46, - 47, 230, 89, 168, 79, 97, 171, 343, 344, 107, - 91, 3, 4, 5, 6, 284, 114, 382, 469, 288, - 134, 109, 355, 168, 309, 25, 309, 114, 115, 110, - 167, 84, 169, 131, 109, 116, 110, 84, 107, 0, - 114, 114, 114, 116, 131, 114, 160, 161, 162, 163, - 103, 165, 124, 45, 46, 47, 103, 131, 131, 131, - 113, 168, 131, 110, 171, 57, 66, 120, 170, 3, - 111, 71, 408, 120, 410, 411, 346, 77, 78, 169, - 133, 81, 281, 167, 417, 53, 133, 357, 114, 142, - 143, 114, 84, 116, 94, 142, 143, 93, 103, 99, - 3, 4, 5, 6, 3, 131, 159, 160, 131, 126, - 3, 103, 159, 160, 167, 120, 122, 3, 454, 172, - 167, 3, 4, 5, 6, 172, 168, 126, 120, 171, - 130, 168, 171, 124, 171, 3, 4, 5, 6, 96, - 123, 133, 45, 46, 47, 3, 120, 4, 92, 419, - 142, 143, 488, 168, 490, 168, 171, 82, 171, 168, - 128, 3, 171, 45, 46, 47, 134, 159, 160, 136, - 137, 138, 139, 140, 141, 167, 17, 167, 46, 47, - 172, 84, 168, 151, 152, 171, 168, 155, 156, 171, - 158, 159, 160, 161, 162, 163, 168, 165, 4, 171, - 103, 130, 84, 167, 167, 45, 6, 113, 12, 168, - 168, 125, 53, 168, 130, 171, 84, 120, 45, 24, - 3, 103, 148, 111, 29, 3, 31, 32, 76, 34, - 133, 3, 111, 3, 124, 103, 167, 42, 120, 142, - 143, 97, 93, 167, 167, 165, 167, 48, 167, 171, - 167, 133, 120, 171, 92, 54, 159, 160, 167, 100, - 142, 143, 57, 68, 167, 133, 168, 167, 3, 172, - 3, 30, 167, 167, 142, 143, 167, 159, 160, 120, - 85, 168, 87, 88, 93, 167, 127, 128, 100, 114, - 172, 159, 160, 134, 135, 167, 103, 102, 165, 167, - 166, 106, 171, 108, 172, 69, 167, 148, 149, 150, - 151, 152, 6, 118, 155, 156, 0, 158, 159, 160, - 161, 162, 163, 7, 165, 6, 6, 103, 7, 168, - 98, 15, 168, 168, 77, 77, 15, 77, 22, 3, - 98, 125, 26, 22, 6, 171, 168, 26, 53, 168, - 168, 168, 36, 167, 6, 39, 40, 36, 168, 167, - 39, 40, 65, 23, 146, 168, 168, 51, 52, 54, - 135, 169, 51, 52, 287, 290, 326, 409, 62, 212, - 242, 493, 462, 62, 294, 248, 98, 224, -1, 301, - 461, -1, -1, -1, -1, 100, -1, -1, -1, -1, - -1, -1, 86, -1, -1, 53, 90, 86, -1, 114, - -1, 90, -1, -1, -1, 120, -1, -1, -1, -1, - -1, 105, -1, 128, 53, -1, 105, 111, -1, 134, - 135, -1, 111, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 148, 149, 150, 151, 152, -1, -1, - 155, 156, 100, 158, 159, 160, 161, 162, 163, -1, - 165, 145, 146, 147, -1, -1, 145, 146, 147, -1, - -1, 100, 120, -1, -1, -1, -1, -1, -1, -1, - 128, -1, -1, -1, -1, -1, 134, 135, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 128, - 148, 149, 150, 151, 152, 134, 135, 155, 156, -1, - 158, 159, 160, 161, 162, 163, -1, 165, -1, 148, - 149, 150, 151, 152, -1, -1, 155, 156, -1, 158, - 159, 160, 161, 162, 163, -1, 165 + 136, 71, 175, 2, 253, 90, 5, 308, 77, 89, + 90, 10, 11, 3, 101, 3, 142, 4, 5, 6, + 74, 3, 54, 12, 82, 19, 93, 93, 3, 165, + 50, 167, 168, 3, 108, 111, 3, 111, 45, 441, + 3, 9, 35, 57, 27, 26, 182, 46, 134, 48, + 183, 187, 185, 138, 70, 57, 55, 124, 138, 100, + 159, 63, 70, 79, 27, 59, 132, 166, 241, 3, + 140, 79, 474, 80, 134, 211, 44, 60, 71, 165, + 54, 330, 114, 82, 83, 3, 127, 3, 4, 5, + 6, 97, 167, 109, 169, 94, 95, 60, 72, 131, + 167, 109, 171, 163, 97, 165, 3, 103, 162, 358, + 246, 247, 80, 171, 166, 225, 103, 187, 251, 171, + 230, 257, 258, 9, 120, 144, 259, 93, 261, 45, + 46, 47, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 114, 147, 124, + 226, 171, 226, 167, 455, 142, 143, 124, 44, 3, + 4, 5, 6, 89, 131, 301, 292, 114, 84, 114, + 306, 307, 160, 172, 244, 0, 425, 167, 160, 168, + 111, 482, 114, 103, 131, 172, 131, 103, 114, 115, + 76, 93, 493, 280, 80, 91, 25, 113, 170, 131, + 120, 45, 46, 47, 120, 131, 167, 284, 344, 345, + 383, 288, 16, 17, 110, 284, 91, 133, 110, 288, + 116, 168, 114, 356, 309, 3, 142, 143, 477, 309, + 3, 4, 5, 6, 169, 110, 168, 66, 93, 131, + 84, 116, 71, 159, 160, 3, 126, 107, 77, 78, + 114, 167, 81, 3, 114, 168, 172, 122, 171, 103, + 124, 3, 4, 5, 6, 94, 110, 131, 3, 126, + 99, 131, 45, 46, 47, 124, 120, 347, 414, 96, + 416, 417, 281, 114, 57, 116, 171, 123, 358, 133, + 423, 134, 3, 4, 5, 6, 3, 82, 142, 143, + 131, 130, 4, 45, 46, 47, 120, 3, 4, 5, + 6, 84, 92, 167, 107, 159, 160, 160, 161, 162, + 163, 114, 165, 167, 3, 130, 462, 114, 172, 116, + 103, 4, 45, 167, 45, 46, 47, 167, 131, 6, + 168, 12, 84, 171, 131, 168, 168, 120, 171, 171, + 46, 47, 168, 168, 113, 425, 171, 17, 168, 168, + 133, 103, 171, 125, 500, 168, 502, 168, 171, 142, + 143, 168, 168, 84, 171, 171, 171, 130, 120, 136, + 137, 138, 139, 140, 141, 3, 159, 160, 84, 45, + 111, 133, 103, 53, 167, 3, 148, 3, 76, 172, + 142, 143, 168, 168, 3, 171, 171, 103, 168, 120, + 111, 171, 124, 167, 97, 48, 167, 159, 160, 167, + 165, 167, 133, 167, 120, 167, 54, 93, 171, 92, + 172, 142, 143, 171, 167, 171, 57, 133, 167, 167, + 100, 168, 3, 30, 3, 167, 142, 143, 159, 160, + 167, 167, 93, 168, 100, 114, 167, 167, 103, 165, + 120, 172, 166, 159, 160, 25, 171, 127, 128, 69, + 167, 167, 6, 6, 134, 135, 172, 6, 103, 119, + 167, 98, 168, 168, 168, 77, 77, 77, 148, 149, + 150, 151, 152, 98, 25, 155, 156, 0, 158, 159, + 160, 161, 162, 163, 7, 165, 66, 3, 6, 125, + 171, 71, 15, 168, 168, 167, 167, 77, 78, 22, + 168, 168, 6, 26, 168, 168, 65, 169, 167, 23, + 168, 287, 146, 36, 94, 66, 39, 40, 98, 99, + 71, 290, 325, 415, 326, 54, 77, 78, 51, 52, + 135, 242, 506, 248, 212, 294, 470, 469, 98, 62, + 301, -1, 7, 94, -1, -1, -1, 98, 99, -1, + 15, 224, 53, -1, -1, -1, -1, 22, -1, -1, + -1, 26, -1, 86, -1, -1, -1, 90, -1, -1, + -1, 36, -1, -1, 39, 40, -1, -1, -1, -1, + -1, -1, 105, -1, -1, -1, 51, 52, 111, -1, + -1, 171, -1, -1, -1, -1, 53, 62, -1, 100, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 114, -1, -1, -1, -1, -1, 120, + 171, 86, 145, 146, 147, 90, -1, 128, -1, -1, + -1, -1, 53, 134, 135, -1, -1, -1, -1, -1, + 105, -1, -1, 100, -1, -1, 111, 148, 149, 150, + 151, 152, -1, -1, 155, 156, -1, 158, 159, 160, + 161, 162, 163, 120, 165, -1, -1, -1, 53, -1, + -1, 128, -1, -1, -1, -1, -1, 134, 135, 100, + 145, 146, 147, -1, -1, -1, -1, -1, -1, -1, + -1, 148, 149, 150, 151, 152, -1, -1, 155, 156, + -1, 158, 159, 160, 161, 162, 163, 128, 165, -1, + -1, -1, -1, 134, 135, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 148, 149, 150, + 151, 152, -1, -1, 155, 156, -1, 158, 159, 160, + 161, 162, 163, 128, 165, 24, -1, -1, -1, 134, + 29, -1, 31, 32, -1, 34, -1, -1, -1, -1, + -1, -1, -1, 42, -1, -1, 151, 152, -1, -1, + 155, 156, -1, 158, 159, 160, 161, 162, 163, -1, + 165, -1, -1, -1, -1, -1, -1, -1, -1, 68, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 85, -1, 87, 88, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 102, -1, -1, -1, 106, -1, 108, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 118 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1262,55 +1267,56 @@ static const yytype_int16 yystos[] = { 0, 7, 15, 22, 26, 36, 39, 40, 51, 52, 62, 86, 90, 105, 111, 145, 146, 147, 174, 175, - 176, 177, 181, 183, 185, 186, 190, 191, 192, 198, - 200, 201, 202, 204, 207, 272, 273, 26, 3, 265, - 3, 3, 265, 70, 79, 109, 93, 93, 97, 264, - 265, 265, 70, 79, 109, 19, 59, 3, 274, 275, - 144, 182, 182, 182, 0, 170, 279, 111, 178, 178, - 57, 167, 210, 211, 215, 3, 169, 167, 93, 3, - 266, 126, 193, 193, 265, 3, 187, 265, 122, 93, - 132, 3, 267, 126, 199, 199, 265, 124, 171, 176, - 96, 123, 227, 210, 211, 9, 44, 80, 212, 213, - 76, 212, 223, 3, 4, 5, 6, 103, 142, 143, - 172, 230, 231, 252, 253, 254, 255, 256, 257, 258, - 4, 184, 193, 120, 265, 265, 82, 220, 92, 167, - 203, 3, 205, 206, 188, 253, 188, 130, 45, 265, - 265, 210, 275, 167, 256, 12, 216, 168, 168, 208, - 209, 210, 215, 113, 214, 125, 208, 54, 72, 228, - 168, 171, 130, 45, 93, 124, 167, 203, 3, 45, - 46, 47, 84, 120, 133, 159, 160, 167, 233, 234, - 235, 236, 237, 238, 239, 240, 242, 243, 244, 245, - 246, 248, 249, 250, 251, 252, 188, 3, 280, 63, - 211, 148, 171, 220, 111, 189, 189, 265, 3, 179, - 180, 217, 229, 232, 233, 223, 212, 224, 225, 233, - 223, 233, 113, 233, 252, 265, 3, 207, 3, 194, - 195, 124, 167, 169, 167, 167, 167, 110, 233, 241, - 45, 120, 234, 165, 234, 211, 233, 114, 131, 17, + 176, 177, 181, 183, 185, 186, 190, 191, 192, 200, + 202, 203, 204, 206, 209, 274, 275, 26, 3, 267, + 3, 3, 267, 70, 79, 109, 93, 93, 97, 266, + 267, 267, 70, 79, 109, 19, 59, 3, 276, 277, + 144, 182, 182, 182, 0, 170, 281, 111, 178, 178, + 57, 167, 212, 213, 217, 3, 169, 167, 93, 3, + 268, 126, 193, 193, 267, 3, 187, 267, 122, 93, + 132, 3, 269, 126, 201, 201, 267, 124, 171, 176, + 96, 123, 229, 212, 213, 9, 44, 80, 214, 215, + 76, 214, 225, 3, 4, 5, 6, 103, 142, 143, + 172, 232, 233, 254, 255, 256, 257, 258, 259, 260, + 4, 184, 193, 120, 267, 267, 82, 222, 92, 167, + 205, 3, 207, 208, 188, 255, 188, 130, 45, 267, + 267, 212, 277, 167, 258, 12, 218, 168, 168, 210, + 211, 212, 217, 113, 216, 125, 210, 54, 72, 230, + 168, 171, 130, 45, 93, 124, 167, 205, 3, 45, + 46, 47, 84, 120, 133, 159, 160, 167, 235, 236, + 237, 238, 239, 240, 241, 242, 244, 245, 246, 247, + 248, 250, 251, 252, 253, 254, 188, 3, 282, 63, + 213, 148, 171, 222, 111, 189, 189, 267, 3, 179, + 180, 219, 231, 234, 235, 225, 214, 226, 227, 235, + 225, 235, 113, 235, 254, 267, 3, 209, 3, 194, + 195, 124, 167, 169, 167, 167, 167, 110, 235, 243, + 45, 120, 236, 165, 236, 213, 235, 114, 131, 17, 53, 100, 120, 127, 128, 134, 135, 148, 149, 150, 151, 152, 155, 156, 158, 159, 160, 161, 162, 163, - 165, 97, 168, 171, 167, 233, 206, 48, 167, 168, - 171, 93, 218, 219, 171, 3, 124, 270, 271, 228, - 208, 171, 89, 115, 226, 228, 54, 54, 167, 92, + 165, 97, 168, 171, 167, 235, 208, 48, 167, 168, + 171, 93, 220, 221, 171, 3, 124, 272, 273, 230, + 210, 171, 89, 115, 228, 230, 54, 54, 167, 92, 24, 29, 31, 32, 34, 42, 68, 85, 87, 88, - 102, 106, 108, 118, 196, 168, 171, 207, 168, 216, - 3, 160, 211, 136, 137, 138, 139, 140, 141, 247, - 233, 233, 241, 91, 110, 116, 167, 120, 229, 168, - 168, 233, 233, 234, 234, 100, 127, 167, 103, 120, - 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, - 234, 234, 234, 234, 234, 256, 265, 3, 231, 187, - 231, 180, 167, 259, 260, 261, 262, 263, 265, 276, - 220, 232, 3, 225, 233, 233, 280, 188, 30, 167, - 167, 167, 103, 120, 197, 195, 229, 168, 93, 124, - 107, 91, 116, 233, 233, 211, 166, 114, 234, 167, - 211, 229, 103, 166, 168, 168, 207, 25, 66, 71, - 77, 78, 94, 99, 277, 171, 124, 268, 269, 270, - 69, 221, 168, 167, 6, 6, 6, 103, 168, 233, - 196, 233, 233, 116, 107, 168, 234, 211, 229, 168, - 168, 168, 98, 77, 77, 77, 98, 260, 3, 125, - 6, 171, 168, 168, 168, 168, 116, 233, 168, 168, - 269, 261, 260, 167, 229, 168, 6, 81, 130, 280, - 50, 222, 168, 167, 233, 278, 168, 233, 3, 251, - 168 + 102, 106, 108, 118, 196, 171, 198, 199, 209, 168, + 218, 3, 160, 213, 136, 137, 138, 139, 140, 141, + 249, 235, 235, 243, 91, 110, 116, 167, 120, 231, + 168, 168, 235, 235, 236, 236, 100, 127, 167, 103, + 120, 236, 236, 236, 236, 236, 236, 236, 236, 236, + 236, 236, 236, 236, 236, 236, 258, 267, 3, 233, + 187, 233, 180, 167, 261, 262, 263, 264, 265, 267, + 278, 222, 234, 3, 227, 235, 235, 282, 188, 30, + 167, 167, 167, 103, 120, 197, 27, 60, 195, 168, + 171, 199, 231, 168, 93, 124, 107, 91, 116, 235, + 235, 213, 166, 114, 236, 167, 213, 231, 103, 166, + 168, 168, 209, 25, 66, 71, 77, 78, 94, 99, + 279, 171, 124, 270, 271, 272, 69, 223, 168, 167, + 6, 6, 6, 103, 119, 167, 168, 235, 196, 235, + 235, 116, 107, 168, 236, 213, 231, 168, 168, 168, + 98, 77, 77, 77, 98, 262, 3, 125, 6, 171, + 168, 168, 167, 282, 168, 168, 116, 235, 168, 168, + 271, 263, 262, 167, 231, 168, 6, 282, 168, 81, + 130, 282, 50, 224, 168, 168, 167, 235, 280, 168, + 235, 3, 253, 168 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ @@ -1323,27 +1329,27 @@ static const yytype_int16 yyr1[] = 190, 191, 191, 191, 192, 192, 192, 192, 192, 193, 193, 194, 194, 195, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 197, 197, - 197, 198, 198, 198, 198, 199, 199, 200, 201, 202, - 202, 203, 203, 204, 205, 205, 206, 207, 207, 207, - 208, 208, 209, 209, 210, 210, 211, 211, 212, 213, - 213, 213, 214, 214, 215, 216, 216, 217, 218, 218, - 219, 220, 220, 221, 221, 222, 222, 223, 223, 224, - 224, 225, 226, 226, 226, 227, 227, 228, 228, 228, - 228, 228, 228, 229, 229, 230, 230, 231, 231, 232, - 233, 233, 233, 233, 233, 234, 234, 234, 234, 234, - 234, 234, 234, 234, 234, 234, 235, 235, 236, 236, - 236, 236, 236, 237, 237, 237, 237, 237, 237, 237, - 237, 237, 237, 237, 238, 238, 239, 239, 239, 239, - 240, 240, 240, 240, 241, 241, 242, 242, 243, 243, - 243, 243, 243, 243, 243, 244, 244, 245, 246, 247, - 247, 247, 247, 247, 247, 248, 249, 250, 251, 251, - 251, 251, 252, 252, 252, 252, 252, 253, 254, 254, - 255, 255, 256, 257, 258, 259, 259, 260, 260, 261, - 261, 262, 262, 263, 264, 265, 265, 266, 266, 267, - 268, 268, 269, 269, 270, 270, 271, 271, 272, 272, - 273, 274, 274, 275, 276, 276, 276, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 278, 279, 279, - 280, 280 + 197, 198, 198, 198, 199, 199, 200, 200, 200, 200, + 201, 201, 202, 203, 204, 204, 205, 205, 206, 207, + 207, 208, 209, 209, 209, 210, 210, 211, 211, 212, + 212, 213, 213, 214, 215, 215, 215, 216, 216, 217, + 218, 218, 219, 220, 220, 221, 222, 222, 223, 223, + 224, 224, 225, 225, 226, 226, 227, 228, 228, 228, + 229, 229, 230, 230, 230, 230, 230, 230, 231, 231, + 232, 232, 233, 233, 234, 235, 235, 235, 235, 235, + 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, + 236, 237, 237, 238, 238, 238, 238, 238, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 240, + 240, 241, 241, 241, 241, 242, 242, 242, 242, 243, + 243, 244, 244, 245, 245, 245, 245, 245, 245, 245, + 246, 246, 247, 248, 249, 249, 249, 249, 249, 249, + 250, 251, 252, 253, 253, 253, 253, 254, 254, 254, + 254, 254, 255, 256, 256, 257, 257, 258, 259, 260, + 261, 261, 262, 262, 263, 263, 264, 264, 265, 266, + 267, 267, 268, 268, 269, 270, 270, 271, 271, 272, + 272, 273, 273, 274, 274, 275, 276, 276, 277, 278, + 278, 278, 279, 279, 279, 279, 279, 279, 279, 279, + 279, 279, 280, 281, 281, 282, 282 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -1353,37 +1359,37 @@ static const yytype_int8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 0, 1, 3, 1, 4, 2, 2, 2, 1, 0, 4, 1, 2, 5, 7, 5, 1, 1, 3, 0, - 5, 2, 3, 2, 8, 7, 6, 9, 7, 3, + 5, 2, 3, 2, 8, 8, 6, 9, 7, 3, 0, 1, 3, 3, 1, 1, 1, 1, 6, 1, 1, 4, 5, 4, 1, 1, 1, 1, 1, 2, - 0, 4, 4, 3, 5, 2, 0, 4, 2, 8, - 5, 3, 0, 5, 1, 3, 3, 2, 2, 6, - 1, 1, 1, 3, 3, 3, 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, 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, 6, 1, - 1, 1, 1, 1, 1, 4, 4, 5, 1, 3, - 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, - 4, 1, 3, 2, 1, 1, 3, 1, 0, 1, - 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 + 0, 1, 2, 0, 6, 5, 4, 4, 3, 5, + 2, 0, 4, 2, 8, 5, 3, 0, 5, 1, + 3, 3, 2, 2, 6, 1, 1, 1, 3, 3, + 3, 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, 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, 6, 1, 1, 1, 1, 1, 1, + 4, 4, 5, 1, 3, 1, 3, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 1, 1, 1, 4, 1, 3, 2, 1, + 1, 3, 1, 0, 1, 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 }; -enum { YYENOMEM = -2 }; - #define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = SQL_HSQL_EMPTY) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab @@ -1394,7 +1400,7 @@ enum { YYENOMEM = -2 }; #define YYBACKUP(Token, Value) \ do \ - if (yychar == SQL_HSQL_EMPTY) \ + if (yychar == YYEMPTY) \ { \ yychar = (Token); \ yylval = (Value); \ @@ -1409,9 +1415,10 @@ enum { YYENOMEM = -2 }; } \ while (0) -/* Backward compatibility with an undocumented macro. - Use SQL_HSQL_error or SQL_HSQL_UNDEF. */ -#define YYERRCODE SQL_HSQL_UNDEF +/* Error token number */ +#define YYTERROR 1 +#define YYERRCODE 256 + /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. If N is 0, then set CURRENT to the empty location which ends @@ -1459,8 +1466,8 @@ do { \ This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ -# ifndef YY_LOCATION_PRINT -# if defined HSQL_LTYPE_IS_TRIVIAL && HSQL_LTYPE_IS_TRIVIAL +#ifndef YY_LOCATION_PRINT +# if defined HSQL_LTYPE_IS_TRIVIAL && HSQL_LTYPE_IS_TRIVIAL /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ @@ -1490,22 +1497,22 @@ yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) return res; } -# define YY_LOCATION_PRINT(File, Loc) \ +# define YY_LOCATION_PRINT(File, Loc) \ yy_location_print_ (File, &(Loc)) -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif -# endif /* !defined YY_LOCATION_PRINT */ +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif +#endif -# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ - Kind, Value, Location, result, scanner); \ + Type, Value, Location, result, scanner); \ YYFPRINTF (stderr, "\n"); \ } \ } while (0) @@ -1516,22 +1523,21 @@ do { \ `-----------------------------------*/ static void -yy_symbol_value_print (FILE *yyo, - yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, hsql::SQLParserResult* result, yyscan_t scanner) +yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, hsql::SQLParserResult* result, yyscan_t scanner) { FILE *yyoutput = yyo; - YY_USE (yyoutput); - YY_USE (yylocationp); - YY_USE (result); - YY_USE (scanner); + YYUSE (yyoutput); + YYUSE (yylocationp); + YYUSE (result); + YYUSE (scanner); if (!yyvaluep) return; # ifdef YYPRINT - if (yykind < YYNTOKENS) - YYPRINT (yyo, yytoknum[yykind], *yyvaluep); + if (yytype < YYNTOKENS) + YYPRINT (yyo, yytoknum[yytype], *yyvaluep); # endif YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE (yykind); + YYUSE (yytype); YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -1541,15 +1547,14 @@ yy_symbol_value_print (FILE *yyo, `---------------------------*/ static void -yy_symbol_print (FILE *yyo, - yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, hsql::SQLParserResult* result, yyscan_t scanner) +yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, hsql::SQLParserResult* result, yyscan_t scanner) { YYFPRINTF (yyo, "%s %s (", - yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); YY_LOCATION_PRINT (yyo, *yylocationp); YYFPRINTF (yyo, ": "); - yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, result, scanner); + yy_symbol_value_print (yyo, yytype, yyvaluep, yylocationp, result, scanner); YYFPRINTF (yyo, ")"); } @@ -1582,8 +1587,7 @@ do { \ `------------------------------------------------*/ static void -yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, - int yyrule, hsql::SQLParserResult* result, yyscan_t scanner) +yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, hsql::SQLParserResult* result, yyscan_t scanner) { int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; @@ -1595,9 +1599,9 @@ yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, - YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), - &yyvsp[(yyi + 1) - (yynrhs)], - &(yylsp[(yyi + 1) - (yynrhs)]), result, scanner); + yystos[+yyssp[yyi + 1 - yynrhs]], + &yyvsp[(yyi + 1) - (yynrhs)] + , &(yylsp[(yyi + 1) - (yynrhs)]) , result, scanner); YYFPRINTF (stderr, "\n"); } } @@ -1612,8 +1616,8 @@ do { \ multiple parsers can coexist. */ int yydebug; #else /* !HSQL_DEBUG */ -# define YYDPRINTF(Args) ((void) 0) -# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !HSQL_DEBUG */ @@ -1636,61 +1640,12 @@ int yydebug; #endif -/* Context of a parse error. */ -typedef struct -{ - yy_state_t *yyssp; - yysymbol_kind_t yytoken; - YYLTYPE *yylloc; -} yypcontext_t; - -/* Put in YYARG at most YYARGN of the expected tokens given the - current YYCTX, and return the number of tokens stored in YYARG. If - YYARG is null, return the number of expected tokens (guaranteed to - be less than YYNTOKENS). Return YYENOMEM on memory exhaustion. - Return 0 if there are more than YYARGN expected tokens, yet fill - YYARG up to YYARGN. */ -static int -yypcontext_expected_tokens (const yypcontext_t *yyctx, - yysymbol_kind_t yyarg[], int yyargn) -{ - /* Actual size of YYARG. */ - int yycount = 0; - int yyn = yypact[+*yyctx->yyssp]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (!yyarg) - ++yycount; - else if (yycount == yyargn) - return 0; - else - yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx); - } - } - if (yyarg && yycount == 0 && 0 < yyargn) - yyarg[0] = YYSYMBOL_YYEMPTY; - return yycount; -} - +#if YYERROR_VERBOSE - - -#ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) -# else +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) +# else /* Return the length of YYSTR. */ static YYPTRDIFF_T yystrlen (const char *yystr) @@ -1700,13 +1655,13 @@ yystrlen (const char *yystr) continue; return yylen; } +# endif # endif -#endif -#ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ static char * @@ -1720,10 +1675,10 @@ yystpcpy (char *yydest, const char *yysrc) return yyd - 1; } +# endif # endif -#endif -#ifndef yytnamerr +# ifndef yytnamerr /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string @@ -1738,6 +1693,7 @@ yytnamerr (char *yyres, const char *yystr) { YYPTRDIFF_T yyn = 0; char const *yyp = yystr; + for (;;) switch (*++yyp) { @@ -1771,15 +1727,31 @@ yytnamerr (char *yyres, const char *yystr) else return yystrlen (yystr); } -#endif +# endif +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ static int -yy_syntax_error_arguments (const yypcontext_t *yyctx, - yysymbol_kind_t yyarg[], int yyargn) +yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, + yy_state_t *yyssp, int yytoken) { + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = YY_NULLPTR; + /* Arguments of yyformat: reported tokens (one for the "unexpected", + one per "expected"). */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Actual size of YYARG. */ int yycount = 0; + /* Cumulated lengths of YYARG. */ + YYPTRDIFF_T yysize = 0; + /* There are many possibilities here to consider: - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action @@ -1803,54 +1775,52 @@ yy_syntax_error_arguments (const yypcontext_t *yyctx, one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ - if (yyctx->yytoken != YYSYMBOL_YYEMPTY) + if (yytoken != YYEMPTY) { - int yyn; - if (yyarg) - yyarg[yycount] = yyctx->yytoken; - ++yycount; - yyn = yypcontext_expected_tokens (yyctx, - yyarg ? yyarg + 1 : yyarg, yyargn - 1); - if (yyn == YYENOMEM) - return YYENOMEM; - else - yycount += yyn; + int yyn = yypact[+*yyssp]; + YYPTRDIFF_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); + yysize = yysize0; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + { + YYPTRDIFF_T yysize1 + = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else + return 2; + } + } + } } - return yycount; -} - -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, - const yypcontext_t *yyctx) -{ - enum { YYARGS_MAX = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULLPTR; - /* Arguments of yyformat: reported tokens (one for the "unexpected", - one per "expected"). */ - yysymbol_kind_t yyarg[YYARGS_MAX]; - /* Cumulated lengths of YYARG. */ - YYPTRDIFF_T yysize = 0; - - /* Actual size of YYARG. */ - int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX); - if (yycount == YYENOMEM) - return YYENOMEM; switch (yycount) { -#define YYCASE_(N, S) \ +# define YYCASE_(N, S) \ case N: \ yyformat = S; \ - break + break default: /* Avoid compiler warnings. */ YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); @@ -1858,23 +1828,17 @@ yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -#undef YYCASE_ +# undef YYCASE_ } - /* Compute error message size. Don't count the "%s"s, but reserve - room for the terminator. */ - yysize = yystrlen (yyformat) - 2 * yycount + 1; { - int yyi; - for (yyi = 0; yyi < yycount; ++yyi) - { - YYPTRDIFF_T yysize1 - = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return YYENOMEM; - } + /* Don't count the "%s"s in the final size, but reserve room for + the terminator. */ + YYPTRDIFF_T yysize1 = yysize + (yystrlen (yyformat) - 2 * yycount) + 1; + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else + return 2; } if (*yymsg_alloc < yysize) @@ -1883,7 +1847,7 @@ yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, if (! (yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return -1; + return 1; } /* Avoid sprintf, as that infringes on the user's name space. @@ -1895,7 +1859,7 @@ yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, while ((*yyp = *yyformat) != '\0') if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { - yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]); + yyp += yytnamerr (yyp, yyarg[yyi++]); yyformat += 2; } else @@ -1906,53 +1870,52 @@ yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, } return 0; } - +#endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ static void -yydestruct (const char *yymsg, - yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, hsql::SQLParserResult* result, yyscan_t scanner) +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, hsql::SQLParserResult* result, yyscan_t scanner) { - YY_USE (yyvaluep); - YY_USE (yylocationp); - YY_USE (result); - YY_USE (scanner); + YYUSE (yyvaluep); + YYUSE (yylocationp); + YYUSE (result); + YYUSE (scanner); if (!yymsg) yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - switch (yykind) + switch (yytype) { - case YYSYMBOL_IDENTIFIER: /* IDENTIFIER */ -#line 149 "bison_parser.y" + case 3: /* IDENTIFIER */ +#line 151 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1934 "bison_parser.cpp" +#line 1897 "bison_parser.cpp" break; - case YYSYMBOL_STRING: /* STRING */ -#line 149 "bison_parser.y" + case 4: /* STRING */ +#line 151 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1940 "bison_parser.cpp" +#line 1903 "bison_parser.cpp" break; - case YYSYMBOL_FLOATVAL: /* FLOATVAL */ -#line 147 "bison_parser.y" + case 5: /* FLOATVAL */ +#line 149 "bison_parser.y" { } -#line 1946 "bison_parser.cpp" +#line 1909 "bison_parser.cpp" break; - case YYSYMBOL_INTVAL: /* INTVAL */ -#line 147 "bison_parser.y" + case 6: /* INTVAL */ +#line 149 "bison_parser.y" { } -#line 1952 "bison_parser.cpp" +#line 1915 "bison_parser.cpp" break; - case YYSYMBOL_statement_list: /* statement_list */ -#line 150 "bison_parser.y" + case 175: /* statement_list */ +#line 152 "bison_parser.y" { if ((((*yyvaluep).stmt_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).stmt_vec))) { @@ -1961,23 +1924,23 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).stmt_vec)); } -#line 1965 "bison_parser.cpp" +#line 1928 "bison_parser.cpp" break; - case YYSYMBOL_statement: /* statement */ -#line 158 "bison_parser.y" + case 176: /* statement */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 1971 "bison_parser.cpp" +#line 1934 "bison_parser.cpp" break; - case YYSYMBOL_preparable_statement: /* preparable_statement */ -#line 158 "bison_parser.y" + case 177: /* preparable_statement */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 1977 "bison_parser.cpp" +#line 1940 "bison_parser.cpp" break; - case YYSYMBOL_opt_hints: /* opt_hints */ -#line 150 "bison_parser.y" + case 178: /* opt_hints */ +#line 152 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -1986,11 +1949,11 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 1990 "bison_parser.cpp" +#line 1953 "bison_parser.cpp" break; - case YYSYMBOL_hint_list: /* hint_list */ -#line 150 "bison_parser.y" + case 179: /* hint_list */ +#line 152 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -1999,89 +1962,89 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2003 "bison_parser.cpp" +#line 1966 "bison_parser.cpp" break; - case YYSYMBOL_hint: /* hint */ -#line 158 "bison_parser.y" + case 180: /* hint */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2009 "bison_parser.cpp" +#line 1972 "bison_parser.cpp" break; - case YYSYMBOL_transaction_statement: /* transaction_statement */ -#line 158 "bison_parser.y" + case 181: /* transaction_statement */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).transaction_stmt)); } -#line 2015 "bison_parser.cpp" +#line 1978 "bison_parser.cpp" break; - case YYSYMBOL_prepare_statement: /* prepare_statement */ -#line 158 "bison_parser.y" + case 183: /* prepare_statement */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).prep_stmt)); } -#line 2021 "bison_parser.cpp" +#line 1984 "bison_parser.cpp" break; - case YYSYMBOL_prepare_target_query: /* prepare_target_query */ -#line 149 "bison_parser.y" + case 184: /* prepare_target_query */ +#line 151 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2027 "bison_parser.cpp" +#line 1990 "bison_parser.cpp" break; - case YYSYMBOL_execute_statement: /* execute_statement */ -#line 158 "bison_parser.y" + case 185: /* execute_statement */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).exec_stmt)); } -#line 2033 "bison_parser.cpp" +#line 1996 "bison_parser.cpp" break; - case YYSYMBOL_import_statement: /* import_statement */ -#line 158 "bison_parser.y" + case 186: /* import_statement */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).import_stmt)); } -#line 2039 "bison_parser.cpp" +#line 2002 "bison_parser.cpp" break; - case YYSYMBOL_file_type: /* file_type */ -#line 147 "bison_parser.y" + case 187: /* file_type */ +#line 149 "bison_parser.y" { } -#line 2045 "bison_parser.cpp" +#line 2008 "bison_parser.cpp" break; - case YYSYMBOL_file_path: /* file_path */ -#line 149 "bison_parser.y" + case 188: /* file_path */ +#line 151 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2051 "bison_parser.cpp" +#line 2014 "bison_parser.cpp" break; - case YYSYMBOL_opt_file_type: /* opt_file_type */ -#line 147 "bison_parser.y" + case 189: /* opt_file_type */ +#line 149 "bison_parser.y" { } -#line 2057 "bison_parser.cpp" +#line 2020 "bison_parser.cpp" break; - case YYSYMBOL_export_statement: /* export_statement */ -#line 158 "bison_parser.y" + case 190: /* export_statement */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).export_stmt)); } -#line 2063 "bison_parser.cpp" +#line 2026 "bison_parser.cpp" break; - case YYSYMBOL_show_statement: /* show_statement */ -#line 158 "bison_parser.y" + case 191: /* show_statement */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).show_stmt)); } -#line 2069 "bison_parser.cpp" +#line 2032 "bison_parser.cpp" break; - case YYSYMBOL_create_statement: /* create_statement */ -#line 158 "bison_parser.y" + case 192: /* create_statement */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).create_stmt)); } -#line 2075 "bison_parser.cpp" +#line 2038 "bison_parser.cpp" break; - case YYSYMBOL_opt_not_exists: /* opt_not_exists */ -#line 147 "bison_parser.y" + case 193: /* opt_not_exists */ +#line 149 "bison_parser.y" { } -#line 2081 "bison_parser.cpp" +#line 2044 "bison_parser.cpp" break; - case YYSYMBOL_column_def_commalist: /* column_def_commalist */ -#line 150 "bison_parser.y" + case 194: /* column_def_commalist */ +#line 152 "bison_parser.y" { if ((((*yyvaluep).column_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).column_vec))) { @@ -2090,59 +2053,71 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).column_vec)); } -#line 2094 "bison_parser.cpp" +#line 2057 "bison_parser.cpp" break; - case YYSYMBOL_column_def: /* column_def */ -#line 158 "bison_parser.y" + case 195: /* column_def */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).column_t)); } -#line 2100 "bison_parser.cpp" +#line 2063 "bison_parser.cpp" break; - case YYSYMBOL_column_type: /* column_type */ -#line 147 "bison_parser.y" + case 196: /* column_type */ +#line 149 "bison_parser.y" { } -#line 2106 "bison_parser.cpp" +#line 2069 "bison_parser.cpp" break; - case YYSYMBOL_opt_column_nullable: /* opt_column_nullable */ -#line 147 "bison_parser.y" + case 197: /* opt_column_nullable */ +#line 149 "bison_parser.y" { } -#line 2112 "bison_parser.cpp" +#line 2075 "bison_parser.cpp" break; - case YYSYMBOL_drop_statement: /* drop_statement */ -#line 158 "bison_parser.y" + case 198: /* opt_table_key_constraints */ +#line 160 "bison_parser.y" + { delete (((*yyvaluep).table_key_constraint_vec)); } +#line 2081 "bison_parser.cpp" + break; + + case 199: /* table_key_constraint */ +#line 160 "bison_parser.y" + { delete (((*yyvaluep).table_key_constraint_t)); } +#line 2087 "bison_parser.cpp" + break; + + case 200: /* drop_statement */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).drop_stmt)); } -#line 2118 "bison_parser.cpp" +#line 2093 "bison_parser.cpp" break; - case YYSYMBOL_opt_exists: /* opt_exists */ -#line 147 "bison_parser.y" + case 201: /* opt_exists */ +#line 149 "bison_parser.y" { } -#line 2124 "bison_parser.cpp" +#line 2099 "bison_parser.cpp" break; - case YYSYMBOL_delete_statement: /* delete_statement */ -#line 158 "bison_parser.y" + case 202: /* delete_statement */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2130 "bison_parser.cpp" +#line 2105 "bison_parser.cpp" break; - case YYSYMBOL_truncate_statement: /* truncate_statement */ -#line 158 "bison_parser.y" + case 203: /* truncate_statement */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2136 "bison_parser.cpp" +#line 2111 "bison_parser.cpp" break; - case YYSYMBOL_insert_statement: /* insert_statement */ -#line 158 "bison_parser.y" + case 204: /* insert_statement */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).insert_stmt)); } -#line 2142 "bison_parser.cpp" +#line 2117 "bison_parser.cpp" break; - case YYSYMBOL_opt_column_list: /* opt_column_list */ -#line 150 "bison_parser.y" + case 205: /* opt_column_list */ +#line 152 "bison_parser.y" { if ((((*yyvaluep).str_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).str_vec))) { @@ -2151,17 +2126,17 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2155 "bison_parser.cpp" +#line 2130 "bison_parser.cpp" break; - case YYSYMBOL_update_statement: /* update_statement */ -#line 158 "bison_parser.y" + case 206: /* update_statement */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).update_stmt)); } -#line 2161 "bison_parser.cpp" +#line 2136 "bison_parser.cpp" break; - case YYSYMBOL_update_clause_commalist: /* update_clause_commalist */ -#line 150 "bison_parser.y" + case 207: /* update_clause_commalist */ +#line 152 "bison_parser.y" { if ((((*yyvaluep).update_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).update_vec))) { @@ -2170,77 +2145,77 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).update_vec)); } -#line 2174 "bison_parser.cpp" +#line 2149 "bison_parser.cpp" break; - case YYSYMBOL_update_clause: /* update_clause */ -#line 158 "bison_parser.y" + case 208: /* update_clause */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).update_t)); } -#line 2180 "bison_parser.cpp" +#line 2155 "bison_parser.cpp" break; - case YYSYMBOL_select_statement: /* select_statement */ -#line 158 "bison_parser.y" + case 209: /* select_statement */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2186 "bison_parser.cpp" +#line 2161 "bison_parser.cpp" break; - case YYSYMBOL_select_within_set_operation: /* select_within_set_operation */ -#line 158 "bison_parser.y" + case 210: /* select_within_set_operation */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2192 "bison_parser.cpp" +#line 2167 "bison_parser.cpp" break; - case YYSYMBOL_select_within_set_operation_no_parentheses: /* select_within_set_operation_no_parentheses */ -#line 158 "bison_parser.y" + case 211: /* select_within_set_operation_no_parentheses */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2198 "bison_parser.cpp" +#line 2173 "bison_parser.cpp" break; - case YYSYMBOL_select_with_paren: /* select_with_paren */ -#line 158 "bison_parser.y" + case 212: /* select_with_paren */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2204 "bison_parser.cpp" +#line 2179 "bison_parser.cpp" break; - case YYSYMBOL_select_no_paren: /* select_no_paren */ -#line 158 "bison_parser.y" + case 213: /* select_no_paren */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2210 "bison_parser.cpp" +#line 2185 "bison_parser.cpp" break; - case YYSYMBOL_set_operator: /* set_operator */ -#line 158 "bison_parser.y" + case 214: /* set_operator */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2216 "bison_parser.cpp" +#line 2191 "bison_parser.cpp" break; - case YYSYMBOL_set_type: /* set_type */ -#line 158 "bison_parser.y" + case 215: /* set_type */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2222 "bison_parser.cpp" +#line 2197 "bison_parser.cpp" break; - case YYSYMBOL_opt_all: /* opt_all */ -#line 147 "bison_parser.y" + case 216: /* opt_all */ +#line 149 "bison_parser.y" { } -#line 2228 "bison_parser.cpp" +#line 2203 "bison_parser.cpp" break; - case YYSYMBOL_select_clause: /* select_clause */ -#line 158 "bison_parser.y" + case 217: /* select_clause */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2234 "bison_parser.cpp" +#line 2209 "bison_parser.cpp" break; - case YYSYMBOL_opt_distinct: /* opt_distinct */ -#line 147 "bison_parser.y" + case 218: /* opt_distinct */ +#line 149 "bison_parser.y" { } -#line 2240 "bison_parser.cpp" +#line 2215 "bison_parser.cpp" break; - case YYSYMBOL_select_list: /* select_list */ -#line 150 "bison_parser.y" + case 219: /* select_list */ +#line 152 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2249,41 +2224,41 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2253 "bison_parser.cpp" +#line 2228 "bison_parser.cpp" break; - case YYSYMBOL_opt_from_clause: /* opt_from_clause */ -#line 158 "bison_parser.y" + case 220: /* opt_from_clause */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2259 "bison_parser.cpp" +#line 2234 "bison_parser.cpp" break; - case YYSYMBOL_from_clause: /* from_clause */ -#line 158 "bison_parser.y" + case 221: /* from_clause */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2265 "bison_parser.cpp" +#line 2240 "bison_parser.cpp" break; - case YYSYMBOL_opt_where: /* opt_where */ -#line 158 "bison_parser.y" + case 222: /* opt_where */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2271 "bison_parser.cpp" +#line 2246 "bison_parser.cpp" break; - case YYSYMBOL_opt_group: /* opt_group */ -#line 158 "bison_parser.y" + case 223: /* opt_group */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).group_t)); } -#line 2277 "bison_parser.cpp" +#line 2252 "bison_parser.cpp" break; - case YYSYMBOL_opt_having: /* opt_having */ -#line 158 "bison_parser.y" + case 224: /* opt_having */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2283 "bison_parser.cpp" +#line 2258 "bison_parser.cpp" break; - case YYSYMBOL_opt_order: /* opt_order */ -#line 150 "bison_parser.y" + case 225: /* opt_order */ +#line 152 "bison_parser.y" { if ((((*yyvaluep).order_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).order_vec))) { @@ -2292,11 +2267,11 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2296 "bison_parser.cpp" +#line 2271 "bison_parser.cpp" break; - case YYSYMBOL_order_list: /* order_list */ -#line 150 "bison_parser.y" + case 226: /* order_list */ +#line 152 "bison_parser.y" { if ((((*yyvaluep).order_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).order_vec))) { @@ -2305,35 +2280,35 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2309 "bison_parser.cpp" +#line 2284 "bison_parser.cpp" break; - case YYSYMBOL_order_desc: /* order_desc */ -#line 158 "bison_parser.y" + case 227: /* order_desc */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).order)); } -#line 2315 "bison_parser.cpp" +#line 2290 "bison_parser.cpp" break; - case YYSYMBOL_opt_order_type: /* opt_order_type */ -#line 147 "bison_parser.y" + case 228: /* opt_order_type */ +#line 149 "bison_parser.y" { } -#line 2321 "bison_parser.cpp" +#line 2296 "bison_parser.cpp" break; - case YYSYMBOL_opt_top: /* opt_top */ -#line 158 "bison_parser.y" + case 229: /* opt_top */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2327 "bison_parser.cpp" +#line 2302 "bison_parser.cpp" break; - case YYSYMBOL_opt_limit: /* opt_limit */ -#line 158 "bison_parser.y" + case 230: /* opt_limit */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2333 "bison_parser.cpp" +#line 2308 "bison_parser.cpp" break; - case YYSYMBOL_expr_list: /* expr_list */ -#line 150 "bison_parser.y" + case 231: /* expr_list */ +#line 152 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2342,11 +2317,11 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2346 "bison_parser.cpp" +#line 2321 "bison_parser.cpp" break; - case YYSYMBOL_opt_literal_list: /* opt_literal_list */ -#line 150 "bison_parser.y" + case 232: /* opt_literal_list */ +#line 152 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2355,11 +2330,11 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2359 "bison_parser.cpp" +#line 2334 "bison_parser.cpp" break; - case YYSYMBOL_literal_list: /* literal_list */ -#line 150 "bison_parser.y" + case 233: /* literal_list */ +#line 152 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2368,191 +2343,191 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2372 "bison_parser.cpp" +#line 2347 "bison_parser.cpp" break; - case YYSYMBOL_expr_alias: /* expr_alias */ -#line 158 "bison_parser.y" + case 234: /* expr_alias */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2378 "bison_parser.cpp" +#line 2353 "bison_parser.cpp" break; - case YYSYMBOL_expr: /* expr */ -#line 158 "bison_parser.y" + case 235: /* expr */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2384 "bison_parser.cpp" +#line 2359 "bison_parser.cpp" break; - case YYSYMBOL_operand: /* operand */ -#line 158 "bison_parser.y" + case 236: /* operand */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2390 "bison_parser.cpp" +#line 2365 "bison_parser.cpp" break; - case YYSYMBOL_scalar_expr: /* scalar_expr */ -#line 158 "bison_parser.y" + case 237: /* scalar_expr */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2396 "bison_parser.cpp" +#line 2371 "bison_parser.cpp" break; - case YYSYMBOL_unary_expr: /* unary_expr */ -#line 158 "bison_parser.y" + case 238: /* unary_expr */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2402 "bison_parser.cpp" +#line 2377 "bison_parser.cpp" break; - case YYSYMBOL_binary_expr: /* binary_expr */ -#line 158 "bison_parser.y" + case 239: /* binary_expr */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2408 "bison_parser.cpp" +#line 2383 "bison_parser.cpp" break; - case YYSYMBOL_logic_expr: /* logic_expr */ -#line 158 "bison_parser.y" + case 240: /* logic_expr */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2414 "bison_parser.cpp" +#line 2389 "bison_parser.cpp" break; - case YYSYMBOL_in_expr: /* in_expr */ -#line 158 "bison_parser.y" + case 241: /* in_expr */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2420 "bison_parser.cpp" +#line 2395 "bison_parser.cpp" break; - case YYSYMBOL_case_expr: /* case_expr */ -#line 158 "bison_parser.y" + case 242: /* case_expr */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2426 "bison_parser.cpp" +#line 2401 "bison_parser.cpp" break; - case YYSYMBOL_case_list: /* case_list */ -#line 158 "bison_parser.y" + case 243: /* case_list */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2432 "bison_parser.cpp" +#line 2407 "bison_parser.cpp" break; - case YYSYMBOL_exists_expr: /* exists_expr */ -#line 158 "bison_parser.y" + case 244: /* exists_expr */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2438 "bison_parser.cpp" +#line 2413 "bison_parser.cpp" break; - case YYSYMBOL_comp_expr: /* comp_expr */ -#line 158 "bison_parser.y" + case 245: /* comp_expr */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2444 "bison_parser.cpp" +#line 2419 "bison_parser.cpp" break; - case YYSYMBOL_function_expr: /* function_expr */ -#line 158 "bison_parser.y" + case 246: /* function_expr */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2450 "bison_parser.cpp" +#line 2425 "bison_parser.cpp" break; - case YYSYMBOL_extract_expr: /* extract_expr */ -#line 158 "bison_parser.y" + case 247: /* extract_expr */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2456 "bison_parser.cpp" +#line 2431 "bison_parser.cpp" break; - case YYSYMBOL_cast_expr: /* cast_expr */ -#line 158 "bison_parser.y" + case 248: /* cast_expr */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2462 "bison_parser.cpp" +#line 2437 "bison_parser.cpp" break; - case YYSYMBOL_datetime_field: /* datetime_field */ -#line 147 "bison_parser.y" + case 249: /* datetime_field */ +#line 149 "bison_parser.y" { } -#line 2468 "bison_parser.cpp" +#line 2443 "bison_parser.cpp" break; - case YYSYMBOL_array_expr: /* array_expr */ -#line 158 "bison_parser.y" + case 250: /* array_expr */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2474 "bison_parser.cpp" +#line 2449 "bison_parser.cpp" break; - case YYSYMBOL_array_index: /* array_index */ -#line 158 "bison_parser.y" + case 251: /* array_index */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2480 "bison_parser.cpp" +#line 2455 "bison_parser.cpp" break; - case YYSYMBOL_between_expr: /* between_expr */ -#line 158 "bison_parser.y" + case 252: /* between_expr */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2486 "bison_parser.cpp" +#line 2461 "bison_parser.cpp" break; - case YYSYMBOL_column_name: /* column_name */ -#line 158 "bison_parser.y" + case 253: /* column_name */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2492 "bison_parser.cpp" +#line 2467 "bison_parser.cpp" break; - case YYSYMBOL_literal: /* literal */ -#line 158 "bison_parser.y" + case 254: /* literal */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2498 "bison_parser.cpp" +#line 2473 "bison_parser.cpp" break; - case YYSYMBOL_string_literal: /* string_literal */ -#line 158 "bison_parser.y" + case 255: /* string_literal */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2504 "bison_parser.cpp" +#line 2479 "bison_parser.cpp" break; - case YYSYMBOL_bool_literal: /* bool_literal */ -#line 158 "bison_parser.y" + case 256: /* bool_literal */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2510 "bison_parser.cpp" +#line 2485 "bison_parser.cpp" break; - case YYSYMBOL_num_literal: /* num_literal */ -#line 158 "bison_parser.y" + case 257: /* num_literal */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2516 "bison_parser.cpp" +#line 2491 "bison_parser.cpp" break; - case YYSYMBOL_int_literal: /* int_literal */ -#line 158 "bison_parser.y" + case 258: /* int_literal */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2522 "bison_parser.cpp" +#line 2497 "bison_parser.cpp" break; - case YYSYMBOL_null_literal: /* null_literal */ -#line 158 "bison_parser.y" + case 259: /* null_literal */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2528 "bison_parser.cpp" +#line 2503 "bison_parser.cpp" break; - case YYSYMBOL_param_expr: /* param_expr */ -#line 158 "bison_parser.y" + case 260: /* param_expr */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2534 "bison_parser.cpp" +#line 2509 "bison_parser.cpp" break; - case YYSYMBOL_table_ref: /* table_ref */ -#line 158 "bison_parser.y" + case 261: /* table_ref */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2540 "bison_parser.cpp" +#line 2515 "bison_parser.cpp" break; - case YYSYMBOL_table_ref_atomic: /* table_ref_atomic */ -#line 158 "bison_parser.y" + case 262: /* table_ref_atomic */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2546 "bison_parser.cpp" +#line 2521 "bison_parser.cpp" break; - case YYSYMBOL_nonjoin_table_ref_atomic: /* nonjoin_table_ref_atomic */ -#line 158 "bison_parser.y" + case 263: /* nonjoin_table_ref_atomic */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2552 "bison_parser.cpp" +#line 2527 "bison_parser.cpp" break; - case YYSYMBOL_table_ref_commalist: /* table_ref_commalist */ -#line 150 "bison_parser.y" + case 264: /* table_ref_commalist */ +#line 152 "bison_parser.y" { if ((((*yyvaluep).table_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).table_vec))) { @@ -2561,107 +2536,107 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).table_vec)); } -#line 2565 "bison_parser.cpp" +#line 2540 "bison_parser.cpp" break; - case YYSYMBOL_table_ref_name: /* table_ref_name */ -#line 158 "bison_parser.y" + case 265: /* table_ref_name */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2571 "bison_parser.cpp" +#line 2546 "bison_parser.cpp" break; - case YYSYMBOL_table_ref_name_no_alias: /* table_ref_name_no_alias */ -#line 158 "bison_parser.y" + case 266: /* table_ref_name_no_alias */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2577 "bison_parser.cpp" +#line 2552 "bison_parser.cpp" break; - case YYSYMBOL_table_name: /* table_name */ -#line 148 "bison_parser.y" + case 267: /* table_name */ +#line 150 "bison_parser.y" { free( (((*yyvaluep).table_name).name) ); free( (((*yyvaluep).table_name).schema) ); } -#line 2583 "bison_parser.cpp" +#line 2558 "bison_parser.cpp" break; - case YYSYMBOL_opt_index_name: /* opt_index_name */ -#line 149 "bison_parser.y" + case 268: /* opt_index_name */ +#line 151 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2589 "bison_parser.cpp" +#line 2564 "bison_parser.cpp" break; - case YYSYMBOL_index_name: /* index_name */ -#line 149 "bison_parser.y" + case 269: /* index_name */ +#line 151 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2595 "bison_parser.cpp" +#line 2570 "bison_parser.cpp" break; - case YYSYMBOL_table_alias: /* table_alias */ -#line 158 "bison_parser.y" + case 270: /* table_alias */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2601 "bison_parser.cpp" +#line 2576 "bison_parser.cpp" break; - case YYSYMBOL_opt_table_alias: /* opt_table_alias */ -#line 158 "bison_parser.y" + case 271: /* opt_table_alias */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2607 "bison_parser.cpp" +#line 2582 "bison_parser.cpp" break; - case YYSYMBOL_alias: /* alias */ -#line 158 "bison_parser.y" + case 272: /* alias */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2613 "bison_parser.cpp" +#line 2588 "bison_parser.cpp" break; - case YYSYMBOL_opt_alias: /* opt_alias */ -#line 158 "bison_parser.y" + case 273: /* opt_alias */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2619 "bison_parser.cpp" +#line 2594 "bison_parser.cpp" break; - case YYSYMBOL_opt_with_clause: /* opt_with_clause */ -#line 158 "bison_parser.y" + case 274: /* opt_with_clause */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2625 "bison_parser.cpp" +#line 2600 "bison_parser.cpp" break; - case YYSYMBOL_with_clause: /* with_clause */ -#line 158 "bison_parser.y" + case 275: /* with_clause */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2631 "bison_parser.cpp" +#line 2606 "bison_parser.cpp" break; - case YYSYMBOL_with_description_list: /* with_description_list */ -#line 158 "bison_parser.y" + case 276: /* with_description_list */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2637 "bison_parser.cpp" +#line 2612 "bison_parser.cpp" break; - case YYSYMBOL_with_description: /* with_description */ -#line 158 "bison_parser.y" + case 277: /* with_description */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).with_description_t)); } -#line 2643 "bison_parser.cpp" +#line 2618 "bison_parser.cpp" break; - case YYSYMBOL_join_clause: /* join_clause */ -#line 158 "bison_parser.y" + case 278: /* join_clause */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2649 "bison_parser.cpp" +#line 2624 "bison_parser.cpp" break; - case YYSYMBOL_opt_join_type: /* opt_join_type */ -#line 147 "bison_parser.y" + case 279: /* opt_join_type */ +#line 149 "bison_parser.y" { } -#line 2655 "bison_parser.cpp" +#line 2630 "bison_parser.cpp" break; - case YYSYMBOL_join_condition: /* join_condition */ -#line 158 "bison_parser.y" + case 280: /* join_condition */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2661 "bison_parser.cpp" +#line 2636 "bison_parser.cpp" break; - case YYSYMBOL_ident_commalist: /* ident_commalist */ -#line 150 "bison_parser.y" + case 282: /* ident_commalist */ +#line 152 "bison_parser.y" { if ((((*yyvaluep).str_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).str_vec))) { @@ -2670,7 +2645,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2674 "bison_parser.cpp" +#line 2649 "bison_parser.cpp" break; default: @@ -2682,8 +2657,6 @@ yydestruct (const char *yymsg, - - /*----------. | yyparse. | `----------*/ @@ -2691,7 +2664,7 @@ yydestruct (const char *yymsg, int yyparse (hsql::SQLParserResult* result, yyscan_t scanner) { -/* Lookahead token kind. */ +/* The lookahead symbol. */ int yychar; @@ -2710,50 +2683,55 @@ static YYLTYPE yyloc_default YYLTYPE yylloc = yyloc_default; /* Number of syntax errors so far. */ - int yynerrs = 0; + int yynerrs; - yy_state_fast_t yystate = 0; + yy_state_fast_t yystate; /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus = 0; + int yyerrstatus; - /* Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + /* The stacks and their tools: + 'yyss': related to states. + 'yyvs': related to semantic values. + 'yyls': related to locations. - /* Their size. */ - YYPTRDIFF_T yystacksize = YYINITDEPTH; + Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ - /* The state stack: array, bottom, top. */ + /* The state stack. */ yy_state_t yyssa[YYINITDEPTH]; - yy_state_t *yyss = yyssa; - yy_state_t *yyssp = yyss; + yy_state_t *yyss; + yy_state_t *yyssp; - /* The semantic value stack: array, bottom, top. */ + /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp = yyvs; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; - /* The location stack: array, bottom, top. */ + /* The location stack. */ YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp = yyls; + YYLTYPE *yyls; + YYLTYPE *yylsp; + + /* The locations where the error started and ended. */ + YYLTYPE yyerror_range[3]; + + YYPTRDIFF_T yystacksize; int yyn; - /* The return value of yyparse. */ int yyresult; - /* Lookahead symbol kind. */ - yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY; + /* Lookahead token as an internal (translated) token number. */ + int yytoken = 0; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; YYLTYPE yyloc; - /* The locations where the error started and ended. */ - YYLTYPE yyerror_range[3]; - +#if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; +#endif #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) @@ -2761,9 +2739,17 @@ YYLTYPE yylloc = yyloc_default; Keep to zero when no symbol should be popped. */ int yylen = 0; + yyssp = yyss = yyssa; + yyvsp = yyvs = yyvsa; + yylsp = yyls = yylsa; + yystacksize = YYINITDEPTH; + YYDPRINTF ((stderr, "Starting parse\n")); - yychar = SQL_HSQL_EMPTY; /* Cause a token to be read. */ + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ /* User initialization code. */ #line 73 "bison_parser.y" @@ -2777,7 +2763,7 @@ YYLTYPE yylloc = yyloc_default; yylloc.string_length = 0; } -#line 2781 "bison_parser.cpp" +#line 2767 "bison_parser.cpp" yylsp[0] = yylloc; goto yysetstate; @@ -2801,7 +2787,6 @@ YYLTYPE yylloc = yyloc_default; YY_IGNORE_USELESS_CAST_BEGIN *yyssp = YY_CAST (yy_state_t, yystate); YY_IGNORE_USELESS_CAST_END - YY_STACK_PRINT (yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE @@ -2851,7 +2836,7 @@ 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); } @@ -2891,30 +2876,18 @@ YYLTYPE yylloc = yyloc_default; /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ - if (yychar == SQL_HSQL_EMPTY) + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + if (yychar == YYEMPTY) { - YYDPRINTF ((stderr, "Reading a token\n")); + YYDPRINTF ((stderr, "Reading a token: ")); yychar = yylex (&yylval, &yylloc, scanner); } - if (yychar <= SQL_YYEOF) + if (yychar <= YYEOF) { - yychar = SQL_YYEOF; - yytoken = YYSYMBOL_YYEOF; + yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } - else if (yychar == SQL_HSQL_error) - { - /* The scanner already issued an error message, process directly - to error recovery. But do not keep the error token as - lookahead, it is too special and may lead us to an endless - loop in error recovery. */ - yychar = SQL_HSQL_UNDEF; - yytoken = YYSYMBOL_YYerror; - yyerror_range[1] = yylloc; - goto yyerrlab1; - } else { yytoken = YYTRANSLATE (yychar); @@ -2949,7 +2922,7 @@ YYLTYPE yylloc = yyloc_default; *++yylsp = yylloc; /* Discard the shifted token. */ - yychar = SQL_HSQL_EMPTY; + yychar = YYEMPTY; goto yynewstate; @@ -2986,8 +2959,8 @@ YYLTYPE yylloc = yyloc_default; YY_REDUCE_PRINT (yyn); switch (yyn) { - case 2: /* input: statement_list opt_semicolon */ -#line 271 "bison_parser.y" + case 2: +#line 275 "bison_parser.y" { for (SQLStatement* stmt : *(yyvsp[-1].stmt_vec)) { // Transfers ownership of the statement. @@ -3005,247 +2978,247 @@ YYLTYPE yylloc = yyloc_default; } delete (yyvsp[-1].stmt_vec); } -#line 3009 "bison_parser.cpp" +#line 2982 "bison_parser.cpp" break; - case 3: /* statement_list: statement */ -#line 292 "bison_parser.y" + case 3: +#line 296 "bison_parser.y" { (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 3020 "bison_parser.cpp" +#line 2993 "bison_parser.cpp" break; - case 4: /* statement_list: statement_list ';' statement */ -#line 298 "bison_parser.y" + case 4: +#line 302 "bison_parser.y" { (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 3031 "bison_parser.cpp" +#line 3004 "bison_parser.cpp" break; - case 5: /* statement: prepare_statement opt_hints */ -#line 307 "bison_parser.y" + case 5: +#line 311 "bison_parser.y" { (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3040 "bison_parser.cpp" +#line 3013 "bison_parser.cpp" break; - case 6: /* statement: preparable_statement opt_hints */ -#line 311 "bison_parser.y" + case 6: +#line 315 "bison_parser.y" { (yyval.statement) = (yyvsp[-1].statement); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3049 "bison_parser.cpp" +#line 3022 "bison_parser.cpp" break; - case 7: /* statement: show_statement */ -#line 315 "bison_parser.y" + case 7: +#line 319 "bison_parser.y" { (yyval.statement) = (yyvsp[0].show_stmt); } -#line 3057 "bison_parser.cpp" +#line 3030 "bison_parser.cpp" break; - case 8: /* statement: import_statement */ -#line 318 "bison_parser.y" + case 8: +#line 322 "bison_parser.y" { (yyval.statement) = (yyvsp[0].import_stmt); } -#line 3065 "bison_parser.cpp" +#line 3038 "bison_parser.cpp" break; - case 9: /* statement: export_statement */ -#line 321 "bison_parser.y" + case 9: +#line 325 "bison_parser.y" { (yyval.statement) = (yyvsp[0].export_stmt); } -#line 3073 "bison_parser.cpp" +#line 3046 "bison_parser.cpp" break; - case 10: /* preparable_statement: select_statement */ -#line 328 "bison_parser.y" + case 10: +#line 332 "bison_parser.y" { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 3079 "bison_parser.cpp" +#line 3052 "bison_parser.cpp" break; - case 11: /* preparable_statement: create_statement */ -#line 329 "bison_parser.y" + case 11: +#line 333 "bison_parser.y" { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 3085 "bison_parser.cpp" +#line 3058 "bison_parser.cpp" break; - case 12: /* preparable_statement: insert_statement */ -#line 330 "bison_parser.y" + case 12: +#line 334 "bison_parser.y" { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 3091 "bison_parser.cpp" +#line 3064 "bison_parser.cpp" break; - case 13: /* preparable_statement: delete_statement */ -#line 331 "bison_parser.y" + case 13: +#line 335 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3097 "bison_parser.cpp" +#line 3070 "bison_parser.cpp" break; - case 14: /* preparable_statement: truncate_statement */ -#line 332 "bison_parser.y" + case 14: +#line 336 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3103 "bison_parser.cpp" +#line 3076 "bison_parser.cpp" break; - case 15: /* preparable_statement: update_statement */ -#line 333 "bison_parser.y" + case 15: +#line 337 "bison_parser.y" { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 3109 "bison_parser.cpp" +#line 3082 "bison_parser.cpp" break; - case 16: /* preparable_statement: drop_statement */ -#line 334 "bison_parser.y" + case 16: +#line 338 "bison_parser.y" { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 3115 "bison_parser.cpp" +#line 3088 "bison_parser.cpp" break; - case 17: /* preparable_statement: execute_statement */ -#line 335 "bison_parser.y" + case 17: +#line 339 "bison_parser.y" { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 3121 "bison_parser.cpp" +#line 3094 "bison_parser.cpp" break; - case 18: /* preparable_statement: transaction_statement */ -#line 336 "bison_parser.y" + case 18: +#line 340 "bison_parser.y" { (yyval.statement) = (yyvsp[0].transaction_stmt); } -#line 3127 "bison_parser.cpp" +#line 3100 "bison_parser.cpp" break; - case 19: /* opt_hints: WITH HINT '(' hint_list ')' */ -#line 345 "bison_parser.y" + case 19: +#line 349 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 3133 "bison_parser.cpp" +#line 3106 "bison_parser.cpp" break; - case 20: /* opt_hints: %empty */ -#line 346 "bison_parser.y" + case 20: +#line 350 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 3139 "bison_parser.cpp" +#line 3112 "bison_parser.cpp" break; - case 21: /* hint_list: hint */ -#line 351 "bison_parser.y" + case 21: +#line 355 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3145 "bison_parser.cpp" +#line 3118 "bison_parser.cpp" break; - case 22: /* hint_list: hint_list ',' hint */ -#line 352 "bison_parser.y" + case 22: +#line 356 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3151 "bison_parser.cpp" +#line 3124 "bison_parser.cpp" break; - case 23: /* hint: IDENTIFIER */ -#line 356 "bison_parser.y" + case 23: +#line 360 "bison_parser.y" { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[0].sval); } -#line 3160 "bison_parser.cpp" +#line 3133 "bison_parser.cpp" break; - case 24: /* hint: IDENTIFIER '(' literal_list ')' */ -#line 360 "bison_parser.y" + case 24: +#line 364 "bison_parser.y" { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[-3].sval); (yyval.expr)->exprList = (yyvsp[-1].expr_vec); } -#line 3170 "bison_parser.cpp" +#line 3143 "bison_parser.cpp" break; - case 25: /* transaction_statement: BEGIN opt_transaction_keyword */ -#line 372 "bison_parser.y" + case 25: +#line 376 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kBeginTransaction); } -#line 3178 "bison_parser.cpp" +#line 3151 "bison_parser.cpp" break; - case 26: /* transaction_statement: ROLLBACK opt_transaction_keyword */ -#line 375 "bison_parser.y" + case 26: +#line 379 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kRollbackTransaction); } -#line 3186 "bison_parser.cpp" +#line 3159 "bison_parser.cpp" break; - case 27: /* transaction_statement: COMMIT opt_transaction_keyword */ -#line 378 "bison_parser.y" + case 27: +#line 382 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kCommitTransaction); } -#line 3194 "bison_parser.cpp" +#line 3167 "bison_parser.cpp" break; - case 30: /* prepare_statement: PREPARE IDENTIFIER FROM prepare_target_query */ -#line 392 "bison_parser.y" + case 30: +#line 396 "bison_parser.y" { (yyval.prep_stmt) = new PrepareStatement(); (yyval.prep_stmt)->name = (yyvsp[-2].sval); (yyval.prep_stmt)->query = (yyvsp[0].sval); } -#line 3204 "bison_parser.cpp" +#line 3177 "bison_parser.cpp" break; - case 32: /* execute_statement: EXECUTE IDENTIFIER */ -#line 402 "bison_parser.y" + case 32: +#line 406 "bison_parser.y" { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[0].sval); } -#line 3213 "bison_parser.cpp" +#line 3186 "bison_parser.cpp" break; - case 33: /* execute_statement: EXECUTE IDENTIFIER '(' opt_literal_list ')' */ -#line 406 "bison_parser.y" + case 33: +#line 410 "bison_parser.y" { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[-3].sval); (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); } -#line 3223 "bison_parser.cpp" +#line 3196 "bison_parser.cpp" break; - case 34: /* import_statement: IMPORT FROM file_type FILE file_path INTO table_name */ -#line 420 "bison_parser.y" + case 34: +#line 424 "bison_parser.y" { (yyval.import_stmt) = new ImportStatement((yyvsp[-4].import_type_t)); (yyval.import_stmt)->filePath = (yyvsp[-2].sval); (yyval.import_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3234 "bison_parser.cpp" +#line 3207 "bison_parser.cpp" break; - case 35: /* import_statement: COPY table_name FROM file_path opt_file_type */ -#line 426 "bison_parser.y" + case 35: +#line 430 "bison_parser.y" { (yyval.import_stmt) = new ImportStatement((yyvsp[0].import_type_t)); (yyval.import_stmt)->filePath = (yyvsp[-1].sval); (yyval.import_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3245 "bison_parser.cpp" +#line 3218 "bison_parser.cpp" break; - case 36: /* file_type: IDENTIFIER */ -#line 435 "bison_parser.y" + case 36: +#line 439 "bison_parser.y" { if (strcasecmp((yyvsp[0].sval), "csv") == 0) { (yyval.import_type_t) = kImportCSV; @@ -3260,70 +3233,70 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[0].sval)); } -#line 3264 "bison_parser.cpp" +#line 3237 "bison_parser.cpp" break; - case 37: /* file_path: string_literal */ -#line 452 "bison_parser.y" + case 37: +#line 456 "bison_parser.y" { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 3270 "bison_parser.cpp" +#line 3243 "bison_parser.cpp" break; - case 38: /* opt_file_type: WITH FORMAT file_type */ -#line 456 "bison_parser.y" + case 38: +#line 460 "bison_parser.y" { (yyval.import_type_t) = (yyvsp[0].import_type_t); } -#line 3278 "bison_parser.cpp" +#line 3251 "bison_parser.cpp" break; - case 39: /* opt_file_type: %empty */ -#line 459 "bison_parser.y" + case 39: +#line 463 "bison_parser.y" { (yyval.import_type_t) = kImportAuto; } -#line 3284 "bison_parser.cpp" +#line 3257 "bison_parser.cpp" break; - case 40: /* export_statement: COPY table_name TO file_path opt_file_type */ -#line 468 "bison_parser.y" + case 40: +#line 472 "bison_parser.y" { (yyval.export_stmt) = new ExportStatement((yyvsp[0].import_type_t)); (yyval.export_stmt)->filePath = (yyvsp[-1].sval); (yyval.export_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.export_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3295 "bison_parser.cpp" +#line 3268 "bison_parser.cpp" break; - case 41: /* show_statement: SHOW TABLES */ -#line 482 "bison_parser.y" + case 41: +#line 486 "bison_parser.y" { (yyval.show_stmt) = new ShowStatement(kShowTables); } -#line 3303 "bison_parser.cpp" +#line 3276 "bison_parser.cpp" break; - case 42: /* show_statement: SHOW COLUMNS table_name */ -#line 485 "bison_parser.y" + case 42: +#line 489 "bison_parser.y" { (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 3313 "bison_parser.cpp" +#line 3286 "bison_parser.cpp" break; - case 43: /* show_statement: DESCRIBE table_name */ -#line 490 "bison_parser.y" + case 43: +#line 494 "bison_parser.y" { (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 3323 "bison_parser.cpp" +#line 3296 "bison_parser.cpp" break; - case 44: /* create_statement: CREATE TABLE opt_not_exists table_name FROM IDENTIFIER FILE file_path */ -#line 504 "bison_parser.y" + case 44: +#line 508 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTableFromTbl); (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); @@ -3337,23 +3310,23 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].sval)); (yyval.create_stmt)->filePath = (yyvsp[0].sval); } -#line 3341 "bison_parser.cpp" +#line 3314 "bison_parser.cpp" break; - case 45: /* create_statement: CREATE TABLE opt_not_exists table_name '(' column_def_commalist ')' */ -#line 517 "bison_parser.y" - { + case 45: +#line 521 "bison_parser.y" + { (yyval.create_stmt) = new CreateStatement(kCreateTable); - (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); - (yyval.create_stmt)->schema = (yyvsp[-3].table_name).schema; - (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; - (yyval.create_stmt)->columns = (yyvsp[-1].column_vec); + (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); + (yyval.create_stmt)->schema = (yyvsp[-4].table_name).schema; + (yyval.create_stmt)->tableName = (yyvsp[-4].table_name).name; + (yyval.create_stmt)->columns = (yyvsp[-2].column_vec); } -#line 3353 "bison_parser.cpp" +#line 3326 "bison_parser.cpp" break; - case 46: /* create_statement: CREATE TABLE opt_not_exists table_name AS select_statement */ -#line 524 "bison_parser.y" + case 46: +#line 528 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-3].bval); @@ -3361,11 +3334,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-2].table_name).name; (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3365 "bison_parser.cpp" +#line 3338 "bison_parser.cpp" break; - case 47: /* create_statement: CREATE INDEX opt_index_name opt_not_exists ON table_name '(' ident_commalist ')' */ -#line 531 "bison_parser.y" + case 47: +#line 535 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateIndex); (yyval.create_stmt)->indexName = (yyvsp[-6].sval); @@ -3373,11 +3346,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->indexColumns = (yyvsp[-1].str_vec); } -#line 3377 "bison_parser.cpp" +#line 3350 "bison_parser.cpp" break; - case 48: /* create_statement: CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement */ -#line 538 "bison_parser.y" + case 48: +#line 542 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateView); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -3386,220 +3359,250 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3390 "bison_parser.cpp" +#line 3363 "bison_parser.cpp" break; - case 49: /* opt_not_exists: IF NOT EXISTS */ -#line 549 "bison_parser.y" + case 49: +#line 553 "bison_parser.y" { (yyval.bval) = true; } -#line 3396 "bison_parser.cpp" +#line 3369 "bison_parser.cpp" break; - case 50: /* opt_not_exists: %empty */ -#line 550 "bison_parser.y" + case 50: +#line 554 "bison_parser.y" { (yyval.bval) = false; } -#line 3402 "bison_parser.cpp" +#line 3375 "bison_parser.cpp" break; - case 51: /* column_def_commalist: column_def */ -#line 554 "bison_parser.y" + case 51: +#line 558 "bison_parser.y" { (yyval.column_vec) = new std::vector(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); } -#line 3408 "bison_parser.cpp" +#line 3381 "bison_parser.cpp" break; - case 52: /* column_def_commalist: column_def_commalist ',' column_def */ -#line 555 "bison_parser.y" + case 52: +#line 559 "bison_parser.y" { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } -#line 3414 "bison_parser.cpp" +#line 3387 "bison_parser.cpp" break; - case 53: /* column_def: IDENTIFIER column_type opt_column_nullable */ -#line 559 "bison_parser.y" + case 53: +#line 563 "bison_parser.y" { (yyval.column_t) = new ColumnDefinition((yyvsp[-2].sval), (yyvsp[-1].column_type_t), (yyvsp[0].bval)); } -#line 3422 "bison_parser.cpp" +#line 3395 "bison_parser.cpp" break; - case 54: /* column_type: INT */ -#line 565 "bison_parser.y" + case 54: +#line 569 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3428 "bison_parser.cpp" +#line 3401 "bison_parser.cpp" break; - case 55: /* column_type: INTEGER */ -#line 566 "bison_parser.y" + case 55: +#line 570 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3434 "bison_parser.cpp" +#line 3407 "bison_parser.cpp" break; - case 56: /* column_type: LONG */ -#line 567 "bison_parser.y" + case 56: +#line 571 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::LONG}; } -#line 3440 "bison_parser.cpp" +#line 3413 "bison_parser.cpp" break; - case 57: /* column_type: FLOAT */ -#line 568 "bison_parser.y" + case 57: +#line 572 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3446 "bison_parser.cpp" +#line 3419 "bison_parser.cpp" break; - case 58: /* column_type: DECIMAL '(' INTVAL ',' INTVAL ')' */ -#line 569 "bison_parser.y" + case 58: +#line 573 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3452 "bison_parser.cpp" +#line 3425 "bison_parser.cpp" break; - case 59: /* column_type: DOUBLE */ -#line 570 "bison_parser.y" + case 59: +#line 574 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } -#line 3458 "bison_parser.cpp" +#line 3431 "bison_parser.cpp" break; - case 60: /* column_type: REAL */ -#line 571 "bison_parser.y" + case 60: +#line 575 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3464 "bison_parser.cpp" +#line 3437 "bison_parser.cpp" break; - case 61: /* column_type: VARCHAR '(' INTVAL ')' */ -#line 572 "bison_parser.y" + case 61: +#line 576 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3470 "bison_parser.cpp" +#line 3443 "bison_parser.cpp" break; - case 62: /* column_type: CHARACTER VARYING '(' INTVAL ')' */ -#line 573 "bison_parser.y" + case 62: +#line 577 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3476 "bison_parser.cpp" +#line 3449 "bison_parser.cpp" break; - case 63: /* column_type: CHAR '(' INTVAL ')' */ -#line 574 "bison_parser.y" + case 63: +#line 578 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } -#line 3482 "bison_parser.cpp" +#line 3455 "bison_parser.cpp" break; - case 64: /* column_type: TEXT */ -#line 575 "bison_parser.y" + case 64: +#line 579 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } -#line 3488 "bison_parser.cpp" +#line 3461 "bison_parser.cpp" break; - case 65: /* column_type: TIME */ -#line 576 "bison_parser.y" + case 65: +#line 580 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TIME}; } -#line 3494 "bison_parser.cpp" +#line 3467 "bison_parser.cpp" break; - case 66: /* column_type: DATETIME */ -#line 577 "bison_parser.y" + case 66: +#line 581 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } -#line 3500 "bison_parser.cpp" +#line 3473 "bison_parser.cpp" break; - case 67: /* column_type: DATE */ -#line 578 "bison_parser.y" + case 67: +#line 582 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATE}; } -#line 3506 "bison_parser.cpp" +#line 3479 "bison_parser.cpp" break; - case 68: /* opt_column_nullable: NULL */ -#line 582 "bison_parser.y" + case 68: +#line 586 "bison_parser.y" { (yyval.bval) = true; } -#line 3512 "bison_parser.cpp" +#line 3485 "bison_parser.cpp" break; - case 69: /* opt_column_nullable: NOT NULL */ -#line 583 "bison_parser.y" + case 69: +#line 587 "bison_parser.y" { (yyval.bval) = false; } -#line 3518 "bison_parser.cpp" +#line 3491 "bison_parser.cpp" break; - case 70: /* opt_column_nullable: %empty */ -#line 584 "bison_parser.y" + case 70: +#line 588 "bison_parser.y" { (yyval.bval) = false; } -#line 3524 "bison_parser.cpp" +#line 3497 "bison_parser.cpp" + break; + + case 71: +#line 592 "bison_parser.y" + {(yyval.table_key_constraint_vec) = new std::vector(); (yyval.table_key_constraint_vec)->push_back((yyvsp[0].table_key_constraint_t)); } +#line 3503 "bison_parser.cpp" + break; + + case 72: +#line 593 "bison_parser.y" + { (yyvsp[-1].table_key_constraint_vec)->push_back((yyvsp[0].table_key_constraint_t)); (yyval.table_key_constraint_vec) = (yyvsp[-1].table_key_constraint_vec); } +#line 3509 "bison_parser.cpp" break; - case 71: /* drop_statement: DROP TABLE opt_exists table_name */ + case 73: #line 594 "bison_parser.y" + {(yyval.table_key_constraint_vec) = new std::vector(); } +#line 3515 "bison_parser.cpp" + break; + + case 74: +#line 598 "bison_parser.y" + { (yyval.table_key_constraint_t) = TableKeyConstraint{KeyType::PRIMARY_KEY, (yyvsp[-1].str_vec)}; } +#line 3521 "bison_parser.cpp" + break; + + case 75: +#line 599 "bison_parser.y" + { (yyval.table_key_constraint_t) = TableKeyConstraint{KeyType::UNIQUE, (yyvsp[-1].str_vec)}; } +#line 3527 "bison_parser.cpp" + break; + + case 76: +#line 607 "bison_parser.y" { (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 3535 "bison_parser.cpp" +#line 3538 "bison_parser.cpp" break; - case 72: /* drop_statement: DROP VIEW opt_exists table_name */ -#line 600 "bison_parser.y" + case 77: +#line 613 "bison_parser.y" { (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 3546 "bison_parser.cpp" +#line 3549 "bison_parser.cpp" break; - case 73: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ -#line 606 "bison_parser.y" + case 78: +#line 619 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); (yyval.drop_stmt)->ifExists = false; (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 3556 "bison_parser.cpp" +#line 3559 "bison_parser.cpp" break; - case 74: /* drop_statement: DROP INDEX index_name ON table_name */ -#line 611 "bison_parser.y" + case 79: +#line 624 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropIndex); (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; (yyval.drop_stmt)->index_name = (yyvsp[-2].sval); } -#line 3566 "bison_parser.cpp" +#line 3569 "bison_parser.cpp" break; - case 75: /* opt_exists: IF EXISTS */ -#line 619 "bison_parser.y" + case 80: +#line 632 "bison_parser.y" { (yyval.bval) = true; } -#line 3572 "bison_parser.cpp" +#line 3575 "bison_parser.cpp" break; - case 76: /* opt_exists: %empty */ -#line 620 "bison_parser.y" + case 81: +#line 633 "bison_parser.y" { (yyval.bval) = false; } -#line 3578 "bison_parser.cpp" +#line 3581 "bison_parser.cpp" break; - case 77: /* delete_statement: DELETE FROM table_name opt_where */ -#line 629 "bison_parser.y" + case 82: +#line 642 "bison_parser.y" { (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 3589 "bison_parser.cpp" +#line 3592 "bison_parser.cpp" break; - case 78: /* truncate_statement: TRUNCATE table_name */ -#line 638 "bison_parser.y" + case 83: +#line 651 "bison_parser.y" { (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3599 "bison_parser.cpp" +#line 3602 "bison_parser.cpp" break; - case 79: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ -#line 651 "bison_parser.y" + case 84: +#line 664 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertValues); (yyval.insert_stmt)->schema = (yyvsp[-5].table_name).schema; @@ -3607,11 +3610,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } -#line 3611 "bison_parser.cpp" +#line 3614 "bison_parser.cpp" break; - case 80: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ -#line 658 "bison_parser.y" + case 85: +#line 671 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertSelect); (yyval.insert_stmt)->schema = (yyvsp[-2].table_name).schema; @@ -3619,74 +3622,74 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } -#line 3623 "bison_parser.cpp" +#line 3626 "bison_parser.cpp" break; - case 81: /* opt_column_list: '(' ident_commalist ')' */ -#line 669 "bison_parser.y" + case 86: +#line 682 "bison_parser.y" { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 3629 "bison_parser.cpp" +#line 3632 "bison_parser.cpp" break; - case 82: /* opt_column_list: %empty */ -#line 670 "bison_parser.y" + case 87: +#line 683 "bison_parser.y" { (yyval.str_vec) = nullptr; } -#line 3635 "bison_parser.cpp" +#line 3638 "bison_parser.cpp" break; - case 83: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ -#line 680 "bison_parser.y" + case 88: +#line 693 "bison_parser.y" { (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 3646 "bison_parser.cpp" +#line 3649 "bison_parser.cpp" break; - case 84: /* update_clause_commalist: update_clause */ -#line 689 "bison_parser.y" + case 89: +#line 702 "bison_parser.y" { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 3652 "bison_parser.cpp" +#line 3655 "bison_parser.cpp" break; - case 85: /* update_clause_commalist: update_clause_commalist ',' update_clause */ -#line 690 "bison_parser.y" + case 90: +#line 703 "bison_parser.y" { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 3658 "bison_parser.cpp" +#line 3661 "bison_parser.cpp" break; - case 86: /* update_clause: IDENTIFIER '=' expr */ -#line 694 "bison_parser.y" + case 91: +#line 707 "bison_parser.y" { (yyval.update_t) = new UpdateClause(); (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 3668 "bison_parser.cpp" +#line 3671 "bison_parser.cpp" break; - case 87: /* select_statement: opt_with_clause select_with_paren */ -#line 706 "bison_parser.y" + case 92: +#line 719 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3677 "bison_parser.cpp" +#line 3680 "bison_parser.cpp" break; - case 88: /* select_statement: opt_with_clause select_no_paren */ -#line 710 "bison_parser.y" + case 93: +#line 723 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3686 "bison_parser.cpp" +#line 3689 "bison_parser.cpp" break; - case 89: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ -#line 714 "bison_parser.y" + case 94: +#line 727 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3698,17 +3701,17 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); (yyval.select_stmt)->withDescriptions = (yyvsp[-5].with_description_vec); } -#line 3702 "bison_parser.cpp" +#line 3705 "bison_parser.cpp" break; - case 92: /* select_within_set_operation_no_parentheses: select_clause */ -#line 732 "bison_parser.y" + case 97: +#line 745 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); } -#line 3708 "bison_parser.cpp" +#line 3711 "bison_parser.cpp" break; - case 93: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ -#line 733 "bison_parser.y" + case 98: +#line 746 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3717,23 +3720,23 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->push_back((yyvsp[-1].set_operator_t)); (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[0].select_stmt); } -#line 3721 "bison_parser.cpp" +#line 3724 "bison_parser.cpp" break; - case 94: /* select_with_paren: '(' select_no_paren ')' */ -#line 744 "bison_parser.y" + case 99: +#line 757 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3727 "bison_parser.cpp" +#line 3730 "bison_parser.cpp" break; - case 95: /* select_with_paren: '(' select_with_paren ')' */ -#line 745 "bison_parser.y" + case 100: +#line 758 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3733 "bison_parser.cpp" +#line 3736 "bison_parser.cpp" break; - case 96: /* select_no_paren: select_clause opt_order opt_limit */ -#line 749 "bison_parser.y" + case 101: +#line 762 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); (yyval.select_stmt)->order = (yyvsp[-1].order_vec); @@ -3744,11 +3747,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3748 "bison_parser.cpp" +#line 3751 "bison_parser.cpp" break; - case 97: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ -#line 759 "bison_parser.y" + case 102: +#line 772 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3759,63 +3762,63 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); } -#line 3763 "bison_parser.cpp" +#line 3766 "bison_parser.cpp" break; - case 98: /* set_operator: set_type opt_all */ -#line 772 "bison_parser.y" + case 103: +#line 785 "bison_parser.y" { (yyval.set_operator_t) = (yyvsp[-1].set_operator_t); (yyval.set_operator_t)->isAll = (yyvsp[0].bval); } -#line 3772 "bison_parser.cpp" +#line 3775 "bison_parser.cpp" break; - case 99: /* set_type: UNION */ -#line 779 "bison_parser.y" + case 104: +#line 792 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetUnion; } -#line 3781 "bison_parser.cpp" +#line 3784 "bison_parser.cpp" break; - case 100: /* set_type: INTERSECT */ -#line 783 "bison_parser.y" + case 105: +#line 796 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetIntersect; } -#line 3790 "bison_parser.cpp" +#line 3793 "bison_parser.cpp" break; - case 101: /* set_type: EXCEPT */ -#line 787 "bison_parser.y" + case 106: +#line 800 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetExcept; } -#line 3799 "bison_parser.cpp" +#line 3802 "bison_parser.cpp" break; - case 102: /* opt_all: ALL */ -#line 794 "bison_parser.y" + case 107: +#line 807 "bison_parser.y" { (yyval.bval) = true; } -#line 3807 "bison_parser.cpp" +#line 3810 "bison_parser.cpp" break; - case 103: /* opt_all: %empty */ -#line 797 "bison_parser.y" + case 108: +#line 810 "bison_parser.y" { (yyval.bval) = false; } -#line 3815 "bison_parser.cpp" +#line 3818 "bison_parser.cpp" break; - case 104: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ -#line 803 "bison_parser.y" + case 109: +#line 816 "bison_parser.y" { (yyval.select_stmt) = new SelectStatement(); (yyval.select_stmt)->limit = (yyvsp[-5].limit); @@ -3825,213 +3828,213 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 3829 "bison_parser.cpp" +#line 3832 "bison_parser.cpp" break; - case 105: /* opt_distinct: DISTINCT */ -#line 815 "bison_parser.y" + case 110: +#line 828 "bison_parser.y" { (yyval.bval) = true; } -#line 3835 "bison_parser.cpp" +#line 3838 "bison_parser.cpp" break; - case 106: /* opt_distinct: %empty */ -#line 816 "bison_parser.y" + case 111: +#line 829 "bison_parser.y" { (yyval.bval) = false; } -#line 3841 "bison_parser.cpp" +#line 3844 "bison_parser.cpp" break; - case 108: /* opt_from_clause: from_clause */ -#line 824 "bison_parser.y" + case 113: +#line 837 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 3847 "bison_parser.cpp" +#line 3850 "bison_parser.cpp" break; - case 109: /* opt_from_clause: %empty */ -#line 825 "bison_parser.y" + case 114: +#line 838 "bison_parser.y" { (yyval.table) = nullptr; } -#line 3853 "bison_parser.cpp" +#line 3856 "bison_parser.cpp" break; - case 110: /* from_clause: FROM table_ref */ -#line 829 "bison_parser.y" + case 115: +#line 842 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 3859 "bison_parser.cpp" +#line 3862 "bison_parser.cpp" break; - case 111: /* opt_where: WHERE expr */ -#line 834 "bison_parser.y" + case 116: +#line 847 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 3865 "bison_parser.cpp" +#line 3868 "bison_parser.cpp" break; - case 112: /* opt_where: %empty */ -#line 835 "bison_parser.y" + case 117: +#line 848 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 3871 "bison_parser.cpp" +#line 3874 "bison_parser.cpp" break; - case 113: /* opt_group: GROUP BY expr_list opt_having */ -#line 839 "bison_parser.y" + case 118: +#line 852 "bison_parser.y" { (yyval.group_t) = new GroupByDescription(); (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 3881 "bison_parser.cpp" +#line 3884 "bison_parser.cpp" break; - case 114: /* opt_group: %empty */ -#line 844 "bison_parser.y" + case 119: +#line 857 "bison_parser.y" { (yyval.group_t) = nullptr; } -#line 3887 "bison_parser.cpp" +#line 3890 "bison_parser.cpp" break; - case 115: /* opt_having: HAVING expr */ -#line 848 "bison_parser.y" + case 120: +#line 861 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 3893 "bison_parser.cpp" +#line 3896 "bison_parser.cpp" break; - case 116: /* opt_having: %empty */ -#line 849 "bison_parser.y" + case 121: +#line 862 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 3899 "bison_parser.cpp" +#line 3902 "bison_parser.cpp" break; - case 117: /* opt_order: ORDER BY order_list */ -#line 853 "bison_parser.y" + case 122: +#line 866 "bison_parser.y" { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 3905 "bison_parser.cpp" +#line 3908 "bison_parser.cpp" break; - case 118: /* opt_order: %empty */ -#line 854 "bison_parser.y" + case 123: +#line 867 "bison_parser.y" { (yyval.order_vec) = nullptr; } -#line 3911 "bison_parser.cpp" +#line 3914 "bison_parser.cpp" break; - case 119: /* order_list: order_desc */ -#line 858 "bison_parser.y" + case 124: +#line 871 "bison_parser.y" { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 3917 "bison_parser.cpp" +#line 3920 "bison_parser.cpp" break; - case 120: /* order_list: order_list ',' order_desc */ -#line 859 "bison_parser.y" + case 125: +#line 872 "bison_parser.y" { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 3923 "bison_parser.cpp" +#line 3926 "bison_parser.cpp" break; - case 121: /* order_desc: expr opt_order_type */ -#line 863 "bison_parser.y" + case 126: +#line 876 "bison_parser.y" { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 3929 "bison_parser.cpp" +#line 3932 "bison_parser.cpp" break; - case 122: /* opt_order_type: ASC */ -#line 867 "bison_parser.y" + case 127: +#line 880 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 3935 "bison_parser.cpp" +#line 3938 "bison_parser.cpp" break; - case 123: /* opt_order_type: DESC */ -#line 868 "bison_parser.y" + case 128: +#line 881 "bison_parser.y" { (yyval.order_type) = kOrderDesc; } -#line 3941 "bison_parser.cpp" +#line 3944 "bison_parser.cpp" break; - case 124: /* opt_order_type: %empty */ -#line 869 "bison_parser.y" + case 129: +#line 882 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 3947 "bison_parser.cpp" +#line 3950 "bison_parser.cpp" break; - case 125: /* opt_top: TOP int_literal */ -#line 875 "bison_parser.y" + case 130: +#line 888 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 3953 "bison_parser.cpp" +#line 3956 "bison_parser.cpp" break; - case 126: /* opt_top: %empty */ -#line 876 "bison_parser.y" + case 131: +#line 889 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 3959 "bison_parser.cpp" +#line 3962 "bison_parser.cpp" break; - case 127: /* opt_limit: LIMIT expr */ -#line 880 "bison_parser.y" + case 132: +#line 893 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 3965 "bison_parser.cpp" +#line 3968 "bison_parser.cpp" break; - case 128: /* opt_limit: OFFSET expr */ -#line 881 "bison_parser.y" + case 133: +#line 894 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 3971 "bison_parser.cpp" +#line 3974 "bison_parser.cpp" break; - case 129: /* opt_limit: LIMIT expr OFFSET expr */ -#line 882 "bison_parser.y" + case 134: +#line 895 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 3977 "bison_parser.cpp" +#line 3980 "bison_parser.cpp" break; - case 130: /* opt_limit: LIMIT ALL */ -#line 883 "bison_parser.y" + case 135: +#line 896 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, nullptr); } -#line 3983 "bison_parser.cpp" +#line 3986 "bison_parser.cpp" break; - case 131: /* opt_limit: LIMIT ALL OFFSET expr */ -#line 884 "bison_parser.y" + case 136: +#line 897 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 3989 "bison_parser.cpp" +#line 3992 "bison_parser.cpp" break; - case 132: /* opt_limit: %empty */ -#line 885 "bison_parser.y" + case 137: +#line 898 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 3995 "bison_parser.cpp" +#line 3998 "bison_parser.cpp" break; - case 133: /* expr_list: expr_alias */ -#line 892 "bison_parser.y" + case 138: +#line 905 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4001 "bison_parser.cpp" +#line 4004 "bison_parser.cpp" break; - case 134: /* expr_list: expr_list ',' expr_alias */ -#line 893 "bison_parser.y" + case 139: +#line 906 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4007 "bison_parser.cpp" +#line 4010 "bison_parser.cpp" break; - case 135: /* opt_literal_list: literal_list */ -#line 897 "bison_parser.y" + case 140: +#line 910 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[0].expr_vec); } -#line 4013 "bison_parser.cpp" +#line 4016 "bison_parser.cpp" break; - case 136: /* opt_literal_list: %empty */ -#line 898 "bison_parser.y" + case 141: +#line 911 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 4019 "bison_parser.cpp" +#line 4022 "bison_parser.cpp" break; - case 137: /* literal_list: literal */ -#line 902 "bison_parser.y" + case 142: +#line 915 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4025 "bison_parser.cpp" +#line 4028 "bison_parser.cpp" break; - case 138: /* literal_list: literal_list ',' literal */ -#line 903 "bison_parser.y" + case 143: +#line 916 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4031 "bison_parser.cpp" +#line 4034 "bison_parser.cpp" break; - case 139: /* expr_alias: expr opt_alias */ -#line 907 "bison_parser.y" + case 144: +#line 920 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); if ((yyvsp[0].alias_t)) { @@ -4039,421 +4042,421 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].alias_t); } } -#line 4043 "bison_parser.cpp" +#line 4046 "bison_parser.cpp" break; - case 145: /* operand: '(' expr ')' */ -#line 925 "bison_parser.y" + case 150: +#line 938 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); } -#line 4049 "bison_parser.cpp" +#line 4052 "bison_parser.cpp" break; - case 155: /* operand: '(' select_no_paren ')' */ -#line 935 "bison_parser.y" + case 160: +#line 948 "bison_parser.y" { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 4055 "bison_parser.cpp" +#line 4058 "bison_parser.cpp" break; - case 158: /* unary_expr: '-' operand */ -#line 944 "bison_parser.y" + case 163: +#line 957 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 4061 "bison_parser.cpp" +#line 4064 "bison_parser.cpp" break; - case 159: /* unary_expr: NOT operand */ -#line 945 "bison_parser.y" + case 164: +#line 958 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 4067 "bison_parser.cpp" +#line 4070 "bison_parser.cpp" break; - case 160: /* unary_expr: operand ISNULL */ -#line 946 "bison_parser.y" + case 165: +#line 959 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 4073 "bison_parser.cpp" +#line 4076 "bison_parser.cpp" break; - case 161: /* unary_expr: operand IS NULL */ -#line 947 "bison_parser.y" + case 166: +#line 960 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 4079 "bison_parser.cpp" +#line 4082 "bison_parser.cpp" break; - case 162: /* unary_expr: operand IS NOT NULL */ -#line 948 "bison_parser.y" + case 167: +#line 961 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 4085 "bison_parser.cpp" +#line 4088 "bison_parser.cpp" break; - case 164: /* binary_expr: operand '-' operand */ -#line 953 "bison_parser.y" + case 169: +#line 966 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 4091 "bison_parser.cpp" +#line 4094 "bison_parser.cpp" break; - case 165: /* binary_expr: operand '+' operand */ -#line 954 "bison_parser.y" + case 170: +#line 967 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 4097 "bison_parser.cpp" +#line 4100 "bison_parser.cpp" break; - case 166: /* binary_expr: operand '/' operand */ -#line 955 "bison_parser.y" + case 171: +#line 968 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 4103 "bison_parser.cpp" +#line 4106 "bison_parser.cpp" break; - case 167: /* binary_expr: operand '*' operand */ -#line 956 "bison_parser.y" + case 172: +#line 969 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 4109 "bison_parser.cpp" +#line 4112 "bison_parser.cpp" break; - case 168: /* binary_expr: operand '%' operand */ -#line 957 "bison_parser.y" + case 173: +#line 970 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 4115 "bison_parser.cpp" +#line 4118 "bison_parser.cpp" break; - case 169: /* binary_expr: operand '^' operand */ -#line 958 "bison_parser.y" + case 174: +#line 971 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 4121 "bison_parser.cpp" +#line 4124 "bison_parser.cpp" break; - case 170: /* binary_expr: operand LIKE operand */ -#line 959 "bison_parser.y" + case 175: +#line 972 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 4127 "bison_parser.cpp" +#line 4130 "bison_parser.cpp" break; - case 171: /* binary_expr: operand NOT LIKE operand */ -#line 960 "bison_parser.y" + case 176: +#line 973 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 4133 "bison_parser.cpp" +#line 4136 "bison_parser.cpp" break; - case 172: /* binary_expr: operand ILIKE operand */ -#line 961 "bison_parser.y" + case 177: +#line 974 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 4139 "bison_parser.cpp" +#line 4142 "bison_parser.cpp" break; - case 173: /* binary_expr: operand CONCAT operand */ -#line 962 "bison_parser.y" + case 178: +#line 975 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 4145 "bison_parser.cpp" +#line 4148 "bison_parser.cpp" break; - case 174: /* logic_expr: expr AND expr */ -#line 966 "bison_parser.y" + case 179: +#line 979 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 4151 "bison_parser.cpp" +#line 4154 "bison_parser.cpp" break; - case 175: /* logic_expr: expr OR expr */ -#line 967 "bison_parser.y" + case 180: +#line 980 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 4157 "bison_parser.cpp" +#line 4160 "bison_parser.cpp" break; - case 176: /* in_expr: operand IN '(' expr_list ')' */ -#line 971 "bison_parser.y" + case 181: +#line 984 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 4163 "bison_parser.cpp" +#line 4166 "bison_parser.cpp" break; - case 177: /* in_expr: operand NOT IN '(' expr_list ')' */ -#line 972 "bison_parser.y" + case 182: +#line 985 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 4169 "bison_parser.cpp" +#line 4172 "bison_parser.cpp" break; - case 178: /* in_expr: operand IN '(' select_no_paren ')' */ -#line 973 "bison_parser.y" + case 183: +#line 986 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 4175 "bison_parser.cpp" +#line 4178 "bison_parser.cpp" break; - case 179: /* in_expr: operand NOT IN '(' select_no_paren ')' */ -#line 974 "bison_parser.y" + case 184: +#line 987 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 4181 "bison_parser.cpp" +#line 4184 "bison_parser.cpp" break; - case 180: /* case_expr: CASE expr case_list END */ -#line 980 "bison_parser.y" + case 185: +#line 993 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } -#line 4187 "bison_parser.cpp" +#line 4190 "bison_parser.cpp" break; - case 181: /* case_expr: CASE expr case_list ELSE expr END */ -#line 981 "bison_parser.y" + case 186: +#line 994 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4193 "bison_parser.cpp" +#line 4196 "bison_parser.cpp" break; - case 182: /* case_expr: CASE case_list END */ -#line 982 "bison_parser.y" + case 187: +#line 995 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } -#line 4199 "bison_parser.cpp" +#line 4202 "bison_parser.cpp" break; - case 183: /* case_expr: CASE case_list ELSE expr END */ -#line 983 "bison_parser.y" + case 188: +#line 996 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4205 "bison_parser.cpp" +#line 4208 "bison_parser.cpp" break; - case 184: /* case_list: WHEN expr THEN expr */ -#line 987 "bison_parser.y" + case 189: +#line 1000 "bison_parser.y" { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4211 "bison_parser.cpp" +#line 4214 "bison_parser.cpp" break; - case 185: /* case_list: case_list WHEN expr THEN expr */ -#line 988 "bison_parser.y" + case 190: +#line 1001 "bison_parser.y" { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4217 "bison_parser.cpp" +#line 4220 "bison_parser.cpp" break; - case 186: /* exists_expr: EXISTS '(' select_no_paren ')' */ -#line 992 "bison_parser.y" + case 191: +#line 1005 "bison_parser.y" { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 4223 "bison_parser.cpp" +#line 4226 "bison_parser.cpp" break; - case 187: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ -#line 993 "bison_parser.y" + case 192: +#line 1006 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 4229 "bison_parser.cpp" +#line 4232 "bison_parser.cpp" break; - case 188: /* comp_expr: operand '=' operand */ -#line 997 "bison_parser.y" + case 193: +#line 1010 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4235 "bison_parser.cpp" +#line 4238 "bison_parser.cpp" break; - case 189: /* comp_expr: operand EQUALS operand */ -#line 998 "bison_parser.y" + case 194: +#line 1011 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4241 "bison_parser.cpp" +#line 4244 "bison_parser.cpp" break; - case 190: /* comp_expr: operand NOTEQUALS operand */ -#line 999 "bison_parser.y" + case 195: +#line 1012 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 4247 "bison_parser.cpp" +#line 4250 "bison_parser.cpp" break; - case 191: /* comp_expr: operand '<' operand */ -#line 1000 "bison_parser.y" + case 196: +#line 1013 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 4253 "bison_parser.cpp" +#line 4256 "bison_parser.cpp" break; - case 192: /* comp_expr: operand '>' operand */ -#line 1001 "bison_parser.y" + case 197: +#line 1014 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 4259 "bison_parser.cpp" +#line 4262 "bison_parser.cpp" break; - case 193: /* comp_expr: operand LESSEQ operand */ -#line 1002 "bison_parser.y" + case 198: +#line 1015 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 4265 "bison_parser.cpp" +#line 4268 "bison_parser.cpp" break; - case 194: /* comp_expr: operand GREATEREQ operand */ -#line 1003 "bison_parser.y" + case 199: +#line 1016 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 4271 "bison_parser.cpp" +#line 4274 "bison_parser.cpp" break; - case 195: /* function_expr: IDENTIFIER '(' ')' */ -#line 1007 "bison_parser.y" + case 200: +#line 1020 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 4277 "bison_parser.cpp" +#line 4280 "bison_parser.cpp" break; - case 196: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ -#line 1008 "bison_parser.y" + case 201: +#line 1021 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 4283 "bison_parser.cpp" +#line 4286 "bison_parser.cpp" break; - case 197: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ -#line 1012 "bison_parser.y" + case 202: +#line 1025 "bison_parser.y" { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } -#line 4289 "bison_parser.cpp" +#line 4292 "bison_parser.cpp" break; - case 198: /* cast_expr: CAST '(' expr AS column_type ')' */ -#line 1016 "bison_parser.y" + case 203: +#line 1029 "bison_parser.y" { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } -#line 4295 "bison_parser.cpp" +#line 4298 "bison_parser.cpp" break; - case 199: /* datetime_field: SECOND */ -#line 1020 "bison_parser.y" + case 204: +#line 1033 "bison_parser.y" { (yyval.datetime_field) = kDatetimeSecond; } -#line 4301 "bison_parser.cpp" +#line 4304 "bison_parser.cpp" break; - case 200: /* datetime_field: MINUTE */ -#line 1021 "bison_parser.y" + case 205: +#line 1034 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMinute; } -#line 4307 "bison_parser.cpp" +#line 4310 "bison_parser.cpp" break; - case 201: /* datetime_field: HOUR */ -#line 1022 "bison_parser.y" + case 206: +#line 1035 "bison_parser.y" { (yyval.datetime_field) = kDatetimeHour; } -#line 4313 "bison_parser.cpp" +#line 4316 "bison_parser.cpp" break; - case 202: /* datetime_field: DAY */ -#line 1023 "bison_parser.y" + case 207: +#line 1036 "bison_parser.y" { (yyval.datetime_field) = kDatetimeDay; } -#line 4319 "bison_parser.cpp" +#line 4322 "bison_parser.cpp" break; - case 203: /* datetime_field: MONTH */ -#line 1024 "bison_parser.y" + case 208: +#line 1037 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMonth; } -#line 4325 "bison_parser.cpp" +#line 4328 "bison_parser.cpp" break; - case 204: /* datetime_field: YEAR */ -#line 1025 "bison_parser.y" + case 209: +#line 1038 "bison_parser.y" { (yyval.datetime_field) = kDatetimeYear; } -#line 4331 "bison_parser.cpp" +#line 4334 "bison_parser.cpp" break; - case 205: /* array_expr: ARRAY '[' expr_list ']' */ -#line 1029 "bison_parser.y" + case 210: +#line 1042 "bison_parser.y" { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 4337 "bison_parser.cpp" +#line 4340 "bison_parser.cpp" break; - case 206: /* array_index: operand '[' int_literal ']' */ -#line 1033 "bison_parser.y" + case 211: +#line 1046 "bison_parser.y" { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 4343 "bison_parser.cpp" +#line 4346 "bison_parser.cpp" break; - case 207: /* between_expr: operand BETWEEN operand AND operand */ -#line 1037 "bison_parser.y" + case 212: +#line 1050 "bison_parser.y" { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4349 "bison_parser.cpp" +#line 4352 "bison_parser.cpp" break; - case 208: /* column_name: IDENTIFIER */ -#line 1041 "bison_parser.y" + case 213: +#line 1054 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 4355 "bison_parser.cpp" +#line 4358 "bison_parser.cpp" break; - case 209: /* column_name: IDENTIFIER '.' IDENTIFIER */ -#line 1042 "bison_parser.y" + case 214: +#line 1055 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 4361 "bison_parser.cpp" +#line 4364 "bison_parser.cpp" break; - case 210: /* column_name: '*' */ -#line 1043 "bison_parser.y" + case 215: +#line 1056 "bison_parser.y" { (yyval.expr) = Expr::makeStar(); } -#line 4367 "bison_parser.cpp" +#line 4370 "bison_parser.cpp" break; - case 211: /* column_name: IDENTIFIER '.' '*' */ -#line 1044 "bison_parser.y" + case 216: +#line 1057 "bison_parser.y" { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 4373 "bison_parser.cpp" +#line 4376 "bison_parser.cpp" break; - case 217: /* string_literal: STRING */ -#line 1056 "bison_parser.y" + case 222: +#line 1069 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 4379 "bison_parser.cpp" +#line 4382 "bison_parser.cpp" break; - case 218: /* bool_literal: TRUE */ -#line 1060 "bison_parser.y" + case 223: +#line 1073 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(true); } -#line 4385 "bison_parser.cpp" +#line 4388 "bison_parser.cpp" break; - case 219: /* bool_literal: FALSE */ -#line 1061 "bison_parser.y" + case 224: +#line 1074 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(false); } -#line 4391 "bison_parser.cpp" +#line 4394 "bison_parser.cpp" break; - case 220: /* num_literal: FLOATVAL */ -#line 1065 "bison_parser.y" + case 225: +#line 1078 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 4397 "bison_parser.cpp" +#line 4400 "bison_parser.cpp" break; - case 222: /* int_literal: INTVAL */ -#line 1070 "bison_parser.y" + case 227: +#line 1083 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 4403 "bison_parser.cpp" +#line 4406 "bison_parser.cpp" break; - case 223: /* null_literal: NULL */ -#line 1074 "bison_parser.y" + case 228: +#line 1087 "bison_parser.y" { (yyval.expr) = Expr::makeNullLiteral(); } -#line 4409 "bison_parser.cpp" +#line 4412 "bison_parser.cpp" break; - case 224: /* param_expr: '?' */ -#line 1078 "bison_parser.y" + case 229: +#line 1091 "bison_parser.y" { (yyval.expr) = Expr::makeParameter(yylloc.total_column); (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 4419 "bison_parser.cpp" +#line 4422 "bison_parser.cpp" break; - case 226: /* table_ref: table_ref_commalist ',' table_ref_atomic */ -#line 1091 "bison_parser.y" + case 231: +#line 1104 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); auto tbl = new TableRef(kTableCrossProduct); tbl->list = (yyvsp[-2].table_vec); (yyval.table) = tbl; } -#line 4430 "bison_parser.cpp" +#line 4433 "bison_parser.cpp" break; - case 230: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ -#line 1107 "bison_parser.y" + case 235: +#line 1120 "bison_parser.y" { auto tbl = new TableRef(kTableSelect); tbl->select = (yyvsp[-2].select_stmt); tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4441 "bison_parser.cpp" +#line 4444 "bison_parser.cpp" break; - case 231: /* table_ref_commalist: table_ref_atomic */ -#line 1116 "bison_parser.y" + case 236: +#line 1129 "bison_parser.y" { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 4447 "bison_parser.cpp" +#line 4450 "bison_parser.cpp" break; - case 232: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ -#line 1117 "bison_parser.y" + case 237: +#line 1130 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 4453 "bison_parser.cpp" +#line 4456 "bison_parser.cpp" break; - case 233: /* table_ref_name: table_name opt_table_alias */ -#line 1122 "bison_parser.y" + case 238: +#line 1135 "bison_parser.y" { auto tbl = new TableRef(kTableName); tbl->schema = (yyvsp[-1].table_name).schema; @@ -4461,121 +4464,121 @@ YYLTYPE yylloc = yyloc_default; tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4465 "bison_parser.cpp" +#line 4468 "bison_parser.cpp" break; - case 234: /* table_ref_name_no_alias: table_name */ -#line 1133 "bison_parser.y" + case 239: +#line 1146 "bison_parser.y" { (yyval.table) = new TableRef(kTableName); (yyval.table)->schema = (yyvsp[0].table_name).schema; (yyval.table)->name = (yyvsp[0].table_name).name; } -#line 4475 "bison_parser.cpp" +#line 4478 "bison_parser.cpp" break; - case 235: /* table_name: IDENTIFIER */ -#line 1142 "bison_parser.y" + case 240: +#line 1155 "bison_parser.y" { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} -#line 4481 "bison_parser.cpp" +#line 4484 "bison_parser.cpp" break; - case 236: /* table_name: IDENTIFIER '.' IDENTIFIER */ -#line 1143 "bison_parser.y" + case 241: +#line 1156 "bison_parser.y" { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } -#line 4487 "bison_parser.cpp" +#line 4490 "bison_parser.cpp" break; - case 237: /* opt_index_name: IDENTIFIER */ -#line 1147 "bison_parser.y" + case 242: +#line 1160 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4493 "bison_parser.cpp" +#line 4496 "bison_parser.cpp" break; - case 238: /* opt_index_name: %empty */ -#line 1148 "bison_parser.y" + case 243: +#line 1161 "bison_parser.y" { (yyval.sval) = nullptr;} -#line 4499 "bison_parser.cpp" +#line 4502 "bison_parser.cpp" break; - case 239: /* index_name: IDENTIFIER */ -#line 1152 "bison_parser.y" + case 244: +#line 1165 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4505 "bison_parser.cpp" +#line 4508 "bison_parser.cpp" break; - case 241: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ -#line 1158 "bison_parser.y" + case 246: +#line 1171 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } -#line 4511 "bison_parser.cpp" +#line 4514 "bison_parser.cpp" break; - case 243: /* opt_table_alias: %empty */ -#line 1164 "bison_parser.y" + case 248: +#line 1177 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4517 "bison_parser.cpp" +#line 4520 "bison_parser.cpp" break; - case 244: /* alias: AS IDENTIFIER */ -#line 1169 "bison_parser.y" + case 249: +#line 1182 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4523 "bison_parser.cpp" +#line 4526 "bison_parser.cpp" break; - case 245: /* alias: IDENTIFIER */ -#line 1170 "bison_parser.y" + case 250: +#line 1183 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4529 "bison_parser.cpp" +#line 4532 "bison_parser.cpp" break; - case 247: /* opt_alias: %empty */ -#line 1176 "bison_parser.y" + case 252: +#line 1189 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4535 "bison_parser.cpp" +#line 4538 "bison_parser.cpp" break; - case 249: /* opt_with_clause: %empty */ -#line 1186 "bison_parser.y" + case 254: +#line 1199 "bison_parser.y" { (yyval.with_description_vec) = nullptr; } -#line 4541 "bison_parser.cpp" +#line 4544 "bison_parser.cpp" break; - case 250: /* with_clause: WITH with_description_list */ -#line 1190 "bison_parser.y" + case 255: +#line 1203 "bison_parser.y" { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } -#line 4547 "bison_parser.cpp" +#line 4550 "bison_parser.cpp" break; - case 251: /* with_description_list: with_description */ -#line 1194 "bison_parser.y" + case 256: +#line 1207 "bison_parser.y" { (yyval.with_description_vec) = new std::vector(); (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); } -#line 4556 "bison_parser.cpp" +#line 4559 "bison_parser.cpp" break; - case 252: /* with_description_list: with_description_list ',' with_description */ -#line 1198 "bison_parser.y" + case 257: +#line 1211 "bison_parser.y" { (yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t)); (yyval.with_description_vec) = (yyvsp[-2].with_description_vec); } -#line 4565 "bison_parser.cpp" +#line 4568 "bison_parser.cpp" break; - case 253: /* with_description: IDENTIFIER AS select_with_paren */ -#line 1205 "bison_parser.y" + case 258: +#line 1218 "bison_parser.y" { (yyval.with_description_t) = new WithDescription(); (yyval.with_description_t)->alias = (yyvsp[-2].sval); (yyval.with_description_t)->select = (yyvsp[0].select_stmt); } -#line 4575 "bison_parser.cpp" +#line 4578 "bison_parser.cpp" break; - case 254: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ -#line 1219 "bison_parser.y" + case 259: +#line 1232 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4583,11 +4586,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 4587 "bison_parser.cpp" +#line 4590 "bison_parser.cpp" break; - case 255: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ -#line 1227 "bison_parser.y" + case 260: +#line 1240 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4596,11 +4599,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 4600 "bison_parser.cpp" +#line 4603 "bison_parser.cpp" break; - case 256: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ -#line 1237 "bison_parser.y" + case 261: +#line 1250 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4616,83 +4619,83 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } -#line 4620 "bison_parser.cpp" +#line 4623 "bison_parser.cpp" break; - case 257: /* opt_join_type: INNER */ -#line 1255 "bison_parser.y" + case 262: +#line 1268 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4626 "bison_parser.cpp" +#line 4629 "bison_parser.cpp" break; - case 258: /* opt_join_type: LEFT OUTER */ -#line 1256 "bison_parser.y" + case 263: +#line 1269 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4632 "bison_parser.cpp" +#line 4635 "bison_parser.cpp" break; - case 259: /* opt_join_type: LEFT */ -#line 1257 "bison_parser.y" + case 264: +#line 1270 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4638 "bison_parser.cpp" +#line 4641 "bison_parser.cpp" break; - case 260: /* opt_join_type: RIGHT OUTER */ -#line 1258 "bison_parser.y" + case 265: +#line 1271 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4644 "bison_parser.cpp" +#line 4647 "bison_parser.cpp" break; - case 261: /* opt_join_type: RIGHT */ -#line 1259 "bison_parser.y" + case 266: +#line 1272 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4650 "bison_parser.cpp" +#line 4653 "bison_parser.cpp" break; - case 262: /* opt_join_type: FULL OUTER */ -#line 1260 "bison_parser.y" + case 267: +#line 1273 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4656 "bison_parser.cpp" +#line 4659 "bison_parser.cpp" break; - case 263: /* opt_join_type: OUTER */ -#line 1261 "bison_parser.y" + case 268: +#line 1274 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4662 "bison_parser.cpp" +#line 4665 "bison_parser.cpp" break; - case 264: /* opt_join_type: FULL */ -#line 1262 "bison_parser.y" + case 269: +#line 1275 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4668 "bison_parser.cpp" +#line 4671 "bison_parser.cpp" break; - case 265: /* opt_join_type: CROSS */ -#line 1263 "bison_parser.y" + case 270: +#line 1276 "bison_parser.y" { (yyval.uval) = kJoinCross; } -#line 4674 "bison_parser.cpp" +#line 4677 "bison_parser.cpp" break; - case 266: /* opt_join_type: %empty */ -#line 1264 "bison_parser.y" + case 271: +#line 1277 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4680 "bison_parser.cpp" +#line 4683 "bison_parser.cpp" break; - case 270: /* ident_commalist: IDENTIFIER */ -#line 1284 "bison_parser.y" + case 275: +#line 1297 "bison_parser.y" { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 4686 "bison_parser.cpp" +#line 4689 "bison_parser.cpp" break; - case 271: /* ident_commalist: ident_commalist ',' IDENTIFIER */ -#line 1285 "bison_parser.y" + case 276: +#line 1298 "bison_parser.y" { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 4692 "bison_parser.cpp" +#line 4695 "bison_parser.cpp" break; -#line 4696 "bison_parser.cpp" +#line 4699 "bison_parser.cpp" default: break; } @@ -4707,10 +4710,11 @@ YYLTYPE yylloc = yyloc_default; case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; + YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; *++yylsp = yyloc; @@ -4735,61 +4739,66 @@ YYLTYPE yylloc = yyloc_default; yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ - yytoken = yychar == SQL_HSQL_EMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; +#if ! YYERROR_VERBOSE + yyerror (&yylloc, result, scanner, YY_("syntax error")); +#else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) { - yypcontext_t yyctx - = {yyssp, yytoken, &yylloc}; char const *yymsgp = YY_("syntax error"); int yysyntax_error_status; - yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); + yysyntax_error_status = YYSYNTAX_ERROR; if (yysyntax_error_status == 0) yymsgp = yymsg; - else if (yysyntax_error_status == -1) + else if (yysyntax_error_status == 1) { if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); - yymsg = YY_CAST (char *, - YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); - if (yymsg) + yymsg = YY_CAST (char *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); + if (!yymsg) { - yysyntax_error_status - = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); - yymsgp = yymsg; + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = 2; } else { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = YYENOMEM; + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; } } yyerror (&yylloc, result, scanner, yymsgp); - if (yysyntax_error_status == YYENOMEM) + if (yysyntax_error_status == 2) goto yyexhaustedlab; } +# undef YYSYNTAX_ERROR +#endif } yyerror_range[1] = yylloc; + if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ - if (yychar <= SQL_YYEOF) + if (yychar <= YYEOF) { /* Return failure if at end of input. */ - if (yychar == SQL_YYEOF) + if (yychar == YYEOF) YYABORT; } else { yydestruct ("Error: discarding", yytoken, &yylval, &yylloc, result, scanner); - yychar = SQL_HSQL_EMPTY; + yychar = YYEMPTY; } } @@ -4822,14 +4831,13 @@ YYLTYPE yylloc = yyloc_default; yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ - /* Pop stack until we find a state that shifts the error token. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) { - yyn += YYSYMBOL_YYerror; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) @@ -4843,7 +4851,7 @@ YYLTYPE yylloc = yyloc_default; yyerror_range[1] = *yylsp; yydestruct ("Error: popping", - YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, result, scanner); + yystos[yystate], yyvsp, yylsp, result, scanner); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); @@ -4854,11 +4862,13 @@ YYLTYPE yylloc = yyloc_default; YY_IGNORE_MAYBE_UNINITIALIZED_END yyerror_range[2] = yylloc; - ++yylsp; - YYLLOC_DEFAULT (*yylsp, yyerror_range, 2); + /* Using YYLLOC is tempting, but would change the location of + the lookahead. YYLOC is available though. */ + YYLLOC_DEFAULT (yyloc, yyerror_range, 2); + *++yylsp = yyloc; /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; @@ -4880,22 +4890,22 @@ YYLTYPE yylloc = yyloc_default; goto yyreturn; -#if 1 +#if !defined yyoverflow || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (&yylloc, result, scanner, YY_("memory exhausted")); yyresult = 2; - goto yyreturn; + /* Fall through. */ #endif -/*-------------------------------------------------------. -| yyreturn -- parsing is finished, clean up and return. | -`-------------------------------------------------------*/ +/*-----------------------------------------------------. +| yyreturn -- parsing is finished, return the result. | +`-----------------------------------------------------*/ yyreturn: - if (yychar != SQL_HSQL_EMPTY) + if (yychar != YYEMPTY) { /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ @@ -4910,19 +4920,20 @@ YYLTYPE yylloc = yyloc_default; while (yyssp != yyss) { yydestruct ("Cleanup: popping", - YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, result, scanner); + yystos[+*yyssp], yyvsp, yylsp, result, scanner); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif +#if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); +#endif return yyresult; } - -#line 1288 "bison_parser.y" +#line 1301 "bison_parser.y" /********************************* ** Section 4: Additional C code diff --git a/src/parser/bison_parser.h b/src/parser/bison_parser.h index 73ced33a..3ac5ff03 100644 --- a/src/parser/bison_parser.h +++ b/src/parser/bison_parser.h @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.7.6. */ +/* A Bison parser, made by GNU Bison 3.5.1. */ /* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -31,9 +31,8 @@ This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ -/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, - especially those whose name start with YY_ or yy_. They are - private implementation details that can be changed or removed. */ +/* 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 @@ -77,172 +76,167 @@ extern int hsql_debug; } \ } -#line 81 "bison_parser.h" +#line 80 "bison_parser.h" -/* Token kinds. */ +/* Token type. */ #ifndef HSQL_TOKENTYPE # define HSQL_TOKENTYPE enum hsql_tokentype { - SQL_HSQL_EMPTY = -2, - SQL_YYEOF = 0, /* "end of file" */ - SQL_HSQL_error = 256, /* error */ - SQL_HSQL_UNDEF = 257, /* "invalid token" */ - SQL_IDENTIFIER = 258, /* IDENTIFIER */ - SQL_STRING = 259, /* STRING */ - SQL_FLOATVAL = 260, /* FLOATVAL */ - SQL_INTVAL = 261, /* INTVAL */ - SQL_DEALLOCATE = 262, /* DEALLOCATE */ - SQL_PARAMETERS = 263, /* PARAMETERS */ - SQL_INTERSECT = 264, /* INTERSECT */ - SQL_TEMPORARY = 265, /* TEMPORARY */ - SQL_TIMESTAMP = 266, /* TIMESTAMP */ - SQL_DISTINCT = 267, /* DISTINCT */ - SQL_NVARCHAR = 268, /* NVARCHAR */ - SQL_RESTRICT = 269, /* RESTRICT */ - SQL_TRUNCATE = 270, /* TRUNCATE */ - SQL_ANALYZE = 271, /* ANALYZE */ - SQL_BETWEEN = 272, /* BETWEEN */ - SQL_CASCADE = 273, /* CASCADE */ - SQL_COLUMNS = 274, /* COLUMNS */ - SQL_CONTROL = 275, /* CONTROL */ - SQL_DEFAULT = 276, /* DEFAULT */ - SQL_EXECUTE = 277, /* EXECUTE */ - SQL_EXPLAIN = 278, /* EXPLAIN */ - SQL_INTEGER = 279, /* INTEGER */ - SQL_NATURAL = 280, /* NATURAL */ - SQL_PREPARE = 281, /* PREPARE */ - SQL_PRIMARY = 282, /* PRIMARY */ - SQL_SCHEMAS = 283, /* SCHEMAS */ - SQL_CHARACTER = 284, /* CHARACTER */ - SQL_VARYING = 285, /* VARYING */ - SQL_REAL = 286, /* REAL */ - SQL_DECIMAL = 287, /* DECIMAL */ - SQL_SPATIAL = 288, /* SPATIAL */ - SQL_VARCHAR = 289, /* VARCHAR */ - SQL_VIRTUAL = 290, /* VIRTUAL */ - SQL_DESCRIBE = 291, /* DESCRIBE */ - SQL_BEFORE = 292, /* BEFORE */ - SQL_COLUMN = 293, /* COLUMN */ - SQL_CREATE = 294, /* CREATE */ - SQL_DELETE = 295, /* DELETE */ - SQL_DIRECT = 296, /* DIRECT */ - SQL_DOUBLE = 297, /* DOUBLE */ - SQL_ESCAPE = 298, /* ESCAPE */ - SQL_EXCEPT = 299, /* EXCEPT */ - SQL_EXISTS = 300, /* EXISTS */ - SQL_EXTRACT = 301, /* EXTRACT */ - SQL_CAST = 302, /* CAST */ - SQL_FORMAT = 303, /* FORMAT */ - SQL_GLOBAL = 304, /* GLOBAL */ - SQL_HAVING = 305, /* HAVING */ - SQL_IMPORT = 306, /* IMPORT */ - SQL_INSERT = 307, /* INSERT */ - SQL_ISNULL = 308, /* ISNULL */ - SQL_OFFSET = 309, /* OFFSET */ - SQL_RENAME = 310, /* RENAME */ - SQL_SCHEMA = 311, /* SCHEMA */ - SQL_SELECT = 312, /* SELECT */ - SQL_SORTED = 313, /* SORTED */ - SQL_TABLES = 314, /* TABLES */ - SQL_UNIQUE = 315, /* UNIQUE */ - SQL_UNLOAD = 316, /* UNLOAD */ - SQL_UPDATE = 317, /* UPDATE */ - SQL_VALUES = 318, /* VALUES */ - SQL_AFTER = 319, /* AFTER */ - SQL_ALTER = 320, /* ALTER */ - SQL_CROSS = 321, /* CROSS */ - SQL_DELTA = 322, /* DELTA */ - SQL_FLOAT = 323, /* FLOAT */ - SQL_GROUP = 324, /* GROUP */ - SQL_INDEX = 325, /* INDEX */ - SQL_INNER = 326, /* INNER */ - SQL_LIMIT = 327, /* LIMIT */ - SQL_LOCAL = 328, /* LOCAL */ - SQL_MERGE = 329, /* MERGE */ - SQL_MINUS = 330, /* MINUS */ - SQL_ORDER = 331, /* ORDER */ - SQL_OUTER = 332, /* OUTER */ - SQL_RIGHT = 333, /* RIGHT */ - SQL_TABLE = 334, /* TABLE */ - SQL_UNION = 335, /* UNION */ - SQL_USING = 336, /* USING */ - SQL_WHERE = 337, /* WHERE */ - SQL_CALL = 338, /* CALL */ - SQL_CASE = 339, /* CASE */ - SQL_CHAR = 340, /* CHAR */ - SQL_COPY = 341, /* COPY */ - SQL_DATE = 342, /* DATE */ - SQL_DATETIME = 343, /* DATETIME */ - SQL_DESC = 344, /* DESC */ - SQL_DROP = 345, /* DROP */ - SQL_ELSE = 346, /* ELSE */ - SQL_FILE = 347, /* FILE */ - SQL_FROM = 348, /* FROM */ - SQL_FULL = 349, /* FULL */ - SQL_HASH = 350, /* HASH */ - SQL_HINT = 351, /* HINT */ - SQL_INTO = 352, /* INTO */ - SQL_JOIN = 353, /* JOIN */ - SQL_LEFT = 354, /* LEFT */ - SQL_LIKE = 355, /* LIKE */ - SQL_LOAD = 356, /* LOAD */ - SQL_LONG = 357, /* LONG */ - SQL_NULL = 358, /* NULL */ - SQL_PLAN = 359, /* PLAN */ - SQL_SHOW = 360, /* SHOW */ - SQL_TEXT = 361, /* TEXT */ - SQL_THEN = 362, /* THEN */ - SQL_TIME = 363, /* TIME */ - SQL_VIEW = 364, /* VIEW */ - SQL_WHEN = 365, /* WHEN */ - SQL_WITH = 366, /* WITH */ - SQL_ADD = 367, /* ADD */ - SQL_ALL = 368, /* ALL */ - SQL_AND = 369, /* AND */ - SQL_ASC = 370, /* ASC */ - SQL_END = 371, /* END */ - SQL_FOR = 372, /* FOR */ - SQL_INT = 373, /* INT */ - SQL_KEY = 374, /* KEY */ - SQL_NOT = 375, /* NOT */ - SQL_OFF = 376, /* OFF */ - SQL_SET = 377, /* SET */ - SQL_TOP = 378, /* TOP */ - SQL_AS = 379, /* AS */ - SQL_BY = 380, /* BY */ - SQL_IF = 381, /* IF */ - SQL_IN = 382, /* IN */ - SQL_IS = 383, /* IS */ - SQL_OF = 384, /* OF */ - SQL_ON = 385, /* ON */ - SQL_OR = 386, /* OR */ - SQL_TO = 387, /* TO */ - SQL_ARRAY = 388, /* ARRAY */ - SQL_CONCAT = 389, /* CONCAT */ - SQL_ILIKE = 390, /* ILIKE */ - SQL_SECOND = 391, /* SECOND */ - SQL_MINUTE = 392, /* MINUTE */ - SQL_HOUR = 393, /* HOUR */ - SQL_DAY = 394, /* DAY */ - SQL_MONTH = 395, /* MONTH */ - SQL_YEAR = 396, /* YEAR */ - SQL_TRUE = 397, /* TRUE */ - SQL_FALSE = 398, /* FALSE */ - SQL_TRANSACTION = 399, /* TRANSACTION */ - SQL_BEGIN = 400, /* BEGIN */ - SQL_COMMIT = 401, /* COMMIT */ - SQL_ROLLBACK = 402, /* ROLLBACK */ - SQL_EQUALS = 403, /* EQUALS */ - SQL_NOTEQUALS = 404, /* NOTEQUALS */ - SQL_LESS = 405, /* LESS */ - SQL_GREATER = 406, /* GREATER */ - SQL_LESSEQ = 407, /* LESSEQ */ - SQL_GREATEREQ = 408, /* GREATEREQ */ - SQL_NOTNULL = 409, /* NOTNULL */ - SQL_UMINUS = 410 /* UMINUS */ + SQL_IDENTIFIER = 258, + SQL_STRING = 259, + SQL_FLOATVAL = 260, + SQL_INTVAL = 261, + SQL_DEALLOCATE = 262, + SQL_PARAMETERS = 263, + SQL_INTERSECT = 264, + SQL_TEMPORARY = 265, + SQL_TIMESTAMP = 266, + SQL_DISTINCT = 267, + SQL_NVARCHAR = 268, + SQL_RESTRICT = 269, + SQL_TRUNCATE = 270, + SQL_ANALYZE = 271, + SQL_BETWEEN = 272, + SQL_CASCADE = 273, + SQL_COLUMNS = 274, + SQL_CONTROL = 275, + SQL_DEFAULT = 276, + SQL_EXECUTE = 277, + SQL_EXPLAIN = 278, + SQL_INTEGER = 279, + SQL_NATURAL = 280, + SQL_PREPARE = 281, + SQL_PRIMARY = 282, + SQL_SCHEMAS = 283, + SQL_CHARACTER = 284, + SQL_VARYING = 285, + SQL_REAL = 286, + SQL_DECIMAL = 287, + SQL_SPATIAL = 288, + SQL_VARCHAR = 289, + SQL_VIRTUAL = 290, + SQL_DESCRIBE = 291, + SQL_BEFORE = 292, + SQL_COLUMN = 293, + SQL_CREATE = 294, + SQL_DELETE = 295, + SQL_DIRECT = 296, + SQL_DOUBLE = 297, + SQL_ESCAPE = 298, + SQL_EXCEPT = 299, + SQL_EXISTS = 300, + SQL_EXTRACT = 301, + SQL_CAST = 302, + SQL_FORMAT = 303, + SQL_GLOBAL = 304, + SQL_HAVING = 305, + SQL_IMPORT = 306, + SQL_INSERT = 307, + SQL_ISNULL = 308, + SQL_OFFSET = 309, + SQL_RENAME = 310, + SQL_SCHEMA = 311, + SQL_SELECT = 312, + SQL_SORTED = 313, + SQL_TABLES = 314, + SQL_UNIQUE = 315, + SQL_UNLOAD = 316, + SQL_UPDATE = 317, + SQL_VALUES = 318, + SQL_AFTER = 319, + SQL_ALTER = 320, + SQL_CROSS = 321, + SQL_DELTA = 322, + SQL_FLOAT = 323, + SQL_GROUP = 324, + SQL_INDEX = 325, + SQL_INNER = 326, + SQL_LIMIT = 327, + SQL_LOCAL = 328, + SQL_MERGE = 329, + SQL_MINUS = 330, + SQL_ORDER = 331, + SQL_OUTER = 332, + SQL_RIGHT = 333, + SQL_TABLE = 334, + SQL_UNION = 335, + SQL_USING = 336, + SQL_WHERE = 337, + SQL_CALL = 338, + SQL_CASE = 339, + SQL_CHAR = 340, + SQL_COPY = 341, + SQL_DATE = 342, + SQL_DATETIME = 343, + SQL_DESC = 344, + SQL_DROP = 345, + SQL_ELSE = 346, + SQL_FILE = 347, + SQL_FROM = 348, + SQL_FULL = 349, + SQL_HASH = 350, + SQL_HINT = 351, + SQL_INTO = 352, + SQL_JOIN = 353, + SQL_LEFT = 354, + SQL_LIKE = 355, + SQL_LOAD = 356, + SQL_LONG = 357, + SQL_NULL = 358, + SQL_PLAN = 359, + SQL_SHOW = 360, + SQL_TEXT = 361, + SQL_THEN = 362, + SQL_TIME = 363, + SQL_VIEW = 364, + SQL_WHEN = 365, + SQL_WITH = 366, + SQL_ADD = 367, + SQL_ALL = 368, + SQL_AND = 369, + SQL_ASC = 370, + SQL_END = 371, + SQL_FOR = 372, + SQL_INT = 373, + SQL_KEY = 374, + SQL_NOT = 375, + SQL_OFF = 376, + SQL_SET = 377, + SQL_TOP = 378, + SQL_AS = 379, + SQL_BY = 380, + SQL_IF = 381, + SQL_IN = 382, + SQL_IS = 383, + SQL_OF = 384, + SQL_ON = 385, + SQL_OR = 386, + SQL_TO = 387, + SQL_ARRAY = 388, + SQL_CONCAT = 389, + SQL_ILIKE = 390, + SQL_SECOND = 391, + SQL_MINUTE = 392, + SQL_HOUR = 393, + SQL_DAY = 394, + SQL_MONTH = 395, + SQL_YEAR = 396, + SQL_TRUE = 397, + SQL_FALSE = 398, + SQL_TRANSACTION = 399, + SQL_BEGIN = 400, + SQL_COMMIT = 401, + SQL_ROLLBACK = 402, + SQL_EQUALS = 403, + SQL_NOTEQUALS = 404, + SQL_LESS = 405, + SQL_GREATER = 406, + SQL_LESSEQ = 407, + SQL_GREATEREQ = 408, + SQL_NOTNULL = 409, + SQL_UMINUS = 410 }; - typedef enum hsql_tokentype hsql_token_kind_t; #endif /* Value type. */ @@ -280,6 +274,7 @@ union HSQL_STYPE hsql::DatetimeField datetime_field; hsql::LimitDescription* limit; hsql::ColumnDefinition* column_t; + hsql::TableKeyConstraint table_key_constraint_t; hsql::ColumnType column_type_t; hsql::ImportType import_type_t; hsql::GroupByDescription* group_t; @@ -296,8 +291,9 @@ union HSQL_STYPE std::vector* expr_vec; std::vector* order_vec; std::vector* with_description_vec; + std::vector table_key_constraint_vec; -#line 301 "bison_parser.h" +#line 297 "bison_parser.h" }; typedef union HSQL_STYPE HSQL_STYPE; diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 51cb585f..c7d1b10b 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -594,7 +594,7 @@ opt_table_key_constraints: | /* empty */ {$$ = new std::vector(); } ; -table_key_constaint: +table_key_constraint: ',' PRIMARY KEY '(' ident_commalist ')' { $$ = TableKeyConstraint{KeyType::PRIMARY_KEY, $5}; } | ',' UNIQUE '(' ident_commalist ')' { $$ = TableKeyConstraint{KeyType::UNIQUE, $4}; } /****************************** diff --git a/src/sql/CreateStatement.h b/src/sql/CreateStatement.h index 99509942..3098f515 100755 --- a/src/sql/CreateStatement.h +++ b/src/sql/CreateStatement.h @@ -10,15 +10,17 @@ namespace hsql { struct SelectStatement; + enum struct KeyType {PRIMARY_KEY, UNIQUE}; + // Represents definition of a key constraint - struct KeyConstraints { - KeyConstraints(char* keyType, std::unordered_set columnIDs); - virtual ~KeyConstraints(); + struct TableKeyConstraint { + + TableKeyConstraint(KeyType keyType, std::vector columnNames); - enum struct KeyType {PRIMARY_KEY, UNIQUE}; + virtual~TableKeyConstraint(); KeyType type; - std::unordered_set columnIDs; + std::vector columnNames; }; // Represents definition of a table column @@ -52,7 +54,7 @@ namespace hsql { char* indexName; // default: nullptr std::vector* indexColumns; std::vector* columns; // default: nullptr - std::vector* keyConstraints; // default: nullptr + std::vector* tableKeyConstraints; // default: nullptr std::vector* viewColumns; SelectStatement* select; }; diff --git a/src/sql/statements.cpp b/src/sql/statements.cpp index 6e529302..e710800e 100755 --- a/src/sql/statements.cpp +++ b/src/sql/statements.cpp @@ -3,11 +3,14 @@ namespace hsql { // KeyConstraints - KeyConstraints::KeyConstraints(KeyType keyType, std::unordered_set columnIDs) : + TableKeyConstraint::TableKeyConstraint(KeyType keyType, std::vector columnNames) : type(keyType), - columnIDs(columnIDs) { }; + columnNames(columnNames) { }; + + TableKeyConstraint::~TableKeyConstraint() { + free(void *); + } - KeyConstraints::~KeyConstraints() { } // ColumnDefinition ColumnDefinition::ColumnDefinition(char* name, ColumnType type, bool nullable) : From b5663d5a2c6fa0722666dda054fb8bc1acb232a0 Mon Sep 17 00:00:00 2001 From: Jostafarr Date: Fri, 9 Jul 2021 13:51:27 +0200 Subject: [PATCH 10/73] refines the tablekeyconstraint implementation --- src/parser/bison_parser.cpp | 843 ++++++++++++++++++------------------ src/parser/bison_parser.h | 4 +- src/parser/bison_parser.y | 13 +- src/sql/CreateStatement.h | 6 +- src/sql/statements.cpp | 15 +- 5 files changed, 443 insertions(+), 438 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 34b834fe..3d1985ab 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -375,7 +375,7 @@ union HSQL_STYPE hsql::DatetimeField datetime_field; hsql::LimitDescription* limit; hsql::ColumnDefinition* column_t; - hsql::TableKeyConstraint table_key_constraint_t; + hsql::TableKeyConstraint* table_key_constraint_t; hsql::ColumnType column_type_t; hsql::ImportType import_type_t; hsql::GroupByDescription* group_t; @@ -392,7 +392,7 @@ union HSQL_STYPE std::vector* expr_vec; std::vector* order_vec; std::vector* with_description_vec; - std::vector table_key_constraint_vec; + std::vector* table_key_constraint_vec; #line 398 "bison_parser.cpp" @@ -805,30 +805,30 @@ static const yytype_int16 yyrline[] = 332, 333, 334, 335, 336, 337, 338, 339, 340, 349, 350, 355, 356, 360, 364, 376, 379, 382, 388, 389, 396, 403, 406, 410, 424, 430, 439, 456, 460, 463, - 472, 486, 489, 494, 508, 521, 528, 535, 542, 553, - 554, 558, 559, 563, 569, 570, 571, 572, 573, 574, - 575, 576, 577, 578, 579, 580, 581, 582, 586, 587, - 588, 592, 593, 594, 598, 599, 607, 613, 619, 624, - 632, 633, 642, 651, 664, 671, 682, 683, 693, 702, - 703, 707, 719, 723, 727, 741, 742, 745, 746, 757, - 758, 762, 772, 785, 792, 796, 800, 807, 810, 816, - 828, 829, 833, 837, 838, 842, 847, 848, 852, 857, - 861, 862, 866, 867, 871, 872, 876, 880, 881, 882, - 888, 889, 893, 894, 895, 896, 897, 898, 905, 906, - 910, 911, 915, 916, 920, 930, 931, 932, 933, 934, - 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, - 948, 952, 953, 957, 958, 959, 960, 961, 965, 966, - 967, 968, 969, 970, 971, 972, 973, 974, 975, 979, - 980, 984, 985, 986, 987, 993, 994, 995, 996, 1000, - 1001, 1005, 1006, 1010, 1011, 1012, 1013, 1014, 1015, 1016, - 1020, 1021, 1025, 1029, 1033, 1034, 1035, 1036, 1037, 1038, - 1042, 1046, 1050, 1054, 1055, 1056, 1057, 1061, 1062, 1063, - 1064, 1065, 1069, 1073, 1074, 1078, 1079, 1083, 1087, 1091, - 1103, 1104, 1114, 1115, 1119, 1120, 1129, 1130, 1135, 1146, - 1155, 1156, 1160, 1161, 1165, 1170, 1171, 1176, 1177, 1182, - 1183, 1188, 1189, 1198, 1199, 1203, 1207, 1211, 1218, 1231, - 1239, 1249, 1268, 1269, 1270, 1271, 1272, 1273, 1274, 1275, - 1276, 1277, 1282, 1291, 1292, 1297, 1298 + 472, 486, 489, 494, 508, 521, 529, 536, 543, 554, + 555, 559, 560, 564, 570, 571, 572, 573, 574, 575, + 576, 577, 578, 579, 580, 581, 582, 583, 587, 588, + 589, 593, 594, 595, 599, 600, 608, 614, 620, 625, + 633, 634, 643, 652, 665, 672, 683, 684, 694, 703, + 704, 708, 720, 724, 728, 742, 743, 746, 747, 758, + 759, 763, 773, 786, 793, 797, 801, 808, 811, 817, + 829, 830, 834, 838, 839, 843, 848, 849, 853, 858, + 862, 863, 867, 868, 872, 873, 877, 881, 882, 883, + 889, 890, 894, 895, 896, 897, 898, 899, 906, 907, + 911, 912, 916, 917, 921, 931, 932, 933, 934, 935, + 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, + 949, 953, 954, 958, 959, 960, 961, 962, 966, 967, + 968, 969, 970, 971, 972, 973, 974, 975, 976, 980, + 981, 985, 986, 987, 988, 994, 995, 996, 997, 1001, + 1002, 1006, 1007, 1011, 1012, 1013, 1014, 1015, 1016, 1017, + 1021, 1022, 1026, 1030, 1034, 1035, 1036, 1037, 1038, 1039, + 1043, 1047, 1051, 1055, 1056, 1057, 1058, 1062, 1063, 1064, + 1065, 1066, 1070, 1074, 1075, 1079, 1080, 1084, 1088, 1092, + 1104, 1105, 1115, 1116, 1120, 1121, 1130, 1131, 1136, 1147, + 1156, 1157, 1161, 1162, 1166, 1171, 1172, 1177, 1178, 1183, + 1184, 1189, 1190, 1199, 1200, 1204, 1208, 1212, 1219, 1232, + 1240, 1250, 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1276, + 1277, 1278, 1283, 1292, 1293, 1298, 1299 }; #endif @@ -3321,12 +3321,13 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->schema = (yyvsp[-4].table_name).schema; (yyval.create_stmt)->tableName = (yyvsp[-4].table_name).name; (yyval.create_stmt)->columns = (yyvsp[-2].column_vec); + (yyval.create_stmt)->tableKeyConstraints = (yyvsp[-1].table_key_constraint_vec); } -#line 3326 "bison_parser.cpp" +#line 3327 "bison_parser.cpp" break; case 46: -#line 528 "bison_parser.y" +#line 529 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-3].bval); @@ -3334,11 +3335,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-2].table_name).name; (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3338 "bison_parser.cpp" +#line 3339 "bison_parser.cpp" break; case 47: -#line 535 "bison_parser.y" +#line 536 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateIndex); (yyval.create_stmt)->indexName = (yyvsp[-6].sval); @@ -3346,11 +3347,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->indexColumns = (yyvsp[-1].str_vec); } -#line 3350 "bison_parser.cpp" +#line 3351 "bison_parser.cpp" break; case 48: -#line 542 "bison_parser.y" +#line 543 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateView); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -3359,250 +3360,250 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3363 "bison_parser.cpp" +#line 3364 "bison_parser.cpp" break; case 49: -#line 553 "bison_parser.y" +#line 554 "bison_parser.y" { (yyval.bval) = true; } -#line 3369 "bison_parser.cpp" +#line 3370 "bison_parser.cpp" break; case 50: -#line 554 "bison_parser.y" +#line 555 "bison_parser.y" { (yyval.bval) = false; } -#line 3375 "bison_parser.cpp" +#line 3376 "bison_parser.cpp" break; case 51: -#line 558 "bison_parser.y" +#line 559 "bison_parser.y" { (yyval.column_vec) = new std::vector(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); } -#line 3381 "bison_parser.cpp" +#line 3382 "bison_parser.cpp" break; case 52: -#line 559 "bison_parser.y" +#line 560 "bison_parser.y" { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } -#line 3387 "bison_parser.cpp" +#line 3388 "bison_parser.cpp" break; case 53: -#line 563 "bison_parser.y" +#line 564 "bison_parser.y" { (yyval.column_t) = new ColumnDefinition((yyvsp[-2].sval), (yyvsp[-1].column_type_t), (yyvsp[0].bval)); } -#line 3395 "bison_parser.cpp" +#line 3396 "bison_parser.cpp" break; case 54: -#line 569 "bison_parser.y" +#line 570 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3401 "bison_parser.cpp" +#line 3402 "bison_parser.cpp" break; case 55: -#line 570 "bison_parser.y" +#line 571 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3407 "bison_parser.cpp" +#line 3408 "bison_parser.cpp" break; case 56: -#line 571 "bison_parser.y" +#line 572 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::LONG}; } -#line 3413 "bison_parser.cpp" +#line 3414 "bison_parser.cpp" break; case 57: -#line 572 "bison_parser.y" +#line 573 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3419 "bison_parser.cpp" +#line 3420 "bison_parser.cpp" break; case 58: -#line 573 "bison_parser.y" +#line 574 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3425 "bison_parser.cpp" +#line 3426 "bison_parser.cpp" break; case 59: -#line 574 "bison_parser.y" +#line 575 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } -#line 3431 "bison_parser.cpp" +#line 3432 "bison_parser.cpp" break; case 60: -#line 575 "bison_parser.y" +#line 576 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3437 "bison_parser.cpp" +#line 3438 "bison_parser.cpp" break; case 61: -#line 576 "bison_parser.y" +#line 577 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3443 "bison_parser.cpp" +#line 3444 "bison_parser.cpp" break; case 62: -#line 577 "bison_parser.y" +#line 578 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3449 "bison_parser.cpp" +#line 3450 "bison_parser.cpp" break; case 63: -#line 578 "bison_parser.y" +#line 579 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } -#line 3455 "bison_parser.cpp" +#line 3456 "bison_parser.cpp" break; case 64: -#line 579 "bison_parser.y" +#line 580 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } -#line 3461 "bison_parser.cpp" +#line 3462 "bison_parser.cpp" break; case 65: -#line 580 "bison_parser.y" +#line 581 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TIME}; } -#line 3467 "bison_parser.cpp" +#line 3468 "bison_parser.cpp" break; case 66: -#line 581 "bison_parser.y" +#line 582 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } -#line 3473 "bison_parser.cpp" +#line 3474 "bison_parser.cpp" break; case 67: -#line 582 "bison_parser.y" +#line 583 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATE}; } -#line 3479 "bison_parser.cpp" +#line 3480 "bison_parser.cpp" break; case 68: -#line 586 "bison_parser.y" +#line 587 "bison_parser.y" { (yyval.bval) = true; } -#line 3485 "bison_parser.cpp" +#line 3486 "bison_parser.cpp" break; case 69: -#line 587 "bison_parser.y" +#line 588 "bison_parser.y" { (yyval.bval) = false; } -#line 3491 "bison_parser.cpp" +#line 3492 "bison_parser.cpp" break; case 70: -#line 588 "bison_parser.y" +#line 589 "bison_parser.y" { (yyval.bval) = false; } -#line 3497 "bison_parser.cpp" +#line 3498 "bison_parser.cpp" break; case 71: -#line 592 "bison_parser.y" - {(yyval.table_key_constraint_vec) = new std::vector(); (yyval.table_key_constraint_vec)->push_back((yyvsp[0].table_key_constraint_t)); } -#line 3503 "bison_parser.cpp" +#line 593 "bison_parser.y" + {(yyval.table_key_constraint_vec) = new std::vector(); (yyval.table_key_constraint_vec)->push_back((yyvsp[0].table_key_constraint_t)); } +#line 3504 "bison_parser.cpp" break; case 72: -#line 593 "bison_parser.y" +#line 594 "bison_parser.y" { (yyvsp[-1].table_key_constraint_vec)->push_back((yyvsp[0].table_key_constraint_t)); (yyval.table_key_constraint_vec) = (yyvsp[-1].table_key_constraint_vec); } -#line 3509 "bison_parser.cpp" +#line 3510 "bison_parser.cpp" break; case 73: -#line 594 "bison_parser.y" - {(yyval.table_key_constraint_vec) = new std::vector(); } -#line 3515 "bison_parser.cpp" +#line 595 "bison_parser.y" + {(yyval.table_key_constraint_vec) = new std::vector(); } +#line 3516 "bison_parser.cpp" break; case 74: -#line 598 "bison_parser.y" - { (yyval.table_key_constraint_t) = TableKeyConstraint{KeyType::PRIMARY_KEY, (yyvsp[-1].str_vec)}; } -#line 3521 "bison_parser.cpp" +#line 599 "bison_parser.y" + { (yyval.table_key_constraint_t) = new TableKeyConstraint(KeyType::PRIMARY_KEY, (yyvsp[-1].str_vec)); } +#line 3522 "bison_parser.cpp" break; case 75: -#line 599 "bison_parser.y" - { (yyval.table_key_constraint_t) = TableKeyConstraint{KeyType::UNIQUE, (yyvsp[-1].str_vec)}; } -#line 3527 "bison_parser.cpp" +#line 600 "bison_parser.y" + { (yyval.table_key_constraint_t) = new TableKeyConstraint(KeyType::UNIQUE, (yyvsp[-1].str_vec)); } +#line 3528 "bison_parser.cpp" break; case 76: -#line 607 "bison_parser.y" +#line 608 "bison_parser.y" { (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 3538 "bison_parser.cpp" +#line 3539 "bison_parser.cpp" break; case 77: -#line 613 "bison_parser.y" +#line 614 "bison_parser.y" { (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 3549 "bison_parser.cpp" +#line 3550 "bison_parser.cpp" break; case 78: -#line 619 "bison_parser.y" +#line 620 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); (yyval.drop_stmt)->ifExists = false; (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 3559 "bison_parser.cpp" +#line 3560 "bison_parser.cpp" break; case 79: -#line 624 "bison_parser.y" +#line 625 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropIndex); (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; (yyval.drop_stmt)->index_name = (yyvsp[-2].sval); } -#line 3569 "bison_parser.cpp" +#line 3570 "bison_parser.cpp" break; case 80: -#line 632 "bison_parser.y" +#line 633 "bison_parser.y" { (yyval.bval) = true; } -#line 3575 "bison_parser.cpp" +#line 3576 "bison_parser.cpp" break; case 81: -#line 633 "bison_parser.y" +#line 634 "bison_parser.y" { (yyval.bval) = false; } -#line 3581 "bison_parser.cpp" +#line 3582 "bison_parser.cpp" break; case 82: -#line 642 "bison_parser.y" +#line 643 "bison_parser.y" { (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 3592 "bison_parser.cpp" +#line 3593 "bison_parser.cpp" break; case 83: -#line 651 "bison_parser.y" +#line 652 "bison_parser.y" { (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3602 "bison_parser.cpp" +#line 3603 "bison_parser.cpp" break; case 84: -#line 664 "bison_parser.y" +#line 665 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertValues); (yyval.insert_stmt)->schema = (yyvsp[-5].table_name).schema; @@ -3610,11 +3611,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } -#line 3614 "bison_parser.cpp" +#line 3615 "bison_parser.cpp" break; case 85: -#line 671 "bison_parser.y" +#line 672 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertSelect); (yyval.insert_stmt)->schema = (yyvsp[-2].table_name).schema; @@ -3622,74 +3623,74 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } -#line 3626 "bison_parser.cpp" +#line 3627 "bison_parser.cpp" break; case 86: -#line 682 "bison_parser.y" +#line 683 "bison_parser.y" { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 3632 "bison_parser.cpp" +#line 3633 "bison_parser.cpp" break; case 87: -#line 683 "bison_parser.y" +#line 684 "bison_parser.y" { (yyval.str_vec) = nullptr; } -#line 3638 "bison_parser.cpp" +#line 3639 "bison_parser.cpp" break; case 88: -#line 693 "bison_parser.y" +#line 694 "bison_parser.y" { (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 3649 "bison_parser.cpp" +#line 3650 "bison_parser.cpp" break; case 89: -#line 702 "bison_parser.y" +#line 703 "bison_parser.y" { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 3655 "bison_parser.cpp" +#line 3656 "bison_parser.cpp" break; case 90: -#line 703 "bison_parser.y" +#line 704 "bison_parser.y" { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 3661 "bison_parser.cpp" +#line 3662 "bison_parser.cpp" break; case 91: -#line 707 "bison_parser.y" +#line 708 "bison_parser.y" { (yyval.update_t) = new UpdateClause(); (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 3671 "bison_parser.cpp" +#line 3672 "bison_parser.cpp" break; case 92: -#line 719 "bison_parser.y" +#line 720 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3680 "bison_parser.cpp" +#line 3681 "bison_parser.cpp" break; case 93: -#line 723 "bison_parser.y" +#line 724 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3689 "bison_parser.cpp" +#line 3690 "bison_parser.cpp" break; case 94: -#line 727 "bison_parser.y" +#line 728 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3701,17 +3702,17 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); (yyval.select_stmt)->withDescriptions = (yyvsp[-5].with_description_vec); } -#line 3705 "bison_parser.cpp" +#line 3706 "bison_parser.cpp" break; case 97: -#line 745 "bison_parser.y" +#line 746 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); } -#line 3711 "bison_parser.cpp" +#line 3712 "bison_parser.cpp" break; case 98: -#line 746 "bison_parser.y" +#line 747 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3720,23 +3721,23 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->push_back((yyvsp[-1].set_operator_t)); (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[0].select_stmt); } -#line 3724 "bison_parser.cpp" +#line 3725 "bison_parser.cpp" break; case 99: -#line 757 "bison_parser.y" +#line 758 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3730 "bison_parser.cpp" +#line 3731 "bison_parser.cpp" break; case 100: -#line 758 "bison_parser.y" +#line 759 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3736 "bison_parser.cpp" +#line 3737 "bison_parser.cpp" break; case 101: -#line 762 "bison_parser.y" +#line 763 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); (yyval.select_stmt)->order = (yyvsp[-1].order_vec); @@ -3747,11 +3748,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3751 "bison_parser.cpp" +#line 3752 "bison_parser.cpp" break; case 102: -#line 772 "bison_parser.y" +#line 773 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3762,63 +3763,63 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); } -#line 3766 "bison_parser.cpp" +#line 3767 "bison_parser.cpp" break; case 103: -#line 785 "bison_parser.y" +#line 786 "bison_parser.y" { (yyval.set_operator_t) = (yyvsp[-1].set_operator_t); (yyval.set_operator_t)->isAll = (yyvsp[0].bval); } -#line 3775 "bison_parser.cpp" +#line 3776 "bison_parser.cpp" break; case 104: -#line 792 "bison_parser.y" +#line 793 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetUnion; } -#line 3784 "bison_parser.cpp" +#line 3785 "bison_parser.cpp" break; case 105: -#line 796 "bison_parser.y" +#line 797 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetIntersect; } -#line 3793 "bison_parser.cpp" +#line 3794 "bison_parser.cpp" break; case 106: -#line 800 "bison_parser.y" +#line 801 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetExcept; } -#line 3802 "bison_parser.cpp" +#line 3803 "bison_parser.cpp" break; case 107: -#line 807 "bison_parser.y" +#line 808 "bison_parser.y" { (yyval.bval) = true; } -#line 3810 "bison_parser.cpp" +#line 3811 "bison_parser.cpp" break; case 108: -#line 810 "bison_parser.y" +#line 811 "bison_parser.y" { (yyval.bval) = false; } -#line 3818 "bison_parser.cpp" +#line 3819 "bison_parser.cpp" break; case 109: -#line 816 "bison_parser.y" +#line 817 "bison_parser.y" { (yyval.select_stmt) = new SelectStatement(); (yyval.select_stmt)->limit = (yyvsp[-5].limit); @@ -3828,213 +3829,213 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 3832 "bison_parser.cpp" +#line 3833 "bison_parser.cpp" break; case 110: -#line 828 "bison_parser.y" +#line 829 "bison_parser.y" { (yyval.bval) = true; } -#line 3838 "bison_parser.cpp" +#line 3839 "bison_parser.cpp" break; case 111: -#line 829 "bison_parser.y" +#line 830 "bison_parser.y" { (yyval.bval) = false; } -#line 3844 "bison_parser.cpp" +#line 3845 "bison_parser.cpp" break; case 113: -#line 837 "bison_parser.y" +#line 838 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 3850 "bison_parser.cpp" +#line 3851 "bison_parser.cpp" break; case 114: -#line 838 "bison_parser.y" +#line 839 "bison_parser.y" { (yyval.table) = nullptr; } -#line 3856 "bison_parser.cpp" +#line 3857 "bison_parser.cpp" break; case 115: -#line 842 "bison_parser.y" +#line 843 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 3862 "bison_parser.cpp" +#line 3863 "bison_parser.cpp" break; case 116: -#line 847 "bison_parser.y" +#line 848 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 3868 "bison_parser.cpp" +#line 3869 "bison_parser.cpp" break; case 117: -#line 848 "bison_parser.y" +#line 849 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 3874 "bison_parser.cpp" +#line 3875 "bison_parser.cpp" break; case 118: -#line 852 "bison_parser.y" +#line 853 "bison_parser.y" { (yyval.group_t) = new GroupByDescription(); (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 3884 "bison_parser.cpp" +#line 3885 "bison_parser.cpp" break; case 119: -#line 857 "bison_parser.y" +#line 858 "bison_parser.y" { (yyval.group_t) = nullptr; } -#line 3890 "bison_parser.cpp" +#line 3891 "bison_parser.cpp" break; case 120: -#line 861 "bison_parser.y" +#line 862 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 3896 "bison_parser.cpp" +#line 3897 "bison_parser.cpp" break; case 121: -#line 862 "bison_parser.y" +#line 863 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 3902 "bison_parser.cpp" +#line 3903 "bison_parser.cpp" break; case 122: -#line 866 "bison_parser.y" +#line 867 "bison_parser.y" { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 3908 "bison_parser.cpp" +#line 3909 "bison_parser.cpp" break; case 123: -#line 867 "bison_parser.y" +#line 868 "bison_parser.y" { (yyval.order_vec) = nullptr; } -#line 3914 "bison_parser.cpp" +#line 3915 "bison_parser.cpp" break; case 124: -#line 871 "bison_parser.y" +#line 872 "bison_parser.y" { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 3920 "bison_parser.cpp" +#line 3921 "bison_parser.cpp" break; case 125: -#line 872 "bison_parser.y" +#line 873 "bison_parser.y" { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 3926 "bison_parser.cpp" +#line 3927 "bison_parser.cpp" break; case 126: -#line 876 "bison_parser.y" +#line 877 "bison_parser.y" { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 3932 "bison_parser.cpp" +#line 3933 "bison_parser.cpp" break; case 127: -#line 880 "bison_parser.y" +#line 881 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 3938 "bison_parser.cpp" +#line 3939 "bison_parser.cpp" break; case 128: -#line 881 "bison_parser.y" +#line 882 "bison_parser.y" { (yyval.order_type) = kOrderDesc; } -#line 3944 "bison_parser.cpp" +#line 3945 "bison_parser.cpp" break; case 129: -#line 882 "bison_parser.y" +#line 883 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 3950 "bison_parser.cpp" +#line 3951 "bison_parser.cpp" break; case 130: -#line 888 "bison_parser.y" +#line 889 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 3956 "bison_parser.cpp" +#line 3957 "bison_parser.cpp" break; case 131: -#line 889 "bison_parser.y" +#line 890 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 3962 "bison_parser.cpp" +#line 3963 "bison_parser.cpp" break; case 132: -#line 893 "bison_parser.y" +#line 894 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 3968 "bison_parser.cpp" +#line 3969 "bison_parser.cpp" break; case 133: -#line 894 "bison_parser.y" +#line 895 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 3974 "bison_parser.cpp" +#line 3975 "bison_parser.cpp" break; case 134: -#line 895 "bison_parser.y" +#line 896 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 3980 "bison_parser.cpp" +#line 3981 "bison_parser.cpp" break; case 135: -#line 896 "bison_parser.y" +#line 897 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, nullptr); } -#line 3986 "bison_parser.cpp" +#line 3987 "bison_parser.cpp" break; case 136: -#line 897 "bison_parser.y" +#line 898 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 3992 "bison_parser.cpp" +#line 3993 "bison_parser.cpp" break; case 137: -#line 898 "bison_parser.y" +#line 899 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 3998 "bison_parser.cpp" +#line 3999 "bison_parser.cpp" break; case 138: -#line 905 "bison_parser.y" +#line 906 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4004 "bison_parser.cpp" +#line 4005 "bison_parser.cpp" break; case 139: -#line 906 "bison_parser.y" +#line 907 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4010 "bison_parser.cpp" +#line 4011 "bison_parser.cpp" break; case 140: -#line 910 "bison_parser.y" +#line 911 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[0].expr_vec); } -#line 4016 "bison_parser.cpp" +#line 4017 "bison_parser.cpp" break; case 141: -#line 911 "bison_parser.y" +#line 912 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 4022 "bison_parser.cpp" +#line 4023 "bison_parser.cpp" break; case 142: -#line 915 "bison_parser.y" +#line 916 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4028 "bison_parser.cpp" +#line 4029 "bison_parser.cpp" break; case 143: -#line 916 "bison_parser.y" +#line 917 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4034 "bison_parser.cpp" +#line 4035 "bison_parser.cpp" break; case 144: -#line 920 "bison_parser.y" +#line 921 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); if ((yyvsp[0].alias_t)) { @@ -4042,421 +4043,421 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].alias_t); } } -#line 4046 "bison_parser.cpp" +#line 4047 "bison_parser.cpp" break; case 150: -#line 938 "bison_parser.y" +#line 939 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); } -#line 4052 "bison_parser.cpp" +#line 4053 "bison_parser.cpp" break; case 160: -#line 948 "bison_parser.y" +#line 949 "bison_parser.y" { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 4058 "bison_parser.cpp" +#line 4059 "bison_parser.cpp" break; case 163: -#line 957 "bison_parser.y" +#line 958 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 4064 "bison_parser.cpp" +#line 4065 "bison_parser.cpp" break; case 164: -#line 958 "bison_parser.y" +#line 959 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 4070 "bison_parser.cpp" +#line 4071 "bison_parser.cpp" break; case 165: -#line 959 "bison_parser.y" +#line 960 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 4076 "bison_parser.cpp" +#line 4077 "bison_parser.cpp" break; case 166: -#line 960 "bison_parser.y" +#line 961 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 4082 "bison_parser.cpp" +#line 4083 "bison_parser.cpp" break; case 167: -#line 961 "bison_parser.y" +#line 962 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 4088 "bison_parser.cpp" +#line 4089 "bison_parser.cpp" break; case 169: -#line 966 "bison_parser.y" +#line 967 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 4094 "bison_parser.cpp" +#line 4095 "bison_parser.cpp" break; case 170: -#line 967 "bison_parser.y" +#line 968 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 4100 "bison_parser.cpp" +#line 4101 "bison_parser.cpp" break; case 171: -#line 968 "bison_parser.y" +#line 969 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 4106 "bison_parser.cpp" +#line 4107 "bison_parser.cpp" break; case 172: -#line 969 "bison_parser.y" +#line 970 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 4112 "bison_parser.cpp" +#line 4113 "bison_parser.cpp" break; case 173: -#line 970 "bison_parser.y" +#line 971 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 4118 "bison_parser.cpp" +#line 4119 "bison_parser.cpp" break; case 174: -#line 971 "bison_parser.y" +#line 972 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 4124 "bison_parser.cpp" +#line 4125 "bison_parser.cpp" break; case 175: -#line 972 "bison_parser.y" +#line 973 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 4130 "bison_parser.cpp" +#line 4131 "bison_parser.cpp" break; case 176: -#line 973 "bison_parser.y" +#line 974 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 4136 "bison_parser.cpp" +#line 4137 "bison_parser.cpp" break; case 177: -#line 974 "bison_parser.y" +#line 975 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 4142 "bison_parser.cpp" +#line 4143 "bison_parser.cpp" break; case 178: -#line 975 "bison_parser.y" +#line 976 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 4148 "bison_parser.cpp" +#line 4149 "bison_parser.cpp" break; case 179: -#line 979 "bison_parser.y" +#line 980 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 4154 "bison_parser.cpp" +#line 4155 "bison_parser.cpp" break; case 180: -#line 980 "bison_parser.y" +#line 981 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 4160 "bison_parser.cpp" +#line 4161 "bison_parser.cpp" break; case 181: -#line 984 "bison_parser.y" +#line 985 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 4166 "bison_parser.cpp" +#line 4167 "bison_parser.cpp" break; case 182: -#line 985 "bison_parser.y" +#line 986 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 4172 "bison_parser.cpp" +#line 4173 "bison_parser.cpp" break; case 183: -#line 986 "bison_parser.y" +#line 987 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 4178 "bison_parser.cpp" +#line 4179 "bison_parser.cpp" break; case 184: -#line 987 "bison_parser.y" +#line 988 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 4184 "bison_parser.cpp" +#line 4185 "bison_parser.cpp" break; case 185: -#line 993 "bison_parser.y" +#line 994 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } -#line 4190 "bison_parser.cpp" +#line 4191 "bison_parser.cpp" break; case 186: -#line 994 "bison_parser.y" +#line 995 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4196 "bison_parser.cpp" +#line 4197 "bison_parser.cpp" break; case 187: -#line 995 "bison_parser.y" +#line 996 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } -#line 4202 "bison_parser.cpp" +#line 4203 "bison_parser.cpp" break; case 188: -#line 996 "bison_parser.y" +#line 997 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4208 "bison_parser.cpp" +#line 4209 "bison_parser.cpp" break; case 189: -#line 1000 "bison_parser.y" +#line 1001 "bison_parser.y" { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4214 "bison_parser.cpp" +#line 4215 "bison_parser.cpp" break; case 190: -#line 1001 "bison_parser.y" +#line 1002 "bison_parser.y" { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4220 "bison_parser.cpp" +#line 4221 "bison_parser.cpp" break; case 191: -#line 1005 "bison_parser.y" +#line 1006 "bison_parser.y" { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 4226 "bison_parser.cpp" +#line 4227 "bison_parser.cpp" break; case 192: -#line 1006 "bison_parser.y" +#line 1007 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 4232 "bison_parser.cpp" +#line 4233 "bison_parser.cpp" break; case 193: -#line 1010 "bison_parser.y" +#line 1011 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4238 "bison_parser.cpp" +#line 4239 "bison_parser.cpp" break; case 194: -#line 1011 "bison_parser.y" +#line 1012 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4244 "bison_parser.cpp" +#line 4245 "bison_parser.cpp" break; case 195: -#line 1012 "bison_parser.y" +#line 1013 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 4250 "bison_parser.cpp" +#line 4251 "bison_parser.cpp" break; case 196: -#line 1013 "bison_parser.y" +#line 1014 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 4256 "bison_parser.cpp" +#line 4257 "bison_parser.cpp" break; case 197: -#line 1014 "bison_parser.y" +#line 1015 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 4262 "bison_parser.cpp" +#line 4263 "bison_parser.cpp" break; case 198: -#line 1015 "bison_parser.y" +#line 1016 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 4268 "bison_parser.cpp" +#line 4269 "bison_parser.cpp" break; case 199: -#line 1016 "bison_parser.y" +#line 1017 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 4274 "bison_parser.cpp" +#line 4275 "bison_parser.cpp" break; case 200: -#line 1020 "bison_parser.y" +#line 1021 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 4280 "bison_parser.cpp" +#line 4281 "bison_parser.cpp" break; case 201: -#line 1021 "bison_parser.y" +#line 1022 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 4286 "bison_parser.cpp" +#line 4287 "bison_parser.cpp" break; case 202: -#line 1025 "bison_parser.y" +#line 1026 "bison_parser.y" { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } -#line 4292 "bison_parser.cpp" +#line 4293 "bison_parser.cpp" break; case 203: -#line 1029 "bison_parser.y" +#line 1030 "bison_parser.y" { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } -#line 4298 "bison_parser.cpp" +#line 4299 "bison_parser.cpp" break; case 204: -#line 1033 "bison_parser.y" +#line 1034 "bison_parser.y" { (yyval.datetime_field) = kDatetimeSecond; } -#line 4304 "bison_parser.cpp" +#line 4305 "bison_parser.cpp" break; case 205: -#line 1034 "bison_parser.y" +#line 1035 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMinute; } -#line 4310 "bison_parser.cpp" +#line 4311 "bison_parser.cpp" break; case 206: -#line 1035 "bison_parser.y" +#line 1036 "bison_parser.y" { (yyval.datetime_field) = kDatetimeHour; } -#line 4316 "bison_parser.cpp" +#line 4317 "bison_parser.cpp" break; case 207: -#line 1036 "bison_parser.y" +#line 1037 "bison_parser.y" { (yyval.datetime_field) = kDatetimeDay; } -#line 4322 "bison_parser.cpp" +#line 4323 "bison_parser.cpp" break; case 208: -#line 1037 "bison_parser.y" +#line 1038 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMonth; } -#line 4328 "bison_parser.cpp" +#line 4329 "bison_parser.cpp" break; case 209: -#line 1038 "bison_parser.y" +#line 1039 "bison_parser.y" { (yyval.datetime_field) = kDatetimeYear; } -#line 4334 "bison_parser.cpp" +#line 4335 "bison_parser.cpp" break; case 210: -#line 1042 "bison_parser.y" +#line 1043 "bison_parser.y" { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 4340 "bison_parser.cpp" +#line 4341 "bison_parser.cpp" break; case 211: -#line 1046 "bison_parser.y" +#line 1047 "bison_parser.y" { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 4346 "bison_parser.cpp" +#line 4347 "bison_parser.cpp" break; case 212: -#line 1050 "bison_parser.y" +#line 1051 "bison_parser.y" { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4352 "bison_parser.cpp" +#line 4353 "bison_parser.cpp" break; case 213: -#line 1054 "bison_parser.y" +#line 1055 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 4358 "bison_parser.cpp" +#line 4359 "bison_parser.cpp" break; case 214: -#line 1055 "bison_parser.y" +#line 1056 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 4364 "bison_parser.cpp" +#line 4365 "bison_parser.cpp" break; case 215: -#line 1056 "bison_parser.y" +#line 1057 "bison_parser.y" { (yyval.expr) = Expr::makeStar(); } -#line 4370 "bison_parser.cpp" +#line 4371 "bison_parser.cpp" break; case 216: -#line 1057 "bison_parser.y" +#line 1058 "bison_parser.y" { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 4376 "bison_parser.cpp" +#line 4377 "bison_parser.cpp" break; case 222: -#line 1069 "bison_parser.y" +#line 1070 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 4382 "bison_parser.cpp" +#line 4383 "bison_parser.cpp" break; case 223: -#line 1073 "bison_parser.y" +#line 1074 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(true); } -#line 4388 "bison_parser.cpp" +#line 4389 "bison_parser.cpp" break; case 224: -#line 1074 "bison_parser.y" +#line 1075 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(false); } -#line 4394 "bison_parser.cpp" +#line 4395 "bison_parser.cpp" break; case 225: -#line 1078 "bison_parser.y" +#line 1079 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 4400 "bison_parser.cpp" +#line 4401 "bison_parser.cpp" break; case 227: -#line 1083 "bison_parser.y" +#line 1084 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 4406 "bison_parser.cpp" +#line 4407 "bison_parser.cpp" break; case 228: -#line 1087 "bison_parser.y" +#line 1088 "bison_parser.y" { (yyval.expr) = Expr::makeNullLiteral(); } -#line 4412 "bison_parser.cpp" +#line 4413 "bison_parser.cpp" break; case 229: -#line 1091 "bison_parser.y" +#line 1092 "bison_parser.y" { (yyval.expr) = Expr::makeParameter(yylloc.total_column); (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 4422 "bison_parser.cpp" +#line 4423 "bison_parser.cpp" break; case 231: -#line 1104 "bison_parser.y" +#line 1105 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); auto tbl = new TableRef(kTableCrossProduct); tbl->list = (yyvsp[-2].table_vec); (yyval.table) = tbl; } -#line 4433 "bison_parser.cpp" +#line 4434 "bison_parser.cpp" break; case 235: -#line 1120 "bison_parser.y" +#line 1121 "bison_parser.y" { auto tbl = new TableRef(kTableSelect); tbl->select = (yyvsp[-2].select_stmt); tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4444 "bison_parser.cpp" +#line 4445 "bison_parser.cpp" break; case 236: -#line 1129 "bison_parser.y" +#line 1130 "bison_parser.y" { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 4450 "bison_parser.cpp" +#line 4451 "bison_parser.cpp" break; case 237: -#line 1130 "bison_parser.y" +#line 1131 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 4456 "bison_parser.cpp" +#line 4457 "bison_parser.cpp" break; case 238: -#line 1135 "bison_parser.y" +#line 1136 "bison_parser.y" { auto tbl = new TableRef(kTableName); tbl->schema = (yyvsp[-1].table_name).schema; @@ -4464,121 +4465,121 @@ YYLTYPE yylloc = yyloc_default; tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4468 "bison_parser.cpp" +#line 4469 "bison_parser.cpp" break; case 239: -#line 1146 "bison_parser.y" +#line 1147 "bison_parser.y" { (yyval.table) = new TableRef(kTableName); (yyval.table)->schema = (yyvsp[0].table_name).schema; (yyval.table)->name = (yyvsp[0].table_name).name; } -#line 4478 "bison_parser.cpp" +#line 4479 "bison_parser.cpp" break; case 240: -#line 1155 "bison_parser.y" +#line 1156 "bison_parser.y" { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} -#line 4484 "bison_parser.cpp" +#line 4485 "bison_parser.cpp" break; case 241: -#line 1156 "bison_parser.y" +#line 1157 "bison_parser.y" { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } -#line 4490 "bison_parser.cpp" +#line 4491 "bison_parser.cpp" break; case 242: -#line 1160 "bison_parser.y" +#line 1161 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4496 "bison_parser.cpp" +#line 4497 "bison_parser.cpp" break; case 243: -#line 1161 "bison_parser.y" +#line 1162 "bison_parser.y" { (yyval.sval) = nullptr;} -#line 4502 "bison_parser.cpp" +#line 4503 "bison_parser.cpp" break; case 244: -#line 1165 "bison_parser.y" +#line 1166 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4508 "bison_parser.cpp" +#line 4509 "bison_parser.cpp" break; case 246: -#line 1171 "bison_parser.y" +#line 1172 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } -#line 4514 "bison_parser.cpp" +#line 4515 "bison_parser.cpp" break; case 248: -#line 1177 "bison_parser.y" +#line 1178 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4520 "bison_parser.cpp" +#line 4521 "bison_parser.cpp" break; case 249: -#line 1182 "bison_parser.y" +#line 1183 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4526 "bison_parser.cpp" +#line 4527 "bison_parser.cpp" break; case 250: -#line 1183 "bison_parser.y" +#line 1184 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4532 "bison_parser.cpp" +#line 4533 "bison_parser.cpp" break; case 252: -#line 1189 "bison_parser.y" +#line 1190 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4538 "bison_parser.cpp" +#line 4539 "bison_parser.cpp" break; case 254: -#line 1199 "bison_parser.y" +#line 1200 "bison_parser.y" { (yyval.with_description_vec) = nullptr; } -#line 4544 "bison_parser.cpp" +#line 4545 "bison_parser.cpp" break; case 255: -#line 1203 "bison_parser.y" +#line 1204 "bison_parser.y" { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } -#line 4550 "bison_parser.cpp" +#line 4551 "bison_parser.cpp" break; case 256: -#line 1207 "bison_parser.y" +#line 1208 "bison_parser.y" { (yyval.with_description_vec) = new std::vector(); (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); } -#line 4559 "bison_parser.cpp" +#line 4560 "bison_parser.cpp" break; case 257: -#line 1211 "bison_parser.y" +#line 1212 "bison_parser.y" { (yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t)); (yyval.with_description_vec) = (yyvsp[-2].with_description_vec); } -#line 4568 "bison_parser.cpp" +#line 4569 "bison_parser.cpp" break; case 258: -#line 1218 "bison_parser.y" +#line 1219 "bison_parser.y" { (yyval.with_description_t) = new WithDescription(); (yyval.with_description_t)->alias = (yyvsp[-2].sval); (yyval.with_description_t)->select = (yyvsp[0].select_stmt); } -#line 4578 "bison_parser.cpp" +#line 4579 "bison_parser.cpp" break; case 259: -#line 1232 "bison_parser.y" +#line 1233 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4586,11 +4587,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 4590 "bison_parser.cpp" +#line 4591 "bison_parser.cpp" break; case 260: -#line 1240 "bison_parser.y" +#line 1241 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4599,11 +4600,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 4603 "bison_parser.cpp" +#line 4604 "bison_parser.cpp" break; case 261: -#line 1250 "bison_parser.y" +#line 1251 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4619,83 +4620,83 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } -#line 4623 "bison_parser.cpp" +#line 4624 "bison_parser.cpp" break; case 262: -#line 1268 "bison_parser.y" +#line 1269 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4629 "bison_parser.cpp" +#line 4630 "bison_parser.cpp" break; case 263: -#line 1269 "bison_parser.y" +#line 1270 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4635 "bison_parser.cpp" +#line 4636 "bison_parser.cpp" break; case 264: -#line 1270 "bison_parser.y" +#line 1271 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4641 "bison_parser.cpp" +#line 4642 "bison_parser.cpp" break; case 265: -#line 1271 "bison_parser.y" +#line 1272 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4647 "bison_parser.cpp" +#line 4648 "bison_parser.cpp" break; case 266: -#line 1272 "bison_parser.y" +#line 1273 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4653 "bison_parser.cpp" +#line 4654 "bison_parser.cpp" break; case 267: -#line 1273 "bison_parser.y" +#line 1274 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4659 "bison_parser.cpp" +#line 4660 "bison_parser.cpp" break; case 268: -#line 1274 "bison_parser.y" +#line 1275 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4665 "bison_parser.cpp" +#line 4666 "bison_parser.cpp" break; case 269: -#line 1275 "bison_parser.y" +#line 1276 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4671 "bison_parser.cpp" +#line 4672 "bison_parser.cpp" break; case 270: -#line 1276 "bison_parser.y" +#line 1277 "bison_parser.y" { (yyval.uval) = kJoinCross; } -#line 4677 "bison_parser.cpp" +#line 4678 "bison_parser.cpp" break; case 271: -#line 1277 "bison_parser.y" +#line 1278 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4683 "bison_parser.cpp" +#line 4684 "bison_parser.cpp" break; case 275: -#line 1297 "bison_parser.y" +#line 1298 "bison_parser.y" { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 4689 "bison_parser.cpp" +#line 4690 "bison_parser.cpp" break; case 276: -#line 1298 "bison_parser.y" +#line 1299 "bison_parser.y" { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 4695 "bison_parser.cpp" +#line 4696 "bison_parser.cpp" break; -#line 4699 "bison_parser.cpp" +#line 4700 "bison_parser.cpp" default: break; } @@ -4933,7 +4934,7 @@ YYLTYPE yylloc = yyloc_default; #endif return yyresult; } -#line 1301 "bison_parser.y" +#line 1302 "bison_parser.y" /********************************* ** Section 4: Additional C code diff --git a/src/parser/bison_parser.h b/src/parser/bison_parser.h index 3ac5ff03..4bd97e05 100644 --- a/src/parser/bison_parser.h +++ b/src/parser/bison_parser.h @@ -274,7 +274,7 @@ union HSQL_STYPE hsql::DatetimeField datetime_field; hsql::LimitDescription* limit; hsql::ColumnDefinition* column_t; - hsql::TableKeyConstraint table_key_constraint_t; + hsql::TableKeyConstraint* table_key_constraint_t; hsql::ColumnType column_type_t; hsql::ImportType import_type_t; hsql::GroupByDescription* group_t; @@ -291,7 +291,7 @@ union HSQL_STYPE std::vector* expr_vec; std::vector* order_vec; std::vector* with_description_vec; - std::vector table_key_constraint_vec; + std::vector* table_key_constraint_vec; #line 297 "bison_parser.h" diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index c7d1b10b..8fd082f9 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -122,7 +122,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha hsql::DatetimeField datetime_field; hsql::LimitDescription* limit; hsql::ColumnDefinition* column_t; - hsql::TableKeyConstraint table_key_constraint_t; + hsql::TableKeyConstraint* table_key_constraint_t; hsql::ColumnType column_type_t; hsql::ImportType import_type_t; hsql::GroupByDescription* group_t; @@ -139,7 +139,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha std::vector* expr_vec; std::vector* order_vec; std::vector* with_description_vec; - std::vector table_key_constraint_vec; + std::vector* table_key_constraint_vec; } @@ -524,6 +524,7 @@ create_statement: $$->schema = $4.schema; $$->tableName = $4.name; $$->columns = $6; + $$->tableKeyConstraints = $7; } | CREATE TABLE opt_not_exists table_name AS select_statement { $$ = new CreateStatement(kCreateTable); @@ -589,14 +590,14 @@ opt_column_nullable: ; opt_table_key_constraints: - table_key_constraint {$$ = new std::vector(); $$->push_back($1); } + table_key_constraint {$$ = new std::vector(); $$->push_back($1); } | opt_table_key_constraints table_key_constraint { $1->push_back($2); $$ = $1; } - | /* empty */ {$$ = new std::vector(); } + | /* empty */ {$$ = new std::vector(); } ; table_key_constraint: - ',' PRIMARY KEY '(' ident_commalist ')' { $$ = TableKeyConstraint{KeyType::PRIMARY_KEY, $5}; } - | ',' UNIQUE '(' ident_commalist ')' { $$ = TableKeyConstraint{KeyType::UNIQUE, $4}; } + ',' PRIMARY KEY '(' ident_commalist ')' { $$ = new TableKeyConstraint(KeyType::PRIMARY_KEY, $5); } + | ',' UNIQUE '(' ident_commalist ')' { $$ = new TableKeyConstraint(KeyType::UNIQUE, $4); } /****************************** * Drop Statement * DROP TABLE students; diff --git a/src/sql/CreateStatement.h b/src/sql/CreateStatement.h index 3098f515..983c6fb4 100755 --- a/src/sql/CreateStatement.h +++ b/src/sql/CreateStatement.h @@ -15,12 +15,12 @@ namespace hsql { // Represents definition of a key constraint struct TableKeyConstraint { - TableKeyConstraint(KeyType keyType, std::vector columnNames); + TableKeyConstraint(KeyType keyType, std::vector* columnNames); virtual~TableKeyConstraint(); KeyType type; - std::vector columnNames; + std::vector* columnNames; }; // Represents definition of a table column @@ -54,7 +54,7 @@ namespace hsql { char* indexName; // default: nullptr std::vector* indexColumns; std::vector* columns; // default: nullptr - std::vector* tableKeyConstraints; // default: nullptr + std::vector* tableKeyConstraints; // default: nullptr std::vector* viewColumns; SelectStatement* select; }; diff --git a/src/sql/statements.cpp b/src/sql/statements.cpp index e710800e..e51a9289 100755 --- a/src/sql/statements.cpp +++ b/src/sql/statements.cpp @@ -3,12 +3,15 @@ namespace hsql { // KeyConstraints - TableKeyConstraint::TableKeyConstraint(KeyType keyType, std::vector columnNames) : + TableKeyConstraint::TableKeyConstraint(KeyType keyType, std::vector* columnNames) : type(keyType), columnNames(columnNames) { }; TableKeyConstraint::~TableKeyConstraint() { - free(void *); + for (char* def : *columnNames) { + delete def; + } + delete columnNames; } @@ -87,7 +90,7 @@ namespace hsql { schema(nullptr), tableName(nullptr), columns(nullptr), - keyConstraints(nullptr), + tableKeyConstraints(nullptr), viewColumns(nullptr), select(nullptr) {}; @@ -104,11 +107,11 @@ namespace hsql { delete columns; } - if (keyConstraints != nullptr) { - for (Keyconstraints* def : *keyConstraints) { + if (tableKeyConstraints != nullptr) { + for (TableKeyConstraint* def : *tableKeyConstraints) { delete def; } - delete keyConstraints; + delete tableKeyConstraints; } if (viewColumns != nullptr) { From 63318449fc770ca3107e4fe9f31f14d74ecb3acf Mon Sep 17 00:00:00 2001 From: Jostafarr Date: Fri, 9 Jul 2021 15:11:38 +0200 Subject: [PATCH 11/73] started column constraint implementation --- src/parser/bison_parser.y | 16 ++++++++++++---- src/sql/CreateStatement.h | 9 +++++---- src/sql/statements.cpp | 11 ++++++----- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 8fd082f9..667a7ec0 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -123,6 +123,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha hsql::LimitDescription* limit; hsql::ColumnDefinition* column_t; hsql::TableKeyConstraint* table_key_constraint_t; + hsql::ColumnConstraint column_constraint_t; hsql::ColumnType column_type_t; hsql::ImportType import_type_t; hsql::GroupByDescription* group_t; @@ -228,6 +229,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha %type opt_table_alias table_alias opt_alias alias %type with_description %type set_operator set_type +%type opt_column_constraint // ImportType is used for compatibility reasons %type opt_file_type file_type @@ -561,8 +563,8 @@ column_def_commalist: ; column_def: - IDENTIFIER column_type opt_column_nullable { - $$ = new ColumnDefinition($1, $2, $3); + IDENTIFIER column_type opt_column_nullable opt_column_constraint{ + $$ = new ColumnDefinition($1, $2, $3, $4); } ; @@ -589,6 +591,12 @@ opt_column_nullable: | /* empty */ { $$ = false; } ; +opt_column_constraint: + PRIMARY KEY { $$ = ConstraintType::PRIMARY_KEY } + | UNIQUE { $$ = ConstraintType::UNIQUE } + | /* empty */ { $$ = nullptr } + ; + opt_table_key_constraints: table_key_constraint {$$ = new std::vector(); $$->push_back($1); } | opt_table_key_constraints table_key_constraint { $1->push_back($2); $$ = $1; } @@ -596,8 +604,8 @@ opt_table_key_constraints: ; table_key_constraint: - ',' PRIMARY KEY '(' ident_commalist ')' { $$ = new TableKeyConstraint(KeyType::PRIMARY_KEY, $5); } - | ',' UNIQUE '(' ident_commalist ')' { $$ = new TableKeyConstraint(KeyType::UNIQUE, $4); } + ',' PRIMARY KEY '(' ident_commalist ')' { $$ = new TableKeyConstraint(ConstraintType::PRIMARY_KEY, $5); } + | ',' UNIQUE '(' ident_commalist ')' { $$ = new TableKeyConstraint(ConstraintType::UNIQUE, $4); } /****************************** * Drop Statement * DROP TABLE students; diff --git a/src/sql/CreateStatement.h b/src/sql/CreateStatement.h index 983c6fb4..32e90d54 100755 --- a/src/sql/CreateStatement.h +++ b/src/sql/CreateStatement.h @@ -10,27 +10,28 @@ namespace hsql { struct SelectStatement; - enum struct KeyType {PRIMARY_KEY, UNIQUE}; + enum struct ConstraintType {PRIMARY_KEY, UNIQUE}; // Represents definition of a key constraint struct TableKeyConstraint { - TableKeyConstraint(KeyType keyType, std::vector* columnNames); + TableKeyConstraint(ConstraintType keyType, std::vector* columnNames); virtual~TableKeyConstraint(); - KeyType type; + ConstraintType type; std::vector* columnNames; }; // Represents definition of a table column struct ColumnDefinition { - ColumnDefinition(char* name, ColumnType type, bool nullable); + ColumnDefinition(char* name, ColumnType type, bool nullable, ConstraintType constraintType); virtual~ColumnDefinition(); char* name; ColumnType type; bool nullable; + ConstraintType constraintType; }; enum CreateType { diff --git a/src/sql/statements.cpp b/src/sql/statements.cpp index e51a9289..848cbc55 100755 --- a/src/sql/statements.cpp +++ b/src/sql/statements.cpp @@ -3,9 +3,9 @@ namespace hsql { // KeyConstraints - TableKeyConstraint::TableKeyConstraint(KeyType keyType, std::vector* columnNames) : - type(keyType), - columnNames(columnNames) { }; + TableKeyConstraint::TableKeyConstraint(ConstraintType type, std::vector* columnNames) : + type(type), + columnNames(columnNames) {}; TableKeyConstraint::~TableKeyConstraint() { for (char* def : *columnNames) { @@ -16,10 +16,11 @@ namespace hsql { // ColumnDefinition - ColumnDefinition::ColumnDefinition(char* name, ColumnType type, bool nullable) : + ColumnDefinition::ColumnDefinition(char* name, ColumnType type, bool nullable, ConstraintType constraintType) : name(name), type(type), - nullable(nullable) {}; + nullable(nullable), + constraintType(constraintType) {}; ColumnDefinition::~ColumnDefinition() { free(name); From f8007a752378ae21dc17bd20fb18b35bdcdb4b22 Mon Sep 17 00:00:00 2001 From: Moritz Spranger Date: Tue, 13 Jul 2021 16:39:52 +0200 Subject: [PATCH 12/73] Start implementing Alter Table (Drop Column) --- src/parser/bison_parser.cpp | 2824 ++++++++++++++++++----------------- src/parser/bison_parser.h | 3 +- src/parser/bison_parser.y | 17 + src/sql/AlterStatement.h | 27 + src/sql/statements.cpp | 14 + src/sql/statements.h | 1 + 6 files changed, 1496 insertions(+), 1390 deletions(-) create mode 100755 src/sql/AlterStatement.h diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 4e0aedd2..1ffad7a3 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -331,87 +331,88 @@ enum yysymbol_kind_t YYSYMBOL_opt_column_nullable = 197, /* opt_column_nullable */ YYSYMBOL_drop_statement = 198, /* drop_statement */ YYSYMBOL_opt_exists = 199, /* opt_exists */ - YYSYMBOL_delete_statement = 200, /* delete_statement */ - YYSYMBOL_truncate_statement = 201, /* truncate_statement */ - YYSYMBOL_insert_statement = 202, /* insert_statement */ - YYSYMBOL_opt_column_list = 203, /* opt_column_list */ - YYSYMBOL_update_statement = 204, /* update_statement */ - YYSYMBOL_update_clause_commalist = 205, /* update_clause_commalist */ - YYSYMBOL_update_clause = 206, /* update_clause */ - YYSYMBOL_select_statement = 207, /* select_statement */ - YYSYMBOL_select_within_set_operation = 208, /* select_within_set_operation */ - YYSYMBOL_select_within_set_operation_no_parentheses = 209, /* select_within_set_operation_no_parentheses */ - YYSYMBOL_select_with_paren = 210, /* select_with_paren */ - YYSYMBOL_select_no_paren = 211, /* select_no_paren */ - YYSYMBOL_set_operator = 212, /* set_operator */ - YYSYMBOL_set_type = 213, /* set_type */ - YYSYMBOL_opt_all = 214, /* opt_all */ - YYSYMBOL_select_clause = 215, /* select_clause */ - YYSYMBOL_opt_distinct = 216, /* opt_distinct */ - YYSYMBOL_select_list = 217, /* select_list */ - YYSYMBOL_opt_from_clause = 218, /* opt_from_clause */ - YYSYMBOL_from_clause = 219, /* from_clause */ - YYSYMBOL_opt_where = 220, /* opt_where */ - YYSYMBOL_opt_group = 221, /* opt_group */ - YYSYMBOL_opt_having = 222, /* opt_having */ - YYSYMBOL_opt_order = 223, /* opt_order */ - YYSYMBOL_order_list = 224, /* order_list */ - YYSYMBOL_order_desc = 225, /* order_desc */ - YYSYMBOL_opt_order_type = 226, /* opt_order_type */ - YYSYMBOL_opt_top = 227, /* opt_top */ - YYSYMBOL_opt_limit = 228, /* opt_limit */ - YYSYMBOL_expr_list = 229, /* expr_list */ - YYSYMBOL_opt_literal_list = 230, /* opt_literal_list */ - YYSYMBOL_literal_list = 231, /* literal_list */ - YYSYMBOL_expr_alias = 232, /* expr_alias */ - YYSYMBOL_expr = 233, /* expr */ - YYSYMBOL_operand = 234, /* operand */ - YYSYMBOL_scalar_expr = 235, /* scalar_expr */ - YYSYMBOL_unary_expr = 236, /* unary_expr */ - YYSYMBOL_binary_expr = 237, /* binary_expr */ - YYSYMBOL_logic_expr = 238, /* logic_expr */ - YYSYMBOL_in_expr = 239, /* in_expr */ - YYSYMBOL_case_expr = 240, /* case_expr */ - YYSYMBOL_case_list = 241, /* case_list */ - YYSYMBOL_exists_expr = 242, /* exists_expr */ - YYSYMBOL_comp_expr = 243, /* comp_expr */ - YYSYMBOL_function_expr = 244, /* function_expr */ - YYSYMBOL_extract_expr = 245, /* extract_expr */ - YYSYMBOL_cast_expr = 246, /* cast_expr */ - YYSYMBOL_datetime_field = 247, /* datetime_field */ - YYSYMBOL_array_expr = 248, /* array_expr */ - YYSYMBOL_array_index = 249, /* array_index */ - YYSYMBOL_between_expr = 250, /* between_expr */ - YYSYMBOL_column_name = 251, /* column_name */ - YYSYMBOL_literal = 252, /* literal */ - YYSYMBOL_string_literal = 253, /* string_literal */ - YYSYMBOL_bool_literal = 254, /* bool_literal */ - YYSYMBOL_num_literal = 255, /* num_literal */ - YYSYMBOL_int_literal = 256, /* int_literal */ - YYSYMBOL_null_literal = 257, /* null_literal */ - YYSYMBOL_param_expr = 258, /* param_expr */ - YYSYMBOL_table_ref = 259, /* table_ref */ - YYSYMBOL_table_ref_atomic = 260, /* table_ref_atomic */ - YYSYMBOL_nonjoin_table_ref_atomic = 261, /* nonjoin_table_ref_atomic */ - YYSYMBOL_table_ref_commalist = 262, /* table_ref_commalist */ - YYSYMBOL_table_ref_name = 263, /* table_ref_name */ - YYSYMBOL_table_ref_name_no_alias = 264, /* table_ref_name_no_alias */ - YYSYMBOL_table_name = 265, /* table_name */ - YYSYMBOL_opt_index_name = 266, /* opt_index_name */ - YYSYMBOL_index_name = 267, /* index_name */ - YYSYMBOL_table_alias = 268, /* table_alias */ - YYSYMBOL_opt_table_alias = 269, /* opt_table_alias */ - YYSYMBOL_alias = 270, /* alias */ - YYSYMBOL_opt_alias = 271, /* opt_alias */ - YYSYMBOL_opt_with_clause = 272, /* opt_with_clause */ - YYSYMBOL_with_clause = 273, /* with_clause */ - YYSYMBOL_with_description_list = 274, /* with_description_list */ - YYSYMBOL_with_description = 275, /* with_description */ - YYSYMBOL_join_clause = 276, /* join_clause */ - YYSYMBOL_opt_join_type = 277, /* opt_join_type */ - YYSYMBOL_join_condition = 278, /* join_condition */ - YYSYMBOL_opt_semicolon = 279, /* opt_semicolon */ - YYSYMBOL_ident_commalist = 280 /* ident_commalist */ + YYSYMBOL_alter_statement = 200, /* alter_statement */ + YYSYMBOL_delete_statement = 201, /* delete_statement */ + YYSYMBOL_truncate_statement = 202, /* truncate_statement */ + YYSYMBOL_insert_statement = 203, /* insert_statement */ + YYSYMBOL_opt_column_list = 204, /* opt_column_list */ + YYSYMBOL_update_statement = 205, /* update_statement */ + YYSYMBOL_update_clause_commalist = 206, /* update_clause_commalist */ + YYSYMBOL_update_clause = 207, /* update_clause */ + YYSYMBOL_select_statement = 208, /* select_statement */ + YYSYMBOL_select_within_set_operation = 209, /* select_within_set_operation */ + YYSYMBOL_select_within_set_operation_no_parentheses = 210, /* select_within_set_operation_no_parentheses */ + YYSYMBOL_select_with_paren = 211, /* select_with_paren */ + YYSYMBOL_select_no_paren = 212, /* select_no_paren */ + YYSYMBOL_set_operator = 213, /* set_operator */ + YYSYMBOL_set_type = 214, /* set_type */ + YYSYMBOL_opt_all = 215, /* opt_all */ + YYSYMBOL_select_clause = 216, /* select_clause */ + YYSYMBOL_opt_distinct = 217, /* opt_distinct */ + YYSYMBOL_select_list = 218, /* select_list */ + YYSYMBOL_opt_from_clause = 219, /* opt_from_clause */ + YYSYMBOL_from_clause = 220, /* from_clause */ + YYSYMBOL_opt_where = 221, /* opt_where */ + YYSYMBOL_opt_group = 222, /* opt_group */ + YYSYMBOL_opt_having = 223, /* opt_having */ + YYSYMBOL_opt_order = 224, /* opt_order */ + YYSYMBOL_order_list = 225, /* order_list */ + YYSYMBOL_order_desc = 226, /* order_desc */ + YYSYMBOL_opt_order_type = 227, /* opt_order_type */ + YYSYMBOL_opt_top = 228, /* opt_top */ + YYSYMBOL_opt_limit = 229, /* opt_limit */ + YYSYMBOL_expr_list = 230, /* expr_list */ + YYSYMBOL_opt_literal_list = 231, /* opt_literal_list */ + YYSYMBOL_literal_list = 232, /* literal_list */ + YYSYMBOL_expr_alias = 233, /* expr_alias */ + YYSYMBOL_expr = 234, /* expr */ + YYSYMBOL_operand = 235, /* operand */ + YYSYMBOL_scalar_expr = 236, /* scalar_expr */ + YYSYMBOL_unary_expr = 237, /* unary_expr */ + YYSYMBOL_binary_expr = 238, /* binary_expr */ + YYSYMBOL_logic_expr = 239, /* logic_expr */ + YYSYMBOL_in_expr = 240, /* in_expr */ + YYSYMBOL_case_expr = 241, /* case_expr */ + YYSYMBOL_case_list = 242, /* case_list */ + YYSYMBOL_exists_expr = 243, /* exists_expr */ + YYSYMBOL_comp_expr = 244, /* comp_expr */ + YYSYMBOL_function_expr = 245, /* function_expr */ + YYSYMBOL_extract_expr = 246, /* extract_expr */ + YYSYMBOL_cast_expr = 247, /* cast_expr */ + YYSYMBOL_datetime_field = 248, /* datetime_field */ + YYSYMBOL_array_expr = 249, /* array_expr */ + YYSYMBOL_array_index = 250, /* array_index */ + YYSYMBOL_between_expr = 251, /* between_expr */ + YYSYMBOL_column_name = 252, /* column_name */ + YYSYMBOL_literal = 253, /* literal */ + YYSYMBOL_string_literal = 254, /* string_literal */ + YYSYMBOL_bool_literal = 255, /* bool_literal */ + YYSYMBOL_num_literal = 256, /* num_literal */ + YYSYMBOL_int_literal = 257, /* int_literal */ + YYSYMBOL_null_literal = 258, /* null_literal */ + YYSYMBOL_param_expr = 259, /* param_expr */ + YYSYMBOL_table_ref = 260, /* table_ref */ + YYSYMBOL_table_ref_atomic = 261, /* table_ref_atomic */ + YYSYMBOL_nonjoin_table_ref_atomic = 262, /* nonjoin_table_ref_atomic */ + YYSYMBOL_table_ref_commalist = 263, /* table_ref_commalist */ + YYSYMBOL_table_ref_name = 264, /* table_ref_name */ + YYSYMBOL_table_ref_name_no_alias = 265, /* table_ref_name_no_alias */ + YYSYMBOL_table_name = 266, /* table_name */ + YYSYMBOL_opt_index_name = 267, /* opt_index_name */ + YYSYMBOL_index_name = 268, /* index_name */ + YYSYMBOL_table_alias = 269, /* table_alias */ + YYSYMBOL_opt_table_alias = 270, /* opt_table_alias */ + YYSYMBOL_alias = 271, /* alias */ + YYSYMBOL_opt_alias = 272, /* opt_alias */ + YYSYMBOL_opt_with_clause = 273, /* opt_with_clause */ + YYSYMBOL_with_clause = 274, /* with_clause */ + YYSYMBOL_with_description_list = 275, /* with_description_list */ + YYSYMBOL_with_description = 276, /* with_description */ + YYSYMBOL_join_clause = 277, /* join_clause */ + YYSYMBOL_opt_join_type = 278, /* opt_join_type */ + YYSYMBOL_join_condition = 279, /* join_condition */ + YYSYMBOL_opt_semicolon = 280, /* opt_semicolon */ + YYSYMBOL_ident_commalist = 281 /* ident_commalist */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -734,18 +735,18 @@ union yyalloc #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 64 +#define YYFINAL 67 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 736 +#define YYLAST 842 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 173 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 108 +#define YYNNTS 109 /* YYNRULES -- Number of rules. */ -#define YYNRULES 271 +#define YYNRULES 273 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 501 +#define YYNSTATES 508 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 410 @@ -810,34 +811,34 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 271, 271, 292, 298, 307, 311, 315, 318, 321, - 328, 329, 330, 331, 332, 333, 334, 335, 336, 345, - 346, 351, 352, 356, 360, 372, 375, 378, 384, 385, - 392, 399, 402, 406, 420, 426, 435, 452, 456, 459, - 468, 482, 485, 490, 504, 517, 524, 531, 538, 549, - 550, 554, 555, 559, 565, 566, 567, 568, 569, 570, - 571, 572, 573, 574, 575, 576, 577, 578, 582, 583, - 584, 594, 600, 606, 611, 619, 620, 629, 638, 651, - 658, 669, 670, 680, 689, 690, 694, 706, 710, 714, - 728, 729, 732, 733, 744, 745, 749, 759, 772, 779, - 783, 787, 794, 797, 803, 815, 816, 820, 824, 825, - 829, 834, 835, 839, 844, 848, 849, 853, 854, 858, - 859, 863, 867, 868, 869, 875, 876, 880, 881, 882, - 883, 884, 885, 892, 893, 897, 898, 902, 903, 907, - 917, 918, 919, 920, 921, 925, 926, 927, 928, 929, - 930, 931, 932, 933, 934, 935, 939, 940, 944, 945, - 946, 947, 948, 952, 953, 954, 955, 956, 957, 958, - 959, 960, 961, 962, 966, 967, 971, 972, 973, 974, - 980, 981, 982, 983, 987, 988, 992, 993, 997, 998, - 999, 1000, 1001, 1002, 1003, 1007, 1008, 1012, 1016, 1020, - 1021, 1022, 1023, 1024, 1025, 1029, 1033, 1037, 1041, 1042, - 1043, 1044, 1048, 1049, 1050, 1051, 1052, 1056, 1060, 1061, - 1065, 1066, 1070, 1074, 1078, 1090, 1091, 1101, 1102, 1106, - 1107, 1116, 1117, 1122, 1133, 1142, 1143, 1147, 1148, 1152, - 1157, 1158, 1163, 1164, 1169, 1170, 1175, 1176, 1185, 1186, - 1190, 1194, 1198, 1205, 1218, 1226, 1236, 1255, 1256, 1257, - 1258, 1259, 1260, 1261, 1262, 1263, 1264, 1269, 1278, 1279, - 1284, 1285 + 0, 273, 273, 294, 300, 309, 313, 317, 320, 323, + 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, + 348, 349, 354, 355, 359, 363, 375, 378, 381, 387, + 388, 395, 402, 405, 409, 423, 429, 438, 455, 459, + 462, 471, 485, 488, 493, 507, 520, 527, 534, 541, + 552, 553, 557, 558, 562, 568, 569, 570, 571, 572, + 573, 574, 575, 576, 577, 578, 579, 580, 581, 585, + 586, 587, 597, 603, 609, 614, 622, 623, 632, 646, + 655, 668, 675, 686, 687, 697, 706, 707, 711, 723, + 727, 731, 745, 746, 749, 750, 761, 762, 766, 776, + 789, 796, 800, 804, 811, 814, 820, 832, 833, 837, + 841, 842, 846, 851, 852, 856, 861, 865, 866, 870, + 871, 875, 876, 880, 884, 885, 886, 892, 893, 897, + 898, 899, 900, 901, 902, 909, 910, 914, 915, 919, + 920, 924, 934, 935, 936, 937, 938, 942, 943, 944, + 945, 946, 947, 948, 949, 950, 951, 952, 956, 957, + 961, 962, 963, 964, 965, 969, 970, 971, 972, 973, + 974, 975, 976, 977, 978, 979, 983, 984, 988, 989, + 990, 991, 997, 998, 999, 1000, 1004, 1005, 1009, 1010, + 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1024, 1025, 1029, + 1033, 1037, 1038, 1039, 1040, 1041, 1042, 1046, 1050, 1054, + 1058, 1059, 1060, 1061, 1065, 1066, 1067, 1068, 1069, 1073, + 1077, 1078, 1082, 1083, 1087, 1091, 1095, 1107, 1108, 1118, + 1119, 1123, 1124, 1133, 1134, 1139, 1150, 1159, 1160, 1164, + 1165, 1169, 1174, 1175, 1180, 1181, 1186, 1187, 1192, 1193, + 1202, 1203, 1207, 1211, 1215, 1222, 1235, 1243, 1253, 1272, + 1273, 1274, 1275, 1276, 1277, 1278, 1279, 1280, 1281, 1286, + 1295, 1296, 1301, 1302 }; #endif @@ -883,7 +884,7 @@ static const char *const yytname[] = "file_type", "file_path", "opt_file_type", "export_statement", "show_statement", "create_statement", "opt_not_exists", "column_def_commalist", "column_def", "column_type", - "opt_column_nullable", "drop_statement", "opt_exists", + "opt_column_nullable", "drop_statement", "opt_exists", "alter_statement", "delete_statement", "truncate_statement", "insert_statement", "opt_column_list", "update_statement", "update_clause_commalist", "update_clause", "select_statement", "select_within_set_operation", @@ -940,12 +941,12 @@ static const yytype_int16 yytoknum[] = }; #endif -#define YYPACT_NINF (-379) +#define YYPACT_NINF (-324) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF (-269) +#define YYTABLE_NINF (-271) #define yytable_value_is_error(Yyn) \ ((Yyn) == YYTABLE_NINF) @@ -954,57 +955,57 @@ static const yytype_int16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - 521, 41, 78, 97, 160, 78, 112, 38, 74, 108, - 78, 78, 125, 15, 172, 39, 39, 39, 239, 98, - -379, 159, -379, 159, -379, -379, -379, -379, -379, -379, - -379, -379, -379, -379, -379, -3, -379, 266, 110, -379, - 116, 204, -379, 301, 183, 183, 78, 307, 78, 194, - -379, -55, 314, 201, 201, 78, -379, 209, 161, -379, - -379, -379, -379, -379, -379, 516, -379, 243, -379, -379, - 217, -3, 81, -379, 21, -379, 342, 12, 343, -379, - 183, 226, 78, 78, 275, -379, 256, 210, 358, 394, - 394, -379, 271, 360, 78, 78, -379, 236, 172, -379, - 237, 400, 396, 241, 242, -379, -379, -379, -3, 294, - 286, -3, -14, -379, -379, -379, -379, -379, -379, -379, - -379, 245, 244, -379, -379, -379, -379, -379, -379, -379, - -379, -379, 284, 373, -60, 210, 297, -379, 394, 417, - 42, 274, -57, -379, 312, -379, 312, 78, -379, -379, - -379, -379, -379, 422, -379, -379, 297, -379, -379, 352, - -379, -379, 81, -379, -379, 297, 352, 297, 147, -379, - -379, 12, 78, -379, 428, 321, 430, 310, 63, 269, - 276, 277, 153, 318, 280, 332, -379, 208, 174, 359, - -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, - -379, -379, -379, -379, -379, -379, 344, -379, 35, 279, - -379, 297, 358, -379, 399, -379, -379, -379, 281, 93, - -379, 349, 278, -379, 66, -14, -3, 282, -379, 113, - -14, 174, 401, -27, -379, 283, 362, -379, 395, 158, - -379, 321, 11, 16, 405, 233, 297, 297, 126, 71, - 291, 332, 552, 297, 86, 298, -52, 297, 297, 332, - -379, 332, -18, 300, 0, 332, 332, 332, 332, 332, - 332, 332, 332, 332, 332, 332, 332, 332, 332, 332, - 400, 78, -379, 465, 12, 174, -379, 307, 12, -379, - 422, 10, 275, -379, 297, -379, 467, -379, -379, -379, - -379, 297, -379, -379, -379, -379, 297, 297, 417, 394, - -379, 441, -379, 305, 306, -379, -379, 309, -379, -379, - -379, -379, -379, -379, 195, -379, 430, -379, -379, 297, - -379, -379, 313, -379, -379, -379, -379, -379, -379, 391, - 128, 102, 119, 297, 297, -379, 405, 388, -47, -379, - -379, -379, 375, 495, 571, 332, 328, 208, -379, 393, - 333, 571, 571, 571, 571, 232, 232, 232, 232, 86, - 86, -36, -36, -36, -97, 334, -379, -379, 163, -379, - 185, -379, 321, -379, -5, -379, 331, -379, 23, -379, - 436, -379, -379, -379, 174, 174, 187, -379, 339, 506, - 519, 520, -379, 424, -379, -379, 191, -379, 297, 395, - 297, 297, -379, 127, 131, 361, -379, 332, 571, 208, - 364, 214, -379, -379, -379, -379, 365, 432, -379, -379, - -379, 457, 458, 460, 442, 10, 536, -379, -379, -379, - 416, -379, -379, 538, 374, 378, 381, -379, -379, 55, - 382, 174, 177, -379, 297, -379, 552, 383, 218, -379, - -379, 23, 10, -379, -379, -379, 10, 14, 386, 297, - 390, 548, -379, -379, -379, -379, -379, 174, -379, -379, - -379, -379, 200, 417, -22, -379, 397, 392, 297, 228, - 297, -379, -379, 18, 174, -379, -379, 174, 402, 398, - -379 + 562, 10, 47, 62, 66, 47, -31, -2, 133, 70, + 47, 122, 47, 25, 39, 211, 83, 83, 83, 234, + 76, -324, 136, -324, 136, -324, -324, -324, -324, -324, + -324, -324, -324, -324, -324, -324, -324, -36, -324, 261, + 101, -324, 106, 184, -324, 279, 165, 165, 47, 290, + 47, 183, -324, 47, -49, 304, 199, 199, 47, -324, + 206, 161, -324, -324, -324, -324, -324, -324, 463, -324, + 235, -324, -324, 210, -36, 31, -324, 26, -324, 331, + 18, 338, -324, 165, 215, 47, 47, 268, -324, 251, + 185, 348, 265, 349, 349, -324, 227, 314, 47, 47, + -324, 194, 211, -324, 197, 359, 355, 200, 201, -324, + -324, -324, -36, 258, 247, -36, 108, -324, -324, -324, + -324, -324, -324, -324, -324, 205, 207, -324, -324, -324, + -324, -324, -324, -324, -324, -324, 244, 337, -64, 185, + 263, -324, 349, 373, 167, 236, -55, -324, 347, 276, + -324, 276, 47, -324, -324, -324, -324, -324, 385, -324, + -324, 263, -324, -324, 313, -324, -324, 31, -324, -324, + 263, 313, 263, 152, -324, -324, 18, 47, -324, 388, + 281, 390, 270, -40, 228, 230, 231, 203, 334, 237, + 404, -324, 257, -68, 431, -324, -324, -324, -324, -324, + -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, + -324, 306, -324, -54, 245, -324, 263, 348, -324, 13, + 353, -324, -324, -324, 246, -3, -324, 311, 240, -324, + 71, 108, -36, 243, -324, -47, 108, -68, 365, -26, + -324, 248, 328, -324, 724, 86, -324, 281, 14, 16, + 368, 160, 263, 263, -69, 109, 259, 404, 495, 263, + 79, 260, -50, 263, 263, 404, -324, 404, 64, 264, + 5, 404, 404, 404, 404, 404, 404, 404, 404, 404, + 404, 404, 404, 404, 404, 404, 359, 47, -324, 430, + 18, -68, -324, 267, -324, 290, 18, -324, 385, 12, + 268, -324, 263, -324, 437, -324, -324, -324, -324, 263, + -324, -324, -324, -324, 263, 263, 373, 349, -324, 411, + -324, 277, 278, -324, -324, 280, -324, -324, -324, -324, + -324, -324, 67, -324, 390, -324, -324, 263, -324, -324, + 266, -324, -324, -324, -324, -324, -324, 350, 72, -22, + 113, 263, 263, -324, 368, 346, 87, -324, -324, -324, + 335, 563, 582, 404, 285, 257, -324, 354, 288, 582, + 582, 582, 582, 618, 618, 618, 618, 79, 79, 29, + 29, 29, -37, 292, -324, -324, 88, -324, 103, -324, + 281, -324, -5, -324, 291, -324, 28, -324, 387, -324, + -324, -324, -68, -68, 112, -324, 294, 453, 458, 459, + -324, 363, -324, -324, 118, -324, 263, 724, 263, 263, + -324, 102, 74, 300, -324, 404, 582, 257, 301, 147, + -324, -324, -324, -324, 303, 374, -324, -324, -324, 396, + 397, 398, 381, 12, 477, -324, -324, -324, 356, -324, + -324, 476, 312, 318, 319, -324, -324, -35, 322, -68, + 121, -324, 263, -324, 495, 324, 149, -324, -324, 28, + 12, -324, -324, -324, 12, 250, 329, 263, 327, 491, + -324, -324, -324, -324, -324, -68, -324, -324, -324, -324, + 361, 373, -12, -324, 330, 333, 263, 158, 263, -324, + -324, 13, -68, -324, -324, -68, 336, -324 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -1012,89 +1013,89 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_int16 yydefact[] = { - 249, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 29, 29, 29, 0, 269, - 3, 20, 18, 20, 17, 8, 9, 7, 11, 16, - 13, 14, 12, 15, 10, 0, 248, 0, 235, 78, - 32, 0, 43, 238, 50, 50, 0, 0, 0, 0, - 234, 0, 0, 76, 76, 0, 41, 0, 250, 251, - 28, 25, 27, 26, 1, 249, 2, 0, 6, 5, - 126, 0, 87, 88, 118, 73, 0, 136, 0, 237, - 50, 0, 0, 0, 112, 36, 0, 82, 0, 0, - 0, 239, 0, 0, 0, 0, 42, 0, 0, 4, - 0, 0, 106, 0, 0, 100, 101, 99, 0, 103, - 0, 0, 132, 236, 217, 220, 222, 223, 218, 219, - 224, 0, 135, 137, 212, 213, 214, 221, 215, 216, - 31, 30, 0, 0, 0, 82, 0, 77, 0, 0, - 0, 0, 112, 84, 39, 37, 39, 0, 75, 71, - 72, 253, 252, 0, 125, 105, 0, 95, 94, 118, - 91, 90, 92, 102, 98, 0, 118, 0, 0, 96, - 33, 0, 0, 49, 0, 249, 0, 0, 208, 0, - 0, 0, 0, 0, 0, 0, 210, 0, 111, 140, - 147, 148, 149, 142, 144, 150, 143, 163, 151, 152, - 153, 154, 146, 141, 156, 157, 0, 270, 0, 0, - 80, 0, 0, 83, 0, 35, 40, 74, 23, 0, - 21, 109, 107, 133, 247, 132, 0, 117, 119, 124, - 132, 128, 130, 127, 138, 0, 0, 46, 0, 0, - 51, 249, 106, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 159, 0, 158, 0, 0, 0, 0, 0, - 160, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 251, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 30, 30, 30, 0, + 271, 3, 21, 19, 21, 18, 8, 9, 7, 11, + 16, 17, 13, 14, 12, 15, 10, 0, 250, 0, + 237, 80, 33, 0, 44, 240, 51, 51, 0, 0, + 0, 0, 236, 0, 0, 0, 77, 77, 0, 42, + 0, 252, 253, 29, 26, 28, 27, 1, 251, 2, + 0, 6, 5, 128, 0, 89, 90, 120, 74, 0, + 138, 0, 239, 51, 0, 0, 0, 114, 37, 0, + 84, 0, 0, 0, 0, 241, 0, 0, 0, 0, + 43, 0, 0, 4, 0, 0, 108, 0, 0, 102, + 103, 101, 0, 105, 0, 0, 134, 238, 219, 222, + 224, 225, 220, 221, 226, 0, 137, 139, 214, 215, + 216, 223, 217, 218, 32, 31, 0, 0, 0, 84, + 0, 79, 0, 0, 0, 0, 114, 86, 0, 40, + 38, 40, 0, 76, 72, 73, 255, 254, 0, 127, + 107, 0, 97, 96, 120, 93, 92, 94, 104, 100, + 0, 120, 0, 0, 98, 34, 0, 0, 50, 0, + 251, 0, 0, 210, 0, 0, 0, 0, 0, 0, + 0, 212, 0, 113, 142, 149, 150, 151, 144, 146, + 152, 145, 165, 153, 154, 155, 156, 148, 143, 158, + 159, 0, 272, 0, 0, 82, 0, 0, 85, 0, + 0, 36, 41, 75, 24, 0, 22, 111, 109, 135, + 249, 134, 0, 119, 121, 126, 134, 130, 132, 129, + 140, 0, 0, 47, 0, 0, 52, 251, 108, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 161, 0, + 160, 0, 0, 0, 0, 0, 162, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 81, 0, 0, 86, 85, 0, 0, 19, - 0, 0, 112, 108, 0, 245, 0, 246, 139, 89, - 93, 0, 123, 122, 121, 97, 0, 0, 0, 0, - 55, 0, 60, 0, 0, 59, 57, 0, 67, 66, - 56, 64, 65, 54, 70, 45, 0, 48, 195, 0, - 209, 211, 0, 199, 200, 201, 202, 203, 204, 0, - 0, 0, 0, 0, 0, 182, 0, 0, 0, 155, - 145, 174, 175, 0, 170, 0, 0, 0, 161, 0, - 173, 172, 188, 189, 190, 191, 192, 193, 194, 165, - 164, 167, 166, 168, 169, 0, 34, 271, 0, 38, - 0, 22, 249, 110, 225, 227, 0, 229, 243, 228, - 114, 134, 244, 120, 131, 129, 0, 44, 0, 0, - 0, 0, 68, 0, 53, 52, 0, 186, 0, 0, - 0, 0, 180, 0, 0, 0, 205, 0, 171, 0, - 0, 0, 162, 206, 79, 24, 0, 0, 265, 257, - 263, 261, 264, 259, 0, 0, 0, 242, 233, 240, - 0, 104, 47, 0, 0, 0, 0, 69, 196, 0, - 0, 184, 0, 183, 0, 187, 207, 0, 0, 178, - 176, 243, 0, 260, 262, 258, 0, 226, 244, 0, - 0, 0, 61, 63, 197, 198, 181, 185, 179, 177, - 230, 254, 266, 0, 116, 62, 0, 0, 0, 0, - 0, 113, 58, 0, 267, 255, 241, 115, 208, 0, - 256 + 0, 0, 0, 0, 0, 0, 0, 0, 83, 0, + 0, 88, 87, 210, 78, 0, 0, 20, 0, 0, + 114, 110, 0, 247, 0, 248, 141, 91, 95, 0, + 125, 124, 123, 99, 0, 0, 0, 0, 56, 0, + 61, 0, 0, 60, 58, 0, 68, 67, 57, 65, + 66, 55, 71, 46, 0, 49, 197, 0, 211, 213, + 0, 201, 202, 203, 204, 205, 206, 0, 0, 0, + 0, 0, 0, 184, 0, 0, 0, 157, 147, 176, + 177, 0, 172, 0, 0, 0, 163, 0, 175, 174, + 190, 191, 192, 193, 194, 195, 196, 167, 166, 169, + 168, 170, 171, 0, 35, 273, 0, 39, 0, 23, + 251, 112, 227, 229, 0, 231, 245, 230, 116, 136, + 246, 122, 133, 131, 0, 45, 0, 0, 0, 0, + 69, 0, 54, 53, 0, 188, 0, 0, 0, 0, + 182, 0, 0, 0, 207, 0, 173, 0, 0, 0, + 164, 208, 81, 25, 0, 0, 267, 259, 265, 263, + 266, 261, 0, 0, 0, 244, 235, 242, 0, 106, + 48, 0, 0, 0, 0, 70, 198, 0, 0, 186, + 0, 185, 0, 189, 209, 0, 0, 180, 178, 245, + 0, 262, 264, 260, 0, 228, 246, 0, 0, 0, + 62, 64, 199, 200, 183, 187, 181, 179, 232, 256, + 268, 0, 118, 63, 0, 0, 0, 0, 0, 115, + 59, 0, 269, 257, 243, 117, 0, 258 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -379, -379, -379, 497, -379, 540, -379, 285, -379, 27, - -379, -379, -379, -379, 287, -83, 418, -379, -379, -379, - -9, -379, 250, 168, -379, -379, 515, -379, -379, -379, - 435, -379, -379, 367, -165, -96, -379, -11, -70, -39, - -379, -379, -66, 338, -379, -379, -379, -120, -379, -379, - -118, -379, 288, -379, -379, -29, -251, -379, -225, 290, - -136, -133, -379, -379, -379, -379, -379, -379, 337, -379, - -379, -379, -379, -379, -379, -379, -379, -379, 88, -69, - -85, -379, -379, -92, -379, -379, -379, -378, 120, -379, - -379, -379, 1, -379, -379, -379, 129, 363, -379, -379, - -379, -379, 488, -379, -379, -379, -379, -294 + -324, -324, -324, 440, -324, 481, -324, 212, -324, 166, + -324, -324, -324, -324, 214, -85, 360, -324, -324, -324, + 43, -324, 178, 96, -324, -324, 460, -324, -324, -324, + -324, 377, -324, -324, 302, -170, -97, -324, 6, -73, + -52, -324, -324, -78, 272, -324, -324, -324, -129, -324, + -324, 46, -324, 209, -324, -324, 7, -255, -324, -45, + 219, -140, -135, -324, -324, -324, -324, -324, -324, 269, + -324, -324, -324, -324, -324, -324, -324, -324, -324, -217, + -75, -86, -324, -324, -93, -324, -324, -324, -323, 52, + -324, -324, -324, 1, -324, -324, -324, 57, 297, -324, + -324, -324, -324, 427, -324, -324, -324, -324, -302 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - 0, 18, 19, 20, 21, 68, 219, 220, 22, 61, - 23, 131, 24, 25, 86, 144, 215, 26, 27, 28, - 82, 239, 240, 324, 404, 29, 94, 30, 31, 32, - 140, 33, 142, 143, 34, 159, 160, 161, 73, 108, - 109, 164, 74, 156, 221, 292, 293, 137, 441, 491, - 112, 227, 228, 304, 102, 169, 222, 121, 122, 223, - 224, 189, 190, 191, 192, 193, 194, 195, 249, 196, - 197, 198, 199, 200, 339, 201, 202, 203, 204, 205, - 124, 125, 126, 127, 128, 129, 383, 384, 385, 386, - 387, 49, 388, 80, 92, 437, 438, 439, 298, 35, - 36, 58, 59, 389, 434, 495, 66, 208 + 0, 19, 20, 21, 22, 71, 225, 226, 23, 64, + 24, 135, 25, 26, 89, 149, 221, 27, 28, 29, + 85, 245, 246, 332, 412, 30, 98, 31, 32, 33, + 34, 144, 35, 146, 147, 36, 164, 165, 166, 76, + 112, 113, 169, 77, 161, 227, 300, 301, 141, 449, + 499, 116, 233, 234, 312, 106, 174, 228, 125, 126, + 229, 230, 194, 195, 196, 197, 198, 199, 200, 255, + 201, 202, 203, 204, 205, 347, 206, 207, 208, 209, + 210, 128, 129, 130, 131, 132, 133, 391, 392, 393, + 394, 395, 51, 396, 83, 96, 445, 446, 447, 306, + 37, 38, 61, 62, 397, 442, 503, 69, 213 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1102,158 +1103,180 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 188, 104, 348, 39, 145, 145, 42, 146, 123, 154, - 237, 50, 51, 38, 396, 166, 114, 115, 116, 330, - 427, 498, 213, 155, 72, 136, 295, 307, 490, 229, - 105, 231, 233, 174, 55, 111, 83, 265, 89, 427, - 167, 225, 162, 62, 63, 162, 248, 84, 230, 87, - 252, 256, 254, 145, 70, 206, 96, 467, 168, 378, - 103, 428, 257, 380, 175, 106, 429, 37, 280, 295, - 210, 132, 430, 431, 56, 285, 327, 90, 406, 258, - 428, 38, 355, 134, 135, 429, 151, 257, 482, 432, - 105, 430, 431, -266, 433, 149, 150, 110, 265, 70, - 40, 107, 234, 358, 258, 209, 421, 176, 432, 356, - 340, 341, -266, 433, 212, 117, 350, 255, 252, 416, - 359, 351, 352, 226, 294, 106, 353, 279, 354, 280, - 300, 46, 360, 361, 362, 363, 364, 365, 366, 367, - 368, 369, 370, 371, 372, 373, 374, 436, 217, 294, - 178, 114, 115, 116, 118, 119, 178, 114, 115, 116, - 162, 107, 343, 41, 71, 229, -231, 47, 458, 257, - 394, 395, 390, 235, 332, 57, 331, 382, 186, 328, - 257, 344, 43, 60, 120, -232, 258, 345, 375, 489, - 296, 44, 179, 180, 181, 52, 299, 258, 179, 180, - 181, 305, 302, 282, 53, 48, 283, 413, 414, 410, - 411, 178, 114, 115, 116, 123, 257, 426, 484, 123, - 265, 45, 418, 474, 145, 427, 397, 257, 303, 344, - 242, 182, 243, 258, 54, 412, 247, 182, 454, 64, - 257, 257, 257, 453, 258, 257, 276, 277, 278, 279, - 117, 280, 409, 179, 180, 181, 117, 258, 258, 258, - 232, 289, 258, 247, 290, 70, 428, 183, 65, 75, - 67, 429, 449, 183, 451, 452, 415, 430, 431, 76, - 184, 487, 376, 77, 456, 260, 184, 420, 257, 118, - 119, 257, 182, 476, 432, 118, 119, 78, 402, 433, - 178, 114, 115, 116, 79, 258, 185, 186, 258, 81, - 85, 117, 185, 186, 187, 403, 88, 91, 477, 120, - 187, 178, 114, 115, 116, 120, 325, 93, 183, 326, - 488, 424, 98, 97, 171, 178, 114, 115, 116, 100, - 101, 184, 179, 180, 181, 113, 133, 130, 138, 457, - 118, 119, 494, 425, 497, 442, 171, 136, 283, 448, - 264, 141, 294, 250, 180, 181, 265, 185, 186, 333, - 334, 335, 336, 337, 338, 187, 259, 139, 180, 181, - 120, 182, 460, -269, -269, 294, 479, -269, -269, 294, - 274, 275, 276, 277, 278, 279, 496, 280, 114, 283, - 117, 147, 182, 71, 153, 148, 116, 163, 155, 157, - 158, 165, 260, 170, 172, 171, 182, 183, 173, 310, - 207, 117, 211, 214, 311, 218, 312, 313, 110, 314, - 184, 236, 14, 238, 241, 117, 244, 315, 251, 118, - 119, 281, 291, 245, 246, 253, 284, 287, 288, 294, - 308, 184, 251, 301, 309, 306, 185, 186, 346, 261, - 118, 119, 70, 316, 187, 184, 349, 357, 377, 120, - 392, 398, 399, 400, 118, 119, 401, 185, 186, 262, - 317, 407, 318, 319, 408, 187, 263, 264, 355, 257, - 120, 185, 186, 265, 266, 419, 422, 320, 280, 187, - 423, 321, 435, 322, 120, 440, 443, 267, 268, 269, - 270, 271, 444, 323, 272, 273, -268, 274, 275, 276, - 277, 278, 279, 1, 280, 445, 446, 447, 1, 455, - 462, 2, 459, 461, 463, 464, 2, 465, 3, 468, - 466, 469, 4, 3, 470, 471, 472, 4, 260, 473, - 475, 478, 5, 483, 486, 6, 7, 5, 485, 493, - 6, 7, 99, 69, 216, 492, 500, 8, 9, 95, - 177, 243, 8, 9, 379, 381, 405, 450, 10, 286, - 329, 499, 481, 10, 391, 342, 152, 297, 0, 393, - 480, 0, 0, 0, 0, 261, 0, 0, 0, 0, - 0, 0, 11, 0, 0, 260, 12, 11, 0, 417, - 0, 12, 0, 0, 0, 347, 0, 0, 0, 0, - 0, 13, 0, 264, 260, 0, 13, 14, 0, 265, - 266, 0, 14, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 267, 268, 269, 270, 271, 0, 0, - 272, 273, 261, 274, 275, 276, 277, 278, 279, 0, - 280, 15, 16, 17, 0, 0, 15, 16, 17, 0, - 0, -269, 347, 0, 0, 0, 0, 0, 0, 0, - 264, 0, 0, 0, 0, 0, 265, 266, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 264, - 267, 268, 269, 270, 271, 265, -269, 272, 273, 0, - 274, 275, 276, 277, 278, 279, 0, 280, 0, -269, - -269, -269, 270, 271, 0, 0, 272, 273, 0, 274, - 275, 276, 277, 278, 279, 0, 280 + 193, 108, 294, 41, 356, 127, 44, 150, 150, 151, + 243, 52, 159, 54, 404, 40, 293, 218, 171, 338, + 435, 73, 118, 119, 120, 115, 160, 140, 315, 179, + 235, 303, 237, 239, 167, 109, 39, 167, 498, 45, + 109, 253, 310, 75, 93, 263, 263, 254, 46, 87, + 40, 90, 262, 258, 92, 260, 150, 211, 58, 100, + 180, 436, 264, 264, 263, 42, 437, 263, 311, 43, + 110, 215, 438, 439, 303, 110, 291, 335, 47, 263, + 107, 264, 414, 94, 264, 418, 138, 139, 263, 440, + 86, 48, 263, -268, 441, 55, 264, 271, 59, 154, + 155, 240, 114, 181, 56, 264, 111, 156, 366, 264, + 429, 111, 348, 349, 288, 232, 217, 289, 358, 261, + 475, 121, 258, 359, 360, 367, 136, 248, 286, 249, + 361, 74, 362, 482, 57, 308, 368, 369, 370, 371, + 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, + 382, 490, 444, 223, 167, 183, 118, 119, 120, 302, + 122, 123, 172, 271, 363, 297, -233, 50, 298, 235, + 410, 398, 466, 191, 402, 403, 339, 340, 241, 390, + 173, 462, 336, 65, 66, 263, 263, 411, 263, 497, + 124, 364, 285, 383, 286, 304, 417, 184, 185, 186, + 351, 53, 264, 264, 419, 264, 183, 118, 119, 120, + 231, 421, 422, 271, 60, 127, 263, 236, 461, 352, + 434, 127, 492, 352, 73, 353, 49, 63, 426, 420, + 214, 150, 405, 264, 67, 263, 187, 484, 307, 282, + 283, 284, 285, 313, 286, 386, 68, 70, 184, 185, + 186, 388, 264, 424, 333, 121, 432, 334, 302, 176, + 183, 118, 119, 120, 78, 238, 183, 118, 119, 120, + 79, 433, 188, 80, 176, 435, 457, 81, 459, 460, + 450, 423, 82, 289, 506, 189, 456, 187, 384, 302, + 464, 84, 428, 88, 122, 123, 341, 342, 343, 344, + 345, 346, 184, 185, 186, 91, 121, 95, 184, 185, + 186, 190, 191, 253, 73, 468, 436, 487, 302, 192, + 302, 437, 485, 188, 124, 97, 504, 438, 439, 289, + 101, 104, 102, 105, 117, 137, 189, 183, 118, 119, + 120, 187, 134, 142, 440, 122, 123, 187, -268, 441, + 140, 145, 143, 118, 465, 148, 502, 152, 505, 153, + 121, 74, 190, 191, 158, 120, 121, 160, 162, 163, + 192, 168, 170, 175, 177, 124, 212, 188, 176, 256, + 185, 186, 178, 188, 216, 219, 435, 220, 224, 114, + 189, 242, 15, 244, 247, 250, 189, 251, 252, 122, + 123, 295, 259, 287, 299, 122, 123, 183, 118, 119, + 120, 302, 290, 296, 309, 316, 190, 191, 187, 314, + 317, -234, 190, 191, 192, 73, 354, 436, 357, 124, + 192, 365, 437, 385, 415, 124, 249, 121, 438, 439, + 400, 406, 495, 416, 407, 408, 363, 409, 265, 263, + 185, 186, 427, 286, 257, 440, 448, 430, 431, 452, + 441, 451, 443, -270, 453, 454, 455, 189, 463, 467, + 1, 469, 470, 471, 472, 473, 122, 123, 2, 474, + 476, 477, 478, 479, 266, 3, 480, 481, 187, 4, + 483, 496, 486, 190, 191, 493, 491, 494, 500, 5, + 501, 192, 6, 7, 507, 72, 124, 121, 103, 387, + 389, 222, 413, 458, 8, 9, 182, 99, 401, 292, + 337, 399, 489, 350, 257, 10, 488, 305, 11, 157, + 0, 267, 0, 0, 0, 0, 0, 189, 0, 0, + 0, 0, 0, 0, 0, 0, 122, 123, 266, 12, + 0, 268, 0, 13, 0, 0, 0, 0, 269, 270, + 0, 0, 0, 190, 191, 271, 272, 0, 14, 1, + 0, 192, 0, 0, 15, 0, 124, 2, 0, 273, + 274, 275, 276, 277, 3, 0, 278, 279, 4, 280, + 281, 282, 283, 284, 285, 267, 286, 0, 5, 0, + 0, 6, 7, 0, 0, 0, 0, 0, 16, 17, + 18, 0, 0, 8, 9, 355, 266, 0, 0, 0, + 0, 0, 0, 270, 10, 0, 0, 11, 0, 271, + 272, 0, 0, 0, 0, 266, 0, 0, 0, 0, + 0, 0, 0, 273, 274, 275, 276, 277, 12, 0, + 278, 279, 13, 280, 281, 282, 283, 284, 285, 0, + 286, 0, 0, 267, 0, 0, 0, 14, 0, 0, + 0, 266, 0, 15, 0, 0, 0, 425, 0, 0, + 0, 0, -271, 355, 0, 0, 0, 0, 0, 0, + 0, 270, 0, 0, 0, 0, 0, 271, 272, 0, + 0, 0, 0, 0, 0, 0, 0, 16, 17, 18, + 270, 273, 274, 275, 276, 277, 271, -271, 278, 279, + 0, 280, 281, 282, 283, 284, 285, 0, 286, 0, + -271, -271, -271, 276, 277, 0, 0, 278, 279, 0, + 280, 281, 282, 283, 284, 285, 270, 286, 318, 0, + 0, 0, 271, 319, 0, 320, 321, 0, 322, 0, + 0, 0, 0, 0, 0, 0, 323, 0, 0, -271, + -271, 0, 0, -271, -271, 0, 280, 281, 282, 283, + 284, 285, 0, 286, 0, 0, 0, 0, 0, 0, + 0, 0, 324, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 325, + 0, 326, 327, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 328, 0, 0, 0, + 329, 0, 330, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 331 }; static const yytype_int16 yycheck[] = { - 136, 71, 253, 2, 89, 90, 5, 90, 77, 101, - 175, 10, 11, 3, 308, 111, 4, 5, 6, 3, - 25, 3, 142, 12, 35, 82, 3, 54, 50, 165, - 9, 167, 168, 93, 19, 74, 45, 134, 93, 25, - 54, 159, 108, 16, 17, 111, 182, 46, 166, 48, - 183, 187, 185, 138, 57, 138, 55, 435, 72, 284, - 71, 66, 114, 288, 124, 44, 71, 26, 165, 3, - 140, 80, 77, 78, 59, 211, 241, 132, 329, 131, - 66, 3, 100, 82, 83, 71, 97, 114, 466, 94, - 9, 77, 78, 98, 99, 94, 95, 76, 134, 57, - 3, 80, 171, 103, 131, 63, 357, 167, 94, 127, - 246, 247, 98, 99, 171, 103, 168, 187, 251, 166, - 120, 257, 258, 162, 171, 44, 259, 163, 261, 165, - 226, 93, 265, 266, 267, 268, 269, 270, 271, 272, - 273, 274, 275, 276, 277, 278, 279, 124, 147, 171, - 3, 4, 5, 6, 142, 143, 3, 4, 5, 6, - 226, 80, 91, 3, 167, 301, 171, 93, 419, 114, - 306, 307, 292, 172, 244, 3, 160, 167, 160, 168, - 114, 110, 70, 144, 172, 171, 131, 116, 280, 483, - 124, 79, 45, 46, 47, 70, 225, 131, 45, 46, - 47, 230, 89, 168, 79, 97, 171, 343, 344, 107, - 91, 3, 4, 5, 6, 284, 114, 382, 469, 288, - 134, 109, 355, 168, 309, 25, 309, 114, 115, 110, - 167, 84, 169, 131, 109, 116, 110, 84, 107, 0, - 114, 114, 114, 116, 131, 114, 160, 161, 162, 163, - 103, 165, 124, 45, 46, 47, 103, 131, 131, 131, - 113, 168, 131, 110, 171, 57, 66, 120, 170, 3, - 111, 71, 408, 120, 410, 411, 346, 77, 78, 169, - 133, 81, 281, 167, 417, 53, 133, 357, 114, 142, - 143, 114, 84, 116, 94, 142, 143, 93, 103, 99, - 3, 4, 5, 6, 3, 131, 159, 160, 131, 126, - 3, 103, 159, 160, 167, 120, 122, 3, 454, 172, - 167, 3, 4, 5, 6, 172, 168, 126, 120, 171, - 130, 168, 171, 124, 171, 3, 4, 5, 6, 96, - 123, 133, 45, 46, 47, 3, 120, 4, 92, 419, - 142, 143, 488, 168, 490, 168, 171, 82, 171, 168, - 128, 3, 171, 45, 46, 47, 134, 159, 160, 136, - 137, 138, 139, 140, 141, 167, 17, 167, 46, 47, - 172, 84, 168, 151, 152, 171, 168, 155, 156, 171, - 158, 159, 160, 161, 162, 163, 168, 165, 4, 171, - 103, 130, 84, 167, 167, 45, 6, 113, 12, 168, - 168, 125, 53, 168, 130, 171, 84, 120, 45, 24, - 3, 103, 148, 111, 29, 3, 31, 32, 76, 34, - 133, 3, 111, 3, 124, 103, 167, 42, 120, 142, - 143, 97, 93, 167, 167, 165, 167, 48, 167, 171, - 167, 133, 120, 171, 92, 54, 159, 160, 167, 100, - 142, 143, 57, 68, 167, 133, 168, 167, 3, 172, - 3, 30, 167, 167, 142, 143, 167, 159, 160, 120, - 85, 168, 87, 88, 93, 167, 127, 128, 100, 114, - 172, 159, 160, 134, 135, 167, 103, 102, 165, 167, - 166, 106, 171, 108, 172, 69, 167, 148, 149, 150, - 151, 152, 6, 118, 155, 156, 0, 158, 159, 160, - 161, 162, 163, 7, 165, 6, 6, 103, 7, 168, - 98, 15, 168, 168, 77, 77, 15, 77, 22, 3, - 98, 125, 26, 22, 6, 171, 168, 26, 53, 168, - 168, 168, 36, 167, 6, 39, 40, 36, 168, 167, - 39, 40, 65, 23, 146, 168, 168, 51, 52, 54, - 135, 169, 51, 52, 287, 290, 326, 409, 62, 212, - 242, 493, 462, 62, 294, 248, 98, 224, -1, 301, - 461, -1, -1, -1, -1, 100, -1, -1, -1, -1, - -1, -1, 86, -1, -1, 53, 90, 86, -1, 114, - -1, 90, -1, -1, -1, 120, -1, -1, -1, -1, - -1, 105, -1, 128, 53, -1, 105, 111, -1, 134, - 135, -1, 111, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 148, 149, 150, 151, 152, -1, -1, - 155, 156, 100, 158, 159, 160, 161, 162, 163, -1, - 165, 145, 146, 147, -1, -1, 145, 146, 147, -1, - -1, 100, 120, -1, -1, -1, -1, -1, -1, -1, - 128, -1, -1, -1, -1, -1, 134, 135, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 128, - 148, 149, 150, 151, 152, 134, 135, 155, 156, -1, - 158, 159, 160, 161, 162, 163, -1, 165, -1, 148, - 149, 150, 151, 152, -1, -1, 155, 156, -1, 158, - 159, 160, 161, 162, 163, -1, 165 + 140, 74, 219, 2, 259, 80, 5, 93, 94, 94, + 180, 10, 105, 12, 316, 3, 3, 146, 115, 3, + 25, 57, 4, 5, 6, 77, 12, 82, 54, 93, + 170, 3, 172, 173, 112, 9, 26, 115, 50, 70, + 9, 110, 89, 37, 93, 114, 114, 187, 79, 48, + 3, 50, 192, 188, 53, 190, 142, 142, 19, 58, + 124, 66, 131, 131, 114, 3, 71, 114, 115, 3, + 44, 144, 77, 78, 3, 44, 216, 247, 109, 114, + 74, 131, 337, 132, 131, 107, 85, 86, 114, 94, + 47, 93, 114, 98, 99, 70, 131, 134, 59, 98, + 99, 176, 76, 167, 79, 131, 80, 101, 103, 131, + 365, 80, 252, 253, 168, 167, 171, 171, 168, 192, + 443, 103, 257, 263, 264, 120, 83, 167, 165, 169, + 265, 167, 267, 168, 109, 232, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 474, 124, 152, 232, 3, 4, 5, 6, 171, + 142, 143, 54, 134, 100, 168, 171, 97, 171, 309, + 103, 300, 427, 160, 314, 315, 160, 250, 177, 167, + 72, 107, 168, 17, 18, 114, 114, 120, 114, 491, + 172, 127, 163, 286, 165, 124, 124, 45, 46, 47, + 91, 79, 131, 131, 91, 131, 3, 4, 5, 6, + 164, 351, 352, 134, 3, 290, 114, 171, 116, 110, + 390, 296, 477, 110, 57, 116, 93, 144, 363, 116, + 63, 317, 317, 131, 0, 114, 84, 116, 231, 160, + 161, 162, 163, 236, 165, 290, 170, 111, 45, 46, + 47, 296, 131, 166, 168, 103, 168, 171, 171, 171, + 3, 4, 5, 6, 3, 113, 3, 4, 5, 6, + 169, 168, 120, 167, 171, 25, 416, 93, 418, 419, + 168, 354, 3, 171, 501, 133, 168, 84, 287, 171, + 425, 126, 365, 3, 142, 143, 136, 137, 138, 139, + 140, 141, 45, 46, 47, 122, 103, 3, 45, 46, + 47, 159, 160, 110, 57, 168, 66, 168, 171, 167, + 171, 71, 462, 120, 172, 126, 168, 77, 78, 171, + 124, 96, 171, 123, 3, 120, 133, 3, 4, 5, + 6, 84, 4, 92, 94, 142, 143, 84, 98, 99, + 82, 3, 167, 4, 427, 90, 496, 130, 498, 45, + 103, 167, 159, 160, 167, 6, 103, 12, 168, 168, + 167, 113, 125, 168, 130, 172, 3, 120, 171, 45, + 46, 47, 45, 120, 148, 38, 25, 111, 3, 76, + 133, 3, 111, 3, 124, 167, 133, 167, 167, 142, + 143, 48, 165, 97, 93, 142, 143, 3, 4, 5, + 6, 171, 167, 167, 171, 167, 159, 160, 84, 54, + 92, 171, 159, 160, 167, 57, 167, 66, 168, 172, + 167, 167, 71, 3, 168, 172, 169, 103, 77, 78, + 3, 30, 81, 93, 167, 167, 100, 167, 17, 114, + 46, 47, 167, 165, 120, 94, 69, 103, 166, 6, + 99, 167, 171, 0, 6, 6, 103, 133, 168, 168, + 7, 168, 98, 77, 77, 77, 142, 143, 15, 98, + 3, 125, 6, 171, 53, 22, 168, 168, 84, 26, + 168, 130, 168, 159, 160, 168, 167, 6, 168, 36, + 167, 167, 39, 40, 168, 24, 172, 103, 68, 295, + 298, 151, 334, 417, 51, 52, 139, 57, 309, 217, + 248, 302, 470, 254, 120, 62, 469, 230, 65, 102, + -1, 100, -1, -1, -1, -1, -1, 133, -1, -1, + -1, -1, -1, -1, -1, -1, 142, 143, 53, 86, + -1, 120, -1, 90, -1, -1, -1, -1, 127, 128, + -1, -1, -1, 159, 160, 134, 135, -1, 105, 7, + -1, 167, -1, -1, 111, -1, 172, 15, -1, 148, + 149, 150, 151, 152, 22, -1, 155, 156, 26, 158, + 159, 160, 161, 162, 163, 100, 165, -1, 36, -1, + -1, 39, 40, -1, -1, -1, -1, -1, 145, 146, + 147, -1, -1, 51, 52, 120, 53, -1, -1, -1, + -1, -1, -1, 128, 62, -1, -1, 65, -1, 134, + 135, -1, -1, -1, -1, 53, -1, -1, -1, -1, + -1, -1, -1, 148, 149, 150, 151, 152, 86, -1, + 155, 156, 90, 158, 159, 160, 161, 162, 163, -1, + 165, -1, -1, 100, -1, -1, -1, 105, -1, -1, + -1, 53, -1, 111, -1, -1, -1, 114, -1, -1, + -1, -1, 100, 120, -1, -1, -1, -1, -1, -1, + -1, 128, -1, -1, -1, -1, -1, 134, 135, -1, + -1, -1, -1, -1, -1, -1, -1, 145, 146, 147, + 128, 148, 149, 150, 151, 152, 134, 135, 155, 156, + -1, 158, 159, 160, 161, 162, 163, -1, 165, -1, + 148, 149, 150, 151, 152, -1, -1, 155, 156, -1, + 158, 159, 160, 161, 162, 163, 128, 165, 24, -1, + -1, -1, 134, 29, -1, 31, 32, -1, 34, -1, + -1, -1, -1, -1, -1, -1, 42, -1, -1, 151, + 152, -1, -1, 155, 156, -1, 158, 159, 160, 161, + 162, 163, -1, 165, -1, -1, -1, -1, -1, -1, + -1, -1, 68, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 85, + -1, 87, 88, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 102, -1, -1, -1, + 106, -1, 108, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 118 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1261,122 +1284,122 @@ static const yytype_int16 yycheck[] = static const yytype_int16 yystos[] = { 0, 7, 15, 22, 26, 36, 39, 40, 51, 52, - 62, 86, 90, 105, 111, 145, 146, 147, 174, 175, - 176, 177, 181, 183, 185, 186, 190, 191, 192, 198, - 200, 201, 202, 204, 207, 272, 273, 26, 3, 265, - 3, 3, 265, 70, 79, 109, 93, 93, 97, 264, - 265, 265, 70, 79, 109, 19, 59, 3, 274, 275, - 144, 182, 182, 182, 0, 170, 279, 111, 178, 178, - 57, 167, 210, 211, 215, 3, 169, 167, 93, 3, - 266, 126, 193, 193, 265, 3, 187, 265, 122, 93, - 132, 3, 267, 126, 199, 199, 265, 124, 171, 176, - 96, 123, 227, 210, 211, 9, 44, 80, 212, 213, - 76, 212, 223, 3, 4, 5, 6, 103, 142, 143, - 172, 230, 231, 252, 253, 254, 255, 256, 257, 258, - 4, 184, 193, 120, 265, 265, 82, 220, 92, 167, - 203, 3, 205, 206, 188, 253, 188, 130, 45, 265, - 265, 210, 275, 167, 256, 12, 216, 168, 168, 208, - 209, 210, 215, 113, 214, 125, 208, 54, 72, 228, - 168, 171, 130, 45, 93, 124, 167, 203, 3, 45, - 46, 47, 84, 120, 133, 159, 160, 167, 233, 234, - 235, 236, 237, 238, 239, 240, 242, 243, 244, 245, - 246, 248, 249, 250, 251, 252, 188, 3, 280, 63, - 211, 148, 171, 220, 111, 189, 189, 265, 3, 179, - 180, 217, 229, 232, 233, 223, 212, 224, 225, 233, - 223, 233, 113, 233, 252, 265, 3, 207, 3, 194, - 195, 124, 167, 169, 167, 167, 167, 110, 233, 241, - 45, 120, 234, 165, 234, 211, 233, 114, 131, 17, - 53, 100, 120, 127, 128, 134, 135, 148, 149, 150, - 151, 152, 155, 156, 158, 159, 160, 161, 162, 163, - 165, 97, 168, 171, 167, 233, 206, 48, 167, 168, - 171, 93, 218, 219, 171, 3, 124, 270, 271, 228, - 208, 171, 89, 115, 226, 228, 54, 54, 167, 92, - 24, 29, 31, 32, 34, 42, 68, 85, 87, 88, - 102, 106, 108, 118, 196, 168, 171, 207, 168, 216, - 3, 160, 211, 136, 137, 138, 139, 140, 141, 247, - 233, 233, 241, 91, 110, 116, 167, 120, 229, 168, - 168, 233, 233, 234, 234, 100, 127, 167, 103, 120, - 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, - 234, 234, 234, 234, 234, 256, 265, 3, 231, 187, - 231, 180, 167, 259, 260, 261, 262, 263, 265, 276, - 220, 232, 3, 225, 233, 233, 280, 188, 30, 167, - 167, 167, 103, 120, 197, 195, 229, 168, 93, 124, - 107, 91, 116, 233, 233, 211, 166, 114, 234, 167, - 211, 229, 103, 166, 168, 168, 207, 25, 66, 71, - 77, 78, 94, 99, 277, 171, 124, 268, 269, 270, - 69, 221, 168, 167, 6, 6, 6, 103, 168, 233, - 196, 233, 233, 116, 107, 168, 234, 211, 229, 168, - 168, 168, 98, 77, 77, 77, 98, 260, 3, 125, - 6, 171, 168, 168, 168, 168, 116, 233, 168, 168, - 269, 261, 260, 167, 229, 168, 6, 81, 130, 280, - 50, 222, 168, 167, 233, 278, 168, 233, 3, 251, - 168 + 62, 65, 86, 90, 105, 111, 145, 146, 147, 174, + 175, 176, 177, 181, 183, 185, 186, 190, 191, 192, + 198, 200, 201, 202, 203, 205, 208, 273, 274, 26, + 3, 266, 3, 3, 266, 70, 79, 109, 93, 93, + 97, 265, 266, 79, 266, 70, 79, 109, 19, 59, + 3, 275, 276, 144, 182, 182, 182, 0, 170, 280, + 111, 178, 178, 57, 167, 211, 212, 216, 3, 169, + 167, 93, 3, 267, 126, 193, 193, 266, 3, 187, + 266, 122, 266, 93, 132, 3, 268, 126, 199, 199, + 266, 124, 171, 176, 96, 123, 228, 211, 212, 9, + 44, 80, 213, 214, 76, 213, 224, 3, 4, 5, + 6, 103, 142, 143, 172, 231, 232, 253, 254, 255, + 256, 257, 258, 259, 4, 184, 193, 120, 266, 266, + 82, 221, 92, 167, 204, 3, 206, 207, 90, 188, + 254, 188, 130, 45, 266, 266, 211, 276, 167, 257, + 12, 217, 168, 168, 209, 210, 211, 216, 113, 215, + 125, 209, 54, 72, 229, 168, 171, 130, 45, 93, + 124, 167, 204, 3, 45, 46, 47, 84, 120, 133, + 159, 160, 167, 234, 235, 236, 237, 238, 239, 240, + 241, 243, 244, 245, 246, 247, 249, 250, 251, 252, + 253, 188, 3, 281, 63, 212, 148, 171, 221, 38, + 111, 189, 189, 266, 3, 179, 180, 218, 230, 233, + 234, 224, 213, 225, 226, 234, 224, 234, 113, 234, + 253, 266, 3, 208, 3, 194, 195, 124, 167, 169, + 167, 167, 167, 110, 234, 242, 45, 120, 235, 165, + 235, 212, 234, 114, 131, 17, 53, 100, 120, 127, + 128, 134, 135, 148, 149, 150, 151, 152, 155, 156, + 158, 159, 160, 161, 162, 163, 165, 97, 168, 171, + 167, 234, 207, 3, 252, 48, 167, 168, 171, 93, + 219, 220, 171, 3, 124, 271, 272, 229, 209, 171, + 89, 115, 227, 229, 54, 54, 167, 92, 24, 29, + 31, 32, 34, 42, 68, 85, 87, 88, 102, 106, + 108, 118, 196, 168, 171, 208, 168, 217, 3, 160, + 212, 136, 137, 138, 139, 140, 141, 248, 234, 234, + 242, 91, 110, 116, 167, 120, 230, 168, 168, 234, + 234, 235, 235, 100, 127, 167, 103, 120, 235, 235, + 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, + 235, 235, 235, 257, 266, 3, 232, 187, 232, 180, + 167, 260, 261, 262, 263, 264, 266, 277, 221, 233, + 3, 226, 234, 234, 281, 188, 30, 167, 167, 167, + 103, 120, 197, 195, 230, 168, 93, 124, 107, 91, + 116, 234, 234, 212, 166, 114, 235, 167, 212, 230, + 103, 166, 168, 168, 208, 25, 66, 71, 77, 78, + 94, 99, 278, 171, 124, 269, 270, 271, 69, 222, + 168, 167, 6, 6, 6, 103, 168, 234, 196, 234, + 234, 116, 107, 168, 235, 212, 230, 168, 168, 168, + 98, 77, 77, 77, 98, 261, 3, 125, 6, 171, + 168, 168, 168, 168, 116, 234, 168, 168, 270, 262, + 261, 167, 230, 168, 6, 81, 130, 281, 50, 223, + 168, 167, 234, 279, 168, 234, 252, 168 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_int16 yyr1[] = { 0, 173, 174, 175, 175, 176, 176, 176, 176, 176, - 177, 177, 177, 177, 177, 177, 177, 177, 177, 178, - 178, 179, 179, 180, 180, 181, 181, 181, 182, 182, - 183, 184, 185, 185, 186, 186, 187, 188, 189, 189, - 190, 191, 191, 191, 192, 192, 192, 192, 192, 193, - 193, 194, 194, 195, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 197, 197, - 197, 198, 198, 198, 198, 199, 199, 200, 201, 202, - 202, 203, 203, 204, 205, 205, 206, 207, 207, 207, - 208, 208, 209, 209, 210, 210, 211, 211, 212, 213, - 213, 213, 214, 214, 215, 216, 216, 217, 218, 218, - 219, 220, 220, 221, 221, 222, 222, 223, 223, 224, - 224, 225, 226, 226, 226, 227, 227, 228, 228, 228, - 228, 228, 228, 229, 229, 230, 230, 231, 231, 232, - 233, 233, 233, 233, 233, 234, 234, 234, 234, 234, - 234, 234, 234, 234, 234, 234, 235, 235, 236, 236, - 236, 236, 236, 237, 237, 237, 237, 237, 237, 237, - 237, 237, 237, 237, 238, 238, 239, 239, 239, 239, - 240, 240, 240, 240, 241, 241, 242, 242, 243, 243, - 243, 243, 243, 243, 243, 244, 244, 245, 246, 247, - 247, 247, 247, 247, 247, 248, 249, 250, 251, 251, - 251, 251, 252, 252, 252, 252, 252, 253, 254, 254, - 255, 255, 256, 257, 258, 259, 259, 260, 260, 261, - 261, 262, 262, 263, 264, 265, 265, 266, 266, 267, - 268, 268, 269, 269, 270, 270, 271, 271, 272, 272, - 273, 274, 274, 275, 276, 276, 276, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 278, 279, 279, - 280, 280 + 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, + 178, 178, 179, 179, 180, 180, 181, 181, 181, 182, + 182, 183, 184, 185, 185, 186, 186, 187, 188, 189, + 189, 190, 191, 191, 191, 192, 192, 192, 192, 192, + 193, 193, 194, 194, 195, 196, 196, 196, 196, 196, + 196, 196, 196, 196, 196, 196, 196, 196, 196, 197, + 197, 197, 198, 198, 198, 198, 199, 199, 200, 201, + 202, 203, 203, 204, 204, 205, 206, 206, 207, 208, + 208, 208, 209, 209, 210, 210, 211, 211, 212, 212, + 213, 214, 214, 214, 215, 215, 216, 217, 217, 218, + 219, 219, 220, 221, 221, 222, 222, 223, 223, 224, + 224, 225, 225, 226, 227, 227, 227, 228, 228, 229, + 229, 229, 229, 229, 229, 230, 230, 231, 231, 232, + 232, 233, 234, 234, 234, 234, 234, 235, 235, 235, + 235, 235, 235, 235, 235, 235, 235, 235, 236, 236, + 237, 237, 237, 237, 237, 238, 238, 238, 238, 238, + 238, 238, 238, 238, 238, 238, 239, 239, 240, 240, + 240, 240, 241, 241, 241, 241, 242, 242, 243, 243, + 244, 244, 244, 244, 244, 244, 244, 245, 245, 246, + 247, 248, 248, 248, 248, 248, 248, 249, 250, 251, + 252, 252, 252, 252, 253, 253, 253, 253, 253, 254, + 255, 255, 256, 256, 257, 258, 259, 260, 260, 261, + 261, 262, 262, 263, 263, 264, 265, 266, 266, 267, + 267, 268, 269, 269, 270, 270, 271, 271, 272, 272, + 273, 273, 274, 275, 275, 276, 277, 277, 277, 278, + 278, 278, 278, 278, 278, 278, 278, 278, 278, 279, + 280, 280, 281, 281 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ static const yytype_int8 yyr2[] = { 0, 2, 2, 1, 3, 2, 2, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, - 0, 1, 3, 1, 4, 2, 2, 2, 1, 0, - 4, 1, 2, 5, 7, 5, 1, 1, 3, 0, - 5, 2, 3, 2, 8, 7, 6, 9, 7, 3, - 0, 1, 3, 3, 1, 1, 1, 1, 6, 1, - 1, 4, 5, 4, 1, 1, 1, 1, 1, 2, - 0, 4, 4, 3, 5, 2, 0, 4, 2, 8, - 5, 3, 0, 5, 1, 3, 3, 2, 2, 6, - 1, 1, 1, 3, 3, 3, 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, 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, 6, 1, - 1, 1, 1, 1, 1, 4, 4, 5, 1, 3, - 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, - 4, 1, 3, 2, 1, 1, 3, 1, 0, 1, - 1, 5, 1, 0, 2, 1, 1, 0, 1, 0, - 2, 1, 3, 3, 4, 6, 8, 1, 2, 1, - 2, 1, 2, 1, 1, 1, 0, 1, 1, 0, - 1, 3 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 5, 0, 1, 3, 1, 4, 2, 2, 2, 1, + 0, 4, 1, 2, 5, 7, 5, 1, 1, 3, + 0, 5, 2, 3, 2, 8, 7, 6, 9, 7, + 3, 0, 1, 3, 3, 1, 1, 1, 1, 6, + 1, 1, 4, 5, 4, 1, 1, 1, 1, 1, + 2, 0, 4, 4, 3, 5, 2, 0, 6, 4, + 2, 8, 5, 3, 0, 5, 1, 3, 3, 2, + 2, 6, 1, 1, 1, 3, 3, 3, 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, 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, + 6, 1, 1, 1, 1, 1, 1, 4, 4, 5, + 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, + 1, 1, 4, 1, 3, 2, 1, 1, 3, 1, + 0, 1, 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 }; @@ -1928,31 +1951,31 @@ yydestruct (const char *yymsg, switch (yykind) { case YYSYMBOL_IDENTIFIER: /* IDENTIFIER */ -#line 149 "bison_parser.y" +#line 150 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1934 "bison_parser.cpp" +#line 1957 "bison_parser.cpp" break; case YYSYMBOL_STRING: /* STRING */ -#line 149 "bison_parser.y" +#line 150 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1940 "bison_parser.cpp" +#line 1963 "bison_parser.cpp" break; case YYSYMBOL_FLOATVAL: /* FLOATVAL */ -#line 147 "bison_parser.y" +#line 148 "bison_parser.y" { } -#line 1946 "bison_parser.cpp" +#line 1969 "bison_parser.cpp" break; case YYSYMBOL_INTVAL: /* INTVAL */ -#line 147 "bison_parser.y" +#line 148 "bison_parser.y" { } -#line 1952 "bison_parser.cpp" +#line 1975 "bison_parser.cpp" break; case YYSYMBOL_statement_list: /* statement_list */ -#line 150 "bison_parser.y" +#line 151 "bison_parser.y" { if ((((*yyvaluep).stmt_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).stmt_vec))) { @@ -1961,23 +1984,23 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).stmt_vec)); } -#line 1965 "bison_parser.cpp" +#line 1988 "bison_parser.cpp" break; case YYSYMBOL_statement: /* statement */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 1971 "bison_parser.cpp" +#line 1994 "bison_parser.cpp" break; case YYSYMBOL_preparable_statement: /* preparable_statement */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 1977 "bison_parser.cpp" +#line 2000 "bison_parser.cpp" break; case YYSYMBOL_opt_hints: /* opt_hints */ -#line 150 "bison_parser.y" +#line 151 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -1986,11 +2009,11 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 1990 "bison_parser.cpp" +#line 2013 "bison_parser.cpp" break; case YYSYMBOL_hint_list: /* hint_list */ -#line 150 "bison_parser.y" +#line 151 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -1999,89 +2022,89 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2003 "bison_parser.cpp" +#line 2026 "bison_parser.cpp" break; case YYSYMBOL_hint: /* hint */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2009 "bison_parser.cpp" +#line 2032 "bison_parser.cpp" break; case YYSYMBOL_transaction_statement: /* transaction_statement */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).transaction_stmt)); } -#line 2015 "bison_parser.cpp" +#line 2038 "bison_parser.cpp" break; case YYSYMBOL_prepare_statement: /* prepare_statement */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).prep_stmt)); } -#line 2021 "bison_parser.cpp" +#line 2044 "bison_parser.cpp" break; case YYSYMBOL_prepare_target_query: /* prepare_target_query */ -#line 149 "bison_parser.y" +#line 150 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2027 "bison_parser.cpp" +#line 2050 "bison_parser.cpp" break; case YYSYMBOL_execute_statement: /* execute_statement */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).exec_stmt)); } -#line 2033 "bison_parser.cpp" +#line 2056 "bison_parser.cpp" break; case YYSYMBOL_import_statement: /* import_statement */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).import_stmt)); } -#line 2039 "bison_parser.cpp" +#line 2062 "bison_parser.cpp" break; case YYSYMBOL_file_type: /* file_type */ -#line 147 "bison_parser.y" +#line 148 "bison_parser.y" { } -#line 2045 "bison_parser.cpp" +#line 2068 "bison_parser.cpp" break; case YYSYMBOL_file_path: /* file_path */ -#line 149 "bison_parser.y" +#line 150 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2051 "bison_parser.cpp" +#line 2074 "bison_parser.cpp" break; case YYSYMBOL_opt_file_type: /* opt_file_type */ -#line 147 "bison_parser.y" +#line 148 "bison_parser.y" { } -#line 2057 "bison_parser.cpp" +#line 2080 "bison_parser.cpp" break; case YYSYMBOL_export_statement: /* export_statement */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).export_stmt)); } -#line 2063 "bison_parser.cpp" +#line 2086 "bison_parser.cpp" break; case YYSYMBOL_show_statement: /* show_statement */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).show_stmt)); } -#line 2069 "bison_parser.cpp" +#line 2092 "bison_parser.cpp" break; case YYSYMBOL_create_statement: /* create_statement */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).create_stmt)); } -#line 2075 "bison_parser.cpp" +#line 2098 "bison_parser.cpp" break; case YYSYMBOL_opt_not_exists: /* opt_not_exists */ -#line 147 "bison_parser.y" +#line 148 "bison_parser.y" { } -#line 2081 "bison_parser.cpp" +#line 2104 "bison_parser.cpp" break; case YYSYMBOL_column_def_commalist: /* column_def_commalist */ -#line 150 "bison_parser.y" +#line 151 "bison_parser.y" { if ((((*yyvaluep).column_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).column_vec))) { @@ -2090,59 +2113,65 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).column_vec)); } -#line 2094 "bison_parser.cpp" +#line 2117 "bison_parser.cpp" break; case YYSYMBOL_column_def: /* column_def */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).column_t)); } -#line 2100 "bison_parser.cpp" +#line 2123 "bison_parser.cpp" break; case YYSYMBOL_column_type: /* column_type */ -#line 147 "bison_parser.y" +#line 148 "bison_parser.y" { } -#line 2106 "bison_parser.cpp" +#line 2129 "bison_parser.cpp" break; case YYSYMBOL_opt_column_nullable: /* opt_column_nullable */ -#line 147 "bison_parser.y" +#line 148 "bison_parser.y" { } -#line 2112 "bison_parser.cpp" +#line 2135 "bison_parser.cpp" break; case YYSYMBOL_drop_statement: /* drop_statement */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).drop_stmt)); } -#line 2118 "bison_parser.cpp" +#line 2141 "bison_parser.cpp" break; case YYSYMBOL_opt_exists: /* opt_exists */ -#line 147 "bison_parser.y" +#line 148 "bison_parser.y" { } -#line 2124 "bison_parser.cpp" +#line 2147 "bison_parser.cpp" + break; + + case YYSYMBOL_alter_statement: /* alter_statement */ +#line 159 "bison_parser.y" + { delete (((*yyvaluep).alter_stmt)); } +#line 2153 "bison_parser.cpp" break; case YYSYMBOL_delete_statement: /* delete_statement */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2130 "bison_parser.cpp" +#line 2159 "bison_parser.cpp" break; case YYSYMBOL_truncate_statement: /* truncate_statement */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2136 "bison_parser.cpp" +#line 2165 "bison_parser.cpp" break; case YYSYMBOL_insert_statement: /* insert_statement */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).insert_stmt)); } -#line 2142 "bison_parser.cpp" +#line 2171 "bison_parser.cpp" break; case YYSYMBOL_opt_column_list: /* opt_column_list */ -#line 150 "bison_parser.y" +#line 151 "bison_parser.y" { if ((((*yyvaluep).str_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).str_vec))) { @@ -2151,17 +2180,17 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2155 "bison_parser.cpp" +#line 2184 "bison_parser.cpp" break; case YYSYMBOL_update_statement: /* update_statement */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).update_stmt)); } -#line 2161 "bison_parser.cpp" +#line 2190 "bison_parser.cpp" break; case YYSYMBOL_update_clause_commalist: /* update_clause_commalist */ -#line 150 "bison_parser.y" +#line 151 "bison_parser.y" { if ((((*yyvaluep).update_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).update_vec))) { @@ -2170,77 +2199,77 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).update_vec)); } -#line 2174 "bison_parser.cpp" +#line 2203 "bison_parser.cpp" break; case YYSYMBOL_update_clause: /* update_clause */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).update_t)); } -#line 2180 "bison_parser.cpp" +#line 2209 "bison_parser.cpp" break; case YYSYMBOL_select_statement: /* select_statement */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2186 "bison_parser.cpp" +#line 2215 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation: /* select_within_set_operation */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2192 "bison_parser.cpp" +#line 2221 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation_no_parentheses: /* select_within_set_operation_no_parentheses */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2198 "bison_parser.cpp" +#line 2227 "bison_parser.cpp" break; case YYSYMBOL_select_with_paren: /* select_with_paren */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2204 "bison_parser.cpp" +#line 2233 "bison_parser.cpp" break; case YYSYMBOL_select_no_paren: /* select_no_paren */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2210 "bison_parser.cpp" +#line 2239 "bison_parser.cpp" break; case YYSYMBOL_set_operator: /* set_operator */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2216 "bison_parser.cpp" +#line 2245 "bison_parser.cpp" break; case YYSYMBOL_set_type: /* set_type */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2222 "bison_parser.cpp" +#line 2251 "bison_parser.cpp" break; case YYSYMBOL_opt_all: /* opt_all */ -#line 147 "bison_parser.y" +#line 148 "bison_parser.y" { } -#line 2228 "bison_parser.cpp" +#line 2257 "bison_parser.cpp" break; case YYSYMBOL_select_clause: /* select_clause */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2234 "bison_parser.cpp" +#line 2263 "bison_parser.cpp" break; case YYSYMBOL_opt_distinct: /* opt_distinct */ -#line 147 "bison_parser.y" +#line 148 "bison_parser.y" { } -#line 2240 "bison_parser.cpp" +#line 2269 "bison_parser.cpp" break; case YYSYMBOL_select_list: /* select_list */ -#line 150 "bison_parser.y" +#line 151 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2249,41 +2278,41 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2253 "bison_parser.cpp" +#line 2282 "bison_parser.cpp" break; case YYSYMBOL_opt_from_clause: /* opt_from_clause */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2259 "bison_parser.cpp" +#line 2288 "bison_parser.cpp" break; case YYSYMBOL_from_clause: /* from_clause */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2265 "bison_parser.cpp" +#line 2294 "bison_parser.cpp" break; case YYSYMBOL_opt_where: /* opt_where */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2271 "bison_parser.cpp" +#line 2300 "bison_parser.cpp" break; case YYSYMBOL_opt_group: /* opt_group */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).group_t)); } -#line 2277 "bison_parser.cpp" +#line 2306 "bison_parser.cpp" break; case YYSYMBOL_opt_having: /* opt_having */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2283 "bison_parser.cpp" +#line 2312 "bison_parser.cpp" break; case YYSYMBOL_opt_order: /* opt_order */ -#line 150 "bison_parser.y" +#line 151 "bison_parser.y" { if ((((*yyvaluep).order_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).order_vec))) { @@ -2292,11 +2321,11 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2296 "bison_parser.cpp" +#line 2325 "bison_parser.cpp" break; case YYSYMBOL_order_list: /* order_list */ -#line 150 "bison_parser.y" +#line 151 "bison_parser.y" { if ((((*yyvaluep).order_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).order_vec))) { @@ -2305,35 +2334,35 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2309 "bison_parser.cpp" +#line 2338 "bison_parser.cpp" break; case YYSYMBOL_order_desc: /* order_desc */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).order)); } -#line 2315 "bison_parser.cpp" +#line 2344 "bison_parser.cpp" break; case YYSYMBOL_opt_order_type: /* opt_order_type */ -#line 147 "bison_parser.y" +#line 148 "bison_parser.y" { } -#line 2321 "bison_parser.cpp" +#line 2350 "bison_parser.cpp" break; case YYSYMBOL_opt_top: /* opt_top */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2327 "bison_parser.cpp" +#line 2356 "bison_parser.cpp" break; case YYSYMBOL_opt_limit: /* opt_limit */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2333 "bison_parser.cpp" +#line 2362 "bison_parser.cpp" break; case YYSYMBOL_expr_list: /* expr_list */ -#line 150 "bison_parser.y" +#line 151 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2342,11 +2371,11 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2346 "bison_parser.cpp" +#line 2375 "bison_parser.cpp" break; case YYSYMBOL_opt_literal_list: /* opt_literal_list */ -#line 150 "bison_parser.y" +#line 151 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2355,11 +2384,11 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2359 "bison_parser.cpp" +#line 2388 "bison_parser.cpp" break; case YYSYMBOL_literal_list: /* literal_list */ -#line 150 "bison_parser.y" +#line 151 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2368,191 +2397,191 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2372 "bison_parser.cpp" +#line 2401 "bison_parser.cpp" break; case YYSYMBOL_expr_alias: /* expr_alias */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2378 "bison_parser.cpp" +#line 2407 "bison_parser.cpp" break; case YYSYMBOL_expr: /* expr */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2384 "bison_parser.cpp" +#line 2413 "bison_parser.cpp" break; case YYSYMBOL_operand: /* operand */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2390 "bison_parser.cpp" +#line 2419 "bison_parser.cpp" break; case YYSYMBOL_scalar_expr: /* scalar_expr */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2396 "bison_parser.cpp" +#line 2425 "bison_parser.cpp" break; case YYSYMBOL_unary_expr: /* unary_expr */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2402 "bison_parser.cpp" +#line 2431 "bison_parser.cpp" break; case YYSYMBOL_binary_expr: /* binary_expr */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2408 "bison_parser.cpp" +#line 2437 "bison_parser.cpp" break; case YYSYMBOL_logic_expr: /* logic_expr */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2414 "bison_parser.cpp" +#line 2443 "bison_parser.cpp" break; case YYSYMBOL_in_expr: /* in_expr */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2420 "bison_parser.cpp" +#line 2449 "bison_parser.cpp" break; case YYSYMBOL_case_expr: /* case_expr */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2426 "bison_parser.cpp" +#line 2455 "bison_parser.cpp" break; case YYSYMBOL_case_list: /* case_list */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2432 "bison_parser.cpp" +#line 2461 "bison_parser.cpp" break; case YYSYMBOL_exists_expr: /* exists_expr */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2438 "bison_parser.cpp" +#line 2467 "bison_parser.cpp" break; case YYSYMBOL_comp_expr: /* comp_expr */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2444 "bison_parser.cpp" +#line 2473 "bison_parser.cpp" break; case YYSYMBOL_function_expr: /* function_expr */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2450 "bison_parser.cpp" +#line 2479 "bison_parser.cpp" break; case YYSYMBOL_extract_expr: /* extract_expr */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2456 "bison_parser.cpp" +#line 2485 "bison_parser.cpp" break; case YYSYMBOL_cast_expr: /* cast_expr */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2462 "bison_parser.cpp" +#line 2491 "bison_parser.cpp" break; case YYSYMBOL_datetime_field: /* datetime_field */ -#line 147 "bison_parser.y" +#line 148 "bison_parser.y" { } -#line 2468 "bison_parser.cpp" +#line 2497 "bison_parser.cpp" break; case YYSYMBOL_array_expr: /* array_expr */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2474 "bison_parser.cpp" +#line 2503 "bison_parser.cpp" break; case YYSYMBOL_array_index: /* array_index */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2480 "bison_parser.cpp" +#line 2509 "bison_parser.cpp" break; case YYSYMBOL_between_expr: /* between_expr */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2486 "bison_parser.cpp" +#line 2515 "bison_parser.cpp" break; case YYSYMBOL_column_name: /* column_name */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2492 "bison_parser.cpp" +#line 2521 "bison_parser.cpp" break; case YYSYMBOL_literal: /* literal */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2498 "bison_parser.cpp" +#line 2527 "bison_parser.cpp" break; case YYSYMBOL_string_literal: /* string_literal */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2504 "bison_parser.cpp" +#line 2533 "bison_parser.cpp" break; case YYSYMBOL_bool_literal: /* bool_literal */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2510 "bison_parser.cpp" +#line 2539 "bison_parser.cpp" break; case YYSYMBOL_num_literal: /* num_literal */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2516 "bison_parser.cpp" +#line 2545 "bison_parser.cpp" break; case YYSYMBOL_int_literal: /* int_literal */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2522 "bison_parser.cpp" +#line 2551 "bison_parser.cpp" break; case YYSYMBOL_null_literal: /* null_literal */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2528 "bison_parser.cpp" +#line 2557 "bison_parser.cpp" break; case YYSYMBOL_param_expr: /* param_expr */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2534 "bison_parser.cpp" +#line 2563 "bison_parser.cpp" break; case YYSYMBOL_table_ref: /* table_ref */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2540 "bison_parser.cpp" +#line 2569 "bison_parser.cpp" break; case YYSYMBOL_table_ref_atomic: /* table_ref_atomic */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2546 "bison_parser.cpp" +#line 2575 "bison_parser.cpp" break; case YYSYMBOL_nonjoin_table_ref_atomic: /* nonjoin_table_ref_atomic */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2552 "bison_parser.cpp" +#line 2581 "bison_parser.cpp" break; case YYSYMBOL_table_ref_commalist: /* table_ref_commalist */ -#line 150 "bison_parser.y" +#line 151 "bison_parser.y" { if ((((*yyvaluep).table_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).table_vec))) { @@ -2561,107 +2590,107 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).table_vec)); } -#line 2565 "bison_parser.cpp" +#line 2594 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name: /* table_ref_name */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2571 "bison_parser.cpp" +#line 2600 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name_no_alias: /* table_ref_name_no_alias */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2577 "bison_parser.cpp" +#line 2606 "bison_parser.cpp" break; case YYSYMBOL_table_name: /* table_name */ -#line 148 "bison_parser.y" +#line 149 "bison_parser.y" { free( (((*yyvaluep).table_name).name) ); free( (((*yyvaluep).table_name).schema) ); } -#line 2583 "bison_parser.cpp" +#line 2612 "bison_parser.cpp" break; case YYSYMBOL_opt_index_name: /* opt_index_name */ -#line 149 "bison_parser.y" +#line 150 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2589 "bison_parser.cpp" +#line 2618 "bison_parser.cpp" break; case YYSYMBOL_index_name: /* index_name */ -#line 149 "bison_parser.y" +#line 150 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2595 "bison_parser.cpp" +#line 2624 "bison_parser.cpp" break; case YYSYMBOL_table_alias: /* table_alias */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2601 "bison_parser.cpp" +#line 2630 "bison_parser.cpp" break; case YYSYMBOL_opt_table_alias: /* opt_table_alias */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2607 "bison_parser.cpp" +#line 2636 "bison_parser.cpp" break; case YYSYMBOL_alias: /* alias */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2613 "bison_parser.cpp" +#line 2642 "bison_parser.cpp" break; case YYSYMBOL_opt_alias: /* opt_alias */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2619 "bison_parser.cpp" +#line 2648 "bison_parser.cpp" break; case YYSYMBOL_opt_with_clause: /* opt_with_clause */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2625 "bison_parser.cpp" +#line 2654 "bison_parser.cpp" break; case YYSYMBOL_with_clause: /* with_clause */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2631 "bison_parser.cpp" +#line 2660 "bison_parser.cpp" break; case YYSYMBOL_with_description_list: /* with_description_list */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2637 "bison_parser.cpp" +#line 2666 "bison_parser.cpp" break; case YYSYMBOL_with_description: /* with_description */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).with_description_t)); } -#line 2643 "bison_parser.cpp" +#line 2672 "bison_parser.cpp" break; case YYSYMBOL_join_clause: /* join_clause */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2649 "bison_parser.cpp" +#line 2678 "bison_parser.cpp" break; case YYSYMBOL_opt_join_type: /* opt_join_type */ -#line 147 "bison_parser.y" +#line 148 "bison_parser.y" { } -#line 2655 "bison_parser.cpp" +#line 2684 "bison_parser.cpp" break; case YYSYMBOL_join_condition: /* join_condition */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2661 "bison_parser.cpp" +#line 2690 "bison_parser.cpp" break; case YYSYMBOL_ident_commalist: /* ident_commalist */ -#line 150 "bison_parser.y" +#line 151 "bison_parser.y" { if ((((*yyvaluep).str_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).str_vec))) { @@ -2670,7 +2699,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2674 "bison_parser.cpp" +#line 2703 "bison_parser.cpp" break; default: @@ -2777,7 +2806,7 @@ YYLTYPE yylloc = yyloc_default; yylloc.string_length = 0; } -#line 2781 "bison_parser.cpp" +#line 2810 "bison_parser.cpp" yylsp[0] = yylloc; goto yysetstate; @@ -2987,7 +3016,7 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* input: statement_list opt_semicolon */ -#line 271 "bison_parser.y" +#line 273 "bison_parser.y" { for (SQLStatement* stmt : *(yyvsp[-1].stmt_vec)) { // Transfers ownership of the statement. @@ -3005,247 +3034,253 @@ YYLTYPE yylloc = yyloc_default; } delete (yyvsp[-1].stmt_vec); } -#line 3009 "bison_parser.cpp" +#line 3038 "bison_parser.cpp" break; case 3: /* statement_list: statement */ -#line 292 "bison_parser.y" +#line 294 "bison_parser.y" { (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 3020 "bison_parser.cpp" +#line 3049 "bison_parser.cpp" break; case 4: /* statement_list: statement_list ';' statement */ -#line 298 "bison_parser.y" +#line 300 "bison_parser.y" { (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 3031 "bison_parser.cpp" +#line 3060 "bison_parser.cpp" break; case 5: /* statement: prepare_statement opt_hints */ -#line 307 "bison_parser.y" +#line 309 "bison_parser.y" { (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3040 "bison_parser.cpp" +#line 3069 "bison_parser.cpp" break; case 6: /* statement: preparable_statement opt_hints */ -#line 311 "bison_parser.y" +#line 313 "bison_parser.y" { (yyval.statement) = (yyvsp[-1].statement); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3049 "bison_parser.cpp" +#line 3078 "bison_parser.cpp" break; case 7: /* statement: show_statement */ -#line 315 "bison_parser.y" +#line 317 "bison_parser.y" { (yyval.statement) = (yyvsp[0].show_stmt); } -#line 3057 "bison_parser.cpp" +#line 3086 "bison_parser.cpp" break; case 8: /* statement: import_statement */ -#line 318 "bison_parser.y" +#line 320 "bison_parser.y" { (yyval.statement) = (yyvsp[0].import_stmt); } -#line 3065 "bison_parser.cpp" +#line 3094 "bison_parser.cpp" break; case 9: /* statement: export_statement */ -#line 321 "bison_parser.y" +#line 323 "bison_parser.y" { (yyval.statement) = (yyvsp[0].export_stmt); } -#line 3073 "bison_parser.cpp" +#line 3102 "bison_parser.cpp" break; case 10: /* preparable_statement: select_statement */ -#line 328 "bison_parser.y" +#line 330 "bison_parser.y" { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 3079 "bison_parser.cpp" +#line 3108 "bison_parser.cpp" break; case 11: /* preparable_statement: create_statement */ -#line 329 "bison_parser.y" +#line 331 "bison_parser.y" { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 3085 "bison_parser.cpp" +#line 3114 "bison_parser.cpp" break; case 12: /* preparable_statement: insert_statement */ -#line 330 "bison_parser.y" +#line 332 "bison_parser.y" { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 3091 "bison_parser.cpp" +#line 3120 "bison_parser.cpp" break; case 13: /* preparable_statement: delete_statement */ -#line 331 "bison_parser.y" +#line 333 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3097 "bison_parser.cpp" +#line 3126 "bison_parser.cpp" break; case 14: /* preparable_statement: truncate_statement */ -#line 332 "bison_parser.y" +#line 334 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3103 "bison_parser.cpp" +#line 3132 "bison_parser.cpp" break; case 15: /* preparable_statement: update_statement */ -#line 333 "bison_parser.y" +#line 335 "bison_parser.y" { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 3109 "bison_parser.cpp" +#line 3138 "bison_parser.cpp" break; case 16: /* preparable_statement: drop_statement */ -#line 334 "bison_parser.y" +#line 336 "bison_parser.y" { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 3115 "bison_parser.cpp" +#line 3144 "bison_parser.cpp" break; - case 17: /* preparable_statement: execute_statement */ -#line 335 "bison_parser.y" + case 17: /* preparable_statement: alter_statement */ +#line 337 "bison_parser.y" + { (yyval.statement) = (yyvsp[0].alter_stmt); } +#line 3150 "bison_parser.cpp" + break; + + case 18: /* preparable_statement: execute_statement */ +#line 338 "bison_parser.y" { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 3121 "bison_parser.cpp" +#line 3156 "bison_parser.cpp" break; - case 18: /* preparable_statement: transaction_statement */ -#line 336 "bison_parser.y" + case 19: /* preparable_statement: transaction_statement */ +#line 339 "bison_parser.y" { (yyval.statement) = (yyvsp[0].transaction_stmt); } -#line 3127 "bison_parser.cpp" +#line 3162 "bison_parser.cpp" break; - case 19: /* opt_hints: WITH HINT '(' hint_list ')' */ -#line 345 "bison_parser.y" + case 20: /* opt_hints: WITH HINT '(' hint_list ')' */ +#line 348 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 3133 "bison_parser.cpp" +#line 3168 "bison_parser.cpp" break; - case 20: /* opt_hints: %empty */ -#line 346 "bison_parser.y" + case 21: /* opt_hints: %empty */ +#line 349 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 3139 "bison_parser.cpp" +#line 3174 "bison_parser.cpp" break; - case 21: /* hint_list: hint */ -#line 351 "bison_parser.y" + case 22: /* hint_list: hint */ +#line 354 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3145 "bison_parser.cpp" +#line 3180 "bison_parser.cpp" break; - case 22: /* hint_list: hint_list ',' hint */ -#line 352 "bison_parser.y" + case 23: /* hint_list: hint_list ',' hint */ +#line 355 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3151 "bison_parser.cpp" +#line 3186 "bison_parser.cpp" break; - case 23: /* hint: IDENTIFIER */ -#line 356 "bison_parser.y" + case 24: /* hint: IDENTIFIER */ +#line 359 "bison_parser.y" { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[0].sval); } -#line 3160 "bison_parser.cpp" +#line 3195 "bison_parser.cpp" break; - case 24: /* hint: IDENTIFIER '(' literal_list ')' */ -#line 360 "bison_parser.y" + case 25: /* hint: IDENTIFIER '(' literal_list ')' */ +#line 363 "bison_parser.y" { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[-3].sval); (yyval.expr)->exprList = (yyvsp[-1].expr_vec); } -#line 3170 "bison_parser.cpp" +#line 3205 "bison_parser.cpp" break; - case 25: /* transaction_statement: BEGIN opt_transaction_keyword */ -#line 372 "bison_parser.y" + case 26: /* transaction_statement: BEGIN opt_transaction_keyword */ +#line 375 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kBeginTransaction); } -#line 3178 "bison_parser.cpp" +#line 3213 "bison_parser.cpp" break; - case 26: /* transaction_statement: ROLLBACK opt_transaction_keyword */ -#line 375 "bison_parser.y" + case 27: /* transaction_statement: ROLLBACK opt_transaction_keyword */ +#line 378 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kRollbackTransaction); } -#line 3186 "bison_parser.cpp" +#line 3221 "bison_parser.cpp" break; - case 27: /* transaction_statement: COMMIT opt_transaction_keyword */ -#line 378 "bison_parser.y" + case 28: /* transaction_statement: COMMIT opt_transaction_keyword */ +#line 381 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kCommitTransaction); } -#line 3194 "bison_parser.cpp" +#line 3229 "bison_parser.cpp" break; - case 30: /* prepare_statement: PREPARE IDENTIFIER FROM prepare_target_query */ -#line 392 "bison_parser.y" + case 31: /* prepare_statement: PREPARE IDENTIFIER FROM prepare_target_query */ +#line 395 "bison_parser.y" { (yyval.prep_stmt) = new PrepareStatement(); (yyval.prep_stmt)->name = (yyvsp[-2].sval); (yyval.prep_stmt)->query = (yyvsp[0].sval); } -#line 3204 "bison_parser.cpp" +#line 3239 "bison_parser.cpp" break; - case 32: /* execute_statement: EXECUTE IDENTIFIER */ -#line 402 "bison_parser.y" + case 33: /* execute_statement: EXECUTE IDENTIFIER */ +#line 405 "bison_parser.y" { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[0].sval); } -#line 3213 "bison_parser.cpp" +#line 3248 "bison_parser.cpp" break; - case 33: /* execute_statement: EXECUTE IDENTIFIER '(' opt_literal_list ')' */ -#line 406 "bison_parser.y" + case 34: /* execute_statement: EXECUTE IDENTIFIER '(' opt_literal_list ')' */ +#line 409 "bison_parser.y" { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[-3].sval); (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); } -#line 3223 "bison_parser.cpp" +#line 3258 "bison_parser.cpp" break; - case 34: /* import_statement: IMPORT FROM file_type FILE file_path INTO table_name */ -#line 420 "bison_parser.y" + case 35: /* import_statement: IMPORT FROM file_type FILE file_path INTO table_name */ +#line 423 "bison_parser.y" { (yyval.import_stmt) = new ImportStatement((yyvsp[-4].import_type_t)); (yyval.import_stmt)->filePath = (yyvsp[-2].sval); (yyval.import_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3234 "bison_parser.cpp" +#line 3269 "bison_parser.cpp" break; - case 35: /* import_statement: COPY table_name FROM file_path opt_file_type */ -#line 426 "bison_parser.y" + case 36: /* import_statement: COPY table_name FROM file_path opt_file_type */ +#line 429 "bison_parser.y" { (yyval.import_stmt) = new ImportStatement((yyvsp[0].import_type_t)); (yyval.import_stmt)->filePath = (yyvsp[-1].sval); (yyval.import_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3245 "bison_parser.cpp" +#line 3280 "bison_parser.cpp" break; - case 36: /* file_type: IDENTIFIER */ -#line 435 "bison_parser.y" + case 37: /* file_type: IDENTIFIER */ +#line 438 "bison_parser.y" { if (strcasecmp((yyvsp[0].sval), "csv") == 0) { (yyval.import_type_t) = kImportCSV; @@ -3260,70 +3295,70 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[0].sval)); } -#line 3264 "bison_parser.cpp" +#line 3299 "bison_parser.cpp" break; - case 37: /* file_path: string_literal */ -#line 452 "bison_parser.y" + case 38: /* file_path: string_literal */ +#line 455 "bison_parser.y" { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 3270 "bison_parser.cpp" +#line 3305 "bison_parser.cpp" break; - case 38: /* opt_file_type: WITH FORMAT file_type */ -#line 456 "bison_parser.y" + case 39: /* opt_file_type: WITH FORMAT file_type */ +#line 459 "bison_parser.y" { (yyval.import_type_t) = (yyvsp[0].import_type_t); } -#line 3278 "bison_parser.cpp" +#line 3313 "bison_parser.cpp" break; - case 39: /* opt_file_type: %empty */ -#line 459 "bison_parser.y" + case 40: /* opt_file_type: %empty */ +#line 462 "bison_parser.y" { (yyval.import_type_t) = kImportAuto; } -#line 3284 "bison_parser.cpp" +#line 3319 "bison_parser.cpp" break; - case 40: /* export_statement: COPY table_name TO file_path opt_file_type */ -#line 468 "bison_parser.y" + case 41: /* export_statement: COPY table_name TO file_path opt_file_type */ +#line 471 "bison_parser.y" { (yyval.export_stmt) = new ExportStatement((yyvsp[0].import_type_t)); (yyval.export_stmt)->filePath = (yyvsp[-1].sval); (yyval.export_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.export_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3295 "bison_parser.cpp" +#line 3330 "bison_parser.cpp" break; - case 41: /* show_statement: SHOW TABLES */ -#line 482 "bison_parser.y" + case 42: /* show_statement: SHOW TABLES */ +#line 485 "bison_parser.y" { (yyval.show_stmt) = new ShowStatement(kShowTables); } -#line 3303 "bison_parser.cpp" +#line 3338 "bison_parser.cpp" break; - case 42: /* show_statement: SHOW COLUMNS table_name */ -#line 485 "bison_parser.y" + case 43: /* show_statement: SHOW COLUMNS table_name */ +#line 488 "bison_parser.y" { (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 3313 "bison_parser.cpp" +#line 3348 "bison_parser.cpp" break; - case 43: /* show_statement: DESCRIBE table_name */ -#line 490 "bison_parser.y" + case 44: /* show_statement: DESCRIBE table_name */ +#line 493 "bison_parser.y" { (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 3323 "bison_parser.cpp" +#line 3358 "bison_parser.cpp" break; - case 44: /* create_statement: CREATE TABLE opt_not_exists table_name FROM IDENTIFIER FILE file_path */ -#line 504 "bison_parser.y" + case 45: /* create_statement: CREATE TABLE opt_not_exists table_name FROM IDENTIFIER FILE file_path */ +#line 507 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTableFromTbl); (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); @@ -3337,11 +3372,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].sval)); (yyval.create_stmt)->filePath = (yyvsp[0].sval); } -#line 3341 "bison_parser.cpp" +#line 3376 "bison_parser.cpp" break; - case 45: /* create_statement: CREATE TABLE opt_not_exists table_name '(' column_def_commalist ')' */ -#line 517 "bison_parser.y" + case 46: /* create_statement: CREATE TABLE opt_not_exists table_name '(' column_def_commalist ')' */ +#line 520 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -3349,11 +3384,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->columns = (yyvsp[-1].column_vec); } -#line 3353 "bison_parser.cpp" +#line 3388 "bison_parser.cpp" break; - case 46: /* create_statement: CREATE TABLE opt_not_exists table_name AS select_statement */ -#line 524 "bison_parser.y" + case 47: /* create_statement: CREATE TABLE opt_not_exists table_name AS select_statement */ +#line 527 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-3].bval); @@ -3361,11 +3396,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-2].table_name).name; (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3365 "bison_parser.cpp" +#line 3400 "bison_parser.cpp" break; - case 47: /* create_statement: CREATE INDEX opt_index_name opt_not_exists ON table_name '(' ident_commalist ')' */ -#line 531 "bison_parser.y" + case 48: /* create_statement: CREATE INDEX opt_index_name opt_not_exists ON table_name '(' ident_commalist ')' */ +#line 534 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateIndex); (yyval.create_stmt)->indexName = (yyvsp[-6].sval); @@ -3373,11 +3408,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->indexColumns = (yyvsp[-1].str_vec); } -#line 3377 "bison_parser.cpp" +#line 3412 "bison_parser.cpp" break; - case 48: /* create_statement: CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement */ -#line 538 "bison_parser.y" + case 49: /* create_statement: CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement */ +#line 541 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateView); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -3386,220 +3421,231 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3390 "bison_parser.cpp" +#line 3425 "bison_parser.cpp" break; - case 49: /* opt_not_exists: IF NOT EXISTS */ -#line 549 "bison_parser.y" + case 50: /* opt_not_exists: IF NOT EXISTS */ +#line 552 "bison_parser.y" { (yyval.bval) = true; } -#line 3396 "bison_parser.cpp" +#line 3431 "bison_parser.cpp" break; - case 50: /* opt_not_exists: %empty */ -#line 550 "bison_parser.y" + case 51: /* opt_not_exists: %empty */ +#line 553 "bison_parser.y" { (yyval.bval) = false; } -#line 3402 "bison_parser.cpp" +#line 3437 "bison_parser.cpp" break; - case 51: /* column_def_commalist: column_def */ -#line 554 "bison_parser.y" + case 52: /* column_def_commalist: column_def */ +#line 557 "bison_parser.y" { (yyval.column_vec) = new std::vector(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); } -#line 3408 "bison_parser.cpp" +#line 3443 "bison_parser.cpp" break; - case 52: /* column_def_commalist: column_def_commalist ',' column_def */ -#line 555 "bison_parser.y" + case 53: /* column_def_commalist: column_def_commalist ',' column_def */ +#line 558 "bison_parser.y" { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } -#line 3414 "bison_parser.cpp" +#line 3449 "bison_parser.cpp" break; - case 53: /* column_def: IDENTIFIER column_type opt_column_nullable */ -#line 559 "bison_parser.y" + case 54: /* column_def: IDENTIFIER column_type opt_column_nullable */ +#line 562 "bison_parser.y" { (yyval.column_t) = new ColumnDefinition((yyvsp[-2].sval), (yyvsp[-1].column_type_t), (yyvsp[0].bval)); } -#line 3422 "bison_parser.cpp" +#line 3457 "bison_parser.cpp" break; - case 54: /* column_type: INT */ -#line 565 "bison_parser.y" + case 55: /* column_type: INT */ +#line 568 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3428 "bison_parser.cpp" +#line 3463 "bison_parser.cpp" break; - case 55: /* column_type: INTEGER */ -#line 566 "bison_parser.y" + case 56: /* column_type: INTEGER */ +#line 569 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3434 "bison_parser.cpp" +#line 3469 "bison_parser.cpp" break; - case 56: /* column_type: LONG */ -#line 567 "bison_parser.y" + case 57: /* column_type: LONG */ +#line 570 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::LONG}; } -#line 3440 "bison_parser.cpp" +#line 3475 "bison_parser.cpp" break; - case 57: /* column_type: FLOAT */ -#line 568 "bison_parser.y" + case 58: /* column_type: FLOAT */ +#line 571 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3446 "bison_parser.cpp" +#line 3481 "bison_parser.cpp" break; - case 58: /* column_type: DECIMAL '(' INTVAL ',' INTVAL ')' */ -#line 569 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3452 "bison_parser.cpp" + case 59: /* column_type: DECIMAL '(' INTVAL ',' INTVAL ')' */ +#line 572 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::DECIMAL}; } +#line 3487 "bison_parser.cpp" break; - case 59: /* column_type: DOUBLE */ -#line 570 "bison_parser.y" + case 60: /* column_type: DOUBLE */ +#line 573 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } -#line 3458 "bison_parser.cpp" +#line 3493 "bison_parser.cpp" break; - case 60: /* column_type: REAL */ -#line 571 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3464 "bison_parser.cpp" + case 61: /* column_type: REAL */ +#line 574 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::REAL}; } +#line 3499 "bison_parser.cpp" break; - case 61: /* column_type: VARCHAR '(' INTVAL ')' */ -#line 572 "bison_parser.y" + case 62: /* column_type: VARCHAR '(' INTVAL ')' */ +#line 575 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3470 "bison_parser.cpp" +#line 3505 "bison_parser.cpp" break; - case 62: /* column_type: CHARACTER VARYING '(' INTVAL ')' */ -#line 573 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3476 "bison_parser.cpp" + case 63: /* column_type: CHARACTER VARYING '(' INTVAL ')' */ +#line 576 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::VARCHAR_VARYING, (yyvsp[-1].ival)}; } +#line 3511 "bison_parser.cpp" break; - case 63: /* column_type: CHAR '(' INTVAL ')' */ -#line 574 "bison_parser.y" + case 64: /* column_type: CHAR '(' INTVAL ')' */ +#line 577 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } -#line 3482 "bison_parser.cpp" +#line 3517 "bison_parser.cpp" break; - case 64: /* column_type: TEXT */ -#line 575 "bison_parser.y" + case 65: /* column_type: TEXT */ +#line 578 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } -#line 3488 "bison_parser.cpp" +#line 3523 "bison_parser.cpp" break; - case 65: /* column_type: TIME */ -#line 576 "bison_parser.y" + case 66: /* column_type: TIME */ +#line 579 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TIME}; } -#line 3494 "bison_parser.cpp" +#line 3529 "bison_parser.cpp" break; - case 66: /* column_type: DATETIME */ -#line 577 "bison_parser.y" + case 67: /* column_type: DATETIME */ +#line 580 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } -#line 3500 "bison_parser.cpp" +#line 3535 "bison_parser.cpp" break; - case 67: /* column_type: DATE */ -#line 578 "bison_parser.y" + case 68: /* column_type: DATE */ +#line 581 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATE}; } -#line 3506 "bison_parser.cpp" +#line 3541 "bison_parser.cpp" break; - case 68: /* opt_column_nullable: NULL */ -#line 582 "bison_parser.y" + case 69: /* opt_column_nullable: NULL */ +#line 585 "bison_parser.y" { (yyval.bval) = true; } -#line 3512 "bison_parser.cpp" +#line 3547 "bison_parser.cpp" break; - case 69: /* opt_column_nullable: NOT NULL */ -#line 583 "bison_parser.y" + case 70: /* opt_column_nullable: NOT NULL */ +#line 586 "bison_parser.y" { (yyval.bval) = false; } -#line 3518 "bison_parser.cpp" +#line 3553 "bison_parser.cpp" break; - case 70: /* opt_column_nullable: %empty */ -#line 584 "bison_parser.y" + case 71: /* opt_column_nullable: %empty */ +#line 587 "bison_parser.y" { (yyval.bval) = false; } -#line 3524 "bison_parser.cpp" +#line 3559 "bison_parser.cpp" break; - case 71: /* drop_statement: DROP TABLE opt_exists table_name */ -#line 594 "bison_parser.y" + case 72: /* drop_statement: DROP TABLE opt_exists table_name */ +#line 597 "bison_parser.y" { (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 3535 "bison_parser.cpp" +#line 3570 "bison_parser.cpp" break; - case 72: /* drop_statement: DROP VIEW opt_exists table_name */ -#line 600 "bison_parser.y" + case 73: /* drop_statement: DROP VIEW opt_exists table_name */ +#line 603 "bison_parser.y" { (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 3546 "bison_parser.cpp" +#line 3581 "bison_parser.cpp" break; - case 73: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ -#line 606 "bison_parser.y" + case 74: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ +#line 609 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); (yyval.drop_stmt)->ifExists = false; (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 3556 "bison_parser.cpp" +#line 3591 "bison_parser.cpp" break; - case 74: /* drop_statement: DROP INDEX index_name ON table_name */ -#line 611 "bison_parser.y" + case 75: /* drop_statement: DROP INDEX index_name ON table_name */ +#line 614 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropIndex); (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; (yyval.drop_stmt)->index_name = (yyvsp[-2].sval); } -#line 3566 "bison_parser.cpp" +#line 3601 "bison_parser.cpp" break; - case 75: /* opt_exists: IF EXISTS */ -#line 619 "bison_parser.y" + case 76: /* opt_exists: IF EXISTS */ +#line 622 "bison_parser.y" { (yyval.bval) = true; } -#line 3572 "bison_parser.cpp" +#line 3607 "bison_parser.cpp" break; - case 76: /* opt_exists: %empty */ -#line 620 "bison_parser.y" + case 77: /* opt_exists: %empty */ +#line 623 "bison_parser.y" { (yyval.bval) = false; } -#line 3578 "bison_parser.cpp" +#line 3613 "bison_parser.cpp" break; - case 77: /* delete_statement: DELETE FROM table_name opt_where */ -#line 629 "bison_parser.y" + case 78: /* alter_statement: ALTER TABLE table_name DROP COLUMN column_name */ +#line 632 "bison_parser.y" + { + (yyval.alter_stmt) = new AlterStatement(kAlterDropColumn); + (yyval.alter_stmt)->schema = (yyvsp[-3].table_name).schema; + (yyval.alter_stmt)->name = (yyvsp[-3].table_name).name; + (yyval.alter_stmt)->column_name = (yyvsp[0].expr)->name; + } +#line 3624 "bison_parser.cpp" + break; + + case 79: /* delete_statement: DELETE FROM table_name opt_where */ +#line 646 "bison_parser.y" { (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 3589 "bison_parser.cpp" +#line 3635 "bison_parser.cpp" break; - case 78: /* truncate_statement: TRUNCATE table_name */ -#line 638 "bison_parser.y" + case 80: /* truncate_statement: TRUNCATE table_name */ +#line 655 "bison_parser.y" { (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3599 "bison_parser.cpp" +#line 3645 "bison_parser.cpp" break; - case 79: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ -#line 651 "bison_parser.y" + case 81: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ +#line 668 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertValues); (yyval.insert_stmt)->schema = (yyvsp[-5].table_name).schema; @@ -3607,11 +3653,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } -#line 3611 "bison_parser.cpp" +#line 3657 "bison_parser.cpp" break; - case 80: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ -#line 658 "bison_parser.y" + case 82: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ +#line 675 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertSelect); (yyval.insert_stmt)->schema = (yyvsp[-2].table_name).schema; @@ -3619,74 +3665,74 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } -#line 3623 "bison_parser.cpp" +#line 3669 "bison_parser.cpp" break; - case 81: /* opt_column_list: '(' ident_commalist ')' */ -#line 669 "bison_parser.y" + case 83: /* opt_column_list: '(' ident_commalist ')' */ +#line 686 "bison_parser.y" { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 3629 "bison_parser.cpp" +#line 3675 "bison_parser.cpp" break; - case 82: /* opt_column_list: %empty */ -#line 670 "bison_parser.y" + case 84: /* opt_column_list: %empty */ +#line 687 "bison_parser.y" { (yyval.str_vec) = nullptr; } -#line 3635 "bison_parser.cpp" +#line 3681 "bison_parser.cpp" break; - case 83: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ -#line 680 "bison_parser.y" + case 85: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ +#line 697 "bison_parser.y" { (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 3646 "bison_parser.cpp" +#line 3692 "bison_parser.cpp" break; - case 84: /* update_clause_commalist: update_clause */ -#line 689 "bison_parser.y" + case 86: /* update_clause_commalist: update_clause */ +#line 706 "bison_parser.y" { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 3652 "bison_parser.cpp" +#line 3698 "bison_parser.cpp" break; - case 85: /* update_clause_commalist: update_clause_commalist ',' update_clause */ -#line 690 "bison_parser.y" + case 87: /* update_clause_commalist: update_clause_commalist ',' update_clause */ +#line 707 "bison_parser.y" { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 3658 "bison_parser.cpp" +#line 3704 "bison_parser.cpp" break; - case 86: /* update_clause: IDENTIFIER '=' expr */ -#line 694 "bison_parser.y" + case 88: /* update_clause: IDENTIFIER '=' expr */ +#line 711 "bison_parser.y" { (yyval.update_t) = new UpdateClause(); (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 3668 "bison_parser.cpp" +#line 3714 "bison_parser.cpp" break; - case 87: /* select_statement: opt_with_clause select_with_paren */ -#line 706 "bison_parser.y" + case 89: /* select_statement: opt_with_clause select_with_paren */ +#line 723 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3677 "bison_parser.cpp" +#line 3723 "bison_parser.cpp" break; - case 88: /* select_statement: opt_with_clause select_no_paren */ -#line 710 "bison_parser.y" + case 90: /* select_statement: opt_with_clause select_no_paren */ +#line 727 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3686 "bison_parser.cpp" +#line 3732 "bison_parser.cpp" break; - case 89: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ -#line 714 "bison_parser.y" + case 91: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ +#line 731 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3698,17 +3744,17 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); (yyval.select_stmt)->withDescriptions = (yyvsp[-5].with_description_vec); } -#line 3702 "bison_parser.cpp" +#line 3748 "bison_parser.cpp" break; - case 92: /* select_within_set_operation_no_parentheses: select_clause */ -#line 732 "bison_parser.y" + case 94: /* select_within_set_operation_no_parentheses: select_clause */ +#line 749 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); } -#line 3708 "bison_parser.cpp" +#line 3754 "bison_parser.cpp" break; - case 93: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ -#line 733 "bison_parser.y" + case 95: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ +#line 750 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3717,23 +3763,23 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->push_back((yyvsp[-1].set_operator_t)); (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[0].select_stmt); } -#line 3721 "bison_parser.cpp" +#line 3767 "bison_parser.cpp" break; - case 94: /* select_with_paren: '(' select_no_paren ')' */ -#line 744 "bison_parser.y" + case 96: /* select_with_paren: '(' select_no_paren ')' */ +#line 761 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3727 "bison_parser.cpp" +#line 3773 "bison_parser.cpp" break; - case 95: /* select_with_paren: '(' select_with_paren ')' */ -#line 745 "bison_parser.y" + case 97: /* select_with_paren: '(' select_with_paren ')' */ +#line 762 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3733 "bison_parser.cpp" +#line 3779 "bison_parser.cpp" break; - case 96: /* select_no_paren: select_clause opt_order opt_limit */ -#line 749 "bison_parser.y" + case 98: /* select_no_paren: select_clause opt_order opt_limit */ +#line 766 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); (yyval.select_stmt)->order = (yyvsp[-1].order_vec); @@ -3744,11 +3790,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3748 "bison_parser.cpp" +#line 3794 "bison_parser.cpp" break; - case 97: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ -#line 759 "bison_parser.y" + case 99: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ +#line 776 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3759,63 +3805,63 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); } -#line 3763 "bison_parser.cpp" +#line 3809 "bison_parser.cpp" break; - case 98: /* set_operator: set_type opt_all */ -#line 772 "bison_parser.y" + case 100: /* set_operator: set_type opt_all */ +#line 789 "bison_parser.y" { (yyval.set_operator_t) = (yyvsp[-1].set_operator_t); (yyval.set_operator_t)->isAll = (yyvsp[0].bval); } -#line 3772 "bison_parser.cpp" +#line 3818 "bison_parser.cpp" break; - case 99: /* set_type: UNION */ -#line 779 "bison_parser.y" + case 101: /* set_type: UNION */ +#line 796 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetUnion; } -#line 3781 "bison_parser.cpp" +#line 3827 "bison_parser.cpp" break; - case 100: /* set_type: INTERSECT */ -#line 783 "bison_parser.y" + case 102: /* set_type: INTERSECT */ +#line 800 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetIntersect; } -#line 3790 "bison_parser.cpp" +#line 3836 "bison_parser.cpp" break; - case 101: /* set_type: EXCEPT */ -#line 787 "bison_parser.y" + case 103: /* set_type: EXCEPT */ +#line 804 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetExcept; } -#line 3799 "bison_parser.cpp" +#line 3845 "bison_parser.cpp" break; - case 102: /* opt_all: ALL */ -#line 794 "bison_parser.y" + case 104: /* opt_all: ALL */ +#line 811 "bison_parser.y" { (yyval.bval) = true; } -#line 3807 "bison_parser.cpp" +#line 3853 "bison_parser.cpp" break; - case 103: /* opt_all: %empty */ -#line 797 "bison_parser.y" + case 105: /* opt_all: %empty */ +#line 814 "bison_parser.y" { (yyval.bval) = false; } -#line 3815 "bison_parser.cpp" +#line 3861 "bison_parser.cpp" break; - case 104: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ -#line 803 "bison_parser.y" + case 106: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ +#line 820 "bison_parser.y" { (yyval.select_stmt) = new SelectStatement(); (yyval.select_stmt)->limit = (yyvsp[-5].limit); @@ -3825,213 +3871,213 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 3829 "bison_parser.cpp" +#line 3875 "bison_parser.cpp" break; - case 105: /* opt_distinct: DISTINCT */ -#line 815 "bison_parser.y" + case 107: /* opt_distinct: DISTINCT */ +#line 832 "bison_parser.y" { (yyval.bval) = true; } -#line 3835 "bison_parser.cpp" +#line 3881 "bison_parser.cpp" break; - case 106: /* opt_distinct: %empty */ -#line 816 "bison_parser.y" + case 108: /* opt_distinct: %empty */ +#line 833 "bison_parser.y" { (yyval.bval) = false; } -#line 3841 "bison_parser.cpp" +#line 3887 "bison_parser.cpp" break; - case 108: /* opt_from_clause: from_clause */ -#line 824 "bison_parser.y" + case 110: /* opt_from_clause: from_clause */ +#line 841 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 3847 "bison_parser.cpp" +#line 3893 "bison_parser.cpp" break; - case 109: /* opt_from_clause: %empty */ -#line 825 "bison_parser.y" + case 111: /* opt_from_clause: %empty */ +#line 842 "bison_parser.y" { (yyval.table) = nullptr; } -#line 3853 "bison_parser.cpp" +#line 3899 "bison_parser.cpp" break; - case 110: /* from_clause: FROM table_ref */ -#line 829 "bison_parser.y" + case 112: /* from_clause: FROM table_ref */ +#line 846 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 3859 "bison_parser.cpp" +#line 3905 "bison_parser.cpp" break; - case 111: /* opt_where: WHERE expr */ -#line 834 "bison_parser.y" + case 113: /* opt_where: WHERE expr */ +#line 851 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 3865 "bison_parser.cpp" +#line 3911 "bison_parser.cpp" break; - case 112: /* opt_where: %empty */ -#line 835 "bison_parser.y" + case 114: /* opt_where: %empty */ +#line 852 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 3871 "bison_parser.cpp" +#line 3917 "bison_parser.cpp" break; - case 113: /* opt_group: GROUP BY expr_list opt_having */ -#line 839 "bison_parser.y" + case 115: /* opt_group: GROUP BY expr_list opt_having */ +#line 856 "bison_parser.y" { (yyval.group_t) = new GroupByDescription(); (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 3881 "bison_parser.cpp" +#line 3927 "bison_parser.cpp" break; - case 114: /* opt_group: %empty */ -#line 844 "bison_parser.y" + case 116: /* opt_group: %empty */ +#line 861 "bison_parser.y" { (yyval.group_t) = nullptr; } -#line 3887 "bison_parser.cpp" +#line 3933 "bison_parser.cpp" break; - case 115: /* opt_having: HAVING expr */ -#line 848 "bison_parser.y" + case 117: /* opt_having: HAVING expr */ +#line 865 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 3893 "bison_parser.cpp" +#line 3939 "bison_parser.cpp" break; - case 116: /* opt_having: %empty */ -#line 849 "bison_parser.y" + case 118: /* opt_having: %empty */ +#line 866 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 3899 "bison_parser.cpp" +#line 3945 "bison_parser.cpp" break; - case 117: /* opt_order: ORDER BY order_list */ -#line 853 "bison_parser.y" + case 119: /* opt_order: ORDER BY order_list */ +#line 870 "bison_parser.y" { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 3905 "bison_parser.cpp" +#line 3951 "bison_parser.cpp" break; - case 118: /* opt_order: %empty */ -#line 854 "bison_parser.y" + case 120: /* opt_order: %empty */ +#line 871 "bison_parser.y" { (yyval.order_vec) = nullptr; } -#line 3911 "bison_parser.cpp" +#line 3957 "bison_parser.cpp" break; - case 119: /* order_list: order_desc */ -#line 858 "bison_parser.y" + case 121: /* order_list: order_desc */ +#line 875 "bison_parser.y" { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 3917 "bison_parser.cpp" +#line 3963 "bison_parser.cpp" break; - case 120: /* order_list: order_list ',' order_desc */ -#line 859 "bison_parser.y" + case 122: /* order_list: order_list ',' order_desc */ +#line 876 "bison_parser.y" { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 3923 "bison_parser.cpp" +#line 3969 "bison_parser.cpp" break; - case 121: /* order_desc: expr opt_order_type */ -#line 863 "bison_parser.y" + case 123: /* order_desc: expr opt_order_type */ +#line 880 "bison_parser.y" { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 3929 "bison_parser.cpp" +#line 3975 "bison_parser.cpp" break; - case 122: /* opt_order_type: ASC */ -#line 867 "bison_parser.y" + case 124: /* opt_order_type: ASC */ +#line 884 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 3935 "bison_parser.cpp" +#line 3981 "bison_parser.cpp" break; - case 123: /* opt_order_type: DESC */ -#line 868 "bison_parser.y" + case 125: /* opt_order_type: DESC */ +#line 885 "bison_parser.y" { (yyval.order_type) = kOrderDesc; } -#line 3941 "bison_parser.cpp" +#line 3987 "bison_parser.cpp" break; - case 124: /* opt_order_type: %empty */ -#line 869 "bison_parser.y" + case 126: /* opt_order_type: %empty */ +#line 886 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 3947 "bison_parser.cpp" +#line 3993 "bison_parser.cpp" break; - case 125: /* opt_top: TOP int_literal */ -#line 875 "bison_parser.y" + case 127: /* opt_top: TOP int_literal */ +#line 892 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 3953 "bison_parser.cpp" +#line 3999 "bison_parser.cpp" break; - case 126: /* opt_top: %empty */ -#line 876 "bison_parser.y" + case 128: /* opt_top: %empty */ +#line 893 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 3959 "bison_parser.cpp" +#line 4005 "bison_parser.cpp" break; - case 127: /* opt_limit: LIMIT expr */ -#line 880 "bison_parser.y" + case 129: /* opt_limit: LIMIT expr */ +#line 897 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 3965 "bison_parser.cpp" +#line 4011 "bison_parser.cpp" break; - case 128: /* opt_limit: OFFSET expr */ -#line 881 "bison_parser.y" + case 130: /* opt_limit: OFFSET expr */ +#line 898 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 3971 "bison_parser.cpp" +#line 4017 "bison_parser.cpp" break; - case 129: /* opt_limit: LIMIT expr OFFSET expr */ -#line 882 "bison_parser.y" + case 131: /* opt_limit: LIMIT expr OFFSET expr */ +#line 899 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 3977 "bison_parser.cpp" +#line 4023 "bison_parser.cpp" break; - case 130: /* opt_limit: LIMIT ALL */ -#line 883 "bison_parser.y" + case 132: /* opt_limit: LIMIT ALL */ +#line 900 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, nullptr); } -#line 3983 "bison_parser.cpp" +#line 4029 "bison_parser.cpp" break; - case 131: /* opt_limit: LIMIT ALL OFFSET expr */ -#line 884 "bison_parser.y" + case 133: /* opt_limit: LIMIT ALL OFFSET expr */ +#line 901 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 3989 "bison_parser.cpp" +#line 4035 "bison_parser.cpp" break; - case 132: /* opt_limit: %empty */ -#line 885 "bison_parser.y" + case 134: /* opt_limit: %empty */ +#line 902 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 3995 "bison_parser.cpp" +#line 4041 "bison_parser.cpp" break; - case 133: /* expr_list: expr_alias */ -#line 892 "bison_parser.y" + case 135: /* expr_list: expr_alias */ +#line 909 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4001 "bison_parser.cpp" +#line 4047 "bison_parser.cpp" break; - case 134: /* expr_list: expr_list ',' expr_alias */ -#line 893 "bison_parser.y" + case 136: /* expr_list: expr_list ',' expr_alias */ +#line 910 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4007 "bison_parser.cpp" +#line 4053 "bison_parser.cpp" break; - case 135: /* opt_literal_list: literal_list */ -#line 897 "bison_parser.y" + case 137: /* opt_literal_list: literal_list */ +#line 914 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[0].expr_vec); } -#line 4013 "bison_parser.cpp" +#line 4059 "bison_parser.cpp" break; - case 136: /* opt_literal_list: %empty */ -#line 898 "bison_parser.y" + case 138: /* opt_literal_list: %empty */ +#line 915 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 4019 "bison_parser.cpp" +#line 4065 "bison_parser.cpp" break; - case 137: /* literal_list: literal */ -#line 902 "bison_parser.y" + case 139: /* literal_list: literal */ +#line 919 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4025 "bison_parser.cpp" +#line 4071 "bison_parser.cpp" break; - case 138: /* literal_list: literal_list ',' literal */ -#line 903 "bison_parser.y" + case 140: /* literal_list: literal_list ',' literal */ +#line 920 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4031 "bison_parser.cpp" +#line 4077 "bison_parser.cpp" break; - case 139: /* expr_alias: expr opt_alias */ -#line 907 "bison_parser.y" + case 141: /* expr_alias: expr opt_alias */ +#line 924 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); if ((yyvsp[0].alias_t)) { @@ -4039,421 +4085,421 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].alias_t); } } -#line 4043 "bison_parser.cpp" +#line 4089 "bison_parser.cpp" break; - case 145: /* operand: '(' expr ')' */ -#line 925 "bison_parser.y" + case 147: /* operand: '(' expr ')' */ +#line 942 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); } -#line 4049 "bison_parser.cpp" +#line 4095 "bison_parser.cpp" break; - case 155: /* operand: '(' select_no_paren ')' */ -#line 935 "bison_parser.y" + case 157: /* operand: '(' select_no_paren ')' */ +#line 952 "bison_parser.y" { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 4055 "bison_parser.cpp" +#line 4101 "bison_parser.cpp" break; - case 158: /* unary_expr: '-' operand */ -#line 944 "bison_parser.y" + case 160: /* unary_expr: '-' operand */ +#line 961 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 4061 "bison_parser.cpp" +#line 4107 "bison_parser.cpp" break; - case 159: /* unary_expr: NOT operand */ -#line 945 "bison_parser.y" + case 161: /* unary_expr: NOT operand */ +#line 962 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 4067 "bison_parser.cpp" +#line 4113 "bison_parser.cpp" break; - case 160: /* unary_expr: operand ISNULL */ -#line 946 "bison_parser.y" + case 162: /* unary_expr: operand ISNULL */ +#line 963 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 4073 "bison_parser.cpp" +#line 4119 "bison_parser.cpp" break; - case 161: /* unary_expr: operand IS NULL */ -#line 947 "bison_parser.y" + case 163: /* unary_expr: operand IS NULL */ +#line 964 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 4079 "bison_parser.cpp" +#line 4125 "bison_parser.cpp" break; - case 162: /* unary_expr: operand IS NOT NULL */ -#line 948 "bison_parser.y" + case 164: /* unary_expr: operand IS NOT NULL */ +#line 965 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 4085 "bison_parser.cpp" +#line 4131 "bison_parser.cpp" break; - case 164: /* binary_expr: operand '-' operand */ -#line 953 "bison_parser.y" + case 166: /* binary_expr: operand '-' operand */ +#line 970 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 4091 "bison_parser.cpp" +#line 4137 "bison_parser.cpp" break; - case 165: /* binary_expr: operand '+' operand */ -#line 954 "bison_parser.y" + case 167: /* binary_expr: operand '+' operand */ +#line 971 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 4097 "bison_parser.cpp" +#line 4143 "bison_parser.cpp" break; - case 166: /* binary_expr: operand '/' operand */ -#line 955 "bison_parser.y" + case 168: /* binary_expr: operand '/' operand */ +#line 972 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 4103 "bison_parser.cpp" +#line 4149 "bison_parser.cpp" break; - case 167: /* binary_expr: operand '*' operand */ -#line 956 "bison_parser.y" + case 169: /* binary_expr: operand '*' operand */ +#line 973 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 4109 "bison_parser.cpp" +#line 4155 "bison_parser.cpp" break; - case 168: /* binary_expr: operand '%' operand */ -#line 957 "bison_parser.y" + case 170: /* binary_expr: operand '%' operand */ +#line 974 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 4115 "bison_parser.cpp" +#line 4161 "bison_parser.cpp" break; - case 169: /* binary_expr: operand '^' operand */ -#line 958 "bison_parser.y" + case 171: /* binary_expr: operand '^' operand */ +#line 975 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 4121 "bison_parser.cpp" +#line 4167 "bison_parser.cpp" break; - case 170: /* binary_expr: operand LIKE operand */ -#line 959 "bison_parser.y" + case 172: /* binary_expr: operand LIKE operand */ +#line 976 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 4127 "bison_parser.cpp" +#line 4173 "bison_parser.cpp" break; - case 171: /* binary_expr: operand NOT LIKE operand */ -#line 960 "bison_parser.y" + case 173: /* binary_expr: operand NOT LIKE operand */ +#line 977 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 4133 "bison_parser.cpp" +#line 4179 "bison_parser.cpp" break; - case 172: /* binary_expr: operand ILIKE operand */ -#line 961 "bison_parser.y" + case 174: /* binary_expr: operand ILIKE operand */ +#line 978 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 4139 "bison_parser.cpp" +#line 4185 "bison_parser.cpp" break; - case 173: /* binary_expr: operand CONCAT operand */ -#line 962 "bison_parser.y" + case 175: /* binary_expr: operand CONCAT operand */ +#line 979 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 4145 "bison_parser.cpp" +#line 4191 "bison_parser.cpp" break; - case 174: /* logic_expr: expr AND expr */ -#line 966 "bison_parser.y" + case 176: /* logic_expr: expr AND expr */ +#line 983 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 4151 "bison_parser.cpp" +#line 4197 "bison_parser.cpp" break; - case 175: /* logic_expr: expr OR expr */ -#line 967 "bison_parser.y" + case 177: /* logic_expr: expr OR expr */ +#line 984 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 4157 "bison_parser.cpp" +#line 4203 "bison_parser.cpp" break; - case 176: /* in_expr: operand IN '(' expr_list ')' */ -#line 971 "bison_parser.y" + case 178: /* in_expr: operand IN '(' expr_list ')' */ +#line 988 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 4163 "bison_parser.cpp" +#line 4209 "bison_parser.cpp" break; - case 177: /* in_expr: operand NOT IN '(' expr_list ')' */ -#line 972 "bison_parser.y" + case 179: /* in_expr: operand NOT IN '(' expr_list ')' */ +#line 989 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 4169 "bison_parser.cpp" +#line 4215 "bison_parser.cpp" break; - case 178: /* in_expr: operand IN '(' select_no_paren ')' */ -#line 973 "bison_parser.y" + case 180: /* in_expr: operand IN '(' select_no_paren ')' */ +#line 990 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 4175 "bison_parser.cpp" +#line 4221 "bison_parser.cpp" break; - case 179: /* in_expr: operand NOT IN '(' select_no_paren ')' */ -#line 974 "bison_parser.y" + case 181: /* in_expr: operand NOT IN '(' select_no_paren ')' */ +#line 991 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 4181 "bison_parser.cpp" +#line 4227 "bison_parser.cpp" break; - case 180: /* case_expr: CASE expr case_list END */ -#line 980 "bison_parser.y" + case 182: /* case_expr: CASE expr case_list END */ +#line 997 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } -#line 4187 "bison_parser.cpp" +#line 4233 "bison_parser.cpp" break; - case 181: /* case_expr: CASE expr case_list ELSE expr END */ -#line 981 "bison_parser.y" + case 183: /* case_expr: CASE expr case_list ELSE expr END */ +#line 998 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4193 "bison_parser.cpp" +#line 4239 "bison_parser.cpp" break; - case 182: /* case_expr: CASE case_list END */ -#line 982 "bison_parser.y" + case 184: /* case_expr: CASE case_list END */ +#line 999 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } -#line 4199 "bison_parser.cpp" +#line 4245 "bison_parser.cpp" break; - case 183: /* case_expr: CASE case_list ELSE expr END */ -#line 983 "bison_parser.y" + case 185: /* case_expr: CASE case_list ELSE expr END */ +#line 1000 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4205 "bison_parser.cpp" +#line 4251 "bison_parser.cpp" break; - case 184: /* case_list: WHEN expr THEN expr */ -#line 987 "bison_parser.y" + case 186: /* case_list: WHEN expr THEN expr */ +#line 1004 "bison_parser.y" { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4211 "bison_parser.cpp" +#line 4257 "bison_parser.cpp" break; - case 185: /* case_list: case_list WHEN expr THEN expr */ -#line 988 "bison_parser.y" + case 187: /* case_list: case_list WHEN expr THEN expr */ +#line 1005 "bison_parser.y" { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4217 "bison_parser.cpp" +#line 4263 "bison_parser.cpp" break; - case 186: /* exists_expr: EXISTS '(' select_no_paren ')' */ -#line 992 "bison_parser.y" + case 188: /* exists_expr: EXISTS '(' select_no_paren ')' */ +#line 1009 "bison_parser.y" { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 4223 "bison_parser.cpp" +#line 4269 "bison_parser.cpp" break; - case 187: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ -#line 993 "bison_parser.y" + case 189: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ +#line 1010 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 4229 "bison_parser.cpp" +#line 4275 "bison_parser.cpp" break; - case 188: /* comp_expr: operand '=' operand */ -#line 997 "bison_parser.y" + case 190: /* comp_expr: operand '=' operand */ +#line 1014 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4235 "bison_parser.cpp" +#line 4281 "bison_parser.cpp" break; - case 189: /* comp_expr: operand EQUALS operand */ -#line 998 "bison_parser.y" + case 191: /* comp_expr: operand EQUALS operand */ +#line 1015 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4241 "bison_parser.cpp" +#line 4287 "bison_parser.cpp" break; - case 190: /* comp_expr: operand NOTEQUALS operand */ -#line 999 "bison_parser.y" + case 192: /* comp_expr: operand NOTEQUALS operand */ +#line 1016 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 4247 "bison_parser.cpp" +#line 4293 "bison_parser.cpp" break; - case 191: /* comp_expr: operand '<' operand */ -#line 1000 "bison_parser.y" + case 193: /* comp_expr: operand '<' operand */ +#line 1017 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 4253 "bison_parser.cpp" +#line 4299 "bison_parser.cpp" break; - case 192: /* comp_expr: operand '>' operand */ -#line 1001 "bison_parser.y" + case 194: /* comp_expr: operand '>' operand */ +#line 1018 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 4259 "bison_parser.cpp" +#line 4305 "bison_parser.cpp" break; - case 193: /* comp_expr: operand LESSEQ operand */ -#line 1002 "bison_parser.y" + case 195: /* comp_expr: operand LESSEQ operand */ +#line 1019 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 4265 "bison_parser.cpp" +#line 4311 "bison_parser.cpp" break; - case 194: /* comp_expr: operand GREATEREQ operand */ -#line 1003 "bison_parser.y" + case 196: /* comp_expr: operand GREATEREQ operand */ +#line 1020 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 4271 "bison_parser.cpp" +#line 4317 "bison_parser.cpp" break; - case 195: /* function_expr: IDENTIFIER '(' ')' */ -#line 1007 "bison_parser.y" + case 197: /* function_expr: IDENTIFIER '(' ')' */ +#line 1024 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 4277 "bison_parser.cpp" +#line 4323 "bison_parser.cpp" break; - case 196: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ -#line 1008 "bison_parser.y" + case 198: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ +#line 1025 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 4283 "bison_parser.cpp" +#line 4329 "bison_parser.cpp" break; - case 197: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ -#line 1012 "bison_parser.y" + case 199: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ +#line 1029 "bison_parser.y" { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } -#line 4289 "bison_parser.cpp" +#line 4335 "bison_parser.cpp" break; - case 198: /* cast_expr: CAST '(' expr AS column_type ')' */ -#line 1016 "bison_parser.y" + case 200: /* cast_expr: CAST '(' expr AS column_type ')' */ +#line 1033 "bison_parser.y" { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } -#line 4295 "bison_parser.cpp" +#line 4341 "bison_parser.cpp" break; - case 199: /* datetime_field: SECOND */ -#line 1020 "bison_parser.y" + case 201: /* datetime_field: SECOND */ +#line 1037 "bison_parser.y" { (yyval.datetime_field) = kDatetimeSecond; } -#line 4301 "bison_parser.cpp" +#line 4347 "bison_parser.cpp" break; - case 200: /* datetime_field: MINUTE */ -#line 1021 "bison_parser.y" + case 202: /* datetime_field: MINUTE */ +#line 1038 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMinute; } -#line 4307 "bison_parser.cpp" +#line 4353 "bison_parser.cpp" break; - case 201: /* datetime_field: HOUR */ -#line 1022 "bison_parser.y" + case 203: /* datetime_field: HOUR */ +#line 1039 "bison_parser.y" { (yyval.datetime_field) = kDatetimeHour; } -#line 4313 "bison_parser.cpp" +#line 4359 "bison_parser.cpp" break; - case 202: /* datetime_field: DAY */ -#line 1023 "bison_parser.y" + case 204: /* datetime_field: DAY */ +#line 1040 "bison_parser.y" { (yyval.datetime_field) = kDatetimeDay; } -#line 4319 "bison_parser.cpp" +#line 4365 "bison_parser.cpp" break; - case 203: /* datetime_field: MONTH */ -#line 1024 "bison_parser.y" + case 205: /* datetime_field: MONTH */ +#line 1041 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMonth; } -#line 4325 "bison_parser.cpp" +#line 4371 "bison_parser.cpp" break; - case 204: /* datetime_field: YEAR */ -#line 1025 "bison_parser.y" + case 206: /* datetime_field: YEAR */ +#line 1042 "bison_parser.y" { (yyval.datetime_field) = kDatetimeYear; } -#line 4331 "bison_parser.cpp" +#line 4377 "bison_parser.cpp" break; - case 205: /* array_expr: ARRAY '[' expr_list ']' */ -#line 1029 "bison_parser.y" + case 207: /* array_expr: ARRAY '[' expr_list ']' */ +#line 1046 "bison_parser.y" { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 4337 "bison_parser.cpp" +#line 4383 "bison_parser.cpp" break; - case 206: /* array_index: operand '[' int_literal ']' */ -#line 1033 "bison_parser.y" + case 208: /* array_index: operand '[' int_literal ']' */ +#line 1050 "bison_parser.y" { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 4343 "bison_parser.cpp" +#line 4389 "bison_parser.cpp" break; - case 207: /* between_expr: operand BETWEEN operand AND operand */ -#line 1037 "bison_parser.y" + case 209: /* between_expr: operand BETWEEN operand AND operand */ +#line 1054 "bison_parser.y" { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4349 "bison_parser.cpp" +#line 4395 "bison_parser.cpp" break; - case 208: /* column_name: IDENTIFIER */ -#line 1041 "bison_parser.y" + case 210: /* column_name: IDENTIFIER */ +#line 1058 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 4355 "bison_parser.cpp" +#line 4401 "bison_parser.cpp" break; - case 209: /* column_name: IDENTIFIER '.' IDENTIFIER */ -#line 1042 "bison_parser.y" + case 211: /* column_name: IDENTIFIER '.' IDENTIFIER */ +#line 1059 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 4361 "bison_parser.cpp" +#line 4407 "bison_parser.cpp" break; - case 210: /* column_name: '*' */ -#line 1043 "bison_parser.y" + case 212: /* column_name: '*' */ +#line 1060 "bison_parser.y" { (yyval.expr) = Expr::makeStar(); } -#line 4367 "bison_parser.cpp" +#line 4413 "bison_parser.cpp" break; - case 211: /* column_name: IDENTIFIER '.' '*' */ -#line 1044 "bison_parser.y" + case 213: /* column_name: IDENTIFIER '.' '*' */ +#line 1061 "bison_parser.y" { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 4373 "bison_parser.cpp" +#line 4419 "bison_parser.cpp" break; - case 217: /* string_literal: STRING */ -#line 1056 "bison_parser.y" + case 219: /* string_literal: STRING */ +#line 1073 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 4379 "bison_parser.cpp" +#line 4425 "bison_parser.cpp" break; - case 218: /* bool_literal: TRUE */ -#line 1060 "bison_parser.y" + case 220: /* bool_literal: TRUE */ +#line 1077 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(true); } -#line 4385 "bison_parser.cpp" +#line 4431 "bison_parser.cpp" break; - case 219: /* bool_literal: FALSE */ -#line 1061 "bison_parser.y" + case 221: /* bool_literal: FALSE */ +#line 1078 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(false); } -#line 4391 "bison_parser.cpp" +#line 4437 "bison_parser.cpp" break; - case 220: /* num_literal: FLOATVAL */ -#line 1065 "bison_parser.y" + case 222: /* num_literal: FLOATVAL */ +#line 1082 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 4397 "bison_parser.cpp" +#line 4443 "bison_parser.cpp" break; - case 222: /* int_literal: INTVAL */ -#line 1070 "bison_parser.y" + case 224: /* int_literal: INTVAL */ +#line 1087 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 4403 "bison_parser.cpp" +#line 4449 "bison_parser.cpp" break; - case 223: /* null_literal: NULL */ -#line 1074 "bison_parser.y" + case 225: /* null_literal: NULL */ +#line 1091 "bison_parser.y" { (yyval.expr) = Expr::makeNullLiteral(); } -#line 4409 "bison_parser.cpp" +#line 4455 "bison_parser.cpp" break; - case 224: /* param_expr: '?' */ -#line 1078 "bison_parser.y" + case 226: /* param_expr: '?' */ +#line 1095 "bison_parser.y" { (yyval.expr) = Expr::makeParameter(yylloc.total_column); (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 4419 "bison_parser.cpp" +#line 4465 "bison_parser.cpp" break; - case 226: /* table_ref: table_ref_commalist ',' table_ref_atomic */ -#line 1091 "bison_parser.y" + case 228: /* table_ref: table_ref_commalist ',' table_ref_atomic */ +#line 1108 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); auto tbl = new TableRef(kTableCrossProduct); tbl->list = (yyvsp[-2].table_vec); (yyval.table) = tbl; } -#line 4430 "bison_parser.cpp" +#line 4476 "bison_parser.cpp" break; - case 230: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ -#line 1107 "bison_parser.y" + case 232: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ +#line 1124 "bison_parser.y" { auto tbl = new TableRef(kTableSelect); tbl->select = (yyvsp[-2].select_stmt); tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4441 "bison_parser.cpp" +#line 4487 "bison_parser.cpp" break; - case 231: /* table_ref_commalist: table_ref_atomic */ -#line 1116 "bison_parser.y" + case 233: /* table_ref_commalist: table_ref_atomic */ +#line 1133 "bison_parser.y" { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 4447 "bison_parser.cpp" +#line 4493 "bison_parser.cpp" break; - case 232: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ -#line 1117 "bison_parser.y" + case 234: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ +#line 1134 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 4453 "bison_parser.cpp" +#line 4499 "bison_parser.cpp" break; - case 233: /* table_ref_name: table_name opt_table_alias */ -#line 1122 "bison_parser.y" + case 235: /* table_ref_name: table_name opt_table_alias */ +#line 1139 "bison_parser.y" { auto tbl = new TableRef(kTableName); tbl->schema = (yyvsp[-1].table_name).schema; @@ -4461,121 +4507,121 @@ YYLTYPE yylloc = yyloc_default; tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4465 "bison_parser.cpp" +#line 4511 "bison_parser.cpp" break; - case 234: /* table_ref_name_no_alias: table_name */ -#line 1133 "bison_parser.y" + case 236: /* table_ref_name_no_alias: table_name */ +#line 1150 "bison_parser.y" { (yyval.table) = new TableRef(kTableName); (yyval.table)->schema = (yyvsp[0].table_name).schema; (yyval.table)->name = (yyvsp[0].table_name).name; } -#line 4475 "bison_parser.cpp" +#line 4521 "bison_parser.cpp" break; - case 235: /* table_name: IDENTIFIER */ -#line 1142 "bison_parser.y" + case 237: /* table_name: IDENTIFIER */ +#line 1159 "bison_parser.y" { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} -#line 4481 "bison_parser.cpp" +#line 4527 "bison_parser.cpp" break; - case 236: /* table_name: IDENTIFIER '.' IDENTIFIER */ -#line 1143 "bison_parser.y" + case 238: /* table_name: IDENTIFIER '.' IDENTIFIER */ +#line 1160 "bison_parser.y" { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } -#line 4487 "bison_parser.cpp" +#line 4533 "bison_parser.cpp" break; - case 237: /* opt_index_name: IDENTIFIER */ -#line 1147 "bison_parser.y" + case 239: /* opt_index_name: IDENTIFIER */ +#line 1164 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4493 "bison_parser.cpp" +#line 4539 "bison_parser.cpp" break; - case 238: /* opt_index_name: %empty */ -#line 1148 "bison_parser.y" + case 240: /* opt_index_name: %empty */ +#line 1165 "bison_parser.y" { (yyval.sval) = nullptr;} -#line 4499 "bison_parser.cpp" +#line 4545 "bison_parser.cpp" break; - case 239: /* index_name: IDENTIFIER */ -#line 1152 "bison_parser.y" + case 241: /* index_name: IDENTIFIER */ +#line 1169 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4505 "bison_parser.cpp" +#line 4551 "bison_parser.cpp" break; - case 241: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ -#line 1158 "bison_parser.y" + case 243: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ +#line 1175 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } -#line 4511 "bison_parser.cpp" +#line 4557 "bison_parser.cpp" break; - case 243: /* opt_table_alias: %empty */ -#line 1164 "bison_parser.y" + case 245: /* opt_table_alias: %empty */ +#line 1181 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4517 "bison_parser.cpp" +#line 4563 "bison_parser.cpp" break; - case 244: /* alias: AS IDENTIFIER */ -#line 1169 "bison_parser.y" + case 246: /* alias: AS IDENTIFIER */ +#line 1186 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4523 "bison_parser.cpp" +#line 4569 "bison_parser.cpp" break; - case 245: /* alias: IDENTIFIER */ -#line 1170 "bison_parser.y" + case 247: /* alias: IDENTIFIER */ +#line 1187 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4529 "bison_parser.cpp" +#line 4575 "bison_parser.cpp" break; - case 247: /* opt_alias: %empty */ -#line 1176 "bison_parser.y" + case 249: /* opt_alias: %empty */ +#line 1193 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4535 "bison_parser.cpp" +#line 4581 "bison_parser.cpp" break; - case 249: /* opt_with_clause: %empty */ -#line 1186 "bison_parser.y" + case 251: /* opt_with_clause: %empty */ +#line 1203 "bison_parser.y" { (yyval.with_description_vec) = nullptr; } -#line 4541 "bison_parser.cpp" +#line 4587 "bison_parser.cpp" break; - case 250: /* with_clause: WITH with_description_list */ -#line 1190 "bison_parser.y" + case 252: /* with_clause: WITH with_description_list */ +#line 1207 "bison_parser.y" { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } -#line 4547 "bison_parser.cpp" +#line 4593 "bison_parser.cpp" break; - case 251: /* with_description_list: with_description */ -#line 1194 "bison_parser.y" + case 253: /* with_description_list: with_description */ +#line 1211 "bison_parser.y" { (yyval.with_description_vec) = new std::vector(); (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); } -#line 4556 "bison_parser.cpp" +#line 4602 "bison_parser.cpp" break; - case 252: /* with_description_list: with_description_list ',' with_description */ -#line 1198 "bison_parser.y" + case 254: /* with_description_list: with_description_list ',' with_description */ +#line 1215 "bison_parser.y" { (yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t)); (yyval.with_description_vec) = (yyvsp[-2].with_description_vec); } -#line 4565 "bison_parser.cpp" +#line 4611 "bison_parser.cpp" break; - case 253: /* with_description: IDENTIFIER AS select_with_paren */ -#line 1205 "bison_parser.y" + case 255: /* with_description: IDENTIFIER AS select_with_paren */ +#line 1222 "bison_parser.y" { (yyval.with_description_t) = new WithDescription(); (yyval.with_description_t)->alias = (yyvsp[-2].sval); (yyval.with_description_t)->select = (yyvsp[0].select_stmt); } -#line 4575 "bison_parser.cpp" +#line 4621 "bison_parser.cpp" break; - case 254: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ -#line 1219 "bison_parser.y" + case 256: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ +#line 1236 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4583,11 +4629,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 4587 "bison_parser.cpp" +#line 4633 "bison_parser.cpp" break; - case 255: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ -#line 1227 "bison_parser.y" + case 257: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ +#line 1244 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4596,11 +4642,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 4600 "bison_parser.cpp" +#line 4646 "bison_parser.cpp" break; - case 256: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ -#line 1237 "bison_parser.y" + case 258: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ +#line 1254 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4616,83 +4662,83 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } -#line 4620 "bison_parser.cpp" +#line 4666 "bison_parser.cpp" break; - case 257: /* opt_join_type: INNER */ -#line 1255 "bison_parser.y" + case 259: /* opt_join_type: INNER */ +#line 1272 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4626 "bison_parser.cpp" +#line 4672 "bison_parser.cpp" break; - case 258: /* opt_join_type: LEFT OUTER */ -#line 1256 "bison_parser.y" + case 260: /* opt_join_type: LEFT OUTER */ +#line 1273 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4632 "bison_parser.cpp" +#line 4678 "bison_parser.cpp" break; - case 259: /* opt_join_type: LEFT */ -#line 1257 "bison_parser.y" + case 261: /* opt_join_type: LEFT */ +#line 1274 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4638 "bison_parser.cpp" +#line 4684 "bison_parser.cpp" break; - case 260: /* opt_join_type: RIGHT OUTER */ -#line 1258 "bison_parser.y" + case 262: /* opt_join_type: RIGHT OUTER */ +#line 1275 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4644 "bison_parser.cpp" +#line 4690 "bison_parser.cpp" break; - case 261: /* opt_join_type: RIGHT */ -#line 1259 "bison_parser.y" + case 263: /* opt_join_type: RIGHT */ +#line 1276 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4650 "bison_parser.cpp" +#line 4696 "bison_parser.cpp" break; - case 262: /* opt_join_type: FULL OUTER */ -#line 1260 "bison_parser.y" + case 264: /* opt_join_type: FULL OUTER */ +#line 1277 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4656 "bison_parser.cpp" +#line 4702 "bison_parser.cpp" break; - case 263: /* opt_join_type: OUTER */ -#line 1261 "bison_parser.y" + case 265: /* opt_join_type: OUTER */ +#line 1278 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4662 "bison_parser.cpp" +#line 4708 "bison_parser.cpp" break; - case 264: /* opt_join_type: FULL */ -#line 1262 "bison_parser.y" + case 266: /* opt_join_type: FULL */ +#line 1279 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4668 "bison_parser.cpp" +#line 4714 "bison_parser.cpp" break; - case 265: /* opt_join_type: CROSS */ -#line 1263 "bison_parser.y" + case 267: /* opt_join_type: CROSS */ +#line 1280 "bison_parser.y" { (yyval.uval) = kJoinCross; } -#line 4674 "bison_parser.cpp" +#line 4720 "bison_parser.cpp" break; - case 266: /* opt_join_type: %empty */ -#line 1264 "bison_parser.y" + case 268: /* opt_join_type: %empty */ +#line 1281 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4680 "bison_parser.cpp" +#line 4726 "bison_parser.cpp" break; - case 270: /* ident_commalist: IDENTIFIER */ -#line 1284 "bison_parser.y" + case 272: /* ident_commalist: IDENTIFIER */ +#line 1301 "bison_parser.y" { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 4686 "bison_parser.cpp" +#line 4732 "bison_parser.cpp" break; - case 271: /* ident_commalist: ident_commalist ',' IDENTIFIER */ -#line 1285 "bison_parser.y" + case 273: /* ident_commalist: ident_commalist ',' IDENTIFIER */ +#line 1302 "bison_parser.y" { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 4692 "bison_parser.cpp" +#line 4738 "bison_parser.cpp" break; -#line 4696 "bison_parser.cpp" +#line 4742 "bison_parser.cpp" default: break; } @@ -4922,7 +4968,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 1288 "bison_parser.y" +#line 1305 "bison_parser.y" /********************************* ** Section 4: Additional C code diff --git a/src/parser/bison_parser.h b/src/parser/bison_parser.h index 73ced33a..d6d5ca76 100644 --- a/src/parser/bison_parser.h +++ b/src/parser/bison_parser.h @@ -266,6 +266,7 @@ union HSQL_STYPE hsql::DeleteStatement* delete_stmt; hsql::UpdateStatement* update_stmt; hsql::DropStatement* drop_stmt; + hsql::AlterStatement* alter_stmt; hsql::PrepareStatement* prep_stmt; hsql::ExecuteStatement* exec_stmt; hsql::ShowStatement* show_stmt; @@ -297,7 +298,7 @@ union HSQL_STYPE std::vector* order_vec; std::vector* with_description_vec; -#line 301 "bison_parser.h" +#line 302 "bison_parser.h" }; typedef union HSQL_STYPE HSQL_STYPE; diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index c4b82d11..b67c856e 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -108,6 +108,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha hsql::DeleteStatement* delete_stmt; hsql::UpdateStatement* update_stmt; hsql::DropStatement* drop_stmt; + hsql::AlterStatement* alter_stmt; hsql::PrepareStatement* prep_stmt; hsql::ExecuteStatement* exec_stmt; hsql::ShowStatement* show_stmt; @@ -200,6 +201,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha %type delete_statement truncate_statement %type update_statement %type drop_statement +%type alter_statement %type show_statement %type table_name %type opt_index_name @@ -332,6 +334,7 @@ preparable_statement: | truncate_statement { $$ = $1; } | update_statement { $$ = $1; } | drop_statement { $$ = $1; } + | alter_statement { $$ = $1; } | execute_statement { $$ = $1; } | transaction_statement { $$ = $1; } ; @@ -620,6 +623,20 @@ opt_exists: | /* empty */ { $$ = false; } ; +/****************************** + * ALTER Statement + * ALTER TABLE students DROP COLUMN name; + ******************************/ + +alter_statement: + ALTER TABLE table_name DROP COLUMN column_name { + $$ = new AlterStatement(kAlterDropColumn); + $$->schema = $3.schema; + $$->name = $3.name; + $$->column_name = $6->name; + } + ; + /****************************** * Delete Statement / Truncate statement * DELETE FROM students WHERE grade > 3.0 diff --git a/src/sql/AlterStatement.h b/src/sql/AlterStatement.h new file mode 100755 index 00000000..5a6238f6 --- /dev/null +++ b/src/sql/AlterStatement.h @@ -0,0 +1,27 @@ +#ifndef SQLPARSER_ALTER_STATEMENT_H +#define SQLPARSER_ALTER_STATEMENT_H + +#include "SQLStatement.h" + +// Note: Implementations of constructors and destructors can be found in statements.cpp. +namespace hsql { + + enum AlterType { + kAlterDropColumn, + }; + + // Represents SQL Alter Table statements. + // Example "ALTER TABLE students DROP COLUMN name;" + struct AlterStatement : SQLStatement { + + AlterStatement(AlterType type); + ~AlterStatement() override; + + AlterType type; + char* schema; + char* name; + char* column_name; + }; + +} // namespace hsql +#endif \ No newline at end of file diff --git a/src/sql/statements.cpp b/src/sql/statements.cpp index a08d6334..7be5cf3d 100755 --- a/src/sql/statements.cpp +++ b/src/sql/statements.cpp @@ -135,6 +135,20 @@ namespace hsql { free(name); } + // AlterStatement + AlterStatement::AlterStatement(AlterType type) : + SQLStatement(kStmtAlter), + type(type), + schema(nullptr), + name(nullptr), + column_name(nullptr) {} + + AlterStatement::~AlterStatement() { + free(schema); + free(name); + free(column_name); +} + // TransactionStatement TransactionStatement::TransactionStatement(TransactionCommand command) : SQLStatement(kStmtTransaction), diff --git a/src/sql/statements.h b/src/sql/statements.h index f5edf21b..8cee5816 100644 --- a/src/sql/statements.h +++ b/src/sql/statements.h @@ -13,5 +13,6 @@ #include "ShowStatement.h" #include "ExportStatement.h" #include "TransactionStatement.h" +#include "AlterStatement.h" #endif // SQLPARSER_STATEMENTS_H From 505b94edf9addd245da92125649e3e24485ca557 Mon Sep 17 00:00:00 2001 From: Jostafarr Date: Wed, 14 Jul 2021 11:16:42 +0200 Subject: [PATCH 13/73] column constraint --- src/parser/bison_parser.cpp | 2732 ++++++++++++++++++----------------- src/parser/bison_parser.h | 3 +- src/parser/bison_parser.y | 10 +- src/sql/CreateStatement.h | 2 +- 4 files changed, 1392 insertions(+), 1355 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 3d1985ab..ae768d97 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -376,6 +376,7 @@ union HSQL_STYPE hsql::LimitDescription* limit; hsql::ColumnDefinition* column_t; hsql::TableKeyConstraint* table_key_constraint_t; + hsql::ConstraintType column_constraint_t; hsql::ColumnType column_type_t; hsql::ImportType import_type_t; hsql::GroupByDescription* group_t; @@ -394,7 +395,7 @@ union HSQL_STYPE std::vector* with_description_vec; std::vector* table_key_constraint_vec; -#line 398 "bison_parser.cpp" +#line 399 "bison_parser.cpp" }; typedef union HSQL_STYPE HSQL_STYPE; @@ -729,16 +730,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 64 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 859 +#define YYLAST 894 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 173 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 110 +#define YYNNTS 111 /* YYNRULES -- Number of rules. */ -#define YYNRULES 276 +#define YYNRULES 279 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 514 +#define YYNSTATES 518 #define YYUNDEFTOK 2 #define YYMAXUTOK 410 @@ -801,34 +802,34 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 275, 275, 296, 302, 311, 315, 319, 322, 325, - 332, 333, 334, 335, 336, 337, 338, 339, 340, 349, - 350, 355, 356, 360, 364, 376, 379, 382, 388, 389, - 396, 403, 406, 410, 424, 430, 439, 456, 460, 463, - 472, 486, 489, 494, 508, 521, 529, 536, 543, 554, - 555, 559, 560, 564, 570, 571, 572, 573, 574, 575, - 576, 577, 578, 579, 580, 581, 582, 583, 587, 588, - 589, 593, 594, 595, 599, 600, 608, 614, 620, 625, - 633, 634, 643, 652, 665, 672, 683, 684, 694, 703, - 704, 708, 720, 724, 728, 742, 743, 746, 747, 758, - 759, 763, 773, 786, 793, 797, 801, 808, 811, 817, - 829, 830, 834, 838, 839, 843, 848, 849, 853, 858, - 862, 863, 867, 868, 872, 873, 877, 881, 882, 883, - 889, 890, 894, 895, 896, 897, 898, 899, 906, 907, - 911, 912, 916, 917, 921, 931, 932, 933, 934, 935, - 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, - 949, 953, 954, 958, 959, 960, 961, 962, 966, 967, - 968, 969, 970, 971, 972, 973, 974, 975, 976, 980, - 981, 985, 986, 987, 988, 994, 995, 996, 997, 1001, - 1002, 1006, 1007, 1011, 1012, 1013, 1014, 1015, 1016, 1017, - 1021, 1022, 1026, 1030, 1034, 1035, 1036, 1037, 1038, 1039, - 1043, 1047, 1051, 1055, 1056, 1057, 1058, 1062, 1063, 1064, - 1065, 1066, 1070, 1074, 1075, 1079, 1080, 1084, 1088, 1092, - 1104, 1105, 1115, 1116, 1120, 1121, 1130, 1131, 1136, 1147, - 1156, 1157, 1161, 1162, 1166, 1171, 1172, 1177, 1178, 1183, - 1184, 1189, 1190, 1199, 1200, 1204, 1208, 1212, 1219, 1232, - 1240, 1250, 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1276, - 1277, 1278, 1283, 1292, 1293, 1298, 1299 + 0, 277, 277, 298, 304, 313, 317, 321, 324, 327, + 334, 335, 336, 337, 338, 339, 340, 341, 342, 351, + 352, 357, 358, 362, 366, 378, 381, 384, 390, 391, + 398, 405, 408, 412, 426, 432, 441, 458, 462, 465, + 474, 488, 491, 496, 510, 523, 531, 538, 545, 556, + 557, 561, 562, 566, 572, 573, 574, 575, 576, 577, + 578, 579, 580, 581, 582, 583, 584, 585, 589, 590, + 591, 595, 596, 597, 601, 602, 603, 607, 608, 616, + 622, 628, 633, 641, 642, 651, 660, 673, 680, 691, + 692, 702, 711, 712, 716, 728, 732, 736, 750, 751, + 754, 755, 766, 767, 771, 781, 794, 801, 805, 809, + 816, 819, 825, 837, 838, 842, 846, 847, 851, 856, + 857, 861, 866, 870, 871, 875, 876, 880, 881, 885, + 889, 890, 891, 897, 898, 902, 903, 904, 905, 906, + 907, 914, 915, 919, 920, 924, 925, 929, 939, 940, + 941, 942, 943, 947, 948, 949, 950, 951, 952, 953, + 954, 955, 956, 957, 961, 962, 966, 967, 968, 969, + 970, 974, 975, 976, 977, 978, 979, 980, 981, 982, + 983, 984, 988, 989, 993, 994, 995, 996, 1002, 1003, + 1004, 1005, 1009, 1010, 1014, 1015, 1019, 1020, 1021, 1022, + 1023, 1024, 1025, 1029, 1030, 1034, 1038, 1042, 1043, 1044, + 1045, 1046, 1047, 1051, 1055, 1059, 1063, 1064, 1065, 1066, + 1070, 1071, 1072, 1073, 1074, 1078, 1082, 1083, 1087, 1088, + 1092, 1096, 1100, 1112, 1113, 1123, 1124, 1128, 1129, 1138, + 1139, 1144, 1155, 1164, 1165, 1169, 1170, 1174, 1179, 1180, + 1185, 1186, 1191, 1192, 1197, 1198, 1207, 1208, 1212, 1216, + 1220, 1227, 1240, 1248, 1258, 1277, 1278, 1279, 1280, 1281, + 1282, 1283, 1284, 1285, 1286, 1291, 1300, 1301, 1306, 1307 }; #endif @@ -867,11 +868,12 @@ static const char *const yytname[] = "file_type", "file_path", "opt_file_type", "export_statement", "show_statement", "create_statement", "opt_not_exists", "column_def_commalist", "column_def", "column_type", - "opt_column_nullable", "opt_table_key_constraints", - "table_key_constraint", "drop_statement", "opt_exists", - "delete_statement", "truncate_statement", "insert_statement", - "opt_column_list", "update_statement", "update_clause_commalist", - "update_clause", "select_statement", "select_within_set_operation", + "opt_column_nullable", "opt_column_constraint", + "opt_table_key_constraints", "table_key_constraint", "drop_statement", + "opt_exists", "delete_statement", "truncate_statement", + "insert_statement", "opt_column_list", "update_statement", + "update_clause_commalist", "update_clause", "select_statement", + "select_within_set_operation", "select_within_set_operation_no_parentheses", "select_with_paren", "select_no_paren", "set_operator", "set_type", "opt_all", "select_clause", "opt_distinct", "select_list", "opt_from_clause", @@ -919,12 +921,12 @@ static const yytype_int16 yytoknum[] = }; # endif -#define YYPACT_NINF (-403) +#define YYPACT_NINF (-400) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF (-274) +#define YYTABLE_NINF (-277) #define yytable_value_is_error(Yyn) \ ((Yyn) == YYTABLE_NINF) @@ -933,58 +935,58 @@ static const yytype_int16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - 555, 19, 30, 66, 82, 30, -16, 34, 98, -6, - 30, 30, -8, 6, 103, -19, -19, -19, 175, 28, - -403, 69, -403, 69, -403, -403, -403, -403, -403, -403, - -403, -403, -403, -403, -403, -14, -403, 222, 65, -403, - 39, 145, -403, 242, 120, 120, 30, 250, 30, 135, - -403, -66, 265, 143, 143, 30, -403, 151, 115, -403, - -403, -403, -403, -403, -403, 497, -403, 183, -403, -403, - 164, -14, 32, -403, 114, -403, 293, 13, 298, -403, - 120, 186, 30, 30, 215, -403, 220, 146, 321, 327, - 327, -403, 195, 287, 30, 30, -403, 166, 103, -403, - 170, 333, 329, 184, 190, -403, -403, -403, -14, 241, - 238, -14, 26, -403, -403, -403, -403, -403, -403, -403, - -403, 199, 205, -403, -403, -403, -403, -403, -403, -403, - -403, -403, 247, 344, -67, 146, 258, -403, 327, 382, - -2, 248, -58, -403, 279, -403, 279, 30, -403, -403, - -403, -403, -403, 392, -403, -403, 258, -403, -403, 322, - -403, -403, 32, -403, -403, 258, 322, 258, 84, -403, - -403, 13, 30, -403, 394, 299, 401, 288, -75, 246, - 249, 252, 156, 289, 255, 304, -403, 227, 55, 340, - -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, - -403, -403, -403, -403, -403, -403, 317, -403, 87, 254, - -403, 258, 321, -403, 367, -403, -403, -403, 256, 172, - -403, 334, 257, -403, 33, 26, -14, 262, -403, 74, - 26, 55, 372, -32, -403, 267, 337, -403, 741, 264, - -403, 299, 11, 12, 379, 243, 258, 258, 108, 104, - 271, 304, 563, 258, 157, 273, 53, 258, 258, 304, - -403, 304, -41, 272, 4, 304, 304, 304, 304, 304, - 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, - 333, 30, -403, 439, 13, 55, -403, 250, 13, -403, - 392, 10, 215, -403, 258, -403, 441, -403, -403, -403, - -403, 258, -403, -403, -403, -403, 258, 258, 382, 327, - -403, 413, -403, 278, 283, -403, -403, 284, -403, -403, - -403, -403, -403, -403, 80, 37, 177, -403, -403, -403, - 258, -403, -403, 285, -403, -403, -403, -403, -403, -403, - 359, 136, 140, 125, 258, 258, -403, 379, 354, -52, - -403, -403, -403, 341, 519, 599, 304, 290, 227, -403, - 355, 294, 599, 599, 599, 599, 635, 635, 635, 635, - 157, 157, -60, -60, -60, -86, 296, -403, -403, 178, - -403, 185, -403, 299, -403, 440, -403, 295, -403, 25, - -403, 400, -403, -403, -403, 55, 55, 191, -403, 303, - 466, 467, 471, -403, 375, -403, 360, 313, -403, -403, - 17, -403, 197, -403, 258, 741, 258, 258, -403, 169, - 207, 314, -403, 304, 599, 227, 315, 203, -403, -403, - -403, -403, 316, 383, -403, -403, -403, 408, 409, 410, - 395, 10, 504, -403, -403, -403, 384, -403, -403, 502, - 339, 345, 346, -403, 348, 382, -403, 68, 352, 55, - 213, -403, 258, -403, 563, 353, 204, -403, -403, 25, - 10, -403, -403, -403, 10, 469, 349, 258, 356, 516, - -403, -403, 382, 234, -403, -403, -403, 55, -403, -403, - -403, -403, 171, 382, -20, -403, 357, 235, -403, 361, - 258, 240, 258, -403, -403, -403, 18, 55, -403, -403, - 55, 358, 362, -403 + 570, 18, 42, 62, 71, 42, 6, -4, -3, 3, + 42, 42, 7, 20, 126, 56, 56, 56, 158, 37, + -400, 125, -400, 125, -400, -400, -400, -400, -400, -400, + -400, -400, -400, -400, -400, -36, -400, 164, 69, -400, + 82, 155, -400, 181, 138, 138, 42, 257, 42, 157, + -400, -45, 283, 161, 161, 42, -400, 167, 121, -400, + -400, -400, -400, -400, -400, 539, -400, 197, -400, -400, + 178, -36, 25, -400, 110, -400, 310, 10, 314, -400, + 138, 199, 42, 42, 242, -400, 228, 165, 322, 327, + 327, -400, 196, 293, 42, 42, -400, 175, 126, -400, + 182, 351, 347, 192, 193, -400, -400, -400, -36, 250, + 239, -36, -13, -400, -400, -400, -400, -400, -400, -400, + -400, 198, 194, -400, -400, -400, -400, -400, -400, -400, + -400, -400, 245, 334, -66, 165, 299, -400, 327, 369, + 162, 240, -57, -400, 278, -400, 278, 42, -400, -400, + -400, -400, -400, 390, -400, -400, 299, -400, -400, 320, + -400, -400, 25, -400, -400, 299, 320, 299, 156, -400, + -400, 10, 42, -400, 396, 289, 398, 279, -1, 237, + 244, 246, 238, 331, 241, 381, -400, 249, -11, 408, + -400, -400, -400, -400, -400, -400, -400, -400, -400, -400, + -400, -400, -400, -400, -400, -400, 315, -400, -41, 247, + -400, 299, 322, -400, 359, -400, -400, -400, 251, 97, + -400, 324, 252, -400, 64, -13, -36, 253, -400, -51, + -13, -11, 366, -32, -400, 255, 337, -400, 776, 259, + -400, 289, 11, 15, 374, 134, 299, 299, -8, 73, + 266, 381, 598, 299, 53, 258, -71, 299, 299, 381, + -400, 381, -2, 268, 109, 381, 381, 381, 381, 381, + 381, 381, 381, 381, 381, 381, 381, 381, 381, 381, + 351, 42, -400, 433, 10, -11, -400, 257, 10, -400, + 390, 14, 242, -400, 299, -400, 434, -400, -400, -400, + -400, 299, -400, -400, -400, -400, 299, 299, 369, 327, + -400, 409, -400, 271, 273, -400, -400, 276, -400, -400, + -400, -400, -400, -400, 117, 34, 129, -400, -400, -400, + 299, -400, -400, 277, -400, -400, -400, -400, -400, -400, + 353, 80, 49, 81, 299, 299, -400, 374, 344, 85, + -400, -400, -400, 333, 545, 634, 381, 281, 249, -400, + 346, 285, 634, 634, 634, 634, 670, 670, 670, 670, + 53, 53, -72, -72, -72, -10, 286, -400, -400, 139, + -400, 140, -400, 289, -400, 168, -400, 282, -400, 23, + -400, 385, -400, -400, -400, -11, -11, 141, -400, 288, + 450, 451, 454, -400, 360, 13, 343, 301, -400, -400, + 28, -400, 146, -400, 299, 776, 299, 299, -400, 116, + 91, 302, -400, 381, 634, 249, 304, 159, -400, -400, + -400, -400, 307, 371, -400, -400, -400, 399, 400, 401, + 382, 14, 476, -400, -400, -400, 357, -400, -400, 477, + 316, 317, 318, -400, 370, -400, -400, 321, 369, -400, + -60, 325, -11, 119, -400, 299, -400, 598, 326, 172, + -400, -400, 23, 14, -400, -400, -400, 14, 296, 328, + 299, 329, 486, -400, -400, -400, 369, 179, -400, -400, + -400, -11, -400, -400, -400, -400, 456, 369, -22, -400, + 332, 183, -400, 335, 299, 185, 299, -400, -400, -400, + 17, -11, -400, -400, -11, 330, 336, -400 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -992,74 +994,75 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_int16 yydefact[] = { - 254, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 29, 29, 29, 0, 274, + 257, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 29, 29, 29, 0, 277, 3, 20, 18, 20, 17, 8, 9, 7, 11, 16, - 13, 14, 12, 15, 10, 0, 253, 0, 240, 83, - 32, 0, 43, 243, 50, 50, 0, 0, 0, 0, - 239, 0, 0, 81, 81, 0, 41, 0, 255, 256, - 28, 25, 27, 26, 1, 254, 2, 0, 6, 5, - 131, 0, 92, 93, 123, 78, 0, 141, 0, 242, - 50, 0, 0, 0, 117, 36, 0, 87, 0, 0, - 0, 244, 0, 0, 0, 0, 42, 0, 0, 4, - 0, 0, 111, 0, 0, 105, 106, 104, 0, 108, - 0, 0, 137, 241, 222, 225, 227, 228, 223, 224, - 229, 0, 140, 142, 217, 218, 219, 226, 220, 221, - 31, 30, 0, 0, 0, 87, 0, 82, 0, 0, - 0, 0, 117, 89, 39, 37, 39, 0, 80, 76, - 77, 258, 257, 0, 130, 110, 0, 100, 99, 123, - 96, 95, 97, 107, 103, 0, 123, 0, 0, 101, - 33, 0, 0, 49, 0, 254, 0, 0, 213, 0, - 0, 0, 0, 0, 0, 0, 215, 0, 116, 145, - 152, 153, 154, 147, 149, 155, 148, 168, 156, 157, - 158, 159, 151, 146, 161, 162, 0, 275, 0, 0, - 85, 0, 0, 88, 0, 35, 40, 79, 23, 0, - 21, 114, 112, 138, 252, 137, 0, 122, 124, 129, - 137, 133, 135, 132, 143, 0, 0, 46, 0, 73, - 51, 254, 111, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 164, 0, 163, 0, 0, 0, 0, 0, - 165, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 13, 14, 12, 15, 10, 0, 256, 0, 243, 86, + 32, 0, 43, 246, 50, 50, 0, 0, 0, 0, + 242, 0, 0, 84, 84, 0, 41, 0, 258, 259, + 28, 25, 27, 26, 1, 257, 2, 0, 6, 5, + 134, 0, 95, 96, 126, 81, 0, 144, 0, 245, + 50, 0, 0, 0, 120, 36, 0, 90, 0, 0, + 0, 247, 0, 0, 0, 0, 42, 0, 0, 4, + 0, 0, 114, 0, 0, 108, 109, 107, 0, 111, + 0, 0, 140, 244, 225, 228, 230, 231, 226, 227, + 232, 0, 143, 145, 220, 221, 222, 229, 223, 224, + 31, 30, 0, 0, 0, 90, 0, 85, 0, 0, + 0, 0, 120, 92, 39, 37, 39, 0, 83, 79, + 80, 261, 260, 0, 133, 113, 0, 103, 102, 126, + 99, 98, 100, 110, 106, 0, 126, 0, 0, 104, + 33, 0, 0, 49, 0, 257, 0, 0, 216, 0, + 0, 0, 0, 0, 0, 0, 218, 0, 119, 148, + 155, 156, 157, 150, 152, 158, 151, 171, 159, 160, + 161, 162, 154, 149, 164, 165, 0, 278, 0, 0, + 88, 0, 0, 91, 0, 35, 40, 82, 23, 0, + 21, 117, 115, 141, 255, 140, 0, 125, 127, 132, + 140, 136, 138, 135, 146, 0, 0, 46, 0, 76, + 51, 257, 114, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 167, 0, 166, 0, 0, 0, 0, 0, + 168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 86, 0, 0, 91, 90, 0, 0, 19, - 0, 0, 117, 113, 0, 250, 0, 251, 144, 94, - 98, 0, 128, 127, 126, 102, 0, 0, 0, 0, + 0, 0, 89, 0, 0, 94, 93, 0, 0, 19, + 0, 0, 120, 116, 0, 253, 0, 254, 147, 97, + 101, 0, 131, 130, 129, 105, 0, 0, 0, 0, 55, 0, 60, 0, 0, 59, 57, 0, 67, 66, - 56, 64, 65, 54, 70, 0, 0, 71, 48, 200, - 0, 214, 216, 0, 204, 205, 206, 207, 208, 209, - 0, 0, 0, 0, 0, 0, 187, 0, 0, 0, - 160, 150, 179, 180, 0, 175, 0, 0, 0, 166, - 0, 178, 177, 193, 194, 195, 196, 197, 198, 199, - 170, 169, 172, 171, 173, 174, 0, 34, 276, 0, - 38, 0, 22, 254, 115, 230, 232, 0, 234, 248, - 233, 119, 139, 249, 125, 136, 134, 0, 44, 0, - 0, 0, 0, 68, 0, 53, 0, 0, 52, 45, - 0, 72, 0, 191, 0, 0, 0, 0, 185, 0, - 0, 0, 210, 0, 176, 0, 0, 0, 167, 211, - 84, 24, 0, 0, 270, 262, 268, 266, 269, 264, - 0, 0, 0, 247, 238, 245, 0, 109, 47, 0, - 0, 0, 0, 69, 0, 0, 201, 0, 0, 189, - 0, 188, 0, 192, 212, 0, 0, 183, 181, 248, - 0, 265, 267, 263, 0, 231, 249, 0, 0, 0, - 61, 63, 0, 0, 202, 203, 186, 190, 184, 182, - 235, 259, 271, 0, 121, 62, 0, 0, 75, 0, - 0, 0, 0, 118, 58, 74, 0, 272, 260, 246, - 120, 213, 0, 261 + 56, 64, 65, 54, 70, 0, 0, 74, 48, 203, + 0, 217, 219, 0, 207, 208, 209, 210, 211, 212, + 0, 0, 0, 0, 0, 0, 190, 0, 0, 0, + 163, 153, 182, 183, 0, 178, 0, 0, 0, 169, + 0, 181, 180, 196, 197, 198, 199, 200, 201, 202, + 173, 172, 175, 174, 176, 177, 0, 34, 279, 0, + 38, 0, 22, 257, 118, 233, 235, 0, 237, 251, + 236, 122, 142, 252, 128, 139, 137, 0, 44, 0, + 0, 0, 0, 68, 0, 73, 0, 0, 52, 45, + 0, 75, 0, 194, 0, 0, 0, 0, 188, 0, + 0, 0, 213, 0, 179, 0, 0, 0, 170, 214, + 87, 24, 0, 0, 273, 265, 271, 269, 272, 267, + 0, 0, 0, 250, 241, 248, 0, 112, 47, 0, + 0, 0, 0, 69, 0, 72, 53, 0, 0, 204, + 0, 0, 192, 0, 191, 0, 195, 215, 0, 0, + 186, 184, 251, 0, 268, 270, 266, 0, 234, 252, + 0, 0, 0, 61, 63, 71, 0, 0, 205, 206, + 189, 193, 187, 185, 238, 262, 274, 0, 124, 62, + 0, 0, 78, 0, 0, 0, 0, 121, 58, 77, + 0, 275, 263, 249, 123, 216, 0, 264 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -403, -403, -403, 461, -403, 506, -403, 251, -403, 196, - -403, -403, -403, -403, 244, -85, 386, -403, -403, -403, - -7, -403, 217, 128, -403, -403, 218, -403, 491, -403, - -403, -403, 415, -403, -403, 342, -173, -76, -403, 7, - -70, -54, -403, -403, -74, 309, -403, -403, -403, -126, - -403, -403, -99, -403, 259, -403, -403, -110, -249, -403, - -77, 261, -136, -133, -403, -403, -403, -403, -403, -403, - 305, -403, -403, -403, -403, -403, -403, -403, -403, -403, - 46, -69, -80, -403, -403, -87, -403, -403, -403, -402, - 86, -403, -403, -403, 1, -403, -403, -403, 88, 347, - -403, -403, -403, -403, 460, -403, -403, -403, -403, -301 + -400, -400, -400, 431, -400, 482, -400, 216, -400, 210, + -400, -400, -400, -400, 220, -85, 363, -400, -400, -400, + 27, -400, 186, 95, -400, -400, -400, 187, -400, 458, + -400, -400, -400, 380, -400, -400, 305, -173, -76, -400, + -5, -70, -50, -400, -400, -75, 274, -400, -400, -400, + -123, -400, -400, 40, -400, 217, -400, -400, 33, -249, + -400, -27, 225, -136, -133, -400, -400, -400, -400, -400, + -400, 272, -400, -400, -400, -400, -400, -400, -400, -400, + -400, 16, -67, -81, -400, -400, -88, -400, -400, -400, + -399, 48, -400, -400, -400, 1, -400, -400, -400, 57, + 306, -400, -400, -400, -400, 427, -400, -400, -400, -400, + -301 }; /* YYDEFGOTO[NTERM-NUM]. */ @@ -1067,15 +1070,16 @@ static const yytype_int16 yydefgoto[] = { -1, 18, 19, 20, 21, 68, 219, 220, 22, 61, 23, 131, 24, 25, 86, 144, 215, 26, 27, 28, - 82, 239, 240, 324, 405, 326, 327, 29, 94, 30, - 31, 32, 140, 33, 142, 143, 34, 159, 160, 161, - 73, 108, 109, 164, 74, 156, 221, 292, 293, 137, - 447, 503, 112, 227, 228, 304, 102, 169, 222, 121, - 122, 223, 224, 189, 190, 191, 192, 193, 194, 195, - 249, 196, 197, 198, 199, 200, 340, 201, 202, 203, - 204, 205, 124, 125, 126, 127, 128, 129, 384, 385, - 386, 387, 388, 49, 389, 80, 92, 443, 444, 445, - 298, 35, 36, 58, 59, 390, 440, 508, 66, 208 + 82, 239, 240, 324, 405, 456, 326, 327, 29, 94, + 30, 31, 32, 140, 33, 142, 143, 34, 159, 160, + 161, 73, 108, 109, 164, 74, 156, 221, 292, 293, + 137, 447, 507, 112, 227, 228, 304, 102, 169, 222, + 121, 122, 223, 224, 189, 190, 191, 192, 193, 194, + 195, 249, 196, 197, 198, 199, 200, 340, 201, 202, + 203, 204, 205, 124, 125, 126, 127, 128, 129, 384, + 385, 386, 387, 388, 49, 389, 80, 92, 443, 444, + 445, 298, 35, 36, 58, 59, 390, 440, 512, 66, + 208 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1083,182 +1087,190 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 188, 104, 237, 39, 349, 146, 42, 397, 123, 145, - 145, 50, 51, 38, 154, 331, 213, 114, 115, 116, - 111, 511, 307, 155, 136, 55, 174, 89, 295, 229, - 502, 231, 233, 38, 162, 166, 295, 162, 83, 475, - 238, 105, 72, 70, 406, 37, 248, 84, 265, 87, - 252, 256, 254, 206, 43, 70, 96, 175, 145, 356, - 225, 209, 52, 44, 406, 56, 90, 230, 328, 40, - 210, 53, 492, 132, 265, 285, 106, 407, 103, 280, - 167, 412, 257, 134, 135, 41, 357, 178, 114, 115, - 116, 48, 242, 45, 243, 149, 150, 407, 168, 258, - 176, 54, 234, 279, 151, 280, 57, 359, 226, 427, - 341, 342, 107, 212, 422, 299, 117, 255, 252, 294, - 305, 352, 353, 105, 360, 60, 354, 46, 355, 179, - 180, 181, 361, 362, 363, 364, 365, 366, 367, 368, - 369, 370, 371, 372, 373, 374, 375, 257, 217, 442, - 300, 294, 162, 71, 483, 118, 119, 296, 106, 178, - 114, 115, 116, 302, 258, 229, 391, 257, 182, 257, - 395, 396, 332, 235, 333, 64, 466, 383, 186, 329, - 67, 497, 257, 403, 258, 120, 258, 117, 257, 303, - 110, 47, 501, 376, 107, 344, 433, 232, 65, 258, - 404, 179, 180, 181, 183, 258, 77, 379, 419, 420, - 432, 381, 62, 63, 345, 123, 417, 184, 247, 123, - 346, 351, 257, 424, 398, 75, 118, 119, 494, 145, - 178, 114, 115, 116, 76, 345, 484, 434, 78, 258, - 182, 418, 435, 185, 186, 79, 81, 416, 436, 437, - 257, 187, 499, 85, 257, 282, 120, 88, 283, 117, - 415, 178, 114, 115, 116, 438, 247, 258, 91, 93, - 439, 258, 179, 180, 181, 97, 183, 421, 457, 100, - 459, 460, 377, 257, 70, 461, 98, 101, 426, 184, - 464, 265, 178, 114, 115, 116, 113, 136, 118, 119, - 258, 500, 130, 179, 180, 181, 133, 178, 114, 115, - 116, 182, 138, 139, 462, 185, 186, 276, 277, 278, - 279, 257, 280, 187, 141, 147, 487, 257, 120, 486, - 117, 114, 148, 71, 250, 180, 181, 153, 258, 116, - 289, 155, 182, 290, 258, 409, 430, 183, 410, 171, - 180, 181, 157, 431, 163, 465, 171, 259, 158, 448, - 184, 117, 283, 165, 507, 456, 510, 170, 294, 118, - 119, 468, 489, 182, 294, 294, 171, 172, 183, 334, - 335, 336, 337, 338, 339, 207, 185, 186, 182, 173, - 214, 184, 117, 260, 187, 218, 211, 236, 110, 120, - 118, 119, 498, 505, 238, 283, 283, 117, 509, 251, - 14, 283, 241, 244, 281, 287, 245, 185, 186, 246, - 253, 284, 184, 288, 251, 187, 306, 291, 294, 309, - 120, 118, 119, 301, 308, 325, 70, 184, 347, 358, - 261, 350, 378, 399, 393, 400, 118, 119, 185, 186, - 401, 402, 414, 413, 356, 257, 187, 425, 428, 280, - 262, 120, 429, 185, 186, 433, 441, 263, 264, 446, - 449, 187, 450, 451, 265, 266, 120, 452, 453, 454, - 455, 470, 463, 467, 469, 471, 472, 473, 267, 268, - 269, 270, 271, 474, 433, 272, 273, -273, 274, 275, - 276, 277, 278, 279, 1, 280, 434, 476, 478, 477, - 479, 435, 2, 480, 481, 482, 493, 436, 437, 3, - 485, 488, 496, 4, 495, 504, 99, 243, 506, 69, - 513, 380, 216, 5, 438, 434, 6, 7, -271, 439, - 435, 382, 408, 458, 411, 95, 436, 437, 8, 9, - 177, 330, 512, 343, 286, 392, 491, 490, 152, 10, - 394, 0, 1, 438, 0, 0, 0, -271, 439, 0, - 2, 297, 260, 0, 0, 0, 0, 3, 0, 0, - 0, 4, 0, 11, 0, 0, 0, 12, 0, 0, - 0, 5, 0, 0, 6, 7, 0, 0, 0, 0, - 0, 0, 13, 0, 0, 0, 8, 9, 14, 0, - 0, -236, 0, 0, 0, 0, 260, 10, 0, 261, + 188, 104, 237, 39, 349, 146, 42, 397, 145, 145, + 123, 50, 51, 154, 114, 115, 116, 38, 331, 213, + 515, 70, 307, 155, 111, 136, 295, 174, 506, 229, + 72, 231, 233, 162, 105, 166, 162, 238, 302, 55, + 454, 167, 478, 257, 37, 38, 248, 84, 89, 87, + 252, 256, 254, 206, 257, 406, 96, 145, 175, 168, + 258, 406, 265, 257, 303, 40, 103, 295, 328, 106, + 210, 258, 83, 455, 41, 285, 43, 52, 496, 56, + 258, 412, 257, 134, 135, 44, 53, 90, 407, 46, + 47, 279, 151, 280, 407, 149, 150, 351, 356, 258, + 48, 176, 247, 257, 234, 107, 257, 132, 488, 427, + 341, 342, 226, 117, 212, 45, 54, 255, 252, 105, + 258, 352, 353, 258, 265, 357, 354, 282, 355, 57, + 283, 71, 361, 362, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 442, 217, 294, + 300, 162, 118, 119, 106, 280, 416, 487, 64, 178, + 114, 115, 116, 257, 344, 229, 242, 75, 243, 391, + 395, 396, 417, 235, 333, 332, 469, 186, 257, 329, + 258, 383, 120, 345, 79, 501, 110, 265, 296, 346, + 107, 345, 376, 433, 257, 258, 505, 418, 465, 225, + 60, 179, 180, 181, 415, 257, 230, 65, 419, 420, + 432, 258, 359, 276, 277, 278, 279, 123, 280, 70, + 403, 123, 258, 424, 398, 209, 62, 63, 145, 360, + 257, 498, 464, 257, 434, 490, 67, 404, 76, 435, + 182, 178, 114, 115, 116, 436, 437, 258, 78, 77, + 258, 422, 178, 114, 115, 116, 294, 379, 299, 117, + 85, 381, 438, 305, 81, 289, -274, 439, 290, 232, + 334, 335, 336, 337, 338, 339, 183, 421, 460, 88, + 462, 463, 377, 179, 180, 181, 91, 93, 426, 184, + 467, 97, 98, 100, 179, 180, 181, 409, 118, 119, + 410, 101, 178, 114, 115, 116, 70, 430, 431, 448, + 171, 171, 283, 113, 459, 185, 186, 294, 130, 133, + 138, 433, 182, 187, 136, 141, 147, 471, 120, 491, + 294, 114, 139, 182, 178, 114, 115, 116, 148, -239, + 493, 117, 71, 294, 179, 180, 181, 502, 247, 153, + 283, 509, 117, 513, 283, 468, 283, 116, 183, 155, + 157, 158, 434, 163, 165, 171, 170, 435, 511, 183, + 514, 184, 207, 436, 437, 172, 250, 180, 181, 173, + 118, 119, 184, 182, 178, 114, 115, 116, 211, 214, + 438, 118, 119, 218, -274, 439, 110, 185, 186, 236, + 14, 238, 117, 241, 244, 187, 253, 287, 185, 186, + 120, 245, 281, 246, 284, 182, 187, 291, 288, 183, + 306, 120, 308, 294, 301, 259, 350, 180, 181, 309, + 325, 70, 184, 347, 117, 358, 378, 393, 400, 399, + 401, 118, 119, 402, 356, 413, 414, 257, 425, 428, + 280, 251, 429, 441, 446, 449, 450, 451, 185, 186, + 452, 260, 457, 453, 184, 182, 187, -240, 458, 473, + 466, 120, 470, 118, 119, 472, 474, 475, 476, 479, + 477, 433, 480, 481, 117, 483, 484, 482, 486, 485, + 185, 186, 500, 489, 492, 497, 99, 499, 187, 243, + 508, 251, 510, 120, 517, 69, 382, 380, 261, 216, + 461, 408, 95, 411, 184, 177, 330, 286, 394, 392, + 343, 495, 434, 118, 119, 152, 516, 435, 262, 494, + 297, 0, 0, 436, 437, 263, 264, 503, 0, -276, + 185, 186, 265, 266, 0, 0, 1, 0, 187, 0, + 438, 0, 0, 120, 2, 439, 267, 268, 269, 270, + 271, 3, 0, 272, 273, 4, 274, 275, 276, 277, + 278, 279, 0, 280, 0, 5, 0, 1, 6, 7, + 0, 0, 0, 0, 0, 2, 504, 0, 0, 0, + 8, 9, 3, 0, 0, 0, 4, 0, 260, 0, + 0, 10, 0, 0, 0, 0, 5, 0, 0, 6, + 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 8, 9, 0, 0, 11, 0, 0, 0, 12, + 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 13, 261, 0, 0, 0, 0, + 14, 260, 0, 0, 0, 0, 11, 0, 0, 423, + 12, 0, 0, 0, 0, 348, 0, 0, 0, 0, + 0, 0, 0, 264, 0, 13, 0, 0, 0, 265, + 266, 14, 0, 0, 15, 16, 17, 260, 0, 0, + 0, 0, 0, 267, 268, 269, 270, 271, 261, 0, + 272, 273, 0, 274, 275, 276, 277, 278, 279, 0, + 280, 0, 0, 0, 0, 15, 16, 17, 348, 0, + 0, 0, 0, 260, 0, 0, 264, 0, 0, 0, + 0, 0, 265, 266, -277, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 267, 268, 269, 270, + 271, 0, 0, 272, 273, 0, 274, 275, 276, 277, + 278, 279, 264, 280, 0, 0, 0, 0, 265, -277, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 423, 0, 0, 0, 0, 0, 348, - -237, 11, 15, 16, 17, 12, 0, 264, 0, 0, - 0, 0, 260, 265, 266, 0, 0, 0, 0, 0, - 13, 0, 0, 261, 0, 0, 14, 267, 268, 269, - 270, 271, 0, 0, 272, 273, 0, 274, 275, 276, - 277, 278, 279, 348, 280, 0, 0, 0, 260, 0, - 0, 264, 0, 0, 0, 0, 0, 265, 266, -274, - 15, 16, 17, 0, 0, 0, 0, 0, 0, 0, - 0, 267, 268, 269, 270, 271, 0, 0, 272, 273, - 0, 274, 275, 276, 277, 278, 279, 264, 280, 0, - 0, 0, 0, 265, -274, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, -274, -274, -274, - 270, 271, 0, 0, 272, 273, 0, 274, 275, 276, - 277, 278, 279, 264, 280, 310, 0, 0, 0, 265, - 311, 0, 312, 313, 0, 314, 0, 0, 0, 0, - 0, 0, 0, 315, 0, 0, -274, -274, 0, 0, - -274, -274, 0, 274, 275, 276, 277, 278, 279, 0, - 280, 0, 0, 0, 0, 0, 0, 0, 0, 316, + 0, 0, -277, -277, -277, 270, 271, 0, 0, 272, + 273, 0, 274, 275, 276, 277, 278, 279, 264, 280, + 310, 0, 0, 0, 265, 311, 0, 312, 313, 0, + 314, 0, 0, 0, 0, 0, 0, 0, 315, 0, + 0, -277, -277, 0, 0, -277, -277, 0, 274, 275, + 276, 277, 278, 279, 0, 280, 0, 0, 0, 0, + 0, 0, 0, 0, 316, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 317, 0, 318, 319, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 320, 0, 0, 0, 321, 0, 322, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 323 + 0, 317, 0, 318, 319, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 320, 0, + 0, 0, 321, 0, 322, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 323 }; static const yytype_int16 yycheck[] = { - 136, 71, 175, 2, 253, 90, 5, 308, 77, 89, - 90, 10, 11, 3, 101, 3, 142, 4, 5, 6, - 74, 3, 54, 12, 82, 19, 93, 93, 3, 165, - 50, 167, 168, 3, 108, 111, 3, 111, 45, 441, - 3, 9, 35, 57, 27, 26, 182, 46, 134, 48, - 183, 187, 185, 138, 70, 57, 55, 124, 138, 100, - 159, 63, 70, 79, 27, 59, 132, 166, 241, 3, - 140, 79, 474, 80, 134, 211, 44, 60, 71, 165, - 54, 330, 114, 82, 83, 3, 127, 3, 4, 5, - 6, 97, 167, 109, 169, 94, 95, 60, 72, 131, - 167, 109, 171, 163, 97, 165, 3, 103, 162, 358, - 246, 247, 80, 171, 166, 225, 103, 187, 251, 171, - 230, 257, 258, 9, 120, 144, 259, 93, 261, 45, - 46, 47, 265, 266, 267, 268, 269, 270, 271, 272, - 273, 274, 275, 276, 277, 278, 279, 114, 147, 124, - 226, 171, 226, 167, 455, 142, 143, 124, 44, 3, - 4, 5, 6, 89, 131, 301, 292, 114, 84, 114, - 306, 307, 160, 172, 244, 0, 425, 167, 160, 168, - 111, 482, 114, 103, 131, 172, 131, 103, 114, 115, - 76, 93, 493, 280, 80, 91, 25, 113, 170, 131, - 120, 45, 46, 47, 120, 131, 167, 284, 344, 345, - 383, 288, 16, 17, 110, 284, 91, 133, 110, 288, - 116, 168, 114, 356, 309, 3, 142, 143, 477, 309, - 3, 4, 5, 6, 169, 110, 168, 66, 93, 131, - 84, 116, 71, 159, 160, 3, 126, 107, 77, 78, - 114, 167, 81, 3, 114, 168, 172, 122, 171, 103, - 124, 3, 4, 5, 6, 94, 110, 131, 3, 126, - 99, 131, 45, 46, 47, 124, 120, 347, 414, 96, - 416, 417, 281, 114, 57, 116, 171, 123, 358, 133, - 423, 134, 3, 4, 5, 6, 3, 82, 142, 143, - 131, 130, 4, 45, 46, 47, 120, 3, 4, 5, - 6, 84, 92, 167, 107, 159, 160, 160, 161, 162, - 163, 114, 165, 167, 3, 130, 462, 114, 172, 116, - 103, 4, 45, 167, 45, 46, 47, 167, 131, 6, - 168, 12, 84, 171, 131, 168, 168, 120, 171, 171, - 46, 47, 168, 168, 113, 425, 171, 17, 168, 168, - 133, 103, 171, 125, 500, 168, 502, 168, 171, 142, - 143, 168, 168, 84, 171, 171, 171, 130, 120, 136, - 137, 138, 139, 140, 141, 3, 159, 160, 84, 45, - 111, 133, 103, 53, 167, 3, 148, 3, 76, 172, - 142, 143, 168, 168, 3, 171, 171, 103, 168, 120, - 111, 171, 124, 167, 97, 48, 167, 159, 160, 167, - 165, 167, 133, 167, 120, 167, 54, 93, 171, 92, - 172, 142, 143, 171, 167, 171, 57, 133, 167, 167, - 100, 168, 3, 30, 3, 167, 142, 143, 159, 160, - 167, 167, 93, 168, 100, 114, 167, 167, 103, 165, - 120, 172, 166, 159, 160, 25, 171, 127, 128, 69, - 167, 167, 6, 6, 134, 135, 172, 6, 103, 119, - 167, 98, 168, 168, 168, 77, 77, 77, 148, 149, - 150, 151, 152, 98, 25, 155, 156, 0, 158, 159, - 160, 161, 162, 163, 7, 165, 66, 3, 6, 125, - 171, 71, 15, 168, 168, 167, 167, 77, 78, 22, - 168, 168, 6, 26, 168, 168, 65, 169, 167, 23, - 168, 287, 146, 36, 94, 66, 39, 40, 98, 99, - 71, 290, 325, 415, 326, 54, 77, 78, 51, 52, - 135, 242, 506, 248, 212, 294, 470, 469, 98, 62, - 301, -1, 7, 94, -1, -1, -1, 98, 99, -1, - 15, 224, 53, -1, -1, -1, -1, 22, -1, -1, - -1, 26, -1, 86, -1, -1, -1, 90, -1, -1, - -1, 36, -1, -1, 39, 40, -1, -1, -1, -1, - -1, -1, 105, -1, -1, -1, 51, 52, 111, -1, - -1, 171, -1, -1, -1, -1, 53, 62, -1, 100, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 114, -1, -1, -1, -1, -1, 120, - 171, 86, 145, 146, 147, 90, -1, 128, -1, -1, - -1, -1, 53, 134, 135, -1, -1, -1, -1, -1, - 105, -1, -1, 100, -1, -1, 111, 148, 149, 150, - 151, 152, -1, -1, 155, 156, -1, 158, 159, 160, - 161, 162, 163, 120, 165, -1, -1, -1, 53, -1, - -1, 128, -1, -1, -1, -1, -1, 134, 135, 100, - 145, 146, 147, -1, -1, -1, -1, -1, -1, -1, - -1, 148, 149, 150, 151, 152, -1, -1, 155, 156, - -1, 158, 159, 160, 161, 162, 163, 128, 165, -1, - -1, -1, -1, 134, 135, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 148, 149, 150, - 151, 152, -1, -1, 155, 156, -1, 158, 159, 160, - 161, 162, 163, 128, 165, 24, -1, -1, -1, 134, - 29, -1, 31, 32, -1, 34, -1, -1, -1, -1, - -1, -1, -1, 42, -1, -1, 151, 152, -1, -1, + 136, 71, 175, 2, 253, 90, 5, 308, 89, 90, + 77, 10, 11, 101, 4, 5, 6, 3, 3, 142, + 3, 57, 54, 12, 74, 82, 3, 93, 50, 165, + 35, 167, 168, 108, 9, 111, 111, 3, 89, 19, + 27, 54, 441, 114, 26, 3, 182, 46, 93, 48, + 183, 187, 185, 138, 114, 27, 55, 138, 124, 72, + 131, 27, 134, 114, 115, 3, 71, 3, 241, 44, + 140, 131, 45, 60, 3, 211, 70, 70, 477, 59, + 131, 330, 114, 82, 83, 79, 79, 132, 60, 93, + 93, 163, 97, 165, 60, 94, 95, 168, 100, 131, + 97, 167, 110, 114, 171, 80, 114, 80, 168, 358, + 246, 247, 162, 103, 171, 109, 109, 187, 251, 9, + 131, 257, 258, 131, 134, 127, 259, 168, 261, 3, + 171, 167, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 124, 147, 171, + 226, 226, 142, 143, 44, 165, 107, 458, 0, 3, + 4, 5, 6, 114, 91, 301, 167, 3, 169, 292, + 306, 307, 91, 172, 244, 160, 425, 160, 114, 168, + 131, 167, 172, 110, 3, 486, 76, 134, 124, 116, + 80, 110, 280, 25, 114, 131, 497, 116, 107, 159, + 144, 45, 46, 47, 124, 114, 166, 170, 344, 345, + 383, 131, 103, 160, 161, 162, 163, 284, 165, 57, + 103, 288, 131, 356, 309, 63, 16, 17, 309, 120, + 114, 480, 116, 114, 66, 116, 111, 120, 169, 71, + 84, 3, 4, 5, 6, 77, 78, 131, 93, 167, + 131, 166, 3, 4, 5, 6, 171, 284, 225, 103, + 3, 288, 94, 230, 126, 168, 98, 99, 171, 113, + 136, 137, 138, 139, 140, 141, 120, 347, 414, 122, + 416, 417, 281, 45, 46, 47, 3, 126, 358, 133, + 423, 124, 171, 96, 45, 46, 47, 168, 142, 143, + 171, 123, 3, 4, 5, 6, 57, 168, 168, 168, + 171, 171, 171, 3, 168, 159, 160, 171, 4, 120, + 92, 25, 84, 167, 82, 3, 130, 168, 172, 465, + 171, 4, 167, 84, 3, 4, 5, 6, 45, 171, + 168, 103, 167, 171, 45, 46, 47, 168, 110, 167, + 171, 168, 103, 168, 171, 425, 171, 6, 120, 12, + 168, 168, 66, 113, 125, 171, 168, 71, 504, 120, + 506, 133, 3, 77, 78, 130, 45, 46, 47, 45, + 142, 143, 133, 84, 3, 4, 5, 6, 148, 111, + 94, 142, 143, 3, 98, 99, 76, 159, 160, 3, + 111, 3, 103, 124, 167, 167, 165, 48, 159, 160, + 172, 167, 97, 167, 167, 84, 167, 93, 167, 120, + 54, 172, 167, 171, 171, 17, 168, 46, 47, 92, + 171, 57, 133, 167, 103, 167, 3, 3, 167, 30, + 167, 142, 143, 167, 100, 168, 93, 114, 167, 103, + 165, 120, 166, 171, 69, 167, 6, 6, 159, 160, + 6, 53, 119, 103, 133, 84, 167, 171, 167, 98, + 168, 172, 168, 142, 143, 168, 77, 77, 77, 3, + 98, 25, 125, 6, 103, 168, 168, 171, 167, 119, + 159, 160, 6, 168, 168, 167, 65, 168, 167, 169, + 168, 120, 167, 172, 168, 23, 290, 287, 100, 146, + 415, 325, 54, 326, 133, 135, 242, 212, 301, 294, + 248, 473, 66, 142, 143, 98, 510, 71, 120, 472, + 224, -1, -1, 77, 78, 127, 128, 81, -1, 0, + 159, 160, 134, 135, -1, -1, 7, -1, 167, -1, + 94, -1, -1, 172, 15, 99, 148, 149, 150, 151, + 152, 22, -1, 155, 156, 26, 158, 159, 160, 161, + 162, 163, -1, 165, -1, 36, -1, 7, 39, 40, + -1, -1, -1, -1, -1, 15, 130, -1, -1, -1, + 51, 52, 22, -1, -1, -1, 26, -1, 53, -1, + -1, 62, -1, -1, -1, -1, 36, -1, -1, 39, + 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 51, 52, -1, -1, 86, -1, -1, -1, 90, + -1, -1, 62, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 105, 100, -1, -1, -1, -1, + 111, 53, -1, -1, -1, -1, 86, -1, -1, 114, + 90, -1, -1, -1, -1, 120, -1, -1, -1, -1, + -1, -1, -1, 128, -1, 105, -1, -1, -1, 134, + 135, 111, -1, -1, 145, 146, 147, 53, -1, -1, + -1, -1, -1, 148, 149, 150, 151, 152, 100, -1, 155, 156, -1, 158, 159, 160, 161, 162, 163, -1, - 165, -1, -1, -1, -1, -1, -1, -1, -1, 68, + 165, -1, -1, -1, -1, 145, 146, 147, 120, -1, + -1, -1, -1, 53, -1, -1, 128, -1, -1, -1, + -1, -1, 134, 135, 100, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 148, 149, 150, 151, + 152, -1, -1, 155, 156, -1, 158, 159, 160, 161, + 162, 163, 128, 165, -1, -1, -1, -1, 134, 135, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 85, -1, 87, 88, + -1, -1, 148, 149, 150, 151, 152, -1, -1, 155, + 156, -1, 158, 159, 160, 161, 162, 163, 128, 165, + 24, -1, -1, -1, 134, 29, -1, 31, 32, -1, + 34, -1, -1, -1, -1, -1, -1, -1, 42, -1, + -1, 151, 152, -1, -1, 155, 156, -1, 158, 159, + 160, 161, 162, 163, -1, 165, -1, -1, -1, -1, + -1, -1, -1, -1, 68, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 102, -1, -1, -1, 106, -1, 108, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 118 + -1, 85, -1, 87, 88, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 102, -1, + -1, -1, 106, -1, 108, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 118 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1267,56 +1279,56 @@ static const yytype_int16 yystos[] = { 0, 7, 15, 22, 26, 36, 39, 40, 51, 52, 62, 86, 90, 105, 111, 145, 146, 147, 174, 175, - 176, 177, 181, 183, 185, 186, 190, 191, 192, 200, - 202, 203, 204, 206, 209, 274, 275, 26, 3, 267, - 3, 3, 267, 70, 79, 109, 93, 93, 97, 266, - 267, 267, 70, 79, 109, 19, 59, 3, 276, 277, - 144, 182, 182, 182, 0, 170, 281, 111, 178, 178, - 57, 167, 212, 213, 217, 3, 169, 167, 93, 3, - 268, 126, 193, 193, 267, 3, 187, 267, 122, 93, - 132, 3, 269, 126, 201, 201, 267, 124, 171, 176, - 96, 123, 229, 212, 213, 9, 44, 80, 214, 215, - 76, 214, 225, 3, 4, 5, 6, 103, 142, 143, - 172, 232, 233, 254, 255, 256, 257, 258, 259, 260, - 4, 184, 193, 120, 267, 267, 82, 222, 92, 167, - 205, 3, 207, 208, 188, 255, 188, 130, 45, 267, - 267, 212, 277, 167, 258, 12, 218, 168, 168, 210, - 211, 212, 217, 113, 216, 125, 210, 54, 72, 230, - 168, 171, 130, 45, 93, 124, 167, 205, 3, 45, - 46, 47, 84, 120, 133, 159, 160, 167, 235, 236, - 237, 238, 239, 240, 241, 242, 244, 245, 246, 247, - 248, 250, 251, 252, 253, 254, 188, 3, 282, 63, - 213, 148, 171, 222, 111, 189, 189, 267, 3, 179, - 180, 219, 231, 234, 235, 225, 214, 226, 227, 235, - 225, 235, 113, 235, 254, 267, 3, 209, 3, 194, - 195, 124, 167, 169, 167, 167, 167, 110, 235, 243, - 45, 120, 236, 165, 236, 213, 235, 114, 131, 17, + 176, 177, 181, 183, 185, 186, 190, 191, 192, 201, + 203, 204, 205, 207, 210, 275, 276, 26, 3, 268, + 3, 3, 268, 70, 79, 109, 93, 93, 97, 267, + 268, 268, 70, 79, 109, 19, 59, 3, 277, 278, + 144, 182, 182, 182, 0, 170, 282, 111, 178, 178, + 57, 167, 213, 214, 218, 3, 169, 167, 93, 3, + 269, 126, 193, 193, 268, 3, 187, 268, 122, 93, + 132, 3, 270, 126, 202, 202, 268, 124, 171, 176, + 96, 123, 230, 213, 214, 9, 44, 80, 215, 216, + 76, 215, 226, 3, 4, 5, 6, 103, 142, 143, + 172, 233, 234, 255, 256, 257, 258, 259, 260, 261, + 4, 184, 193, 120, 268, 268, 82, 223, 92, 167, + 206, 3, 208, 209, 188, 256, 188, 130, 45, 268, + 268, 213, 278, 167, 259, 12, 219, 168, 168, 211, + 212, 213, 218, 113, 217, 125, 211, 54, 72, 231, + 168, 171, 130, 45, 93, 124, 167, 206, 3, 45, + 46, 47, 84, 120, 133, 159, 160, 167, 236, 237, + 238, 239, 240, 241, 242, 243, 245, 246, 247, 248, + 249, 251, 252, 253, 254, 255, 188, 3, 283, 63, + 214, 148, 171, 223, 111, 189, 189, 268, 3, 179, + 180, 220, 232, 235, 236, 226, 215, 227, 228, 236, + 226, 236, 113, 236, 255, 268, 3, 210, 3, 194, + 195, 124, 167, 169, 167, 167, 167, 110, 236, 244, + 45, 120, 237, 165, 237, 214, 236, 114, 131, 17, 53, 100, 120, 127, 128, 134, 135, 148, 149, 150, 151, 152, 155, 156, 158, 159, 160, 161, 162, 163, - 165, 97, 168, 171, 167, 235, 208, 48, 167, 168, - 171, 93, 220, 221, 171, 3, 124, 272, 273, 230, - 210, 171, 89, 115, 228, 230, 54, 54, 167, 92, + 165, 97, 168, 171, 167, 236, 209, 48, 167, 168, + 171, 93, 221, 222, 171, 3, 124, 273, 274, 231, + 211, 171, 89, 115, 229, 231, 54, 54, 167, 92, 24, 29, 31, 32, 34, 42, 68, 85, 87, 88, - 102, 106, 108, 118, 196, 171, 198, 199, 209, 168, - 218, 3, 160, 213, 136, 137, 138, 139, 140, 141, - 249, 235, 235, 243, 91, 110, 116, 167, 120, 231, - 168, 168, 235, 235, 236, 236, 100, 127, 167, 103, - 120, 236, 236, 236, 236, 236, 236, 236, 236, 236, - 236, 236, 236, 236, 236, 236, 258, 267, 3, 233, - 187, 233, 180, 167, 261, 262, 263, 264, 265, 267, - 278, 222, 234, 3, 227, 235, 235, 282, 188, 30, + 102, 106, 108, 118, 196, 171, 199, 200, 210, 168, + 219, 3, 160, 214, 136, 137, 138, 139, 140, 141, + 250, 236, 236, 244, 91, 110, 116, 167, 120, 232, + 168, 168, 236, 236, 237, 237, 100, 127, 167, 103, + 120, 237, 237, 237, 237, 237, 237, 237, 237, 237, + 237, 237, 237, 237, 237, 237, 259, 268, 3, 234, + 187, 234, 180, 167, 262, 263, 264, 265, 266, 268, + 279, 223, 235, 3, 228, 236, 236, 283, 188, 30, 167, 167, 167, 103, 120, 197, 27, 60, 195, 168, - 171, 199, 231, 168, 93, 124, 107, 91, 116, 235, - 235, 213, 166, 114, 236, 167, 213, 231, 103, 166, - 168, 168, 209, 25, 66, 71, 77, 78, 94, 99, - 279, 171, 124, 270, 271, 272, 69, 223, 168, 167, - 6, 6, 6, 103, 119, 167, 168, 235, 196, 235, - 235, 116, 107, 168, 236, 213, 231, 168, 168, 168, - 98, 77, 77, 77, 98, 262, 3, 125, 6, 171, - 168, 168, 167, 282, 168, 168, 116, 235, 168, 168, - 271, 263, 262, 167, 231, 168, 6, 282, 168, 81, - 130, 282, 50, 224, 168, 168, 167, 235, 280, 168, - 235, 3, 253, 168 + 171, 200, 232, 168, 93, 124, 107, 91, 116, 236, + 236, 214, 166, 114, 237, 167, 214, 232, 103, 166, + 168, 168, 210, 25, 66, 71, 77, 78, 94, 99, + 280, 171, 124, 271, 272, 273, 69, 224, 168, 167, + 6, 6, 6, 103, 27, 60, 198, 119, 167, 168, + 236, 196, 236, 236, 116, 107, 168, 237, 214, 232, + 168, 168, 168, 98, 77, 77, 77, 98, 263, 3, + 125, 6, 171, 168, 168, 119, 167, 283, 168, 168, + 116, 236, 168, 168, 272, 264, 263, 167, 232, 168, + 6, 283, 168, 81, 130, 283, 50, 225, 168, 168, + 167, 236, 281, 168, 236, 3, 254, 168 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ @@ -1329,27 +1341,27 @@ static const yytype_int16 yyr1[] = 190, 191, 191, 191, 192, 192, 192, 192, 192, 193, 193, 194, 194, 195, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 197, 197, - 197, 198, 198, 198, 199, 199, 200, 200, 200, 200, - 201, 201, 202, 203, 204, 204, 205, 205, 206, 207, - 207, 208, 209, 209, 209, 210, 210, 211, 211, 212, - 212, 213, 213, 214, 215, 215, 215, 216, 216, 217, - 218, 218, 219, 220, 220, 221, 222, 222, 223, 223, - 224, 224, 225, 225, 226, 226, 227, 228, 228, 228, - 229, 229, 230, 230, 230, 230, 230, 230, 231, 231, - 232, 232, 233, 233, 234, 235, 235, 235, 235, 235, - 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, - 236, 237, 237, 238, 238, 238, 238, 238, 239, 239, - 239, 239, 239, 239, 239, 239, 239, 239, 239, 240, - 240, 241, 241, 241, 241, 242, 242, 242, 242, 243, - 243, 244, 244, 245, 245, 245, 245, 245, 245, 245, - 246, 246, 247, 248, 249, 249, 249, 249, 249, 249, - 250, 251, 252, 253, 253, 253, 253, 254, 254, 254, - 254, 254, 255, 256, 256, 257, 257, 258, 259, 260, - 261, 261, 262, 262, 263, 263, 264, 264, 265, 266, - 267, 267, 268, 268, 269, 270, 270, 271, 271, 272, - 272, 273, 273, 274, 274, 275, 276, 276, 277, 278, - 278, 278, 279, 279, 279, 279, 279, 279, 279, 279, - 279, 279, 280, 281, 281, 282, 282 + 197, 198, 198, 198, 199, 199, 199, 200, 200, 201, + 201, 201, 201, 202, 202, 203, 204, 205, 205, 206, + 206, 207, 208, 208, 209, 210, 210, 210, 211, 211, + 212, 212, 213, 213, 214, 214, 215, 216, 216, 216, + 217, 217, 218, 219, 219, 220, 221, 221, 222, 223, + 223, 224, 224, 225, 225, 226, 226, 227, 227, 228, + 229, 229, 229, 230, 230, 231, 231, 231, 231, 231, + 231, 232, 232, 233, 233, 234, 234, 235, 236, 236, + 236, 236, 236, 237, 237, 237, 237, 237, 237, 237, + 237, 237, 237, 237, 238, 238, 239, 239, 239, 239, + 239, 240, 240, 240, 240, 240, 240, 240, 240, 240, + 240, 240, 241, 241, 242, 242, 242, 242, 243, 243, + 243, 243, 244, 244, 245, 245, 246, 246, 246, 246, + 246, 246, 246, 247, 247, 248, 249, 250, 250, 250, + 250, 250, 250, 251, 252, 253, 254, 254, 254, 254, + 255, 255, 255, 255, 255, 256, 257, 257, 258, 258, + 259, 260, 261, 262, 262, 263, 263, 264, 264, 265, + 265, 266, 267, 268, 268, 269, 269, 270, 271, 271, + 272, 272, 273, 273, 274, 274, 275, 275, 276, 277, + 277, 278, 279, 279, 279, 280, 280, 280, 280, 280, + 280, 280, 280, 280, 280, 281, 282, 282, 283, 283 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -1360,29 +1372,29 @@ static const yytype_int8 yyr2[] = 0, 1, 3, 1, 4, 2, 2, 2, 1, 0, 4, 1, 2, 5, 7, 5, 1, 1, 3, 0, 5, 2, 3, 2, 8, 8, 6, 9, 7, 3, - 0, 1, 3, 3, 1, 1, 1, 1, 6, 1, + 0, 1, 3, 4, 1, 1, 1, 1, 6, 1, 1, 4, 5, 4, 1, 1, 1, 1, 1, 2, - 0, 1, 2, 0, 6, 5, 4, 4, 3, 5, - 2, 0, 4, 2, 8, 5, 3, 0, 5, 1, - 3, 3, 2, 2, 6, 1, 1, 1, 3, 3, - 3, 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, 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, 6, 1, 1, 1, 1, 1, 1, - 4, 4, 5, 1, 3, 1, 3, 1, 1, 1, + 0, 2, 1, 0, 1, 2, 0, 6, 5, 4, + 4, 3, 5, 2, 0, 4, 2, 8, 5, 3, + 0, 5, 1, 3, 3, 2, 2, 6, 1, 1, + 1, 3, 3, 3, 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, 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, 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, 3, 1, 1, 1, 4, 1, 3, 2, 1, - 1, 3, 1, 0, 1, 1, 5, 1, 0, 2, - 1, 1, 0, 1, 0, 2, 1, 3, 3, 4, - 6, 8, 1, 2, 1, 2, 1, 2, 1, 1, - 1, 0, 1, 1, 0, 1, 3 + 1, 1, 1, 1, 3, 1, 1, 1, 4, 1, + 3, 2, 1, 1, 3, 1, 0, 1, 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 }; @@ -1891,31 +1903,31 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio switch (yytype) { case 3: /* IDENTIFIER */ -#line 151 "bison_parser.y" +#line 152 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1897 "bison_parser.cpp" +#line 1909 "bison_parser.cpp" break; case 4: /* STRING */ -#line 151 "bison_parser.y" +#line 152 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1903 "bison_parser.cpp" +#line 1915 "bison_parser.cpp" break; case 5: /* FLOATVAL */ -#line 149 "bison_parser.y" +#line 150 "bison_parser.y" { } -#line 1909 "bison_parser.cpp" +#line 1921 "bison_parser.cpp" break; case 6: /* INTVAL */ -#line 149 "bison_parser.y" +#line 150 "bison_parser.y" { } -#line 1915 "bison_parser.cpp" +#line 1927 "bison_parser.cpp" break; case 175: /* statement_list */ -#line 152 "bison_parser.y" +#line 153 "bison_parser.y" { if ((((*yyvaluep).stmt_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).stmt_vec))) { @@ -1924,23 +1936,23 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).stmt_vec)); } -#line 1928 "bison_parser.cpp" +#line 1940 "bison_parser.cpp" break; case 176: /* statement */ -#line 160 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 1934 "bison_parser.cpp" +#line 1946 "bison_parser.cpp" break; case 177: /* preparable_statement */ -#line 160 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 1940 "bison_parser.cpp" +#line 1952 "bison_parser.cpp" break; case 178: /* opt_hints */ -#line 152 "bison_parser.y" +#line 153 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -1949,11 +1961,11 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1953 "bison_parser.cpp" +#line 1965 "bison_parser.cpp" break; case 179: /* hint_list */ -#line 152 "bison_parser.y" +#line 153 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -1962,89 +1974,89 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1966 "bison_parser.cpp" +#line 1978 "bison_parser.cpp" break; case 180: /* hint */ -#line 160 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 1972 "bison_parser.cpp" +#line 1984 "bison_parser.cpp" break; case 181: /* transaction_statement */ -#line 160 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).transaction_stmt)); } -#line 1978 "bison_parser.cpp" +#line 1990 "bison_parser.cpp" break; case 183: /* prepare_statement */ -#line 160 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).prep_stmt)); } -#line 1984 "bison_parser.cpp" +#line 1996 "bison_parser.cpp" break; case 184: /* prepare_target_query */ -#line 151 "bison_parser.y" +#line 152 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1990 "bison_parser.cpp" +#line 2002 "bison_parser.cpp" break; case 185: /* execute_statement */ -#line 160 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).exec_stmt)); } -#line 1996 "bison_parser.cpp" +#line 2008 "bison_parser.cpp" break; case 186: /* import_statement */ -#line 160 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).import_stmt)); } -#line 2002 "bison_parser.cpp" +#line 2014 "bison_parser.cpp" break; case 187: /* file_type */ -#line 149 "bison_parser.y" +#line 150 "bison_parser.y" { } -#line 2008 "bison_parser.cpp" +#line 2020 "bison_parser.cpp" break; case 188: /* file_path */ -#line 151 "bison_parser.y" +#line 152 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2014 "bison_parser.cpp" +#line 2026 "bison_parser.cpp" break; case 189: /* opt_file_type */ -#line 149 "bison_parser.y" +#line 150 "bison_parser.y" { } -#line 2020 "bison_parser.cpp" +#line 2032 "bison_parser.cpp" break; case 190: /* export_statement */ -#line 160 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).export_stmt)); } -#line 2026 "bison_parser.cpp" +#line 2038 "bison_parser.cpp" break; case 191: /* show_statement */ -#line 160 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).show_stmt)); } -#line 2032 "bison_parser.cpp" +#line 2044 "bison_parser.cpp" break; case 192: /* create_statement */ -#line 160 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).create_stmt)); } -#line 2038 "bison_parser.cpp" +#line 2050 "bison_parser.cpp" break; case 193: /* opt_not_exists */ -#line 149 "bison_parser.y" +#line 150 "bison_parser.y" { } -#line 2044 "bison_parser.cpp" +#line 2056 "bison_parser.cpp" break; case 194: /* column_def_commalist */ -#line 152 "bison_parser.y" +#line 153 "bison_parser.y" { if ((((*yyvaluep).column_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).column_vec))) { @@ -2053,71 +2065,77 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).column_vec)); } -#line 2057 "bison_parser.cpp" +#line 2069 "bison_parser.cpp" break; case 195: /* column_def */ -#line 160 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).column_t)); } -#line 2063 "bison_parser.cpp" +#line 2075 "bison_parser.cpp" break; case 196: /* column_type */ -#line 149 "bison_parser.y" +#line 150 "bison_parser.y" { } -#line 2069 "bison_parser.cpp" +#line 2081 "bison_parser.cpp" break; case 197: /* opt_column_nullable */ -#line 149 "bison_parser.y" +#line 150 "bison_parser.y" { } -#line 2075 "bison_parser.cpp" +#line 2087 "bison_parser.cpp" + break; + + case 198: /* opt_column_constraint */ +#line 150 "bison_parser.y" + { } +#line 2093 "bison_parser.cpp" break; - case 198: /* opt_table_key_constraints */ -#line 160 "bison_parser.y" + case 199: /* opt_table_key_constraints */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).table_key_constraint_vec)); } -#line 2081 "bison_parser.cpp" +#line 2099 "bison_parser.cpp" break; - case 199: /* table_key_constraint */ -#line 160 "bison_parser.y" + case 200: /* table_key_constraint */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).table_key_constraint_t)); } -#line 2087 "bison_parser.cpp" +#line 2105 "bison_parser.cpp" break; - case 200: /* drop_statement */ -#line 160 "bison_parser.y" + case 201: /* drop_statement */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).drop_stmt)); } -#line 2093 "bison_parser.cpp" +#line 2111 "bison_parser.cpp" break; - case 201: /* opt_exists */ -#line 149 "bison_parser.y" + case 202: /* opt_exists */ +#line 150 "bison_parser.y" { } -#line 2099 "bison_parser.cpp" +#line 2117 "bison_parser.cpp" break; - case 202: /* delete_statement */ -#line 160 "bison_parser.y" + case 203: /* delete_statement */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2105 "bison_parser.cpp" +#line 2123 "bison_parser.cpp" break; - case 203: /* truncate_statement */ -#line 160 "bison_parser.y" + case 204: /* truncate_statement */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2111 "bison_parser.cpp" +#line 2129 "bison_parser.cpp" break; - case 204: /* insert_statement */ -#line 160 "bison_parser.y" + case 205: /* insert_statement */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).insert_stmt)); } -#line 2117 "bison_parser.cpp" +#line 2135 "bison_parser.cpp" break; - case 205: /* opt_column_list */ -#line 152 "bison_parser.y" + case 206: /* opt_column_list */ +#line 153 "bison_parser.y" { if ((((*yyvaluep).str_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).str_vec))) { @@ -2126,17 +2144,17 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).str_vec)); } -#line 2130 "bison_parser.cpp" +#line 2148 "bison_parser.cpp" break; - case 206: /* update_statement */ -#line 160 "bison_parser.y" + case 207: /* update_statement */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).update_stmt)); } -#line 2136 "bison_parser.cpp" +#line 2154 "bison_parser.cpp" break; - case 207: /* update_clause_commalist */ -#line 152 "bison_parser.y" + case 208: /* update_clause_commalist */ +#line 153 "bison_parser.y" { if ((((*yyvaluep).update_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).update_vec))) { @@ -2145,77 +2163,77 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).update_vec)); } -#line 2149 "bison_parser.cpp" +#line 2167 "bison_parser.cpp" break; - case 208: /* update_clause */ -#line 160 "bison_parser.y" + case 209: /* update_clause */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).update_t)); } -#line 2155 "bison_parser.cpp" +#line 2173 "bison_parser.cpp" break; - case 209: /* select_statement */ -#line 160 "bison_parser.y" + case 210: /* select_statement */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2161 "bison_parser.cpp" +#line 2179 "bison_parser.cpp" break; - case 210: /* select_within_set_operation */ -#line 160 "bison_parser.y" + case 211: /* select_within_set_operation */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2167 "bison_parser.cpp" +#line 2185 "bison_parser.cpp" break; - case 211: /* select_within_set_operation_no_parentheses */ -#line 160 "bison_parser.y" + case 212: /* select_within_set_operation_no_parentheses */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2173 "bison_parser.cpp" +#line 2191 "bison_parser.cpp" break; - case 212: /* select_with_paren */ -#line 160 "bison_parser.y" + case 213: /* select_with_paren */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2179 "bison_parser.cpp" +#line 2197 "bison_parser.cpp" break; - case 213: /* select_no_paren */ -#line 160 "bison_parser.y" + case 214: /* select_no_paren */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2185 "bison_parser.cpp" +#line 2203 "bison_parser.cpp" break; - case 214: /* set_operator */ -#line 160 "bison_parser.y" + case 215: /* set_operator */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2191 "bison_parser.cpp" +#line 2209 "bison_parser.cpp" break; - case 215: /* set_type */ -#line 160 "bison_parser.y" + case 216: /* set_type */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2197 "bison_parser.cpp" +#line 2215 "bison_parser.cpp" break; - case 216: /* opt_all */ -#line 149 "bison_parser.y" + case 217: /* opt_all */ +#line 150 "bison_parser.y" { } -#line 2203 "bison_parser.cpp" +#line 2221 "bison_parser.cpp" break; - case 217: /* select_clause */ -#line 160 "bison_parser.y" + case 218: /* select_clause */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2209 "bison_parser.cpp" +#line 2227 "bison_parser.cpp" break; - case 218: /* opt_distinct */ -#line 149 "bison_parser.y" + case 219: /* opt_distinct */ +#line 150 "bison_parser.y" { } -#line 2215 "bison_parser.cpp" +#line 2233 "bison_parser.cpp" break; - case 219: /* select_list */ -#line 152 "bison_parser.y" + case 220: /* select_list */ +#line 153 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2224,41 +2242,41 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 2228 "bison_parser.cpp" +#line 2246 "bison_parser.cpp" break; - case 220: /* opt_from_clause */ -#line 160 "bison_parser.y" + case 221: /* opt_from_clause */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2234 "bison_parser.cpp" +#line 2252 "bison_parser.cpp" break; - case 221: /* from_clause */ -#line 160 "bison_parser.y" + case 222: /* from_clause */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2240 "bison_parser.cpp" +#line 2258 "bison_parser.cpp" break; - case 222: /* opt_where */ -#line 160 "bison_parser.y" + case 223: /* opt_where */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2246 "bison_parser.cpp" +#line 2264 "bison_parser.cpp" break; - case 223: /* opt_group */ -#line 160 "bison_parser.y" + case 224: /* opt_group */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).group_t)); } -#line 2252 "bison_parser.cpp" +#line 2270 "bison_parser.cpp" break; - case 224: /* opt_having */ -#line 160 "bison_parser.y" + case 225: /* opt_having */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2258 "bison_parser.cpp" +#line 2276 "bison_parser.cpp" break; - case 225: /* opt_order */ -#line 152 "bison_parser.y" + case 226: /* opt_order */ +#line 153 "bison_parser.y" { if ((((*yyvaluep).order_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).order_vec))) { @@ -2267,11 +2285,11 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).order_vec)); } -#line 2271 "bison_parser.cpp" +#line 2289 "bison_parser.cpp" break; - case 226: /* order_list */ -#line 152 "bison_parser.y" + case 227: /* order_list */ +#line 153 "bison_parser.y" { if ((((*yyvaluep).order_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).order_vec))) { @@ -2280,35 +2298,35 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).order_vec)); } -#line 2284 "bison_parser.cpp" +#line 2302 "bison_parser.cpp" break; - case 227: /* order_desc */ -#line 160 "bison_parser.y" + case 228: /* order_desc */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).order)); } -#line 2290 "bison_parser.cpp" +#line 2308 "bison_parser.cpp" break; - case 228: /* opt_order_type */ -#line 149 "bison_parser.y" + case 229: /* opt_order_type */ +#line 150 "bison_parser.y" { } -#line 2296 "bison_parser.cpp" +#line 2314 "bison_parser.cpp" break; - case 229: /* opt_top */ -#line 160 "bison_parser.y" + case 230: /* opt_top */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2302 "bison_parser.cpp" +#line 2320 "bison_parser.cpp" break; - case 230: /* opt_limit */ -#line 160 "bison_parser.y" + case 231: /* opt_limit */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2308 "bison_parser.cpp" +#line 2326 "bison_parser.cpp" break; - case 231: /* expr_list */ -#line 152 "bison_parser.y" + case 232: /* expr_list */ +#line 153 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2317,11 +2335,11 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 2321 "bison_parser.cpp" +#line 2339 "bison_parser.cpp" break; - case 232: /* opt_literal_list */ -#line 152 "bison_parser.y" + case 233: /* opt_literal_list */ +#line 153 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2330,11 +2348,11 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 2334 "bison_parser.cpp" +#line 2352 "bison_parser.cpp" break; - case 233: /* literal_list */ -#line 152 "bison_parser.y" + case 234: /* literal_list */ +#line 153 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2343,191 +2361,191 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 2347 "bison_parser.cpp" - break; - - case 234: /* expr_alias */ -#line 160 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2353 "bison_parser.cpp" - break; - - case 235: /* expr */ -#line 160 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2359 "bison_parser.cpp" - break; - - case 236: /* operand */ -#line 160 "bison_parser.y" - { delete (((*yyvaluep).expr)); } #line 2365 "bison_parser.cpp" break; - case 237: /* scalar_expr */ -#line 160 "bison_parser.y" + case 235: /* expr_alias */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2371 "bison_parser.cpp" break; - case 238: /* unary_expr */ -#line 160 "bison_parser.y" + case 236: /* expr */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2377 "bison_parser.cpp" break; - case 239: /* binary_expr */ -#line 160 "bison_parser.y" + case 237: /* operand */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2383 "bison_parser.cpp" break; - case 240: /* logic_expr */ -#line 160 "bison_parser.y" + case 238: /* scalar_expr */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2389 "bison_parser.cpp" break; - case 241: /* in_expr */ -#line 160 "bison_parser.y" + case 239: /* unary_expr */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2395 "bison_parser.cpp" break; - case 242: /* case_expr */ -#line 160 "bison_parser.y" + case 240: /* binary_expr */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2401 "bison_parser.cpp" break; - case 243: /* case_list */ -#line 160 "bison_parser.y" + case 241: /* logic_expr */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2407 "bison_parser.cpp" break; - case 244: /* exists_expr */ -#line 160 "bison_parser.y" + case 242: /* in_expr */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2413 "bison_parser.cpp" break; - case 245: /* comp_expr */ -#line 160 "bison_parser.y" + case 243: /* case_expr */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2419 "bison_parser.cpp" break; - case 246: /* function_expr */ -#line 160 "bison_parser.y" + case 244: /* case_list */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2425 "bison_parser.cpp" break; - case 247: /* extract_expr */ -#line 160 "bison_parser.y" + case 245: /* exists_expr */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2431 "bison_parser.cpp" break; - case 248: /* cast_expr */ -#line 160 "bison_parser.y" + case 246: /* comp_expr */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2437 "bison_parser.cpp" break; - case 249: /* datetime_field */ -#line 149 "bison_parser.y" - { } + case 247: /* function_expr */ +#line 161 "bison_parser.y" + { delete (((*yyvaluep).expr)); } #line 2443 "bison_parser.cpp" break; - case 250: /* array_expr */ -#line 160 "bison_parser.y" + case 248: /* extract_expr */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2449 "bison_parser.cpp" break; - case 251: /* array_index */ -#line 160 "bison_parser.y" + case 249: /* cast_expr */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2455 "bison_parser.cpp" break; - case 252: /* between_expr */ -#line 160 "bison_parser.y" - { delete (((*yyvaluep).expr)); } + case 250: /* datetime_field */ +#line 150 "bison_parser.y" + { } #line 2461 "bison_parser.cpp" break; - case 253: /* column_name */ -#line 160 "bison_parser.y" + case 251: /* array_expr */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2467 "bison_parser.cpp" break; - case 254: /* literal */ -#line 160 "bison_parser.y" + case 252: /* array_index */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2473 "bison_parser.cpp" break; - case 255: /* string_literal */ -#line 160 "bison_parser.y" + case 253: /* between_expr */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2479 "bison_parser.cpp" break; - case 256: /* bool_literal */ -#line 160 "bison_parser.y" + case 254: /* column_name */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2485 "bison_parser.cpp" break; - case 257: /* num_literal */ -#line 160 "bison_parser.y" + case 255: /* literal */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2491 "bison_parser.cpp" break; - case 258: /* int_literal */ -#line 160 "bison_parser.y" + case 256: /* string_literal */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2497 "bison_parser.cpp" break; - case 259: /* null_literal */ -#line 160 "bison_parser.y" + case 257: /* bool_literal */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2503 "bison_parser.cpp" break; - case 260: /* param_expr */ -#line 160 "bison_parser.y" + case 258: /* num_literal */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2509 "bison_parser.cpp" break; - case 261: /* table_ref */ -#line 160 "bison_parser.y" - { delete (((*yyvaluep).table)); } + case 259: /* int_literal */ +#line 161 "bison_parser.y" + { delete (((*yyvaluep).expr)); } #line 2515 "bison_parser.cpp" break; - case 262: /* table_ref_atomic */ -#line 160 "bison_parser.y" - { delete (((*yyvaluep).table)); } + case 260: /* null_literal */ +#line 161 "bison_parser.y" + { delete (((*yyvaluep).expr)); } #line 2521 "bison_parser.cpp" break; - case 263: /* nonjoin_table_ref_atomic */ -#line 160 "bison_parser.y" - { delete (((*yyvaluep).table)); } + case 261: /* param_expr */ +#line 161 "bison_parser.y" + { delete (((*yyvaluep).expr)); } #line 2527 "bison_parser.cpp" break; - case 264: /* table_ref_commalist */ -#line 152 "bison_parser.y" + case 262: /* table_ref */ +#line 161 "bison_parser.y" + { delete (((*yyvaluep).table)); } +#line 2533 "bison_parser.cpp" + break; + + case 263: /* table_ref_atomic */ +#line 161 "bison_parser.y" + { delete (((*yyvaluep).table)); } +#line 2539 "bison_parser.cpp" + break; + + case 264: /* nonjoin_table_ref_atomic */ +#line 161 "bison_parser.y" + { delete (((*yyvaluep).table)); } +#line 2545 "bison_parser.cpp" + break; + + case 265: /* table_ref_commalist */ +#line 153 "bison_parser.y" { if ((((*yyvaluep).table_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).table_vec))) { @@ -2536,107 +2554,107 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).table_vec)); } -#line 2540 "bison_parser.cpp" +#line 2558 "bison_parser.cpp" break; - case 265: /* table_ref_name */ -#line 160 "bison_parser.y" + case 266: /* table_ref_name */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2546 "bison_parser.cpp" +#line 2564 "bison_parser.cpp" break; - case 266: /* table_ref_name_no_alias */ -#line 160 "bison_parser.y" + case 267: /* table_ref_name_no_alias */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2552 "bison_parser.cpp" +#line 2570 "bison_parser.cpp" break; - case 267: /* table_name */ -#line 150 "bison_parser.y" + case 268: /* table_name */ +#line 151 "bison_parser.y" { free( (((*yyvaluep).table_name).name) ); free( (((*yyvaluep).table_name).schema) ); } -#line 2558 "bison_parser.cpp" +#line 2576 "bison_parser.cpp" break; - case 268: /* opt_index_name */ -#line 151 "bison_parser.y" + case 269: /* opt_index_name */ +#line 152 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2564 "bison_parser.cpp" +#line 2582 "bison_parser.cpp" break; - case 269: /* index_name */ -#line 151 "bison_parser.y" + case 270: /* index_name */ +#line 152 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2570 "bison_parser.cpp" +#line 2588 "bison_parser.cpp" break; - case 270: /* table_alias */ -#line 160 "bison_parser.y" + case 271: /* table_alias */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2576 "bison_parser.cpp" +#line 2594 "bison_parser.cpp" break; - case 271: /* opt_table_alias */ -#line 160 "bison_parser.y" + case 272: /* opt_table_alias */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2582 "bison_parser.cpp" +#line 2600 "bison_parser.cpp" break; - case 272: /* alias */ -#line 160 "bison_parser.y" + case 273: /* alias */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2588 "bison_parser.cpp" +#line 2606 "bison_parser.cpp" break; - case 273: /* opt_alias */ -#line 160 "bison_parser.y" + case 274: /* opt_alias */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2594 "bison_parser.cpp" +#line 2612 "bison_parser.cpp" break; - case 274: /* opt_with_clause */ -#line 160 "bison_parser.y" + case 275: /* opt_with_clause */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2600 "bison_parser.cpp" +#line 2618 "bison_parser.cpp" break; - case 275: /* with_clause */ -#line 160 "bison_parser.y" + case 276: /* with_clause */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2606 "bison_parser.cpp" +#line 2624 "bison_parser.cpp" break; - case 276: /* with_description_list */ -#line 160 "bison_parser.y" + case 277: /* with_description_list */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2612 "bison_parser.cpp" +#line 2630 "bison_parser.cpp" break; - case 277: /* with_description */ -#line 160 "bison_parser.y" + case 278: /* with_description */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).with_description_t)); } -#line 2618 "bison_parser.cpp" +#line 2636 "bison_parser.cpp" break; - case 278: /* join_clause */ -#line 160 "bison_parser.y" + case 279: /* join_clause */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2624 "bison_parser.cpp" +#line 2642 "bison_parser.cpp" break; - case 279: /* opt_join_type */ -#line 149 "bison_parser.y" + case 280: /* opt_join_type */ +#line 150 "bison_parser.y" { } -#line 2630 "bison_parser.cpp" +#line 2648 "bison_parser.cpp" break; - case 280: /* join_condition */ -#line 160 "bison_parser.y" + case 281: /* join_condition */ +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2636 "bison_parser.cpp" +#line 2654 "bison_parser.cpp" break; - case 282: /* ident_commalist */ -#line 152 "bison_parser.y" + case 283: /* ident_commalist */ +#line 153 "bison_parser.y" { if ((((*yyvaluep).str_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).str_vec))) { @@ -2645,7 +2663,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).str_vec)); } -#line 2649 "bison_parser.cpp" +#line 2667 "bison_parser.cpp" break; default: @@ -2763,7 +2781,7 @@ YYLTYPE yylloc = yyloc_default; yylloc.string_length = 0; } -#line 2767 "bison_parser.cpp" +#line 2785 "bison_parser.cpp" yylsp[0] = yylloc; goto yysetstate; @@ -2960,7 +2978,7 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: -#line 275 "bison_parser.y" +#line 277 "bison_parser.y" { for (SQLStatement* stmt : *(yyvsp[-1].stmt_vec)) { // Transfers ownership of the statement. @@ -2978,247 +2996,247 @@ YYLTYPE yylloc = yyloc_default; } delete (yyvsp[-1].stmt_vec); } -#line 2982 "bison_parser.cpp" +#line 3000 "bison_parser.cpp" break; case 3: -#line 296 "bison_parser.y" +#line 298 "bison_parser.y" { (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 2993 "bison_parser.cpp" +#line 3011 "bison_parser.cpp" break; case 4: -#line 302 "bison_parser.y" +#line 304 "bison_parser.y" { (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 3004 "bison_parser.cpp" +#line 3022 "bison_parser.cpp" break; case 5: -#line 311 "bison_parser.y" +#line 313 "bison_parser.y" { (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3013 "bison_parser.cpp" +#line 3031 "bison_parser.cpp" break; case 6: -#line 315 "bison_parser.y" +#line 317 "bison_parser.y" { (yyval.statement) = (yyvsp[-1].statement); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3022 "bison_parser.cpp" +#line 3040 "bison_parser.cpp" break; case 7: -#line 319 "bison_parser.y" +#line 321 "bison_parser.y" { (yyval.statement) = (yyvsp[0].show_stmt); } -#line 3030 "bison_parser.cpp" +#line 3048 "bison_parser.cpp" break; case 8: -#line 322 "bison_parser.y" +#line 324 "bison_parser.y" { (yyval.statement) = (yyvsp[0].import_stmt); } -#line 3038 "bison_parser.cpp" +#line 3056 "bison_parser.cpp" break; case 9: -#line 325 "bison_parser.y" +#line 327 "bison_parser.y" { (yyval.statement) = (yyvsp[0].export_stmt); } -#line 3046 "bison_parser.cpp" +#line 3064 "bison_parser.cpp" break; case 10: -#line 332 "bison_parser.y" +#line 334 "bison_parser.y" { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 3052 "bison_parser.cpp" +#line 3070 "bison_parser.cpp" break; case 11: -#line 333 "bison_parser.y" +#line 335 "bison_parser.y" { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 3058 "bison_parser.cpp" +#line 3076 "bison_parser.cpp" break; case 12: -#line 334 "bison_parser.y" +#line 336 "bison_parser.y" { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 3064 "bison_parser.cpp" +#line 3082 "bison_parser.cpp" break; case 13: -#line 335 "bison_parser.y" +#line 337 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3070 "bison_parser.cpp" +#line 3088 "bison_parser.cpp" break; case 14: -#line 336 "bison_parser.y" +#line 338 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3076 "bison_parser.cpp" +#line 3094 "bison_parser.cpp" break; case 15: -#line 337 "bison_parser.y" +#line 339 "bison_parser.y" { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 3082 "bison_parser.cpp" +#line 3100 "bison_parser.cpp" break; case 16: -#line 338 "bison_parser.y" +#line 340 "bison_parser.y" { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 3088 "bison_parser.cpp" +#line 3106 "bison_parser.cpp" break; case 17: -#line 339 "bison_parser.y" +#line 341 "bison_parser.y" { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 3094 "bison_parser.cpp" +#line 3112 "bison_parser.cpp" break; case 18: -#line 340 "bison_parser.y" +#line 342 "bison_parser.y" { (yyval.statement) = (yyvsp[0].transaction_stmt); } -#line 3100 "bison_parser.cpp" +#line 3118 "bison_parser.cpp" break; case 19: -#line 349 "bison_parser.y" +#line 351 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 3106 "bison_parser.cpp" +#line 3124 "bison_parser.cpp" break; case 20: -#line 350 "bison_parser.y" +#line 352 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 3112 "bison_parser.cpp" +#line 3130 "bison_parser.cpp" break; case 21: -#line 355 "bison_parser.y" +#line 357 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3118 "bison_parser.cpp" +#line 3136 "bison_parser.cpp" break; case 22: -#line 356 "bison_parser.y" +#line 358 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3124 "bison_parser.cpp" +#line 3142 "bison_parser.cpp" break; case 23: -#line 360 "bison_parser.y" +#line 362 "bison_parser.y" { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[0].sval); } -#line 3133 "bison_parser.cpp" +#line 3151 "bison_parser.cpp" break; case 24: -#line 364 "bison_parser.y" +#line 366 "bison_parser.y" { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[-3].sval); (yyval.expr)->exprList = (yyvsp[-1].expr_vec); } -#line 3143 "bison_parser.cpp" +#line 3161 "bison_parser.cpp" break; case 25: -#line 376 "bison_parser.y" +#line 378 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kBeginTransaction); } -#line 3151 "bison_parser.cpp" +#line 3169 "bison_parser.cpp" break; case 26: -#line 379 "bison_parser.y" +#line 381 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kRollbackTransaction); } -#line 3159 "bison_parser.cpp" +#line 3177 "bison_parser.cpp" break; case 27: -#line 382 "bison_parser.y" +#line 384 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kCommitTransaction); } -#line 3167 "bison_parser.cpp" +#line 3185 "bison_parser.cpp" break; case 30: -#line 396 "bison_parser.y" +#line 398 "bison_parser.y" { (yyval.prep_stmt) = new PrepareStatement(); (yyval.prep_stmt)->name = (yyvsp[-2].sval); (yyval.prep_stmt)->query = (yyvsp[0].sval); } -#line 3177 "bison_parser.cpp" +#line 3195 "bison_parser.cpp" break; case 32: -#line 406 "bison_parser.y" +#line 408 "bison_parser.y" { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[0].sval); } -#line 3186 "bison_parser.cpp" +#line 3204 "bison_parser.cpp" break; case 33: -#line 410 "bison_parser.y" +#line 412 "bison_parser.y" { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[-3].sval); (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); } -#line 3196 "bison_parser.cpp" +#line 3214 "bison_parser.cpp" break; case 34: -#line 424 "bison_parser.y" +#line 426 "bison_parser.y" { (yyval.import_stmt) = new ImportStatement((yyvsp[-4].import_type_t)); (yyval.import_stmt)->filePath = (yyvsp[-2].sval); (yyval.import_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3207 "bison_parser.cpp" +#line 3225 "bison_parser.cpp" break; case 35: -#line 430 "bison_parser.y" +#line 432 "bison_parser.y" { (yyval.import_stmt) = new ImportStatement((yyvsp[0].import_type_t)); (yyval.import_stmt)->filePath = (yyvsp[-1].sval); (yyval.import_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3218 "bison_parser.cpp" +#line 3236 "bison_parser.cpp" break; case 36: -#line 439 "bison_parser.y" +#line 441 "bison_parser.y" { if (strcasecmp((yyvsp[0].sval), "csv") == 0) { (yyval.import_type_t) = kImportCSV; @@ -3233,70 +3251,70 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[0].sval)); } -#line 3237 "bison_parser.cpp" +#line 3255 "bison_parser.cpp" break; case 37: -#line 456 "bison_parser.y" +#line 458 "bison_parser.y" { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 3243 "bison_parser.cpp" +#line 3261 "bison_parser.cpp" break; case 38: -#line 460 "bison_parser.y" +#line 462 "bison_parser.y" { (yyval.import_type_t) = (yyvsp[0].import_type_t); } -#line 3251 "bison_parser.cpp" +#line 3269 "bison_parser.cpp" break; case 39: -#line 463 "bison_parser.y" +#line 465 "bison_parser.y" { (yyval.import_type_t) = kImportAuto; } -#line 3257 "bison_parser.cpp" +#line 3275 "bison_parser.cpp" break; case 40: -#line 472 "bison_parser.y" +#line 474 "bison_parser.y" { (yyval.export_stmt) = new ExportStatement((yyvsp[0].import_type_t)); (yyval.export_stmt)->filePath = (yyvsp[-1].sval); (yyval.export_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.export_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3268 "bison_parser.cpp" +#line 3286 "bison_parser.cpp" break; case 41: -#line 486 "bison_parser.y" +#line 488 "bison_parser.y" { (yyval.show_stmt) = new ShowStatement(kShowTables); } -#line 3276 "bison_parser.cpp" +#line 3294 "bison_parser.cpp" break; case 42: -#line 489 "bison_parser.y" +#line 491 "bison_parser.y" { (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 3286 "bison_parser.cpp" +#line 3304 "bison_parser.cpp" break; case 43: -#line 494 "bison_parser.y" +#line 496 "bison_parser.y" { (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 3296 "bison_parser.cpp" +#line 3314 "bison_parser.cpp" break; case 44: -#line 508 "bison_parser.y" +#line 510 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTableFromTbl); (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); @@ -3310,11 +3328,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].sval)); (yyval.create_stmt)->filePath = (yyvsp[0].sval); } -#line 3314 "bison_parser.cpp" +#line 3332 "bison_parser.cpp" break; case 45: -#line 521 "bison_parser.y" +#line 523 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); @@ -3323,11 +3341,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->columns = (yyvsp[-2].column_vec); (yyval.create_stmt)->tableKeyConstraints = (yyvsp[-1].table_key_constraint_vec); } -#line 3327 "bison_parser.cpp" +#line 3345 "bison_parser.cpp" break; case 46: -#line 529 "bison_parser.y" +#line 531 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-3].bval); @@ -3335,11 +3353,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-2].table_name).name; (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3339 "bison_parser.cpp" +#line 3357 "bison_parser.cpp" break; case 47: -#line 536 "bison_parser.y" +#line 538 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateIndex); (yyval.create_stmt)->indexName = (yyvsp[-6].sval); @@ -3347,11 +3365,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->indexColumns = (yyvsp[-1].str_vec); } -#line 3351 "bison_parser.cpp" +#line 3369 "bison_parser.cpp" break; case 48: -#line 543 "bison_parser.y" +#line 545 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateView); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -3360,250 +3378,268 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3364 "bison_parser.cpp" +#line 3382 "bison_parser.cpp" break; case 49: -#line 554 "bison_parser.y" +#line 556 "bison_parser.y" { (yyval.bval) = true; } -#line 3370 "bison_parser.cpp" +#line 3388 "bison_parser.cpp" break; case 50: -#line 555 "bison_parser.y" +#line 557 "bison_parser.y" { (yyval.bval) = false; } -#line 3376 "bison_parser.cpp" +#line 3394 "bison_parser.cpp" break; case 51: -#line 559 "bison_parser.y" +#line 561 "bison_parser.y" { (yyval.column_vec) = new std::vector(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); } -#line 3382 "bison_parser.cpp" +#line 3400 "bison_parser.cpp" break; case 52: -#line 560 "bison_parser.y" +#line 562 "bison_parser.y" { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } -#line 3388 "bison_parser.cpp" +#line 3406 "bison_parser.cpp" break; case 53: -#line 564 "bison_parser.y" - { - (yyval.column_t) = new ColumnDefinition((yyvsp[-2].sval), (yyvsp[-1].column_type_t), (yyvsp[0].bval)); +#line 566 "bison_parser.y" + { + (yyval.column_t) = new ColumnDefinition((yyvsp[-3].sval), (yyvsp[-2].column_type_t), (yyvsp[-1].bval), (yyvsp[0].column_constraint_t)); } -#line 3396 "bison_parser.cpp" +#line 3414 "bison_parser.cpp" break; case 54: -#line 570 "bison_parser.y" +#line 572 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3402 "bison_parser.cpp" +#line 3420 "bison_parser.cpp" break; case 55: -#line 571 "bison_parser.y" +#line 573 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3408 "bison_parser.cpp" +#line 3426 "bison_parser.cpp" break; case 56: -#line 572 "bison_parser.y" +#line 574 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::LONG}; } -#line 3414 "bison_parser.cpp" +#line 3432 "bison_parser.cpp" break; case 57: -#line 573 "bison_parser.y" +#line 575 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3420 "bison_parser.cpp" +#line 3438 "bison_parser.cpp" break; case 58: -#line 574 "bison_parser.y" +#line 576 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3426 "bison_parser.cpp" +#line 3444 "bison_parser.cpp" break; case 59: -#line 575 "bison_parser.y" +#line 577 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } -#line 3432 "bison_parser.cpp" +#line 3450 "bison_parser.cpp" break; case 60: -#line 576 "bison_parser.y" +#line 578 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3438 "bison_parser.cpp" +#line 3456 "bison_parser.cpp" break; case 61: -#line 577 "bison_parser.y" +#line 579 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3444 "bison_parser.cpp" +#line 3462 "bison_parser.cpp" break; case 62: -#line 578 "bison_parser.y" +#line 580 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3450 "bison_parser.cpp" +#line 3468 "bison_parser.cpp" break; case 63: -#line 579 "bison_parser.y" +#line 581 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } -#line 3456 "bison_parser.cpp" +#line 3474 "bison_parser.cpp" break; case 64: -#line 580 "bison_parser.y" +#line 582 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } -#line 3462 "bison_parser.cpp" +#line 3480 "bison_parser.cpp" break; case 65: -#line 581 "bison_parser.y" +#line 583 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TIME}; } -#line 3468 "bison_parser.cpp" +#line 3486 "bison_parser.cpp" break; case 66: -#line 582 "bison_parser.y" +#line 584 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } -#line 3474 "bison_parser.cpp" +#line 3492 "bison_parser.cpp" break; case 67: -#line 583 "bison_parser.y" +#line 585 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATE}; } -#line 3480 "bison_parser.cpp" +#line 3498 "bison_parser.cpp" break; case 68: -#line 587 "bison_parser.y" +#line 589 "bison_parser.y" { (yyval.bval) = true; } -#line 3486 "bison_parser.cpp" +#line 3504 "bison_parser.cpp" break; case 69: -#line 588 "bison_parser.y" +#line 590 "bison_parser.y" { (yyval.bval) = false; } -#line 3492 "bison_parser.cpp" +#line 3510 "bison_parser.cpp" break; case 70: -#line 589 "bison_parser.y" +#line 591 "bison_parser.y" { (yyval.bval) = false; } -#line 3498 "bison_parser.cpp" +#line 3516 "bison_parser.cpp" break; case 71: -#line 593 "bison_parser.y" - {(yyval.table_key_constraint_vec) = new std::vector(); (yyval.table_key_constraint_vec)->push_back((yyvsp[0].table_key_constraint_t)); } -#line 3504 "bison_parser.cpp" +#line 595 "bison_parser.y" + { (yyval.column_constraint_t) = ConstraintType::PRIMARY_KEY; } +#line 3522 "bison_parser.cpp" break; case 72: -#line 594 "bison_parser.y" - { (yyvsp[-1].table_key_constraint_vec)->push_back((yyvsp[0].table_key_constraint_t)); (yyval.table_key_constraint_vec) = (yyvsp[-1].table_key_constraint_vec); } -#line 3510 "bison_parser.cpp" +#line 596 "bison_parser.y" + { (yyval.column_constraint_t) = ConstraintType::UNIQUE; } +#line 3528 "bison_parser.cpp" break; case 73: -#line 595 "bison_parser.y" - {(yyval.table_key_constraint_vec) = new std::vector(); } -#line 3516 "bison_parser.cpp" +#line 597 "bison_parser.y" + { (yyval.column_constraint_t) = ConstraintType::NOT_SET; } +#line 3534 "bison_parser.cpp" break; case 74: -#line 599 "bison_parser.y" - { (yyval.table_key_constraint_t) = new TableKeyConstraint(KeyType::PRIMARY_KEY, (yyvsp[-1].str_vec)); } -#line 3522 "bison_parser.cpp" +#line 601 "bison_parser.y" + {(yyval.table_key_constraint_vec) = new std::vector(); (yyval.table_key_constraint_vec)->push_back((yyvsp[0].table_key_constraint_t)); } +#line 3540 "bison_parser.cpp" break; case 75: -#line 600 "bison_parser.y" - { (yyval.table_key_constraint_t) = new TableKeyConstraint(KeyType::UNIQUE, (yyvsp[-1].str_vec)); } -#line 3528 "bison_parser.cpp" +#line 602 "bison_parser.y" + { (yyvsp[-1].table_key_constraint_vec)->push_back((yyvsp[0].table_key_constraint_t)); (yyval.table_key_constraint_vec) = (yyvsp[-1].table_key_constraint_vec); } +#line 3546 "bison_parser.cpp" break; case 76: +#line 603 "bison_parser.y" + {(yyval.table_key_constraint_vec) = new std::vector(); } +#line 3552 "bison_parser.cpp" + break; + + case 77: +#line 607 "bison_parser.y" + { (yyval.table_key_constraint_t) = new TableKeyConstraint(ConstraintType::PRIMARY_KEY, (yyvsp[-1].str_vec)); } +#line 3558 "bison_parser.cpp" + break; + + case 78: #line 608 "bison_parser.y" + { (yyval.table_key_constraint_t) = new TableKeyConstraint(ConstraintType::UNIQUE, (yyvsp[-1].str_vec)); } +#line 3564 "bison_parser.cpp" + break; + + case 79: +#line 616 "bison_parser.y" { (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 3539 "bison_parser.cpp" +#line 3575 "bison_parser.cpp" break; - case 77: -#line 614 "bison_parser.y" + case 80: +#line 622 "bison_parser.y" { (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 3550 "bison_parser.cpp" +#line 3586 "bison_parser.cpp" break; - case 78: -#line 620 "bison_parser.y" + case 81: +#line 628 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); (yyval.drop_stmt)->ifExists = false; (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 3560 "bison_parser.cpp" +#line 3596 "bison_parser.cpp" break; - case 79: -#line 625 "bison_parser.y" + case 82: +#line 633 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropIndex); (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; (yyval.drop_stmt)->index_name = (yyvsp[-2].sval); } -#line 3570 "bison_parser.cpp" +#line 3606 "bison_parser.cpp" break; - case 80: -#line 633 "bison_parser.y" + case 83: +#line 641 "bison_parser.y" { (yyval.bval) = true; } -#line 3576 "bison_parser.cpp" +#line 3612 "bison_parser.cpp" break; - case 81: -#line 634 "bison_parser.y" + case 84: +#line 642 "bison_parser.y" { (yyval.bval) = false; } -#line 3582 "bison_parser.cpp" +#line 3618 "bison_parser.cpp" break; - case 82: -#line 643 "bison_parser.y" + case 85: +#line 651 "bison_parser.y" { (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 3593 "bison_parser.cpp" +#line 3629 "bison_parser.cpp" break; - case 83: -#line 652 "bison_parser.y" + case 86: +#line 660 "bison_parser.y" { (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3603 "bison_parser.cpp" +#line 3639 "bison_parser.cpp" break; - case 84: -#line 665 "bison_parser.y" + case 87: +#line 673 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertValues); (yyval.insert_stmt)->schema = (yyvsp[-5].table_name).schema; @@ -3611,11 +3647,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } -#line 3615 "bison_parser.cpp" +#line 3651 "bison_parser.cpp" break; - case 85: -#line 672 "bison_parser.y" + case 88: +#line 680 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertSelect); (yyval.insert_stmt)->schema = (yyvsp[-2].table_name).schema; @@ -3623,74 +3659,74 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } -#line 3627 "bison_parser.cpp" +#line 3663 "bison_parser.cpp" break; - case 86: -#line 683 "bison_parser.y" + case 89: +#line 691 "bison_parser.y" { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 3633 "bison_parser.cpp" +#line 3669 "bison_parser.cpp" break; - case 87: -#line 684 "bison_parser.y" + case 90: +#line 692 "bison_parser.y" { (yyval.str_vec) = nullptr; } -#line 3639 "bison_parser.cpp" +#line 3675 "bison_parser.cpp" break; - case 88: -#line 694 "bison_parser.y" + case 91: +#line 702 "bison_parser.y" { (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 3650 "bison_parser.cpp" +#line 3686 "bison_parser.cpp" break; - case 89: -#line 703 "bison_parser.y" + case 92: +#line 711 "bison_parser.y" { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 3656 "bison_parser.cpp" +#line 3692 "bison_parser.cpp" break; - case 90: -#line 704 "bison_parser.y" + case 93: +#line 712 "bison_parser.y" { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 3662 "bison_parser.cpp" +#line 3698 "bison_parser.cpp" break; - case 91: -#line 708 "bison_parser.y" + case 94: +#line 716 "bison_parser.y" { (yyval.update_t) = new UpdateClause(); (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 3672 "bison_parser.cpp" +#line 3708 "bison_parser.cpp" break; - case 92: -#line 720 "bison_parser.y" + case 95: +#line 728 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3681 "bison_parser.cpp" +#line 3717 "bison_parser.cpp" break; - case 93: -#line 724 "bison_parser.y" + case 96: +#line 732 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3690 "bison_parser.cpp" +#line 3726 "bison_parser.cpp" break; - case 94: -#line 728 "bison_parser.y" + case 97: +#line 736 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3702,17 +3738,17 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); (yyval.select_stmt)->withDescriptions = (yyvsp[-5].with_description_vec); } -#line 3706 "bison_parser.cpp" +#line 3742 "bison_parser.cpp" break; - case 97: -#line 746 "bison_parser.y" + case 100: +#line 754 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); } -#line 3712 "bison_parser.cpp" +#line 3748 "bison_parser.cpp" break; - case 98: -#line 747 "bison_parser.y" + case 101: +#line 755 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3721,23 +3757,23 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->push_back((yyvsp[-1].set_operator_t)); (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[0].select_stmt); } -#line 3725 "bison_parser.cpp" +#line 3761 "bison_parser.cpp" break; - case 99: -#line 758 "bison_parser.y" + case 102: +#line 766 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3731 "bison_parser.cpp" +#line 3767 "bison_parser.cpp" break; - case 100: -#line 759 "bison_parser.y" + case 103: +#line 767 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3737 "bison_parser.cpp" +#line 3773 "bison_parser.cpp" break; - case 101: -#line 763 "bison_parser.y" + case 104: +#line 771 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); (yyval.select_stmt)->order = (yyvsp[-1].order_vec); @@ -3748,11 +3784,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3752 "bison_parser.cpp" +#line 3788 "bison_parser.cpp" break; - case 102: -#line 773 "bison_parser.y" + case 105: +#line 781 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3763,63 +3799,63 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); } -#line 3767 "bison_parser.cpp" +#line 3803 "bison_parser.cpp" break; - case 103: -#line 786 "bison_parser.y" + case 106: +#line 794 "bison_parser.y" { (yyval.set_operator_t) = (yyvsp[-1].set_operator_t); (yyval.set_operator_t)->isAll = (yyvsp[0].bval); } -#line 3776 "bison_parser.cpp" +#line 3812 "bison_parser.cpp" break; - case 104: -#line 793 "bison_parser.y" + case 107: +#line 801 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetUnion; } -#line 3785 "bison_parser.cpp" +#line 3821 "bison_parser.cpp" break; - case 105: -#line 797 "bison_parser.y" + case 108: +#line 805 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetIntersect; } -#line 3794 "bison_parser.cpp" +#line 3830 "bison_parser.cpp" break; - case 106: -#line 801 "bison_parser.y" + case 109: +#line 809 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetExcept; } -#line 3803 "bison_parser.cpp" +#line 3839 "bison_parser.cpp" break; - case 107: -#line 808 "bison_parser.y" + case 110: +#line 816 "bison_parser.y" { (yyval.bval) = true; } -#line 3811 "bison_parser.cpp" +#line 3847 "bison_parser.cpp" break; - case 108: -#line 811 "bison_parser.y" + case 111: +#line 819 "bison_parser.y" { (yyval.bval) = false; } -#line 3819 "bison_parser.cpp" +#line 3855 "bison_parser.cpp" break; - case 109: -#line 817 "bison_parser.y" + case 112: +#line 825 "bison_parser.y" { (yyval.select_stmt) = new SelectStatement(); (yyval.select_stmt)->limit = (yyvsp[-5].limit); @@ -3829,213 +3865,213 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 3833 "bison_parser.cpp" +#line 3869 "bison_parser.cpp" break; - case 110: -#line 829 "bison_parser.y" + case 113: +#line 837 "bison_parser.y" { (yyval.bval) = true; } -#line 3839 "bison_parser.cpp" +#line 3875 "bison_parser.cpp" break; - case 111: -#line 830 "bison_parser.y" + case 114: +#line 838 "bison_parser.y" { (yyval.bval) = false; } -#line 3845 "bison_parser.cpp" +#line 3881 "bison_parser.cpp" break; - case 113: -#line 838 "bison_parser.y" + case 116: +#line 846 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 3851 "bison_parser.cpp" +#line 3887 "bison_parser.cpp" break; - case 114: -#line 839 "bison_parser.y" + case 117: +#line 847 "bison_parser.y" { (yyval.table) = nullptr; } -#line 3857 "bison_parser.cpp" +#line 3893 "bison_parser.cpp" break; - case 115: -#line 843 "bison_parser.y" + case 118: +#line 851 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 3863 "bison_parser.cpp" +#line 3899 "bison_parser.cpp" break; - case 116: -#line 848 "bison_parser.y" + case 119: +#line 856 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 3869 "bison_parser.cpp" +#line 3905 "bison_parser.cpp" break; - case 117: -#line 849 "bison_parser.y" + case 120: +#line 857 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 3875 "bison_parser.cpp" +#line 3911 "bison_parser.cpp" break; - case 118: -#line 853 "bison_parser.y" + case 121: +#line 861 "bison_parser.y" { (yyval.group_t) = new GroupByDescription(); (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 3885 "bison_parser.cpp" +#line 3921 "bison_parser.cpp" break; - case 119: -#line 858 "bison_parser.y" + case 122: +#line 866 "bison_parser.y" { (yyval.group_t) = nullptr; } -#line 3891 "bison_parser.cpp" +#line 3927 "bison_parser.cpp" break; - case 120: -#line 862 "bison_parser.y" + case 123: +#line 870 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 3897 "bison_parser.cpp" +#line 3933 "bison_parser.cpp" break; - case 121: -#line 863 "bison_parser.y" + case 124: +#line 871 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 3903 "bison_parser.cpp" +#line 3939 "bison_parser.cpp" break; - case 122: -#line 867 "bison_parser.y" + case 125: +#line 875 "bison_parser.y" { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 3909 "bison_parser.cpp" +#line 3945 "bison_parser.cpp" break; - case 123: -#line 868 "bison_parser.y" + case 126: +#line 876 "bison_parser.y" { (yyval.order_vec) = nullptr; } -#line 3915 "bison_parser.cpp" +#line 3951 "bison_parser.cpp" break; - case 124: -#line 872 "bison_parser.y" + case 127: +#line 880 "bison_parser.y" { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 3921 "bison_parser.cpp" +#line 3957 "bison_parser.cpp" break; - case 125: -#line 873 "bison_parser.y" + case 128: +#line 881 "bison_parser.y" { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 3927 "bison_parser.cpp" +#line 3963 "bison_parser.cpp" break; - case 126: -#line 877 "bison_parser.y" + case 129: +#line 885 "bison_parser.y" { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 3933 "bison_parser.cpp" +#line 3969 "bison_parser.cpp" break; - case 127: -#line 881 "bison_parser.y" + case 130: +#line 889 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 3939 "bison_parser.cpp" +#line 3975 "bison_parser.cpp" break; - case 128: -#line 882 "bison_parser.y" + case 131: +#line 890 "bison_parser.y" { (yyval.order_type) = kOrderDesc; } -#line 3945 "bison_parser.cpp" +#line 3981 "bison_parser.cpp" break; - case 129: -#line 883 "bison_parser.y" + case 132: +#line 891 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 3951 "bison_parser.cpp" +#line 3987 "bison_parser.cpp" break; - case 130: -#line 889 "bison_parser.y" + case 133: +#line 897 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 3957 "bison_parser.cpp" +#line 3993 "bison_parser.cpp" break; - case 131: -#line 890 "bison_parser.y" + case 134: +#line 898 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 3963 "bison_parser.cpp" +#line 3999 "bison_parser.cpp" break; - case 132: -#line 894 "bison_parser.y" + case 135: +#line 902 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 3969 "bison_parser.cpp" +#line 4005 "bison_parser.cpp" break; - case 133: -#line 895 "bison_parser.y" + case 136: +#line 903 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 3975 "bison_parser.cpp" +#line 4011 "bison_parser.cpp" break; - case 134: -#line 896 "bison_parser.y" + case 137: +#line 904 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 3981 "bison_parser.cpp" +#line 4017 "bison_parser.cpp" break; - case 135: -#line 897 "bison_parser.y" + case 138: +#line 905 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, nullptr); } -#line 3987 "bison_parser.cpp" +#line 4023 "bison_parser.cpp" break; - case 136: -#line 898 "bison_parser.y" + case 139: +#line 906 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 3993 "bison_parser.cpp" +#line 4029 "bison_parser.cpp" break; - case 137: -#line 899 "bison_parser.y" + case 140: +#line 907 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 3999 "bison_parser.cpp" +#line 4035 "bison_parser.cpp" break; - case 138: -#line 906 "bison_parser.y" + case 141: +#line 914 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4005 "bison_parser.cpp" +#line 4041 "bison_parser.cpp" break; - case 139: -#line 907 "bison_parser.y" + case 142: +#line 915 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4011 "bison_parser.cpp" +#line 4047 "bison_parser.cpp" break; - case 140: -#line 911 "bison_parser.y" + case 143: +#line 919 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[0].expr_vec); } -#line 4017 "bison_parser.cpp" +#line 4053 "bison_parser.cpp" break; - case 141: -#line 912 "bison_parser.y" + case 144: +#line 920 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 4023 "bison_parser.cpp" +#line 4059 "bison_parser.cpp" break; - case 142: -#line 916 "bison_parser.y" + case 145: +#line 924 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4029 "bison_parser.cpp" +#line 4065 "bison_parser.cpp" break; - case 143: -#line 917 "bison_parser.y" + case 146: +#line 925 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4035 "bison_parser.cpp" +#line 4071 "bison_parser.cpp" break; - case 144: -#line 921 "bison_parser.y" + case 147: +#line 929 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); if ((yyvsp[0].alias_t)) { @@ -4043,421 +4079,421 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].alias_t); } } -#line 4047 "bison_parser.cpp" +#line 4083 "bison_parser.cpp" break; - case 150: -#line 939 "bison_parser.y" + case 153: +#line 947 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); } -#line 4053 "bison_parser.cpp" +#line 4089 "bison_parser.cpp" break; - case 160: -#line 949 "bison_parser.y" + case 163: +#line 957 "bison_parser.y" { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 4059 "bison_parser.cpp" +#line 4095 "bison_parser.cpp" break; - case 163: -#line 958 "bison_parser.y" + case 166: +#line 966 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 4065 "bison_parser.cpp" +#line 4101 "bison_parser.cpp" break; - case 164: -#line 959 "bison_parser.y" + case 167: +#line 967 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 4071 "bison_parser.cpp" +#line 4107 "bison_parser.cpp" break; - case 165: -#line 960 "bison_parser.y" + case 168: +#line 968 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 4077 "bison_parser.cpp" +#line 4113 "bison_parser.cpp" break; - case 166: -#line 961 "bison_parser.y" + case 169: +#line 969 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 4083 "bison_parser.cpp" +#line 4119 "bison_parser.cpp" break; - case 167: -#line 962 "bison_parser.y" + case 170: +#line 970 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 4089 "bison_parser.cpp" +#line 4125 "bison_parser.cpp" break; - case 169: -#line 967 "bison_parser.y" + case 172: +#line 975 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 4095 "bison_parser.cpp" +#line 4131 "bison_parser.cpp" break; - case 170: -#line 968 "bison_parser.y" + case 173: +#line 976 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 4101 "bison_parser.cpp" +#line 4137 "bison_parser.cpp" break; - case 171: -#line 969 "bison_parser.y" + case 174: +#line 977 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 4107 "bison_parser.cpp" +#line 4143 "bison_parser.cpp" break; - case 172: -#line 970 "bison_parser.y" + case 175: +#line 978 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 4113 "bison_parser.cpp" +#line 4149 "bison_parser.cpp" break; - case 173: -#line 971 "bison_parser.y" + case 176: +#line 979 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 4119 "bison_parser.cpp" +#line 4155 "bison_parser.cpp" break; - case 174: -#line 972 "bison_parser.y" + case 177: +#line 980 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 4125 "bison_parser.cpp" +#line 4161 "bison_parser.cpp" break; - case 175: -#line 973 "bison_parser.y" + case 178: +#line 981 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 4131 "bison_parser.cpp" +#line 4167 "bison_parser.cpp" break; - case 176: -#line 974 "bison_parser.y" + case 179: +#line 982 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 4137 "bison_parser.cpp" +#line 4173 "bison_parser.cpp" break; - case 177: -#line 975 "bison_parser.y" + case 180: +#line 983 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 4143 "bison_parser.cpp" +#line 4179 "bison_parser.cpp" break; - case 178: -#line 976 "bison_parser.y" + case 181: +#line 984 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 4149 "bison_parser.cpp" +#line 4185 "bison_parser.cpp" break; - case 179: -#line 980 "bison_parser.y" + case 182: +#line 988 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 4155 "bison_parser.cpp" +#line 4191 "bison_parser.cpp" break; - case 180: -#line 981 "bison_parser.y" + case 183: +#line 989 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 4161 "bison_parser.cpp" +#line 4197 "bison_parser.cpp" break; - case 181: -#line 985 "bison_parser.y" + case 184: +#line 993 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 4167 "bison_parser.cpp" +#line 4203 "bison_parser.cpp" break; - case 182: -#line 986 "bison_parser.y" + case 185: +#line 994 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 4173 "bison_parser.cpp" +#line 4209 "bison_parser.cpp" break; - case 183: -#line 987 "bison_parser.y" + case 186: +#line 995 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 4179 "bison_parser.cpp" +#line 4215 "bison_parser.cpp" break; - case 184: -#line 988 "bison_parser.y" + case 187: +#line 996 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 4185 "bison_parser.cpp" +#line 4221 "bison_parser.cpp" break; - case 185: -#line 994 "bison_parser.y" + case 188: +#line 1002 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } -#line 4191 "bison_parser.cpp" +#line 4227 "bison_parser.cpp" break; - case 186: -#line 995 "bison_parser.y" + case 189: +#line 1003 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4197 "bison_parser.cpp" +#line 4233 "bison_parser.cpp" break; - case 187: -#line 996 "bison_parser.y" + case 190: +#line 1004 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } -#line 4203 "bison_parser.cpp" +#line 4239 "bison_parser.cpp" break; - case 188: -#line 997 "bison_parser.y" + case 191: +#line 1005 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4209 "bison_parser.cpp" +#line 4245 "bison_parser.cpp" break; - case 189: -#line 1001 "bison_parser.y" + case 192: +#line 1009 "bison_parser.y" { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4215 "bison_parser.cpp" +#line 4251 "bison_parser.cpp" break; - case 190: -#line 1002 "bison_parser.y" + case 193: +#line 1010 "bison_parser.y" { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4221 "bison_parser.cpp" +#line 4257 "bison_parser.cpp" break; - case 191: -#line 1006 "bison_parser.y" + case 194: +#line 1014 "bison_parser.y" { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 4227 "bison_parser.cpp" +#line 4263 "bison_parser.cpp" break; - case 192: -#line 1007 "bison_parser.y" + case 195: +#line 1015 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 4233 "bison_parser.cpp" +#line 4269 "bison_parser.cpp" break; - case 193: -#line 1011 "bison_parser.y" + case 196: +#line 1019 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4239 "bison_parser.cpp" +#line 4275 "bison_parser.cpp" break; - case 194: -#line 1012 "bison_parser.y" + case 197: +#line 1020 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4245 "bison_parser.cpp" +#line 4281 "bison_parser.cpp" break; - case 195: -#line 1013 "bison_parser.y" + case 198: +#line 1021 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 4251 "bison_parser.cpp" +#line 4287 "bison_parser.cpp" break; - case 196: -#line 1014 "bison_parser.y" + case 199: +#line 1022 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 4257 "bison_parser.cpp" +#line 4293 "bison_parser.cpp" break; - case 197: -#line 1015 "bison_parser.y" + case 200: +#line 1023 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 4263 "bison_parser.cpp" +#line 4299 "bison_parser.cpp" break; - case 198: -#line 1016 "bison_parser.y" + case 201: +#line 1024 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 4269 "bison_parser.cpp" +#line 4305 "bison_parser.cpp" break; - case 199: -#line 1017 "bison_parser.y" + case 202: +#line 1025 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 4275 "bison_parser.cpp" +#line 4311 "bison_parser.cpp" break; - case 200: -#line 1021 "bison_parser.y" + case 203: +#line 1029 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 4281 "bison_parser.cpp" +#line 4317 "bison_parser.cpp" break; - case 201: -#line 1022 "bison_parser.y" + case 204: +#line 1030 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 4287 "bison_parser.cpp" +#line 4323 "bison_parser.cpp" break; - case 202: -#line 1026 "bison_parser.y" + case 205: +#line 1034 "bison_parser.y" { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } -#line 4293 "bison_parser.cpp" +#line 4329 "bison_parser.cpp" break; - case 203: -#line 1030 "bison_parser.y" + case 206: +#line 1038 "bison_parser.y" { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } -#line 4299 "bison_parser.cpp" +#line 4335 "bison_parser.cpp" break; - case 204: -#line 1034 "bison_parser.y" + case 207: +#line 1042 "bison_parser.y" { (yyval.datetime_field) = kDatetimeSecond; } -#line 4305 "bison_parser.cpp" +#line 4341 "bison_parser.cpp" break; - case 205: -#line 1035 "bison_parser.y" + case 208: +#line 1043 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMinute; } -#line 4311 "bison_parser.cpp" +#line 4347 "bison_parser.cpp" break; - case 206: -#line 1036 "bison_parser.y" + case 209: +#line 1044 "bison_parser.y" { (yyval.datetime_field) = kDatetimeHour; } -#line 4317 "bison_parser.cpp" +#line 4353 "bison_parser.cpp" break; - case 207: -#line 1037 "bison_parser.y" + case 210: +#line 1045 "bison_parser.y" { (yyval.datetime_field) = kDatetimeDay; } -#line 4323 "bison_parser.cpp" +#line 4359 "bison_parser.cpp" break; - case 208: -#line 1038 "bison_parser.y" + case 211: +#line 1046 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMonth; } -#line 4329 "bison_parser.cpp" +#line 4365 "bison_parser.cpp" break; - case 209: -#line 1039 "bison_parser.y" + case 212: +#line 1047 "bison_parser.y" { (yyval.datetime_field) = kDatetimeYear; } -#line 4335 "bison_parser.cpp" +#line 4371 "bison_parser.cpp" break; - case 210: -#line 1043 "bison_parser.y" + case 213: +#line 1051 "bison_parser.y" { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 4341 "bison_parser.cpp" +#line 4377 "bison_parser.cpp" break; - case 211: -#line 1047 "bison_parser.y" + case 214: +#line 1055 "bison_parser.y" { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 4347 "bison_parser.cpp" +#line 4383 "bison_parser.cpp" break; - case 212: -#line 1051 "bison_parser.y" + case 215: +#line 1059 "bison_parser.y" { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4353 "bison_parser.cpp" +#line 4389 "bison_parser.cpp" break; - case 213: -#line 1055 "bison_parser.y" + case 216: +#line 1063 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 4359 "bison_parser.cpp" +#line 4395 "bison_parser.cpp" break; - case 214: -#line 1056 "bison_parser.y" + case 217: +#line 1064 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 4365 "bison_parser.cpp" +#line 4401 "bison_parser.cpp" break; - case 215: -#line 1057 "bison_parser.y" + case 218: +#line 1065 "bison_parser.y" { (yyval.expr) = Expr::makeStar(); } -#line 4371 "bison_parser.cpp" +#line 4407 "bison_parser.cpp" break; - case 216: -#line 1058 "bison_parser.y" + case 219: +#line 1066 "bison_parser.y" { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 4377 "bison_parser.cpp" +#line 4413 "bison_parser.cpp" break; - case 222: -#line 1070 "bison_parser.y" + case 225: +#line 1078 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 4383 "bison_parser.cpp" +#line 4419 "bison_parser.cpp" break; - case 223: -#line 1074 "bison_parser.y" + case 226: +#line 1082 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(true); } -#line 4389 "bison_parser.cpp" +#line 4425 "bison_parser.cpp" break; - case 224: -#line 1075 "bison_parser.y" + case 227: +#line 1083 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(false); } -#line 4395 "bison_parser.cpp" +#line 4431 "bison_parser.cpp" break; - case 225: -#line 1079 "bison_parser.y" + case 228: +#line 1087 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 4401 "bison_parser.cpp" +#line 4437 "bison_parser.cpp" break; - case 227: -#line 1084 "bison_parser.y" + case 230: +#line 1092 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 4407 "bison_parser.cpp" +#line 4443 "bison_parser.cpp" break; - case 228: -#line 1088 "bison_parser.y" + case 231: +#line 1096 "bison_parser.y" { (yyval.expr) = Expr::makeNullLiteral(); } -#line 4413 "bison_parser.cpp" +#line 4449 "bison_parser.cpp" break; - case 229: -#line 1092 "bison_parser.y" + case 232: +#line 1100 "bison_parser.y" { (yyval.expr) = Expr::makeParameter(yylloc.total_column); (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 4423 "bison_parser.cpp" +#line 4459 "bison_parser.cpp" break; - case 231: -#line 1105 "bison_parser.y" + case 234: +#line 1113 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); auto tbl = new TableRef(kTableCrossProduct); tbl->list = (yyvsp[-2].table_vec); (yyval.table) = tbl; } -#line 4434 "bison_parser.cpp" +#line 4470 "bison_parser.cpp" break; - case 235: -#line 1121 "bison_parser.y" + case 238: +#line 1129 "bison_parser.y" { auto tbl = new TableRef(kTableSelect); tbl->select = (yyvsp[-2].select_stmt); tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4445 "bison_parser.cpp" +#line 4481 "bison_parser.cpp" break; - case 236: -#line 1130 "bison_parser.y" + case 239: +#line 1138 "bison_parser.y" { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 4451 "bison_parser.cpp" +#line 4487 "bison_parser.cpp" break; - case 237: -#line 1131 "bison_parser.y" + case 240: +#line 1139 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 4457 "bison_parser.cpp" +#line 4493 "bison_parser.cpp" break; - case 238: -#line 1136 "bison_parser.y" + case 241: +#line 1144 "bison_parser.y" { auto tbl = new TableRef(kTableName); tbl->schema = (yyvsp[-1].table_name).schema; @@ -4465,121 +4501,121 @@ YYLTYPE yylloc = yyloc_default; tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4469 "bison_parser.cpp" +#line 4505 "bison_parser.cpp" break; - case 239: -#line 1147 "bison_parser.y" + case 242: +#line 1155 "bison_parser.y" { (yyval.table) = new TableRef(kTableName); (yyval.table)->schema = (yyvsp[0].table_name).schema; (yyval.table)->name = (yyvsp[0].table_name).name; } -#line 4479 "bison_parser.cpp" +#line 4515 "bison_parser.cpp" break; - case 240: -#line 1156 "bison_parser.y" + case 243: +#line 1164 "bison_parser.y" { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} -#line 4485 "bison_parser.cpp" +#line 4521 "bison_parser.cpp" break; - case 241: -#line 1157 "bison_parser.y" + case 244: +#line 1165 "bison_parser.y" { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } -#line 4491 "bison_parser.cpp" +#line 4527 "bison_parser.cpp" break; - case 242: -#line 1161 "bison_parser.y" + case 245: +#line 1169 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4497 "bison_parser.cpp" +#line 4533 "bison_parser.cpp" break; - case 243: -#line 1162 "bison_parser.y" + case 246: +#line 1170 "bison_parser.y" { (yyval.sval) = nullptr;} -#line 4503 "bison_parser.cpp" +#line 4539 "bison_parser.cpp" break; - case 244: -#line 1166 "bison_parser.y" + case 247: +#line 1174 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4509 "bison_parser.cpp" +#line 4545 "bison_parser.cpp" break; - case 246: -#line 1172 "bison_parser.y" + case 249: +#line 1180 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } -#line 4515 "bison_parser.cpp" +#line 4551 "bison_parser.cpp" break; - case 248: -#line 1178 "bison_parser.y" + case 251: +#line 1186 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4521 "bison_parser.cpp" +#line 4557 "bison_parser.cpp" break; - case 249: -#line 1183 "bison_parser.y" + case 252: +#line 1191 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4527 "bison_parser.cpp" +#line 4563 "bison_parser.cpp" break; - case 250: -#line 1184 "bison_parser.y" + case 253: +#line 1192 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4533 "bison_parser.cpp" +#line 4569 "bison_parser.cpp" break; - case 252: -#line 1190 "bison_parser.y" + case 255: +#line 1198 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4539 "bison_parser.cpp" +#line 4575 "bison_parser.cpp" break; - case 254: -#line 1200 "bison_parser.y" + case 257: +#line 1208 "bison_parser.y" { (yyval.with_description_vec) = nullptr; } -#line 4545 "bison_parser.cpp" +#line 4581 "bison_parser.cpp" break; - case 255: -#line 1204 "bison_parser.y" + case 258: +#line 1212 "bison_parser.y" { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } -#line 4551 "bison_parser.cpp" +#line 4587 "bison_parser.cpp" break; - case 256: -#line 1208 "bison_parser.y" + case 259: +#line 1216 "bison_parser.y" { (yyval.with_description_vec) = new std::vector(); (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); } -#line 4560 "bison_parser.cpp" +#line 4596 "bison_parser.cpp" break; - case 257: -#line 1212 "bison_parser.y" + case 260: +#line 1220 "bison_parser.y" { (yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t)); (yyval.with_description_vec) = (yyvsp[-2].with_description_vec); } -#line 4569 "bison_parser.cpp" +#line 4605 "bison_parser.cpp" break; - case 258: -#line 1219 "bison_parser.y" + case 261: +#line 1227 "bison_parser.y" { (yyval.with_description_t) = new WithDescription(); (yyval.with_description_t)->alias = (yyvsp[-2].sval); (yyval.with_description_t)->select = (yyvsp[0].select_stmt); } -#line 4579 "bison_parser.cpp" +#line 4615 "bison_parser.cpp" break; - case 259: -#line 1233 "bison_parser.y" + case 262: +#line 1241 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4587,11 +4623,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 4591 "bison_parser.cpp" +#line 4627 "bison_parser.cpp" break; - case 260: -#line 1241 "bison_parser.y" + case 263: +#line 1249 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4600,11 +4636,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 4604 "bison_parser.cpp" +#line 4640 "bison_parser.cpp" break; - case 261: -#line 1251 "bison_parser.y" + case 264: +#line 1259 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4620,83 +4656,83 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } -#line 4624 "bison_parser.cpp" +#line 4660 "bison_parser.cpp" break; - case 262: -#line 1269 "bison_parser.y" + case 265: +#line 1277 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4630 "bison_parser.cpp" +#line 4666 "bison_parser.cpp" break; - case 263: -#line 1270 "bison_parser.y" + case 266: +#line 1278 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4636 "bison_parser.cpp" +#line 4672 "bison_parser.cpp" break; - case 264: -#line 1271 "bison_parser.y" + case 267: +#line 1279 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4642 "bison_parser.cpp" +#line 4678 "bison_parser.cpp" break; - case 265: -#line 1272 "bison_parser.y" + case 268: +#line 1280 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4648 "bison_parser.cpp" +#line 4684 "bison_parser.cpp" break; - case 266: -#line 1273 "bison_parser.y" + case 269: +#line 1281 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4654 "bison_parser.cpp" +#line 4690 "bison_parser.cpp" break; - case 267: -#line 1274 "bison_parser.y" + case 270: +#line 1282 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4660 "bison_parser.cpp" +#line 4696 "bison_parser.cpp" break; - case 268: -#line 1275 "bison_parser.y" + case 271: +#line 1283 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4666 "bison_parser.cpp" +#line 4702 "bison_parser.cpp" break; - case 269: -#line 1276 "bison_parser.y" + case 272: +#line 1284 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4672 "bison_parser.cpp" +#line 4708 "bison_parser.cpp" break; - case 270: -#line 1277 "bison_parser.y" + case 273: +#line 1285 "bison_parser.y" { (yyval.uval) = kJoinCross; } -#line 4678 "bison_parser.cpp" +#line 4714 "bison_parser.cpp" break; - case 271: -#line 1278 "bison_parser.y" + case 274: +#line 1286 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4684 "bison_parser.cpp" +#line 4720 "bison_parser.cpp" break; - case 275: -#line 1298 "bison_parser.y" + case 278: +#line 1306 "bison_parser.y" { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 4690 "bison_parser.cpp" +#line 4726 "bison_parser.cpp" break; - case 276: -#line 1299 "bison_parser.y" + case 279: +#line 1307 "bison_parser.y" { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 4696 "bison_parser.cpp" +#line 4732 "bison_parser.cpp" break; -#line 4700 "bison_parser.cpp" +#line 4736 "bison_parser.cpp" default: break; } @@ -4934,7 +4970,7 @@ YYLTYPE yylloc = yyloc_default; #endif return yyresult; } -#line 1302 "bison_parser.y" +#line 1310 "bison_parser.y" /********************************* ** Section 4: Additional C code diff --git a/src/parser/bison_parser.h b/src/parser/bison_parser.h index 4bd97e05..b247ecaa 100644 --- a/src/parser/bison_parser.h +++ b/src/parser/bison_parser.h @@ -275,6 +275,7 @@ union HSQL_STYPE hsql::LimitDescription* limit; hsql::ColumnDefinition* column_t; hsql::TableKeyConstraint* table_key_constraint_t; + hsql::ConstraintType column_constraint_t; hsql::ColumnType column_type_t; hsql::ImportType import_type_t; hsql::GroupByDescription* group_t; @@ -293,7 +294,7 @@ union HSQL_STYPE std::vector* with_description_vec; std::vector* table_key_constraint_vec; -#line 297 "bison_parser.h" +#line 298 "bison_parser.h" }; typedef union HSQL_STYPE HSQL_STYPE; diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 667a7ec0..11574619 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -123,7 +123,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha hsql::LimitDescription* limit; hsql::ColumnDefinition* column_t; hsql::TableKeyConstraint* table_key_constraint_t; - hsql::ColumnConstraint column_constraint_t; + hsql::ConstraintType column_constraint_t; hsql::ColumnType column_type_t; hsql::ImportType import_type_t; hsql::GroupByDescription* group_t; @@ -147,7 +147,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha /********************************* ** Destructor symbols *********************************/ -%destructor { } +%destructor { } %destructor { free( ($$.name) ); free( ($$.schema) ); } %destructor { free( ($$) ); } %destructor { @@ -592,9 +592,9 @@ opt_column_nullable: ; opt_column_constraint: - PRIMARY KEY { $$ = ConstraintType::PRIMARY_KEY } - | UNIQUE { $$ = ConstraintType::UNIQUE } - | /* empty */ { $$ = nullptr } + PRIMARY KEY { $$ = ConstraintType::PRIMARY_KEY; } + | UNIQUE { $$ = ConstraintType::UNIQUE; } + | /* empty */ { $$ = ConstraintType::NOT_SET; } ; opt_table_key_constraints: diff --git a/src/sql/CreateStatement.h b/src/sql/CreateStatement.h index 32e90d54..b82de5e8 100755 --- a/src/sql/CreateStatement.h +++ b/src/sql/CreateStatement.h @@ -10,7 +10,7 @@ namespace hsql { struct SelectStatement; - enum struct ConstraintType {PRIMARY_KEY, UNIQUE}; + enum struct ConstraintType {PRIMARY_KEY, UNIQUE, NOT_SET}; // Represents definition of a key constraint struct TableKeyConstraint { From 32bbbf93e56eff486046ef6d82b05ab73c6d3f35 Mon Sep 17 00:00:00 2001 From: simonstadlinger Date: Thu, 15 Jul 2021 13:23:39 +0200 Subject: [PATCH 14/73] Refactor create_index to actually work --- src/sql/ColumnType.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sql/ColumnType.h b/src/sql/ColumnType.h index 5e9117ff..0d7e9b74 100755 --- a/src/sql/ColumnType.h +++ b/src/sql/ColumnType.h @@ -16,6 +16,9 @@ namespace hsql { DATETIME, DATE, TIME, + DECIMAL, + REAL, + VARCHAR_VARYING, }; // Represents the type of a column, e.g., FLOAT or VARCHAR(10) From b009290c163f929d08f284ba386394708c85fe83 Mon Sep 17 00:00:00 2001 From: simonstadlinger Date: Thu, 15 Jul 2021 13:36:19 +0200 Subject: [PATCH 15/73] Fix parser to work with new datatypes --- src/sql/statements.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/sql/statements.cpp b/src/sql/statements.cpp index 56aeb36d..1aed34df 100755 --- a/src/sql/statements.cpp +++ b/src/sql/statements.cpp @@ -51,6 +51,15 @@ namespace hsql { case DataType::VARCHAR: stream << "VARCHAR(" << column_type.length << ")"; break; + case DataType::VARCHAR_VARYING: + stream << "VARCHAR_VARYING"; + break; + case DataType::DECIMAL: + stream << "DECIMAL"; + break; + case DataType::REAL: + stream << "REAL"; + break; case DataType::TEXT: stream << "TEXT"; break; From 4e70942a53a67b544d416a0de7a7144c6ff7b2f8 Mon Sep 17 00:00:00 2001 From: Jostafarr Date: Tue, 6 Jul 2021 10:31:20 +0200 Subject: [PATCH 16/73] adds keyconstraint functionality --- src/sql/CreateStatement.h | 12 ++++++++++++ src/sql/statements.cpp | 15 +++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/src/sql/CreateStatement.h b/src/sql/CreateStatement.h index 56e78192..99509942 100755 --- a/src/sql/CreateStatement.h +++ b/src/sql/CreateStatement.h @@ -10,6 +10,17 @@ namespace hsql { struct SelectStatement; + // Represents definition of a key constraint + struct KeyConstraints { + KeyConstraints(char* keyType, std::unordered_set columnIDs); + virtual ~KeyConstraints(); + + enum struct KeyType {PRIMARY_KEY, UNIQUE}; + + KeyType type; + std::unordered_set columnIDs; + }; + // Represents definition of a table column struct ColumnDefinition { ColumnDefinition(char* name, ColumnType type, bool nullable); @@ -41,6 +52,7 @@ namespace hsql { char* indexName; // default: nullptr std::vector* indexColumns; std::vector* columns; // default: nullptr + std::vector* keyConstraints; // default: nullptr std::vector* viewColumns; SelectStatement* select; }; diff --git a/src/sql/statements.cpp b/src/sql/statements.cpp index 1aed34df..1eac60a6 100755 --- a/src/sql/statements.cpp +++ b/src/sql/statements.cpp @@ -2,6 +2,13 @@ namespace hsql { + // KeyConstraints + KeyConstraints::KeyConstraints(KeyType keyType, std::unordered_set columnIDs) : + type(keyType), + columnIDs(columnIDs) { }; + + KeyConstraints::~KeyConstraints() { } + // ColumnDefinition ColumnDefinition::ColumnDefinition(char* name, ColumnType type, bool nullable) : name(name), @@ -86,6 +93,7 @@ namespace hsql { schema(nullptr), tableName(nullptr), columns(nullptr), + keyConstraints(nullptr), viewColumns(nullptr), select(nullptr) {}; @@ -102,6 +110,13 @@ namespace hsql { delete columns; } + if (keyConstraints != nullptr) { + for (Keyconstraints* def : *keyConstraints) { + delete def; + } + delete keyConstraints; + } + if (viewColumns != nullptr) { for (char* column : *viewColumns) { free(column); From cdd5e1ae42c1334b326950b51b5b8e59a777be49 Mon Sep 17 00:00:00 2001 From: Jostafarr Date: Tue, 6 Jul 2021 11:39:49 +0200 Subject: [PATCH 17/73] added tablekeyconstraint to parser --- src/parser/bison_parser.y | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 66714211..51cb585f 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -122,6 +122,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha hsql::DatetimeField datetime_field; hsql::LimitDescription* limit; hsql::ColumnDefinition* column_t; + hsql::TableKeyConstraint table_key_constraint_t; hsql::ColumnType column_type_t; hsql::ImportType import_type_t; hsql::GroupByDescription* group_t; @@ -138,6 +139,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha std::vector* expr_vec; std::vector* order_vec; std::vector* with_description_vec; + std::vector table_key_constraint_vec; } @@ -220,6 +222,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha %type datetime_field %type column_def %type column_type +%type table_key_constraint %type update_clause %type opt_group %type opt_table_alias table_alias opt_alias alias @@ -236,6 +239,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha %type opt_with_clause with_clause with_description_list %type update_clause_commalist %type column_def_commalist +%type opt_table_key_constraints /****************************** ** Token Precedence and Associativity @@ -514,7 +518,7 @@ create_statement: free($6); $$->filePath = $8; } - | CREATE TABLE opt_not_exists table_name '(' column_def_commalist ')' { + | CREATE TABLE opt_not_exists table_name '(' column_def_commalist opt_table_key_constraints ')' { $$ = new CreateStatement(kCreateTable); $$->ifNotExists = $3; $$->schema = $4.schema; @@ -584,6 +588,15 @@ opt_column_nullable: | /* empty */ { $$ = false; } ; +opt_table_key_constraints: + table_key_constraint {$$ = new std::vector(); $$->push_back($1); } + | opt_table_key_constraints table_key_constraint { $1->push_back($2); $$ = $1; } + | /* empty */ {$$ = new std::vector(); } + ; + +table_key_constaint: + ',' PRIMARY KEY '(' ident_commalist ')' { $$ = TableKeyConstraint{KeyType::PRIMARY_KEY, $5}; } + | ',' UNIQUE '(' ident_commalist ')' { $$ = TableKeyConstraint{KeyType::UNIQUE, $4}; } /****************************** * Drop Statement * DROP TABLE students; From 7ccd2eac9110a2024510975e8e46890cec112490 Mon Sep 17 00:00:00 2001 From: Jostafarr Date: Tue, 6 Jul 2021 12:32:26 +0200 Subject: [PATCH 18/73] WIP --- src/parser/bison_parser.cpp | 4045 ++++++++++++++++++----------------- src/parser/bison_parser.h | 330 ++- src/parser/bison_parser.y | 2 +- src/sql/CreateStatement.h | 14 +- src/sql/statements.cpp | 9 +- 5 files changed, 2206 insertions(+), 2194 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 4e0aedd2..34b834fe 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.7.6. */ +/* A Bison parser, made by GNU Bison 3.5.1. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -34,10 +34,6 @@ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ -/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, - especially those whose name start with YY_ or yy_. They are - private implementation details that can be changed or removed. */ - /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. @@ -45,11 +41,14 @@ define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ -/* Identify Bison output, and Bison version. */ -#define YYBISON 30706 +/* 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 string. */ -#define YYBISON_VERSION "3.7.6" +/* Bison version. */ +#define YYBISON_VERSION "3.5.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -103,7 +102,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha } -#line 107 "bison_parser.cpp" +#line 106 "bison_parser.cpp" # ifndef YY_CAST # ifdef __cplusplus @@ -126,295 +125,302 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha # endif # endif -#include "bison_parser.h" -/* Symbol kind. */ -enum yysymbol_kind_t +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 1 +#endif + +/* Use api.header.include to #include this header + instead of duplicating it here. */ +#ifndef YY_HSQL_BISON_PARSER_H_INCLUDED +# define YY_HSQL_BISON_PARSER_H_INCLUDED +/* Debug traces. */ +#ifndef HSQL_DEBUG +# if defined YYDEBUG +#if YYDEBUG +# define HSQL_DEBUG 1 +# else +# define HSQL_DEBUG 0 +# endif +# else /* ! defined YYDEBUG */ +# define HSQL_DEBUG 0 +# endif /* ! defined YYDEBUG */ +#endif /* ! defined HSQL_DEBUG */ +#if HSQL_DEBUG +extern int hsql_debug; +#endif +/* "%code requires" blocks. */ +#line 35 "bison_parser.y" + +// %code requires block + +#include "../sql/statements.h" +#include "../SQLParserResult.h" +#include "parser_typedef.h" + +// Auto update column and line number +#define YY_USER_ACTION \ + yylloc->first_line = yylloc->last_line; \ + yylloc->first_column = yylloc->last_column; \ + for(int i = 0; yytext[i] != '\0'; i++) { \ + yylloc->total_column++; \ + yylloc->string_length++; \ + if(yytext[i] == '\n') { \ + yylloc->last_line++; \ + yylloc->last_column = 0; \ + } \ + else { \ + yylloc->last_column++; \ + } \ + } + +#line 181 "bison_parser.cpp" + +/* Token type. */ +#ifndef HSQL_TOKENTYPE +# define HSQL_TOKENTYPE + enum hsql_tokentype + { + SQL_IDENTIFIER = 258, + SQL_STRING = 259, + SQL_FLOATVAL = 260, + SQL_INTVAL = 261, + SQL_DEALLOCATE = 262, + SQL_PARAMETERS = 263, + SQL_INTERSECT = 264, + SQL_TEMPORARY = 265, + SQL_TIMESTAMP = 266, + SQL_DISTINCT = 267, + SQL_NVARCHAR = 268, + SQL_RESTRICT = 269, + SQL_TRUNCATE = 270, + SQL_ANALYZE = 271, + SQL_BETWEEN = 272, + SQL_CASCADE = 273, + SQL_COLUMNS = 274, + SQL_CONTROL = 275, + SQL_DEFAULT = 276, + SQL_EXECUTE = 277, + SQL_EXPLAIN = 278, + SQL_INTEGER = 279, + SQL_NATURAL = 280, + SQL_PREPARE = 281, + SQL_PRIMARY = 282, + SQL_SCHEMAS = 283, + SQL_CHARACTER = 284, + SQL_VARYING = 285, + SQL_REAL = 286, + SQL_DECIMAL = 287, + SQL_SPATIAL = 288, + SQL_VARCHAR = 289, + SQL_VIRTUAL = 290, + SQL_DESCRIBE = 291, + SQL_BEFORE = 292, + SQL_COLUMN = 293, + SQL_CREATE = 294, + SQL_DELETE = 295, + SQL_DIRECT = 296, + SQL_DOUBLE = 297, + SQL_ESCAPE = 298, + SQL_EXCEPT = 299, + SQL_EXISTS = 300, + SQL_EXTRACT = 301, + SQL_CAST = 302, + SQL_FORMAT = 303, + SQL_GLOBAL = 304, + SQL_HAVING = 305, + SQL_IMPORT = 306, + SQL_INSERT = 307, + SQL_ISNULL = 308, + SQL_OFFSET = 309, + SQL_RENAME = 310, + SQL_SCHEMA = 311, + SQL_SELECT = 312, + SQL_SORTED = 313, + SQL_TABLES = 314, + SQL_UNIQUE = 315, + SQL_UNLOAD = 316, + SQL_UPDATE = 317, + SQL_VALUES = 318, + SQL_AFTER = 319, + SQL_ALTER = 320, + SQL_CROSS = 321, + SQL_DELTA = 322, + SQL_FLOAT = 323, + SQL_GROUP = 324, + SQL_INDEX = 325, + SQL_INNER = 326, + SQL_LIMIT = 327, + SQL_LOCAL = 328, + SQL_MERGE = 329, + SQL_MINUS = 330, + SQL_ORDER = 331, + SQL_OUTER = 332, + SQL_RIGHT = 333, + SQL_TABLE = 334, + SQL_UNION = 335, + SQL_USING = 336, + SQL_WHERE = 337, + SQL_CALL = 338, + SQL_CASE = 339, + SQL_CHAR = 340, + SQL_COPY = 341, + SQL_DATE = 342, + SQL_DATETIME = 343, + SQL_DESC = 344, + SQL_DROP = 345, + SQL_ELSE = 346, + SQL_FILE = 347, + SQL_FROM = 348, + SQL_FULL = 349, + SQL_HASH = 350, + SQL_HINT = 351, + SQL_INTO = 352, + SQL_JOIN = 353, + SQL_LEFT = 354, + SQL_LIKE = 355, + SQL_LOAD = 356, + SQL_LONG = 357, + SQL_NULL = 358, + SQL_PLAN = 359, + SQL_SHOW = 360, + SQL_TEXT = 361, + SQL_THEN = 362, + SQL_TIME = 363, + SQL_VIEW = 364, + SQL_WHEN = 365, + SQL_WITH = 366, + SQL_ADD = 367, + SQL_ALL = 368, + SQL_AND = 369, + SQL_ASC = 370, + SQL_END = 371, + SQL_FOR = 372, + SQL_INT = 373, + SQL_KEY = 374, + SQL_NOT = 375, + SQL_OFF = 376, + SQL_SET = 377, + SQL_TOP = 378, + SQL_AS = 379, + SQL_BY = 380, + SQL_IF = 381, + SQL_IN = 382, + SQL_IS = 383, + SQL_OF = 384, + SQL_ON = 385, + SQL_OR = 386, + SQL_TO = 387, + SQL_ARRAY = 388, + SQL_CONCAT = 389, + SQL_ILIKE = 390, + SQL_SECOND = 391, + SQL_MINUTE = 392, + SQL_HOUR = 393, + SQL_DAY = 394, + SQL_MONTH = 395, + SQL_YEAR = 396, + SQL_TRUE = 397, + SQL_FALSE = 398, + SQL_TRANSACTION = 399, + SQL_BEGIN = 400, + SQL_COMMIT = 401, + SQL_ROLLBACK = 402, + SQL_EQUALS = 403, + SQL_NOTEQUALS = 404, + SQL_LESS = 405, + SQL_GREATER = 406, + SQL_LESSEQ = 407, + SQL_GREATEREQ = 408, + SQL_NOTNULL = 409, + SQL_UMINUS = 410 + }; +#endif + +/* Value type. */ +#if ! defined HSQL_STYPE && ! defined HSQL_STYPE_IS_DECLARED +union HSQL_STYPE +{ +#line 95 "bison_parser.y" + + double fval; + int64_t ival; + char* sval; + uintmax_t uval; + bool bval; + + hsql::SQLStatement* statement; + hsql::SelectStatement* select_stmt; + hsql::ImportStatement* import_stmt; + hsql::ExportStatement* export_stmt; + hsql::CreateStatement* create_stmt; + hsql::InsertStatement* insert_stmt; + hsql::DeleteStatement* delete_stmt; + hsql::UpdateStatement* update_stmt; + hsql::DropStatement* drop_stmt; + hsql::PrepareStatement* prep_stmt; + hsql::ExecuteStatement* exec_stmt; + hsql::ShowStatement* show_stmt; + hsql::TransactionStatement* transaction_stmt; + + hsql::TableName table_name; + hsql::TableRef* table; + hsql::Expr* expr; + hsql::OrderDescription* order; + hsql::OrderType order_type; + hsql::WithDescription* with_description_t; + hsql::DatetimeField datetime_field; + hsql::LimitDescription* limit; + hsql::ColumnDefinition* column_t; + hsql::TableKeyConstraint table_key_constraint_t; + hsql::ColumnType column_type_t; + hsql::ImportType import_type_t; + hsql::GroupByDescription* group_t; + hsql::UpdateClause* update_t; + hsql::Alias* alias_t; + hsql::SetOperation* set_operator_t; + + std::vector* stmt_vec; + + std::vector* str_vec; + std::vector* table_vec; + std::vector* column_vec; + std::vector* update_vec; + std::vector* expr_vec; + std::vector* order_vec; + std::vector* with_description_vec; + std::vector table_key_constraint_vec; + +#line 398 "bison_parser.cpp" + +}; +typedef union HSQL_STYPE HSQL_STYPE; +# define HSQL_STYPE_IS_TRIVIAL 1 +# define HSQL_STYPE_IS_DECLARED 1 +#endif + +/* Location type. */ +#if ! defined HSQL_LTYPE && ! defined HSQL_LTYPE_IS_DECLARED +typedef struct HSQL_LTYPE HSQL_LTYPE; +struct HSQL_LTYPE { - YYSYMBOL_YYEMPTY = -2, - YYSYMBOL_YYEOF = 0, /* "end of file" */ - YYSYMBOL_YYerror = 1, /* error */ - YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ - YYSYMBOL_IDENTIFIER = 3, /* IDENTIFIER */ - YYSYMBOL_STRING = 4, /* STRING */ - YYSYMBOL_FLOATVAL = 5, /* FLOATVAL */ - YYSYMBOL_INTVAL = 6, /* INTVAL */ - YYSYMBOL_DEALLOCATE = 7, /* DEALLOCATE */ - YYSYMBOL_PARAMETERS = 8, /* PARAMETERS */ - YYSYMBOL_INTERSECT = 9, /* INTERSECT */ - YYSYMBOL_TEMPORARY = 10, /* TEMPORARY */ - YYSYMBOL_TIMESTAMP = 11, /* TIMESTAMP */ - YYSYMBOL_DISTINCT = 12, /* DISTINCT */ - YYSYMBOL_NVARCHAR = 13, /* NVARCHAR */ - YYSYMBOL_RESTRICT = 14, /* RESTRICT */ - YYSYMBOL_TRUNCATE = 15, /* TRUNCATE */ - YYSYMBOL_ANALYZE = 16, /* ANALYZE */ - YYSYMBOL_BETWEEN = 17, /* BETWEEN */ - YYSYMBOL_CASCADE = 18, /* CASCADE */ - YYSYMBOL_COLUMNS = 19, /* COLUMNS */ - YYSYMBOL_CONTROL = 20, /* CONTROL */ - YYSYMBOL_DEFAULT = 21, /* DEFAULT */ - YYSYMBOL_EXECUTE = 22, /* EXECUTE */ - YYSYMBOL_EXPLAIN = 23, /* EXPLAIN */ - YYSYMBOL_INTEGER = 24, /* INTEGER */ - YYSYMBOL_NATURAL = 25, /* NATURAL */ - YYSYMBOL_PREPARE = 26, /* PREPARE */ - YYSYMBOL_PRIMARY = 27, /* PRIMARY */ - YYSYMBOL_SCHEMAS = 28, /* SCHEMAS */ - YYSYMBOL_CHARACTER = 29, /* CHARACTER */ - YYSYMBOL_VARYING = 30, /* VARYING */ - YYSYMBOL_REAL = 31, /* REAL */ - YYSYMBOL_DECIMAL = 32, /* DECIMAL */ - YYSYMBOL_SPATIAL = 33, /* SPATIAL */ - YYSYMBOL_VARCHAR = 34, /* VARCHAR */ - YYSYMBOL_VIRTUAL = 35, /* VIRTUAL */ - YYSYMBOL_DESCRIBE = 36, /* DESCRIBE */ - YYSYMBOL_BEFORE = 37, /* BEFORE */ - YYSYMBOL_COLUMN = 38, /* COLUMN */ - YYSYMBOL_CREATE = 39, /* CREATE */ - YYSYMBOL_DELETE = 40, /* DELETE */ - YYSYMBOL_DIRECT = 41, /* DIRECT */ - YYSYMBOL_DOUBLE = 42, /* DOUBLE */ - YYSYMBOL_ESCAPE = 43, /* ESCAPE */ - YYSYMBOL_EXCEPT = 44, /* EXCEPT */ - YYSYMBOL_EXISTS = 45, /* EXISTS */ - YYSYMBOL_EXTRACT = 46, /* EXTRACT */ - YYSYMBOL_CAST = 47, /* CAST */ - YYSYMBOL_FORMAT = 48, /* FORMAT */ - YYSYMBOL_GLOBAL = 49, /* GLOBAL */ - YYSYMBOL_HAVING = 50, /* HAVING */ - YYSYMBOL_IMPORT = 51, /* IMPORT */ - YYSYMBOL_INSERT = 52, /* INSERT */ - YYSYMBOL_ISNULL = 53, /* ISNULL */ - YYSYMBOL_OFFSET = 54, /* OFFSET */ - YYSYMBOL_RENAME = 55, /* RENAME */ - YYSYMBOL_SCHEMA = 56, /* SCHEMA */ - YYSYMBOL_SELECT = 57, /* SELECT */ - YYSYMBOL_SORTED = 58, /* SORTED */ - YYSYMBOL_TABLES = 59, /* TABLES */ - YYSYMBOL_UNIQUE = 60, /* UNIQUE */ - YYSYMBOL_UNLOAD = 61, /* UNLOAD */ - YYSYMBOL_UPDATE = 62, /* UPDATE */ - YYSYMBOL_VALUES = 63, /* VALUES */ - YYSYMBOL_AFTER = 64, /* AFTER */ - YYSYMBOL_ALTER = 65, /* ALTER */ - YYSYMBOL_CROSS = 66, /* CROSS */ - YYSYMBOL_DELTA = 67, /* DELTA */ - YYSYMBOL_FLOAT = 68, /* FLOAT */ - YYSYMBOL_GROUP = 69, /* GROUP */ - YYSYMBOL_INDEX = 70, /* INDEX */ - YYSYMBOL_INNER = 71, /* INNER */ - YYSYMBOL_LIMIT = 72, /* LIMIT */ - YYSYMBOL_LOCAL = 73, /* LOCAL */ - YYSYMBOL_MERGE = 74, /* MERGE */ - YYSYMBOL_MINUS = 75, /* MINUS */ - YYSYMBOL_ORDER = 76, /* ORDER */ - YYSYMBOL_OUTER = 77, /* OUTER */ - YYSYMBOL_RIGHT = 78, /* RIGHT */ - YYSYMBOL_TABLE = 79, /* TABLE */ - YYSYMBOL_UNION = 80, /* UNION */ - YYSYMBOL_USING = 81, /* USING */ - YYSYMBOL_WHERE = 82, /* WHERE */ - YYSYMBOL_CALL = 83, /* CALL */ - YYSYMBOL_CASE = 84, /* CASE */ - YYSYMBOL_CHAR = 85, /* CHAR */ - YYSYMBOL_COPY = 86, /* COPY */ - YYSYMBOL_DATE = 87, /* DATE */ - YYSYMBOL_DATETIME = 88, /* DATETIME */ - YYSYMBOL_DESC = 89, /* DESC */ - YYSYMBOL_DROP = 90, /* DROP */ - YYSYMBOL_ELSE = 91, /* ELSE */ - YYSYMBOL_FILE = 92, /* FILE */ - YYSYMBOL_FROM = 93, /* FROM */ - YYSYMBOL_FULL = 94, /* FULL */ - YYSYMBOL_HASH = 95, /* HASH */ - YYSYMBOL_HINT = 96, /* HINT */ - YYSYMBOL_INTO = 97, /* INTO */ - YYSYMBOL_JOIN = 98, /* JOIN */ - YYSYMBOL_LEFT = 99, /* LEFT */ - YYSYMBOL_LIKE = 100, /* LIKE */ - YYSYMBOL_LOAD = 101, /* LOAD */ - YYSYMBOL_LONG = 102, /* LONG */ - YYSYMBOL_NULL = 103, /* NULL */ - YYSYMBOL_PLAN = 104, /* PLAN */ - YYSYMBOL_SHOW = 105, /* SHOW */ - YYSYMBOL_TEXT = 106, /* TEXT */ - YYSYMBOL_THEN = 107, /* THEN */ - YYSYMBOL_TIME = 108, /* TIME */ - YYSYMBOL_VIEW = 109, /* VIEW */ - YYSYMBOL_WHEN = 110, /* WHEN */ - YYSYMBOL_WITH = 111, /* WITH */ - YYSYMBOL_ADD = 112, /* ADD */ - YYSYMBOL_ALL = 113, /* ALL */ - YYSYMBOL_AND = 114, /* AND */ - YYSYMBOL_ASC = 115, /* ASC */ - YYSYMBOL_END = 116, /* END */ - YYSYMBOL_FOR = 117, /* FOR */ - YYSYMBOL_INT = 118, /* INT */ - YYSYMBOL_KEY = 119, /* KEY */ - YYSYMBOL_NOT = 120, /* NOT */ - YYSYMBOL_OFF = 121, /* OFF */ - YYSYMBOL_SET = 122, /* SET */ - YYSYMBOL_TOP = 123, /* TOP */ - YYSYMBOL_AS = 124, /* AS */ - YYSYMBOL_BY = 125, /* BY */ - YYSYMBOL_IF = 126, /* IF */ - YYSYMBOL_IN = 127, /* IN */ - YYSYMBOL_IS = 128, /* IS */ - YYSYMBOL_OF = 129, /* OF */ - YYSYMBOL_ON = 130, /* ON */ - YYSYMBOL_OR = 131, /* OR */ - YYSYMBOL_TO = 132, /* TO */ - YYSYMBOL_ARRAY = 133, /* ARRAY */ - YYSYMBOL_CONCAT = 134, /* CONCAT */ - YYSYMBOL_ILIKE = 135, /* ILIKE */ - YYSYMBOL_SECOND = 136, /* SECOND */ - YYSYMBOL_MINUTE = 137, /* MINUTE */ - YYSYMBOL_HOUR = 138, /* HOUR */ - YYSYMBOL_DAY = 139, /* DAY */ - YYSYMBOL_MONTH = 140, /* MONTH */ - YYSYMBOL_YEAR = 141, /* YEAR */ - YYSYMBOL_TRUE = 142, /* TRUE */ - YYSYMBOL_FALSE = 143, /* FALSE */ - YYSYMBOL_TRANSACTION = 144, /* TRANSACTION */ - YYSYMBOL_BEGIN = 145, /* BEGIN */ - YYSYMBOL_COMMIT = 146, /* COMMIT */ - YYSYMBOL_ROLLBACK = 147, /* ROLLBACK */ - YYSYMBOL_148_ = 148, /* '=' */ - YYSYMBOL_EQUALS = 149, /* EQUALS */ - YYSYMBOL_NOTEQUALS = 150, /* NOTEQUALS */ - YYSYMBOL_151_ = 151, /* '<' */ - YYSYMBOL_152_ = 152, /* '>' */ - YYSYMBOL_LESS = 153, /* LESS */ - YYSYMBOL_GREATER = 154, /* GREATER */ - YYSYMBOL_LESSEQ = 155, /* LESSEQ */ - YYSYMBOL_GREATEREQ = 156, /* GREATEREQ */ - YYSYMBOL_NOTNULL = 157, /* NOTNULL */ - YYSYMBOL_158_ = 158, /* '+' */ - YYSYMBOL_159_ = 159, /* '-' */ - YYSYMBOL_160_ = 160, /* '*' */ - YYSYMBOL_161_ = 161, /* '/' */ - YYSYMBOL_162_ = 162, /* '%' */ - YYSYMBOL_163_ = 163, /* '^' */ - YYSYMBOL_UMINUS = 164, /* UMINUS */ - YYSYMBOL_165_ = 165, /* '[' */ - YYSYMBOL_166_ = 166, /* ']' */ - YYSYMBOL_167_ = 167, /* '(' */ - YYSYMBOL_168_ = 168, /* ')' */ - YYSYMBOL_169_ = 169, /* '.' */ - YYSYMBOL_170_ = 170, /* ';' */ - YYSYMBOL_171_ = 171, /* ',' */ - YYSYMBOL_172_ = 172, /* '?' */ - YYSYMBOL_YYACCEPT = 173, /* $accept */ - YYSYMBOL_input = 174, /* input */ - YYSYMBOL_statement_list = 175, /* statement_list */ - YYSYMBOL_statement = 176, /* statement */ - YYSYMBOL_preparable_statement = 177, /* preparable_statement */ - YYSYMBOL_opt_hints = 178, /* opt_hints */ - YYSYMBOL_hint_list = 179, /* hint_list */ - YYSYMBOL_hint = 180, /* hint */ - YYSYMBOL_transaction_statement = 181, /* transaction_statement */ - YYSYMBOL_opt_transaction_keyword = 182, /* opt_transaction_keyword */ - YYSYMBOL_prepare_statement = 183, /* prepare_statement */ - YYSYMBOL_prepare_target_query = 184, /* prepare_target_query */ - YYSYMBOL_execute_statement = 185, /* execute_statement */ - YYSYMBOL_import_statement = 186, /* import_statement */ - YYSYMBOL_file_type = 187, /* file_type */ - YYSYMBOL_file_path = 188, /* file_path */ - YYSYMBOL_opt_file_type = 189, /* opt_file_type */ - YYSYMBOL_export_statement = 190, /* export_statement */ - YYSYMBOL_show_statement = 191, /* show_statement */ - YYSYMBOL_create_statement = 192, /* create_statement */ - YYSYMBOL_opt_not_exists = 193, /* opt_not_exists */ - YYSYMBOL_column_def_commalist = 194, /* column_def_commalist */ - YYSYMBOL_column_def = 195, /* column_def */ - YYSYMBOL_column_type = 196, /* column_type */ - YYSYMBOL_opt_column_nullable = 197, /* opt_column_nullable */ - YYSYMBOL_drop_statement = 198, /* drop_statement */ - YYSYMBOL_opt_exists = 199, /* opt_exists */ - YYSYMBOL_delete_statement = 200, /* delete_statement */ - YYSYMBOL_truncate_statement = 201, /* truncate_statement */ - YYSYMBOL_insert_statement = 202, /* insert_statement */ - YYSYMBOL_opt_column_list = 203, /* opt_column_list */ - YYSYMBOL_update_statement = 204, /* update_statement */ - YYSYMBOL_update_clause_commalist = 205, /* update_clause_commalist */ - YYSYMBOL_update_clause = 206, /* update_clause */ - YYSYMBOL_select_statement = 207, /* select_statement */ - YYSYMBOL_select_within_set_operation = 208, /* select_within_set_operation */ - YYSYMBOL_select_within_set_operation_no_parentheses = 209, /* select_within_set_operation_no_parentheses */ - YYSYMBOL_select_with_paren = 210, /* select_with_paren */ - YYSYMBOL_select_no_paren = 211, /* select_no_paren */ - YYSYMBOL_set_operator = 212, /* set_operator */ - YYSYMBOL_set_type = 213, /* set_type */ - YYSYMBOL_opt_all = 214, /* opt_all */ - YYSYMBOL_select_clause = 215, /* select_clause */ - YYSYMBOL_opt_distinct = 216, /* opt_distinct */ - YYSYMBOL_select_list = 217, /* select_list */ - YYSYMBOL_opt_from_clause = 218, /* opt_from_clause */ - YYSYMBOL_from_clause = 219, /* from_clause */ - YYSYMBOL_opt_where = 220, /* opt_where */ - YYSYMBOL_opt_group = 221, /* opt_group */ - YYSYMBOL_opt_having = 222, /* opt_having */ - YYSYMBOL_opt_order = 223, /* opt_order */ - YYSYMBOL_order_list = 224, /* order_list */ - YYSYMBOL_order_desc = 225, /* order_desc */ - YYSYMBOL_opt_order_type = 226, /* opt_order_type */ - YYSYMBOL_opt_top = 227, /* opt_top */ - YYSYMBOL_opt_limit = 228, /* opt_limit */ - YYSYMBOL_expr_list = 229, /* expr_list */ - YYSYMBOL_opt_literal_list = 230, /* opt_literal_list */ - YYSYMBOL_literal_list = 231, /* literal_list */ - YYSYMBOL_expr_alias = 232, /* expr_alias */ - YYSYMBOL_expr = 233, /* expr */ - YYSYMBOL_operand = 234, /* operand */ - YYSYMBOL_scalar_expr = 235, /* scalar_expr */ - YYSYMBOL_unary_expr = 236, /* unary_expr */ - YYSYMBOL_binary_expr = 237, /* binary_expr */ - YYSYMBOL_logic_expr = 238, /* logic_expr */ - YYSYMBOL_in_expr = 239, /* in_expr */ - YYSYMBOL_case_expr = 240, /* case_expr */ - YYSYMBOL_case_list = 241, /* case_list */ - YYSYMBOL_exists_expr = 242, /* exists_expr */ - YYSYMBOL_comp_expr = 243, /* comp_expr */ - YYSYMBOL_function_expr = 244, /* function_expr */ - YYSYMBOL_extract_expr = 245, /* extract_expr */ - YYSYMBOL_cast_expr = 246, /* cast_expr */ - YYSYMBOL_datetime_field = 247, /* datetime_field */ - YYSYMBOL_array_expr = 248, /* array_expr */ - YYSYMBOL_array_index = 249, /* array_index */ - YYSYMBOL_between_expr = 250, /* between_expr */ - YYSYMBOL_column_name = 251, /* column_name */ - YYSYMBOL_literal = 252, /* literal */ - YYSYMBOL_string_literal = 253, /* string_literal */ - YYSYMBOL_bool_literal = 254, /* bool_literal */ - YYSYMBOL_num_literal = 255, /* num_literal */ - YYSYMBOL_int_literal = 256, /* int_literal */ - YYSYMBOL_null_literal = 257, /* null_literal */ - YYSYMBOL_param_expr = 258, /* param_expr */ - YYSYMBOL_table_ref = 259, /* table_ref */ - YYSYMBOL_table_ref_atomic = 260, /* table_ref_atomic */ - YYSYMBOL_nonjoin_table_ref_atomic = 261, /* nonjoin_table_ref_atomic */ - YYSYMBOL_table_ref_commalist = 262, /* table_ref_commalist */ - YYSYMBOL_table_ref_name = 263, /* table_ref_name */ - YYSYMBOL_table_ref_name_no_alias = 264, /* table_ref_name_no_alias */ - YYSYMBOL_table_name = 265, /* table_name */ - YYSYMBOL_opt_index_name = 266, /* opt_index_name */ - YYSYMBOL_index_name = 267, /* index_name */ - YYSYMBOL_table_alias = 268, /* table_alias */ - YYSYMBOL_opt_table_alias = 269, /* opt_table_alias */ - YYSYMBOL_alias = 270, /* alias */ - YYSYMBOL_opt_alias = 271, /* opt_alias */ - YYSYMBOL_opt_with_clause = 272, /* opt_with_clause */ - YYSYMBOL_with_clause = 273, /* with_clause */ - YYSYMBOL_with_description_list = 274, /* with_description_list */ - YYSYMBOL_with_description = 275, /* with_description */ - YYSYMBOL_join_clause = 276, /* join_clause */ - YYSYMBOL_opt_join_type = 277, /* opt_join_type */ - YYSYMBOL_join_condition = 278, /* join_condition */ - YYSYMBOL_opt_semicolon = 279, /* opt_semicolon */ - YYSYMBOL_ident_commalist = 280 /* ident_commalist */ + int first_line; + int first_column; + int last_line; + int last_column; }; -typedef enum yysymbol_kind_t yysymbol_kind_t; +# define HSQL_LTYPE_IS_DECLARED 1 +# define HSQL_LTYPE_IS_TRIVIAL 1 +#endif + + + +int hsql_parse (hsql::SQLParserResult* result, yyscan_t scanner); +#endif /* !YY_HSQL_BISON_PARSER_H_INCLUDED */ @@ -455,18 +461,6 @@ typedef int_least16_t yytype_int16; typedef short yytype_int16; #endif -/* Work around bug in HP-UX 11.23, which defines these macros - incorrectly for preprocessor constants. This workaround can likely - be removed in 2023, as HPE has promised support for HP-UX 11.23 - (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of - . */ -#ifdef __hpux -# undef UINT_LEAST8_MAX -# undef UINT_LEAST16_MAX -# define UINT_LEAST8_MAX 255 -# define UINT_LEAST16_MAX 65535 -#endif - #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ @@ -526,7 +520,6 @@ typedef int yytype_uint16; #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) - /* Stored state numbers (used for stacks). */ typedef yytype_int16 yy_state_t; @@ -545,7 +538,6 @@ typedef int yy_state_fast_t; # endif #endif - #ifndef YY_ATTRIBUTE_PURE # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) @@ -564,9 +556,9 @@ typedef int yy_state_fast_t; /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YY_USE(E) ((void) (E)) +# define YYUSE(E) ((void) (E)) #else -# define YY_USE(E) /* empty */ +# define YYUSE(E) /* empty */ #endif #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ @@ -603,7 +595,7 @@ typedef int yy_state_fast_t; #define YY_ASSERT(E) ((void) (0 && (E))) -#if 1 +#if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -668,7 +660,8 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif -#endif /* 1 */ +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + #if (! defined yyoverflow \ && (! defined __cplusplus \ @@ -736,27 +729,25 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 64 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 736 +#define YYLAST 859 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 173 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 108 +#define YYNNTS 110 /* YYNRULES -- Number of rules. */ -#define YYNRULES 271 +#define YYNRULES 276 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 501 +#define YYNSTATES 514 -/* YYMAXUTOK -- Last valid token kind. */ +#define YYUNDEFTOK 2 #define YYMAXUTOK 410 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ -#define YYTRANSLATE(YYX) \ - (0 <= (YYX) && (YYX) <= YYMAXUTOK \ - ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ - : YYSYMBOL_YYUNDEF) +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ @@ -810,70 +801,63 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 271, 271, 292, 298, 307, 311, 315, 318, 321, - 328, 329, 330, 331, 332, 333, 334, 335, 336, 345, - 346, 351, 352, 356, 360, 372, 375, 378, 384, 385, - 392, 399, 402, 406, 420, 426, 435, 452, 456, 459, - 468, 482, 485, 490, 504, 517, 524, 531, 538, 549, - 550, 554, 555, 559, 565, 566, 567, 568, 569, 570, - 571, 572, 573, 574, 575, 576, 577, 578, 582, 583, - 584, 594, 600, 606, 611, 619, 620, 629, 638, 651, - 658, 669, 670, 680, 689, 690, 694, 706, 710, 714, - 728, 729, 732, 733, 744, 745, 749, 759, 772, 779, - 783, 787, 794, 797, 803, 815, 816, 820, 824, 825, - 829, 834, 835, 839, 844, 848, 849, 853, 854, 858, - 859, 863, 867, 868, 869, 875, 876, 880, 881, 882, - 883, 884, 885, 892, 893, 897, 898, 902, 903, 907, - 917, 918, 919, 920, 921, 925, 926, 927, 928, 929, - 930, 931, 932, 933, 934, 935, 939, 940, 944, 945, - 946, 947, 948, 952, 953, 954, 955, 956, 957, 958, - 959, 960, 961, 962, 966, 967, 971, 972, 973, 974, - 980, 981, 982, 983, 987, 988, 992, 993, 997, 998, - 999, 1000, 1001, 1002, 1003, 1007, 1008, 1012, 1016, 1020, - 1021, 1022, 1023, 1024, 1025, 1029, 1033, 1037, 1041, 1042, - 1043, 1044, 1048, 1049, 1050, 1051, 1052, 1056, 1060, 1061, - 1065, 1066, 1070, 1074, 1078, 1090, 1091, 1101, 1102, 1106, - 1107, 1116, 1117, 1122, 1133, 1142, 1143, 1147, 1148, 1152, - 1157, 1158, 1163, 1164, 1169, 1170, 1175, 1176, 1185, 1186, - 1190, 1194, 1198, 1205, 1218, 1226, 1236, 1255, 1256, 1257, - 1258, 1259, 1260, 1261, 1262, 1263, 1264, 1269, 1278, 1279, - 1284, 1285 + 0, 275, 275, 296, 302, 311, 315, 319, 322, 325, + 332, 333, 334, 335, 336, 337, 338, 339, 340, 349, + 350, 355, 356, 360, 364, 376, 379, 382, 388, 389, + 396, 403, 406, 410, 424, 430, 439, 456, 460, 463, + 472, 486, 489, 494, 508, 521, 528, 535, 542, 553, + 554, 558, 559, 563, 569, 570, 571, 572, 573, 574, + 575, 576, 577, 578, 579, 580, 581, 582, 586, 587, + 588, 592, 593, 594, 598, 599, 607, 613, 619, 624, + 632, 633, 642, 651, 664, 671, 682, 683, 693, 702, + 703, 707, 719, 723, 727, 741, 742, 745, 746, 757, + 758, 762, 772, 785, 792, 796, 800, 807, 810, 816, + 828, 829, 833, 837, 838, 842, 847, 848, 852, 857, + 861, 862, 866, 867, 871, 872, 876, 880, 881, 882, + 888, 889, 893, 894, 895, 896, 897, 898, 905, 906, + 910, 911, 915, 916, 920, 930, 931, 932, 933, 934, + 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, + 948, 952, 953, 957, 958, 959, 960, 961, 965, 966, + 967, 968, 969, 970, 971, 972, 973, 974, 975, 979, + 980, 984, 985, 986, 987, 993, 994, 995, 996, 1000, + 1001, 1005, 1006, 1010, 1011, 1012, 1013, 1014, 1015, 1016, + 1020, 1021, 1025, 1029, 1033, 1034, 1035, 1036, 1037, 1038, + 1042, 1046, 1050, 1054, 1055, 1056, 1057, 1061, 1062, 1063, + 1064, 1065, 1069, 1073, 1074, 1078, 1079, 1083, 1087, 1091, + 1103, 1104, 1114, 1115, 1119, 1120, 1129, 1130, 1135, 1146, + 1155, 1156, 1160, 1161, 1165, 1170, 1171, 1176, 1177, 1182, + 1183, 1188, 1189, 1198, 1199, 1203, 1207, 1211, 1218, 1231, + 1239, 1249, 1268, 1269, 1270, 1271, 1272, 1273, 1274, 1275, + 1276, 1277, 1282, 1291, 1292, 1297, 1298 }; #endif -/** Accessing symbol of state STATE. */ -#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) - -#if 1 -/* The user-facing name of the symbol whose (internal) number is - YYSYMBOL. No bounds checking. */ -static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; - +#if HSQL_DEBUG || YYERROR_VERBOSE || 1 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { - "\"end of file\"", "error", "\"invalid token\"", "IDENTIFIER", "STRING", - "FLOATVAL", "INTVAL", "DEALLOCATE", "PARAMETERS", "INTERSECT", - "TEMPORARY", "TIMESTAMP", "DISTINCT", "NVARCHAR", "RESTRICT", "TRUNCATE", - "ANALYZE", "BETWEEN", "CASCADE", "COLUMNS", "CONTROL", "DEFAULT", - "EXECUTE", "EXPLAIN", "INTEGER", "NATURAL", "PREPARE", "PRIMARY", - "SCHEMAS", "CHARACTER", "VARYING", "REAL", "DECIMAL", "SPATIAL", - "VARCHAR", "VIRTUAL", "DESCRIBE", "BEFORE", "COLUMN", "CREATE", "DELETE", - "DIRECT", "DOUBLE", "ESCAPE", "EXCEPT", "EXISTS", "EXTRACT", "CAST", - "FORMAT", "GLOBAL", "HAVING", "IMPORT", "INSERT", "ISNULL", "OFFSET", - "RENAME", "SCHEMA", "SELECT", "SORTED", "TABLES", "UNIQUE", "UNLOAD", - "UPDATE", "VALUES", "AFTER", "ALTER", "CROSS", "DELTA", "FLOAT", "GROUP", - "INDEX", "INNER", "LIMIT", "LOCAL", "MERGE", "MINUS", "ORDER", "OUTER", - "RIGHT", "TABLE", "UNION", "USING", "WHERE", "CALL", "CASE", "CHAR", - "COPY", "DATE", "DATETIME", "DESC", "DROP", "ELSE", "FILE", "FROM", - "FULL", "HASH", "HINT", "INTO", "JOIN", "LEFT", "LIKE", "LOAD", "LONG", - "NULL", "PLAN", "SHOW", "TEXT", "THEN", "TIME", "VIEW", "WHEN", "WITH", - "ADD", "ALL", "AND", "ASC", "END", "FOR", "INT", "KEY", "NOT", "OFF", - "SET", "TOP", "AS", "BY", "IF", "IN", "IS", "OF", "ON", "OR", "TO", - "ARRAY", "CONCAT", "ILIKE", "SECOND", "MINUTE", "HOUR", "DAY", "MONTH", - "YEAR", "TRUE", "FALSE", "TRANSACTION", "BEGIN", "COMMIT", "ROLLBACK", - "'='", "EQUALS", "NOTEQUALS", "'<'", "'>'", "LESS", "GREATER", "LESSEQ", + "$end", "error", "$undefined", "IDENTIFIER", "STRING", "FLOATVAL", + "INTVAL", "DEALLOCATE", "PARAMETERS", "INTERSECT", "TEMPORARY", + "TIMESTAMP", "DISTINCT", "NVARCHAR", "RESTRICT", "TRUNCATE", "ANALYZE", + "BETWEEN", "CASCADE", "COLUMNS", "CONTROL", "DEFAULT", "EXECUTE", + "EXPLAIN", "INTEGER", "NATURAL", "PREPARE", "PRIMARY", "SCHEMAS", + "CHARACTER", "VARYING", "REAL", "DECIMAL", "SPATIAL", "VARCHAR", + "VIRTUAL", "DESCRIBE", "BEFORE", "COLUMN", "CREATE", "DELETE", "DIRECT", + "DOUBLE", "ESCAPE", "EXCEPT", "EXISTS", "EXTRACT", "CAST", "FORMAT", + "GLOBAL", "HAVING", "IMPORT", "INSERT", "ISNULL", "OFFSET", "RENAME", + "SCHEMA", "SELECT", "SORTED", "TABLES", "UNIQUE", "UNLOAD", "UPDATE", + "VALUES", "AFTER", "ALTER", "CROSS", "DELTA", "FLOAT", "GROUP", "INDEX", + "INNER", "LIMIT", "LOCAL", "MERGE", "MINUS", "ORDER", "OUTER", "RIGHT", + "TABLE", "UNION", "USING", "WHERE", "CALL", "CASE", "CHAR", "COPY", + "DATE", "DATETIME", "DESC", "DROP", "ELSE", "FILE", "FROM", "FULL", + "HASH", "HINT", "INTO", "JOIN", "LEFT", "LIKE", "LOAD", "LONG", "NULL", + "PLAN", "SHOW", "TEXT", "THEN", "TIME", "VIEW", "WHEN", "WITH", "ADD", + "ALL", "AND", "ASC", "END", "FOR", "INT", "KEY", "NOT", "OFF", "SET", + "TOP", "AS", "BY", "IF", "IN", "IS", "OF", "ON", "OR", "TO", "ARRAY", + "CONCAT", "ILIKE", "SECOND", "MINUTE", "HOUR", "DAY", "MONTH", "YEAR", + "TRUE", "FALSE", "TRANSACTION", "BEGIN", "COMMIT", "ROLLBACK", "'='", + "EQUALS", "NOTEQUALS", "'<'", "'>'", "LESS", "GREATER", "LESSEQ", "GREATEREQ", "NOTNULL", "'+'", "'-'", "'*'", "'/'", "'%'", "'^'", "UMINUS", "'['", "']'", "'('", "')'", "'.'", "';'", "','", "'?'", "$accept", "input", "statement_list", "statement", @@ -883,7 +867,8 @@ static const char *const yytname[] = "file_type", "file_path", "opt_file_type", "export_statement", "show_statement", "create_statement", "opt_not_exists", "column_def_commalist", "column_def", "column_type", - "opt_column_nullable", "drop_statement", "opt_exists", + "opt_column_nullable", "opt_table_key_constraints", + "table_key_constraint", "drop_statement", "opt_exists", "delete_statement", "truncate_statement", "insert_statement", "opt_column_list", "update_statement", "update_clause_commalist", "update_clause", "select_statement", "select_within_set_operation", @@ -906,15 +891,9 @@ static const char *const yytname[] = "with_description", "join_clause", "opt_join_type", "join_condition", "opt_semicolon", "ident_commalist", YY_NULLPTR }; - -static const char * -yysymbol_name (yysymbol_kind_t yysymbol) -{ - return yytname[yysymbol]; -} #endif -#ifdef YYPRINT +# ifdef YYPRINT /* YYTOKNUM[NUM] -- (External) token number corresponding to the (internal) symbol number NUM (which must be that of a token). */ static const yytype_int16 yytoknum[] = @@ -938,14 +917,14 @@ static const yytype_int16 yytoknum[] = 42, 47, 37, 94, 410, 91, 93, 40, 41, 46, 59, 44, 63 }; -#endif +# endif -#define YYPACT_NINF (-379) +#define YYPACT_NINF (-403) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF (-269) +#define YYTABLE_NINF (-274) #define yytable_value_is_error(Yyn) \ ((Yyn) == YYTABLE_NINF) @@ -954,57 +933,58 @@ static const yytype_int16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - 521, 41, 78, 97, 160, 78, 112, 38, 74, 108, - 78, 78, 125, 15, 172, 39, 39, 39, 239, 98, - -379, 159, -379, 159, -379, -379, -379, -379, -379, -379, - -379, -379, -379, -379, -379, -3, -379, 266, 110, -379, - 116, 204, -379, 301, 183, 183, 78, 307, 78, 194, - -379, -55, 314, 201, 201, 78, -379, 209, 161, -379, - -379, -379, -379, -379, -379, 516, -379, 243, -379, -379, - 217, -3, 81, -379, 21, -379, 342, 12, 343, -379, - 183, 226, 78, 78, 275, -379, 256, 210, 358, 394, - 394, -379, 271, 360, 78, 78, -379, 236, 172, -379, - 237, 400, 396, 241, 242, -379, -379, -379, -3, 294, - 286, -3, -14, -379, -379, -379, -379, -379, -379, -379, - -379, 245, 244, -379, -379, -379, -379, -379, -379, -379, - -379, -379, 284, 373, -60, 210, 297, -379, 394, 417, - 42, 274, -57, -379, 312, -379, 312, 78, -379, -379, - -379, -379, -379, 422, -379, -379, 297, -379, -379, 352, - -379, -379, 81, -379, -379, 297, 352, 297, 147, -379, - -379, 12, 78, -379, 428, 321, 430, 310, 63, 269, - 276, 277, 153, 318, 280, 332, -379, 208, 174, 359, - -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, - -379, -379, -379, -379, -379, -379, 344, -379, 35, 279, - -379, 297, 358, -379, 399, -379, -379, -379, 281, 93, - -379, 349, 278, -379, 66, -14, -3, 282, -379, 113, - -14, 174, 401, -27, -379, 283, 362, -379, 395, 158, - -379, 321, 11, 16, 405, 233, 297, 297, 126, 71, - 291, 332, 552, 297, 86, 298, -52, 297, 297, 332, - -379, 332, -18, 300, 0, 332, 332, 332, 332, 332, - 332, 332, 332, 332, 332, 332, 332, 332, 332, 332, - 400, 78, -379, 465, 12, 174, -379, 307, 12, -379, - 422, 10, 275, -379, 297, -379, 467, -379, -379, -379, - -379, 297, -379, -379, -379, -379, 297, 297, 417, 394, - -379, 441, -379, 305, 306, -379, -379, 309, -379, -379, - -379, -379, -379, -379, 195, -379, 430, -379, -379, 297, - -379, -379, 313, -379, -379, -379, -379, -379, -379, 391, - 128, 102, 119, 297, 297, -379, 405, 388, -47, -379, - -379, -379, 375, 495, 571, 332, 328, 208, -379, 393, - 333, 571, 571, 571, 571, 232, 232, 232, 232, 86, - 86, -36, -36, -36, -97, 334, -379, -379, 163, -379, - 185, -379, 321, -379, -5, -379, 331, -379, 23, -379, - 436, -379, -379, -379, 174, 174, 187, -379, 339, 506, - 519, 520, -379, 424, -379, -379, 191, -379, 297, 395, - 297, 297, -379, 127, 131, 361, -379, 332, 571, 208, - 364, 214, -379, -379, -379, -379, 365, 432, -379, -379, - -379, 457, 458, 460, 442, 10, 536, -379, -379, -379, - 416, -379, -379, 538, 374, 378, 381, -379, -379, 55, - 382, 174, 177, -379, 297, -379, 552, 383, 218, -379, - -379, 23, 10, -379, -379, -379, 10, 14, 386, 297, - 390, 548, -379, -379, -379, -379, -379, 174, -379, -379, - -379, -379, 200, 417, -22, -379, 397, 392, 297, 228, - 297, -379, -379, 18, 174, -379, -379, 174, 402, 398, - -379 + 555, 19, 30, 66, 82, 30, -16, 34, 98, -6, + 30, 30, -8, 6, 103, -19, -19, -19, 175, 28, + -403, 69, -403, 69, -403, -403, -403, -403, -403, -403, + -403, -403, -403, -403, -403, -14, -403, 222, 65, -403, + 39, 145, -403, 242, 120, 120, 30, 250, 30, 135, + -403, -66, 265, 143, 143, 30, -403, 151, 115, -403, + -403, -403, -403, -403, -403, 497, -403, 183, -403, -403, + 164, -14, 32, -403, 114, -403, 293, 13, 298, -403, + 120, 186, 30, 30, 215, -403, 220, 146, 321, 327, + 327, -403, 195, 287, 30, 30, -403, 166, 103, -403, + 170, 333, 329, 184, 190, -403, -403, -403, -14, 241, + 238, -14, 26, -403, -403, -403, -403, -403, -403, -403, + -403, 199, 205, -403, -403, -403, -403, -403, -403, -403, + -403, -403, 247, 344, -67, 146, 258, -403, 327, 382, + -2, 248, -58, -403, 279, -403, 279, 30, -403, -403, + -403, -403, -403, 392, -403, -403, 258, -403, -403, 322, + -403, -403, 32, -403, -403, 258, 322, 258, 84, -403, + -403, 13, 30, -403, 394, 299, 401, 288, -75, 246, + 249, 252, 156, 289, 255, 304, -403, 227, 55, 340, + -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, + -403, -403, -403, -403, -403, -403, 317, -403, 87, 254, + -403, 258, 321, -403, 367, -403, -403, -403, 256, 172, + -403, 334, 257, -403, 33, 26, -14, 262, -403, 74, + 26, 55, 372, -32, -403, 267, 337, -403, 741, 264, + -403, 299, 11, 12, 379, 243, 258, 258, 108, 104, + 271, 304, 563, 258, 157, 273, 53, 258, 258, 304, + -403, 304, -41, 272, 4, 304, 304, 304, 304, 304, + 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, + 333, 30, -403, 439, 13, 55, -403, 250, 13, -403, + 392, 10, 215, -403, 258, -403, 441, -403, -403, -403, + -403, 258, -403, -403, -403, -403, 258, 258, 382, 327, + -403, 413, -403, 278, 283, -403, -403, 284, -403, -403, + -403, -403, -403, -403, 80, 37, 177, -403, -403, -403, + 258, -403, -403, 285, -403, -403, -403, -403, -403, -403, + 359, 136, 140, 125, 258, 258, -403, 379, 354, -52, + -403, -403, -403, 341, 519, 599, 304, 290, 227, -403, + 355, 294, 599, 599, 599, 599, 635, 635, 635, 635, + 157, 157, -60, -60, -60, -86, 296, -403, -403, 178, + -403, 185, -403, 299, -403, 440, -403, 295, -403, 25, + -403, 400, -403, -403, -403, 55, 55, 191, -403, 303, + 466, 467, 471, -403, 375, -403, 360, 313, -403, -403, + 17, -403, 197, -403, 258, 741, 258, 258, -403, 169, + 207, 314, -403, 304, 599, 227, 315, 203, -403, -403, + -403, -403, 316, 383, -403, -403, -403, 408, 409, 410, + 395, 10, 504, -403, -403, -403, 384, -403, -403, 502, + 339, 345, 346, -403, 348, 382, -403, 68, 352, 55, + 213, -403, 258, -403, 563, 353, 204, -403, -403, 25, + 10, -403, -403, -403, 10, 469, 349, 258, 356, 516, + -403, -403, 382, 234, -403, -403, -403, 55, -403, -403, + -403, -403, 171, 382, -20, -403, 357, 235, -403, 361, + 258, 240, 258, -403, -403, -403, 18, 55, -403, -403, + 55, 358, 362, -403 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -1012,89 +992,90 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_int16 yydefact[] = { - 249, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 29, 29, 29, 0, 269, + 254, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 29, 29, 29, 0, 274, 3, 20, 18, 20, 17, 8, 9, 7, 11, 16, - 13, 14, 12, 15, 10, 0, 248, 0, 235, 78, - 32, 0, 43, 238, 50, 50, 0, 0, 0, 0, - 234, 0, 0, 76, 76, 0, 41, 0, 250, 251, - 28, 25, 27, 26, 1, 249, 2, 0, 6, 5, - 126, 0, 87, 88, 118, 73, 0, 136, 0, 237, - 50, 0, 0, 0, 112, 36, 0, 82, 0, 0, - 0, 239, 0, 0, 0, 0, 42, 0, 0, 4, - 0, 0, 106, 0, 0, 100, 101, 99, 0, 103, - 0, 0, 132, 236, 217, 220, 222, 223, 218, 219, - 224, 0, 135, 137, 212, 213, 214, 221, 215, 216, - 31, 30, 0, 0, 0, 82, 0, 77, 0, 0, - 0, 0, 112, 84, 39, 37, 39, 0, 75, 71, - 72, 253, 252, 0, 125, 105, 0, 95, 94, 118, - 91, 90, 92, 102, 98, 0, 118, 0, 0, 96, - 33, 0, 0, 49, 0, 249, 0, 0, 208, 0, - 0, 0, 0, 0, 0, 0, 210, 0, 111, 140, - 147, 148, 149, 142, 144, 150, 143, 163, 151, 152, - 153, 154, 146, 141, 156, 157, 0, 270, 0, 0, - 80, 0, 0, 83, 0, 35, 40, 74, 23, 0, - 21, 109, 107, 133, 247, 132, 0, 117, 119, 124, - 132, 128, 130, 127, 138, 0, 0, 46, 0, 0, - 51, 249, 106, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 159, 0, 158, 0, 0, 0, 0, 0, - 160, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 13, 14, 12, 15, 10, 0, 253, 0, 240, 83, + 32, 0, 43, 243, 50, 50, 0, 0, 0, 0, + 239, 0, 0, 81, 81, 0, 41, 0, 255, 256, + 28, 25, 27, 26, 1, 254, 2, 0, 6, 5, + 131, 0, 92, 93, 123, 78, 0, 141, 0, 242, + 50, 0, 0, 0, 117, 36, 0, 87, 0, 0, + 0, 244, 0, 0, 0, 0, 42, 0, 0, 4, + 0, 0, 111, 0, 0, 105, 106, 104, 0, 108, + 0, 0, 137, 241, 222, 225, 227, 228, 223, 224, + 229, 0, 140, 142, 217, 218, 219, 226, 220, 221, + 31, 30, 0, 0, 0, 87, 0, 82, 0, 0, + 0, 0, 117, 89, 39, 37, 39, 0, 80, 76, + 77, 258, 257, 0, 130, 110, 0, 100, 99, 123, + 96, 95, 97, 107, 103, 0, 123, 0, 0, 101, + 33, 0, 0, 49, 0, 254, 0, 0, 213, 0, + 0, 0, 0, 0, 0, 0, 215, 0, 116, 145, + 152, 153, 154, 147, 149, 155, 148, 168, 156, 157, + 158, 159, 151, 146, 161, 162, 0, 275, 0, 0, + 85, 0, 0, 88, 0, 35, 40, 79, 23, 0, + 21, 114, 112, 138, 252, 137, 0, 122, 124, 129, + 137, 133, 135, 132, 143, 0, 0, 46, 0, 73, + 51, 254, 111, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 164, 0, 163, 0, 0, 0, 0, 0, + 165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 81, 0, 0, 86, 85, 0, 0, 19, - 0, 0, 112, 108, 0, 245, 0, 246, 139, 89, - 93, 0, 123, 122, 121, 97, 0, 0, 0, 0, + 0, 0, 86, 0, 0, 91, 90, 0, 0, 19, + 0, 0, 117, 113, 0, 250, 0, 251, 144, 94, + 98, 0, 128, 127, 126, 102, 0, 0, 0, 0, 55, 0, 60, 0, 0, 59, 57, 0, 67, 66, - 56, 64, 65, 54, 70, 45, 0, 48, 195, 0, - 209, 211, 0, 199, 200, 201, 202, 203, 204, 0, - 0, 0, 0, 0, 0, 182, 0, 0, 0, 155, - 145, 174, 175, 0, 170, 0, 0, 0, 161, 0, - 173, 172, 188, 189, 190, 191, 192, 193, 194, 165, - 164, 167, 166, 168, 169, 0, 34, 271, 0, 38, - 0, 22, 249, 110, 225, 227, 0, 229, 243, 228, - 114, 134, 244, 120, 131, 129, 0, 44, 0, 0, - 0, 0, 68, 0, 53, 52, 0, 186, 0, 0, - 0, 0, 180, 0, 0, 0, 205, 0, 171, 0, - 0, 0, 162, 206, 79, 24, 0, 0, 265, 257, - 263, 261, 264, 259, 0, 0, 0, 242, 233, 240, - 0, 104, 47, 0, 0, 0, 0, 69, 196, 0, - 0, 184, 0, 183, 0, 187, 207, 0, 0, 178, - 176, 243, 0, 260, 262, 258, 0, 226, 244, 0, - 0, 0, 61, 63, 197, 198, 181, 185, 179, 177, - 230, 254, 266, 0, 116, 62, 0, 0, 0, 0, - 0, 113, 58, 0, 267, 255, 241, 115, 208, 0, - 256 + 56, 64, 65, 54, 70, 0, 0, 71, 48, 200, + 0, 214, 216, 0, 204, 205, 206, 207, 208, 209, + 0, 0, 0, 0, 0, 0, 187, 0, 0, 0, + 160, 150, 179, 180, 0, 175, 0, 0, 0, 166, + 0, 178, 177, 193, 194, 195, 196, 197, 198, 199, + 170, 169, 172, 171, 173, 174, 0, 34, 276, 0, + 38, 0, 22, 254, 115, 230, 232, 0, 234, 248, + 233, 119, 139, 249, 125, 136, 134, 0, 44, 0, + 0, 0, 0, 68, 0, 53, 0, 0, 52, 45, + 0, 72, 0, 191, 0, 0, 0, 0, 185, 0, + 0, 0, 210, 0, 176, 0, 0, 0, 167, 211, + 84, 24, 0, 0, 270, 262, 268, 266, 269, 264, + 0, 0, 0, 247, 238, 245, 0, 109, 47, 0, + 0, 0, 0, 69, 0, 0, 201, 0, 0, 189, + 0, 188, 0, 192, 212, 0, 0, 183, 181, 248, + 0, 265, 267, 263, 0, 231, 249, 0, 0, 0, + 61, 63, 0, 0, 202, 203, 186, 190, 184, 182, + 235, 259, 271, 0, 121, 62, 0, 0, 75, 0, + 0, 0, 0, 118, 58, 74, 0, 272, 260, 246, + 120, 213, 0, 261 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -379, -379, -379, 497, -379, 540, -379, 285, -379, 27, - -379, -379, -379, -379, 287, -83, 418, -379, -379, -379, - -9, -379, 250, 168, -379, -379, 515, -379, -379, -379, - 435, -379, -379, 367, -165, -96, -379, -11, -70, -39, - -379, -379, -66, 338, -379, -379, -379, -120, -379, -379, - -118, -379, 288, -379, -379, -29, -251, -379, -225, 290, - -136, -133, -379, -379, -379, -379, -379, -379, 337, -379, - -379, -379, -379, -379, -379, -379, -379, -379, 88, -69, - -85, -379, -379, -92, -379, -379, -379, -378, 120, -379, - -379, -379, 1, -379, -379, -379, 129, 363, -379, -379, - -379, -379, 488, -379, -379, -379, -379, -294 + -403, -403, -403, 461, -403, 506, -403, 251, -403, 196, + -403, -403, -403, -403, 244, -85, 386, -403, -403, -403, + -7, -403, 217, 128, -403, -403, 218, -403, 491, -403, + -403, -403, 415, -403, -403, 342, -173, -76, -403, 7, + -70, -54, -403, -403, -74, 309, -403, -403, -403, -126, + -403, -403, -99, -403, 259, -403, -403, -110, -249, -403, + -77, 261, -136, -133, -403, -403, -403, -403, -403, -403, + 305, -403, -403, -403, -403, -403, -403, -403, -403, -403, + 46, -69, -80, -403, -403, -87, -403, -403, -403, -402, + 86, -403, -403, -403, 1, -403, -403, -403, 88, 347, + -403, -403, -403, -403, 460, -403, -403, -403, -403, -301 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - 0, 18, 19, 20, 21, 68, 219, 220, 22, 61, + -1, 18, 19, 20, 21, 68, 219, 220, 22, 61, 23, 131, 24, 25, 86, 144, 215, 26, 27, 28, - 82, 239, 240, 324, 404, 29, 94, 30, 31, 32, - 140, 33, 142, 143, 34, 159, 160, 161, 73, 108, - 109, 164, 74, 156, 221, 292, 293, 137, 441, 491, - 112, 227, 228, 304, 102, 169, 222, 121, 122, 223, - 224, 189, 190, 191, 192, 193, 194, 195, 249, 196, - 197, 198, 199, 200, 339, 201, 202, 203, 204, 205, - 124, 125, 126, 127, 128, 129, 383, 384, 385, 386, - 387, 49, 388, 80, 92, 437, 438, 439, 298, 35, - 36, 58, 59, 389, 434, 495, 66, 208 + 82, 239, 240, 324, 405, 326, 327, 29, 94, 30, + 31, 32, 140, 33, 142, 143, 34, 159, 160, 161, + 73, 108, 109, 164, 74, 156, 221, 292, 293, 137, + 447, 503, 112, 227, 228, 304, 102, 169, 222, 121, + 122, 223, 224, 189, 190, 191, 192, 193, 194, 195, + 249, 196, 197, 198, 199, 200, 340, 201, 202, 203, + 204, 205, 124, 125, 126, 127, 128, 129, 384, 385, + 386, 387, 388, 49, 389, 80, 92, 443, 444, 445, + 298, 35, 36, 58, 59, 390, 440, 508, 66, 208 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1102,158 +1083,182 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 188, 104, 348, 39, 145, 145, 42, 146, 123, 154, - 237, 50, 51, 38, 396, 166, 114, 115, 116, 330, - 427, 498, 213, 155, 72, 136, 295, 307, 490, 229, - 105, 231, 233, 174, 55, 111, 83, 265, 89, 427, - 167, 225, 162, 62, 63, 162, 248, 84, 230, 87, - 252, 256, 254, 145, 70, 206, 96, 467, 168, 378, - 103, 428, 257, 380, 175, 106, 429, 37, 280, 295, - 210, 132, 430, 431, 56, 285, 327, 90, 406, 258, - 428, 38, 355, 134, 135, 429, 151, 257, 482, 432, - 105, 430, 431, -266, 433, 149, 150, 110, 265, 70, - 40, 107, 234, 358, 258, 209, 421, 176, 432, 356, - 340, 341, -266, 433, 212, 117, 350, 255, 252, 416, - 359, 351, 352, 226, 294, 106, 353, 279, 354, 280, - 300, 46, 360, 361, 362, 363, 364, 365, 366, 367, - 368, 369, 370, 371, 372, 373, 374, 436, 217, 294, - 178, 114, 115, 116, 118, 119, 178, 114, 115, 116, - 162, 107, 343, 41, 71, 229, -231, 47, 458, 257, - 394, 395, 390, 235, 332, 57, 331, 382, 186, 328, - 257, 344, 43, 60, 120, -232, 258, 345, 375, 489, - 296, 44, 179, 180, 181, 52, 299, 258, 179, 180, - 181, 305, 302, 282, 53, 48, 283, 413, 414, 410, - 411, 178, 114, 115, 116, 123, 257, 426, 484, 123, - 265, 45, 418, 474, 145, 427, 397, 257, 303, 344, - 242, 182, 243, 258, 54, 412, 247, 182, 454, 64, - 257, 257, 257, 453, 258, 257, 276, 277, 278, 279, - 117, 280, 409, 179, 180, 181, 117, 258, 258, 258, - 232, 289, 258, 247, 290, 70, 428, 183, 65, 75, - 67, 429, 449, 183, 451, 452, 415, 430, 431, 76, - 184, 487, 376, 77, 456, 260, 184, 420, 257, 118, - 119, 257, 182, 476, 432, 118, 119, 78, 402, 433, - 178, 114, 115, 116, 79, 258, 185, 186, 258, 81, - 85, 117, 185, 186, 187, 403, 88, 91, 477, 120, - 187, 178, 114, 115, 116, 120, 325, 93, 183, 326, - 488, 424, 98, 97, 171, 178, 114, 115, 116, 100, - 101, 184, 179, 180, 181, 113, 133, 130, 138, 457, - 118, 119, 494, 425, 497, 442, 171, 136, 283, 448, - 264, 141, 294, 250, 180, 181, 265, 185, 186, 333, - 334, 335, 336, 337, 338, 187, 259, 139, 180, 181, - 120, 182, 460, -269, -269, 294, 479, -269, -269, 294, - 274, 275, 276, 277, 278, 279, 496, 280, 114, 283, - 117, 147, 182, 71, 153, 148, 116, 163, 155, 157, - 158, 165, 260, 170, 172, 171, 182, 183, 173, 310, - 207, 117, 211, 214, 311, 218, 312, 313, 110, 314, - 184, 236, 14, 238, 241, 117, 244, 315, 251, 118, - 119, 281, 291, 245, 246, 253, 284, 287, 288, 294, - 308, 184, 251, 301, 309, 306, 185, 186, 346, 261, - 118, 119, 70, 316, 187, 184, 349, 357, 377, 120, - 392, 398, 399, 400, 118, 119, 401, 185, 186, 262, - 317, 407, 318, 319, 408, 187, 263, 264, 355, 257, - 120, 185, 186, 265, 266, 419, 422, 320, 280, 187, - 423, 321, 435, 322, 120, 440, 443, 267, 268, 269, - 270, 271, 444, 323, 272, 273, -268, 274, 275, 276, - 277, 278, 279, 1, 280, 445, 446, 447, 1, 455, - 462, 2, 459, 461, 463, 464, 2, 465, 3, 468, - 466, 469, 4, 3, 470, 471, 472, 4, 260, 473, - 475, 478, 5, 483, 486, 6, 7, 5, 485, 493, - 6, 7, 99, 69, 216, 492, 500, 8, 9, 95, - 177, 243, 8, 9, 379, 381, 405, 450, 10, 286, - 329, 499, 481, 10, 391, 342, 152, 297, 0, 393, - 480, 0, 0, 0, 0, 261, 0, 0, 0, 0, - 0, 0, 11, 0, 0, 260, 12, 11, 0, 417, - 0, 12, 0, 0, 0, 347, 0, 0, 0, 0, - 0, 13, 0, 264, 260, 0, 13, 14, 0, 265, - 266, 0, 14, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 267, 268, 269, 270, 271, 0, 0, - 272, 273, 261, 274, 275, 276, 277, 278, 279, 0, - 280, 15, 16, 17, 0, 0, 15, 16, 17, 0, - 0, -269, 347, 0, 0, 0, 0, 0, 0, 0, - 264, 0, 0, 0, 0, 0, 265, 266, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 264, - 267, 268, 269, 270, 271, 265, -269, 272, 273, 0, - 274, 275, 276, 277, 278, 279, 0, 280, 0, -269, - -269, -269, 270, 271, 0, 0, 272, 273, 0, 274, - 275, 276, 277, 278, 279, 0, 280 + 188, 104, 237, 39, 349, 146, 42, 397, 123, 145, + 145, 50, 51, 38, 154, 331, 213, 114, 115, 116, + 111, 511, 307, 155, 136, 55, 174, 89, 295, 229, + 502, 231, 233, 38, 162, 166, 295, 162, 83, 475, + 238, 105, 72, 70, 406, 37, 248, 84, 265, 87, + 252, 256, 254, 206, 43, 70, 96, 175, 145, 356, + 225, 209, 52, 44, 406, 56, 90, 230, 328, 40, + 210, 53, 492, 132, 265, 285, 106, 407, 103, 280, + 167, 412, 257, 134, 135, 41, 357, 178, 114, 115, + 116, 48, 242, 45, 243, 149, 150, 407, 168, 258, + 176, 54, 234, 279, 151, 280, 57, 359, 226, 427, + 341, 342, 107, 212, 422, 299, 117, 255, 252, 294, + 305, 352, 353, 105, 360, 60, 354, 46, 355, 179, + 180, 181, 361, 362, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 257, 217, 442, + 300, 294, 162, 71, 483, 118, 119, 296, 106, 178, + 114, 115, 116, 302, 258, 229, 391, 257, 182, 257, + 395, 396, 332, 235, 333, 64, 466, 383, 186, 329, + 67, 497, 257, 403, 258, 120, 258, 117, 257, 303, + 110, 47, 501, 376, 107, 344, 433, 232, 65, 258, + 404, 179, 180, 181, 183, 258, 77, 379, 419, 420, + 432, 381, 62, 63, 345, 123, 417, 184, 247, 123, + 346, 351, 257, 424, 398, 75, 118, 119, 494, 145, + 178, 114, 115, 116, 76, 345, 484, 434, 78, 258, + 182, 418, 435, 185, 186, 79, 81, 416, 436, 437, + 257, 187, 499, 85, 257, 282, 120, 88, 283, 117, + 415, 178, 114, 115, 116, 438, 247, 258, 91, 93, + 439, 258, 179, 180, 181, 97, 183, 421, 457, 100, + 459, 460, 377, 257, 70, 461, 98, 101, 426, 184, + 464, 265, 178, 114, 115, 116, 113, 136, 118, 119, + 258, 500, 130, 179, 180, 181, 133, 178, 114, 115, + 116, 182, 138, 139, 462, 185, 186, 276, 277, 278, + 279, 257, 280, 187, 141, 147, 487, 257, 120, 486, + 117, 114, 148, 71, 250, 180, 181, 153, 258, 116, + 289, 155, 182, 290, 258, 409, 430, 183, 410, 171, + 180, 181, 157, 431, 163, 465, 171, 259, 158, 448, + 184, 117, 283, 165, 507, 456, 510, 170, 294, 118, + 119, 468, 489, 182, 294, 294, 171, 172, 183, 334, + 335, 336, 337, 338, 339, 207, 185, 186, 182, 173, + 214, 184, 117, 260, 187, 218, 211, 236, 110, 120, + 118, 119, 498, 505, 238, 283, 283, 117, 509, 251, + 14, 283, 241, 244, 281, 287, 245, 185, 186, 246, + 253, 284, 184, 288, 251, 187, 306, 291, 294, 309, + 120, 118, 119, 301, 308, 325, 70, 184, 347, 358, + 261, 350, 378, 399, 393, 400, 118, 119, 185, 186, + 401, 402, 414, 413, 356, 257, 187, 425, 428, 280, + 262, 120, 429, 185, 186, 433, 441, 263, 264, 446, + 449, 187, 450, 451, 265, 266, 120, 452, 453, 454, + 455, 470, 463, 467, 469, 471, 472, 473, 267, 268, + 269, 270, 271, 474, 433, 272, 273, -273, 274, 275, + 276, 277, 278, 279, 1, 280, 434, 476, 478, 477, + 479, 435, 2, 480, 481, 482, 493, 436, 437, 3, + 485, 488, 496, 4, 495, 504, 99, 243, 506, 69, + 513, 380, 216, 5, 438, 434, 6, 7, -271, 439, + 435, 382, 408, 458, 411, 95, 436, 437, 8, 9, + 177, 330, 512, 343, 286, 392, 491, 490, 152, 10, + 394, 0, 1, 438, 0, 0, 0, -271, 439, 0, + 2, 297, 260, 0, 0, 0, 0, 3, 0, 0, + 0, 4, 0, 11, 0, 0, 0, 12, 0, 0, + 0, 5, 0, 0, 6, 7, 0, 0, 0, 0, + 0, 0, 13, 0, 0, 0, 8, 9, 14, 0, + 0, -236, 0, 0, 0, 0, 260, 10, 0, 261, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 423, 0, 0, 0, 0, 0, 348, + -237, 11, 15, 16, 17, 12, 0, 264, 0, 0, + 0, 0, 260, 265, 266, 0, 0, 0, 0, 0, + 13, 0, 0, 261, 0, 0, 14, 267, 268, 269, + 270, 271, 0, 0, 272, 273, 0, 274, 275, 276, + 277, 278, 279, 348, 280, 0, 0, 0, 260, 0, + 0, 264, 0, 0, 0, 0, 0, 265, 266, -274, + 15, 16, 17, 0, 0, 0, 0, 0, 0, 0, + 0, 267, 268, 269, 270, 271, 0, 0, 272, 273, + 0, 274, 275, 276, 277, 278, 279, 264, 280, 0, + 0, 0, 0, 265, -274, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -274, -274, -274, + 270, 271, 0, 0, 272, 273, 0, 274, 275, 276, + 277, 278, 279, 264, 280, 310, 0, 0, 0, 265, + 311, 0, 312, 313, 0, 314, 0, 0, 0, 0, + 0, 0, 0, 315, 0, 0, -274, -274, 0, 0, + -274, -274, 0, 274, 275, 276, 277, 278, 279, 0, + 280, 0, 0, 0, 0, 0, 0, 0, 0, 316, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 317, 0, 318, 319, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 320, 0, 0, 0, 321, 0, 322, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 323 }; static const yytype_int16 yycheck[] = { - 136, 71, 253, 2, 89, 90, 5, 90, 77, 101, - 175, 10, 11, 3, 308, 111, 4, 5, 6, 3, - 25, 3, 142, 12, 35, 82, 3, 54, 50, 165, - 9, 167, 168, 93, 19, 74, 45, 134, 93, 25, - 54, 159, 108, 16, 17, 111, 182, 46, 166, 48, - 183, 187, 185, 138, 57, 138, 55, 435, 72, 284, - 71, 66, 114, 288, 124, 44, 71, 26, 165, 3, - 140, 80, 77, 78, 59, 211, 241, 132, 329, 131, - 66, 3, 100, 82, 83, 71, 97, 114, 466, 94, - 9, 77, 78, 98, 99, 94, 95, 76, 134, 57, - 3, 80, 171, 103, 131, 63, 357, 167, 94, 127, - 246, 247, 98, 99, 171, 103, 168, 187, 251, 166, - 120, 257, 258, 162, 171, 44, 259, 163, 261, 165, - 226, 93, 265, 266, 267, 268, 269, 270, 271, 272, - 273, 274, 275, 276, 277, 278, 279, 124, 147, 171, - 3, 4, 5, 6, 142, 143, 3, 4, 5, 6, - 226, 80, 91, 3, 167, 301, 171, 93, 419, 114, - 306, 307, 292, 172, 244, 3, 160, 167, 160, 168, - 114, 110, 70, 144, 172, 171, 131, 116, 280, 483, - 124, 79, 45, 46, 47, 70, 225, 131, 45, 46, - 47, 230, 89, 168, 79, 97, 171, 343, 344, 107, - 91, 3, 4, 5, 6, 284, 114, 382, 469, 288, - 134, 109, 355, 168, 309, 25, 309, 114, 115, 110, - 167, 84, 169, 131, 109, 116, 110, 84, 107, 0, - 114, 114, 114, 116, 131, 114, 160, 161, 162, 163, - 103, 165, 124, 45, 46, 47, 103, 131, 131, 131, - 113, 168, 131, 110, 171, 57, 66, 120, 170, 3, - 111, 71, 408, 120, 410, 411, 346, 77, 78, 169, - 133, 81, 281, 167, 417, 53, 133, 357, 114, 142, - 143, 114, 84, 116, 94, 142, 143, 93, 103, 99, - 3, 4, 5, 6, 3, 131, 159, 160, 131, 126, - 3, 103, 159, 160, 167, 120, 122, 3, 454, 172, - 167, 3, 4, 5, 6, 172, 168, 126, 120, 171, - 130, 168, 171, 124, 171, 3, 4, 5, 6, 96, - 123, 133, 45, 46, 47, 3, 120, 4, 92, 419, - 142, 143, 488, 168, 490, 168, 171, 82, 171, 168, - 128, 3, 171, 45, 46, 47, 134, 159, 160, 136, - 137, 138, 139, 140, 141, 167, 17, 167, 46, 47, - 172, 84, 168, 151, 152, 171, 168, 155, 156, 171, - 158, 159, 160, 161, 162, 163, 168, 165, 4, 171, - 103, 130, 84, 167, 167, 45, 6, 113, 12, 168, - 168, 125, 53, 168, 130, 171, 84, 120, 45, 24, - 3, 103, 148, 111, 29, 3, 31, 32, 76, 34, - 133, 3, 111, 3, 124, 103, 167, 42, 120, 142, - 143, 97, 93, 167, 167, 165, 167, 48, 167, 171, - 167, 133, 120, 171, 92, 54, 159, 160, 167, 100, - 142, 143, 57, 68, 167, 133, 168, 167, 3, 172, - 3, 30, 167, 167, 142, 143, 167, 159, 160, 120, - 85, 168, 87, 88, 93, 167, 127, 128, 100, 114, - 172, 159, 160, 134, 135, 167, 103, 102, 165, 167, - 166, 106, 171, 108, 172, 69, 167, 148, 149, 150, - 151, 152, 6, 118, 155, 156, 0, 158, 159, 160, - 161, 162, 163, 7, 165, 6, 6, 103, 7, 168, - 98, 15, 168, 168, 77, 77, 15, 77, 22, 3, - 98, 125, 26, 22, 6, 171, 168, 26, 53, 168, - 168, 168, 36, 167, 6, 39, 40, 36, 168, 167, - 39, 40, 65, 23, 146, 168, 168, 51, 52, 54, - 135, 169, 51, 52, 287, 290, 326, 409, 62, 212, - 242, 493, 462, 62, 294, 248, 98, 224, -1, 301, - 461, -1, -1, -1, -1, 100, -1, -1, -1, -1, - -1, -1, 86, -1, -1, 53, 90, 86, -1, 114, - -1, 90, -1, -1, -1, 120, -1, -1, -1, -1, - -1, 105, -1, 128, 53, -1, 105, 111, -1, 134, - 135, -1, 111, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 148, 149, 150, 151, 152, -1, -1, - 155, 156, 100, 158, 159, 160, 161, 162, 163, -1, - 165, 145, 146, 147, -1, -1, 145, 146, 147, -1, - -1, 100, 120, -1, -1, -1, -1, -1, -1, -1, - 128, -1, -1, -1, -1, -1, 134, 135, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 128, - 148, 149, 150, 151, 152, 134, 135, 155, 156, -1, - 158, 159, 160, 161, 162, 163, -1, 165, -1, 148, - 149, 150, 151, 152, -1, -1, 155, 156, -1, 158, - 159, 160, 161, 162, 163, -1, 165 + 136, 71, 175, 2, 253, 90, 5, 308, 77, 89, + 90, 10, 11, 3, 101, 3, 142, 4, 5, 6, + 74, 3, 54, 12, 82, 19, 93, 93, 3, 165, + 50, 167, 168, 3, 108, 111, 3, 111, 45, 441, + 3, 9, 35, 57, 27, 26, 182, 46, 134, 48, + 183, 187, 185, 138, 70, 57, 55, 124, 138, 100, + 159, 63, 70, 79, 27, 59, 132, 166, 241, 3, + 140, 79, 474, 80, 134, 211, 44, 60, 71, 165, + 54, 330, 114, 82, 83, 3, 127, 3, 4, 5, + 6, 97, 167, 109, 169, 94, 95, 60, 72, 131, + 167, 109, 171, 163, 97, 165, 3, 103, 162, 358, + 246, 247, 80, 171, 166, 225, 103, 187, 251, 171, + 230, 257, 258, 9, 120, 144, 259, 93, 261, 45, + 46, 47, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 114, 147, 124, + 226, 171, 226, 167, 455, 142, 143, 124, 44, 3, + 4, 5, 6, 89, 131, 301, 292, 114, 84, 114, + 306, 307, 160, 172, 244, 0, 425, 167, 160, 168, + 111, 482, 114, 103, 131, 172, 131, 103, 114, 115, + 76, 93, 493, 280, 80, 91, 25, 113, 170, 131, + 120, 45, 46, 47, 120, 131, 167, 284, 344, 345, + 383, 288, 16, 17, 110, 284, 91, 133, 110, 288, + 116, 168, 114, 356, 309, 3, 142, 143, 477, 309, + 3, 4, 5, 6, 169, 110, 168, 66, 93, 131, + 84, 116, 71, 159, 160, 3, 126, 107, 77, 78, + 114, 167, 81, 3, 114, 168, 172, 122, 171, 103, + 124, 3, 4, 5, 6, 94, 110, 131, 3, 126, + 99, 131, 45, 46, 47, 124, 120, 347, 414, 96, + 416, 417, 281, 114, 57, 116, 171, 123, 358, 133, + 423, 134, 3, 4, 5, 6, 3, 82, 142, 143, + 131, 130, 4, 45, 46, 47, 120, 3, 4, 5, + 6, 84, 92, 167, 107, 159, 160, 160, 161, 162, + 163, 114, 165, 167, 3, 130, 462, 114, 172, 116, + 103, 4, 45, 167, 45, 46, 47, 167, 131, 6, + 168, 12, 84, 171, 131, 168, 168, 120, 171, 171, + 46, 47, 168, 168, 113, 425, 171, 17, 168, 168, + 133, 103, 171, 125, 500, 168, 502, 168, 171, 142, + 143, 168, 168, 84, 171, 171, 171, 130, 120, 136, + 137, 138, 139, 140, 141, 3, 159, 160, 84, 45, + 111, 133, 103, 53, 167, 3, 148, 3, 76, 172, + 142, 143, 168, 168, 3, 171, 171, 103, 168, 120, + 111, 171, 124, 167, 97, 48, 167, 159, 160, 167, + 165, 167, 133, 167, 120, 167, 54, 93, 171, 92, + 172, 142, 143, 171, 167, 171, 57, 133, 167, 167, + 100, 168, 3, 30, 3, 167, 142, 143, 159, 160, + 167, 167, 93, 168, 100, 114, 167, 167, 103, 165, + 120, 172, 166, 159, 160, 25, 171, 127, 128, 69, + 167, 167, 6, 6, 134, 135, 172, 6, 103, 119, + 167, 98, 168, 168, 168, 77, 77, 77, 148, 149, + 150, 151, 152, 98, 25, 155, 156, 0, 158, 159, + 160, 161, 162, 163, 7, 165, 66, 3, 6, 125, + 171, 71, 15, 168, 168, 167, 167, 77, 78, 22, + 168, 168, 6, 26, 168, 168, 65, 169, 167, 23, + 168, 287, 146, 36, 94, 66, 39, 40, 98, 99, + 71, 290, 325, 415, 326, 54, 77, 78, 51, 52, + 135, 242, 506, 248, 212, 294, 470, 469, 98, 62, + 301, -1, 7, 94, -1, -1, -1, 98, 99, -1, + 15, 224, 53, -1, -1, -1, -1, 22, -1, -1, + -1, 26, -1, 86, -1, -1, -1, 90, -1, -1, + -1, 36, -1, -1, 39, 40, -1, -1, -1, -1, + -1, -1, 105, -1, -1, -1, 51, 52, 111, -1, + -1, 171, -1, -1, -1, -1, 53, 62, -1, 100, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 114, -1, -1, -1, -1, -1, 120, + 171, 86, 145, 146, 147, 90, -1, 128, -1, -1, + -1, -1, 53, 134, 135, -1, -1, -1, -1, -1, + 105, -1, -1, 100, -1, -1, 111, 148, 149, 150, + 151, 152, -1, -1, 155, 156, -1, 158, 159, 160, + 161, 162, 163, 120, 165, -1, -1, -1, 53, -1, + -1, 128, -1, -1, -1, -1, -1, 134, 135, 100, + 145, 146, 147, -1, -1, -1, -1, -1, -1, -1, + -1, 148, 149, 150, 151, 152, -1, -1, 155, 156, + -1, 158, 159, 160, 161, 162, 163, 128, 165, -1, + -1, -1, -1, 134, 135, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 148, 149, 150, + 151, 152, -1, -1, 155, 156, -1, 158, 159, 160, + 161, 162, 163, 128, 165, 24, -1, -1, -1, 134, + 29, -1, 31, 32, -1, 34, -1, -1, -1, -1, + -1, -1, -1, 42, -1, -1, 151, 152, -1, -1, + 155, 156, -1, 158, 159, 160, 161, 162, 163, -1, + 165, -1, -1, -1, -1, -1, -1, -1, -1, 68, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 85, -1, 87, 88, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 102, -1, -1, -1, 106, -1, 108, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 118 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1262,55 +1267,56 @@ static const yytype_int16 yystos[] = { 0, 7, 15, 22, 26, 36, 39, 40, 51, 52, 62, 86, 90, 105, 111, 145, 146, 147, 174, 175, - 176, 177, 181, 183, 185, 186, 190, 191, 192, 198, - 200, 201, 202, 204, 207, 272, 273, 26, 3, 265, - 3, 3, 265, 70, 79, 109, 93, 93, 97, 264, - 265, 265, 70, 79, 109, 19, 59, 3, 274, 275, - 144, 182, 182, 182, 0, 170, 279, 111, 178, 178, - 57, 167, 210, 211, 215, 3, 169, 167, 93, 3, - 266, 126, 193, 193, 265, 3, 187, 265, 122, 93, - 132, 3, 267, 126, 199, 199, 265, 124, 171, 176, - 96, 123, 227, 210, 211, 9, 44, 80, 212, 213, - 76, 212, 223, 3, 4, 5, 6, 103, 142, 143, - 172, 230, 231, 252, 253, 254, 255, 256, 257, 258, - 4, 184, 193, 120, 265, 265, 82, 220, 92, 167, - 203, 3, 205, 206, 188, 253, 188, 130, 45, 265, - 265, 210, 275, 167, 256, 12, 216, 168, 168, 208, - 209, 210, 215, 113, 214, 125, 208, 54, 72, 228, - 168, 171, 130, 45, 93, 124, 167, 203, 3, 45, - 46, 47, 84, 120, 133, 159, 160, 167, 233, 234, - 235, 236, 237, 238, 239, 240, 242, 243, 244, 245, - 246, 248, 249, 250, 251, 252, 188, 3, 280, 63, - 211, 148, 171, 220, 111, 189, 189, 265, 3, 179, - 180, 217, 229, 232, 233, 223, 212, 224, 225, 233, - 223, 233, 113, 233, 252, 265, 3, 207, 3, 194, - 195, 124, 167, 169, 167, 167, 167, 110, 233, 241, - 45, 120, 234, 165, 234, 211, 233, 114, 131, 17, + 176, 177, 181, 183, 185, 186, 190, 191, 192, 200, + 202, 203, 204, 206, 209, 274, 275, 26, 3, 267, + 3, 3, 267, 70, 79, 109, 93, 93, 97, 266, + 267, 267, 70, 79, 109, 19, 59, 3, 276, 277, + 144, 182, 182, 182, 0, 170, 281, 111, 178, 178, + 57, 167, 212, 213, 217, 3, 169, 167, 93, 3, + 268, 126, 193, 193, 267, 3, 187, 267, 122, 93, + 132, 3, 269, 126, 201, 201, 267, 124, 171, 176, + 96, 123, 229, 212, 213, 9, 44, 80, 214, 215, + 76, 214, 225, 3, 4, 5, 6, 103, 142, 143, + 172, 232, 233, 254, 255, 256, 257, 258, 259, 260, + 4, 184, 193, 120, 267, 267, 82, 222, 92, 167, + 205, 3, 207, 208, 188, 255, 188, 130, 45, 267, + 267, 212, 277, 167, 258, 12, 218, 168, 168, 210, + 211, 212, 217, 113, 216, 125, 210, 54, 72, 230, + 168, 171, 130, 45, 93, 124, 167, 205, 3, 45, + 46, 47, 84, 120, 133, 159, 160, 167, 235, 236, + 237, 238, 239, 240, 241, 242, 244, 245, 246, 247, + 248, 250, 251, 252, 253, 254, 188, 3, 282, 63, + 213, 148, 171, 222, 111, 189, 189, 267, 3, 179, + 180, 219, 231, 234, 235, 225, 214, 226, 227, 235, + 225, 235, 113, 235, 254, 267, 3, 209, 3, 194, + 195, 124, 167, 169, 167, 167, 167, 110, 235, 243, + 45, 120, 236, 165, 236, 213, 235, 114, 131, 17, 53, 100, 120, 127, 128, 134, 135, 148, 149, 150, 151, 152, 155, 156, 158, 159, 160, 161, 162, 163, - 165, 97, 168, 171, 167, 233, 206, 48, 167, 168, - 171, 93, 218, 219, 171, 3, 124, 270, 271, 228, - 208, 171, 89, 115, 226, 228, 54, 54, 167, 92, + 165, 97, 168, 171, 167, 235, 208, 48, 167, 168, + 171, 93, 220, 221, 171, 3, 124, 272, 273, 230, + 210, 171, 89, 115, 228, 230, 54, 54, 167, 92, 24, 29, 31, 32, 34, 42, 68, 85, 87, 88, - 102, 106, 108, 118, 196, 168, 171, 207, 168, 216, - 3, 160, 211, 136, 137, 138, 139, 140, 141, 247, - 233, 233, 241, 91, 110, 116, 167, 120, 229, 168, - 168, 233, 233, 234, 234, 100, 127, 167, 103, 120, - 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, - 234, 234, 234, 234, 234, 256, 265, 3, 231, 187, - 231, 180, 167, 259, 260, 261, 262, 263, 265, 276, - 220, 232, 3, 225, 233, 233, 280, 188, 30, 167, - 167, 167, 103, 120, 197, 195, 229, 168, 93, 124, - 107, 91, 116, 233, 233, 211, 166, 114, 234, 167, - 211, 229, 103, 166, 168, 168, 207, 25, 66, 71, - 77, 78, 94, 99, 277, 171, 124, 268, 269, 270, - 69, 221, 168, 167, 6, 6, 6, 103, 168, 233, - 196, 233, 233, 116, 107, 168, 234, 211, 229, 168, - 168, 168, 98, 77, 77, 77, 98, 260, 3, 125, - 6, 171, 168, 168, 168, 168, 116, 233, 168, 168, - 269, 261, 260, 167, 229, 168, 6, 81, 130, 280, - 50, 222, 168, 167, 233, 278, 168, 233, 3, 251, - 168 + 102, 106, 108, 118, 196, 171, 198, 199, 209, 168, + 218, 3, 160, 213, 136, 137, 138, 139, 140, 141, + 249, 235, 235, 243, 91, 110, 116, 167, 120, 231, + 168, 168, 235, 235, 236, 236, 100, 127, 167, 103, + 120, 236, 236, 236, 236, 236, 236, 236, 236, 236, + 236, 236, 236, 236, 236, 236, 258, 267, 3, 233, + 187, 233, 180, 167, 261, 262, 263, 264, 265, 267, + 278, 222, 234, 3, 227, 235, 235, 282, 188, 30, + 167, 167, 167, 103, 120, 197, 27, 60, 195, 168, + 171, 199, 231, 168, 93, 124, 107, 91, 116, 235, + 235, 213, 166, 114, 236, 167, 213, 231, 103, 166, + 168, 168, 209, 25, 66, 71, 77, 78, 94, 99, + 279, 171, 124, 270, 271, 272, 69, 223, 168, 167, + 6, 6, 6, 103, 119, 167, 168, 235, 196, 235, + 235, 116, 107, 168, 236, 213, 231, 168, 168, 168, + 98, 77, 77, 77, 98, 262, 3, 125, 6, 171, + 168, 168, 167, 282, 168, 168, 116, 235, 168, 168, + 271, 263, 262, 167, 231, 168, 6, 282, 168, 81, + 130, 282, 50, 224, 168, 168, 167, 235, 280, 168, + 235, 3, 253, 168 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ @@ -1323,27 +1329,27 @@ static const yytype_int16 yyr1[] = 190, 191, 191, 191, 192, 192, 192, 192, 192, 193, 193, 194, 194, 195, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 197, 197, - 197, 198, 198, 198, 198, 199, 199, 200, 201, 202, - 202, 203, 203, 204, 205, 205, 206, 207, 207, 207, - 208, 208, 209, 209, 210, 210, 211, 211, 212, 213, - 213, 213, 214, 214, 215, 216, 216, 217, 218, 218, - 219, 220, 220, 221, 221, 222, 222, 223, 223, 224, - 224, 225, 226, 226, 226, 227, 227, 228, 228, 228, - 228, 228, 228, 229, 229, 230, 230, 231, 231, 232, - 233, 233, 233, 233, 233, 234, 234, 234, 234, 234, - 234, 234, 234, 234, 234, 234, 235, 235, 236, 236, - 236, 236, 236, 237, 237, 237, 237, 237, 237, 237, - 237, 237, 237, 237, 238, 238, 239, 239, 239, 239, - 240, 240, 240, 240, 241, 241, 242, 242, 243, 243, - 243, 243, 243, 243, 243, 244, 244, 245, 246, 247, - 247, 247, 247, 247, 247, 248, 249, 250, 251, 251, - 251, 251, 252, 252, 252, 252, 252, 253, 254, 254, - 255, 255, 256, 257, 258, 259, 259, 260, 260, 261, - 261, 262, 262, 263, 264, 265, 265, 266, 266, 267, - 268, 268, 269, 269, 270, 270, 271, 271, 272, 272, - 273, 274, 274, 275, 276, 276, 276, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 278, 279, 279, - 280, 280 + 197, 198, 198, 198, 199, 199, 200, 200, 200, 200, + 201, 201, 202, 203, 204, 204, 205, 205, 206, 207, + 207, 208, 209, 209, 209, 210, 210, 211, 211, 212, + 212, 213, 213, 214, 215, 215, 215, 216, 216, 217, + 218, 218, 219, 220, 220, 221, 222, 222, 223, 223, + 224, 224, 225, 225, 226, 226, 227, 228, 228, 228, + 229, 229, 230, 230, 230, 230, 230, 230, 231, 231, + 232, 232, 233, 233, 234, 235, 235, 235, 235, 235, + 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, + 236, 237, 237, 238, 238, 238, 238, 238, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 240, + 240, 241, 241, 241, 241, 242, 242, 242, 242, 243, + 243, 244, 244, 245, 245, 245, 245, 245, 245, 245, + 246, 246, 247, 248, 249, 249, 249, 249, 249, 249, + 250, 251, 252, 253, 253, 253, 253, 254, 254, 254, + 254, 254, 255, 256, 256, 257, 257, 258, 259, 260, + 261, 261, 262, 262, 263, 263, 264, 264, 265, 266, + 267, 267, 268, 268, 269, 270, 270, 271, 271, 272, + 272, 273, 273, 274, 274, 275, 276, 276, 277, 278, + 278, 278, 279, 279, 279, 279, 279, 279, 279, 279, + 279, 279, 280, 281, 281, 282, 282 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -1353,37 +1359,37 @@ static const yytype_int8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 0, 1, 3, 1, 4, 2, 2, 2, 1, 0, 4, 1, 2, 5, 7, 5, 1, 1, 3, 0, - 5, 2, 3, 2, 8, 7, 6, 9, 7, 3, + 5, 2, 3, 2, 8, 8, 6, 9, 7, 3, 0, 1, 3, 3, 1, 1, 1, 1, 6, 1, 1, 4, 5, 4, 1, 1, 1, 1, 1, 2, - 0, 4, 4, 3, 5, 2, 0, 4, 2, 8, - 5, 3, 0, 5, 1, 3, 3, 2, 2, 6, - 1, 1, 1, 3, 3, 3, 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, 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, 6, 1, - 1, 1, 1, 1, 1, 4, 4, 5, 1, 3, - 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, - 4, 1, 3, 2, 1, 1, 3, 1, 0, 1, - 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 + 0, 1, 2, 0, 6, 5, 4, 4, 3, 5, + 2, 0, 4, 2, 8, 5, 3, 0, 5, 1, + 3, 3, 2, 2, 6, 1, 1, 1, 3, 3, + 3, 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, 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, 6, 1, 1, 1, 1, 1, 1, + 4, 4, 5, 1, 3, 1, 3, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 1, 1, 1, 4, 1, 3, 2, 1, + 1, 3, 1, 0, 1, 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 }; -enum { YYENOMEM = -2 }; - #define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = SQL_HSQL_EMPTY) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab @@ -1394,7 +1400,7 @@ enum { YYENOMEM = -2 }; #define YYBACKUP(Token, Value) \ do \ - if (yychar == SQL_HSQL_EMPTY) \ + if (yychar == YYEMPTY) \ { \ yychar = (Token); \ yylval = (Value); \ @@ -1409,9 +1415,10 @@ enum { YYENOMEM = -2 }; } \ while (0) -/* Backward compatibility with an undocumented macro. - Use SQL_HSQL_error or SQL_HSQL_UNDEF. */ -#define YYERRCODE SQL_HSQL_UNDEF +/* Error token number */ +#define YYTERROR 1 +#define YYERRCODE 256 + /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. If N is 0, then set CURRENT to the empty location which ends @@ -1459,8 +1466,8 @@ do { \ This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ -# ifndef YY_LOCATION_PRINT -# if defined HSQL_LTYPE_IS_TRIVIAL && HSQL_LTYPE_IS_TRIVIAL +#ifndef YY_LOCATION_PRINT +# if defined HSQL_LTYPE_IS_TRIVIAL && HSQL_LTYPE_IS_TRIVIAL /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ @@ -1490,22 +1497,22 @@ yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) return res; } -# define YY_LOCATION_PRINT(File, Loc) \ +# define YY_LOCATION_PRINT(File, Loc) \ yy_location_print_ (File, &(Loc)) -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif -# endif /* !defined YY_LOCATION_PRINT */ +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif +#endif -# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ - Kind, Value, Location, result, scanner); \ + Type, Value, Location, result, scanner); \ YYFPRINTF (stderr, "\n"); \ } \ } while (0) @@ -1516,22 +1523,21 @@ do { \ `-----------------------------------*/ static void -yy_symbol_value_print (FILE *yyo, - yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, hsql::SQLParserResult* result, yyscan_t scanner) +yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, hsql::SQLParserResult* result, yyscan_t scanner) { FILE *yyoutput = yyo; - YY_USE (yyoutput); - YY_USE (yylocationp); - YY_USE (result); - YY_USE (scanner); + YYUSE (yyoutput); + YYUSE (yylocationp); + YYUSE (result); + YYUSE (scanner); if (!yyvaluep) return; # ifdef YYPRINT - if (yykind < YYNTOKENS) - YYPRINT (yyo, yytoknum[yykind], *yyvaluep); + if (yytype < YYNTOKENS) + YYPRINT (yyo, yytoknum[yytype], *yyvaluep); # endif YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE (yykind); + YYUSE (yytype); YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -1541,15 +1547,14 @@ yy_symbol_value_print (FILE *yyo, `---------------------------*/ static void -yy_symbol_print (FILE *yyo, - yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, hsql::SQLParserResult* result, yyscan_t scanner) +yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, hsql::SQLParserResult* result, yyscan_t scanner) { YYFPRINTF (yyo, "%s %s (", - yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); YY_LOCATION_PRINT (yyo, *yylocationp); YYFPRINTF (yyo, ": "); - yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, result, scanner); + yy_symbol_value_print (yyo, yytype, yyvaluep, yylocationp, result, scanner); YYFPRINTF (yyo, ")"); } @@ -1582,8 +1587,7 @@ do { \ `------------------------------------------------*/ static void -yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, - int yyrule, hsql::SQLParserResult* result, yyscan_t scanner) +yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, hsql::SQLParserResult* result, yyscan_t scanner) { int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; @@ -1595,9 +1599,9 @@ yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, - YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), - &yyvsp[(yyi + 1) - (yynrhs)], - &(yylsp[(yyi + 1) - (yynrhs)]), result, scanner); + yystos[+yyssp[yyi + 1 - yynrhs]], + &yyvsp[(yyi + 1) - (yynrhs)] + , &(yylsp[(yyi + 1) - (yynrhs)]) , result, scanner); YYFPRINTF (stderr, "\n"); } } @@ -1612,8 +1616,8 @@ do { \ multiple parsers can coexist. */ int yydebug; #else /* !HSQL_DEBUG */ -# define YYDPRINTF(Args) ((void) 0) -# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !HSQL_DEBUG */ @@ -1636,61 +1640,12 @@ int yydebug; #endif -/* Context of a parse error. */ -typedef struct -{ - yy_state_t *yyssp; - yysymbol_kind_t yytoken; - YYLTYPE *yylloc; -} yypcontext_t; - -/* Put in YYARG at most YYARGN of the expected tokens given the - current YYCTX, and return the number of tokens stored in YYARG. If - YYARG is null, return the number of expected tokens (guaranteed to - be less than YYNTOKENS). Return YYENOMEM on memory exhaustion. - Return 0 if there are more than YYARGN expected tokens, yet fill - YYARG up to YYARGN. */ -static int -yypcontext_expected_tokens (const yypcontext_t *yyctx, - yysymbol_kind_t yyarg[], int yyargn) -{ - /* Actual size of YYARG. */ - int yycount = 0; - int yyn = yypact[+*yyctx->yyssp]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (!yyarg) - ++yycount; - else if (yycount == yyargn) - return 0; - else - yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx); - } - } - if (yyarg && yycount == 0 && 0 < yyargn) - yyarg[0] = YYSYMBOL_YYEMPTY; - return yycount; -} - +#if YYERROR_VERBOSE - - -#ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) -# else +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) +# else /* Return the length of YYSTR. */ static YYPTRDIFF_T yystrlen (const char *yystr) @@ -1700,13 +1655,13 @@ yystrlen (const char *yystr) continue; return yylen; } +# endif # endif -#endif -#ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ static char * @@ -1720,10 +1675,10 @@ yystpcpy (char *yydest, const char *yysrc) return yyd - 1; } +# endif # endif -#endif -#ifndef yytnamerr +# ifndef yytnamerr /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string @@ -1738,6 +1693,7 @@ yytnamerr (char *yyres, const char *yystr) { YYPTRDIFF_T yyn = 0; char const *yyp = yystr; + for (;;) switch (*++yyp) { @@ -1771,15 +1727,31 @@ yytnamerr (char *yyres, const char *yystr) else return yystrlen (yystr); } -#endif +# endif +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ static int -yy_syntax_error_arguments (const yypcontext_t *yyctx, - yysymbol_kind_t yyarg[], int yyargn) +yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, + yy_state_t *yyssp, int yytoken) { + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = YY_NULLPTR; + /* Arguments of yyformat: reported tokens (one for the "unexpected", + one per "expected"). */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Actual size of YYARG. */ int yycount = 0; + /* Cumulated lengths of YYARG. */ + YYPTRDIFF_T yysize = 0; + /* There are many possibilities here to consider: - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action @@ -1803,54 +1775,52 @@ yy_syntax_error_arguments (const yypcontext_t *yyctx, one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ - if (yyctx->yytoken != YYSYMBOL_YYEMPTY) + if (yytoken != YYEMPTY) { - int yyn; - if (yyarg) - yyarg[yycount] = yyctx->yytoken; - ++yycount; - yyn = yypcontext_expected_tokens (yyctx, - yyarg ? yyarg + 1 : yyarg, yyargn - 1); - if (yyn == YYENOMEM) - return YYENOMEM; - else - yycount += yyn; + int yyn = yypact[+*yyssp]; + YYPTRDIFF_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); + yysize = yysize0; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + { + YYPTRDIFF_T yysize1 + = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else + return 2; + } + } + } } - return yycount; -} - -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, - const yypcontext_t *yyctx) -{ - enum { YYARGS_MAX = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULLPTR; - /* Arguments of yyformat: reported tokens (one for the "unexpected", - one per "expected"). */ - yysymbol_kind_t yyarg[YYARGS_MAX]; - /* Cumulated lengths of YYARG. */ - YYPTRDIFF_T yysize = 0; - - /* Actual size of YYARG. */ - int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX); - if (yycount == YYENOMEM) - return YYENOMEM; switch (yycount) { -#define YYCASE_(N, S) \ +# define YYCASE_(N, S) \ case N: \ yyformat = S; \ - break + break default: /* Avoid compiler warnings. */ YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); @@ -1858,23 +1828,17 @@ yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -#undef YYCASE_ +# undef YYCASE_ } - /* Compute error message size. Don't count the "%s"s, but reserve - room for the terminator. */ - yysize = yystrlen (yyformat) - 2 * yycount + 1; { - int yyi; - for (yyi = 0; yyi < yycount; ++yyi) - { - YYPTRDIFF_T yysize1 - = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return YYENOMEM; - } + /* Don't count the "%s"s in the final size, but reserve room for + the terminator. */ + YYPTRDIFF_T yysize1 = yysize + (yystrlen (yyformat) - 2 * yycount) + 1; + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else + return 2; } if (*yymsg_alloc < yysize) @@ -1883,7 +1847,7 @@ yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, if (! (yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return -1; + return 1; } /* Avoid sprintf, as that infringes on the user's name space. @@ -1895,7 +1859,7 @@ yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, while ((*yyp = *yyformat) != '\0') if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { - yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]); + yyp += yytnamerr (yyp, yyarg[yyi++]); yyformat += 2; } else @@ -1906,53 +1870,52 @@ yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, } return 0; } - +#endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ static void -yydestruct (const char *yymsg, - yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, hsql::SQLParserResult* result, yyscan_t scanner) +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, hsql::SQLParserResult* result, yyscan_t scanner) { - YY_USE (yyvaluep); - YY_USE (yylocationp); - YY_USE (result); - YY_USE (scanner); + YYUSE (yyvaluep); + YYUSE (yylocationp); + YYUSE (result); + YYUSE (scanner); if (!yymsg) yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - switch (yykind) + switch (yytype) { - case YYSYMBOL_IDENTIFIER: /* IDENTIFIER */ -#line 149 "bison_parser.y" + case 3: /* IDENTIFIER */ +#line 151 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1934 "bison_parser.cpp" +#line 1897 "bison_parser.cpp" break; - case YYSYMBOL_STRING: /* STRING */ -#line 149 "bison_parser.y" + case 4: /* STRING */ +#line 151 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1940 "bison_parser.cpp" +#line 1903 "bison_parser.cpp" break; - case YYSYMBOL_FLOATVAL: /* FLOATVAL */ -#line 147 "bison_parser.y" + case 5: /* FLOATVAL */ +#line 149 "bison_parser.y" { } -#line 1946 "bison_parser.cpp" +#line 1909 "bison_parser.cpp" break; - case YYSYMBOL_INTVAL: /* INTVAL */ -#line 147 "bison_parser.y" + case 6: /* INTVAL */ +#line 149 "bison_parser.y" { } -#line 1952 "bison_parser.cpp" +#line 1915 "bison_parser.cpp" break; - case YYSYMBOL_statement_list: /* statement_list */ -#line 150 "bison_parser.y" + case 175: /* statement_list */ +#line 152 "bison_parser.y" { if ((((*yyvaluep).stmt_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).stmt_vec))) { @@ -1961,23 +1924,23 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).stmt_vec)); } -#line 1965 "bison_parser.cpp" +#line 1928 "bison_parser.cpp" break; - case YYSYMBOL_statement: /* statement */ -#line 158 "bison_parser.y" + case 176: /* statement */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 1971 "bison_parser.cpp" +#line 1934 "bison_parser.cpp" break; - case YYSYMBOL_preparable_statement: /* preparable_statement */ -#line 158 "bison_parser.y" + case 177: /* preparable_statement */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 1977 "bison_parser.cpp" +#line 1940 "bison_parser.cpp" break; - case YYSYMBOL_opt_hints: /* opt_hints */ -#line 150 "bison_parser.y" + case 178: /* opt_hints */ +#line 152 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -1986,11 +1949,11 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 1990 "bison_parser.cpp" +#line 1953 "bison_parser.cpp" break; - case YYSYMBOL_hint_list: /* hint_list */ -#line 150 "bison_parser.y" + case 179: /* hint_list */ +#line 152 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -1999,89 +1962,89 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2003 "bison_parser.cpp" +#line 1966 "bison_parser.cpp" break; - case YYSYMBOL_hint: /* hint */ -#line 158 "bison_parser.y" + case 180: /* hint */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2009 "bison_parser.cpp" +#line 1972 "bison_parser.cpp" break; - case YYSYMBOL_transaction_statement: /* transaction_statement */ -#line 158 "bison_parser.y" + case 181: /* transaction_statement */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).transaction_stmt)); } -#line 2015 "bison_parser.cpp" +#line 1978 "bison_parser.cpp" break; - case YYSYMBOL_prepare_statement: /* prepare_statement */ -#line 158 "bison_parser.y" + case 183: /* prepare_statement */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).prep_stmt)); } -#line 2021 "bison_parser.cpp" +#line 1984 "bison_parser.cpp" break; - case YYSYMBOL_prepare_target_query: /* prepare_target_query */ -#line 149 "bison_parser.y" + case 184: /* prepare_target_query */ +#line 151 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2027 "bison_parser.cpp" +#line 1990 "bison_parser.cpp" break; - case YYSYMBOL_execute_statement: /* execute_statement */ -#line 158 "bison_parser.y" + case 185: /* execute_statement */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).exec_stmt)); } -#line 2033 "bison_parser.cpp" +#line 1996 "bison_parser.cpp" break; - case YYSYMBOL_import_statement: /* import_statement */ -#line 158 "bison_parser.y" + case 186: /* import_statement */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).import_stmt)); } -#line 2039 "bison_parser.cpp" +#line 2002 "bison_parser.cpp" break; - case YYSYMBOL_file_type: /* file_type */ -#line 147 "bison_parser.y" + case 187: /* file_type */ +#line 149 "bison_parser.y" { } -#line 2045 "bison_parser.cpp" +#line 2008 "bison_parser.cpp" break; - case YYSYMBOL_file_path: /* file_path */ -#line 149 "bison_parser.y" + case 188: /* file_path */ +#line 151 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2051 "bison_parser.cpp" +#line 2014 "bison_parser.cpp" break; - case YYSYMBOL_opt_file_type: /* opt_file_type */ -#line 147 "bison_parser.y" + case 189: /* opt_file_type */ +#line 149 "bison_parser.y" { } -#line 2057 "bison_parser.cpp" +#line 2020 "bison_parser.cpp" break; - case YYSYMBOL_export_statement: /* export_statement */ -#line 158 "bison_parser.y" + case 190: /* export_statement */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).export_stmt)); } -#line 2063 "bison_parser.cpp" +#line 2026 "bison_parser.cpp" break; - case YYSYMBOL_show_statement: /* show_statement */ -#line 158 "bison_parser.y" + case 191: /* show_statement */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).show_stmt)); } -#line 2069 "bison_parser.cpp" +#line 2032 "bison_parser.cpp" break; - case YYSYMBOL_create_statement: /* create_statement */ -#line 158 "bison_parser.y" + case 192: /* create_statement */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).create_stmt)); } -#line 2075 "bison_parser.cpp" +#line 2038 "bison_parser.cpp" break; - case YYSYMBOL_opt_not_exists: /* opt_not_exists */ -#line 147 "bison_parser.y" + case 193: /* opt_not_exists */ +#line 149 "bison_parser.y" { } -#line 2081 "bison_parser.cpp" +#line 2044 "bison_parser.cpp" break; - case YYSYMBOL_column_def_commalist: /* column_def_commalist */ -#line 150 "bison_parser.y" + case 194: /* column_def_commalist */ +#line 152 "bison_parser.y" { if ((((*yyvaluep).column_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).column_vec))) { @@ -2090,59 +2053,71 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).column_vec)); } -#line 2094 "bison_parser.cpp" +#line 2057 "bison_parser.cpp" break; - case YYSYMBOL_column_def: /* column_def */ -#line 158 "bison_parser.y" + case 195: /* column_def */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).column_t)); } -#line 2100 "bison_parser.cpp" +#line 2063 "bison_parser.cpp" break; - case YYSYMBOL_column_type: /* column_type */ -#line 147 "bison_parser.y" + case 196: /* column_type */ +#line 149 "bison_parser.y" { } -#line 2106 "bison_parser.cpp" +#line 2069 "bison_parser.cpp" break; - case YYSYMBOL_opt_column_nullable: /* opt_column_nullable */ -#line 147 "bison_parser.y" + case 197: /* opt_column_nullable */ +#line 149 "bison_parser.y" { } -#line 2112 "bison_parser.cpp" +#line 2075 "bison_parser.cpp" break; - case YYSYMBOL_drop_statement: /* drop_statement */ -#line 158 "bison_parser.y" + case 198: /* opt_table_key_constraints */ +#line 160 "bison_parser.y" + { delete (((*yyvaluep).table_key_constraint_vec)); } +#line 2081 "bison_parser.cpp" + break; + + case 199: /* table_key_constraint */ +#line 160 "bison_parser.y" + { delete (((*yyvaluep).table_key_constraint_t)); } +#line 2087 "bison_parser.cpp" + break; + + case 200: /* drop_statement */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).drop_stmt)); } -#line 2118 "bison_parser.cpp" +#line 2093 "bison_parser.cpp" break; - case YYSYMBOL_opt_exists: /* opt_exists */ -#line 147 "bison_parser.y" + case 201: /* opt_exists */ +#line 149 "bison_parser.y" { } -#line 2124 "bison_parser.cpp" +#line 2099 "bison_parser.cpp" break; - case YYSYMBOL_delete_statement: /* delete_statement */ -#line 158 "bison_parser.y" + case 202: /* delete_statement */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2130 "bison_parser.cpp" +#line 2105 "bison_parser.cpp" break; - case YYSYMBOL_truncate_statement: /* truncate_statement */ -#line 158 "bison_parser.y" + case 203: /* truncate_statement */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2136 "bison_parser.cpp" +#line 2111 "bison_parser.cpp" break; - case YYSYMBOL_insert_statement: /* insert_statement */ -#line 158 "bison_parser.y" + case 204: /* insert_statement */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).insert_stmt)); } -#line 2142 "bison_parser.cpp" +#line 2117 "bison_parser.cpp" break; - case YYSYMBOL_opt_column_list: /* opt_column_list */ -#line 150 "bison_parser.y" + case 205: /* opt_column_list */ +#line 152 "bison_parser.y" { if ((((*yyvaluep).str_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).str_vec))) { @@ -2151,17 +2126,17 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2155 "bison_parser.cpp" +#line 2130 "bison_parser.cpp" break; - case YYSYMBOL_update_statement: /* update_statement */ -#line 158 "bison_parser.y" + case 206: /* update_statement */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).update_stmt)); } -#line 2161 "bison_parser.cpp" +#line 2136 "bison_parser.cpp" break; - case YYSYMBOL_update_clause_commalist: /* update_clause_commalist */ -#line 150 "bison_parser.y" + case 207: /* update_clause_commalist */ +#line 152 "bison_parser.y" { if ((((*yyvaluep).update_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).update_vec))) { @@ -2170,77 +2145,77 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).update_vec)); } -#line 2174 "bison_parser.cpp" +#line 2149 "bison_parser.cpp" break; - case YYSYMBOL_update_clause: /* update_clause */ -#line 158 "bison_parser.y" + case 208: /* update_clause */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).update_t)); } -#line 2180 "bison_parser.cpp" +#line 2155 "bison_parser.cpp" break; - case YYSYMBOL_select_statement: /* select_statement */ -#line 158 "bison_parser.y" + case 209: /* select_statement */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2186 "bison_parser.cpp" +#line 2161 "bison_parser.cpp" break; - case YYSYMBOL_select_within_set_operation: /* select_within_set_operation */ -#line 158 "bison_parser.y" + case 210: /* select_within_set_operation */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2192 "bison_parser.cpp" +#line 2167 "bison_parser.cpp" break; - case YYSYMBOL_select_within_set_operation_no_parentheses: /* select_within_set_operation_no_parentheses */ -#line 158 "bison_parser.y" + case 211: /* select_within_set_operation_no_parentheses */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2198 "bison_parser.cpp" +#line 2173 "bison_parser.cpp" break; - case YYSYMBOL_select_with_paren: /* select_with_paren */ -#line 158 "bison_parser.y" + case 212: /* select_with_paren */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2204 "bison_parser.cpp" +#line 2179 "bison_parser.cpp" break; - case YYSYMBOL_select_no_paren: /* select_no_paren */ -#line 158 "bison_parser.y" + case 213: /* select_no_paren */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2210 "bison_parser.cpp" +#line 2185 "bison_parser.cpp" break; - case YYSYMBOL_set_operator: /* set_operator */ -#line 158 "bison_parser.y" + case 214: /* set_operator */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2216 "bison_parser.cpp" +#line 2191 "bison_parser.cpp" break; - case YYSYMBOL_set_type: /* set_type */ -#line 158 "bison_parser.y" + case 215: /* set_type */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2222 "bison_parser.cpp" +#line 2197 "bison_parser.cpp" break; - case YYSYMBOL_opt_all: /* opt_all */ -#line 147 "bison_parser.y" + case 216: /* opt_all */ +#line 149 "bison_parser.y" { } -#line 2228 "bison_parser.cpp" +#line 2203 "bison_parser.cpp" break; - case YYSYMBOL_select_clause: /* select_clause */ -#line 158 "bison_parser.y" + case 217: /* select_clause */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2234 "bison_parser.cpp" +#line 2209 "bison_parser.cpp" break; - case YYSYMBOL_opt_distinct: /* opt_distinct */ -#line 147 "bison_parser.y" + case 218: /* opt_distinct */ +#line 149 "bison_parser.y" { } -#line 2240 "bison_parser.cpp" +#line 2215 "bison_parser.cpp" break; - case YYSYMBOL_select_list: /* select_list */ -#line 150 "bison_parser.y" + case 219: /* select_list */ +#line 152 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2249,41 +2224,41 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2253 "bison_parser.cpp" +#line 2228 "bison_parser.cpp" break; - case YYSYMBOL_opt_from_clause: /* opt_from_clause */ -#line 158 "bison_parser.y" + case 220: /* opt_from_clause */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2259 "bison_parser.cpp" +#line 2234 "bison_parser.cpp" break; - case YYSYMBOL_from_clause: /* from_clause */ -#line 158 "bison_parser.y" + case 221: /* from_clause */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2265 "bison_parser.cpp" +#line 2240 "bison_parser.cpp" break; - case YYSYMBOL_opt_where: /* opt_where */ -#line 158 "bison_parser.y" + case 222: /* opt_where */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2271 "bison_parser.cpp" +#line 2246 "bison_parser.cpp" break; - case YYSYMBOL_opt_group: /* opt_group */ -#line 158 "bison_parser.y" + case 223: /* opt_group */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).group_t)); } -#line 2277 "bison_parser.cpp" +#line 2252 "bison_parser.cpp" break; - case YYSYMBOL_opt_having: /* opt_having */ -#line 158 "bison_parser.y" + case 224: /* opt_having */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2283 "bison_parser.cpp" +#line 2258 "bison_parser.cpp" break; - case YYSYMBOL_opt_order: /* opt_order */ -#line 150 "bison_parser.y" + case 225: /* opt_order */ +#line 152 "bison_parser.y" { if ((((*yyvaluep).order_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).order_vec))) { @@ -2292,11 +2267,11 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2296 "bison_parser.cpp" +#line 2271 "bison_parser.cpp" break; - case YYSYMBOL_order_list: /* order_list */ -#line 150 "bison_parser.y" + case 226: /* order_list */ +#line 152 "bison_parser.y" { if ((((*yyvaluep).order_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).order_vec))) { @@ -2305,35 +2280,35 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2309 "bison_parser.cpp" +#line 2284 "bison_parser.cpp" break; - case YYSYMBOL_order_desc: /* order_desc */ -#line 158 "bison_parser.y" + case 227: /* order_desc */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).order)); } -#line 2315 "bison_parser.cpp" +#line 2290 "bison_parser.cpp" break; - case YYSYMBOL_opt_order_type: /* opt_order_type */ -#line 147 "bison_parser.y" + case 228: /* opt_order_type */ +#line 149 "bison_parser.y" { } -#line 2321 "bison_parser.cpp" +#line 2296 "bison_parser.cpp" break; - case YYSYMBOL_opt_top: /* opt_top */ -#line 158 "bison_parser.y" + case 229: /* opt_top */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2327 "bison_parser.cpp" +#line 2302 "bison_parser.cpp" break; - case YYSYMBOL_opt_limit: /* opt_limit */ -#line 158 "bison_parser.y" + case 230: /* opt_limit */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2333 "bison_parser.cpp" +#line 2308 "bison_parser.cpp" break; - case YYSYMBOL_expr_list: /* expr_list */ -#line 150 "bison_parser.y" + case 231: /* expr_list */ +#line 152 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2342,11 +2317,11 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2346 "bison_parser.cpp" +#line 2321 "bison_parser.cpp" break; - case YYSYMBOL_opt_literal_list: /* opt_literal_list */ -#line 150 "bison_parser.y" + case 232: /* opt_literal_list */ +#line 152 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2355,11 +2330,11 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2359 "bison_parser.cpp" +#line 2334 "bison_parser.cpp" break; - case YYSYMBOL_literal_list: /* literal_list */ -#line 150 "bison_parser.y" + case 233: /* literal_list */ +#line 152 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2368,191 +2343,191 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2372 "bison_parser.cpp" +#line 2347 "bison_parser.cpp" break; - case YYSYMBOL_expr_alias: /* expr_alias */ -#line 158 "bison_parser.y" + case 234: /* expr_alias */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2378 "bison_parser.cpp" +#line 2353 "bison_parser.cpp" break; - case YYSYMBOL_expr: /* expr */ -#line 158 "bison_parser.y" + case 235: /* expr */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2384 "bison_parser.cpp" +#line 2359 "bison_parser.cpp" break; - case YYSYMBOL_operand: /* operand */ -#line 158 "bison_parser.y" + case 236: /* operand */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2390 "bison_parser.cpp" +#line 2365 "bison_parser.cpp" break; - case YYSYMBOL_scalar_expr: /* scalar_expr */ -#line 158 "bison_parser.y" + case 237: /* scalar_expr */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2396 "bison_parser.cpp" +#line 2371 "bison_parser.cpp" break; - case YYSYMBOL_unary_expr: /* unary_expr */ -#line 158 "bison_parser.y" + case 238: /* unary_expr */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2402 "bison_parser.cpp" +#line 2377 "bison_parser.cpp" break; - case YYSYMBOL_binary_expr: /* binary_expr */ -#line 158 "bison_parser.y" + case 239: /* binary_expr */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2408 "bison_parser.cpp" +#line 2383 "bison_parser.cpp" break; - case YYSYMBOL_logic_expr: /* logic_expr */ -#line 158 "bison_parser.y" + case 240: /* logic_expr */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2414 "bison_parser.cpp" +#line 2389 "bison_parser.cpp" break; - case YYSYMBOL_in_expr: /* in_expr */ -#line 158 "bison_parser.y" + case 241: /* in_expr */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2420 "bison_parser.cpp" +#line 2395 "bison_parser.cpp" break; - case YYSYMBOL_case_expr: /* case_expr */ -#line 158 "bison_parser.y" + case 242: /* case_expr */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2426 "bison_parser.cpp" +#line 2401 "bison_parser.cpp" break; - case YYSYMBOL_case_list: /* case_list */ -#line 158 "bison_parser.y" + case 243: /* case_list */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2432 "bison_parser.cpp" +#line 2407 "bison_parser.cpp" break; - case YYSYMBOL_exists_expr: /* exists_expr */ -#line 158 "bison_parser.y" + case 244: /* exists_expr */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2438 "bison_parser.cpp" +#line 2413 "bison_parser.cpp" break; - case YYSYMBOL_comp_expr: /* comp_expr */ -#line 158 "bison_parser.y" + case 245: /* comp_expr */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2444 "bison_parser.cpp" +#line 2419 "bison_parser.cpp" break; - case YYSYMBOL_function_expr: /* function_expr */ -#line 158 "bison_parser.y" + case 246: /* function_expr */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2450 "bison_parser.cpp" +#line 2425 "bison_parser.cpp" break; - case YYSYMBOL_extract_expr: /* extract_expr */ -#line 158 "bison_parser.y" + case 247: /* extract_expr */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2456 "bison_parser.cpp" +#line 2431 "bison_parser.cpp" break; - case YYSYMBOL_cast_expr: /* cast_expr */ -#line 158 "bison_parser.y" + case 248: /* cast_expr */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2462 "bison_parser.cpp" +#line 2437 "bison_parser.cpp" break; - case YYSYMBOL_datetime_field: /* datetime_field */ -#line 147 "bison_parser.y" + case 249: /* datetime_field */ +#line 149 "bison_parser.y" { } -#line 2468 "bison_parser.cpp" +#line 2443 "bison_parser.cpp" break; - case YYSYMBOL_array_expr: /* array_expr */ -#line 158 "bison_parser.y" + case 250: /* array_expr */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2474 "bison_parser.cpp" +#line 2449 "bison_parser.cpp" break; - case YYSYMBOL_array_index: /* array_index */ -#line 158 "bison_parser.y" + case 251: /* array_index */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2480 "bison_parser.cpp" +#line 2455 "bison_parser.cpp" break; - case YYSYMBOL_between_expr: /* between_expr */ -#line 158 "bison_parser.y" + case 252: /* between_expr */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2486 "bison_parser.cpp" +#line 2461 "bison_parser.cpp" break; - case YYSYMBOL_column_name: /* column_name */ -#line 158 "bison_parser.y" + case 253: /* column_name */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2492 "bison_parser.cpp" +#line 2467 "bison_parser.cpp" break; - case YYSYMBOL_literal: /* literal */ -#line 158 "bison_parser.y" + case 254: /* literal */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2498 "bison_parser.cpp" +#line 2473 "bison_parser.cpp" break; - case YYSYMBOL_string_literal: /* string_literal */ -#line 158 "bison_parser.y" + case 255: /* string_literal */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2504 "bison_parser.cpp" +#line 2479 "bison_parser.cpp" break; - case YYSYMBOL_bool_literal: /* bool_literal */ -#line 158 "bison_parser.y" + case 256: /* bool_literal */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2510 "bison_parser.cpp" +#line 2485 "bison_parser.cpp" break; - case YYSYMBOL_num_literal: /* num_literal */ -#line 158 "bison_parser.y" + case 257: /* num_literal */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2516 "bison_parser.cpp" +#line 2491 "bison_parser.cpp" break; - case YYSYMBOL_int_literal: /* int_literal */ -#line 158 "bison_parser.y" + case 258: /* int_literal */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2522 "bison_parser.cpp" +#line 2497 "bison_parser.cpp" break; - case YYSYMBOL_null_literal: /* null_literal */ -#line 158 "bison_parser.y" + case 259: /* null_literal */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2528 "bison_parser.cpp" +#line 2503 "bison_parser.cpp" break; - case YYSYMBOL_param_expr: /* param_expr */ -#line 158 "bison_parser.y" + case 260: /* param_expr */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2534 "bison_parser.cpp" +#line 2509 "bison_parser.cpp" break; - case YYSYMBOL_table_ref: /* table_ref */ -#line 158 "bison_parser.y" + case 261: /* table_ref */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2540 "bison_parser.cpp" +#line 2515 "bison_parser.cpp" break; - case YYSYMBOL_table_ref_atomic: /* table_ref_atomic */ -#line 158 "bison_parser.y" + case 262: /* table_ref_atomic */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2546 "bison_parser.cpp" +#line 2521 "bison_parser.cpp" break; - case YYSYMBOL_nonjoin_table_ref_atomic: /* nonjoin_table_ref_atomic */ -#line 158 "bison_parser.y" + case 263: /* nonjoin_table_ref_atomic */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2552 "bison_parser.cpp" +#line 2527 "bison_parser.cpp" break; - case YYSYMBOL_table_ref_commalist: /* table_ref_commalist */ -#line 150 "bison_parser.y" + case 264: /* table_ref_commalist */ +#line 152 "bison_parser.y" { if ((((*yyvaluep).table_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).table_vec))) { @@ -2561,107 +2536,107 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).table_vec)); } -#line 2565 "bison_parser.cpp" +#line 2540 "bison_parser.cpp" break; - case YYSYMBOL_table_ref_name: /* table_ref_name */ -#line 158 "bison_parser.y" + case 265: /* table_ref_name */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2571 "bison_parser.cpp" +#line 2546 "bison_parser.cpp" break; - case YYSYMBOL_table_ref_name_no_alias: /* table_ref_name_no_alias */ -#line 158 "bison_parser.y" + case 266: /* table_ref_name_no_alias */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2577 "bison_parser.cpp" +#line 2552 "bison_parser.cpp" break; - case YYSYMBOL_table_name: /* table_name */ -#line 148 "bison_parser.y" + case 267: /* table_name */ +#line 150 "bison_parser.y" { free( (((*yyvaluep).table_name).name) ); free( (((*yyvaluep).table_name).schema) ); } -#line 2583 "bison_parser.cpp" +#line 2558 "bison_parser.cpp" break; - case YYSYMBOL_opt_index_name: /* opt_index_name */ -#line 149 "bison_parser.y" + case 268: /* opt_index_name */ +#line 151 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2589 "bison_parser.cpp" +#line 2564 "bison_parser.cpp" break; - case YYSYMBOL_index_name: /* index_name */ -#line 149 "bison_parser.y" + case 269: /* index_name */ +#line 151 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2595 "bison_parser.cpp" +#line 2570 "bison_parser.cpp" break; - case YYSYMBOL_table_alias: /* table_alias */ -#line 158 "bison_parser.y" + case 270: /* table_alias */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2601 "bison_parser.cpp" +#line 2576 "bison_parser.cpp" break; - case YYSYMBOL_opt_table_alias: /* opt_table_alias */ -#line 158 "bison_parser.y" + case 271: /* opt_table_alias */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2607 "bison_parser.cpp" +#line 2582 "bison_parser.cpp" break; - case YYSYMBOL_alias: /* alias */ -#line 158 "bison_parser.y" + case 272: /* alias */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2613 "bison_parser.cpp" +#line 2588 "bison_parser.cpp" break; - case YYSYMBOL_opt_alias: /* opt_alias */ -#line 158 "bison_parser.y" + case 273: /* opt_alias */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2619 "bison_parser.cpp" +#line 2594 "bison_parser.cpp" break; - case YYSYMBOL_opt_with_clause: /* opt_with_clause */ -#line 158 "bison_parser.y" + case 274: /* opt_with_clause */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2625 "bison_parser.cpp" +#line 2600 "bison_parser.cpp" break; - case YYSYMBOL_with_clause: /* with_clause */ -#line 158 "bison_parser.y" + case 275: /* with_clause */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2631 "bison_parser.cpp" +#line 2606 "bison_parser.cpp" break; - case YYSYMBOL_with_description_list: /* with_description_list */ -#line 158 "bison_parser.y" + case 276: /* with_description_list */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2637 "bison_parser.cpp" +#line 2612 "bison_parser.cpp" break; - case YYSYMBOL_with_description: /* with_description */ -#line 158 "bison_parser.y" + case 277: /* with_description */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).with_description_t)); } -#line 2643 "bison_parser.cpp" +#line 2618 "bison_parser.cpp" break; - case YYSYMBOL_join_clause: /* join_clause */ -#line 158 "bison_parser.y" + case 278: /* join_clause */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2649 "bison_parser.cpp" +#line 2624 "bison_parser.cpp" break; - case YYSYMBOL_opt_join_type: /* opt_join_type */ -#line 147 "bison_parser.y" + case 279: /* opt_join_type */ +#line 149 "bison_parser.y" { } -#line 2655 "bison_parser.cpp" +#line 2630 "bison_parser.cpp" break; - case YYSYMBOL_join_condition: /* join_condition */ -#line 158 "bison_parser.y" + case 280: /* join_condition */ +#line 160 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2661 "bison_parser.cpp" +#line 2636 "bison_parser.cpp" break; - case YYSYMBOL_ident_commalist: /* ident_commalist */ -#line 150 "bison_parser.y" + case 282: /* ident_commalist */ +#line 152 "bison_parser.y" { if ((((*yyvaluep).str_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).str_vec))) { @@ -2670,7 +2645,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2674 "bison_parser.cpp" +#line 2649 "bison_parser.cpp" break; default: @@ -2682,8 +2657,6 @@ yydestruct (const char *yymsg, - - /*----------. | yyparse. | `----------*/ @@ -2691,7 +2664,7 @@ yydestruct (const char *yymsg, int yyparse (hsql::SQLParserResult* result, yyscan_t scanner) { -/* Lookahead token kind. */ +/* The lookahead symbol. */ int yychar; @@ -2710,50 +2683,55 @@ static YYLTYPE yyloc_default YYLTYPE yylloc = yyloc_default; /* Number of syntax errors so far. */ - int yynerrs = 0; + int yynerrs; - yy_state_fast_t yystate = 0; + yy_state_fast_t yystate; /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus = 0; + int yyerrstatus; - /* Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + /* The stacks and their tools: + 'yyss': related to states. + 'yyvs': related to semantic values. + 'yyls': related to locations. - /* Their size. */ - YYPTRDIFF_T yystacksize = YYINITDEPTH; + Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ - /* The state stack: array, bottom, top. */ + /* The state stack. */ yy_state_t yyssa[YYINITDEPTH]; - yy_state_t *yyss = yyssa; - yy_state_t *yyssp = yyss; + yy_state_t *yyss; + yy_state_t *yyssp; - /* The semantic value stack: array, bottom, top. */ + /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp = yyvs; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; - /* The location stack: array, bottom, top. */ + /* The location stack. */ YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp = yyls; + YYLTYPE *yyls; + YYLTYPE *yylsp; + + /* The locations where the error started and ended. */ + YYLTYPE yyerror_range[3]; + + YYPTRDIFF_T yystacksize; int yyn; - /* The return value of yyparse. */ int yyresult; - /* Lookahead symbol kind. */ - yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY; + /* Lookahead token as an internal (translated) token number. */ + int yytoken = 0; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; YYLTYPE yyloc; - /* The locations where the error started and ended. */ - YYLTYPE yyerror_range[3]; - +#if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; +#endif #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) @@ -2761,9 +2739,17 @@ YYLTYPE yylloc = yyloc_default; Keep to zero when no symbol should be popped. */ int yylen = 0; + yyssp = yyss = yyssa; + yyvsp = yyvs = yyvsa; + yylsp = yyls = yylsa; + yystacksize = YYINITDEPTH; + YYDPRINTF ((stderr, "Starting parse\n")); - yychar = SQL_HSQL_EMPTY; /* Cause a token to be read. */ + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ /* User initialization code. */ #line 73 "bison_parser.y" @@ -2777,7 +2763,7 @@ YYLTYPE yylloc = yyloc_default; yylloc.string_length = 0; } -#line 2781 "bison_parser.cpp" +#line 2767 "bison_parser.cpp" yylsp[0] = yylloc; goto yysetstate; @@ -2801,7 +2787,6 @@ YYLTYPE yylloc = yyloc_default; YY_IGNORE_USELESS_CAST_BEGIN *yyssp = YY_CAST (yy_state_t, yystate); YY_IGNORE_USELESS_CAST_END - YY_STACK_PRINT (yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE @@ -2851,7 +2836,7 @@ 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); } @@ -2891,30 +2876,18 @@ YYLTYPE yylloc = yyloc_default; /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ - if (yychar == SQL_HSQL_EMPTY) + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + if (yychar == YYEMPTY) { - YYDPRINTF ((stderr, "Reading a token\n")); + YYDPRINTF ((stderr, "Reading a token: ")); yychar = yylex (&yylval, &yylloc, scanner); } - if (yychar <= SQL_YYEOF) + if (yychar <= YYEOF) { - yychar = SQL_YYEOF; - yytoken = YYSYMBOL_YYEOF; + yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } - else if (yychar == SQL_HSQL_error) - { - /* The scanner already issued an error message, process directly - to error recovery. But do not keep the error token as - lookahead, it is too special and may lead us to an endless - loop in error recovery. */ - yychar = SQL_HSQL_UNDEF; - yytoken = YYSYMBOL_YYerror; - yyerror_range[1] = yylloc; - goto yyerrlab1; - } else { yytoken = YYTRANSLATE (yychar); @@ -2949,7 +2922,7 @@ YYLTYPE yylloc = yyloc_default; *++yylsp = yylloc; /* Discard the shifted token. */ - yychar = SQL_HSQL_EMPTY; + yychar = YYEMPTY; goto yynewstate; @@ -2986,8 +2959,8 @@ YYLTYPE yylloc = yyloc_default; YY_REDUCE_PRINT (yyn); switch (yyn) { - case 2: /* input: statement_list opt_semicolon */ -#line 271 "bison_parser.y" + case 2: +#line 275 "bison_parser.y" { for (SQLStatement* stmt : *(yyvsp[-1].stmt_vec)) { // Transfers ownership of the statement. @@ -3005,247 +2978,247 @@ YYLTYPE yylloc = yyloc_default; } delete (yyvsp[-1].stmt_vec); } -#line 3009 "bison_parser.cpp" +#line 2982 "bison_parser.cpp" break; - case 3: /* statement_list: statement */ -#line 292 "bison_parser.y" + case 3: +#line 296 "bison_parser.y" { (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 3020 "bison_parser.cpp" +#line 2993 "bison_parser.cpp" break; - case 4: /* statement_list: statement_list ';' statement */ -#line 298 "bison_parser.y" + case 4: +#line 302 "bison_parser.y" { (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 3031 "bison_parser.cpp" +#line 3004 "bison_parser.cpp" break; - case 5: /* statement: prepare_statement opt_hints */ -#line 307 "bison_parser.y" + case 5: +#line 311 "bison_parser.y" { (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3040 "bison_parser.cpp" +#line 3013 "bison_parser.cpp" break; - case 6: /* statement: preparable_statement opt_hints */ -#line 311 "bison_parser.y" + case 6: +#line 315 "bison_parser.y" { (yyval.statement) = (yyvsp[-1].statement); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3049 "bison_parser.cpp" +#line 3022 "bison_parser.cpp" break; - case 7: /* statement: show_statement */ -#line 315 "bison_parser.y" + case 7: +#line 319 "bison_parser.y" { (yyval.statement) = (yyvsp[0].show_stmt); } -#line 3057 "bison_parser.cpp" +#line 3030 "bison_parser.cpp" break; - case 8: /* statement: import_statement */ -#line 318 "bison_parser.y" + case 8: +#line 322 "bison_parser.y" { (yyval.statement) = (yyvsp[0].import_stmt); } -#line 3065 "bison_parser.cpp" +#line 3038 "bison_parser.cpp" break; - case 9: /* statement: export_statement */ -#line 321 "bison_parser.y" + case 9: +#line 325 "bison_parser.y" { (yyval.statement) = (yyvsp[0].export_stmt); } -#line 3073 "bison_parser.cpp" +#line 3046 "bison_parser.cpp" break; - case 10: /* preparable_statement: select_statement */ -#line 328 "bison_parser.y" + case 10: +#line 332 "bison_parser.y" { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 3079 "bison_parser.cpp" +#line 3052 "bison_parser.cpp" break; - case 11: /* preparable_statement: create_statement */ -#line 329 "bison_parser.y" + case 11: +#line 333 "bison_parser.y" { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 3085 "bison_parser.cpp" +#line 3058 "bison_parser.cpp" break; - case 12: /* preparable_statement: insert_statement */ -#line 330 "bison_parser.y" + case 12: +#line 334 "bison_parser.y" { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 3091 "bison_parser.cpp" +#line 3064 "bison_parser.cpp" break; - case 13: /* preparable_statement: delete_statement */ -#line 331 "bison_parser.y" + case 13: +#line 335 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3097 "bison_parser.cpp" +#line 3070 "bison_parser.cpp" break; - case 14: /* preparable_statement: truncate_statement */ -#line 332 "bison_parser.y" + case 14: +#line 336 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3103 "bison_parser.cpp" +#line 3076 "bison_parser.cpp" break; - case 15: /* preparable_statement: update_statement */ -#line 333 "bison_parser.y" + case 15: +#line 337 "bison_parser.y" { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 3109 "bison_parser.cpp" +#line 3082 "bison_parser.cpp" break; - case 16: /* preparable_statement: drop_statement */ -#line 334 "bison_parser.y" + case 16: +#line 338 "bison_parser.y" { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 3115 "bison_parser.cpp" +#line 3088 "bison_parser.cpp" break; - case 17: /* preparable_statement: execute_statement */ -#line 335 "bison_parser.y" + case 17: +#line 339 "bison_parser.y" { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 3121 "bison_parser.cpp" +#line 3094 "bison_parser.cpp" break; - case 18: /* preparable_statement: transaction_statement */ -#line 336 "bison_parser.y" + case 18: +#line 340 "bison_parser.y" { (yyval.statement) = (yyvsp[0].transaction_stmt); } -#line 3127 "bison_parser.cpp" +#line 3100 "bison_parser.cpp" break; - case 19: /* opt_hints: WITH HINT '(' hint_list ')' */ -#line 345 "bison_parser.y" + case 19: +#line 349 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 3133 "bison_parser.cpp" +#line 3106 "bison_parser.cpp" break; - case 20: /* opt_hints: %empty */ -#line 346 "bison_parser.y" + case 20: +#line 350 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 3139 "bison_parser.cpp" +#line 3112 "bison_parser.cpp" break; - case 21: /* hint_list: hint */ -#line 351 "bison_parser.y" + case 21: +#line 355 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3145 "bison_parser.cpp" +#line 3118 "bison_parser.cpp" break; - case 22: /* hint_list: hint_list ',' hint */ -#line 352 "bison_parser.y" + case 22: +#line 356 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3151 "bison_parser.cpp" +#line 3124 "bison_parser.cpp" break; - case 23: /* hint: IDENTIFIER */ -#line 356 "bison_parser.y" + case 23: +#line 360 "bison_parser.y" { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[0].sval); } -#line 3160 "bison_parser.cpp" +#line 3133 "bison_parser.cpp" break; - case 24: /* hint: IDENTIFIER '(' literal_list ')' */ -#line 360 "bison_parser.y" + case 24: +#line 364 "bison_parser.y" { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[-3].sval); (yyval.expr)->exprList = (yyvsp[-1].expr_vec); } -#line 3170 "bison_parser.cpp" +#line 3143 "bison_parser.cpp" break; - case 25: /* transaction_statement: BEGIN opt_transaction_keyword */ -#line 372 "bison_parser.y" + case 25: +#line 376 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kBeginTransaction); } -#line 3178 "bison_parser.cpp" +#line 3151 "bison_parser.cpp" break; - case 26: /* transaction_statement: ROLLBACK opt_transaction_keyword */ -#line 375 "bison_parser.y" + case 26: +#line 379 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kRollbackTransaction); } -#line 3186 "bison_parser.cpp" +#line 3159 "bison_parser.cpp" break; - case 27: /* transaction_statement: COMMIT opt_transaction_keyword */ -#line 378 "bison_parser.y" + case 27: +#line 382 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kCommitTransaction); } -#line 3194 "bison_parser.cpp" +#line 3167 "bison_parser.cpp" break; - case 30: /* prepare_statement: PREPARE IDENTIFIER FROM prepare_target_query */ -#line 392 "bison_parser.y" + case 30: +#line 396 "bison_parser.y" { (yyval.prep_stmt) = new PrepareStatement(); (yyval.prep_stmt)->name = (yyvsp[-2].sval); (yyval.prep_stmt)->query = (yyvsp[0].sval); } -#line 3204 "bison_parser.cpp" +#line 3177 "bison_parser.cpp" break; - case 32: /* execute_statement: EXECUTE IDENTIFIER */ -#line 402 "bison_parser.y" + case 32: +#line 406 "bison_parser.y" { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[0].sval); } -#line 3213 "bison_parser.cpp" +#line 3186 "bison_parser.cpp" break; - case 33: /* execute_statement: EXECUTE IDENTIFIER '(' opt_literal_list ')' */ -#line 406 "bison_parser.y" + case 33: +#line 410 "bison_parser.y" { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[-3].sval); (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); } -#line 3223 "bison_parser.cpp" +#line 3196 "bison_parser.cpp" break; - case 34: /* import_statement: IMPORT FROM file_type FILE file_path INTO table_name */ -#line 420 "bison_parser.y" + case 34: +#line 424 "bison_parser.y" { (yyval.import_stmt) = new ImportStatement((yyvsp[-4].import_type_t)); (yyval.import_stmt)->filePath = (yyvsp[-2].sval); (yyval.import_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3234 "bison_parser.cpp" +#line 3207 "bison_parser.cpp" break; - case 35: /* import_statement: COPY table_name FROM file_path opt_file_type */ -#line 426 "bison_parser.y" + case 35: +#line 430 "bison_parser.y" { (yyval.import_stmt) = new ImportStatement((yyvsp[0].import_type_t)); (yyval.import_stmt)->filePath = (yyvsp[-1].sval); (yyval.import_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3245 "bison_parser.cpp" +#line 3218 "bison_parser.cpp" break; - case 36: /* file_type: IDENTIFIER */ -#line 435 "bison_parser.y" + case 36: +#line 439 "bison_parser.y" { if (strcasecmp((yyvsp[0].sval), "csv") == 0) { (yyval.import_type_t) = kImportCSV; @@ -3260,70 +3233,70 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[0].sval)); } -#line 3264 "bison_parser.cpp" +#line 3237 "bison_parser.cpp" break; - case 37: /* file_path: string_literal */ -#line 452 "bison_parser.y" + case 37: +#line 456 "bison_parser.y" { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 3270 "bison_parser.cpp" +#line 3243 "bison_parser.cpp" break; - case 38: /* opt_file_type: WITH FORMAT file_type */ -#line 456 "bison_parser.y" + case 38: +#line 460 "bison_parser.y" { (yyval.import_type_t) = (yyvsp[0].import_type_t); } -#line 3278 "bison_parser.cpp" +#line 3251 "bison_parser.cpp" break; - case 39: /* opt_file_type: %empty */ -#line 459 "bison_parser.y" + case 39: +#line 463 "bison_parser.y" { (yyval.import_type_t) = kImportAuto; } -#line 3284 "bison_parser.cpp" +#line 3257 "bison_parser.cpp" break; - case 40: /* export_statement: COPY table_name TO file_path opt_file_type */ -#line 468 "bison_parser.y" + case 40: +#line 472 "bison_parser.y" { (yyval.export_stmt) = new ExportStatement((yyvsp[0].import_type_t)); (yyval.export_stmt)->filePath = (yyvsp[-1].sval); (yyval.export_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.export_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3295 "bison_parser.cpp" +#line 3268 "bison_parser.cpp" break; - case 41: /* show_statement: SHOW TABLES */ -#line 482 "bison_parser.y" + case 41: +#line 486 "bison_parser.y" { (yyval.show_stmt) = new ShowStatement(kShowTables); } -#line 3303 "bison_parser.cpp" +#line 3276 "bison_parser.cpp" break; - case 42: /* show_statement: SHOW COLUMNS table_name */ -#line 485 "bison_parser.y" + case 42: +#line 489 "bison_parser.y" { (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 3313 "bison_parser.cpp" +#line 3286 "bison_parser.cpp" break; - case 43: /* show_statement: DESCRIBE table_name */ -#line 490 "bison_parser.y" + case 43: +#line 494 "bison_parser.y" { (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 3323 "bison_parser.cpp" +#line 3296 "bison_parser.cpp" break; - case 44: /* create_statement: CREATE TABLE opt_not_exists table_name FROM IDENTIFIER FILE file_path */ -#line 504 "bison_parser.y" + case 44: +#line 508 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTableFromTbl); (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); @@ -3337,23 +3310,23 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].sval)); (yyval.create_stmt)->filePath = (yyvsp[0].sval); } -#line 3341 "bison_parser.cpp" +#line 3314 "bison_parser.cpp" break; - case 45: /* create_statement: CREATE TABLE opt_not_exists table_name '(' column_def_commalist ')' */ -#line 517 "bison_parser.y" - { + case 45: +#line 521 "bison_parser.y" + { (yyval.create_stmt) = new CreateStatement(kCreateTable); - (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); - (yyval.create_stmt)->schema = (yyvsp[-3].table_name).schema; - (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; - (yyval.create_stmt)->columns = (yyvsp[-1].column_vec); + (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); + (yyval.create_stmt)->schema = (yyvsp[-4].table_name).schema; + (yyval.create_stmt)->tableName = (yyvsp[-4].table_name).name; + (yyval.create_stmt)->columns = (yyvsp[-2].column_vec); } -#line 3353 "bison_parser.cpp" +#line 3326 "bison_parser.cpp" break; - case 46: /* create_statement: CREATE TABLE opt_not_exists table_name AS select_statement */ -#line 524 "bison_parser.y" + case 46: +#line 528 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-3].bval); @@ -3361,11 +3334,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-2].table_name).name; (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3365 "bison_parser.cpp" +#line 3338 "bison_parser.cpp" break; - case 47: /* create_statement: CREATE INDEX opt_index_name opt_not_exists ON table_name '(' ident_commalist ')' */ -#line 531 "bison_parser.y" + case 47: +#line 535 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateIndex); (yyval.create_stmt)->indexName = (yyvsp[-6].sval); @@ -3373,11 +3346,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->indexColumns = (yyvsp[-1].str_vec); } -#line 3377 "bison_parser.cpp" +#line 3350 "bison_parser.cpp" break; - case 48: /* create_statement: CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement */ -#line 538 "bison_parser.y" + case 48: +#line 542 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateView); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -3386,220 +3359,250 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3390 "bison_parser.cpp" +#line 3363 "bison_parser.cpp" break; - case 49: /* opt_not_exists: IF NOT EXISTS */ -#line 549 "bison_parser.y" + case 49: +#line 553 "bison_parser.y" { (yyval.bval) = true; } -#line 3396 "bison_parser.cpp" +#line 3369 "bison_parser.cpp" break; - case 50: /* opt_not_exists: %empty */ -#line 550 "bison_parser.y" + case 50: +#line 554 "bison_parser.y" { (yyval.bval) = false; } -#line 3402 "bison_parser.cpp" +#line 3375 "bison_parser.cpp" break; - case 51: /* column_def_commalist: column_def */ -#line 554 "bison_parser.y" + case 51: +#line 558 "bison_parser.y" { (yyval.column_vec) = new std::vector(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); } -#line 3408 "bison_parser.cpp" +#line 3381 "bison_parser.cpp" break; - case 52: /* column_def_commalist: column_def_commalist ',' column_def */ -#line 555 "bison_parser.y" + case 52: +#line 559 "bison_parser.y" { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } -#line 3414 "bison_parser.cpp" +#line 3387 "bison_parser.cpp" break; - case 53: /* column_def: IDENTIFIER column_type opt_column_nullable */ -#line 559 "bison_parser.y" + case 53: +#line 563 "bison_parser.y" { (yyval.column_t) = new ColumnDefinition((yyvsp[-2].sval), (yyvsp[-1].column_type_t), (yyvsp[0].bval)); } -#line 3422 "bison_parser.cpp" +#line 3395 "bison_parser.cpp" break; - case 54: /* column_type: INT */ -#line 565 "bison_parser.y" + case 54: +#line 569 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3428 "bison_parser.cpp" +#line 3401 "bison_parser.cpp" break; - case 55: /* column_type: INTEGER */ -#line 566 "bison_parser.y" + case 55: +#line 570 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3434 "bison_parser.cpp" +#line 3407 "bison_parser.cpp" break; - case 56: /* column_type: LONG */ -#line 567 "bison_parser.y" + case 56: +#line 571 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::LONG}; } -#line 3440 "bison_parser.cpp" +#line 3413 "bison_parser.cpp" break; - case 57: /* column_type: FLOAT */ -#line 568 "bison_parser.y" + case 57: +#line 572 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3446 "bison_parser.cpp" +#line 3419 "bison_parser.cpp" break; - case 58: /* column_type: DECIMAL '(' INTVAL ',' INTVAL ')' */ -#line 569 "bison_parser.y" + case 58: +#line 573 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3452 "bison_parser.cpp" +#line 3425 "bison_parser.cpp" break; - case 59: /* column_type: DOUBLE */ -#line 570 "bison_parser.y" + case 59: +#line 574 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } -#line 3458 "bison_parser.cpp" +#line 3431 "bison_parser.cpp" break; - case 60: /* column_type: REAL */ -#line 571 "bison_parser.y" + case 60: +#line 575 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3464 "bison_parser.cpp" +#line 3437 "bison_parser.cpp" break; - case 61: /* column_type: VARCHAR '(' INTVAL ')' */ -#line 572 "bison_parser.y" + case 61: +#line 576 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3470 "bison_parser.cpp" +#line 3443 "bison_parser.cpp" break; - case 62: /* column_type: CHARACTER VARYING '(' INTVAL ')' */ -#line 573 "bison_parser.y" + case 62: +#line 577 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3476 "bison_parser.cpp" +#line 3449 "bison_parser.cpp" break; - case 63: /* column_type: CHAR '(' INTVAL ')' */ -#line 574 "bison_parser.y" + case 63: +#line 578 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } -#line 3482 "bison_parser.cpp" +#line 3455 "bison_parser.cpp" break; - case 64: /* column_type: TEXT */ -#line 575 "bison_parser.y" + case 64: +#line 579 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } -#line 3488 "bison_parser.cpp" +#line 3461 "bison_parser.cpp" break; - case 65: /* column_type: TIME */ -#line 576 "bison_parser.y" + case 65: +#line 580 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TIME}; } -#line 3494 "bison_parser.cpp" +#line 3467 "bison_parser.cpp" break; - case 66: /* column_type: DATETIME */ -#line 577 "bison_parser.y" + case 66: +#line 581 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } -#line 3500 "bison_parser.cpp" +#line 3473 "bison_parser.cpp" break; - case 67: /* column_type: DATE */ -#line 578 "bison_parser.y" + case 67: +#line 582 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATE}; } -#line 3506 "bison_parser.cpp" +#line 3479 "bison_parser.cpp" break; - case 68: /* opt_column_nullable: NULL */ -#line 582 "bison_parser.y" + case 68: +#line 586 "bison_parser.y" { (yyval.bval) = true; } -#line 3512 "bison_parser.cpp" +#line 3485 "bison_parser.cpp" break; - case 69: /* opt_column_nullable: NOT NULL */ -#line 583 "bison_parser.y" + case 69: +#line 587 "bison_parser.y" { (yyval.bval) = false; } -#line 3518 "bison_parser.cpp" +#line 3491 "bison_parser.cpp" break; - case 70: /* opt_column_nullable: %empty */ -#line 584 "bison_parser.y" + case 70: +#line 588 "bison_parser.y" { (yyval.bval) = false; } -#line 3524 "bison_parser.cpp" +#line 3497 "bison_parser.cpp" + break; + + case 71: +#line 592 "bison_parser.y" + {(yyval.table_key_constraint_vec) = new std::vector(); (yyval.table_key_constraint_vec)->push_back((yyvsp[0].table_key_constraint_t)); } +#line 3503 "bison_parser.cpp" + break; + + case 72: +#line 593 "bison_parser.y" + { (yyvsp[-1].table_key_constraint_vec)->push_back((yyvsp[0].table_key_constraint_t)); (yyval.table_key_constraint_vec) = (yyvsp[-1].table_key_constraint_vec); } +#line 3509 "bison_parser.cpp" break; - case 71: /* drop_statement: DROP TABLE opt_exists table_name */ + case 73: #line 594 "bison_parser.y" + {(yyval.table_key_constraint_vec) = new std::vector(); } +#line 3515 "bison_parser.cpp" + break; + + case 74: +#line 598 "bison_parser.y" + { (yyval.table_key_constraint_t) = TableKeyConstraint{KeyType::PRIMARY_KEY, (yyvsp[-1].str_vec)}; } +#line 3521 "bison_parser.cpp" + break; + + case 75: +#line 599 "bison_parser.y" + { (yyval.table_key_constraint_t) = TableKeyConstraint{KeyType::UNIQUE, (yyvsp[-1].str_vec)}; } +#line 3527 "bison_parser.cpp" + break; + + case 76: +#line 607 "bison_parser.y" { (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 3535 "bison_parser.cpp" +#line 3538 "bison_parser.cpp" break; - case 72: /* drop_statement: DROP VIEW opt_exists table_name */ -#line 600 "bison_parser.y" + case 77: +#line 613 "bison_parser.y" { (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 3546 "bison_parser.cpp" +#line 3549 "bison_parser.cpp" break; - case 73: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ -#line 606 "bison_parser.y" + case 78: +#line 619 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); (yyval.drop_stmt)->ifExists = false; (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 3556 "bison_parser.cpp" +#line 3559 "bison_parser.cpp" break; - case 74: /* drop_statement: DROP INDEX index_name ON table_name */ -#line 611 "bison_parser.y" + case 79: +#line 624 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropIndex); (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; (yyval.drop_stmt)->index_name = (yyvsp[-2].sval); } -#line 3566 "bison_parser.cpp" +#line 3569 "bison_parser.cpp" break; - case 75: /* opt_exists: IF EXISTS */ -#line 619 "bison_parser.y" + case 80: +#line 632 "bison_parser.y" { (yyval.bval) = true; } -#line 3572 "bison_parser.cpp" +#line 3575 "bison_parser.cpp" break; - case 76: /* opt_exists: %empty */ -#line 620 "bison_parser.y" + case 81: +#line 633 "bison_parser.y" { (yyval.bval) = false; } -#line 3578 "bison_parser.cpp" +#line 3581 "bison_parser.cpp" break; - case 77: /* delete_statement: DELETE FROM table_name opt_where */ -#line 629 "bison_parser.y" + case 82: +#line 642 "bison_parser.y" { (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 3589 "bison_parser.cpp" +#line 3592 "bison_parser.cpp" break; - case 78: /* truncate_statement: TRUNCATE table_name */ -#line 638 "bison_parser.y" + case 83: +#line 651 "bison_parser.y" { (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3599 "bison_parser.cpp" +#line 3602 "bison_parser.cpp" break; - case 79: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ -#line 651 "bison_parser.y" + case 84: +#line 664 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertValues); (yyval.insert_stmt)->schema = (yyvsp[-5].table_name).schema; @@ -3607,11 +3610,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } -#line 3611 "bison_parser.cpp" +#line 3614 "bison_parser.cpp" break; - case 80: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ -#line 658 "bison_parser.y" + case 85: +#line 671 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertSelect); (yyval.insert_stmt)->schema = (yyvsp[-2].table_name).schema; @@ -3619,74 +3622,74 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } -#line 3623 "bison_parser.cpp" +#line 3626 "bison_parser.cpp" break; - case 81: /* opt_column_list: '(' ident_commalist ')' */ -#line 669 "bison_parser.y" + case 86: +#line 682 "bison_parser.y" { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 3629 "bison_parser.cpp" +#line 3632 "bison_parser.cpp" break; - case 82: /* opt_column_list: %empty */ -#line 670 "bison_parser.y" + case 87: +#line 683 "bison_parser.y" { (yyval.str_vec) = nullptr; } -#line 3635 "bison_parser.cpp" +#line 3638 "bison_parser.cpp" break; - case 83: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ -#line 680 "bison_parser.y" + case 88: +#line 693 "bison_parser.y" { (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 3646 "bison_parser.cpp" +#line 3649 "bison_parser.cpp" break; - case 84: /* update_clause_commalist: update_clause */ -#line 689 "bison_parser.y" + case 89: +#line 702 "bison_parser.y" { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 3652 "bison_parser.cpp" +#line 3655 "bison_parser.cpp" break; - case 85: /* update_clause_commalist: update_clause_commalist ',' update_clause */ -#line 690 "bison_parser.y" + case 90: +#line 703 "bison_parser.y" { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 3658 "bison_parser.cpp" +#line 3661 "bison_parser.cpp" break; - case 86: /* update_clause: IDENTIFIER '=' expr */ -#line 694 "bison_parser.y" + case 91: +#line 707 "bison_parser.y" { (yyval.update_t) = new UpdateClause(); (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 3668 "bison_parser.cpp" +#line 3671 "bison_parser.cpp" break; - case 87: /* select_statement: opt_with_clause select_with_paren */ -#line 706 "bison_parser.y" + case 92: +#line 719 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3677 "bison_parser.cpp" +#line 3680 "bison_parser.cpp" break; - case 88: /* select_statement: opt_with_clause select_no_paren */ -#line 710 "bison_parser.y" + case 93: +#line 723 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3686 "bison_parser.cpp" +#line 3689 "bison_parser.cpp" break; - case 89: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ -#line 714 "bison_parser.y" + case 94: +#line 727 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3698,17 +3701,17 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); (yyval.select_stmt)->withDescriptions = (yyvsp[-5].with_description_vec); } -#line 3702 "bison_parser.cpp" +#line 3705 "bison_parser.cpp" break; - case 92: /* select_within_set_operation_no_parentheses: select_clause */ -#line 732 "bison_parser.y" + case 97: +#line 745 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); } -#line 3708 "bison_parser.cpp" +#line 3711 "bison_parser.cpp" break; - case 93: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ -#line 733 "bison_parser.y" + case 98: +#line 746 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3717,23 +3720,23 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->push_back((yyvsp[-1].set_operator_t)); (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[0].select_stmt); } -#line 3721 "bison_parser.cpp" +#line 3724 "bison_parser.cpp" break; - case 94: /* select_with_paren: '(' select_no_paren ')' */ -#line 744 "bison_parser.y" + case 99: +#line 757 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3727 "bison_parser.cpp" +#line 3730 "bison_parser.cpp" break; - case 95: /* select_with_paren: '(' select_with_paren ')' */ -#line 745 "bison_parser.y" + case 100: +#line 758 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3733 "bison_parser.cpp" +#line 3736 "bison_parser.cpp" break; - case 96: /* select_no_paren: select_clause opt_order opt_limit */ -#line 749 "bison_parser.y" + case 101: +#line 762 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); (yyval.select_stmt)->order = (yyvsp[-1].order_vec); @@ -3744,11 +3747,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3748 "bison_parser.cpp" +#line 3751 "bison_parser.cpp" break; - case 97: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ -#line 759 "bison_parser.y" + case 102: +#line 772 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3759,63 +3762,63 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); } -#line 3763 "bison_parser.cpp" +#line 3766 "bison_parser.cpp" break; - case 98: /* set_operator: set_type opt_all */ -#line 772 "bison_parser.y" + case 103: +#line 785 "bison_parser.y" { (yyval.set_operator_t) = (yyvsp[-1].set_operator_t); (yyval.set_operator_t)->isAll = (yyvsp[0].bval); } -#line 3772 "bison_parser.cpp" +#line 3775 "bison_parser.cpp" break; - case 99: /* set_type: UNION */ -#line 779 "bison_parser.y" + case 104: +#line 792 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetUnion; } -#line 3781 "bison_parser.cpp" +#line 3784 "bison_parser.cpp" break; - case 100: /* set_type: INTERSECT */ -#line 783 "bison_parser.y" + case 105: +#line 796 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetIntersect; } -#line 3790 "bison_parser.cpp" +#line 3793 "bison_parser.cpp" break; - case 101: /* set_type: EXCEPT */ -#line 787 "bison_parser.y" + case 106: +#line 800 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetExcept; } -#line 3799 "bison_parser.cpp" +#line 3802 "bison_parser.cpp" break; - case 102: /* opt_all: ALL */ -#line 794 "bison_parser.y" + case 107: +#line 807 "bison_parser.y" { (yyval.bval) = true; } -#line 3807 "bison_parser.cpp" +#line 3810 "bison_parser.cpp" break; - case 103: /* opt_all: %empty */ -#line 797 "bison_parser.y" + case 108: +#line 810 "bison_parser.y" { (yyval.bval) = false; } -#line 3815 "bison_parser.cpp" +#line 3818 "bison_parser.cpp" break; - case 104: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ -#line 803 "bison_parser.y" + case 109: +#line 816 "bison_parser.y" { (yyval.select_stmt) = new SelectStatement(); (yyval.select_stmt)->limit = (yyvsp[-5].limit); @@ -3825,213 +3828,213 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 3829 "bison_parser.cpp" +#line 3832 "bison_parser.cpp" break; - case 105: /* opt_distinct: DISTINCT */ -#line 815 "bison_parser.y" + case 110: +#line 828 "bison_parser.y" { (yyval.bval) = true; } -#line 3835 "bison_parser.cpp" +#line 3838 "bison_parser.cpp" break; - case 106: /* opt_distinct: %empty */ -#line 816 "bison_parser.y" + case 111: +#line 829 "bison_parser.y" { (yyval.bval) = false; } -#line 3841 "bison_parser.cpp" +#line 3844 "bison_parser.cpp" break; - case 108: /* opt_from_clause: from_clause */ -#line 824 "bison_parser.y" + case 113: +#line 837 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 3847 "bison_parser.cpp" +#line 3850 "bison_parser.cpp" break; - case 109: /* opt_from_clause: %empty */ -#line 825 "bison_parser.y" + case 114: +#line 838 "bison_parser.y" { (yyval.table) = nullptr; } -#line 3853 "bison_parser.cpp" +#line 3856 "bison_parser.cpp" break; - case 110: /* from_clause: FROM table_ref */ -#line 829 "bison_parser.y" + case 115: +#line 842 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 3859 "bison_parser.cpp" +#line 3862 "bison_parser.cpp" break; - case 111: /* opt_where: WHERE expr */ -#line 834 "bison_parser.y" + case 116: +#line 847 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 3865 "bison_parser.cpp" +#line 3868 "bison_parser.cpp" break; - case 112: /* opt_where: %empty */ -#line 835 "bison_parser.y" + case 117: +#line 848 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 3871 "bison_parser.cpp" +#line 3874 "bison_parser.cpp" break; - case 113: /* opt_group: GROUP BY expr_list opt_having */ -#line 839 "bison_parser.y" + case 118: +#line 852 "bison_parser.y" { (yyval.group_t) = new GroupByDescription(); (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 3881 "bison_parser.cpp" +#line 3884 "bison_parser.cpp" break; - case 114: /* opt_group: %empty */ -#line 844 "bison_parser.y" + case 119: +#line 857 "bison_parser.y" { (yyval.group_t) = nullptr; } -#line 3887 "bison_parser.cpp" +#line 3890 "bison_parser.cpp" break; - case 115: /* opt_having: HAVING expr */ -#line 848 "bison_parser.y" + case 120: +#line 861 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 3893 "bison_parser.cpp" +#line 3896 "bison_parser.cpp" break; - case 116: /* opt_having: %empty */ -#line 849 "bison_parser.y" + case 121: +#line 862 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 3899 "bison_parser.cpp" +#line 3902 "bison_parser.cpp" break; - case 117: /* opt_order: ORDER BY order_list */ -#line 853 "bison_parser.y" + case 122: +#line 866 "bison_parser.y" { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 3905 "bison_parser.cpp" +#line 3908 "bison_parser.cpp" break; - case 118: /* opt_order: %empty */ -#line 854 "bison_parser.y" + case 123: +#line 867 "bison_parser.y" { (yyval.order_vec) = nullptr; } -#line 3911 "bison_parser.cpp" +#line 3914 "bison_parser.cpp" break; - case 119: /* order_list: order_desc */ -#line 858 "bison_parser.y" + case 124: +#line 871 "bison_parser.y" { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 3917 "bison_parser.cpp" +#line 3920 "bison_parser.cpp" break; - case 120: /* order_list: order_list ',' order_desc */ -#line 859 "bison_parser.y" + case 125: +#line 872 "bison_parser.y" { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 3923 "bison_parser.cpp" +#line 3926 "bison_parser.cpp" break; - case 121: /* order_desc: expr opt_order_type */ -#line 863 "bison_parser.y" + case 126: +#line 876 "bison_parser.y" { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 3929 "bison_parser.cpp" +#line 3932 "bison_parser.cpp" break; - case 122: /* opt_order_type: ASC */ -#line 867 "bison_parser.y" + case 127: +#line 880 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 3935 "bison_parser.cpp" +#line 3938 "bison_parser.cpp" break; - case 123: /* opt_order_type: DESC */ -#line 868 "bison_parser.y" + case 128: +#line 881 "bison_parser.y" { (yyval.order_type) = kOrderDesc; } -#line 3941 "bison_parser.cpp" +#line 3944 "bison_parser.cpp" break; - case 124: /* opt_order_type: %empty */ -#line 869 "bison_parser.y" + case 129: +#line 882 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 3947 "bison_parser.cpp" +#line 3950 "bison_parser.cpp" break; - case 125: /* opt_top: TOP int_literal */ -#line 875 "bison_parser.y" + case 130: +#line 888 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 3953 "bison_parser.cpp" +#line 3956 "bison_parser.cpp" break; - case 126: /* opt_top: %empty */ -#line 876 "bison_parser.y" + case 131: +#line 889 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 3959 "bison_parser.cpp" +#line 3962 "bison_parser.cpp" break; - case 127: /* opt_limit: LIMIT expr */ -#line 880 "bison_parser.y" + case 132: +#line 893 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 3965 "bison_parser.cpp" +#line 3968 "bison_parser.cpp" break; - case 128: /* opt_limit: OFFSET expr */ -#line 881 "bison_parser.y" + case 133: +#line 894 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 3971 "bison_parser.cpp" +#line 3974 "bison_parser.cpp" break; - case 129: /* opt_limit: LIMIT expr OFFSET expr */ -#line 882 "bison_parser.y" + case 134: +#line 895 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 3977 "bison_parser.cpp" +#line 3980 "bison_parser.cpp" break; - case 130: /* opt_limit: LIMIT ALL */ -#line 883 "bison_parser.y" + case 135: +#line 896 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, nullptr); } -#line 3983 "bison_parser.cpp" +#line 3986 "bison_parser.cpp" break; - case 131: /* opt_limit: LIMIT ALL OFFSET expr */ -#line 884 "bison_parser.y" + case 136: +#line 897 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 3989 "bison_parser.cpp" +#line 3992 "bison_parser.cpp" break; - case 132: /* opt_limit: %empty */ -#line 885 "bison_parser.y" + case 137: +#line 898 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 3995 "bison_parser.cpp" +#line 3998 "bison_parser.cpp" break; - case 133: /* expr_list: expr_alias */ -#line 892 "bison_parser.y" + case 138: +#line 905 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4001 "bison_parser.cpp" +#line 4004 "bison_parser.cpp" break; - case 134: /* expr_list: expr_list ',' expr_alias */ -#line 893 "bison_parser.y" + case 139: +#line 906 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4007 "bison_parser.cpp" +#line 4010 "bison_parser.cpp" break; - case 135: /* opt_literal_list: literal_list */ -#line 897 "bison_parser.y" + case 140: +#line 910 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[0].expr_vec); } -#line 4013 "bison_parser.cpp" +#line 4016 "bison_parser.cpp" break; - case 136: /* opt_literal_list: %empty */ -#line 898 "bison_parser.y" + case 141: +#line 911 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 4019 "bison_parser.cpp" +#line 4022 "bison_parser.cpp" break; - case 137: /* literal_list: literal */ -#line 902 "bison_parser.y" + case 142: +#line 915 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4025 "bison_parser.cpp" +#line 4028 "bison_parser.cpp" break; - case 138: /* literal_list: literal_list ',' literal */ -#line 903 "bison_parser.y" + case 143: +#line 916 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4031 "bison_parser.cpp" +#line 4034 "bison_parser.cpp" break; - case 139: /* expr_alias: expr opt_alias */ -#line 907 "bison_parser.y" + case 144: +#line 920 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); if ((yyvsp[0].alias_t)) { @@ -4039,421 +4042,421 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].alias_t); } } -#line 4043 "bison_parser.cpp" +#line 4046 "bison_parser.cpp" break; - case 145: /* operand: '(' expr ')' */ -#line 925 "bison_parser.y" + case 150: +#line 938 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); } -#line 4049 "bison_parser.cpp" +#line 4052 "bison_parser.cpp" break; - case 155: /* operand: '(' select_no_paren ')' */ -#line 935 "bison_parser.y" + case 160: +#line 948 "bison_parser.y" { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 4055 "bison_parser.cpp" +#line 4058 "bison_parser.cpp" break; - case 158: /* unary_expr: '-' operand */ -#line 944 "bison_parser.y" + case 163: +#line 957 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 4061 "bison_parser.cpp" +#line 4064 "bison_parser.cpp" break; - case 159: /* unary_expr: NOT operand */ -#line 945 "bison_parser.y" + case 164: +#line 958 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 4067 "bison_parser.cpp" +#line 4070 "bison_parser.cpp" break; - case 160: /* unary_expr: operand ISNULL */ -#line 946 "bison_parser.y" + case 165: +#line 959 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 4073 "bison_parser.cpp" +#line 4076 "bison_parser.cpp" break; - case 161: /* unary_expr: operand IS NULL */ -#line 947 "bison_parser.y" + case 166: +#line 960 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 4079 "bison_parser.cpp" +#line 4082 "bison_parser.cpp" break; - case 162: /* unary_expr: operand IS NOT NULL */ -#line 948 "bison_parser.y" + case 167: +#line 961 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 4085 "bison_parser.cpp" +#line 4088 "bison_parser.cpp" break; - case 164: /* binary_expr: operand '-' operand */ -#line 953 "bison_parser.y" + case 169: +#line 966 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 4091 "bison_parser.cpp" +#line 4094 "bison_parser.cpp" break; - case 165: /* binary_expr: operand '+' operand */ -#line 954 "bison_parser.y" + case 170: +#line 967 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 4097 "bison_parser.cpp" +#line 4100 "bison_parser.cpp" break; - case 166: /* binary_expr: operand '/' operand */ -#line 955 "bison_parser.y" + case 171: +#line 968 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 4103 "bison_parser.cpp" +#line 4106 "bison_parser.cpp" break; - case 167: /* binary_expr: operand '*' operand */ -#line 956 "bison_parser.y" + case 172: +#line 969 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 4109 "bison_parser.cpp" +#line 4112 "bison_parser.cpp" break; - case 168: /* binary_expr: operand '%' operand */ -#line 957 "bison_parser.y" + case 173: +#line 970 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 4115 "bison_parser.cpp" +#line 4118 "bison_parser.cpp" break; - case 169: /* binary_expr: operand '^' operand */ -#line 958 "bison_parser.y" + case 174: +#line 971 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 4121 "bison_parser.cpp" +#line 4124 "bison_parser.cpp" break; - case 170: /* binary_expr: operand LIKE operand */ -#line 959 "bison_parser.y" + case 175: +#line 972 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 4127 "bison_parser.cpp" +#line 4130 "bison_parser.cpp" break; - case 171: /* binary_expr: operand NOT LIKE operand */ -#line 960 "bison_parser.y" + case 176: +#line 973 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 4133 "bison_parser.cpp" +#line 4136 "bison_parser.cpp" break; - case 172: /* binary_expr: operand ILIKE operand */ -#line 961 "bison_parser.y" + case 177: +#line 974 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 4139 "bison_parser.cpp" +#line 4142 "bison_parser.cpp" break; - case 173: /* binary_expr: operand CONCAT operand */ -#line 962 "bison_parser.y" + case 178: +#line 975 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 4145 "bison_parser.cpp" +#line 4148 "bison_parser.cpp" break; - case 174: /* logic_expr: expr AND expr */ -#line 966 "bison_parser.y" + case 179: +#line 979 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 4151 "bison_parser.cpp" +#line 4154 "bison_parser.cpp" break; - case 175: /* logic_expr: expr OR expr */ -#line 967 "bison_parser.y" + case 180: +#line 980 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 4157 "bison_parser.cpp" +#line 4160 "bison_parser.cpp" break; - case 176: /* in_expr: operand IN '(' expr_list ')' */ -#line 971 "bison_parser.y" + case 181: +#line 984 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 4163 "bison_parser.cpp" +#line 4166 "bison_parser.cpp" break; - case 177: /* in_expr: operand NOT IN '(' expr_list ')' */ -#line 972 "bison_parser.y" + case 182: +#line 985 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 4169 "bison_parser.cpp" +#line 4172 "bison_parser.cpp" break; - case 178: /* in_expr: operand IN '(' select_no_paren ')' */ -#line 973 "bison_parser.y" + case 183: +#line 986 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 4175 "bison_parser.cpp" +#line 4178 "bison_parser.cpp" break; - case 179: /* in_expr: operand NOT IN '(' select_no_paren ')' */ -#line 974 "bison_parser.y" + case 184: +#line 987 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 4181 "bison_parser.cpp" +#line 4184 "bison_parser.cpp" break; - case 180: /* case_expr: CASE expr case_list END */ -#line 980 "bison_parser.y" + case 185: +#line 993 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } -#line 4187 "bison_parser.cpp" +#line 4190 "bison_parser.cpp" break; - case 181: /* case_expr: CASE expr case_list ELSE expr END */ -#line 981 "bison_parser.y" + case 186: +#line 994 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4193 "bison_parser.cpp" +#line 4196 "bison_parser.cpp" break; - case 182: /* case_expr: CASE case_list END */ -#line 982 "bison_parser.y" + case 187: +#line 995 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } -#line 4199 "bison_parser.cpp" +#line 4202 "bison_parser.cpp" break; - case 183: /* case_expr: CASE case_list ELSE expr END */ -#line 983 "bison_parser.y" + case 188: +#line 996 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4205 "bison_parser.cpp" +#line 4208 "bison_parser.cpp" break; - case 184: /* case_list: WHEN expr THEN expr */ -#line 987 "bison_parser.y" + case 189: +#line 1000 "bison_parser.y" { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4211 "bison_parser.cpp" +#line 4214 "bison_parser.cpp" break; - case 185: /* case_list: case_list WHEN expr THEN expr */ -#line 988 "bison_parser.y" + case 190: +#line 1001 "bison_parser.y" { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4217 "bison_parser.cpp" +#line 4220 "bison_parser.cpp" break; - case 186: /* exists_expr: EXISTS '(' select_no_paren ')' */ -#line 992 "bison_parser.y" + case 191: +#line 1005 "bison_parser.y" { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 4223 "bison_parser.cpp" +#line 4226 "bison_parser.cpp" break; - case 187: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ -#line 993 "bison_parser.y" + case 192: +#line 1006 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 4229 "bison_parser.cpp" +#line 4232 "bison_parser.cpp" break; - case 188: /* comp_expr: operand '=' operand */ -#line 997 "bison_parser.y" + case 193: +#line 1010 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4235 "bison_parser.cpp" +#line 4238 "bison_parser.cpp" break; - case 189: /* comp_expr: operand EQUALS operand */ -#line 998 "bison_parser.y" + case 194: +#line 1011 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4241 "bison_parser.cpp" +#line 4244 "bison_parser.cpp" break; - case 190: /* comp_expr: operand NOTEQUALS operand */ -#line 999 "bison_parser.y" + case 195: +#line 1012 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 4247 "bison_parser.cpp" +#line 4250 "bison_parser.cpp" break; - case 191: /* comp_expr: operand '<' operand */ -#line 1000 "bison_parser.y" + case 196: +#line 1013 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 4253 "bison_parser.cpp" +#line 4256 "bison_parser.cpp" break; - case 192: /* comp_expr: operand '>' operand */ -#line 1001 "bison_parser.y" + case 197: +#line 1014 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 4259 "bison_parser.cpp" +#line 4262 "bison_parser.cpp" break; - case 193: /* comp_expr: operand LESSEQ operand */ -#line 1002 "bison_parser.y" + case 198: +#line 1015 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 4265 "bison_parser.cpp" +#line 4268 "bison_parser.cpp" break; - case 194: /* comp_expr: operand GREATEREQ operand */ -#line 1003 "bison_parser.y" + case 199: +#line 1016 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 4271 "bison_parser.cpp" +#line 4274 "bison_parser.cpp" break; - case 195: /* function_expr: IDENTIFIER '(' ')' */ -#line 1007 "bison_parser.y" + case 200: +#line 1020 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 4277 "bison_parser.cpp" +#line 4280 "bison_parser.cpp" break; - case 196: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ -#line 1008 "bison_parser.y" + case 201: +#line 1021 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 4283 "bison_parser.cpp" +#line 4286 "bison_parser.cpp" break; - case 197: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ -#line 1012 "bison_parser.y" + case 202: +#line 1025 "bison_parser.y" { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } -#line 4289 "bison_parser.cpp" +#line 4292 "bison_parser.cpp" break; - case 198: /* cast_expr: CAST '(' expr AS column_type ')' */ -#line 1016 "bison_parser.y" + case 203: +#line 1029 "bison_parser.y" { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } -#line 4295 "bison_parser.cpp" +#line 4298 "bison_parser.cpp" break; - case 199: /* datetime_field: SECOND */ -#line 1020 "bison_parser.y" + case 204: +#line 1033 "bison_parser.y" { (yyval.datetime_field) = kDatetimeSecond; } -#line 4301 "bison_parser.cpp" +#line 4304 "bison_parser.cpp" break; - case 200: /* datetime_field: MINUTE */ -#line 1021 "bison_parser.y" + case 205: +#line 1034 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMinute; } -#line 4307 "bison_parser.cpp" +#line 4310 "bison_parser.cpp" break; - case 201: /* datetime_field: HOUR */ -#line 1022 "bison_parser.y" + case 206: +#line 1035 "bison_parser.y" { (yyval.datetime_field) = kDatetimeHour; } -#line 4313 "bison_parser.cpp" +#line 4316 "bison_parser.cpp" break; - case 202: /* datetime_field: DAY */ -#line 1023 "bison_parser.y" + case 207: +#line 1036 "bison_parser.y" { (yyval.datetime_field) = kDatetimeDay; } -#line 4319 "bison_parser.cpp" +#line 4322 "bison_parser.cpp" break; - case 203: /* datetime_field: MONTH */ -#line 1024 "bison_parser.y" + case 208: +#line 1037 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMonth; } -#line 4325 "bison_parser.cpp" +#line 4328 "bison_parser.cpp" break; - case 204: /* datetime_field: YEAR */ -#line 1025 "bison_parser.y" + case 209: +#line 1038 "bison_parser.y" { (yyval.datetime_field) = kDatetimeYear; } -#line 4331 "bison_parser.cpp" +#line 4334 "bison_parser.cpp" break; - case 205: /* array_expr: ARRAY '[' expr_list ']' */ -#line 1029 "bison_parser.y" + case 210: +#line 1042 "bison_parser.y" { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 4337 "bison_parser.cpp" +#line 4340 "bison_parser.cpp" break; - case 206: /* array_index: operand '[' int_literal ']' */ -#line 1033 "bison_parser.y" + case 211: +#line 1046 "bison_parser.y" { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 4343 "bison_parser.cpp" +#line 4346 "bison_parser.cpp" break; - case 207: /* between_expr: operand BETWEEN operand AND operand */ -#line 1037 "bison_parser.y" + case 212: +#line 1050 "bison_parser.y" { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4349 "bison_parser.cpp" +#line 4352 "bison_parser.cpp" break; - case 208: /* column_name: IDENTIFIER */ -#line 1041 "bison_parser.y" + case 213: +#line 1054 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 4355 "bison_parser.cpp" +#line 4358 "bison_parser.cpp" break; - case 209: /* column_name: IDENTIFIER '.' IDENTIFIER */ -#line 1042 "bison_parser.y" + case 214: +#line 1055 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 4361 "bison_parser.cpp" +#line 4364 "bison_parser.cpp" break; - case 210: /* column_name: '*' */ -#line 1043 "bison_parser.y" + case 215: +#line 1056 "bison_parser.y" { (yyval.expr) = Expr::makeStar(); } -#line 4367 "bison_parser.cpp" +#line 4370 "bison_parser.cpp" break; - case 211: /* column_name: IDENTIFIER '.' '*' */ -#line 1044 "bison_parser.y" + case 216: +#line 1057 "bison_parser.y" { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 4373 "bison_parser.cpp" +#line 4376 "bison_parser.cpp" break; - case 217: /* string_literal: STRING */ -#line 1056 "bison_parser.y" + case 222: +#line 1069 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 4379 "bison_parser.cpp" +#line 4382 "bison_parser.cpp" break; - case 218: /* bool_literal: TRUE */ -#line 1060 "bison_parser.y" + case 223: +#line 1073 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(true); } -#line 4385 "bison_parser.cpp" +#line 4388 "bison_parser.cpp" break; - case 219: /* bool_literal: FALSE */ -#line 1061 "bison_parser.y" + case 224: +#line 1074 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(false); } -#line 4391 "bison_parser.cpp" +#line 4394 "bison_parser.cpp" break; - case 220: /* num_literal: FLOATVAL */ -#line 1065 "bison_parser.y" + case 225: +#line 1078 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 4397 "bison_parser.cpp" +#line 4400 "bison_parser.cpp" break; - case 222: /* int_literal: INTVAL */ -#line 1070 "bison_parser.y" + case 227: +#line 1083 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 4403 "bison_parser.cpp" +#line 4406 "bison_parser.cpp" break; - case 223: /* null_literal: NULL */ -#line 1074 "bison_parser.y" + case 228: +#line 1087 "bison_parser.y" { (yyval.expr) = Expr::makeNullLiteral(); } -#line 4409 "bison_parser.cpp" +#line 4412 "bison_parser.cpp" break; - case 224: /* param_expr: '?' */ -#line 1078 "bison_parser.y" + case 229: +#line 1091 "bison_parser.y" { (yyval.expr) = Expr::makeParameter(yylloc.total_column); (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 4419 "bison_parser.cpp" +#line 4422 "bison_parser.cpp" break; - case 226: /* table_ref: table_ref_commalist ',' table_ref_atomic */ -#line 1091 "bison_parser.y" + case 231: +#line 1104 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); auto tbl = new TableRef(kTableCrossProduct); tbl->list = (yyvsp[-2].table_vec); (yyval.table) = tbl; } -#line 4430 "bison_parser.cpp" +#line 4433 "bison_parser.cpp" break; - case 230: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ -#line 1107 "bison_parser.y" + case 235: +#line 1120 "bison_parser.y" { auto tbl = new TableRef(kTableSelect); tbl->select = (yyvsp[-2].select_stmt); tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4441 "bison_parser.cpp" +#line 4444 "bison_parser.cpp" break; - case 231: /* table_ref_commalist: table_ref_atomic */ -#line 1116 "bison_parser.y" + case 236: +#line 1129 "bison_parser.y" { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 4447 "bison_parser.cpp" +#line 4450 "bison_parser.cpp" break; - case 232: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ -#line 1117 "bison_parser.y" + case 237: +#line 1130 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 4453 "bison_parser.cpp" +#line 4456 "bison_parser.cpp" break; - case 233: /* table_ref_name: table_name opt_table_alias */ -#line 1122 "bison_parser.y" + case 238: +#line 1135 "bison_parser.y" { auto tbl = new TableRef(kTableName); tbl->schema = (yyvsp[-1].table_name).schema; @@ -4461,121 +4464,121 @@ YYLTYPE yylloc = yyloc_default; tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4465 "bison_parser.cpp" +#line 4468 "bison_parser.cpp" break; - case 234: /* table_ref_name_no_alias: table_name */ -#line 1133 "bison_parser.y" + case 239: +#line 1146 "bison_parser.y" { (yyval.table) = new TableRef(kTableName); (yyval.table)->schema = (yyvsp[0].table_name).schema; (yyval.table)->name = (yyvsp[0].table_name).name; } -#line 4475 "bison_parser.cpp" +#line 4478 "bison_parser.cpp" break; - case 235: /* table_name: IDENTIFIER */ -#line 1142 "bison_parser.y" + case 240: +#line 1155 "bison_parser.y" { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} -#line 4481 "bison_parser.cpp" +#line 4484 "bison_parser.cpp" break; - case 236: /* table_name: IDENTIFIER '.' IDENTIFIER */ -#line 1143 "bison_parser.y" + case 241: +#line 1156 "bison_parser.y" { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } -#line 4487 "bison_parser.cpp" +#line 4490 "bison_parser.cpp" break; - case 237: /* opt_index_name: IDENTIFIER */ -#line 1147 "bison_parser.y" + case 242: +#line 1160 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4493 "bison_parser.cpp" +#line 4496 "bison_parser.cpp" break; - case 238: /* opt_index_name: %empty */ -#line 1148 "bison_parser.y" + case 243: +#line 1161 "bison_parser.y" { (yyval.sval) = nullptr;} -#line 4499 "bison_parser.cpp" +#line 4502 "bison_parser.cpp" break; - case 239: /* index_name: IDENTIFIER */ -#line 1152 "bison_parser.y" + case 244: +#line 1165 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4505 "bison_parser.cpp" +#line 4508 "bison_parser.cpp" break; - case 241: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ -#line 1158 "bison_parser.y" + case 246: +#line 1171 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } -#line 4511 "bison_parser.cpp" +#line 4514 "bison_parser.cpp" break; - case 243: /* opt_table_alias: %empty */ -#line 1164 "bison_parser.y" + case 248: +#line 1177 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4517 "bison_parser.cpp" +#line 4520 "bison_parser.cpp" break; - case 244: /* alias: AS IDENTIFIER */ -#line 1169 "bison_parser.y" + case 249: +#line 1182 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4523 "bison_parser.cpp" +#line 4526 "bison_parser.cpp" break; - case 245: /* alias: IDENTIFIER */ -#line 1170 "bison_parser.y" + case 250: +#line 1183 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4529 "bison_parser.cpp" +#line 4532 "bison_parser.cpp" break; - case 247: /* opt_alias: %empty */ -#line 1176 "bison_parser.y" + case 252: +#line 1189 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4535 "bison_parser.cpp" +#line 4538 "bison_parser.cpp" break; - case 249: /* opt_with_clause: %empty */ -#line 1186 "bison_parser.y" + case 254: +#line 1199 "bison_parser.y" { (yyval.with_description_vec) = nullptr; } -#line 4541 "bison_parser.cpp" +#line 4544 "bison_parser.cpp" break; - case 250: /* with_clause: WITH with_description_list */ -#line 1190 "bison_parser.y" + case 255: +#line 1203 "bison_parser.y" { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } -#line 4547 "bison_parser.cpp" +#line 4550 "bison_parser.cpp" break; - case 251: /* with_description_list: with_description */ -#line 1194 "bison_parser.y" + case 256: +#line 1207 "bison_parser.y" { (yyval.with_description_vec) = new std::vector(); (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); } -#line 4556 "bison_parser.cpp" +#line 4559 "bison_parser.cpp" break; - case 252: /* with_description_list: with_description_list ',' with_description */ -#line 1198 "bison_parser.y" + case 257: +#line 1211 "bison_parser.y" { (yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t)); (yyval.with_description_vec) = (yyvsp[-2].with_description_vec); } -#line 4565 "bison_parser.cpp" +#line 4568 "bison_parser.cpp" break; - case 253: /* with_description: IDENTIFIER AS select_with_paren */ -#line 1205 "bison_parser.y" + case 258: +#line 1218 "bison_parser.y" { (yyval.with_description_t) = new WithDescription(); (yyval.with_description_t)->alias = (yyvsp[-2].sval); (yyval.with_description_t)->select = (yyvsp[0].select_stmt); } -#line 4575 "bison_parser.cpp" +#line 4578 "bison_parser.cpp" break; - case 254: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ -#line 1219 "bison_parser.y" + case 259: +#line 1232 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4583,11 +4586,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 4587 "bison_parser.cpp" +#line 4590 "bison_parser.cpp" break; - case 255: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ -#line 1227 "bison_parser.y" + case 260: +#line 1240 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4596,11 +4599,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 4600 "bison_parser.cpp" +#line 4603 "bison_parser.cpp" break; - case 256: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ -#line 1237 "bison_parser.y" + case 261: +#line 1250 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4616,83 +4619,83 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } -#line 4620 "bison_parser.cpp" +#line 4623 "bison_parser.cpp" break; - case 257: /* opt_join_type: INNER */ -#line 1255 "bison_parser.y" + case 262: +#line 1268 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4626 "bison_parser.cpp" +#line 4629 "bison_parser.cpp" break; - case 258: /* opt_join_type: LEFT OUTER */ -#line 1256 "bison_parser.y" + case 263: +#line 1269 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4632 "bison_parser.cpp" +#line 4635 "bison_parser.cpp" break; - case 259: /* opt_join_type: LEFT */ -#line 1257 "bison_parser.y" + case 264: +#line 1270 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4638 "bison_parser.cpp" +#line 4641 "bison_parser.cpp" break; - case 260: /* opt_join_type: RIGHT OUTER */ -#line 1258 "bison_parser.y" + case 265: +#line 1271 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4644 "bison_parser.cpp" +#line 4647 "bison_parser.cpp" break; - case 261: /* opt_join_type: RIGHT */ -#line 1259 "bison_parser.y" + case 266: +#line 1272 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4650 "bison_parser.cpp" +#line 4653 "bison_parser.cpp" break; - case 262: /* opt_join_type: FULL OUTER */ -#line 1260 "bison_parser.y" + case 267: +#line 1273 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4656 "bison_parser.cpp" +#line 4659 "bison_parser.cpp" break; - case 263: /* opt_join_type: OUTER */ -#line 1261 "bison_parser.y" + case 268: +#line 1274 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4662 "bison_parser.cpp" +#line 4665 "bison_parser.cpp" break; - case 264: /* opt_join_type: FULL */ -#line 1262 "bison_parser.y" + case 269: +#line 1275 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4668 "bison_parser.cpp" +#line 4671 "bison_parser.cpp" break; - case 265: /* opt_join_type: CROSS */ -#line 1263 "bison_parser.y" + case 270: +#line 1276 "bison_parser.y" { (yyval.uval) = kJoinCross; } -#line 4674 "bison_parser.cpp" +#line 4677 "bison_parser.cpp" break; - case 266: /* opt_join_type: %empty */ -#line 1264 "bison_parser.y" + case 271: +#line 1277 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4680 "bison_parser.cpp" +#line 4683 "bison_parser.cpp" break; - case 270: /* ident_commalist: IDENTIFIER */ -#line 1284 "bison_parser.y" + case 275: +#line 1297 "bison_parser.y" { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 4686 "bison_parser.cpp" +#line 4689 "bison_parser.cpp" break; - case 271: /* ident_commalist: ident_commalist ',' IDENTIFIER */ -#line 1285 "bison_parser.y" + case 276: +#line 1298 "bison_parser.y" { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 4692 "bison_parser.cpp" +#line 4695 "bison_parser.cpp" break; -#line 4696 "bison_parser.cpp" +#line 4699 "bison_parser.cpp" default: break; } @@ -4707,10 +4710,11 @@ YYLTYPE yylloc = yyloc_default; case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; + YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; *++yylsp = yyloc; @@ -4735,61 +4739,66 @@ YYLTYPE yylloc = yyloc_default; yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ - yytoken = yychar == SQL_HSQL_EMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; +#if ! YYERROR_VERBOSE + yyerror (&yylloc, result, scanner, YY_("syntax error")); +#else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) { - yypcontext_t yyctx - = {yyssp, yytoken, &yylloc}; char const *yymsgp = YY_("syntax error"); int yysyntax_error_status; - yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); + yysyntax_error_status = YYSYNTAX_ERROR; if (yysyntax_error_status == 0) yymsgp = yymsg; - else if (yysyntax_error_status == -1) + else if (yysyntax_error_status == 1) { if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); - yymsg = YY_CAST (char *, - YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); - if (yymsg) + yymsg = YY_CAST (char *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); + if (!yymsg) { - yysyntax_error_status - = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); - yymsgp = yymsg; + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = 2; } else { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = YYENOMEM; + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; } } yyerror (&yylloc, result, scanner, yymsgp); - if (yysyntax_error_status == YYENOMEM) + if (yysyntax_error_status == 2) goto yyexhaustedlab; } +# undef YYSYNTAX_ERROR +#endif } yyerror_range[1] = yylloc; + if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ - if (yychar <= SQL_YYEOF) + if (yychar <= YYEOF) { /* Return failure if at end of input. */ - if (yychar == SQL_YYEOF) + if (yychar == YYEOF) YYABORT; } else { yydestruct ("Error: discarding", yytoken, &yylval, &yylloc, result, scanner); - yychar = SQL_HSQL_EMPTY; + yychar = YYEMPTY; } } @@ -4822,14 +4831,13 @@ YYLTYPE yylloc = yyloc_default; yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ - /* Pop stack until we find a state that shifts the error token. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) { - yyn += YYSYMBOL_YYerror; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) @@ -4843,7 +4851,7 @@ YYLTYPE yylloc = yyloc_default; yyerror_range[1] = *yylsp; yydestruct ("Error: popping", - YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, result, scanner); + yystos[yystate], yyvsp, yylsp, result, scanner); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); @@ -4854,11 +4862,13 @@ YYLTYPE yylloc = yyloc_default; YY_IGNORE_MAYBE_UNINITIALIZED_END yyerror_range[2] = yylloc; - ++yylsp; - YYLLOC_DEFAULT (*yylsp, yyerror_range, 2); + /* Using YYLLOC is tempting, but would change the location of + the lookahead. YYLOC is available though. */ + YYLLOC_DEFAULT (yyloc, yyerror_range, 2); + *++yylsp = yyloc; /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; @@ -4880,22 +4890,22 @@ YYLTYPE yylloc = yyloc_default; goto yyreturn; -#if 1 +#if !defined yyoverflow || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (&yylloc, result, scanner, YY_("memory exhausted")); yyresult = 2; - goto yyreturn; + /* Fall through. */ #endif -/*-------------------------------------------------------. -| yyreturn -- parsing is finished, clean up and return. | -`-------------------------------------------------------*/ +/*-----------------------------------------------------. +| yyreturn -- parsing is finished, return the result. | +`-----------------------------------------------------*/ yyreturn: - if (yychar != SQL_HSQL_EMPTY) + if (yychar != YYEMPTY) { /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ @@ -4910,19 +4920,20 @@ YYLTYPE yylloc = yyloc_default; while (yyssp != yyss) { yydestruct ("Cleanup: popping", - YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, result, scanner); + yystos[+*yyssp], yyvsp, yylsp, result, scanner); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif +#if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); +#endif return yyresult; } - -#line 1288 "bison_parser.y" +#line 1301 "bison_parser.y" /********************************* ** Section 4: Additional C code diff --git a/src/parser/bison_parser.h b/src/parser/bison_parser.h index 73ced33a..3ac5ff03 100644 --- a/src/parser/bison_parser.h +++ b/src/parser/bison_parser.h @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.7.6. */ +/* A Bison parser, made by GNU Bison 3.5.1. */ /* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -31,9 +31,8 @@ This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ -/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, - especially those whose name start with YY_ or yy_. They are - private implementation details that can be changed or removed. */ +/* 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 @@ -77,172 +76,167 @@ extern int hsql_debug; } \ } -#line 81 "bison_parser.h" +#line 80 "bison_parser.h" -/* Token kinds. */ +/* Token type. */ #ifndef HSQL_TOKENTYPE # define HSQL_TOKENTYPE enum hsql_tokentype { - SQL_HSQL_EMPTY = -2, - SQL_YYEOF = 0, /* "end of file" */ - SQL_HSQL_error = 256, /* error */ - SQL_HSQL_UNDEF = 257, /* "invalid token" */ - SQL_IDENTIFIER = 258, /* IDENTIFIER */ - SQL_STRING = 259, /* STRING */ - SQL_FLOATVAL = 260, /* FLOATVAL */ - SQL_INTVAL = 261, /* INTVAL */ - SQL_DEALLOCATE = 262, /* DEALLOCATE */ - SQL_PARAMETERS = 263, /* PARAMETERS */ - SQL_INTERSECT = 264, /* INTERSECT */ - SQL_TEMPORARY = 265, /* TEMPORARY */ - SQL_TIMESTAMP = 266, /* TIMESTAMP */ - SQL_DISTINCT = 267, /* DISTINCT */ - SQL_NVARCHAR = 268, /* NVARCHAR */ - SQL_RESTRICT = 269, /* RESTRICT */ - SQL_TRUNCATE = 270, /* TRUNCATE */ - SQL_ANALYZE = 271, /* ANALYZE */ - SQL_BETWEEN = 272, /* BETWEEN */ - SQL_CASCADE = 273, /* CASCADE */ - SQL_COLUMNS = 274, /* COLUMNS */ - SQL_CONTROL = 275, /* CONTROL */ - SQL_DEFAULT = 276, /* DEFAULT */ - SQL_EXECUTE = 277, /* EXECUTE */ - SQL_EXPLAIN = 278, /* EXPLAIN */ - SQL_INTEGER = 279, /* INTEGER */ - SQL_NATURAL = 280, /* NATURAL */ - SQL_PREPARE = 281, /* PREPARE */ - SQL_PRIMARY = 282, /* PRIMARY */ - SQL_SCHEMAS = 283, /* SCHEMAS */ - SQL_CHARACTER = 284, /* CHARACTER */ - SQL_VARYING = 285, /* VARYING */ - SQL_REAL = 286, /* REAL */ - SQL_DECIMAL = 287, /* DECIMAL */ - SQL_SPATIAL = 288, /* SPATIAL */ - SQL_VARCHAR = 289, /* VARCHAR */ - SQL_VIRTUAL = 290, /* VIRTUAL */ - SQL_DESCRIBE = 291, /* DESCRIBE */ - SQL_BEFORE = 292, /* BEFORE */ - SQL_COLUMN = 293, /* COLUMN */ - SQL_CREATE = 294, /* CREATE */ - SQL_DELETE = 295, /* DELETE */ - SQL_DIRECT = 296, /* DIRECT */ - SQL_DOUBLE = 297, /* DOUBLE */ - SQL_ESCAPE = 298, /* ESCAPE */ - SQL_EXCEPT = 299, /* EXCEPT */ - SQL_EXISTS = 300, /* EXISTS */ - SQL_EXTRACT = 301, /* EXTRACT */ - SQL_CAST = 302, /* CAST */ - SQL_FORMAT = 303, /* FORMAT */ - SQL_GLOBAL = 304, /* GLOBAL */ - SQL_HAVING = 305, /* HAVING */ - SQL_IMPORT = 306, /* IMPORT */ - SQL_INSERT = 307, /* INSERT */ - SQL_ISNULL = 308, /* ISNULL */ - SQL_OFFSET = 309, /* OFFSET */ - SQL_RENAME = 310, /* RENAME */ - SQL_SCHEMA = 311, /* SCHEMA */ - SQL_SELECT = 312, /* SELECT */ - SQL_SORTED = 313, /* SORTED */ - SQL_TABLES = 314, /* TABLES */ - SQL_UNIQUE = 315, /* UNIQUE */ - SQL_UNLOAD = 316, /* UNLOAD */ - SQL_UPDATE = 317, /* UPDATE */ - SQL_VALUES = 318, /* VALUES */ - SQL_AFTER = 319, /* AFTER */ - SQL_ALTER = 320, /* ALTER */ - SQL_CROSS = 321, /* CROSS */ - SQL_DELTA = 322, /* DELTA */ - SQL_FLOAT = 323, /* FLOAT */ - SQL_GROUP = 324, /* GROUP */ - SQL_INDEX = 325, /* INDEX */ - SQL_INNER = 326, /* INNER */ - SQL_LIMIT = 327, /* LIMIT */ - SQL_LOCAL = 328, /* LOCAL */ - SQL_MERGE = 329, /* MERGE */ - SQL_MINUS = 330, /* MINUS */ - SQL_ORDER = 331, /* ORDER */ - SQL_OUTER = 332, /* OUTER */ - SQL_RIGHT = 333, /* RIGHT */ - SQL_TABLE = 334, /* TABLE */ - SQL_UNION = 335, /* UNION */ - SQL_USING = 336, /* USING */ - SQL_WHERE = 337, /* WHERE */ - SQL_CALL = 338, /* CALL */ - SQL_CASE = 339, /* CASE */ - SQL_CHAR = 340, /* CHAR */ - SQL_COPY = 341, /* COPY */ - SQL_DATE = 342, /* DATE */ - SQL_DATETIME = 343, /* DATETIME */ - SQL_DESC = 344, /* DESC */ - SQL_DROP = 345, /* DROP */ - SQL_ELSE = 346, /* ELSE */ - SQL_FILE = 347, /* FILE */ - SQL_FROM = 348, /* FROM */ - SQL_FULL = 349, /* FULL */ - SQL_HASH = 350, /* HASH */ - SQL_HINT = 351, /* HINT */ - SQL_INTO = 352, /* INTO */ - SQL_JOIN = 353, /* JOIN */ - SQL_LEFT = 354, /* LEFT */ - SQL_LIKE = 355, /* LIKE */ - SQL_LOAD = 356, /* LOAD */ - SQL_LONG = 357, /* LONG */ - SQL_NULL = 358, /* NULL */ - SQL_PLAN = 359, /* PLAN */ - SQL_SHOW = 360, /* SHOW */ - SQL_TEXT = 361, /* TEXT */ - SQL_THEN = 362, /* THEN */ - SQL_TIME = 363, /* TIME */ - SQL_VIEW = 364, /* VIEW */ - SQL_WHEN = 365, /* WHEN */ - SQL_WITH = 366, /* WITH */ - SQL_ADD = 367, /* ADD */ - SQL_ALL = 368, /* ALL */ - SQL_AND = 369, /* AND */ - SQL_ASC = 370, /* ASC */ - SQL_END = 371, /* END */ - SQL_FOR = 372, /* FOR */ - SQL_INT = 373, /* INT */ - SQL_KEY = 374, /* KEY */ - SQL_NOT = 375, /* NOT */ - SQL_OFF = 376, /* OFF */ - SQL_SET = 377, /* SET */ - SQL_TOP = 378, /* TOP */ - SQL_AS = 379, /* AS */ - SQL_BY = 380, /* BY */ - SQL_IF = 381, /* IF */ - SQL_IN = 382, /* IN */ - SQL_IS = 383, /* IS */ - SQL_OF = 384, /* OF */ - SQL_ON = 385, /* ON */ - SQL_OR = 386, /* OR */ - SQL_TO = 387, /* TO */ - SQL_ARRAY = 388, /* ARRAY */ - SQL_CONCAT = 389, /* CONCAT */ - SQL_ILIKE = 390, /* ILIKE */ - SQL_SECOND = 391, /* SECOND */ - SQL_MINUTE = 392, /* MINUTE */ - SQL_HOUR = 393, /* HOUR */ - SQL_DAY = 394, /* DAY */ - SQL_MONTH = 395, /* MONTH */ - SQL_YEAR = 396, /* YEAR */ - SQL_TRUE = 397, /* TRUE */ - SQL_FALSE = 398, /* FALSE */ - SQL_TRANSACTION = 399, /* TRANSACTION */ - SQL_BEGIN = 400, /* BEGIN */ - SQL_COMMIT = 401, /* COMMIT */ - SQL_ROLLBACK = 402, /* ROLLBACK */ - SQL_EQUALS = 403, /* EQUALS */ - SQL_NOTEQUALS = 404, /* NOTEQUALS */ - SQL_LESS = 405, /* LESS */ - SQL_GREATER = 406, /* GREATER */ - SQL_LESSEQ = 407, /* LESSEQ */ - SQL_GREATEREQ = 408, /* GREATEREQ */ - SQL_NOTNULL = 409, /* NOTNULL */ - SQL_UMINUS = 410 /* UMINUS */ + SQL_IDENTIFIER = 258, + SQL_STRING = 259, + SQL_FLOATVAL = 260, + SQL_INTVAL = 261, + SQL_DEALLOCATE = 262, + SQL_PARAMETERS = 263, + SQL_INTERSECT = 264, + SQL_TEMPORARY = 265, + SQL_TIMESTAMP = 266, + SQL_DISTINCT = 267, + SQL_NVARCHAR = 268, + SQL_RESTRICT = 269, + SQL_TRUNCATE = 270, + SQL_ANALYZE = 271, + SQL_BETWEEN = 272, + SQL_CASCADE = 273, + SQL_COLUMNS = 274, + SQL_CONTROL = 275, + SQL_DEFAULT = 276, + SQL_EXECUTE = 277, + SQL_EXPLAIN = 278, + SQL_INTEGER = 279, + SQL_NATURAL = 280, + SQL_PREPARE = 281, + SQL_PRIMARY = 282, + SQL_SCHEMAS = 283, + SQL_CHARACTER = 284, + SQL_VARYING = 285, + SQL_REAL = 286, + SQL_DECIMAL = 287, + SQL_SPATIAL = 288, + SQL_VARCHAR = 289, + SQL_VIRTUAL = 290, + SQL_DESCRIBE = 291, + SQL_BEFORE = 292, + SQL_COLUMN = 293, + SQL_CREATE = 294, + SQL_DELETE = 295, + SQL_DIRECT = 296, + SQL_DOUBLE = 297, + SQL_ESCAPE = 298, + SQL_EXCEPT = 299, + SQL_EXISTS = 300, + SQL_EXTRACT = 301, + SQL_CAST = 302, + SQL_FORMAT = 303, + SQL_GLOBAL = 304, + SQL_HAVING = 305, + SQL_IMPORT = 306, + SQL_INSERT = 307, + SQL_ISNULL = 308, + SQL_OFFSET = 309, + SQL_RENAME = 310, + SQL_SCHEMA = 311, + SQL_SELECT = 312, + SQL_SORTED = 313, + SQL_TABLES = 314, + SQL_UNIQUE = 315, + SQL_UNLOAD = 316, + SQL_UPDATE = 317, + SQL_VALUES = 318, + SQL_AFTER = 319, + SQL_ALTER = 320, + SQL_CROSS = 321, + SQL_DELTA = 322, + SQL_FLOAT = 323, + SQL_GROUP = 324, + SQL_INDEX = 325, + SQL_INNER = 326, + SQL_LIMIT = 327, + SQL_LOCAL = 328, + SQL_MERGE = 329, + SQL_MINUS = 330, + SQL_ORDER = 331, + SQL_OUTER = 332, + SQL_RIGHT = 333, + SQL_TABLE = 334, + SQL_UNION = 335, + SQL_USING = 336, + SQL_WHERE = 337, + SQL_CALL = 338, + SQL_CASE = 339, + SQL_CHAR = 340, + SQL_COPY = 341, + SQL_DATE = 342, + SQL_DATETIME = 343, + SQL_DESC = 344, + SQL_DROP = 345, + SQL_ELSE = 346, + SQL_FILE = 347, + SQL_FROM = 348, + SQL_FULL = 349, + SQL_HASH = 350, + SQL_HINT = 351, + SQL_INTO = 352, + SQL_JOIN = 353, + SQL_LEFT = 354, + SQL_LIKE = 355, + SQL_LOAD = 356, + SQL_LONG = 357, + SQL_NULL = 358, + SQL_PLAN = 359, + SQL_SHOW = 360, + SQL_TEXT = 361, + SQL_THEN = 362, + SQL_TIME = 363, + SQL_VIEW = 364, + SQL_WHEN = 365, + SQL_WITH = 366, + SQL_ADD = 367, + SQL_ALL = 368, + SQL_AND = 369, + SQL_ASC = 370, + SQL_END = 371, + SQL_FOR = 372, + SQL_INT = 373, + SQL_KEY = 374, + SQL_NOT = 375, + SQL_OFF = 376, + SQL_SET = 377, + SQL_TOP = 378, + SQL_AS = 379, + SQL_BY = 380, + SQL_IF = 381, + SQL_IN = 382, + SQL_IS = 383, + SQL_OF = 384, + SQL_ON = 385, + SQL_OR = 386, + SQL_TO = 387, + SQL_ARRAY = 388, + SQL_CONCAT = 389, + SQL_ILIKE = 390, + SQL_SECOND = 391, + SQL_MINUTE = 392, + SQL_HOUR = 393, + SQL_DAY = 394, + SQL_MONTH = 395, + SQL_YEAR = 396, + SQL_TRUE = 397, + SQL_FALSE = 398, + SQL_TRANSACTION = 399, + SQL_BEGIN = 400, + SQL_COMMIT = 401, + SQL_ROLLBACK = 402, + SQL_EQUALS = 403, + SQL_NOTEQUALS = 404, + SQL_LESS = 405, + SQL_GREATER = 406, + SQL_LESSEQ = 407, + SQL_GREATEREQ = 408, + SQL_NOTNULL = 409, + SQL_UMINUS = 410 }; - typedef enum hsql_tokentype hsql_token_kind_t; #endif /* Value type. */ @@ -280,6 +274,7 @@ union HSQL_STYPE hsql::DatetimeField datetime_field; hsql::LimitDescription* limit; hsql::ColumnDefinition* column_t; + hsql::TableKeyConstraint table_key_constraint_t; hsql::ColumnType column_type_t; hsql::ImportType import_type_t; hsql::GroupByDescription* group_t; @@ -296,8 +291,9 @@ union HSQL_STYPE std::vector* expr_vec; std::vector* order_vec; std::vector* with_description_vec; + std::vector table_key_constraint_vec; -#line 301 "bison_parser.h" +#line 297 "bison_parser.h" }; typedef union HSQL_STYPE HSQL_STYPE; diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 51cb585f..c7d1b10b 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -594,7 +594,7 @@ opt_table_key_constraints: | /* empty */ {$$ = new std::vector(); } ; -table_key_constaint: +table_key_constraint: ',' PRIMARY KEY '(' ident_commalist ')' { $$ = TableKeyConstraint{KeyType::PRIMARY_KEY, $5}; } | ',' UNIQUE '(' ident_commalist ')' { $$ = TableKeyConstraint{KeyType::UNIQUE, $4}; } /****************************** diff --git a/src/sql/CreateStatement.h b/src/sql/CreateStatement.h index 99509942..3098f515 100755 --- a/src/sql/CreateStatement.h +++ b/src/sql/CreateStatement.h @@ -10,15 +10,17 @@ namespace hsql { struct SelectStatement; + enum struct KeyType {PRIMARY_KEY, UNIQUE}; + // Represents definition of a key constraint - struct KeyConstraints { - KeyConstraints(char* keyType, std::unordered_set columnIDs); - virtual ~KeyConstraints(); + struct TableKeyConstraint { + + TableKeyConstraint(KeyType keyType, std::vector columnNames); - enum struct KeyType {PRIMARY_KEY, UNIQUE}; + virtual~TableKeyConstraint(); KeyType type; - std::unordered_set columnIDs; + std::vector columnNames; }; // Represents definition of a table column @@ -52,7 +54,7 @@ namespace hsql { char* indexName; // default: nullptr std::vector* indexColumns; std::vector* columns; // default: nullptr - std::vector* keyConstraints; // default: nullptr + std::vector* tableKeyConstraints; // default: nullptr std::vector* viewColumns; SelectStatement* select; }; diff --git a/src/sql/statements.cpp b/src/sql/statements.cpp index 1eac60a6..427ac55f 100755 --- a/src/sql/statements.cpp +++ b/src/sql/statements.cpp @@ -3,11 +3,14 @@ namespace hsql { // KeyConstraints - KeyConstraints::KeyConstraints(KeyType keyType, std::unordered_set columnIDs) : + TableKeyConstraint::TableKeyConstraint(KeyType keyType, std::vector columnNames) : type(keyType), - columnIDs(columnIDs) { }; + columnNames(columnNames) { }; + + TableKeyConstraint::~TableKeyConstraint() { + free(void *); + } - KeyConstraints::~KeyConstraints() { } // ColumnDefinition ColumnDefinition::ColumnDefinition(char* name, ColumnType type, bool nullable) : From e3c6c0e273b2847be7f76dccd612f6b2b6ba5c51 Mon Sep 17 00:00:00 2001 From: Jostafarr Date: Fri, 9 Jul 2021 13:51:27 +0200 Subject: [PATCH 19/73] refines the tablekeyconstraint implementation --- src/parser/bison_parser.cpp | 843 ++++++++++++++++++------------------ src/parser/bison_parser.h | 4 +- src/parser/bison_parser.y | 13 +- src/sql/CreateStatement.h | 6 +- src/sql/statements.cpp | 15 +- 5 files changed, 443 insertions(+), 438 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 34b834fe..3d1985ab 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -375,7 +375,7 @@ union HSQL_STYPE hsql::DatetimeField datetime_field; hsql::LimitDescription* limit; hsql::ColumnDefinition* column_t; - hsql::TableKeyConstraint table_key_constraint_t; + hsql::TableKeyConstraint* table_key_constraint_t; hsql::ColumnType column_type_t; hsql::ImportType import_type_t; hsql::GroupByDescription* group_t; @@ -392,7 +392,7 @@ union HSQL_STYPE std::vector* expr_vec; std::vector* order_vec; std::vector* with_description_vec; - std::vector table_key_constraint_vec; + std::vector* table_key_constraint_vec; #line 398 "bison_parser.cpp" @@ -805,30 +805,30 @@ static const yytype_int16 yyrline[] = 332, 333, 334, 335, 336, 337, 338, 339, 340, 349, 350, 355, 356, 360, 364, 376, 379, 382, 388, 389, 396, 403, 406, 410, 424, 430, 439, 456, 460, 463, - 472, 486, 489, 494, 508, 521, 528, 535, 542, 553, - 554, 558, 559, 563, 569, 570, 571, 572, 573, 574, - 575, 576, 577, 578, 579, 580, 581, 582, 586, 587, - 588, 592, 593, 594, 598, 599, 607, 613, 619, 624, - 632, 633, 642, 651, 664, 671, 682, 683, 693, 702, - 703, 707, 719, 723, 727, 741, 742, 745, 746, 757, - 758, 762, 772, 785, 792, 796, 800, 807, 810, 816, - 828, 829, 833, 837, 838, 842, 847, 848, 852, 857, - 861, 862, 866, 867, 871, 872, 876, 880, 881, 882, - 888, 889, 893, 894, 895, 896, 897, 898, 905, 906, - 910, 911, 915, 916, 920, 930, 931, 932, 933, 934, - 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, - 948, 952, 953, 957, 958, 959, 960, 961, 965, 966, - 967, 968, 969, 970, 971, 972, 973, 974, 975, 979, - 980, 984, 985, 986, 987, 993, 994, 995, 996, 1000, - 1001, 1005, 1006, 1010, 1011, 1012, 1013, 1014, 1015, 1016, - 1020, 1021, 1025, 1029, 1033, 1034, 1035, 1036, 1037, 1038, - 1042, 1046, 1050, 1054, 1055, 1056, 1057, 1061, 1062, 1063, - 1064, 1065, 1069, 1073, 1074, 1078, 1079, 1083, 1087, 1091, - 1103, 1104, 1114, 1115, 1119, 1120, 1129, 1130, 1135, 1146, - 1155, 1156, 1160, 1161, 1165, 1170, 1171, 1176, 1177, 1182, - 1183, 1188, 1189, 1198, 1199, 1203, 1207, 1211, 1218, 1231, - 1239, 1249, 1268, 1269, 1270, 1271, 1272, 1273, 1274, 1275, - 1276, 1277, 1282, 1291, 1292, 1297, 1298 + 472, 486, 489, 494, 508, 521, 529, 536, 543, 554, + 555, 559, 560, 564, 570, 571, 572, 573, 574, 575, + 576, 577, 578, 579, 580, 581, 582, 583, 587, 588, + 589, 593, 594, 595, 599, 600, 608, 614, 620, 625, + 633, 634, 643, 652, 665, 672, 683, 684, 694, 703, + 704, 708, 720, 724, 728, 742, 743, 746, 747, 758, + 759, 763, 773, 786, 793, 797, 801, 808, 811, 817, + 829, 830, 834, 838, 839, 843, 848, 849, 853, 858, + 862, 863, 867, 868, 872, 873, 877, 881, 882, 883, + 889, 890, 894, 895, 896, 897, 898, 899, 906, 907, + 911, 912, 916, 917, 921, 931, 932, 933, 934, 935, + 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, + 949, 953, 954, 958, 959, 960, 961, 962, 966, 967, + 968, 969, 970, 971, 972, 973, 974, 975, 976, 980, + 981, 985, 986, 987, 988, 994, 995, 996, 997, 1001, + 1002, 1006, 1007, 1011, 1012, 1013, 1014, 1015, 1016, 1017, + 1021, 1022, 1026, 1030, 1034, 1035, 1036, 1037, 1038, 1039, + 1043, 1047, 1051, 1055, 1056, 1057, 1058, 1062, 1063, 1064, + 1065, 1066, 1070, 1074, 1075, 1079, 1080, 1084, 1088, 1092, + 1104, 1105, 1115, 1116, 1120, 1121, 1130, 1131, 1136, 1147, + 1156, 1157, 1161, 1162, 1166, 1171, 1172, 1177, 1178, 1183, + 1184, 1189, 1190, 1199, 1200, 1204, 1208, 1212, 1219, 1232, + 1240, 1250, 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1276, + 1277, 1278, 1283, 1292, 1293, 1298, 1299 }; #endif @@ -3321,12 +3321,13 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->schema = (yyvsp[-4].table_name).schema; (yyval.create_stmt)->tableName = (yyvsp[-4].table_name).name; (yyval.create_stmt)->columns = (yyvsp[-2].column_vec); + (yyval.create_stmt)->tableKeyConstraints = (yyvsp[-1].table_key_constraint_vec); } -#line 3326 "bison_parser.cpp" +#line 3327 "bison_parser.cpp" break; case 46: -#line 528 "bison_parser.y" +#line 529 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-3].bval); @@ -3334,11 +3335,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-2].table_name).name; (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3338 "bison_parser.cpp" +#line 3339 "bison_parser.cpp" break; case 47: -#line 535 "bison_parser.y" +#line 536 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateIndex); (yyval.create_stmt)->indexName = (yyvsp[-6].sval); @@ -3346,11 +3347,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->indexColumns = (yyvsp[-1].str_vec); } -#line 3350 "bison_parser.cpp" +#line 3351 "bison_parser.cpp" break; case 48: -#line 542 "bison_parser.y" +#line 543 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateView); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -3359,250 +3360,250 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3363 "bison_parser.cpp" +#line 3364 "bison_parser.cpp" break; case 49: -#line 553 "bison_parser.y" +#line 554 "bison_parser.y" { (yyval.bval) = true; } -#line 3369 "bison_parser.cpp" +#line 3370 "bison_parser.cpp" break; case 50: -#line 554 "bison_parser.y" +#line 555 "bison_parser.y" { (yyval.bval) = false; } -#line 3375 "bison_parser.cpp" +#line 3376 "bison_parser.cpp" break; case 51: -#line 558 "bison_parser.y" +#line 559 "bison_parser.y" { (yyval.column_vec) = new std::vector(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); } -#line 3381 "bison_parser.cpp" +#line 3382 "bison_parser.cpp" break; case 52: -#line 559 "bison_parser.y" +#line 560 "bison_parser.y" { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } -#line 3387 "bison_parser.cpp" +#line 3388 "bison_parser.cpp" break; case 53: -#line 563 "bison_parser.y" +#line 564 "bison_parser.y" { (yyval.column_t) = new ColumnDefinition((yyvsp[-2].sval), (yyvsp[-1].column_type_t), (yyvsp[0].bval)); } -#line 3395 "bison_parser.cpp" +#line 3396 "bison_parser.cpp" break; case 54: -#line 569 "bison_parser.y" +#line 570 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3401 "bison_parser.cpp" +#line 3402 "bison_parser.cpp" break; case 55: -#line 570 "bison_parser.y" +#line 571 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3407 "bison_parser.cpp" +#line 3408 "bison_parser.cpp" break; case 56: -#line 571 "bison_parser.y" +#line 572 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::LONG}; } -#line 3413 "bison_parser.cpp" +#line 3414 "bison_parser.cpp" break; case 57: -#line 572 "bison_parser.y" +#line 573 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3419 "bison_parser.cpp" +#line 3420 "bison_parser.cpp" break; case 58: -#line 573 "bison_parser.y" +#line 574 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3425 "bison_parser.cpp" +#line 3426 "bison_parser.cpp" break; case 59: -#line 574 "bison_parser.y" +#line 575 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } -#line 3431 "bison_parser.cpp" +#line 3432 "bison_parser.cpp" break; case 60: -#line 575 "bison_parser.y" +#line 576 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3437 "bison_parser.cpp" +#line 3438 "bison_parser.cpp" break; case 61: -#line 576 "bison_parser.y" +#line 577 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3443 "bison_parser.cpp" +#line 3444 "bison_parser.cpp" break; case 62: -#line 577 "bison_parser.y" +#line 578 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3449 "bison_parser.cpp" +#line 3450 "bison_parser.cpp" break; case 63: -#line 578 "bison_parser.y" +#line 579 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } -#line 3455 "bison_parser.cpp" +#line 3456 "bison_parser.cpp" break; case 64: -#line 579 "bison_parser.y" +#line 580 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } -#line 3461 "bison_parser.cpp" +#line 3462 "bison_parser.cpp" break; case 65: -#line 580 "bison_parser.y" +#line 581 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TIME}; } -#line 3467 "bison_parser.cpp" +#line 3468 "bison_parser.cpp" break; case 66: -#line 581 "bison_parser.y" +#line 582 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } -#line 3473 "bison_parser.cpp" +#line 3474 "bison_parser.cpp" break; case 67: -#line 582 "bison_parser.y" +#line 583 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATE}; } -#line 3479 "bison_parser.cpp" +#line 3480 "bison_parser.cpp" break; case 68: -#line 586 "bison_parser.y" +#line 587 "bison_parser.y" { (yyval.bval) = true; } -#line 3485 "bison_parser.cpp" +#line 3486 "bison_parser.cpp" break; case 69: -#line 587 "bison_parser.y" +#line 588 "bison_parser.y" { (yyval.bval) = false; } -#line 3491 "bison_parser.cpp" +#line 3492 "bison_parser.cpp" break; case 70: -#line 588 "bison_parser.y" +#line 589 "bison_parser.y" { (yyval.bval) = false; } -#line 3497 "bison_parser.cpp" +#line 3498 "bison_parser.cpp" break; case 71: -#line 592 "bison_parser.y" - {(yyval.table_key_constraint_vec) = new std::vector(); (yyval.table_key_constraint_vec)->push_back((yyvsp[0].table_key_constraint_t)); } -#line 3503 "bison_parser.cpp" +#line 593 "bison_parser.y" + {(yyval.table_key_constraint_vec) = new std::vector(); (yyval.table_key_constraint_vec)->push_back((yyvsp[0].table_key_constraint_t)); } +#line 3504 "bison_parser.cpp" break; case 72: -#line 593 "bison_parser.y" +#line 594 "bison_parser.y" { (yyvsp[-1].table_key_constraint_vec)->push_back((yyvsp[0].table_key_constraint_t)); (yyval.table_key_constraint_vec) = (yyvsp[-1].table_key_constraint_vec); } -#line 3509 "bison_parser.cpp" +#line 3510 "bison_parser.cpp" break; case 73: -#line 594 "bison_parser.y" - {(yyval.table_key_constraint_vec) = new std::vector(); } -#line 3515 "bison_parser.cpp" +#line 595 "bison_parser.y" + {(yyval.table_key_constraint_vec) = new std::vector(); } +#line 3516 "bison_parser.cpp" break; case 74: -#line 598 "bison_parser.y" - { (yyval.table_key_constraint_t) = TableKeyConstraint{KeyType::PRIMARY_KEY, (yyvsp[-1].str_vec)}; } -#line 3521 "bison_parser.cpp" +#line 599 "bison_parser.y" + { (yyval.table_key_constraint_t) = new TableKeyConstraint(KeyType::PRIMARY_KEY, (yyvsp[-1].str_vec)); } +#line 3522 "bison_parser.cpp" break; case 75: -#line 599 "bison_parser.y" - { (yyval.table_key_constraint_t) = TableKeyConstraint{KeyType::UNIQUE, (yyvsp[-1].str_vec)}; } -#line 3527 "bison_parser.cpp" +#line 600 "bison_parser.y" + { (yyval.table_key_constraint_t) = new TableKeyConstraint(KeyType::UNIQUE, (yyvsp[-1].str_vec)); } +#line 3528 "bison_parser.cpp" break; case 76: -#line 607 "bison_parser.y" +#line 608 "bison_parser.y" { (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 3538 "bison_parser.cpp" +#line 3539 "bison_parser.cpp" break; case 77: -#line 613 "bison_parser.y" +#line 614 "bison_parser.y" { (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 3549 "bison_parser.cpp" +#line 3550 "bison_parser.cpp" break; case 78: -#line 619 "bison_parser.y" +#line 620 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); (yyval.drop_stmt)->ifExists = false; (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 3559 "bison_parser.cpp" +#line 3560 "bison_parser.cpp" break; case 79: -#line 624 "bison_parser.y" +#line 625 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropIndex); (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; (yyval.drop_stmt)->index_name = (yyvsp[-2].sval); } -#line 3569 "bison_parser.cpp" +#line 3570 "bison_parser.cpp" break; case 80: -#line 632 "bison_parser.y" +#line 633 "bison_parser.y" { (yyval.bval) = true; } -#line 3575 "bison_parser.cpp" +#line 3576 "bison_parser.cpp" break; case 81: -#line 633 "bison_parser.y" +#line 634 "bison_parser.y" { (yyval.bval) = false; } -#line 3581 "bison_parser.cpp" +#line 3582 "bison_parser.cpp" break; case 82: -#line 642 "bison_parser.y" +#line 643 "bison_parser.y" { (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 3592 "bison_parser.cpp" +#line 3593 "bison_parser.cpp" break; case 83: -#line 651 "bison_parser.y" +#line 652 "bison_parser.y" { (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3602 "bison_parser.cpp" +#line 3603 "bison_parser.cpp" break; case 84: -#line 664 "bison_parser.y" +#line 665 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertValues); (yyval.insert_stmt)->schema = (yyvsp[-5].table_name).schema; @@ -3610,11 +3611,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } -#line 3614 "bison_parser.cpp" +#line 3615 "bison_parser.cpp" break; case 85: -#line 671 "bison_parser.y" +#line 672 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertSelect); (yyval.insert_stmt)->schema = (yyvsp[-2].table_name).schema; @@ -3622,74 +3623,74 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } -#line 3626 "bison_parser.cpp" +#line 3627 "bison_parser.cpp" break; case 86: -#line 682 "bison_parser.y" +#line 683 "bison_parser.y" { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 3632 "bison_parser.cpp" +#line 3633 "bison_parser.cpp" break; case 87: -#line 683 "bison_parser.y" +#line 684 "bison_parser.y" { (yyval.str_vec) = nullptr; } -#line 3638 "bison_parser.cpp" +#line 3639 "bison_parser.cpp" break; case 88: -#line 693 "bison_parser.y" +#line 694 "bison_parser.y" { (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 3649 "bison_parser.cpp" +#line 3650 "bison_parser.cpp" break; case 89: -#line 702 "bison_parser.y" +#line 703 "bison_parser.y" { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 3655 "bison_parser.cpp" +#line 3656 "bison_parser.cpp" break; case 90: -#line 703 "bison_parser.y" +#line 704 "bison_parser.y" { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 3661 "bison_parser.cpp" +#line 3662 "bison_parser.cpp" break; case 91: -#line 707 "bison_parser.y" +#line 708 "bison_parser.y" { (yyval.update_t) = new UpdateClause(); (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 3671 "bison_parser.cpp" +#line 3672 "bison_parser.cpp" break; case 92: -#line 719 "bison_parser.y" +#line 720 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3680 "bison_parser.cpp" +#line 3681 "bison_parser.cpp" break; case 93: -#line 723 "bison_parser.y" +#line 724 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3689 "bison_parser.cpp" +#line 3690 "bison_parser.cpp" break; case 94: -#line 727 "bison_parser.y" +#line 728 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3701,17 +3702,17 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); (yyval.select_stmt)->withDescriptions = (yyvsp[-5].with_description_vec); } -#line 3705 "bison_parser.cpp" +#line 3706 "bison_parser.cpp" break; case 97: -#line 745 "bison_parser.y" +#line 746 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); } -#line 3711 "bison_parser.cpp" +#line 3712 "bison_parser.cpp" break; case 98: -#line 746 "bison_parser.y" +#line 747 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3720,23 +3721,23 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->push_back((yyvsp[-1].set_operator_t)); (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[0].select_stmt); } -#line 3724 "bison_parser.cpp" +#line 3725 "bison_parser.cpp" break; case 99: -#line 757 "bison_parser.y" +#line 758 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3730 "bison_parser.cpp" +#line 3731 "bison_parser.cpp" break; case 100: -#line 758 "bison_parser.y" +#line 759 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3736 "bison_parser.cpp" +#line 3737 "bison_parser.cpp" break; case 101: -#line 762 "bison_parser.y" +#line 763 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); (yyval.select_stmt)->order = (yyvsp[-1].order_vec); @@ -3747,11 +3748,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3751 "bison_parser.cpp" +#line 3752 "bison_parser.cpp" break; case 102: -#line 772 "bison_parser.y" +#line 773 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3762,63 +3763,63 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); } -#line 3766 "bison_parser.cpp" +#line 3767 "bison_parser.cpp" break; case 103: -#line 785 "bison_parser.y" +#line 786 "bison_parser.y" { (yyval.set_operator_t) = (yyvsp[-1].set_operator_t); (yyval.set_operator_t)->isAll = (yyvsp[0].bval); } -#line 3775 "bison_parser.cpp" +#line 3776 "bison_parser.cpp" break; case 104: -#line 792 "bison_parser.y" +#line 793 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetUnion; } -#line 3784 "bison_parser.cpp" +#line 3785 "bison_parser.cpp" break; case 105: -#line 796 "bison_parser.y" +#line 797 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetIntersect; } -#line 3793 "bison_parser.cpp" +#line 3794 "bison_parser.cpp" break; case 106: -#line 800 "bison_parser.y" +#line 801 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetExcept; } -#line 3802 "bison_parser.cpp" +#line 3803 "bison_parser.cpp" break; case 107: -#line 807 "bison_parser.y" +#line 808 "bison_parser.y" { (yyval.bval) = true; } -#line 3810 "bison_parser.cpp" +#line 3811 "bison_parser.cpp" break; case 108: -#line 810 "bison_parser.y" +#line 811 "bison_parser.y" { (yyval.bval) = false; } -#line 3818 "bison_parser.cpp" +#line 3819 "bison_parser.cpp" break; case 109: -#line 816 "bison_parser.y" +#line 817 "bison_parser.y" { (yyval.select_stmt) = new SelectStatement(); (yyval.select_stmt)->limit = (yyvsp[-5].limit); @@ -3828,213 +3829,213 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 3832 "bison_parser.cpp" +#line 3833 "bison_parser.cpp" break; case 110: -#line 828 "bison_parser.y" +#line 829 "bison_parser.y" { (yyval.bval) = true; } -#line 3838 "bison_parser.cpp" +#line 3839 "bison_parser.cpp" break; case 111: -#line 829 "bison_parser.y" +#line 830 "bison_parser.y" { (yyval.bval) = false; } -#line 3844 "bison_parser.cpp" +#line 3845 "bison_parser.cpp" break; case 113: -#line 837 "bison_parser.y" +#line 838 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 3850 "bison_parser.cpp" +#line 3851 "bison_parser.cpp" break; case 114: -#line 838 "bison_parser.y" +#line 839 "bison_parser.y" { (yyval.table) = nullptr; } -#line 3856 "bison_parser.cpp" +#line 3857 "bison_parser.cpp" break; case 115: -#line 842 "bison_parser.y" +#line 843 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 3862 "bison_parser.cpp" +#line 3863 "bison_parser.cpp" break; case 116: -#line 847 "bison_parser.y" +#line 848 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 3868 "bison_parser.cpp" +#line 3869 "bison_parser.cpp" break; case 117: -#line 848 "bison_parser.y" +#line 849 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 3874 "bison_parser.cpp" +#line 3875 "bison_parser.cpp" break; case 118: -#line 852 "bison_parser.y" +#line 853 "bison_parser.y" { (yyval.group_t) = new GroupByDescription(); (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 3884 "bison_parser.cpp" +#line 3885 "bison_parser.cpp" break; case 119: -#line 857 "bison_parser.y" +#line 858 "bison_parser.y" { (yyval.group_t) = nullptr; } -#line 3890 "bison_parser.cpp" +#line 3891 "bison_parser.cpp" break; case 120: -#line 861 "bison_parser.y" +#line 862 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 3896 "bison_parser.cpp" +#line 3897 "bison_parser.cpp" break; case 121: -#line 862 "bison_parser.y" +#line 863 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 3902 "bison_parser.cpp" +#line 3903 "bison_parser.cpp" break; case 122: -#line 866 "bison_parser.y" +#line 867 "bison_parser.y" { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 3908 "bison_parser.cpp" +#line 3909 "bison_parser.cpp" break; case 123: -#line 867 "bison_parser.y" +#line 868 "bison_parser.y" { (yyval.order_vec) = nullptr; } -#line 3914 "bison_parser.cpp" +#line 3915 "bison_parser.cpp" break; case 124: -#line 871 "bison_parser.y" +#line 872 "bison_parser.y" { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 3920 "bison_parser.cpp" +#line 3921 "bison_parser.cpp" break; case 125: -#line 872 "bison_parser.y" +#line 873 "bison_parser.y" { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 3926 "bison_parser.cpp" +#line 3927 "bison_parser.cpp" break; case 126: -#line 876 "bison_parser.y" +#line 877 "bison_parser.y" { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 3932 "bison_parser.cpp" +#line 3933 "bison_parser.cpp" break; case 127: -#line 880 "bison_parser.y" +#line 881 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 3938 "bison_parser.cpp" +#line 3939 "bison_parser.cpp" break; case 128: -#line 881 "bison_parser.y" +#line 882 "bison_parser.y" { (yyval.order_type) = kOrderDesc; } -#line 3944 "bison_parser.cpp" +#line 3945 "bison_parser.cpp" break; case 129: -#line 882 "bison_parser.y" +#line 883 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 3950 "bison_parser.cpp" +#line 3951 "bison_parser.cpp" break; case 130: -#line 888 "bison_parser.y" +#line 889 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 3956 "bison_parser.cpp" +#line 3957 "bison_parser.cpp" break; case 131: -#line 889 "bison_parser.y" +#line 890 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 3962 "bison_parser.cpp" +#line 3963 "bison_parser.cpp" break; case 132: -#line 893 "bison_parser.y" +#line 894 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 3968 "bison_parser.cpp" +#line 3969 "bison_parser.cpp" break; case 133: -#line 894 "bison_parser.y" +#line 895 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 3974 "bison_parser.cpp" +#line 3975 "bison_parser.cpp" break; case 134: -#line 895 "bison_parser.y" +#line 896 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 3980 "bison_parser.cpp" +#line 3981 "bison_parser.cpp" break; case 135: -#line 896 "bison_parser.y" +#line 897 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, nullptr); } -#line 3986 "bison_parser.cpp" +#line 3987 "bison_parser.cpp" break; case 136: -#line 897 "bison_parser.y" +#line 898 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 3992 "bison_parser.cpp" +#line 3993 "bison_parser.cpp" break; case 137: -#line 898 "bison_parser.y" +#line 899 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 3998 "bison_parser.cpp" +#line 3999 "bison_parser.cpp" break; case 138: -#line 905 "bison_parser.y" +#line 906 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4004 "bison_parser.cpp" +#line 4005 "bison_parser.cpp" break; case 139: -#line 906 "bison_parser.y" +#line 907 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4010 "bison_parser.cpp" +#line 4011 "bison_parser.cpp" break; case 140: -#line 910 "bison_parser.y" +#line 911 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[0].expr_vec); } -#line 4016 "bison_parser.cpp" +#line 4017 "bison_parser.cpp" break; case 141: -#line 911 "bison_parser.y" +#line 912 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 4022 "bison_parser.cpp" +#line 4023 "bison_parser.cpp" break; case 142: -#line 915 "bison_parser.y" +#line 916 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4028 "bison_parser.cpp" +#line 4029 "bison_parser.cpp" break; case 143: -#line 916 "bison_parser.y" +#line 917 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4034 "bison_parser.cpp" +#line 4035 "bison_parser.cpp" break; case 144: -#line 920 "bison_parser.y" +#line 921 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); if ((yyvsp[0].alias_t)) { @@ -4042,421 +4043,421 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].alias_t); } } -#line 4046 "bison_parser.cpp" +#line 4047 "bison_parser.cpp" break; case 150: -#line 938 "bison_parser.y" +#line 939 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); } -#line 4052 "bison_parser.cpp" +#line 4053 "bison_parser.cpp" break; case 160: -#line 948 "bison_parser.y" +#line 949 "bison_parser.y" { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 4058 "bison_parser.cpp" +#line 4059 "bison_parser.cpp" break; case 163: -#line 957 "bison_parser.y" +#line 958 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 4064 "bison_parser.cpp" +#line 4065 "bison_parser.cpp" break; case 164: -#line 958 "bison_parser.y" +#line 959 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 4070 "bison_parser.cpp" +#line 4071 "bison_parser.cpp" break; case 165: -#line 959 "bison_parser.y" +#line 960 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 4076 "bison_parser.cpp" +#line 4077 "bison_parser.cpp" break; case 166: -#line 960 "bison_parser.y" +#line 961 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 4082 "bison_parser.cpp" +#line 4083 "bison_parser.cpp" break; case 167: -#line 961 "bison_parser.y" +#line 962 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 4088 "bison_parser.cpp" +#line 4089 "bison_parser.cpp" break; case 169: -#line 966 "bison_parser.y" +#line 967 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 4094 "bison_parser.cpp" +#line 4095 "bison_parser.cpp" break; case 170: -#line 967 "bison_parser.y" +#line 968 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 4100 "bison_parser.cpp" +#line 4101 "bison_parser.cpp" break; case 171: -#line 968 "bison_parser.y" +#line 969 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 4106 "bison_parser.cpp" +#line 4107 "bison_parser.cpp" break; case 172: -#line 969 "bison_parser.y" +#line 970 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 4112 "bison_parser.cpp" +#line 4113 "bison_parser.cpp" break; case 173: -#line 970 "bison_parser.y" +#line 971 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 4118 "bison_parser.cpp" +#line 4119 "bison_parser.cpp" break; case 174: -#line 971 "bison_parser.y" +#line 972 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 4124 "bison_parser.cpp" +#line 4125 "bison_parser.cpp" break; case 175: -#line 972 "bison_parser.y" +#line 973 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 4130 "bison_parser.cpp" +#line 4131 "bison_parser.cpp" break; case 176: -#line 973 "bison_parser.y" +#line 974 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 4136 "bison_parser.cpp" +#line 4137 "bison_parser.cpp" break; case 177: -#line 974 "bison_parser.y" +#line 975 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 4142 "bison_parser.cpp" +#line 4143 "bison_parser.cpp" break; case 178: -#line 975 "bison_parser.y" +#line 976 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 4148 "bison_parser.cpp" +#line 4149 "bison_parser.cpp" break; case 179: -#line 979 "bison_parser.y" +#line 980 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 4154 "bison_parser.cpp" +#line 4155 "bison_parser.cpp" break; case 180: -#line 980 "bison_parser.y" +#line 981 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 4160 "bison_parser.cpp" +#line 4161 "bison_parser.cpp" break; case 181: -#line 984 "bison_parser.y" +#line 985 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 4166 "bison_parser.cpp" +#line 4167 "bison_parser.cpp" break; case 182: -#line 985 "bison_parser.y" +#line 986 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 4172 "bison_parser.cpp" +#line 4173 "bison_parser.cpp" break; case 183: -#line 986 "bison_parser.y" +#line 987 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 4178 "bison_parser.cpp" +#line 4179 "bison_parser.cpp" break; case 184: -#line 987 "bison_parser.y" +#line 988 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 4184 "bison_parser.cpp" +#line 4185 "bison_parser.cpp" break; case 185: -#line 993 "bison_parser.y" +#line 994 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } -#line 4190 "bison_parser.cpp" +#line 4191 "bison_parser.cpp" break; case 186: -#line 994 "bison_parser.y" +#line 995 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4196 "bison_parser.cpp" +#line 4197 "bison_parser.cpp" break; case 187: -#line 995 "bison_parser.y" +#line 996 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } -#line 4202 "bison_parser.cpp" +#line 4203 "bison_parser.cpp" break; case 188: -#line 996 "bison_parser.y" +#line 997 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4208 "bison_parser.cpp" +#line 4209 "bison_parser.cpp" break; case 189: -#line 1000 "bison_parser.y" +#line 1001 "bison_parser.y" { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4214 "bison_parser.cpp" +#line 4215 "bison_parser.cpp" break; case 190: -#line 1001 "bison_parser.y" +#line 1002 "bison_parser.y" { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4220 "bison_parser.cpp" +#line 4221 "bison_parser.cpp" break; case 191: -#line 1005 "bison_parser.y" +#line 1006 "bison_parser.y" { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 4226 "bison_parser.cpp" +#line 4227 "bison_parser.cpp" break; case 192: -#line 1006 "bison_parser.y" +#line 1007 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 4232 "bison_parser.cpp" +#line 4233 "bison_parser.cpp" break; case 193: -#line 1010 "bison_parser.y" +#line 1011 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4238 "bison_parser.cpp" +#line 4239 "bison_parser.cpp" break; case 194: -#line 1011 "bison_parser.y" +#line 1012 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4244 "bison_parser.cpp" +#line 4245 "bison_parser.cpp" break; case 195: -#line 1012 "bison_parser.y" +#line 1013 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 4250 "bison_parser.cpp" +#line 4251 "bison_parser.cpp" break; case 196: -#line 1013 "bison_parser.y" +#line 1014 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 4256 "bison_parser.cpp" +#line 4257 "bison_parser.cpp" break; case 197: -#line 1014 "bison_parser.y" +#line 1015 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 4262 "bison_parser.cpp" +#line 4263 "bison_parser.cpp" break; case 198: -#line 1015 "bison_parser.y" +#line 1016 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 4268 "bison_parser.cpp" +#line 4269 "bison_parser.cpp" break; case 199: -#line 1016 "bison_parser.y" +#line 1017 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 4274 "bison_parser.cpp" +#line 4275 "bison_parser.cpp" break; case 200: -#line 1020 "bison_parser.y" +#line 1021 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 4280 "bison_parser.cpp" +#line 4281 "bison_parser.cpp" break; case 201: -#line 1021 "bison_parser.y" +#line 1022 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 4286 "bison_parser.cpp" +#line 4287 "bison_parser.cpp" break; case 202: -#line 1025 "bison_parser.y" +#line 1026 "bison_parser.y" { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } -#line 4292 "bison_parser.cpp" +#line 4293 "bison_parser.cpp" break; case 203: -#line 1029 "bison_parser.y" +#line 1030 "bison_parser.y" { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } -#line 4298 "bison_parser.cpp" +#line 4299 "bison_parser.cpp" break; case 204: -#line 1033 "bison_parser.y" +#line 1034 "bison_parser.y" { (yyval.datetime_field) = kDatetimeSecond; } -#line 4304 "bison_parser.cpp" +#line 4305 "bison_parser.cpp" break; case 205: -#line 1034 "bison_parser.y" +#line 1035 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMinute; } -#line 4310 "bison_parser.cpp" +#line 4311 "bison_parser.cpp" break; case 206: -#line 1035 "bison_parser.y" +#line 1036 "bison_parser.y" { (yyval.datetime_field) = kDatetimeHour; } -#line 4316 "bison_parser.cpp" +#line 4317 "bison_parser.cpp" break; case 207: -#line 1036 "bison_parser.y" +#line 1037 "bison_parser.y" { (yyval.datetime_field) = kDatetimeDay; } -#line 4322 "bison_parser.cpp" +#line 4323 "bison_parser.cpp" break; case 208: -#line 1037 "bison_parser.y" +#line 1038 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMonth; } -#line 4328 "bison_parser.cpp" +#line 4329 "bison_parser.cpp" break; case 209: -#line 1038 "bison_parser.y" +#line 1039 "bison_parser.y" { (yyval.datetime_field) = kDatetimeYear; } -#line 4334 "bison_parser.cpp" +#line 4335 "bison_parser.cpp" break; case 210: -#line 1042 "bison_parser.y" +#line 1043 "bison_parser.y" { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 4340 "bison_parser.cpp" +#line 4341 "bison_parser.cpp" break; case 211: -#line 1046 "bison_parser.y" +#line 1047 "bison_parser.y" { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 4346 "bison_parser.cpp" +#line 4347 "bison_parser.cpp" break; case 212: -#line 1050 "bison_parser.y" +#line 1051 "bison_parser.y" { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4352 "bison_parser.cpp" +#line 4353 "bison_parser.cpp" break; case 213: -#line 1054 "bison_parser.y" +#line 1055 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 4358 "bison_parser.cpp" +#line 4359 "bison_parser.cpp" break; case 214: -#line 1055 "bison_parser.y" +#line 1056 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 4364 "bison_parser.cpp" +#line 4365 "bison_parser.cpp" break; case 215: -#line 1056 "bison_parser.y" +#line 1057 "bison_parser.y" { (yyval.expr) = Expr::makeStar(); } -#line 4370 "bison_parser.cpp" +#line 4371 "bison_parser.cpp" break; case 216: -#line 1057 "bison_parser.y" +#line 1058 "bison_parser.y" { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 4376 "bison_parser.cpp" +#line 4377 "bison_parser.cpp" break; case 222: -#line 1069 "bison_parser.y" +#line 1070 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 4382 "bison_parser.cpp" +#line 4383 "bison_parser.cpp" break; case 223: -#line 1073 "bison_parser.y" +#line 1074 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(true); } -#line 4388 "bison_parser.cpp" +#line 4389 "bison_parser.cpp" break; case 224: -#line 1074 "bison_parser.y" +#line 1075 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(false); } -#line 4394 "bison_parser.cpp" +#line 4395 "bison_parser.cpp" break; case 225: -#line 1078 "bison_parser.y" +#line 1079 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 4400 "bison_parser.cpp" +#line 4401 "bison_parser.cpp" break; case 227: -#line 1083 "bison_parser.y" +#line 1084 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 4406 "bison_parser.cpp" +#line 4407 "bison_parser.cpp" break; case 228: -#line 1087 "bison_parser.y" +#line 1088 "bison_parser.y" { (yyval.expr) = Expr::makeNullLiteral(); } -#line 4412 "bison_parser.cpp" +#line 4413 "bison_parser.cpp" break; case 229: -#line 1091 "bison_parser.y" +#line 1092 "bison_parser.y" { (yyval.expr) = Expr::makeParameter(yylloc.total_column); (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 4422 "bison_parser.cpp" +#line 4423 "bison_parser.cpp" break; case 231: -#line 1104 "bison_parser.y" +#line 1105 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); auto tbl = new TableRef(kTableCrossProduct); tbl->list = (yyvsp[-2].table_vec); (yyval.table) = tbl; } -#line 4433 "bison_parser.cpp" +#line 4434 "bison_parser.cpp" break; case 235: -#line 1120 "bison_parser.y" +#line 1121 "bison_parser.y" { auto tbl = new TableRef(kTableSelect); tbl->select = (yyvsp[-2].select_stmt); tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4444 "bison_parser.cpp" +#line 4445 "bison_parser.cpp" break; case 236: -#line 1129 "bison_parser.y" +#line 1130 "bison_parser.y" { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 4450 "bison_parser.cpp" +#line 4451 "bison_parser.cpp" break; case 237: -#line 1130 "bison_parser.y" +#line 1131 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 4456 "bison_parser.cpp" +#line 4457 "bison_parser.cpp" break; case 238: -#line 1135 "bison_parser.y" +#line 1136 "bison_parser.y" { auto tbl = new TableRef(kTableName); tbl->schema = (yyvsp[-1].table_name).schema; @@ -4464,121 +4465,121 @@ YYLTYPE yylloc = yyloc_default; tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4468 "bison_parser.cpp" +#line 4469 "bison_parser.cpp" break; case 239: -#line 1146 "bison_parser.y" +#line 1147 "bison_parser.y" { (yyval.table) = new TableRef(kTableName); (yyval.table)->schema = (yyvsp[0].table_name).schema; (yyval.table)->name = (yyvsp[0].table_name).name; } -#line 4478 "bison_parser.cpp" +#line 4479 "bison_parser.cpp" break; case 240: -#line 1155 "bison_parser.y" +#line 1156 "bison_parser.y" { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} -#line 4484 "bison_parser.cpp" +#line 4485 "bison_parser.cpp" break; case 241: -#line 1156 "bison_parser.y" +#line 1157 "bison_parser.y" { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } -#line 4490 "bison_parser.cpp" +#line 4491 "bison_parser.cpp" break; case 242: -#line 1160 "bison_parser.y" +#line 1161 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4496 "bison_parser.cpp" +#line 4497 "bison_parser.cpp" break; case 243: -#line 1161 "bison_parser.y" +#line 1162 "bison_parser.y" { (yyval.sval) = nullptr;} -#line 4502 "bison_parser.cpp" +#line 4503 "bison_parser.cpp" break; case 244: -#line 1165 "bison_parser.y" +#line 1166 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4508 "bison_parser.cpp" +#line 4509 "bison_parser.cpp" break; case 246: -#line 1171 "bison_parser.y" +#line 1172 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } -#line 4514 "bison_parser.cpp" +#line 4515 "bison_parser.cpp" break; case 248: -#line 1177 "bison_parser.y" +#line 1178 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4520 "bison_parser.cpp" +#line 4521 "bison_parser.cpp" break; case 249: -#line 1182 "bison_parser.y" +#line 1183 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4526 "bison_parser.cpp" +#line 4527 "bison_parser.cpp" break; case 250: -#line 1183 "bison_parser.y" +#line 1184 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4532 "bison_parser.cpp" +#line 4533 "bison_parser.cpp" break; case 252: -#line 1189 "bison_parser.y" +#line 1190 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4538 "bison_parser.cpp" +#line 4539 "bison_parser.cpp" break; case 254: -#line 1199 "bison_parser.y" +#line 1200 "bison_parser.y" { (yyval.with_description_vec) = nullptr; } -#line 4544 "bison_parser.cpp" +#line 4545 "bison_parser.cpp" break; case 255: -#line 1203 "bison_parser.y" +#line 1204 "bison_parser.y" { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } -#line 4550 "bison_parser.cpp" +#line 4551 "bison_parser.cpp" break; case 256: -#line 1207 "bison_parser.y" +#line 1208 "bison_parser.y" { (yyval.with_description_vec) = new std::vector(); (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); } -#line 4559 "bison_parser.cpp" +#line 4560 "bison_parser.cpp" break; case 257: -#line 1211 "bison_parser.y" +#line 1212 "bison_parser.y" { (yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t)); (yyval.with_description_vec) = (yyvsp[-2].with_description_vec); } -#line 4568 "bison_parser.cpp" +#line 4569 "bison_parser.cpp" break; case 258: -#line 1218 "bison_parser.y" +#line 1219 "bison_parser.y" { (yyval.with_description_t) = new WithDescription(); (yyval.with_description_t)->alias = (yyvsp[-2].sval); (yyval.with_description_t)->select = (yyvsp[0].select_stmt); } -#line 4578 "bison_parser.cpp" +#line 4579 "bison_parser.cpp" break; case 259: -#line 1232 "bison_parser.y" +#line 1233 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4586,11 +4587,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 4590 "bison_parser.cpp" +#line 4591 "bison_parser.cpp" break; case 260: -#line 1240 "bison_parser.y" +#line 1241 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4599,11 +4600,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 4603 "bison_parser.cpp" +#line 4604 "bison_parser.cpp" break; case 261: -#line 1250 "bison_parser.y" +#line 1251 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4619,83 +4620,83 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } -#line 4623 "bison_parser.cpp" +#line 4624 "bison_parser.cpp" break; case 262: -#line 1268 "bison_parser.y" +#line 1269 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4629 "bison_parser.cpp" +#line 4630 "bison_parser.cpp" break; case 263: -#line 1269 "bison_parser.y" +#line 1270 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4635 "bison_parser.cpp" +#line 4636 "bison_parser.cpp" break; case 264: -#line 1270 "bison_parser.y" +#line 1271 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4641 "bison_parser.cpp" +#line 4642 "bison_parser.cpp" break; case 265: -#line 1271 "bison_parser.y" +#line 1272 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4647 "bison_parser.cpp" +#line 4648 "bison_parser.cpp" break; case 266: -#line 1272 "bison_parser.y" +#line 1273 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4653 "bison_parser.cpp" +#line 4654 "bison_parser.cpp" break; case 267: -#line 1273 "bison_parser.y" +#line 1274 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4659 "bison_parser.cpp" +#line 4660 "bison_parser.cpp" break; case 268: -#line 1274 "bison_parser.y" +#line 1275 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4665 "bison_parser.cpp" +#line 4666 "bison_parser.cpp" break; case 269: -#line 1275 "bison_parser.y" +#line 1276 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4671 "bison_parser.cpp" +#line 4672 "bison_parser.cpp" break; case 270: -#line 1276 "bison_parser.y" +#line 1277 "bison_parser.y" { (yyval.uval) = kJoinCross; } -#line 4677 "bison_parser.cpp" +#line 4678 "bison_parser.cpp" break; case 271: -#line 1277 "bison_parser.y" +#line 1278 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4683 "bison_parser.cpp" +#line 4684 "bison_parser.cpp" break; case 275: -#line 1297 "bison_parser.y" +#line 1298 "bison_parser.y" { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 4689 "bison_parser.cpp" +#line 4690 "bison_parser.cpp" break; case 276: -#line 1298 "bison_parser.y" +#line 1299 "bison_parser.y" { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 4695 "bison_parser.cpp" +#line 4696 "bison_parser.cpp" break; -#line 4699 "bison_parser.cpp" +#line 4700 "bison_parser.cpp" default: break; } @@ -4933,7 +4934,7 @@ YYLTYPE yylloc = yyloc_default; #endif return yyresult; } -#line 1301 "bison_parser.y" +#line 1302 "bison_parser.y" /********************************* ** Section 4: Additional C code diff --git a/src/parser/bison_parser.h b/src/parser/bison_parser.h index 3ac5ff03..4bd97e05 100644 --- a/src/parser/bison_parser.h +++ b/src/parser/bison_parser.h @@ -274,7 +274,7 @@ union HSQL_STYPE hsql::DatetimeField datetime_field; hsql::LimitDescription* limit; hsql::ColumnDefinition* column_t; - hsql::TableKeyConstraint table_key_constraint_t; + hsql::TableKeyConstraint* table_key_constraint_t; hsql::ColumnType column_type_t; hsql::ImportType import_type_t; hsql::GroupByDescription* group_t; @@ -291,7 +291,7 @@ union HSQL_STYPE std::vector* expr_vec; std::vector* order_vec; std::vector* with_description_vec; - std::vector table_key_constraint_vec; + std::vector* table_key_constraint_vec; #line 297 "bison_parser.h" diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index c7d1b10b..8fd082f9 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -122,7 +122,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha hsql::DatetimeField datetime_field; hsql::LimitDescription* limit; hsql::ColumnDefinition* column_t; - hsql::TableKeyConstraint table_key_constraint_t; + hsql::TableKeyConstraint* table_key_constraint_t; hsql::ColumnType column_type_t; hsql::ImportType import_type_t; hsql::GroupByDescription* group_t; @@ -139,7 +139,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha std::vector* expr_vec; std::vector* order_vec; std::vector* with_description_vec; - std::vector table_key_constraint_vec; + std::vector* table_key_constraint_vec; } @@ -524,6 +524,7 @@ create_statement: $$->schema = $4.schema; $$->tableName = $4.name; $$->columns = $6; + $$->tableKeyConstraints = $7; } | CREATE TABLE opt_not_exists table_name AS select_statement { $$ = new CreateStatement(kCreateTable); @@ -589,14 +590,14 @@ opt_column_nullable: ; opt_table_key_constraints: - table_key_constraint {$$ = new std::vector(); $$->push_back($1); } + table_key_constraint {$$ = new std::vector(); $$->push_back($1); } | opt_table_key_constraints table_key_constraint { $1->push_back($2); $$ = $1; } - | /* empty */ {$$ = new std::vector(); } + | /* empty */ {$$ = new std::vector(); } ; table_key_constraint: - ',' PRIMARY KEY '(' ident_commalist ')' { $$ = TableKeyConstraint{KeyType::PRIMARY_KEY, $5}; } - | ',' UNIQUE '(' ident_commalist ')' { $$ = TableKeyConstraint{KeyType::UNIQUE, $4}; } + ',' PRIMARY KEY '(' ident_commalist ')' { $$ = new TableKeyConstraint(KeyType::PRIMARY_KEY, $5); } + | ',' UNIQUE '(' ident_commalist ')' { $$ = new TableKeyConstraint(KeyType::UNIQUE, $4); } /****************************** * Drop Statement * DROP TABLE students; diff --git a/src/sql/CreateStatement.h b/src/sql/CreateStatement.h index 3098f515..983c6fb4 100755 --- a/src/sql/CreateStatement.h +++ b/src/sql/CreateStatement.h @@ -15,12 +15,12 @@ namespace hsql { // Represents definition of a key constraint struct TableKeyConstraint { - TableKeyConstraint(KeyType keyType, std::vector columnNames); + TableKeyConstraint(KeyType keyType, std::vector* columnNames); virtual~TableKeyConstraint(); KeyType type; - std::vector columnNames; + std::vector* columnNames; }; // Represents definition of a table column @@ -54,7 +54,7 @@ namespace hsql { char* indexName; // default: nullptr std::vector* indexColumns; std::vector* columns; // default: nullptr - std::vector* tableKeyConstraints; // default: nullptr + std::vector* tableKeyConstraints; // default: nullptr std::vector* viewColumns; SelectStatement* select; }; diff --git a/src/sql/statements.cpp b/src/sql/statements.cpp index 427ac55f..dd8ccd13 100755 --- a/src/sql/statements.cpp +++ b/src/sql/statements.cpp @@ -3,12 +3,15 @@ namespace hsql { // KeyConstraints - TableKeyConstraint::TableKeyConstraint(KeyType keyType, std::vector columnNames) : + TableKeyConstraint::TableKeyConstraint(KeyType keyType, std::vector* columnNames) : type(keyType), columnNames(columnNames) { }; TableKeyConstraint::~TableKeyConstraint() { - free(void *); + for (char* def : *columnNames) { + delete def; + } + delete columnNames; } @@ -96,7 +99,7 @@ namespace hsql { schema(nullptr), tableName(nullptr), columns(nullptr), - keyConstraints(nullptr), + tableKeyConstraints(nullptr), viewColumns(nullptr), select(nullptr) {}; @@ -113,11 +116,11 @@ namespace hsql { delete columns; } - if (keyConstraints != nullptr) { - for (Keyconstraints* def : *keyConstraints) { + if (tableKeyConstraints != nullptr) { + for (TableKeyConstraint* def : *tableKeyConstraints) { delete def; } - delete keyConstraints; + delete tableKeyConstraints; } if (viewColumns != nullptr) { From 79a263a9d44e44218c29f3bfa4cb2782c498b34d Mon Sep 17 00:00:00 2001 From: Jostafarr Date: Tue, 6 Jul 2021 10:31:20 +0200 Subject: [PATCH 20/73] adds keyconstraint functionality --- src/sql/CreateStatement.h | 4 ++++ src/sql/statements.cpp | 13 ++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/sql/CreateStatement.h b/src/sql/CreateStatement.h index 983c6fb4..0d552ae5 100755 --- a/src/sql/CreateStatement.h +++ b/src/sql/CreateStatement.h @@ -54,7 +54,11 @@ namespace hsql { char* indexName; // default: nullptr std::vector* indexColumns; std::vector* columns; // default: nullptr +<<<<<<< HEAD std::vector* tableKeyConstraints; // default: nullptr +======= + std::vector* keyConstraints; // default: nullptr +>>>>>>> adds keyconstraint functionality std::vector* viewColumns; SelectStatement* select; }; diff --git a/src/sql/statements.cpp b/src/sql/statements.cpp index dd8ccd13..6135da0d 100755 --- a/src/sql/statements.cpp +++ b/src/sql/statements.cpp @@ -14,7 +14,6 @@ namespace hsql { delete columnNames; } - // ColumnDefinition ColumnDefinition::ColumnDefinition(char* name, ColumnType type, bool nullable) : name(name), @@ -99,7 +98,11 @@ namespace hsql { schema(nullptr), tableName(nullptr), columns(nullptr), +<<<<<<< HEAD tableKeyConstraints(nullptr), +======= + keyConstraints(nullptr), +>>>>>>> adds keyconstraint functionality viewColumns(nullptr), select(nullptr) {}; @@ -116,11 +119,19 @@ namespace hsql { delete columns; } +<<<<<<< HEAD if (tableKeyConstraints != nullptr) { for (TableKeyConstraint* def : *tableKeyConstraints) { delete def; } delete tableKeyConstraints; +======= + if (keyConstraints != nullptr) { + for (Keyconstraints* def : *keyConstraints) { + delete def; + } + delete keyConstraints; +>>>>>>> adds keyconstraint functionality } if (viewColumns != nullptr) { From 4f2ce05d85de0c79e7335f7d37bbaa3fc9aa1e7f Mon Sep 17 00:00:00 2001 From: Jostafarr Date: Tue, 6 Jul 2021 11:39:49 +0200 Subject: [PATCH 21/73] added tablekeyconstraint to parser --- src/parser/bison_parser.y | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 8fd082f9..b64da465 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -122,7 +122,11 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha hsql::DatetimeField datetime_field; hsql::LimitDescription* limit; hsql::ColumnDefinition* column_t; +<<<<<<< HEAD hsql::TableKeyConstraint* table_key_constraint_t; +======= + hsql::TableKeyConstraint table_key_constraint_t; +>>>>>>> added tablekeyconstraint to parser hsql::ColumnType column_type_t; hsql::ImportType import_type_t; hsql::GroupByDescription* group_t; @@ -590,6 +594,7 @@ opt_column_nullable: ; opt_table_key_constraints: +<<<<<<< HEAD table_key_constraint {$$ = new std::vector(); $$->push_back($1); } | opt_table_key_constraints table_key_constraint { $1->push_back($2); $$ = $1; } | /* empty */ {$$ = new std::vector(); } @@ -598,6 +603,16 @@ opt_table_key_constraints: table_key_constraint: ',' PRIMARY KEY '(' ident_commalist ')' { $$ = new TableKeyConstraint(KeyType::PRIMARY_KEY, $5); } | ',' UNIQUE '(' ident_commalist ')' { $$ = new TableKeyConstraint(KeyType::UNIQUE, $4); } +======= + table_key_constraint {$$ = new std::vector(); $$->push_back($1); } + | opt_table_key_constraints table_key_constraint { $1->push_back($2); $$ = $1; } + | /* empty */ {$$ = new std::vector(); } + ; + +table_key_constaint: + ',' PRIMARY KEY '(' ident_commalist ')' { $$ = TableKeyConstraint{KeyType::PRIMARY_KEY, $5}; } + | ',' UNIQUE '(' ident_commalist ')' { $$ = TableKeyConstraint{KeyType::UNIQUE, $4}; } +>>>>>>> added tablekeyconstraint to parser /****************************** * Drop Statement * DROP TABLE students; From c26be120c08f3d10a082956534c3b8f2ea1d1c1f Mon Sep 17 00:00:00 2001 From: Jostafarr Date: Tue, 6 Jul 2021 12:32:26 +0200 Subject: [PATCH 22/73] WIP --- src/parser/bison_parser.cpp | 1420 ++++++++++++++++++++++++++++++++++- src/parser/bison_parser.h | 8 + src/parser/bison_parser.y | 2 +- src/sql/CreateStatement.h | 5 - src/sql/statements.cpp | 12 - 5 files changed, 1409 insertions(+), 38 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 3d1985ab..84325a9a 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -343,6 +343,7 @@ extern int hsql_debug; /* Value type. */ #if ! defined HSQL_STYPE && ! defined HSQL_STYPE_IS_DECLARED union HSQL_STYPE +<<<<<<< HEAD { #line 95 "bison_parser.y" @@ -412,11 +413,89 @@ struct HSQL_LTYPE int last_line; int last_column; }; +======= +{ +#line 95 "bison_parser.y" + + double fval; + int64_t ival; + char* sval; + uintmax_t uval; + bool bval; + + hsql::SQLStatement* statement; + hsql::SelectStatement* select_stmt; + hsql::ImportStatement* import_stmt; + hsql::ExportStatement* export_stmt; + hsql::CreateStatement* create_stmt; + hsql::InsertStatement* insert_stmt; + hsql::DeleteStatement* delete_stmt; + hsql::UpdateStatement* update_stmt; + hsql::DropStatement* drop_stmt; + hsql::PrepareStatement* prep_stmt; + hsql::ExecuteStatement* exec_stmt; + hsql::ShowStatement* show_stmt; + hsql::TransactionStatement* transaction_stmt; + + hsql::TableName table_name; + hsql::TableRef* table; + hsql::Expr* expr; + hsql::OrderDescription* order; + hsql::OrderType order_type; + hsql::WithDescription* with_description_t; + hsql::DatetimeField datetime_field; + hsql::LimitDescription* limit; + hsql::ColumnDefinition* column_t; + hsql::TableKeyConstraint table_key_constraint_t; + hsql::ColumnType column_type_t; + hsql::ImportType import_type_t; + hsql::GroupByDescription* group_t; + hsql::UpdateClause* update_t; + hsql::Alias* alias_t; + hsql::SetOperation* set_operator_t; + + std::vector* stmt_vec; + + std::vector* str_vec; + std::vector* table_vec; + std::vector* column_vec; + std::vector* update_vec; + std::vector* expr_vec; + std::vector* order_vec; + std::vector* with_description_vec; + std::vector table_key_constraint_vec; + +#line 398 "bison_parser.cpp" + +}; +typedef union HSQL_STYPE HSQL_STYPE; +# define HSQL_STYPE_IS_TRIVIAL 1 +# define HSQL_STYPE_IS_DECLARED 1 +#endif + +/* Location type. */ +#if ! defined HSQL_LTYPE && ! defined HSQL_LTYPE_IS_DECLARED +typedef struct HSQL_LTYPE HSQL_LTYPE; +struct HSQL_LTYPE +{ + int first_line; + int first_column; + int last_line; + int last_column; +}; +>>>>>>> WIP # define HSQL_LTYPE_IS_DECLARED 1 # define HSQL_LTYPE_IS_TRIVIAL 1 #endif +<<<<<<< HEAD +======= + +int hsql_parse (hsql::SQLParserResult* result, yyscan_t scanner); +>>>>>>> WIP + +#endif /* !YY_HSQL_BISON_PARSER_H_INCLUDED */ int hsql_parse (hsql::SQLParserResult* result, yyscan_t scanner); @@ -805,6 +884,7 @@ static const yytype_int16 yyrline[] = 332, 333, 334, 335, 336, 337, 338, 339, 340, 349, 350, 355, 356, 360, 364, 376, 379, 382, 388, 389, 396, 403, 406, 410, 424, 430, 439, 456, 460, 463, +<<<<<<< HEAD 472, 486, 489, 494, 508, 521, 529, 536, 543, 554, 555, 559, 560, 564, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 587, 588, @@ -829,6 +909,32 @@ static const yytype_int16 yyrline[] = 1184, 1189, 1190, 1199, 1200, 1204, 1208, 1212, 1219, 1232, 1240, 1250, 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1283, 1292, 1293, 1298, 1299 +======= + 472, 486, 489, 494, 508, 521, 528, 535, 542, 553, + 554, 558, 559, 563, 569, 570, 571, 572, 573, 574, + 575, 576, 577, 578, 579, 580, 581, 582, 586, 587, + 588, 592, 593, 594, 598, 599, 607, 613, 619, 624, + 632, 633, 642, 651, 664, 671, 682, 683, 693, 702, + 703, 707, 719, 723, 727, 741, 742, 745, 746, 757, + 758, 762, 772, 785, 792, 796, 800, 807, 810, 816, + 828, 829, 833, 837, 838, 842, 847, 848, 852, 857, + 861, 862, 866, 867, 871, 872, 876, 880, 881, 882, + 888, 889, 893, 894, 895, 896, 897, 898, 905, 906, + 910, 911, 915, 916, 920, 930, 931, 932, 933, 934, + 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, + 948, 952, 953, 957, 958, 959, 960, 961, 965, 966, + 967, 968, 969, 970, 971, 972, 973, 974, 975, 979, + 980, 984, 985, 986, 987, 993, 994, 995, 996, 1000, + 1001, 1005, 1006, 1010, 1011, 1012, 1013, 1014, 1015, 1016, + 1020, 1021, 1025, 1029, 1033, 1034, 1035, 1036, 1037, 1038, + 1042, 1046, 1050, 1054, 1055, 1056, 1057, 1061, 1062, 1063, + 1064, 1065, 1069, 1073, 1074, 1078, 1079, 1083, 1087, 1091, + 1103, 1104, 1114, 1115, 1119, 1120, 1129, 1130, 1135, 1146, + 1155, 1156, 1160, 1161, 1165, 1170, 1171, 1176, 1177, 1182, + 1183, 1188, 1189, 1198, 1199, 1203, 1207, 1211, 1218, 1231, + 1239, 1249, 1268, 1269, 1270, 1271, 1272, 1273, 1274, 1275, + 1276, 1277, 1282, 1291, 1292, 1297, 1298 +>>>>>>> WIP }; #endif @@ -2072,6 +2178,22 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio #line 149 "bison_parser.y" { } #line 2075 "bison_parser.cpp" +<<<<<<< HEAD + break; + + case 198: /* opt_table_key_constraints */ +#line 160 "bison_parser.y" + { delete (((*yyvaluep).table_key_constraint_vec)); } +#line 2081 "bison_parser.cpp" + break; + + case 199: /* table_key_constraint */ +#line 160 "bison_parser.y" + { delete (((*yyvaluep).table_key_constraint_t)); } +#line 2087 "bison_parser.cpp" + break; + +======= break; case 198: /* opt_table_key_constraints */ @@ -2086,6 +2208,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio #line 2087 "bison_parser.cpp" break; +>>>>>>> WIP case 200: /* drop_statement */ #line 160 "bison_parser.y" { delete (((*yyvaluep).drop_stmt)); } @@ -3321,6 +3444,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->schema = (yyvsp[-4].table_name).schema; (yyval.create_stmt)->tableName = (yyvsp[-4].table_name).name; (yyval.create_stmt)->columns = (yyvsp[-2].column_vec); +<<<<<<< HEAD (yyval.create_stmt)->tableKeyConstraints = (yyvsp[-1].table_key_constraint_vec); } #line 3327 "bison_parser.cpp" @@ -3328,6 +3452,14 @@ YYLTYPE yylloc = yyloc_default; case 46: #line 529 "bison_parser.y" +======= + } +#line 3326 "bison_parser.cpp" + break; + + case 46: +#line 528 "bison_parser.y" +>>>>>>> WIP { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-3].bval); @@ -3335,11 +3467,19 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-2].table_name).name; (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } +<<<<<<< HEAD #line 3339 "bison_parser.cpp" break; case 47: #line 536 "bison_parser.y" +======= +#line 3338 "bison_parser.cpp" + break; + + case 47: +#line 535 "bison_parser.y" +>>>>>>> WIP { (yyval.create_stmt) = new CreateStatement(kCreateIndex); (yyval.create_stmt)->indexName = (yyvsp[-6].sval); @@ -3347,11 +3487,19 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->indexColumns = (yyvsp[-1].str_vec); } +<<<<<<< HEAD #line 3351 "bison_parser.cpp" break; case 48: #line 543 "bison_parser.y" +======= +#line 3350 "bison_parser.cpp" + break; + + case 48: +#line 542 "bison_parser.y" +>>>>>>> WIP { (yyval.create_stmt) = new CreateStatement(kCreateView); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -3360,6 +3508,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } +<<<<<<< HEAD #line 3364 "bison_parser.cpp" break; @@ -3529,43 +3678,239 @@ YYLTYPE yylloc = yyloc_default; case 76: #line 608 "bison_parser.y" +======= +#line 3363 "bison_parser.cpp" + break; + + case 49: +#line 553 "bison_parser.y" + { (yyval.bval) = true; } +#line 3369 "bison_parser.cpp" + break; + + case 50: +#line 554 "bison_parser.y" + { (yyval.bval) = false; } +#line 3375 "bison_parser.cpp" + break; + + case 51: +#line 558 "bison_parser.y" + { (yyval.column_vec) = new std::vector(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); } +#line 3381 "bison_parser.cpp" + break; + + case 52: +#line 559 "bison_parser.y" + { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } +#line 3387 "bison_parser.cpp" + break; + + case 53: +#line 563 "bison_parser.y" + { + (yyval.column_t) = new ColumnDefinition((yyvsp[-2].sval), (yyvsp[-1].column_type_t), (yyvsp[0].bval)); + } +#line 3395 "bison_parser.cpp" + break; + + case 54: +#line 569 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::INT}; } +#line 3401 "bison_parser.cpp" + break; + + case 55: +#line 570 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::INT}; } +#line 3407 "bison_parser.cpp" + break; + + case 56: +#line 571 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::LONG}; } +#line 3413 "bison_parser.cpp" + break; + + case 57: +#line 572 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } +#line 3419 "bison_parser.cpp" + break; + + case 58: +#line 573 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } +#line 3425 "bison_parser.cpp" + break; + + case 59: +#line 574 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } +#line 3431 "bison_parser.cpp" + break; + + case 60: +#line 575 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } +#line 3437 "bison_parser.cpp" + break; + + case 61: +#line 576 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } +#line 3443 "bison_parser.cpp" + break; + + case 62: +#line 577 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } +#line 3449 "bison_parser.cpp" + break; + + case 63: +#line 578 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } +#line 3455 "bison_parser.cpp" + break; + + case 64: +#line 579 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } +#line 3461 "bison_parser.cpp" + break; + + case 65: +#line 580 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::TIME}; } +#line 3467 "bison_parser.cpp" + break; + + case 66: +#line 581 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } +#line 3473 "bison_parser.cpp" + break; + + case 67: +#line 582 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::DATE}; } +#line 3479 "bison_parser.cpp" + break; + + case 68: +#line 586 "bison_parser.y" + { (yyval.bval) = true; } +#line 3485 "bison_parser.cpp" + break; + + case 69: +#line 587 "bison_parser.y" + { (yyval.bval) = false; } +#line 3491 "bison_parser.cpp" + break; + + case 70: +#line 588 "bison_parser.y" + { (yyval.bval) = false; } +#line 3497 "bison_parser.cpp" + break; + + case 71: +#line 592 "bison_parser.y" + {(yyval.table_key_constraint_vec) = new std::vector(); (yyval.table_key_constraint_vec)->push_back((yyvsp[0].table_key_constraint_t)); } +#line 3503 "bison_parser.cpp" + break; + + case 72: +#line 593 "bison_parser.y" + { (yyvsp[-1].table_key_constraint_vec)->push_back((yyvsp[0].table_key_constraint_t)); (yyval.table_key_constraint_vec) = (yyvsp[-1].table_key_constraint_vec); } +#line 3509 "bison_parser.cpp" + break; + + case 73: +#line 594 "bison_parser.y" + {(yyval.table_key_constraint_vec) = new std::vector(); } +#line 3515 "bison_parser.cpp" + break; + + case 74: +#line 598 "bison_parser.y" + { (yyval.table_key_constraint_t) = TableKeyConstraint{KeyType::PRIMARY_KEY, (yyvsp[-1].str_vec)}; } +#line 3521 "bison_parser.cpp" + break; + + case 75: +#line 599 "bison_parser.y" + { (yyval.table_key_constraint_t) = TableKeyConstraint{KeyType::UNIQUE, (yyvsp[-1].str_vec)}; } +#line 3527 "bison_parser.cpp" + break; + + case 76: +#line 607 "bison_parser.y" +>>>>>>> WIP { (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; } +<<<<<<< HEAD #line 3539 "bison_parser.cpp" break; case 77: #line 614 "bison_parser.y" +======= +#line 3538 "bison_parser.cpp" + break; + + case 77: +#line 613 "bison_parser.y" +>>>>>>> WIP { (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; } +<<<<<<< HEAD #line 3550 "bison_parser.cpp" break; case 78: #line 620 "bison_parser.y" +======= +#line 3549 "bison_parser.cpp" + break; + + case 78: +#line 619 "bison_parser.y" +>>>>>>> WIP { (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); (yyval.drop_stmt)->ifExists = false; (yyval.drop_stmt)->name = (yyvsp[0].sval); } +<<<<<<< HEAD #line 3560 "bison_parser.cpp" break; case 79: #line 625 "bison_parser.y" +======= +#line 3559 "bison_parser.cpp" + break; + + case 79: +#line 624 "bison_parser.y" +>>>>>>> WIP { (yyval.drop_stmt) = new DropStatement(kDropIndex); (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; (yyval.drop_stmt)->index_name = (yyvsp[-2].sval); } +<<<<<<< HEAD #line 3570 "bison_parser.cpp" break; @@ -3583,27 +3928,62 @@ YYLTYPE yylloc = yyloc_default; case 82: #line 643 "bison_parser.y" +======= +#line 3569 "bison_parser.cpp" + break; + + case 80: +#line 632 "bison_parser.y" + { (yyval.bval) = true; } +#line 3575 "bison_parser.cpp" + break; + + case 81: +#line 633 "bison_parser.y" + { (yyval.bval) = false; } +#line 3581 "bison_parser.cpp" + break; + + case 82: +#line 642 "bison_parser.y" +>>>>>>> WIP { (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); } +<<<<<<< HEAD #line 3593 "bison_parser.cpp" break; case 83: #line 652 "bison_parser.y" +======= +#line 3592 "bison_parser.cpp" + break; + + case 83: +#line 651 "bison_parser.y" +>>>>>>> WIP { (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; } +<<<<<<< HEAD #line 3603 "bison_parser.cpp" break; case 84: #line 665 "bison_parser.y" +======= +#line 3602 "bison_parser.cpp" + break; + + case 84: +#line 664 "bison_parser.y" +>>>>>>> WIP { (yyval.insert_stmt) = new InsertStatement(kInsertValues); (yyval.insert_stmt)->schema = (yyvsp[-5].table_name).schema; @@ -3611,11 +3991,19 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } +<<<<<<< HEAD #line 3615 "bison_parser.cpp" break; case 85: #line 672 "bison_parser.y" +======= +#line 3614 "bison_parser.cpp" + break; + + case 85: +#line 671 "bison_parser.y" +>>>>>>> WIP { (yyval.insert_stmt) = new InsertStatement(kInsertSelect); (yyval.insert_stmt)->schema = (yyvsp[-2].table_name).schema; @@ -3623,6 +4011,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } +<<<<<<< HEAD #line 3627 "bison_parser.cpp" break; @@ -3640,12 +4029,32 @@ YYLTYPE yylloc = yyloc_default; case 88: #line 694 "bison_parser.y" - { - (yyval.update_stmt) = new UpdateStatement(); +======= +#line 3626 "bison_parser.cpp" + break; + + case 86: +#line 682 "bison_parser.y" + { (yyval.str_vec) = (yyvsp[-1].str_vec); } +#line 3632 "bison_parser.cpp" + break; + + case 87: +#line 683 "bison_parser.y" + { (yyval.str_vec) = nullptr; } +#line 3638 "bison_parser.cpp" + break; + + case 88: +#line 693 "bison_parser.y" +>>>>>>> WIP + { + (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); } +<<<<<<< HEAD #line 3650 "bison_parser.cpp" break; @@ -3663,34 +4072,77 @@ YYLTYPE yylloc = yyloc_default; case 91: #line 708 "bison_parser.y" +======= +#line 3649 "bison_parser.cpp" + break; + + case 89: +#line 702 "bison_parser.y" + { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } +#line 3655 "bison_parser.cpp" + break; + + case 90: +#line 703 "bison_parser.y" + { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } +#line 3661 "bison_parser.cpp" + break; + + case 91: +#line 707 "bison_parser.y" +>>>>>>> WIP { (yyval.update_t) = new UpdateClause(); (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } +<<<<<<< HEAD #line 3672 "bison_parser.cpp" break; case 92: #line 720 "bison_parser.y" +======= +#line 3671 "bison_parser.cpp" + break; + + case 92: +#line 719 "bison_parser.y" +>>>>>>> WIP { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } +<<<<<<< HEAD #line 3681 "bison_parser.cpp" break; case 93: #line 724 "bison_parser.y" +======= +#line 3680 "bison_parser.cpp" + break; + + case 93: +#line 723 "bison_parser.y" +>>>>>>> WIP { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } +<<<<<<< HEAD #line 3690 "bison_parser.cpp" break; case 94: #line 728 "bison_parser.y" +======= +#line 3689 "bison_parser.cpp" + break; + + case 94: +#line 727 "bison_parser.y" +>>>>>>> WIP { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3702,6 +4154,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); (yyval.select_stmt)->withDescriptions = (yyvsp[-5].with_description_vec); } +<<<<<<< HEAD #line 3706 "bison_parser.cpp" break; @@ -3713,6 +4166,19 @@ YYLTYPE yylloc = yyloc_default; case 98: #line 747 "bison_parser.y" +======= +#line 3705 "bison_parser.cpp" + break; + + case 97: +#line 745 "bison_parser.y" + { (yyval.select_stmt) = (yyvsp[0].select_stmt); } +#line 3711 "bison_parser.cpp" + break; + + case 98: +#line 746 "bison_parser.y" +>>>>>>> WIP { (yyval.select_stmt) = (yyvsp[-2].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3721,6 +4187,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->push_back((yyvsp[-1].set_operator_t)); (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[0].select_stmt); } +<<<<<<< HEAD #line 3725 "bison_parser.cpp" break; @@ -3738,6 +4205,25 @@ YYLTYPE yylloc = yyloc_default; case 101: #line 763 "bison_parser.y" +======= +#line 3724 "bison_parser.cpp" + break; + + case 99: +#line 757 "bison_parser.y" + { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } +#line 3730 "bison_parser.cpp" + break; + + case 100: +#line 758 "bison_parser.y" + { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } +#line 3736 "bison_parser.cpp" + break; + + case 101: +#line 762 "bison_parser.y" +>>>>>>> WIP { (yyval.select_stmt) = (yyvsp[-2].select_stmt); (yyval.select_stmt)->order = (yyvsp[-1].order_vec); @@ -3748,11 +4234,19 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->limit = (yyvsp[0].limit); } } +<<<<<<< HEAD #line 3752 "bison_parser.cpp" break; case 102: #line 773 "bison_parser.y" +======= +#line 3751 "bison_parser.cpp" + break; + + case 102: +#line 772 "bison_parser.y" +>>>>>>> WIP { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3763,42 +4257,75 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); } +<<<<<<< HEAD #line 3767 "bison_parser.cpp" break; case 103: #line 786 "bison_parser.y" +======= +#line 3766 "bison_parser.cpp" + break; + + case 103: +#line 785 "bison_parser.y" +>>>>>>> WIP { (yyval.set_operator_t) = (yyvsp[-1].set_operator_t); (yyval.set_operator_t)->isAll = (yyvsp[0].bval); } +<<<<<<< HEAD #line 3776 "bison_parser.cpp" break; case 104: #line 793 "bison_parser.y" +======= +#line 3775 "bison_parser.cpp" + break; + + case 104: +#line 792 "bison_parser.y" +>>>>>>> WIP { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetUnion; } +<<<<<<< HEAD #line 3785 "bison_parser.cpp" break; case 105: #line 797 "bison_parser.y" +======= +#line 3784 "bison_parser.cpp" + break; + + case 105: +#line 796 "bison_parser.y" +>>>>>>> WIP { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetIntersect; } +<<<<<<< HEAD #line 3794 "bison_parser.cpp" break; case 106: #line 801 "bison_parser.y" +======= +#line 3793 "bison_parser.cpp" + break; + + case 106: +#line 800 "bison_parser.y" +>>>>>>> WIP { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetExcept; } +<<<<<<< HEAD #line 3803 "bison_parser.cpp" break; @@ -3820,6 +4347,29 @@ YYLTYPE yylloc = yyloc_default; case 109: #line 817 "bison_parser.y" +======= +#line 3802 "bison_parser.cpp" + break; + + case 107: +#line 807 "bison_parser.y" + { + (yyval.bval) = true; + } +#line 3810 "bison_parser.cpp" + break; + + case 108: +#line 810 "bison_parser.y" + { + (yyval.bval) = false; + } +#line 3818 "bison_parser.cpp" + break; + + case 109: +#line 816 "bison_parser.y" +>>>>>>> WIP { (yyval.select_stmt) = new SelectStatement(); (yyval.select_stmt)->limit = (yyvsp[-5].limit); @@ -3829,6 +4379,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } +<<<<<<< HEAD #line 3833 "bison_parser.cpp" break; @@ -3876,11 +4427,61 @@ YYLTYPE yylloc = yyloc_default; case 118: #line 853 "bison_parser.y" +======= +#line 3832 "bison_parser.cpp" + break; + + case 110: +#line 828 "bison_parser.y" + { (yyval.bval) = true; } +#line 3838 "bison_parser.cpp" + break; + + case 111: +#line 829 "bison_parser.y" + { (yyval.bval) = false; } +#line 3844 "bison_parser.cpp" + break; + + case 113: +#line 837 "bison_parser.y" + { (yyval.table) = (yyvsp[0].table); } +#line 3850 "bison_parser.cpp" + break; + + case 114: +#line 838 "bison_parser.y" + { (yyval.table) = nullptr; } +#line 3856 "bison_parser.cpp" + break; + + case 115: +#line 842 "bison_parser.y" + { (yyval.table) = (yyvsp[0].table); } +#line 3862 "bison_parser.cpp" + break; + + case 116: +#line 847 "bison_parser.y" + { (yyval.expr) = (yyvsp[0].expr); } +#line 3868 "bison_parser.cpp" + break; + + case 117: +#line 848 "bison_parser.y" + { (yyval.expr) = nullptr; } +#line 3874 "bison_parser.cpp" + break; + + case 118: +#line 852 "bison_parser.y" +>>>>>>> WIP { (yyval.group_t) = new GroupByDescription(); (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } +<<<<<<< HEAD #line 3885 "bison_parser.cpp" break; @@ -4036,6 +4637,163 @@ YYLTYPE yylloc = yyloc_default; case 144: #line 921 "bison_parser.y" +======= +#line 3884 "bison_parser.cpp" + break; + + case 119: +#line 857 "bison_parser.y" + { (yyval.group_t) = nullptr; } +#line 3890 "bison_parser.cpp" + break; + + case 120: +#line 861 "bison_parser.y" + { (yyval.expr) = (yyvsp[0].expr); } +#line 3896 "bison_parser.cpp" + break; + + case 121: +#line 862 "bison_parser.y" + { (yyval.expr) = nullptr; } +#line 3902 "bison_parser.cpp" + break; + + case 122: +#line 866 "bison_parser.y" + { (yyval.order_vec) = (yyvsp[0].order_vec); } +#line 3908 "bison_parser.cpp" + break; + + case 123: +#line 867 "bison_parser.y" + { (yyval.order_vec) = nullptr; } +#line 3914 "bison_parser.cpp" + break; + + case 124: +#line 871 "bison_parser.y" + { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } +#line 3920 "bison_parser.cpp" + break; + + case 125: +#line 872 "bison_parser.y" + { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } +#line 3926 "bison_parser.cpp" + break; + + case 126: +#line 876 "bison_parser.y" + { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } +#line 3932 "bison_parser.cpp" + break; + + case 127: +#line 880 "bison_parser.y" + { (yyval.order_type) = kOrderAsc; } +#line 3938 "bison_parser.cpp" + break; + + case 128: +#line 881 "bison_parser.y" + { (yyval.order_type) = kOrderDesc; } +#line 3944 "bison_parser.cpp" + break; + + case 129: +#line 882 "bison_parser.y" + { (yyval.order_type) = kOrderAsc; } +#line 3950 "bison_parser.cpp" + break; + + case 130: +#line 888 "bison_parser.y" + { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } +#line 3956 "bison_parser.cpp" + break; + + case 131: +#line 889 "bison_parser.y" + { (yyval.limit) = nullptr; } +#line 3962 "bison_parser.cpp" + break; + + case 132: +#line 893 "bison_parser.y" + { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } +#line 3968 "bison_parser.cpp" + break; + + case 133: +#line 894 "bison_parser.y" + { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } +#line 3974 "bison_parser.cpp" + break; + + case 134: +#line 895 "bison_parser.y" + { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } +#line 3980 "bison_parser.cpp" + break; + + case 135: +#line 896 "bison_parser.y" + { (yyval.limit) = new LimitDescription(nullptr, nullptr); } +#line 3986 "bison_parser.cpp" + break; + + case 136: +#line 897 "bison_parser.y" + { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } +#line 3992 "bison_parser.cpp" + break; + + case 137: +#line 898 "bison_parser.y" + { (yyval.limit) = nullptr; } +#line 3998 "bison_parser.cpp" + break; + + case 138: +#line 905 "bison_parser.y" + { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } +#line 4004 "bison_parser.cpp" + break; + + case 139: +#line 906 "bison_parser.y" + { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } +#line 4010 "bison_parser.cpp" + break; + + case 140: +#line 910 "bison_parser.y" + { (yyval.expr_vec) = (yyvsp[0].expr_vec); } +#line 4016 "bison_parser.cpp" + break; + + case 141: +#line 911 "bison_parser.y" + { (yyval.expr_vec) = nullptr; } +#line 4022 "bison_parser.cpp" + break; + + case 142: +#line 915 "bison_parser.y" + { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } +#line 4028 "bison_parser.cpp" + break; + + case 143: +#line 916 "bison_parser.y" + { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } +#line 4034 "bison_parser.cpp" + break; + + case 144: +#line 920 "bison_parser.y" +>>>>>>> WIP { (yyval.expr) = (yyvsp[-1].expr); if ((yyvsp[0].alias_t)) { @@ -4043,6 +4801,7 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].alias_t); } } +<<<<<<< HEAD #line 4047 "bison_parser.cpp" break; @@ -4414,33 +5173,423 @@ YYLTYPE yylloc = yyloc_default; case 229: #line 1092 "bison_parser.y" - { - (yyval.expr) = Expr::makeParameter(yylloc.total_column); - (yyval.expr)->ival2 = yyloc.param_list.size(); - yyloc.param_list.push_back((yyval.expr)); - } -#line 4423 "bison_parser.cpp" +======= +#line 4046 "bison_parser.cpp" break; - case 231: -#line 1105 "bison_parser.y" - { - (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); - auto tbl = new TableRef(kTableCrossProduct); - tbl->list = (yyvsp[-2].table_vec); - (yyval.table) = tbl; - } -#line 4434 "bison_parser.cpp" + case 150: +#line 938 "bison_parser.y" + { (yyval.expr) = (yyvsp[-1].expr); } +#line 4052 "bison_parser.cpp" break; - case 235: -#line 1121 "bison_parser.y" - { + case 160: +#line 948 "bison_parser.y" + { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } +#line 4058 "bison_parser.cpp" + break; + + case 163: +#line 957 "bison_parser.y" + { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } +#line 4064 "bison_parser.cpp" + break; + + case 164: +#line 958 "bison_parser.y" + { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } +#line 4070 "bison_parser.cpp" + break; + + case 165: +#line 959 "bison_parser.y" + { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } +#line 4076 "bison_parser.cpp" + break; + + case 166: +#line 960 "bison_parser.y" + { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } +#line 4082 "bison_parser.cpp" + break; + + case 167: +#line 961 "bison_parser.y" + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } +#line 4088 "bison_parser.cpp" + break; + + case 169: +#line 966 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } +#line 4094 "bison_parser.cpp" + break; + + case 170: +#line 967 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } +#line 4100 "bison_parser.cpp" + break; + + case 171: +#line 968 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } +#line 4106 "bison_parser.cpp" + break; + + case 172: +#line 969 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } +#line 4112 "bison_parser.cpp" + break; + + case 173: +#line 970 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } +#line 4118 "bison_parser.cpp" + break; + + case 174: +#line 971 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } +#line 4124 "bison_parser.cpp" + break; + + case 175: +#line 972 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } +#line 4130 "bison_parser.cpp" + break; + + case 176: +#line 973 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } +#line 4136 "bison_parser.cpp" + break; + + case 177: +#line 974 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } +#line 4142 "bison_parser.cpp" + break; + + case 178: +#line 975 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } +#line 4148 "bison_parser.cpp" + break; + + case 179: +#line 979 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } +#line 4154 "bison_parser.cpp" + break; + + case 180: +#line 980 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } +#line 4160 "bison_parser.cpp" + break; + + case 181: +#line 984 "bison_parser.y" + { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } +#line 4166 "bison_parser.cpp" + break; + + case 182: +#line 985 "bison_parser.y" + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } +#line 4172 "bison_parser.cpp" + break; + + case 183: +#line 986 "bison_parser.y" + { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } +#line 4178 "bison_parser.cpp" + break; + + case 184: +#line 987 "bison_parser.y" + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } +#line 4184 "bison_parser.cpp" + break; + + case 185: +#line 993 "bison_parser.y" + { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } +#line 4190 "bison_parser.cpp" + break; + + case 186: +#line 994 "bison_parser.y" + { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } +#line 4196 "bison_parser.cpp" + break; + + case 187: +#line 995 "bison_parser.y" + { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } +#line 4202 "bison_parser.cpp" + break; + + case 188: +#line 996 "bison_parser.y" + { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } +#line 4208 "bison_parser.cpp" + break; + + case 189: +#line 1000 "bison_parser.y" + { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } +#line 4214 "bison_parser.cpp" + break; + + case 190: +#line 1001 "bison_parser.y" + { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } +#line 4220 "bison_parser.cpp" + break; + + case 191: +#line 1005 "bison_parser.y" + { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } +#line 4226 "bison_parser.cpp" + break; + + case 192: +#line 1006 "bison_parser.y" + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } +#line 4232 "bison_parser.cpp" + break; + + case 193: +#line 1010 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } +#line 4238 "bison_parser.cpp" + break; + + case 194: +#line 1011 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } +#line 4244 "bison_parser.cpp" + break; + + case 195: +#line 1012 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } +#line 4250 "bison_parser.cpp" + break; + + case 196: +#line 1013 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } +#line 4256 "bison_parser.cpp" + break; + + case 197: +#line 1014 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } +#line 4262 "bison_parser.cpp" + break; + + case 198: +#line 1015 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } +#line 4268 "bison_parser.cpp" + break; + + case 199: +#line 1016 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } +#line 4274 "bison_parser.cpp" + break; + + case 200: +#line 1020 "bison_parser.y" + { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } +#line 4280 "bison_parser.cpp" + break; + + case 201: +#line 1021 "bison_parser.y" + { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } +#line 4286 "bison_parser.cpp" + break; + + case 202: +#line 1025 "bison_parser.y" + { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } +#line 4292 "bison_parser.cpp" + break; + + case 203: +#line 1029 "bison_parser.y" + { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } +#line 4298 "bison_parser.cpp" + break; + + case 204: +#line 1033 "bison_parser.y" + { (yyval.datetime_field) = kDatetimeSecond; } +#line 4304 "bison_parser.cpp" + break; + + case 205: +#line 1034 "bison_parser.y" + { (yyval.datetime_field) = kDatetimeMinute; } +#line 4310 "bison_parser.cpp" + break; + + case 206: +#line 1035 "bison_parser.y" + { (yyval.datetime_field) = kDatetimeHour; } +#line 4316 "bison_parser.cpp" + break; + + case 207: +#line 1036 "bison_parser.y" + { (yyval.datetime_field) = kDatetimeDay; } +#line 4322 "bison_parser.cpp" + break; + + case 208: +#line 1037 "bison_parser.y" + { (yyval.datetime_field) = kDatetimeMonth; } +#line 4328 "bison_parser.cpp" + break; + + case 209: +#line 1038 "bison_parser.y" + { (yyval.datetime_field) = kDatetimeYear; } +#line 4334 "bison_parser.cpp" + break; + + case 210: +#line 1042 "bison_parser.y" + { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } +#line 4340 "bison_parser.cpp" + break; + + case 211: +#line 1046 "bison_parser.y" + { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } +#line 4346 "bison_parser.cpp" + break; + + case 212: +#line 1050 "bison_parser.y" + { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } +#line 4352 "bison_parser.cpp" + break; + + case 213: +#line 1054 "bison_parser.y" + { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } +#line 4358 "bison_parser.cpp" + break; + + case 214: +#line 1055 "bison_parser.y" + { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } +#line 4364 "bison_parser.cpp" + break; + + case 215: +#line 1056 "bison_parser.y" + { (yyval.expr) = Expr::makeStar(); } +#line 4370 "bison_parser.cpp" + break; + + case 216: +#line 1057 "bison_parser.y" + { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } +#line 4376 "bison_parser.cpp" + break; + + case 222: +#line 1069 "bison_parser.y" + { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } +#line 4382 "bison_parser.cpp" + break; + + case 223: +#line 1073 "bison_parser.y" + { (yyval.expr) = Expr::makeLiteral(true); } +#line 4388 "bison_parser.cpp" + break; + + case 224: +#line 1074 "bison_parser.y" + { (yyval.expr) = Expr::makeLiteral(false); } +#line 4394 "bison_parser.cpp" + break; + + case 225: +#line 1078 "bison_parser.y" + { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } +#line 4400 "bison_parser.cpp" + break; + + case 227: +#line 1083 "bison_parser.y" + { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } +#line 4406 "bison_parser.cpp" + break; + + case 228: +#line 1087 "bison_parser.y" + { (yyval.expr) = Expr::makeNullLiteral(); } +#line 4412 "bison_parser.cpp" + break; + + case 229: +#line 1091 "bison_parser.y" +>>>>>>> WIP + { + (yyval.expr) = Expr::makeParameter(yylloc.total_column); + (yyval.expr)->ival2 = yyloc.param_list.size(); + yyloc.param_list.push_back((yyval.expr)); + } +<<<<<<< HEAD +#line 4423 "bison_parser.cpp" + break; + + case 231: +#line 1105 "bison_parser.y" +======= +#line 4422 "bison_parser.cpp" + break; + + case 231: +#line 1104 "bison_parser.y" +>>>>>>> WIP + { + (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); + auto tbl = new TableRef(kTableCrossProduct); + tbl->list = (yyvsp[-2].table_vec); + (yyval.table) = tbl; + } +<<<<<<< HEAD +#line 4434 "bison_parser.cpp" + break; + + case 235: +#line 1121 "bison_parser.y" +======= +#line 4433 "bison_parser.cpp" + break; + + case 235: +#line 1120 "bison_parser.y" +>>>>>>> WIP + { auto tbl = new TableRef(kTableSelect); tbl->select = (yyvsp[-2].select_stmt); tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } +<<<<<<< HEAD #line 4445 "bison_parser.cpp" break; @@ -4458,6 +5607,25 @@ YYLTYPE yylloc = yyloc_default; case 238: #line 1136 "bison_parser.y" +======= +#line 4444 "bison_parser.cpp" + break; + + case 236: +#line 1129 "bison_parser.y" + { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } +#line 4450 "bison_parser.cpp" + break; + + case 237: +#line 1130 "bison_parser.y" + { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } +#line 4456 "bison_parser.cpp" + break; + + case 238: +#line 1135 "bison_parser.y" +>>>>>>> WIP { auto tbl = new TableRef(kTableName); tbl->schema = (yyvsp[-1].table_name).schema; @@ -4465,16 +5633,25 @@ YYLTYPE yylloc = yyloc_default; tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } +<<<<<<< HEAD #line 4469 "bison_parser.cpp" break; case 239: #line 1147 "bison_parser.y" +======= +#line 4468 "bison_parser.cpp" + break; + + case 239: +#line 1146 "bison_parser.y" +>>>>>>> WIP { (yyval.table) = new TableRef(kTableName); (yyval.table)->schema = (yyvsp[0].table_name).schema; (yyval.table)->name = (yyvsp[0].table_name).name; } +<<<<<<< HEAD #line 4479 "bison_parser.cpp" break; @@ -4552,34 +5729,137 @@ YYLTYPE yylloc = yyloc_default; case 256: #line 1208 "bison_parser.y" +======= +#line 4478 "bison_parser.cpp" + break; + + case 240: +#line 1155 "bison_parser.y" + { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} +#line 4484 "bison_parser.cpp" + break; + + case 241: +#line 1156 "bison_parser.y" + { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } +#line 4490 "bison_parser.cpp" + break; + + case 242: +#line 1160 "bison_parser.y" + { (yyval.sval) = (yyvsp[0].sval);} +#line 4496 "bison_parser.cpp" + break; + + case 243: +#line 1161 "bison_parser.y" + { (yyval.sval) = nullptr;} +#line 4502 "bison_parser.cpp" + break; + + case 244: +#line 1165 "bison_parser.y" + { (yyval.sval) = (yyvsp[0].sval);} +#line 4508 "bison_parser.cpp" + break; + + case 246: +#line 1171 "bison_parser.y" + { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } +#line 4514 "bison_parser.cpp" + break; + + case 248: +#line 1177 "bison_parser.y" + { (yyval.alias_t) = nullptr; } +#line 4520 "bison_parser.cpp" + break; + + case 249: +#line 1182 "bison_parser.y" + { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } +#line 4526 "bison_parser.cpp" + break; + + case 250: +#line 1183 "bison_parser.y" + { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } +#line 4532 "bison_parser.cpp" + break; + + case 252: +#line 1189 "bison_parser.y" + { (yyval.alias_t) = nullptr; } +#line 4538 "bison_parser.cpp" + break; + + case 254: +#line 1199 "bison_parser.y" + { (yyval.with_description_vec) = nullptr; } +#line 4544 "bison_parser.cpp" + break; + + case 255: +#line 1203 "bison_parser.y" + { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } +#line 4550 "bison_parser.cpp" + break; + + case 256: +#line 1207 "bison_parser.y" +>>>>>>> WIP { (yyval.with_description_vec) = new std::vector(); (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); } +<<<<<<< HEAD #line 4560 "bison_parser.cpp" break; case 257: #line 1212 "bison_parser.y" +======= +#line 4559 "bison_parser.cpp" + break; + + case 257: +#line 1211 "bison_parser.y" +>>>>>>> WIP { (yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t)); (yyval.with_description_vec) = (yyvsp[-2].with_description_vec); } +<<<<<<< HEAD #line 4569 "bison_parser.cpp" break; case 258: #line 1219 "bison_parser.y" +======= +#line 4568 "bison_parser.cpp" + break; + + case 258: +#line 1218 "bison_parser.y" +>>>>>>> WIP { (yyval.with_description_t) = new WithDescription(); (yyval.with_description_t)->alias = (yyvsp[-2].sval); (yyval.with_description_t)->select = (yyvsp[0].select_stmt); } +<<<<<<< HEAD #line 4579 "bison_parser.cpp" break; case 259: #line 1233 "bison_parser.y" +======= +#line 4578 "bison_parser.cpp" + break; + + case 259: +#line 1232 "bison_parser.y" +>>>>>>> WIP { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4587,11 +5867,19 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } +<<<<<<< HEAD #line 4591 "bison_parser.cpp" break; case 260: #line 1241 "bison_parser.y" +======= +#line 4590 "bison_parser.cpp" + break; + + case 260: +#line 1240 "bison_parser.y" +>>>>>>> WIP { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4600,11 +5888,19 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } +<<<<<<< HEAD #line 4604 "bison_parser.cpp" break; case 261: #line 1251 "bison_parser.y" +======= +#line 4603 "bison_parser.cpp" + break; + + case 261: +#line 1250 "bison_parser.y" +>>>>>>> WIP { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4620,6 +5916,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } +<<<<<<< HEAD #line 4624 "bison_parser.cpp" break; @@ -4697,6 +5994,85 @@ YYLTYPE yylloc = yyloc_default; #line 4700 "bison_parser.cpp" +======= +#line 4623 "bison_parser.cpp" + break; + + case 262: +#line 1268 "bison_parser.y" + { (yyval.uval) = kJoinInner; } +#line 4629 "bison_parser.cpp" + break; + + case 263: +#line 1269 "bison_parser.y" + { (yyval.uval) = kJoinLeft; } +#line 4635 "bison_parser.cpp" + break; + + case 264: +#line 1270 "bison_parser.y" + { (yyval.uval) = kJoinLeft; } +#line 4641 "bison_parser.cpp" + break; + + case 265: +#line 1271 "bison_parser.y" + { (yyval.uval) = kJoinRight; } +#line 4647 "bison_parser.cpp" + break; + + case 266: +#line 1272 "bison_parser.y" + { (yyval.uval) = kJoinRight; } +#line 4653 "bison_parser.cpp" + break; + + case 267: +#line 1273 "bison_parser.y" + { (yyval.uval) = kJoinFull; } +#line 4659 "bison_parser.cpp" + break; + + case 268: +#line 1274 "bison_parser.y" + { (yyval.uval) = kJoinFull; } +#line 4665 "bison_parser.cpp" + break; + + case 269: +#line 1275 "bison_parser.y" + { (yyval.uval) = kJoinFull; } +#line 4671 "bison_parser.cpp" + break; + + case 270: +#line 1276 "bison_parser.y" + { (yyval.uval) = kJoinCross; } +#line 4677 "bison_parser.cpp" + break; + + case 271: +#line 1277 "bison_parser.y" + { (yyval.uval) = kJoinInner; } +#line 4683 "bison_parser.cpp" + break; + + case 275: +#line 1297 "bison_parser.y" + { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } +#line 4689 "bison_parser.cpp" + break; + + case 276: +#line 1298 "bison_parser.y" + { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } +#line 4695 "bison_parser.cpp" + break; + + +#line 4699 "bison_parser.cpp" +>>>>>>> WIP default: break; } @@ -4934,7 +6310,11 @@ YYLTYPE yylloc = yyloc_default; #endif return yyresult; } +<<<<<<< HEAD #line 1302 "bison_parser.y" +======= +#line 1301 "bison_parser.y" +>>>>>>> WIP /********************************* ** Section 4: Additional C code diff --git a/src/parser/bison_parser.h b/src/parser/bison_parser.h index 4bd97e05..9ba9f637 100644 --- a/src/parser/bison_parser.h +++ b/src/parser/bison_parser.h @@ -274,7 +274,11 @@ union HSQL_STYPE hsql::DatetimeField datetime_field; hsql::LimitDescription* limit; hsql::ColumnDefinition* column_t; +<<<<<<< HEAD hsql::TableKeyConstraint* table_key_constraint_t; +======= + hsql::TableKeyConstraint table_key_constraint_t; +>>>>>>> WIP hsql::ColumnType column_type_t; hsql::ImportType import_type_t; hsql::GroupByDescription* group_t; @@ -291,7 +295,11 @@ union HSQL_STYPE std::vector* expr_vec; std::vector* order_vec; std::vector* with_description_vec; +<<<<<<< HEAD std::vector* table_key_constraint_vec; +======= + std::vector table_key_constraint_vec; +>>>>>>> WIP #line 297 "bison_parser.h" diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index b64da465..ae2a3740 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -609,7 +609,7 @@ table_key_constraint: | /* empty */ {$$ = new std::vector(); } ; -table_key_constaint: +table_key_constraint: ',' PRIMARY KEY '(' ident_commalist ')' { $$ = TableKeyConstraint{KeyType::PRIMARY_KEY, $5}; } | ',' UNIQUE '(' ident_commalist ')' { $$ = TableKeyConstraint{KeyType::UNIQUE, $4}; } >>>>>>> added tablekeyconstraint to parser diff --git a/src/sql/CreateStatement.h b/src/sql/CreateStatement.h index 0d552ae5..cf94b27f 100755 --- a/src/sql/CreateStatement.h +++ b/src/sql/CreateStatement.h @@ -14,7 +14,6 @@ namespace hsql { // Represents definition of a key constraint struct TableKeyConstraint { - TableKeyConstraint(KeyType keyType, std::vector* columnNames); virtual~TableKeyConstraint(); @@ -54,11 +53,7 @@ namespace hsql { char* indexName; // default: nullptr std::vector* indexColumns; std::vector* columns; // default: nullptr -<<<<<<< HEAD std::vector* tableKeyConstraints; // default: nullptr -======= - std::vector* keyConstraints; // default: nullptr ->>>>>>> adds keyconstraint functionality std::vector* viewColumns; SelectStatement* select; }; diff --git a/src/sql/statements.cpp b/src/sql/statements.cpp index 6135da0d..accaf307 100755 --- a/src/sql/statements.cpp +++ b/src/sql/statements.cpp @@ -98,11 +98,7 @@ namespace hsql { schema(nullptr), tableName(nullptr), columns(nullptr), -<<<<<<< HEAD tableKeyConstraints(nullptr), -======= - keyConstraints(nullptr), ->>>>>>> adds keyconstraint functionality viewColumns(nullptr), select(nullptr) {}; @@ -119,19 +115,11 @@ namespace hsql { delete columns; } -<<<<<<< HEAD if (tableKeyConstraints != nullptr) { for (TableKeyConstraint* def : *tableKeyConstraints) { delete def; } delete tableKeyConstraints; -======= - if (keyConstraints != nullptr) { - for (Keyconstraints* def : *keyConstraints) { - delete def; - } - delete keyConstraints; ->>>>>>> adds keyconstraint functionality } if (viewColumns != nullptr) { From 9dbbdbd9554741aecdc40e4ac9c6b0d2f0a2366a Mon Sep 17 00:00:00 2001 From: Jostafarr Date: Fri, 9 Jul 2021 13:51:27 +0200 Subject: [PATCH 23/73] refines the tablekeyconstraint implementation --- src/parser/bison_parser.cpp | 992 +++++++++++++++++++++++++----------- src/parser/bison_parser.h | 8 - src/parser/bison_parser.y | 14 - 3 files changed, 701 insertions(+), 313 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 84325a9a..afcf538a 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -446,7 +446,7 @@ struct HSQL_LTYPE hsql::DatetimeField datetime_field; hsql::LimitDescription* limit; hsql::ColumnDefinition* column_t; - hsql::TableKeyConstraint table_key_constraint_t; + hsql::TableKeyConstraint* table_key_constraint_t; hsql::ColumnType column_type_t; hsql::ImportType import_type_t; hsql::GroupByDescription* group_t; @@ -463,7 +463,7 @@ struct HSQL_LTYPE std::vector* expr_vec; std::vector* order_vec; std::vector* with_description_vec; - std::vector table_key_constraint_vec; + std::vector* table_key_constraint_vec; #line 398 "bison_parser.cpp" @@ -885,6 +885,9 @@ static const yytype_int16 yyrline[] = 350, 355, 356, 360, 364, 376, 379, 382, 388, 389, 396, 403, 406, 410, 424, 430, 439, 456, 460, 463, <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> refines the tablekeyconstraint implementation 472, 486, 489, 494, 508, 521, 529, 536, 543, 554, 555, 559, 560, 564, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 587, 588, @@ -909,6 +912,7 @@ static const yytype_int16 yyrline[] = 1184, 1189, 1190, 1199, 1200, 1204, 1208, 1212, 1219, 1232, 1240, 1250, 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1283, 1292, 1293, 1298, 1299 +<<<<<<< HEAD ======= 472, 486, 489, 494, 508, 521, 528, 535, 542, 553, 554, 558, 559, 563, 569, 570, 571, 572, 573, 574, @@ -935,6 +939,8 @@ static const yytype_int16 yyrline[] = 1239, 1249, 1268, 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1282, 1291, 1292, 1297, 1298 >>>>>>> WIP +======= +>>>>>>> refines the tablekeyconstraint implementation }; #endif @@ -3444,6 +3450,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->schema = (yyvsp[-4].table_name).schema; (yyval.create_stmt)->tableName = (yyvsp[-4].table_name).name; (yyval.create_stmt)->columns = (yyvsp[-2].column_vec); +<<<<<<< HEAD <<<<<<< HEAD (yyval.create_stmt)->tableKeyConstraints = (yyvsp[-1].table_key_constraint_vec); } @@ -3453,13 +3460,20 @@ YYLTYPE yylloc = yyloc_default; case 46: #line 529 "bison_parser.y" ======= +======= + (yyval.create_stmt)->tableKeyConstraints = (yyvsp[-1].table_key_constraint_vec); +>>>>>>> refines the tablekeyconstraint implementation } -#line 3326 "bison_parser.cpp" +#line 3327 "bison_parser.cpp" break; case 46: +<<<<<<< HEAD #line 528 "bison_parser.y" >>>>>>> WIP +======= +#line 529 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-3].bval); @@ -3468,6 +3482,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } <<<<<<< HEAD +<<<<<<< HEAD #line 3339 "bison_parser.cpp" break; @@ -3480,6 +3495,13 @@ YYLTYPE yylloc = yyloc_default; case 47: #line 535 "bison_parser.y" >>>>>>> WIP +======= +#line 3339 "bison_parser.cpp" + break; + + case 47: +#line 536 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { (yyval.create_stmt) = new CreateStatement(kCreateIndex); (yyval.create_stmt)->indexName = (yyvsp[-6].sval); @@ -3488,6 +3510,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->indexColumns = (yyvsp[-1].str_vec); } <<<<<<< HEAD +<<<<<<< HEAD #line 3351 "bison_parser.cpp" break; @@ -3500,6 +3523,13 @@ YYLTYPE yylloc = yyloc_default; case 48: #line 542 "bison_parser.y" >>>>>>> WIP +======= +#line 3351 "bison_parser.cpp" + break; + + case 48: +#line 543 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { (yyval.create_stmt) = new CreateStatement(kCreateView); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -3509,6 +3539,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } <<<<<<< HEAD +<<<<<<< HEAD #line 3364 "bison_parser.cpp" break; @@ -3680,175 +3711,182 @@ YYLTYPE yylloc = yyloc_default; #line 608 "bison_parser.y" ======= #line 3363 "bison_parser.cpp" +======= +#line 3364 "bison_parser.cpp" +>>>>>>> refines the tablekeyconstraint implementation break; case 49: -#line 553 "bison_parser.y" +#line 554 "bison_parser.y" { (yyval.bval) = true; } -#line 3369 "bison_parser.cpp" +#line 3370 "bison_parser.cpp" break; case 50: -#line 554 "bison_parser.y" +#line 555 "bison_parser.y" { (yyval.bval) = false; } -#line 3375 "bison_parser.cpp" +#line 3376 "bison_parser.cpp" break; case 51: -#line 558 "bison_parser.y" +#line 559 "bison_parser.y" { (yyval.column_vec) = new std::vector(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); } -#line 3381 "bison_parser.cpp" +#line 3382 "bison_parser.cpp" break; case 52: -#line 559 "bison_parser.y" +#line 560 "bison_parser.y" { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } -#line 3387 "bison_parser.cpp" +#line 3388 "bison_parser.cpp" break; case 53: -#line 563 "bison_parser.y" +#line 564 "bison_parser.y" { (yyval.column_t) = new ColumnDefinition((yyvsp[-2].sval), (yyvsp[-1].column_type_t), (yyvsp[0].bval)); } -#line 3395 "bison_parser.cpp" +#line 3396 "bison_parser.cpp" break; case 54: -#line 569 "bison_parser.y" +#line 570 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3401 "bison_parser.cpp" +#line 3402 "bison_parser.cpp" break; case 55: -#line 570 "bison_parser.y" +#line 571 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3407 "bison_parser.cpp" +#line 3408 "bison_parser.cpp" break; case 56: -#line 571 "bison_parser.y" +#line 572 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::LONG}; } -#line 3413 "bison_parser.cpp" +#line 3414 "bison_parser.cpp" break; case 57: -#line 572 "bison_parser.y" +#line 573 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3419 "bison_parser.cpp" +#line 3420 "bison_parser.cpp" break; case 58: -#line 573 "bison_parser.y" +#line 574 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3425 "bison_parser.cpp" +#line 3426 "bison_parser.cpp" break; case 59: -#line 574 "bison_parser.y" +#line 575 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } -#line 3431 "bison_parser.cpp" +#line 3432 "bison_parser.cpp" break; case 60: -#line 575 "bison_parser.y" +#line 576 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3437 "bison_parser.cpp" +#line 3438 "bison_parser.cpp" break; case 61: -#line 576 "bison_parser.y" +#line 577 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3443 "bison_parser.cpp" +#line 3444 "bison_parser.cpp" break; case 62: -#line 577 "bison_parser.y" +#line 578 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3449 "bison_parser.cpp" +#line 3450 "bison_parser.cpp" break; case 63: -#line 578 "bison_parser.y" +#line 579 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } -#line 3455 "bison_parser.cpp" +#line 3456 "bison_parser.cpp" break; case 64: -#line 579 "bison_parser.y" +#line 580 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } -#line 3461 "bison_parser.cpp" +#line 3462 "bison_parser.cpp" break; case 65: -#line 580 "bison_parser.y" +#line 581 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TIME}; } -#line 3467 "bison_parser.cpp" +#line 3468 "bison_parser.cpp" break; case 66: -#line 581 "bison_parser.y" +#line 582 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } -#line 3473 "bison_parser.cpp" +#line 3474 "bison_parser.cpp" break; case 67: -#line 582 "bison_parser.y" +#line 583 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATE}; } -#line 3479 "bison_parser.cpp" +#line 3480 "bison_parser.cpp" break; case 68: -#line 586 "bison_parser.y" +#line 587 "bison_parser.y" { (yyval.bval) = true; } -#line 3485 "bison_parser.cpp" +#line 3486 "bison_parser.cpp" break; case 69: -#line 587 "bison_parser.y" +#line 588 "bison_parser.y" { (yyval.bval) = false; } -#line 3491 "bison_parser.cpp" +#line 3492 "bison_parser.cpp" break; case 70: -#line 588 "bison_parser.y" +#line 589 "bison_parser.y" { (yyval.bval) = false; } -#line 3497 "bison_parser.cpp" +#line 3498 "bison_parser.cpp" break; case 71: -#line 592 "bison_parser.y" - {(yyval.table_key_constraint_vec) = new std::vector(); (yyval.table_key_constraint_vec)->push_back((yyvsp[0].table_key_constraint_t)); } -#line 3503 "bison_parser.cpp" +#line 593 "bison_parser.y" + {(yyval.table_key_constraint_vec) = new std::vector(); (yyval.table_key_constraint_vec)->push_back((yyvsp[0].table_key_constraint_t)); } +#line 3504 "bison_parser.cpp" break; case 72: -#line 593 "bison_parser.y" +#line 594 "bison_parser.y" { (yyvsp[-1].table_key_constraint_vec)->push_back((yyvsp[0].table_key_constraint_t)); (yyval.table_key_constraint_vec) = (yyvsp[-1].table_key_constraint_vec); } -#line 3509 "bison_parser.cpp" +#line 3510 "bison_parser.cpp" break; case 73: -#line 594 "bison_parser.y" - {(yyval.table_key_constraint_vec) = new std::vector(); } -#line 3515 "bison_parser.cpp" +#line 595 "bison_parser.y" + {(yyval.table_key_constraint_vec) = new std::vector(); } +#line 3516 "bison_parser.cpp" break; case 74: -#line 598 "bison_parser.y" - { (yyval.table_key_constraint_t) = TableKeyConstraint{KeyType::PRIMARY_KEY, (yyvsp[-1].str_vec)}; } -#line 3521 "bison_parser.cpp" +#line 599 "bison_parser.y" + { (yyval.table_key_constraint_t) = new TableKeyConstraint(KeyType::PRIMARY_KEY, (yyvsp[-1].str_vec)); } +#line 3522 "bison_parser.cpp" break; case 75: -#line 599 "bison_parser.y" - { (yyval.table_key_constraint_t) = TableKeyConstraint{KeyType::UNIQUE, (yyvsp[-1].str_vec)}; } -#line 3527 "bison_parser.cpp" +#line 600 "bison_parser.y" + { (yyval.table_key_constraint_t) = new TableKeyConstraint(KeyType::UNIQUE, (yyvsp[-1].str_vec)); } +#line 3528 "bison_parser.cpp" break; case 76: +<<<<<<< HEAD #line 607 "bison_parser.y" >>>>>>> WIP +======= +#line 608 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { (yyval.drop_stmt) = new DropStatement(kDropTable); (yyval.drop_stmt)->ifExists = (yyvsp[-1].bval); @@ -3856,6 +3894,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; } <<<<<<< HEAD +<<<<<<< HEAD #line 3539 "bison_parser.cpp" break; @@ -3868,6 +3907,13 @@ YYLTYPE yylloc = yyloc_default; case 77: #line 613 "bison_parser.y" >>>>>>> WIP +======= +#line 3539 "bison_parser.cpp" + break; + + case 77: +#line 614 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { (yyval.drop_stmt) = new DropStatement(kDropView); (yyval.drop_stmt)->ifExists = (yyvsp[-1].bval); @@ -3875,6 +3921,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; } <<<<<<< HEAD +<<<<<<< HEAD #line 3550 "bison_parser.cpp" break; @@ -3887,12 +3934,20 @@ YYLTYPE yylloc = yyloc_default; case 78: #line 619 "bison_parser.y" >>>>>>> WIP +======= +#line 3550 "bison_parser.cpp" + break; + + case 78: +#line 620 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); (yyval.drop_stmt)->ifExists = false; (yyval.drop_stmt)->name = (yyvsp[0].sval); } <<<<<<< HEAD +<<<<<<< HEAD #line 3560 "bison_parser.cpp" break; @@ -3905,12 +3960,20 @@ YYLTYPE yylloc = yyloc_default; case 79: #line 624 "bison_parser.y" >>>>>>> WIP +======= +#line 3560 "bison_parser.cpp" + break; + + case 79: +#line 625 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { (yyval.drop_stmt) = new DropStatement(kDropIndex); (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; (yyval.drop_stmt)->index_name = (yyvsp[-2].sval); } <<<<<<< HEAD +<<<<<<< HEAD #line 3570 "bison_parser.cpp" break; @@ -3930,23 +3993,30 @@ YYLTYPE yylloc = yyloc_default; #line 643 "bison_parser.y" ======= #line 3569 "bison_parser.cpp" +======= +#line 3570 "bison_parser.cpp" +>>>>>>> refines the tablekeyconstraint implementation break; case 80: -#line 632 "bison_parser.y" +#line 633 "bison_parser.y" { (yyval.bval) = true; } -#line 3575 "bison_parser.cpp" +#line 3576 "bison_parser.cpp" break; case 81: -#line 633 "bison_parser.y" +#line 634 "bison_parser.y" { (yyval.bval) = false; } -#line 3581 "bison_parser.cpp" +#line 3582 "bison_parser.cpp" break; case 82: +<<<<<<< HEAD #line 642 "bison_parser.y" >>>>>>> WIP +======= +#line 643 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->schema = (yyvsp[-1].table_name).schema; @@ -3954,6 +4024,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.delete_stmt)->expr = (yyvsp[0].expr); } <<<<<<< HEAD +<<<<<<< HEAD #line 3593 "bison_parser.cpp" break; @@ -3966,12 +4037,20 @@ YYLTYPE yylloc = yyloc_default; case 83: #line 651 "bison_parser.y" >>>>>>> WIP +======= +#line 3593 "bison_parser.cpp" + break; + + case 83: +#line 652 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; } <<<<<<< HEAD +<<<<<<< HEAD #line 3603 "bison_parser.cpp" break; @@ -3984,6 +4063,13 @@ YYLTYPE yylloc = yyloc_default; case 84: #line 664 "bison_parser.y" >>>>>>> WIP +======= +#line 3603 "bison_parser.cpp" + break; + + case 84: +#line 665 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { (yyval.insert_stmt) = new InsertStatement(kInsertValues); (yyval.insert_stmt)->schema = (yyvsp[-5].table_name).schema; @@ -3992,6 +4078,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } <<<<<<< HEAD +<<<<<<< HEAD #line 3615 "bison_parser.cpp" break; @@ -4004,6 +4091,13 @@ YYLTYPE yylloc = yyloc_default; case 85: #line 671 "bison_parser.y" >>>>>>> WIP +======= +#line 3615 "bison_parser.cpp" + break; + + case 85: +#line 672 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { (yyval.insert_stmt) = new InsertStatement(kInsertSelect); (yyval.insert_stmt)->schema = (yyvsp[-2].table_name).schema; @@ -4012,11 +4106,15 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> refines the tablekeyconstraint implementation #line 3627 "bison_parser.cpp" break; case 86: #line 683 "bison_parser.y" +<<<<<<< HEAD { (yyval.str_vec) = (yyvsp[-1].str_vec); } #line 3633 "bison_parser.cpp" break; @@ -4035,19 +4133,25 @@ YYLTYPE yylloc = yyloc_default; case 86: #line 682 "bison_parser.y" +======= +>>>>>>> refines the tablekeyconstraint implementation { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 3632 "bison_parser.cpp" +#line 3633 "bison_parser.cpp" break; case 87: -#line 683 "bison_parser.y" +#line 684 "bison_parser.y" { (yyval.str_vec) = nullptr; } -#line 3638 "bison_parser.cpp" +#line 3639 "bison_parser.cpp" break; case 88: +<<<<<<< HEAD #line 693 "bison_parser.y" >>>>>>> WIP +======= +#line 694 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { (yyval.update_stmt) = new UpdateStatement(); (yyval.update_stmt)->table = (yyvsp[-3].table); @@ -4055,6 +4159,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.update_stmt)->where = (yyvsp[0].expr); } <<<<<<< HEAD +<<<<<<< HEAD #line 3650 "bison_parser.cpp" break; @@ -4074,29 +4179,37 @@ YYLTYPE yylloc = yyloc_default; #line 708 "bison_parser.y" ======= #line 3649 "bison_parser.cpp" +======= +#line 3650 "bison_parser.cpp" +>>>>>>> refines the tablekeyconstraint implementation break; case 89: -#line 702 "bison_parser.y" +#line 703 "bison_parser.y" { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 3655 "bison_parser.cpp" +#line 3656 "bison_parser.cpp" break; case 90: -#line 703 "bison_parser.y" +#line 704 "bison_parser.y" { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 3661 "bison_parser.cpp" +#line 3662 "bison_parser.cpp" break; case 91: +<<<<<<< HEAD #line 707 "bison_parser.y" >>>>>>> WIP +======= +#line 708 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { (yyval.update_t) = new UpdateClause(); (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } <<<<<<< HEAD +<<<<<<< HEAD #line 3672 "bison_parser.cpp" break; @@ -4109,11 +4222,19 @@ YYLTYPE yylloc = yyloc_default; case 92: #line 719 "bison_parser.y" >>>>>>> WIP +======= +#line 3672 "bison_parser.cpp" + break; + + case 92: +#line 720 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } <<<<<<< HEAD +<<<<<<< HEAD #line 3681 "bison_parser.cpp" break; @@ -4126,11 +4247,19 @@ YYLTYPE yylloc = yyloc_default; case 93: #line 723 "bison_parser.y" >>>>>>> WIP +======= +#line 3681 "bison_parser.cpp" + break; + + case 93: +#line 724 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } <<<<<<< HEAD +<<<<<<< HEAD #line 3690 "bison_parser.cpp" break; @@ -4143,6 +4272,13 @@ YYLTYPE yylloc = yyloc_default; case 94: #line 727 "bison_parser.y" >>>>>>> WIP +======= +#line 3690 "bison_parser.cpp" + break; + + case 94: +#line 728 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -4155,6 +4291,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->withDescriptions = (yyvsp[-5].with_description_vec); } <<<<<<< HEAD +<<<<<<< HEAD #line 3706 "bison_parser.cpp" break; @@ -4168,17 +4305,24 @@ YYLTYPE yylloc = yyloc_default; #line 747 "bison_parser.y" ======= #line 3705 "bison_parser.cpp" +======= +#line 3706 "bison_parser.cpp" +>>>>>>> refines the tablekeyconstraint implementation break; case 97: -#line 745 "bison_parser.y" +#line 746 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); } -#line 3711 "bison_parser.cpp" +#line 3712 "bison_parser.cpp" break; case 98: +<<<<<<< HEAD #line 746 "bison_parser.y" >>>>>>> WIP +======= +#line 747 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { (yyval.select_stmt) = (yyvsp[-2].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -4188,6 +4332,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[0].select_stmt); } <<<<<<< HEAD +<<<<<<< HEAD #line 3725 "bison_parser.cpp" break; @@ -4207,23 +4352,30 @@ YYLTYPE yylloc = yyloc_default; #line 763 "bison_parser.y" ======= #line 3724 "bison_parser.cpp" +======= +#line 3725 "bison_parser.cpp" +>>>>>>> refines the tablekeyconstraint implementation break; case 99: -#line 757 "bison_parser.y" +#line 758 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3730 "bison_parser.cpp" +#line 3731 "bison_parser.cpp" break; case 100: -#line 758 "bison_parser.y" +#line 759 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3736 "bison_parser.cpp" +#line 3737 "bison_parser.cpp" break; case 101: +<<<<<<< HEAD #line 762 "bison_parser.y" >>>>>>> WIP +======= +#line 763 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { (yyval.select_stmt) = (yyvsp[-2].select_stmt); (yyval.select_stmt)->order = (yyvsp[-1].order_vec); @@ -4235,6 +4387,7 @@ YYLTYPE yylloc = yyloc_default; } } <<<<<<< HEAD +<<<<<<< HEAD #line 3752 "bison_parser.cpp" break; @@ -4247,6 +4400,13 @@ YYLTYPE yylloc = yyloc_default; case 102: #line 772 "bison_parser.y" >>>>>>> WIP +======= +#line 3752 "bison_parser.cpp" + break; + + case 102: +#line 773 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -4258,6 +4418,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); } <<<<<<< HEAD +<<<<<<< HEAD #line 3767 "bison_parser.cpp" break; @@ -4270,11 +4431,19 @@ YYLTYPE yylloc = yyloc_default; case 103: #line 785 "bison_parser.y" >>>>>>> WIP +======= +#line 3767 "bison_parser.cpp" + break; + + case 103: +#line 786 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { (yyval.set_operator_t) = (yyvsp[-1].set_operator_t); (yyval.set_operator_t)->isAll = (yyvsp[0].bval); } <<<<<<< HEAD +<<<<<<< HEAD #line 3776 "bison_parser.cpp" break; @@ -4287,11 +4456,19 @@ YYLTYPE yylloc = yyloc_default; case 104: #line 792 "bison_parser.y" >>>>>>> WIP +======= +#line 3776 "bison_parser.cpp" + break; + + case 104: +#line 793 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetUnion; } <<<<<<< HEAD +<<<<<<< HEAD #line 3785 "bison_parser.cpp" break; @@ -4304,11 +4481,19 @@ YYLTYPE yylloc = yyloc_default; case 105: #line 796 "bison_parser.y" >>>>>>> WIP +======= +#line 3785 "bison_parser.cpp" + break; + + case 105: +#line 797 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetIntersect; } <<<<<<< HEAD +<<<<<<< HEAD #line 3794 "bison_parser.cpp" break; @@ -4321,11 +4506,19 @@ YYLTYPE yylloc = yyloc_default; case 106: #line 800 "bison_parser.y" >>>>>>> WIP - { +======= +#line 3794 "bison_parser.cpp" + break; + + case 106: +#line 801 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation + { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetExcept; } <<<<<<< HEAD +<<<<<<< HEAD #line 3803 "bison_parser.cpp" break; @@ -4349,27 +4542,34 @@ YYLTYPE yylloc = yyloc_default; #line 817 "bison_parser.y" ======= #line 3802 "bison_parser.cpp" +======= +#line 3803 "bison_parser.cpp" +>>>>>>> refines the tablekeyconstraint implementation break; case 107: -#line 807 "bison_parser.y" +#line 808 "bison_parser.y" { (yyval.bval) = true; } -#line 3810 "bison_parser.cpp" +#line 3811 "bison_parser.cpp" break; case 108: -#line 810 "bison_parser.y" +#line 811 "bison_parser.y" { (yyval.bval) = false; } -#line 3818 "bison_parser.cpp" +#line 3819 "bison_parser.cpp" break; case 109: +<<<<<<< HEAD #line 816 "bison_parser.y" >>>>>>> WIP +======= +#line 817 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { (yyval.select_stmt) = new SelectStatement(); (yyval.select_stmt)->limit = (yyvsp[-5].limit); @@ -4380,6 +4580,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } <<<<<<< HEAD +<<<<<<< HEAD #line 3833 "bison_parser.cpp" break; @@ -4429,59 +4630,67 @@ YYLTYPE yylloc = yyloc_default; #line 853 "bison_parser.y" ======= #line 3832 "bison_parser.cpp" +======= +#line 3833 "bison_parser.cpp" +>>>>>>> refines the tablekeyconstraint implementation break; case 110: -#line 828 "bison_parser.y" +#line 829 "bison_parser.y" { (yyval.bval) = true; } -#line 3838 "bison_parser.cpp" +#line 3839 "bison_parser.cpp" break; case 111: -#line 829 "bison_parser.y" +#line 830 "bison_parser.y" { (yyval.bval) = false; } -#line 3844 "bison_parser.cpp" +#line 3845 "bison_parser.cpp" break; case 113: -#line 837 "bison_parser.y" +#line 838 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 3850 "bison_parser.cpp" +#line 3851 "bison_parser.cpp" break; case 114: -#line 838 "bison_parser.y" +#line 839 "bison_parser.y" { (yyval.table) = nullptr; } -#line 3856 "bison_parser.cpp" +#line 3857 "bison_parser.cpp" break; case 115: -#line 842 "bison_parser.y" +#line 843 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 3862 "bison_parser.cpp" +#line 3863 "bison_parser.cpp" break; case 116: -#line 847 "bison_parser.y" +#line 848 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 3868 "bison_parser.cpp" +#line 3869 "bison_parser.cpp" break; case 117: -#line 848 "bison_parser.y" +#line 849 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 3874 "bison_parser.cpp" +#line 3875 "bison_parser.cpp" break; case 118: +<<<<<<< HEAD #line 852 "bison_parser.y" >>>>>>> WIP +======= +#line 853 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { (yyval.group_t) = new GroupByDescription(); (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } <<<<<<< HEAD +<<<<<<< HEAD #line 3885 "bison_parser.cpp" break; @@ -4639,69 +4848,73 @@ YYLTYPE yylloc = yyloc_default; #line 921 "bison_parser.y" ======= #line 3884 "bison_parser.cpp" +======= +#line 3885 "bison_parser.cpp" +>>>>>>> refines the tablekeyconstraint implementation break; case 119: -#line 857 "bison_parser.y" +#line 858 "bison_parser.y" { (yyval.group_t) = nullptr; } -#line 3890 "bison_parser.cpp" +#line 3891 "bison_parser.cpp" break; case 120: -#line 861 "bison_parser.y" +#line 862 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 3896 "bison_parser.cpp" +#line 3897 "bison_parser.cpp" break; case 121: -#line 862 "bison_parser.y" +#line 863 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 3902 "bison_parser.cpp" +#line 3903 "bison_parser.cpp" break; case 122: -#line 866 "bison_parser.y" +#line 867 "bison_parser.y" { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 3908 "bison_parser.cpp" +#line 3909 "bison_parser.cpp" break; case 123: -#line 867 "bison_parser.y" +#line 868 "bison_parser.y" { (yyval.order_vec) = nullptr; } -#line 3914 "bison_parser.cpp" +#line 3915 "bison_parser.cpp" break; case 124: -#line 871 "bison_parser.y" +#line 872 "bison_parser.y" { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 3920 "bison_parser.cpp" +#line 3921 "bison_parser.cpp" break; case 125: -#line 872 "bison_parser.y" +#line 873 "bison_parser.y" { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 3926 "bison_parser.cpp" +#line 3927 "bison_parser.cpp" break; case 126: -#line 876 "bison_parser.y" +#line 877 "bison_parser.y" { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 3932 "bison_parser.cpp" +#line 3933 "bison_parser.cpp" break; case 127: -#line 880 "bison_parser.y" +#line 881 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 3938 "bison_parser.cpp" +#line 3939 "bison_parser.cpp" break; case 128: -#line 881 "bison_parser.y" +#line 882 "bison_parser.y" { (yyval.order_type) = kOrderDesc; } -#line 3944 "bison_parser.cpp" +#line 3945 "bison_parser.cpp" break; case 129: +<<<<<<< HEAD #line 882 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } #line 3950 "bison_parser.cpp" @@ -5175,383 +5388,489 @@ YYLTYPE yylloc = yyloc_default; #line 1092 "bison_parser.y" ======= #line 4046 "bison_parser.cpp" +======= +#line 883 "bison_parser.y" + { (yyval.order_type) = kOrderAsc; } +#line 3951 "bison_parser.cpp" + break; + + case 130: +#line 889 "bison_parser.y" + { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } +#line 3957 "bison_parser.cpp" + break; + + case 131: +#line 890 "bison_parser.y" + { (yyval.limit) = nullptr; } +#line 3963 "bison_parser.cpp" + break; + + case 132: +#line 894 "bison_parser.y" + { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } +#line 3969 "bison_parser.cpp" + break; + + case 133: +#line 895 "bison_parser.y" + { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } +#line 3975 "bison_parser.cpp" + break; + + case 134: +#line 896 "bison_parser.y" + { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } +#line 3981 "bison_parser.cpp" + break; + + case 135: +#line 897 "bison_parser.y" + { (yyval.limit) = new LimitDescription(nullptr, nullptr); } +#line 3987 "bison_parser.cpp" + break; + + case 136: +#line 898 "bison_parser.y" + { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } +#line 3993 "bison_parser.cpp" + break; + + case 137: +#line 899 "bison_parser.y" + { (yyval.limit) = nullptr; } +#line 3999 "bison_parser.cpp" + break; + + case 138: +#line 906 "bison_parser.y" + { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } +#line 4005 "bison_parser.cpp" + break; + + case 139: +#line 907 "bison_parser.y" + { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } +#line 4011 "bison_parser.cpp" + break; + + case 140: +#line 911 "bison_parser.y" + { (yyval.expr_vec) = (yyvsp[0].expr_vec); } +#line 4017 "bison_parser.cpp" + break; + + case 141: +#line 912 "bison_parser.y" + { (yyval.expr_vec) = nullptr; } +#line 4023 "bison_parser.cpp" + break; + + case 142: +#line 916 "bison_parser.y" + { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } +#line 4029 "bison_parser.cpp" + break; + + case 143: +#line 917 "bison_parser.y" + { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } +#line 4035 "bison_parser.cpp" + break; + + case 144: +#line 921 "bison_parser.y" + { + (yyval.expr) = (yyvsp[-1].expr); + if ((yyvsp[0].alias_t)) { + (yyval.expr)->alias = strdup((yyvsp[0].alias_t)->name); + delete (yyvsp[0].alias_t); + } + } +#line 4047 "bison_parser.cpp" +>>>>>>> refines the tablekeyconstraint implementation break; case 150: -#line 938 "bison_parser.y" +#line 939 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); } -#line 4052 "bison_parser.cpp" +#line 4053 "bison_parser.cpp" break; case 160: -#line 948 "bison_parser.y" +#line 949 "bison_parser.y" { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 4058 "bison_parser.cpp" +#line 4059 "bison_parser.cpp" break; case 163: -#line 957 "bison_parser.y" +#line 958 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 4064 "bison_parser.cpp" +#line 4065 "bison_parser.cpp" break; case 164: -#line 958 "bison_parser.y" +#line 959 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 4070 "bison_parser.cpp" +#line 4071 "bison_parser.cpp" break; case 165: -#line 959 "bison_parser.y" +#line 960 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 4076 "bison_parser.cpp" +#line 4077 "bison_parser.cpp" break; case 166: -#line 960 "bison_parser.y" +#line 961 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 4082 "bison_parser.cpp" +#line 4083 "bison_parser.cpp" break; case 167: -#line 961 "bison_parser.y" +#line 962 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 4088 "bison_parser.cpp" +#line 4089 "bison_parser.cpp" break; case 169: -#line 966 "bison_parser.y" +#line 967 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 4094 "bison_parser.cpp" +#line 4095 "bison_parser.cpp" break; case 170: -#line 967 "bison_parser.y" +#line 968 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 4100 "bison_parser.cpp" +#line 4101 "bison_parser.cpp" break; case 171: -#line 968 "bison_parser.y" +#line 969 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 4106 "bison_parser.cpp" +#line 4107 "bison_parser.cpp" break; case 172: -#line 969 "bison_parser.y" +#line 970 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 4112 "bison_parser.cpp" +#line 4113 "bison_parser.cpp" break; case 173: -#line 970 "bison_parser.y" +#line 971 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 4118 "bison_parser.cpp" +#line 4119 "bison_parser.cpp" break; case 174: -#line 971 "bison_parser.y" +#line 972 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 4124 "bison_parser.cpp" +#line 4125 "bison_parser.cpp" break; case 175: -#line 972 "bison_parser.y" +#line 973 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 4130 "bison_parser.cpp" +#line 4131 "bison_parser.cpp" break; case 176: -#line 973 "bison_parser.y" +#line 974 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 4136 "bison_parser.cpp" +#line 4137 "bison_parser.cpp" break; case 177: -#line 974 "bison_parser.y" +#line 975 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 4142 "bison_parser.cpp" +#line 4143 "bison_parser.cpp" break; case 178: -#line 975 "bison_parser.y" +#line 976 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 4148 "bison_parser.cpp" +#line 4149 "bison_parser.cpp" break; case 179: -#line 979 "bison_parser.y" +#line 980 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 4154 "bison_parser.cpp" +#line 4155 "bison_parser.cpp" break; case 180: -#line 980 "bison_parser.y" +#line 981 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 4160 "bison_parser.cpp" +#line 4161 "bison_parser.cpp" break; case 181: -#line 984 "bison_parser.y" +#line 985 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 4166 "bison_parser.cpp" +#line 4167 "bison_parser.cpp" break; case 182: -#line 985 "bison_parser.y" +#line 986 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 4172 "bison_parser.cpp" +#line 4173 "bison_parser.cpp" break; case 183: -#line 986 "bison_parser.y" +#line 987 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 4178 "bison_parser.cpp" +#line 4179 "bison_parser.cpp" break; case 184: -#line 987 "bison_parser.y" +#line 988 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 4184 "bison_parser.cpp" +#line 4185 "bison_parser.cpp" break; case 185: -#line 993 "bison_parser.y" +#line 994 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } -#line 4190 "bison_parser.cpp" +#line 4191 "bison_parser.cpp" break; case 186: -#line 994 "bison_parser.y" +#line 995 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4196 "bison_parser.cpp" +#line 4197 "bison_parser.cpp" break; case 187: -#line 995 "bison_parser.y" +#line 996 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } -#line 4202 "bison_parser.cpp" +#line 4203 "bison_parser.cpp" break; case 188: -#line 996 "bison_parser.y" +#line 997 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4208 "bison_parser.cpp" +#line 4209 "bison_parser.cpp" break; case 189: -#line 1000 "bison_parser.y" +#line 1001 "bison_parser.y" { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4214 "bison_parser.cpp" +#line 4215 "bison_parser.cpp" break; case 190: -#line 1001 "bison_parser.y" +#line 1002 "bison_parser.y" { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4220 "bison_parser.cpp" +#line 4221 "bison_parser.cpp" break; case 191: -#line 1005 "bison_parser.y" +#line 1006 "bison_parser.y" { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 4226 "bison_parser.cpp" +#line 4227 "bison_parser.cpp" break; case 192: -#line 1006 "bison_parser.y" +#line 1007 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 4232 "bison_parser.cpp" +#line 4233 "bison_parser.cpp" break; case 193: -#line 1010 "bison_parser.y" +#line 1011 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4238 "bison_parser.cpp" +#line 4239 "bison_parser.cpp" break; case 194: -#line 1011 "bison_parser.y" +#line 1012 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4244 "bison_parser.cpp" +#line 4245 "bison_parser.cpp" break; case 195: -#line 1012 "bison_parser.y" +#line 1013 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 4250 "bison_parser.cpp" +#line 4251 "bison_parser.cpp" break; case 196: -#line 1013 "bison_parser.y" +#line 1014 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 4256 "bison_parser.cpp" +#line 4257 "bison_parser.cpp" break; case 197: -#line 1014 "bison_parser.y" +#line 1015 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 4262 "bison_parser.cpp" +#line 4263 "bison_parser.cpp" break; case 198: -#line 1015 "bison_parser.y" +#line 1016 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 4268 "bison_parser.cpp" +#line 4269 "bison_parser.cpp" break; case 199: -#line 1016 "bison_parser.y" +#line 1017 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 4274 "bison_parser.cpp" +#line 4275 "bison_parser.cpp" break; case 200: -#line 1020 "bison_parser.y" +#line 1021 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 4280 "bison_parser.cpp" +#line 4281 "bison_parser.cpp" break; case 201: -#line 1021 "bison_parser.y" +#line 1022 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 4286 "bison_parser.cpp" +#line 4287 "bison_parser.cpp" break; case 202: -#line 1025 "bison_parser.y" +#line 1026 "bison_parser.y" { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } -#line 4292 "bison_parser.cpp" +#line 4293 "bison_parser.cpp" break; case 203: -#line 1029 "bison_parser.y" +#line 1030 "bison_parser.y" { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } -#line 4298 "bison_parser.cpp" +#line 4299 "bison_parser.cpp" break; case 204: -#line 1033 "bison_parser.y" +#line 1034 "bison_parser.y" { (yyval.datetime_field) = kDatetimeSecond; } -#line 4304 "bison_parser.cpp" +#line 4305 "bison_parser.cpp" break; case 205: -#line 1034 "bison_parser.y" +#line 1035 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMinute; } -#line 4310 "bison_parser.cpp" +#line 4311 "bison_parser.cpp" break; case 206: -#line 1035 "bison_parser.y" +#line 1036 "bison_parser.y" { (yyval.datetime_field) = kDatetimeHour; } -#line 4316 "bison_parser.cpp" +#line 4317 "bison_parser.cpp" break; case 207: -#line 1036 "bison_parser.y" +#line 1037 "bison_parser.y" { (yyval.datetime_field) = kDatetimeDay; } -#line 4322 "bison_parser.cpp" +#line 4323 "bison_parser.cpp" break; case 208: -#line 1037 "bison_parser.y" +#line 1038 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMonth; } -#line 4328 "bison_parser.cpp" +#line 4329 "bison_parser.cpp" break; case 209: -#line 1038 "bison_parser.y" +#line 1039 "bison_parser.y" { (yyval.datetime_field) = kDatetimeYear; } -#line 4334 "bison_parser.cpp" +#line 4335 "bison_parser.cpp" break; case 210: -#line 1042 "bison_parser.y" +#line 1043 "bison_parser.y" { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 4340 "bison_parser.cpp" +#line 4341 "bison_parser.cpp" break; case 211: -#line 1046 "bison_parser.y" +#line 1047 "bison_parser.y" { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 4346 "bison_parser.cpp" +#line 4347 "bison_parser.cpp" break; case 212: -#line 1050 "bison_parser.y" +#line 1051 "bison_parser.y" { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4352 "bison_parser.cpp" +#line 4353 "bison_parser.cpp" break; case 213: -#line 1054 "bison_parser.y" +#line 1055 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 4358 "bison_parser.cpp" +#line 4359 "bison_parser.cpp" break; case 214: -#line 1055 "bison_parser.y" +#line 1056 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 4364 "bison_parser.cpp" +#line 4365 "bison_parser.cpp" break; case 215: -#line 1056 "bison_parser.y" +#line 1057 "bison_parser.y" { (yyval.expr) = Expr::makeStar(); } -#line 4370 "bison_parser.cpp" +#line 4371 "bison_parser.cpp" break; case 216: -#line 1057 "bison_parser.y" +#line 1058 "bison_parser.y" { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 4376 "bison_parser.cpp" +#line 4377 "bison_parser.cpp" break; case 222: -#line 1069 "bison_parser.y" +#line 1070 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 4382 "bison_parser.cpp" +#line 4383 "bison_parser.cpp" break; case 223: -#line 1073 "bison_parser.y" +#line 1074 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(true); } -#line 4388 "bison_parser.cpp" +#line 4389 "bison_parser.cpp" break; case 224: -#line 1074 "bison_parser.y" +#line 1075 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(false); } -#line 4394 "bison_parser.cpp" +#line 4395 "bison_parser.cpp" break; case 225: -#line 1078 "bison_parser.y" +#line 1079 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 4400 "bison_parser.cpp" +#line 4401 "bison_parser.cpp" break; case 227: -#line 1083 "bison_parser.y" +#line 1084 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 4406 "bison_parser.cpp" +#line 4407 "bison_parser.cpp" break; case 228: -#line 1087 "bison_parser.y" +#line 1088 "bison_parser.y" { (yyval.expr) = Expr::makeNullLiteral(); } -#line 4412 "bison_parser.cpp" +#line 4413 "bison_parser.cpp" break; case 229: +<<<<<<< HEAD #line 1091 "bison_parser.y" >>>>>>> WIP +======= +#line 1092 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { (yyval.expr) = Expr::makeParameter(yylloc.total_column); (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } <<<<<<< HEAD +<<<<<<< HEAD #line 4423 "bison_parser.cpp" break; @@ -5564,6 +5883,13 @@ YYLTYPE yylloc = yyloc_default; case 231: #line 1104 "bison_parser.y" >>>>>>> WIP +======= +#line 4423 "bison_parser.cpp" + break; + + case 231: +#line 1105 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); auto tbl = new TableRef(kTableCrossProduct); @@ -5571,6 +5897,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.table) = tbl; } <<<<<<< HEAD +<<<<<<< HEAD #line 4434 "bison_parser.cpp" break; @@ -5583,6 +5910,13 @@ YYLTYPE yylloc = yyloc_default; case 235: #line 1120 "bison_parser.y" >>>>>>> WIP +======= +#line 4434 "bison_parser.cpp" + break; + + case 235: +#line 1121 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { auto tbl = new TableRef(kTableSelect); tbl->select = (yyvsp[-2].select_stmt); @@ -5590,6 +5924,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.table) = tbl; } <<<<<<< HEAD +<<<<<<< HEAD #line 4445 "bison_parser.cpp" break; @@ -5609,23 +5944,30 @@ YYLTYPE yylloc = yyloc_default; #line 1136 "bison_parser.y" ======= #line 4444 "bison_parser.cpp" +======= +#line 4445 "bison_parser.cpp" +>>>>>>> refines the tablekeyconstraint implementation break; case 236: -#line 1129 "bison_parser.y" +#line 1130 "bison_parser.y" { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 4450 "bison_parser.cpp" +#line 4451 "bison_parser.cpp" break; case 237: -#line 1130 "bison_parser.y" +#line 1131 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 4456 "bison_parser.cpp" +#line 4457 "bison_parser.cpp" break; case 238: +<<<<<<< HEAD #line 1135 "bison_parser.y" >>>>>>> WIP +======= +#line 1136 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { auto tbl = new TableRef(kTableName); tbl->schema = (yyvsp[-1].table_name).schema; @@ -5634,6 +5976,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.table) = tbl; } <<<<<<< HEAD +<<<<<<< HEAD #line 4469 "bison_parser.cpp" break; @@ -5646,12 +5989,20 @@ YYLTYPE yylloc = yyloc_default; case 239: #line 1146 "bison_parser.y" >>>>>>> WIP +======= +#line 4469 "bison_parser.cpp" + break; + + case 239: +#line 1147 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { (yyval.table) = new TableRef(kTableName); (yyval.table)->schema = (yyvsp[0].table_name).schema; (yyval.table)->name = (yyvsp[0].table_name).name; } <<<<<<< HEAD +<<<<<<< HEAD #line 4479 "bison_parser.cpp" break; @@ -5731,88 +6082,96 @@ YYLTYPE yylloc = yyloc_default; #line 1208 "bison_parser.y" ======= #line 4478 "bison_parser.cpp" +======= +#line 4479 "bison_parser.cpp" +>>>>>>> refines the tablekeyconstraint implementation break; case 240: -#line 1155 "bison_parser.y" +#line 1156 "bison_parser.y" { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} -#line 4484 "bison_parser.cpp" +#line 4485 "bison_parser.cpp" break; case 241: -#line 1156 "bison_parser.y" +#line 1157 "bison_parser.y" { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } -#line 4490 "bison_parser.cpp" +#line 4491 "bison_parser.cpp" break; case 242: -#line 1160 "bison_parser.y" +#line 1161 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4496 "bison_parser.cpp" +#line 4497 "bison_parser.cpp" break; case 243: -#line 1161 "bison_parser.y" +#line 1162 "bison_parser.y" { (yyval.sval) = nullptr;} -#line 4502 "bison_parser.cpp" +#line 4503 "bison_parser.cpp" break; case 244: -#line 1165 "bison_parser.y" +#line 1166 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4508 "bison_parser.cpp" +#line 4509 "bison_parser.cpp" break; case 246: -#line 1171 "bison_parser.y" +#line 1172 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } -#line 4514 "bison_parser.cpp" +#line 4515 "bison_parser.cpp" break; case 248: -#line 1177 "bison_parser.y" +#line 1178 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4520 "bison_parser.cpp" +#line 4521 "bison_parser.cpp" break; case 249: -#line 1182 "bison_parser.y" +#line 1183 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4526 "bison_parser.cpp" +#line 4527 "bison_parser.cpp" break; case 250: -#line 1183 "bison_parser.y" +#line 1184 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4532 "bison_parser.cpp" +#line 4533 "bison_parser.cpp" break; case 252: -#line 1189 "bison_parser.y" +#line 1190 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4538 "bison_parser.cpp" +#line 4539 "bison_parser.cpp" break; case 254: -#line 1199 "bison_parser.y" +#line 1200 "bison_parser.y" { (yyval.with_description_vec) = nullptr; } -#line 4544 "bison_parser.cpp" +#line 4545 "bison_parser.cpp" break; case 255: -#line 1203 "bison_parser.y" +#line 1204 "bison_parser.y" { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } -#line 4550 "bison_parser.cpp" +#line 4551 "bison_parser.cpp" break; case 256: +<<<<<<< HEAD #line 1207 "bison_parser.y" >>>>>>> WIP +======= +#line 1208 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { (yyval.with_description_vec) = new std::vector(); (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); } <<<<<<< HEAD +<<<<<<< HEAD #line 4560 "bison_parser.cpp" break; @@ -5825,11 +6184,19 @@ YYLTYPE yylloc = yyloc_default; case 257: #line 1211 "bison_parser.y" >>>>>>> WIP +======= +#line 4560 "bison_parser.cpp" + break; + + case 257: +#line 1212 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { (yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t)); (yyval.with_description_vec) = (yyvsp[-2].with_description_vec); } <<<<<<< HEAD +<<<<<<< HEAD #line 4569 "bison_parser.cpp" break; @@ -5842,12 +6209,20 @@ YYLTYPE yylloc = yyloc_default; case 258: #line 1218 "bison_parser.y" >>>>>>> WIP +======= +#line 4569 "bison_parser.cpp" + break; + + case 258: +#line 1219 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { (yyval.with_description_t) = new WithDescription(); (yyval.with_description_t)->alias = (yyvsp[-2].sval); (yyval.with_description_t)->select = (yyvsp[0].select_stmt); } <<<<<<< HEAD +<<<<<<< HEAD #line 4579 "bison_parser.cpp" break; @@ -5860,6 +6235,13 @@ YYLTYPE yylloc = yyloc_default; case 259: #line 1232 "bison_parser.y" >>>>>>> WIP +======= +#line 4579 "bison_parser.cpp" + break; + + case 259: +#line 1233 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -5868,6 +6250,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->right = (yyvsp[0].table); } <<<<<<< HEAD +<<<<<<< HEAD #line 4591 "bison_parser.cpp" break; @@ -5880,6 +6263,13 @@ YYLTYPE yylloc = yyloc_default; case 260: #line 1240 "bison_parser.y" >>>>>>> WIP +======= +#line 4591 "bison_parser.cpp" + break; + + case 260: +#line 1241 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -5889,6 +6279,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->condition = (yyvsp[0].expr); } <<<<<<< HEAD +<<<<<<< HEAD #line 4604 "bison_parser.cpp" break; @@ -5901,6 +6292,13 @@ YYLTYPE yylloc = yyloc_default; case 261: #line 1250 "bison_parser.y" >>>>>>> WIP +======= +#line 4604 "bison_parser.cpp" + break; + + case 261: +#line 1251 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -5917,6 +6315,7 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[-1].expr); } <<<<<<< HEAD +<<<<<<< HEAD #line 4624 "bison_parser.cpp" break; @@ -5996,83 +6395,90 @@ YYLTYPE yylloc = yyloc_default; #line 4700 "bison_parser.cpp" ======= #line 4623 "bison_parser.cpp" +======= +#line 4624 "bison_parser.cpp" +>>>>>>> refines the tablekeyconstraint implementation break; case 262: -#line 1268 "bison_parser.y" +#line 1269 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4629 "bison_parser.cpp" +#line 4630 "bison_parser.cpp" break; case 263: -#line 1269 "bison_parser.y" +#line 1270 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4635 "bison_parser.cpp" +#line 4636 "bison_parser.cpp" break; case 264: -#line 1270 "bison_parser.y" +#line 1271 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4641 "bison_parser.cpp" +#line 4642 "bison_parser.cpp" break; case 265: -#line 1271 "bison_parser.y" +#line 1272 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4647 "bison_parser.cpp" +#line 4648 "bison_parser.cpp" break; case 266: -#line 1272 "bison_parser.y" +#line 1273 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4653 "bison_parser.cpp" +#line 4654 "bison_parser.cpp" break; case 267: -#line 1273 "bison_parser.y" +#line 1274 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4659 "bison_parser.cpp" +#line 4660 "bison_parser.cpp" break; case 268: -#line 1274 "bison_parser.y" +#line 1275 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4665 "bison_parser.cpp" +#line 4666 "bison_parser.cpp" break; case 269: -#line 1275 "bison_parser.y" +#line 1276 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4671 "bison_parser.cpp" +#line 4672 "bison_parser.cpp" break; case 270: -#line 1276 "bison_parser.y" +#line 1277 "bison_parser.y" { (yyval.uval) = kJoinCross; } -#line 4677 "bison_parser.cpp" +#line 4678 "bison_parser.cpp" break; case 271: -#line 1277 "bison_parser.y" +#line 1278 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4683 "bison_parser.cpp" +#line 4684 "bison_parser.cpp" break; case 275: -#line 1297 "bison_parser.y" +#line 1298 "bison_parser.y" { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 4689 "bison_parser.cpp" +#line 4690 "bison_parser.cpp" break; case 276: -#line 1298 "bison_parser.y" +#line 1299 "bison_parser.y" { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 4695 "bison_parser.cpp" +#line 4696 "bison_parser.cpp" break; +<<<<<<< HEAD #line 4699 "bison_parser.cpp" >>>>>>> WIP +======= +#line 4700 "bison_parser.cpp" +>>>>>>> refines the tablekeyconstraint implementation default: break; } @@ -6311,10 +6717,14 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } <<<<<<< HEAD +<<<<<<< HEAD #line 1302 "bison_parser.y" ======= #line 1301 "bison_parser.y" >>>>>>> WIP +======= +#line 1302 "bison_parser.y" +>>>>>>> refines the tablekeyconstraint implementation /********************************* ** Section 4: Additional C code diff --git a/src/parser/bison_parser.h b/src/parser/bison_parser.h index 9ba9f637..4bd97e05 100644 --- a/src/parser/bison_parser.h +++ b/src/parser/bison_parser.h @@ -274,11 +274,7 @@ union HSQL_STYPE hsql::DatetimeField datetime_field; hsql::LimitDescription* limit; hsql::ColumnDefinition* column_t; -<<<<<<< HEAD hsql::TableKeyConstraint* table_key_constraint_t; -======= - hsql::TableKeyConstraint table_key_constraint_t; ->>>>>>> WIP hsql::ColumnType column_type_t; hsql::ImportType import_type_t; hsql::GroupByDescription* group_t; @@ -295,11 +291,7 @@ union HSQL_STYPE std::vector* expr_vec; std::vector* order_vec; std::vector* with_description_vec; -<<<<<<< HEAD std::vector* table_key_constraint_vec; -======= - std::vector table_key_constraint_vec; ->>>>>>> WIP #line 297 "bison_parser.h" diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index ae2a3740..b444d126 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -122,11 +122,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha hsql::DatetimeField datetime_field; hsql::LimitDescription* limit; hsql::ColumnDefinition* column_t; -<<<<<<< HEAD hsql::TableKeyConstraint* table_key_constraint_t; -======= - hsql::TableKeyConstraint table_key_constraint_t; ->>>>>>> added tablekeyconstraint to parser hsql::ColumnType column_type_t; hsql::ImportType import_type_t; hsql::GroupByDescription* group_t; @@ -594,7 +590,6 @@ opt_column_nullable: ; opt_table_key_constraints: -<<<<<<< HEAD table_key_constraint {$$ = new std::vector(); $$->push_back($1); } | opt_table_key_constraints table_key_constraint { $1->push_back($2); $$ = $1; } | /* empty */ {$$ = new std::vector(); } @@ -603,16 +598,7 @@ opt_table_key_constraints: table_key_constraint: ',' PRIMARY KEY '(' ident_commalist ')' { $$ = new TableKeyConstraint(KeyType::PRIMARY_KEY, $5); } | ',' UNIQUE '(' ident_commalist ')' { $$ = new TableKeyConstraint(KeyType::UNIQUE, $4); } -======= - table_key_constraint {$$ = new std::vector(); $$->push_back($1); } - | opt_table_key_constraints table_key_constraint { $1->push_back($2); $$ = $1; } - | /* empty */ {$$ = new std::vector(); } - ; -table_key_constraint: - ',' PRIMARY KEY '(' ident_commalist ')' { $$ = TableKeyConstraint{KeyType::PRIMARY_KEY, $5}; } - | ',' UNIQUE '(' ident_commalist ')' { $$ = TableKeyConstraint{KeyType::UNIQUE, $4}; } ->>>>>>> added tablekeyconstraint to parser /****************************** * Drop Statement * DROP TABLE students; From 94aa80d2b27263c96b8e179b47c641384f273c9b Mon Sep 17 00:00:00 2001 From: simonstadlinger Date: Sat, 17 Jul 2021 10:35:38 +0200 Subject: [PATCH 24/73] Switch if exists flag and index name --- src/parser/bison_parser.cpp | 1176 ++++++++++++++++++----------------- src/parser/bison_parser.y | 6 +- 2 files changed, 600 insertions(+), 582 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 4e0aedd2..f1b72c24 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -736,7 +736,7 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 64 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 736 +#define YYLAST 823 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 173 @@ -940,7 +940,7 @@ static const yytype_int16 yytoknum[] = }; #endif -#define YYPACT_NINF (-379) +#define YYPACT_NINF (-376) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -954,57 +954,57 @@ static const yytype_int16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - 521, 41, 78, 97, 160, 78, 112, 38, 74, 108, - 78, 78, 125, 15, 172, 39, 39, 39, 239, 98, - -379, 159, -379, 159, -379, -379, -379, -379, -379, -379, - -379, -379, -379, -379, -379, -3, -379, 266, 110, -379, - 116, 204, -379, 301, 183, 183, 78, 307, 78, 194, - -379, -55, 314, 201, 201, 78, -379, 209, 161, -379, - -379, -379, -379, -379, -379, 516, -379, 243, -379, -379, - 217, -3, 81, -379, 21, -379, 342, 12, 343, -379, - 183, 226, 78, 78, 275, -379, 256, 210, 358, 394, - 394, -379, 271, 360, 78, 78, -379, 236, 172, -379, - 237, 400, 396, 241, 242, -379, -379, -379, -3, 294, - 286, -3, -14, -379, -379, -379, -379, -379, -379, -379, - -379, 245, 244, -379, -379, -379, -379, -379, -379, -379, - -379, -379, 284, 373, -60, 210, 297, -379, 394, 417, - 42, 274, -57, -379, 312, -379, 312, 78, -379, -379, - -379, -379, -379, 422, -379, -379, 297, -379, -379, 352, - -379, -379, 81, -379, -379, 297, 352, 297, 147, -379, - -379, 12, 78, -379, 428, 321, 430, 310, 63, 269, - 276, 277, 153, 318, 280, 332, -379, 208, 174, 359, - -379, -379, -379, -379, -379, -379, -379, -379, -379, -379, - -379, -379, -379, -379, -379, -379, 344, -379, 35, 279, - -379, 297, 358, -379, 399, -379, -379, -379, 281, 93, - -379, 349, 278, -379, 66, -14, -3, 282, -379, 113, - -14, 174, 401, -27, -379, 283, 362, -379, 395, 158, - -379, 321, 11, 16, 405, 233, 297, 297, 126, 71, - 291, 332, 552, 297, 86, 298, -52, 297, 297, 332, - -379, 332, -18, 300, 0, 332, 332, 332, 332, 332, - 332, 332, 332, 332, 332, 332, 332, 332, 332, 332, - 400, 78, -379, 465, 12, 174, -379, 307, 12, -379, - 422, 10, 275, -379, 297, -379, 467, -379, -379, -379, - -379, 297, -379, -379, -379, -379, 297, 297, 417, 394, - -379, 441, -379, 305, 306, -379, -379, 309, -379, -379, - -379, -379, -379, -379, 195, -379, 430, -379, -379, 297, - -379, -379, 313, -379, -379, -379, -379, -379, -379, 391, - 128, 102, 119, 297, 297, -379, 405, 388, -47, -379, - -379, -379, 375, 495, 571, 332, 328, 208, -379, 393, - 333, 571, 571, 571, 571, 232, 232, 232, 232, 86, - 86, -36, -36, -36, -97, 334, -379, -379, 163, -379, - 185, -379, 321, -379, -5, -379, 331, -379, 23, -379, - 436, -379, -379, -379, 174, 174, 187, -379, 339, 506, - 519, 520, -379, 424, -379, -379, 191, -379, 297, 395, - 297, 297, -379, 127, 131, 361, -379, 332, 571, 208, - 364, 214, -379, -379, -379, -379, 365, 432, -379, -379, - -379, 457, 458, 460, 442, 10, 536, -379, -379, -379, - 416, -379, -379, 538, 374, 378, 381, -379, -379, 55, - 382, 174, 177, -379, 297, -379, 552, 383, 218, -379, - -379, 23, 10, -379, -379, -379, 10, 14, 386, 297, - 390, 548, -379, -379, -379, -379, -379, 174, -379, -379, - -379, -379, 200, 417, -22, -379, 397, 392, 297, 228, - 297, -379, -379, 18, 174, -379, -379, 174, 402, 398, - -379 + 444, 17, 90, 115, 176, 90, 22, -37, 68, 6, + 90, 90, 54, 20, 186, 65, 65, 65, 198, 50, + -376, 124, -376, 124, -376, -376, -376, -376, -376, -376, + -376, -376, -376, -376, -376, -38, -376, 237, 112, -376, + 118, 195, -376, 163, 163, 163, 90, 294, 90, 179, + -376, -27, 299, 188, 188, 90, -376, 199, 154, -376, + -376, -376, -376, -376, -376, 543, -376, 231, -376, -376, + 207, -38, 19, -376, 18, -376, 328, 16, 330, 212, + 332, 90, 90, 256, -376, 247, 173, 338, 340, 340, + -376, 215, 306, 90, 90, -376, 190, 186, -376, 191, + 357, 352, 197, 202, -376, -376, -376, -38, 255, 246, + -38, 78, -376, -376, -376, -376, -376, -376, -376, -376, + 209, 208, -376, -376, -376, -376, -376, -376, -376, -376, + -376, 342, -376, 264, -44, 173, 253, -376, 340, 395, + 130, 251, -64, -376, 290, -376, 290, 90, -376, -376, + -376, -376, -376, 400, -376, -376, 253, -376, -376, 331, + -376, -376, 19, -376, -376, 253, 331, 253, 110, -376, + -376, 16, -376, 90, 403, 297, 406, 286, 104, 244, + 248, 249, 200, 301, 252, 385, -376, 233, 66, 412, + -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, + -376, -376, -376, -376, -376, -376, 317, -376, -126, 257, + -376, 253, 338, -376, 370, -376, -376, -376, 259, -100, + -376, 326, 265, -376, 38, 78, -38, 266, -376, -42, + 78, 66, 368, -29, -376, 260, 336, -376, 705, 73, + -376, 297, 14, 12, 366, 155, 253, 253, -49, 75, + 263, 385, 476, 253, 100, 267, -91, 253, 253, 385, + -376, 385, -41, 271, 81, 385, 385, 385, 385, 385, + 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + 357, 90, -376, 436, 16, 66, -376, 294, 16, -376, + 400, 11, 256, -376, 253, -376, 437, -376, -376, -376, + -376, 253, -376, -376, -376, -376, 253, 253, 395, 340, + -376, 411, -376, 275, 278, -376, -376, 279, -376, -376, + -376, -376, -376, -376, 129, -376, 406, -376, -376, 253, + -376, -376, 280, -376, -376, -376, -376, -376, -376, 354, + 97, 69, 86, 253, 253, -376, 366, 349, 51, -376, + -376, -376, 339, 544, 563, 385, 283, 233, -376, 351, + 287, 563, 563, 563, 563, 599, 599, 599, 599, 100, + 100, -96, -96, -96, 30, 291, -376, -376, 83, -376, + 140, -376, 297, -376, 10, -376, 285, -376, 27, -376, + 389, -376, -376, -376, 66, 66, 144, -376, 295, 457, + 458, 461, -376, 369, -376, -376, 145, -376, 253, 705, + 253, 253, -376, 111, 85, 307, -376, 385, 563, 233, + 308, 151, -376, -376, -376, -376, 309, 373, -376, -376, + -376, 397, 401, 402, 383, 11, 479, -376, -376, -376, + 360, -376, -376, 480, 316, 321, 322, -376, -376, -78, + 323, 66, 117, -376, 253, -376, 476, 324, 153, -376, + -376, 27, 11, -376, -376, -376, 11, 284, 327, 253, + 325, 491, -376, -376, -376, -376, -376, 66, -376, -376, + -376, -376, 303, 395, -17, -376, 333, 335, 253, 158, + 253, -376, -376, 13, 66, -376, -376, 66, 329, 341, + -376 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -1016,20 +1016,20 @@ static const yytype_int16 yydefact[] = 0, 0, 0, 0, 0, 29, 29, 29, 0, 269, 3, 20, 18, 20, 17, 8, 9, 7, 11, 16, 13, 14, 12, 15, 10, 0, 248, 0, 235, 78, - 32, 0, 43, 238, 50, 50, 0, 0, 0, 0, + 32, 0, 43, 50, 50, 50, 0, 0, 0, 0, 234, 0, 0, 76, 76, 0, 41, 0, 250, 251, 28, 25, 27, 26, 1, 249, 2, 0, 6, 5, - 126, 0, 87, 88, 118, 73, 0, 136, 0, 237, - 50, 0, 0, 0, 112, 36, 0, 82, 0, 0, - 0, 239, 0, 0, 0, 0, 42, 0, 0, 4, - 0, 0, 106, 0, 0, 100, 101, 99, 0, 103, - 0, 0, 132, 236, 217, 220, 222, 223, 218, 219, - 224, 0, 135, 137, 212, 213, 214, 221, 215, 216, - 31, 30, 0, 0, 0, 82, 0, 77, 0, 0, + 126, 0, 87, 88, 118, 73, 0, 136, 0, 0, + 238, 0, 0, 112, 36, 0, 82, 0, 0, 0, + 239, 0, 0, 0, 0, 42, 0, 0, 4, 0, + 0, 106, 0, 0, 100, 101, 99, 0, 103, 0, + 0, 132, 236, 217, 220, 222, 223, 218, 219, 224, + 0, 135, 137, 212, 213, 214, 221, 215, 216, 31, + 30, 0, 237, 0, 0, 82, 0, 77, 0, 0, 0, 0, 112, 84, 39, 37, 39, 0, 75, 71, 72, 253, 252, 0, 125, 105, 0, 95, 94, 118, 91, 90, 92, 102, 98, 0, 118, 0, 0, 96, - 33, 0, 0, 49, 0, 249, 0, 0, 208, 0, + 33, 0, 49, 0, 0, 249, 0, 0, 208, 0, 0, 0, 0, 0, 0, 0, 210, 0, 111, 140, 147, 148, 149, 142, 144, 150, 143, 163, 151, 152, 153, 154, 146, 141, 156, 157, 0, 270, 0, 0, @@ -1068,32 +1068,32 @@ static const yytype_int16 yydefact[] = /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -379, -379, -379, 497, -379, 540, -379, 285, -379, 27, - -379, -379, -379, -379, 287, -83, 418, -379, -379, -379, - -9, -379, 250, 168, -379, -379, 515, -379, -379, -379, - 435, -379, -379, 367, -165, -96, -379, -11, -70, -39, - -379, -379, -66, 338, -379, -379, -379, -120, -379, -379, - -118, -379, 288, -379, -379, -29, -251, -379, -225, 290, - -136, -133, -379, -379, -379, -379, -379, -379, 337, -379, - -379, -379, -379, -379, -379, -379, -379, -379, 88, -69, - -85, -379, -379, -92, -379, -379, -379, -378, 120, -379, - -379, -379, 1, -379, -379, -379, 129, 363, -379, -379, - -379, -379, 488, -379, -379, -379, -379, -294 + -376, -376, -376, 434, -376, 477, -376, 213, -376, 250, + -376, -376, -376, -376, 217, -80, 361, -376, -376, -376, + 82, -376, 182, 101, -376, -376, 459, -376, -376, -376, + 376, -376, -376, 302, -167, -66, -376, 29, -70, -50, + -376, -376, -73, 273, -376, -376, -376, -125, -376, -376, + 53, -376, 216, -376, -376, 25, -251, -376, -20, 222, + -136, -131, -376, -376, -376, -376, -376, -376, 272, -376, + -376, -376, -376, -376, -376, -376, -376, -376, 26, -74, + -83, -376, -376, -90, -376, -376, -376, -375, 59, -376, + -376, -376, 2, -376, -376, -376, 61, 300, -376, -376, + -376, -376, 426, -376, -376, -376, -376, -297 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { 0, 18, 19, 20, 21, 68, 219, 220, 22, 61, - 23, 131, 24, 25, 86, 144, 215, 26, 27, 28, - 82, 239, 240, 324, 404, 29, 94, 30, 31, 32, - 140, 33, 142, 143, 34, 159, 160, 161, 73, 108, - 109, 164, 74, 156, 221, 292, 293, 137, 441, 491, - 112, 227, 228, 304, 102, 169, 222, 121, 122, 223, + 23, 130, 24, 25, 85, 144, 215, 26, 27, 28, + 80, 239, 240, 324, 404, 29, 93, 30, 31, 32, + 140, 33, 142, 143, 34, 159, 160, 161, 73, 107, + 108, 164, 74, 156, 221, 292, 293, 137, 441, 491, + 111, 227, 228, 304, 101, 169, 222, 120, 121, 223, 224, 189, 190, 191, 192, 193, 194, 195, 249, 196, 197, 198, 199, 200, 339, 201, 202, 203, 204, 205, - 124, 125, 126, 127, 128, 129, 383, 384, 385, 386, - 387, 49, 388, 80, 92, 437, 438, 439, 298, 35, + 123, 124, 125, 126, 127, 128, 383, 384, 385, 386, + 387, 49, 388, 133, 91, 437, 438, 439, 298, 35, 36, 58, 59, 389, 434, 495, 66, 208 }; @@ -1102,158 +1102,176 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 188, 104, 348, 39, 145, 145, 42, 146, 123, 154, - 237, 50, 51, 38, 396, 166, 114, 115, 116, 330, - 427, 498, 213, 155, 72, 136, 295, 307, 490, 229, - 105, 231, 233, 174, 55, 111, 83, 265, 89, 427, - 167, 225, 162, 62, 63, 162, 248, 84, 230, 87, - 252, 256, 254, 145, 70, 206, 96, 467, 168, 378, - 103, 428, 257, 380, 175, 106, 429, 37, 280, 295, - 210, 132, 430, 431, 56, 285, 327, 90, 406, 258, - 428, 38, 355, 134, 135, 429, 151, 257, 482, 432, - 105, 430, 431, -266, 433, 149, 150, 110, 265, 70, - 40, 107, 234, 358, 258, 209, 421, 176, 432, 356, - 340, 341, -266, 433, 212, 117, 350, 255, 252, 416, - 359, 351, 352, 226, 294, 106, 353, 279, 354, 280, - 300, 46, 360, 361, 362, 363, 364, 365, 366, 367, - 368, 369, 370, 371, 372, 373, 374, 436, 217, 294, - 178, 114, 115, 116, 118, 119, 178, 114, 115, 116, - 162, 107, 343, 41, 71, 229, -231, 47, 458, 257, - 394, 395, 390, 235, 332, 57, 331, 382, 186, 328, - 257, 344, 43, 60, 120, -232, 258, 345, 375, 489, - 296, 44, 179, 180, 181, 52, 299, 258, 179, 180, - 181, 305, 302, 282, 53, 48, 283, 413, 414, 410, - 411, 178, 114, 115, 116, 123, 257, 426, 484, 123, - 265, 45, 418, 474, 145, 427, 397, 257, 303, 344, - 242, 182, 243, 258, 54, 412, 247, 182, 454, 64, - 257, 257, 257, 453, 258, 257, 276, 277, 278, 279, - 117, 280, 409, 179, 180, 181, 117, 258, 258, 258, - 232, 289, 258, 247, 290, 70, 428, 183, 65, 75, - 67, 429, 449, 183, 451, 452, 415, 430, 431, 76, - 184, 487, 376, 77, 456, 260, 184, 420, 257, 118, - 119, 257, 182, 476, 432, 118, 119, 78, 402, 433, - 178, 114, 115, 116, 79, 258, 185, 186, 258, 81, - 85, 117, 185, 186, 187, 403, 88, 91, 477, 120, - 187, 178, 114, 115, 116, 120, 325, 93, 183, 326, - 488, 424, 98, 97, 171, 178, 114, 115, 116, 100, - 101, 184, 179, 180, 181, 113, 133, 130, 138, 457, - 118, 119, 494, 425, 497, 442, 171, 136, 283, 448, - 264, 141, 294, 250, 180, 181, 265, 185, 186, 333, - 334, 335, 336, 337, 338, 187, 259, 139, 180, 181, - 120, 182, 460, -269, -269, 294, 479, -269, -269, 294, - 274, 275, 276, 277, 278, 279, 496, 280, 114, 283, - 117, 147, 182, 71, 153, 148, 116, 163, 155, 157, - 158, 165, 260, 170, 172, 171, 182, 183, 173, 310, - 207, 117, 211, 214, 311, 218, 312, 313, 110, 314, - 184, 236, 14, 238, 241, 117, 244, 315, 251, 118, - 119, 281, 291, 245, 246, 253, 284, 287, 288, 294, - 308, 184, 251, 301, 309, 306, 185, 186, 346, 261, - 118, 119, 70, 316, 187, 184, 349, 357, 377, 120, - 392, 398, 399, 400, 118, 119, 401, 185, 186, 262, - 317, 407, 318, 319, 408, 187, 263, 264, 355, 257, - 120, 185, 186, 265, 266, 419, 422, 320, 280, 187, - 423, 321, 435, 322, 120, 440, 443, 267, 268, 269, - 270, 271, 444, 323, 272, 273, -268, 274, 275, 276, - 277, 278, 279, 1, 280, 445, 446, 447, 1, 455, - 462, 2, 459, 461, 463, 464, 2, 465, 3, 468, - 466, 469, 4, 3, 470, 471, 472, 4, 260, 473, - 475, 478, 5, 483, 486, 6, 7, 5, 485, 493, - 6, 7, 99, 69, 216, 492, 500, 8, 9, 95, - 177, 243, 8, 9, 379, 381, 405, 450, 10, 286, - 329, 499, 481, 10, 391, 342, 152, 297, 0, 393, - 480, 0, 0, 0, 0, 261, 0, 0, 0, 0, - 0, 0, 11, 0, 0, 260, 12, 11, 0, 417, - 0, 12, 0, 0, 0, 347, 0, 0, 0, 0, - 0, 13, 0, 264, 260, 0, 13, 14, 0, 265, - 266, 0, 14, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 267, 268, 269, 270, 271, 0, 0, - 272, 273, 261, 274, 275, 276, 277, 278, 279, 0, - 280, 15, 16, 17, 0, 0, 15, 16, 17, 0, - 0, -269, 347, 0, 0, 0, 0, 0, 0, 0, - 264, 0, 0, 0, 0, 0, 265, 266, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 264, - 267, 268, 269, 270, 271, 265, -269, 272, 273, 0, - 274, 275, 276, 277, 278, 279, 0, 280, 0, -269, - -269, -269, 270, 271, 0, 0, 272, 273, 0, 274, - 275, 276, 277, 278, 279, 0, 280 + 188, 103, 348, 122, 39, 145, 145, 42, 237, 146, + 154, 396, 50, 51, 38, 330, 498, 213, 136, 70, + 113, 114, 115, 257, 110, 307, 155, 104, 104, 229, + 295, 231, 233, 490, 162, 427, 257, 162, 265, 55, + 258, 295, 282, 37, 166, 283, 248, 302, 83, 174, + 86, 256, 252, 258, 254, 145, 46, 95, 206, 355, + 467, 247, 105, 105, 72, 257, 88, 279, 289, 280, + 210, 290, 257, 303, 327, 285, 428, 350, 406, 56, + 175, 429, 258, 134, 135, 257, 356, 430, 431, 258, + 474, 482, 43, 38, 109, 149, 150, 234, 106, 106, + 102, 44, 258, 48, 432, 89, 421, 212, -266, 433, + 340, 341, 226, 178, 113, 114, 115, 255, 40, 116, + 252, 351, 352, 176, 52, 151, 81, 82, 353, 71, + 354, 45, 167, 53, 360, 361, 362, 363, 364, 365, + 366, 367, 368, 369, 370, 371, 372, 373, 374, 217, + 168, 436, 257, 162, 294, 179, 180, 181, 117, 118, + 300, 47, 296, 54, 265, 229, 343, 390, 458, 258, + 394, 395, 331, 186, 332, 235, 410, 411, 382, 41, + 257, -231, 328, 257, 358, 344, 489, 70, 119, 57, + 375, 345, 454, 209, 182, 280, 344, 258, 64, 257, + 258, 359, 412, 178, 113, 114, 115, 413, 414, 60, + 122, 257, 225, 116, 122, 426, 258, 416, 484, 230, + 65, 409, 294, 232, 418, 257, 145, 453, 258, 397, + 183, 257, 402, 476, 265, 67, 178, 113, 114, 115, + 75, 325, 258, 184, 326, 179, 180, 181, 258, 403, + 299, 424, 117, 118, 171, 305, 178, 113, 114, 115, + 276, 277, 278, 279, 378, 280, 62, 63, 380, 185, + 186, 242, 449, 243, 451, 452, 415, 187, 179, 180, + 181, 76, 119, 376, 182, 77, 456, 420, 78, 79, + 70, 333, 334, 335, 336, 337, 338, 84, 179, 180, + 181, 87, 90, 116, 178, 113, 114, 115, 425, 427, + 247, 171, 442, 448, 92, 283, 294, 182, 477, 460, + 183, 479, 294, 96, 294, 97, 496, 99, 427, 283, + 100, 112, 131, 184, 129, 132, 116, 182, 136, 138, + 139, 141, 117, 118, 113, 147, 250, 180, 181, 457, + 428, 148, 494, 183, 497, 429, 116, 71, 153, 185, + 186, 430, 431, 115, 155, 157, 184, 187, 163, 428, + 158, 165, 119, 183, 429, 117, 118, 170, 432, 171, + 430, 431, -266, 433, 487, 182, 184, 172, 178, 113, + 114, 115, 185, 186, 173, 117, 118, 432, 207, 211, + 187, 214, 433, 218, 116, 119, 236, 109, 14, 238, + 241, 244, 185, 186, 281, 245, 246, 253, 287, 291, + 187, 251, 306, 70, 284, 119, 288, 308, 309, 259, + 346, 180, 181, 488, 184, 349, 294, 301, 357, 377, + 392, 398, 399, 117, 118, 400, 401, 408, 407, 355, + 419, 1, 280, 257, 422, -232, 435, 423, 440, 2, + 185, 186, 443, 444, 445, 260, 3, 446, 187, 182, + 4, 462, 447, 119, 463, 455, 459, 461, 464, 465, + 5, 466, 468, 6, 7, 469, 470, 471, 116, 472, + 473, 475, 478, 485, 483, 8, 9, 486, 243, 98, + 69, 492, 493, 381, 379, 251, 10, 216, 405, 500, + 450, 177, 261, 94, 286, 329, 391, 393, 184, 499, + 342, 481, 480, 152, 297, 0, 0, 117, 118, 260, + 11, 0, 262, 0, 12, 0, 0, 0, 0, 263, + 264, 0, 0, -268, 185, 186, 265, 266, 0, 13, + 1, 0, 187, 0, 0, 14, 0, 119, 2, 0, + 267, 268, 269, 270, 271, 3, 0, 272, 273, 4, + 274, 275, 276, 277, 278, 279, 261, 280, 0, 5, + 0, 0, 6, 7, 0, 0, 0, 0, 0, 15, + 16, 17, 0, 0, 8, 9, 347, 260, 0, 0, + 0, 0, 0, 0, 264, 10, 0, 0, 0, 0, + 265, 266, 0, 0, 0, 0, 260, 0, 0, 0, + 0, 0, 0, 0, 267, 268, 269, 270, 271, 11, + 0, 272, 273, 12, 274, 275, 276, 277, 278, 279, + 0, 280, 0, 0, 261, 0, 0, 0, 13, 0, + 0, 0, 260, 0, 14, 0, 0, 0, 417, 0, + 0, 0, 0, -269, 347, 0, 0, 0, 0, 0, + 0, 0, 264, 0, 0, 0, 0, 0, 265, 266, + 0, 0, 0, 0, 0, 0, 0, 0, 15, 16, + 17, 264, 267, 268, 269, 270, 271, 265, -269, 272, + 273, 0, 274, 275, 276, 277, 278, 279, 0, 280, + 0, -269, -269, -269, 270, 271, 0, 0, 272, 273, + 0, 274, 275, 276, 277, 278, 279, 264, 280, 310, + 0, 0, 0, 265, 311, 0, 312, 313, 0, 314, + 0, 0, 0, 0, 0, 0, 0, 315, 0, 0, + -269, -269, 0, 0, -269, -269, 0, 274, 275, 276, + 277, 278, 279, 0, 280, 0, 0, 0, 0, 0, + 0, 0, 0, 316, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 317, 0, 318, 319, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 320, 0, 0, + 0, 321, 0, 322, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 323 }; static const yytype_int16 yycheck[] = { - 136, 71, 253, 2, 89, 90, 5, 90, 77, 101, - 175, 10, 11, 3, 308, 111, 4, 5, 6, 3, - 25, 3, 142, 12, 35, 82, 3, 54, 50, 165, - 9, 167, 168, 93, 19, 74, 45, 134, 93, 25, - 54, 159, 108, 16, 17, 111, 182, 46, 166, 48, - 183, 187, 185, 138, 57, 138, 55, 435, 72, 284, - 71, 66, 114, 288, 124, 44, 71, 26, 165, 3, - 140, 80, 77, 78, 59, 211, 241, 132, 329, 131, - 66, 3, 100, 82, 83, 71, 97, 114, 466, 94, - 9, 77, 78, 98, 99, 94, 95, 76, 134, 57, - 3, 80, 171, 103, 131, 63, 357, 167, 94, 127, - 246, 247, 98, 99, 171, 103, 168, 187, 251, 166, - 120, 257, 258, 162, 171, 44, 259, 163, 261, 165, - 226, 93, 265, 266, 267, 268, 269, 270, 271, 272, - 273, 274, 275, 276, 277, 278, 279, 124, 147, 171, - 3, 4, 5, 6, 142, 143, 3, 4, 5, 6, - 226, 80, 91, 3, 167, 301, 171, 93, 419, 114, - 306, 307, 292, 172, 244, 3, 160, 167, 160, 168, - 114, 110, 70, 144, 172, 171, 131, 116, 280, 483, - 124, 79, 45, 46, 47, 70, 225, 131, 45, 46, - 47, 230, 89, 168, 79, 97, 171, 343, 344, 107, - 91, 3, 4, 5, 6, 284, 114, 382, 469, 288, - 134, 109, 355, 168, 309, 25, 309, 114, 115, 110, - 167, 84, 169, 131, 109, 116, 110, 84, 107, 0, - 114, 114, 114, 116, 131, 114, 160, 161, 162, 163, - 103, 165, 124, 45, 46, 47, 103, 131, 131, 131, - 113, 168, 131, 110, 171, 57, 66, 120, 170, 3, - 111, 71, 408, 120, 410, 411, 346, 77, 78, 169, - 133, 81, 281, 167, 417, 53, 133, 357, 114, 142, - 143, 114, 84, 116, 94, 142, 143, 93, 103, 99, - 3, 4, 5, 6, 3, 131, 159, 160, 131, 126, - 3, 103, 159, 160, 167, 120, 122, 3, 454, 172, - 167, 3, 4, 5, 6, 172, 168, 126, 120, 171, - 130, 168, 171, 124, 171, 3, 4, 5, 6, 96, - 123, 133, 45, 46, 47, 3, 120, 4, 92, 419, - 142, 143, 488, 168, 490, 168, 171, 82, 171, 168, - 128, 3, 171, 45, 46, 47, 134, 159, 160, 136, - 137, 138, 139, 140, 141, 167, 17, 167, 46, 47, - 172, 84, 168, 151, 152, 171, 168, 155, 156, 171, - 158, 159, 160, 161, 162, 163, 168, 165, 4, 171, - 103, 130, 84, 167, 167, 45, 6, 113, 12, 168, - 168, 125, 53, 168, 130, 171, 84, 120, 45, 24, - 3, 103, 148, 111, 29, 3, 31, 32, 76, 34, - 133, 3, 111, 3, 124, 103, 167, 42, 120, 142, - 143, 97, 93, 167, 167, 165, 167, 48, 167, 171, - 167, 133, 120, 171, 92, 54, 159, 160, 167, 100, - 142, 143, 57, 68, 167, 133, 168, 167, 3, 172, - 3, 30, 167, 167, 142, 143, 167, 159, 160, 120, - 85, 168, 87, 88, 93, 167, 127, 128, 100, 114, - 172, 159, 160, 134, 135, 167, 103, 102, 165, 167, - 166, 106, 171, 108, 172, 69, 167, 148, 149, 150, - 151, 152, 6, 118, 155, 156, 0, 158, 159, 160, - 161, 162, 163, 7, 165, 6, 6, 103, 7, 168, - 98, 15, 168, 168, 77, 77, 15, 77, 22, 3, - 98, 125, 26, 22, 6, 171, 168, 26, 53, 168, - 168, 168, 36, 167, 6, 39, 40, 36, 168, 167, - 39, 40, 65, 23, 146, 168, 168, 51, 52, 54, - 135, 169, 51, 52, 287, 290, 326, 409, 62, 212, - 242, 493, 462, 62, 294, 248, 98, 224, -1, 301, - 461, -1, -1, -1, -1, 100, -1, -1, -1, -1, - -1, -1, 86, -1, -1, 53, 90, 86, -1, 114, - -1, 90, -1, -1, -1, 120, -1, -1, -1, -1, - -1, 105, -1, 128, 53, -1, 105, 111, -1, 134, - 135, -1, 111, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 148, 149, 150, 151, 152, -1, -1, - 155, 156, 100, 158, 159, 160, 161, 162, 163, -1, - 165, 145, 146, 147, -1, -1, 145, 146, 147, -1, - -1, 100, 120, -1, -1, -1, -1, -1, -1, -1, - 128, -1, -1, -1, -1, -1, 134, 135, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 128, - 148, 149, 150, 151, 152, 134, 135, 155, 156, -1, - 158, 159, 160, 161, 162, 163, -1, 165, -1, 148, - 149, 150, 151, 152, -1, -1, 155, 156, -1, 158, - 159, 160, 161, 162, 163, -1, 165 + 136, 71, 253, 77, 2, 88, 89, 5, 175, 89, + 100, 308, 10, 11, 3, 3, 3, 142, 82, 57, + 4, 5, 6, 114, 74, 54, 12, 9, 9, 165, + 3, 167, 168, 50, 107, 25, 114, 110, 134, 19, + 131, 3, 168, 26, 110, 171, 182, 89, 46, 93, + 48, 187, 183, 131, 185, 138, 93, 55, 138, 100, + 435, 110, 44, 44, 35, 114, 93, 163, 168, 165, + 140, 171, 114, 115, 241, 211, 66, 168, 329, 59, + 124, 71, 131, 81, 82, 114, 127, 77, 78, 131, + 168, 466, 70, 3, 76, 93, 94, 171, 80, 80, + 71, 79, 131, 97, 94, 132, 357, 171, 98, 99, + 246, 247, 162, 3, 4, 5, 6, 187, 3, 103, + 251, 257, 258, 167, 70, 96, 44, 45, 259, 167, + 261, 109, 54, 79, 265, 266, 267, 268, 269, 270, + 271, 272, 273, 274, 275, 276, 277, 278, 279, 147, + 72, 124, 114, 226, 171, 45, 46, 47, 142, 143, + 226, 93, 124, 109, 134, 301, 91, 292, 419, 131, + 306, 307, 160, 160, 244, 173, 107, 91, 167, 3, + 114, 171, 168, 114, 103, 110, 483, 57, 172, 3, + 280, 116, 107, 63, 84, 165, 110, 131, 0, 114, + 131, 120, 116, 3, 4, 5, 6, 343, 344, 144, + 284, 114, 159, 103, 288, 382, 131, 166, 469, 166, + 170, 124, 171, 113, 355, 114, 309, 116, 131, 309, + 120, 114, 103, 116, 134, 111, 3, 4, 5, 6, + 3, 168, 131, 133, 171, 45, 46, 47, 131, 120, + 225, 168, 142, 143, 171, 230, 3, 4, 5, 6, + 160, 161, 162, 163, 284, 165, 16, 17, 288, 159, + 160, 167, 408, 169, 410, 411, 346, 167, 45, 46, + 47, 169, 172, 281, 84, 167, 417, 357, 93, 126, + 57, 136, 137, 138, 139, 140, 141, 3, 45, 46, + 47, 122, 3, 103, 3, 4, 5, 6, 168, 25, + 110, 171, 168, 168, 126, 171, 171, 84, 454, 168, + 120, 168, 171, 124, 171, 171, 168, 96, 25, 171, + 123, 3, 120, 133, 4, 3, 103, 84, 82, 92, + 167, 3, 142, 143, 4, 130, 45, 46, 47, 419, + 66, 45, 488, 120, 490, 71, 103, 167, 167, 159, + 160, 77, 78, 6, 12, 168, 133, 167, 113, 66, + 168, 125, 172, 120, 71, 142, 143, 168, 94, 171, + 77, 78, 98, 99, 81, 84, 133, 45, 3, 4, + 5, 6, 159, 160, 130, 142, 143, 94, 3, 148, + 167, 111, 99, 3, 103, 172, 3, 76, 111, 3, + 124, 167, 159, 160, 97, 167, 167, 165, 48, 93, + 167, 120, 54, 57, 167, 172, 167, 167, 92, 17, + 167, 46, 47, 130, 133, 168, 171, 171, 167, 3, + 3, 30, 167, 142, 143, 167, 167, 93, 168, 100, + 167, 7, 165, 114, 103, 171, 171, 166, 69, 15, + 159, 160, 167, 6, 6, 53, 22, 6, 167, 84, + 26, 98, 103, 172, 77, 168, 168, 168, 77, 77, + 36, 98, 3, 39, 40, 125, 6, 171, 103, 168, + 168, 168, 168, 168, 167, 51, 52, 6, 169, 65, + 23, 168, 167, 290, 287, 120, 62, 146, 326, 168, + 409, 135, 100, 54, 212, 242, 294, 301, 133, 493, + 248, 462, 461, 97, 224, -1, -1, 142, 143, 53, + 86, -1, 120, -1, 90, -1, -1, -1, -1, 127, + 128, -1, -1, 0, 159, 160, 134, 135, -1, 105, + 7, -1, 167, -1, -1, 111, -1, 172, 15, -1, + 148, 149, 150, 151, 152, 22, -1, 155, 156, 26, + 158, 159, 160, 161, 162, 163, 100, 165, -1, 36, + -1, -1, 39, 40, -1, -1, -1, -1, -1, 145, + 146, 147, -1, -1, 51, 52, 120, 53, -1, -1, + -1, -1, -1, -1, 128, 62, -1, -1, -1, -1, + 134, 135, -1, -1, -1, -1, 53, -1, -1, -1, + -1, -1, -1, -1, 148, 149, 150, 151, 152, 86, + -1, 155, 156, 90, 158, 159, 160, 161, 162, 163, + -1, 165, -1, -1, 100, -1, -1, -1, 105, -1, + -1, -1, 53, -1, 111, -1, -1, -1, 114, -1, + -1, -1, -1, 100, 120, -1, -1, -1, -1, -1, + -1, -1, 128, -1, -1, -1, -1, -1, 134, 135, + -1, -1, -1, -1, -1, -1, -1, -1, 145, 146, + 147, 128, 148, 149, 150, 151, 152, 134, 135, 155, + 156, -1, 158, 159, 160, 161, 162, 163, -1, 165, + -1, 148, 149, 150, 151, 152, -1, -1, 155, 156, + -1, 158, 159, 160, 161, 162, 163, 128, 165, 24, + -1, -1, -1, 134, 29, -1, 31, 32, -1, 34, + -1, -1, -1, -1, -1, -1, -1, 42, -1, -1, + 151, 152, -1, -1, 155, 156, -1, 158, 159, 160, + 161, 162, 163, -1, 165, -1, -1, -1, -1, -1, + -1, -1, -1, 68, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 85, -1, 87, 88, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 102, -1, -1, + -1, 106, -1, 108, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 118 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1267,17 +1285,17 @@ static const yytype_int16 yystos[] = 3, 3, 265, 70, 79, 109, 93, 93, 97, 264, 265, 265, 70, 79, 109, 19, 59, 3, 274, 275, 144, 182, 182, 182, 0, 170, 279, 111, 178, 178, - 57, 167, 210, 211, 215, 3, 169, 167, 93, 3, - 266, 126, 193, 193, 265, 3, 187, 265, 122, 93, - 132, 3, 267, 126, 199, 199, 265, 124, 171, 176, - 96, 123, 227, 210, 211, 9, 44, 80, 212, 213, - 76, 212, 223, 3, 4, 5, 6, 103, 142, 143, - 172, 230, 231, 252, 253, 254, 255, 256, 257, 258, - 4, 184, 193, 120, 265, 265, 82, 220, 92, 167, + 57, 167, 210, 211, 215, 3, 169, 167, 93, 126, + 193, 193, 193, 265, 3, 187, 265, 122, 93, 132, + 3, 267, 126, 199, 199, 265, 124, 171, 176, 96, + 123, 227, 210, 211, 9, 44, 80, 212, 213, 76, + 212, 223, 3, 4, 5, 6, 103, 142, 143, 172, + 230, 231, 252, 253, 254, 255, 256, 257, 258, 4, + 184, 120, 3, 266, 265, 265, 82, 220, 92, 167, 203, 3, 205, 206, 188, 253, 188, 130, 45, 265, 265, 210, 275, 167, 256, 12, 216, 168, 168, 208, 209, 210, 215, 113, 214, 125, 208, 54, 72, 228, - 168, 171, 130, 45, 93, 124, 167, 203, 3, 45, + 168, 171, 45, 130, 93, 124, 167, 203, 3, 45, 46, 47, 84, 120, 133, 159, 160, 167, 233, 234, 235, 236, 237, 238, 239, 240, 242, 243, 244, 245, 246, 248, 249, 250, 251, 252, 188, 3, 280, 63, @@ -1930,25 +1948,25 @@ yydestruct (const char *yymsg, case YYSYMBOL_IDENTIFIER: /* IDENTIFIER */ #line 149 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1934 "bison_parser.cpp" +#line 1952 "bison_parser.cpp" break; case YYSYMBOL_STRING: /* STRING */ #line 149 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1940 "bison_parser.cpp" +#line 1958 "bison_parser.cpp" break; case YYSYMBOL_FLOATVAL: /* FLOATVAL */ #line 147 "bison_parser.y" { } -#line 1946 "bison_parser.cpp" +#line 1964 "bison_parser.cpp" break; case YYSYMBOL_INTVAL: /* INTVAL */ #line 147 "bison_parser.y" { } -#line 1952 "bison_parser.cpp" +#line 1970 "bison_parser.cpp" break; case YYSYMBOL_statement_list: /* statement_list */ @@ -1961,19 +1979,19 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).stmt_vec)); } -#line 1965 "bison_parser.cpp" +#line 1983 "bison_parser.cpp" break; case YYSYMBOL_statement: /* statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 1971 "bison_parser.cpp" +#line 1989 "bison_parser.cpp" break; case YYSYMBOL_preparable_statement: /* preparable_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 1977 "bison_parser.cpp" +#line 1995 "bison_parser.cpp" break; case YYSYMBOL_opt_hints: /* opt_hints */ @@ -1986,7 +2004,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 1990 "bison_parser.cpp" +#line 2008 "bison_parser.cpp" break; case YYSYMBOL_hint_list: /* hint_list */ @@ -1999,85 +2017,85 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2003 "bison_parser.cpp" +#line 2021 "bison_parser.cpp" break; case YYSYMBOL_hint: /* hint */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2009 "bison_parser.cpp" +#line 2027 "bison_parser.cpp" break; case YYSYMBOL_transaction_statement: /* transaction_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).transaction_stmt)); } -#line 2015 "bison_parser.cpp" +#line 2033 "bison_parser.cpp" break; case YYSYMBOL_prepare_statement: /* prepare_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).prep_stmt)); } -#line 2021 "bison_parser.cpp" +#line 2039 "bison_parser.cpp" break; case YYSYMBOL_prepare_target_query: /* prepare_target_query */ #line 149 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2027 "bison_parser.cpp" +#line 2045 "bison_parser.cpp" break; case YYSYMBOL_execute_statement: /* execute_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).exec_stmt)); } -#line 2033 "bison_parser.cpp" +#line 2051 "bison_parser.cpp" break; case YYSYMBOL_import_statement: /* import_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).import_stmt)); } -#line 2039 "bison_parser.cpp" +#line 2057 "bison_parser.cpp" break; case YYSYMBOL_file_type: /* file_type */ #line 147 "bison_parser.y" { } -#line 2045 "bison_parser.cpp" +#line 2063 "bison_parser.cpp" break; case YYSYMBOL_file_path: /* file_path */ #line 149 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2051 "bison_parser.cpp" +#line 2069 "bison_parser.cpp" break; case YYSYMBOL_opt_file_type: /* opt_file_type */ #line 147 "bison_parser.y" { } -#line 2057 "bison_parser.cpp" +#line 2075 "bison_parser.cpp" break; case YYSYMBOL_export_statement: /* export_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).export_stmt)); } -#line 2063 "bison_parser.cpp" +#line 2081 "bison_parser.cpp" break; case YYSYMBOL_show_statement: /* show_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).show_stmt)); } -#line 2069 "bison_parser.cpp" +#line 2087 "bison_parser.cpp" break; case YYSYMBOL_create_statement: /* create_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).create_stmt)); } -#line 2075 "bison_parser.cpp" +#line 2093 "bison_parser.cpp" break; case YYSYMBOL_opt_not_exists: /* opt_not_exists */ #line 147 "bison_parser.y" { } -#line 2081 "bison_parser.cpp" +#line 2099 "bison_parser.cpp" break; case YYSYMBOL_column_def_commalist: /* column_def_commalist */ @@ -2090,55 +2108,55 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).column_vec)); } -#line 2094 "bison_parser.cpp" +#line 2112 "bison_parser.cpp" break; case YYSYMBOL_column_def: /* column_def */ #line 158 "bison_parser.y" { delete (((*yyvaluep).column_t)); } -#line 2100 "bison_parser.cpp" +#line 2118 "bison_parser.cpp" break; case YYSYMBOL_column_type: /* column_type */ #line 147 "bison_parser.y" { } -#line 2106 "bison_parser.cpp" +#line 2124 "bison_parser.cpp" break; case YYSYMBOL_opt_column_nullable: /* opt_column_nullable */ #line 147 "bison_parser.y" { } -#line 2112 "bison_parser.cpp" +#line 2130 "bison_parser.cpp" break; case YYSYMBOL_drop_statement: /* drop_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).drop_stmt)); } -#line 2118 "bison_parser.cpp" +#line 2136 "bison_parser.cpp" break; case YYSYMBOL_opt_exists: /* opt_exists */ #line 147 "bison_parser.y" { } -#line 2124 "bison_parser.cpp" +#line 2142 "bison_parser.cpp" break; case YYSYMBOL_delete_statement: /* delete_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2130 "bison_parser.cpp" +#line 2148 "bison_parser.cpp" break; case YYSYMBOL_truncate_statement: /* truncate_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2136 "bison_parser.cpp" +#line 2154 "bison_parser.cpp" break; case YYSYMBOL_insert_statement: /* insert_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).insert_stmt)); } -#line 2142 "bison_parser.cpp" +#line 2160 "bison_parser.cpp" break; case YYSYMBOL_opt_column_list: /* opt_column_list */ @@ -2151,13 +2169,13 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2155 "bison_parser.cpp" +#line 2173 "bison_parser.cpp" break; case YYSYMBOL_update_statement: /* update_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).update_stmt)); } -#line 2161 "bison_parser.cpp" +#line 2179 "bison_parser.cpp" break; case YYSYMBOL_update_clause_commalist: /* update_clause_commalist */ @@ -2170,73 +2188,73 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).update_vec)); } -#line 2174 "bison_parser.cpp" +#line 2192 "bison_parser.cpp" break; case YYSYMBOL_update_clause: /* update_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).update_t)); } -#line 2180 "bison_parser.cpp" +#line 2198 "bison_parser.cpp" break; case YYSYMBOL_select_statement: /* select_statement */ #line 158 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2186 "bison_parser.cpp" +#line 2204 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation: /* select_within_set_operation */ #line 158 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2192 "bison_parser.cpp" +#line 2210 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation_no_parentheses: /* select_within_set_operation_no_parentheses */ #line 158 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2198 "bison_parser.cpp" +#line 2216 "bison_parser.cpp" break; case YYSYMBOL_select_with_paren: /* select_with_paren */ #line 158 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2204 "bison_parser.cpp" +#line 2222 "bison_parser.cpp" break; case YYSYMBOL_select_no_paren: /* select_no_paren */ #line 158 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2210 "bison_parser.cpp" +#line 2228 "bison_parser.cpp" break; case YYSYMBOL_set_operator: /* set_operator */ #line 158 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2216 "bison_parser.cpp" +#line 2234 "bison_parser.cpp" break; case YYSYMBOL_set_type: /* set_type */ #line 158 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2222 "bison_parser.cpp" +#line 2240 "bison_parser.cpp" break; case YYSYMBOL_opt_all: /* opt_all */ #line 147 "bison_parser.y" { } -#line 2228 "bison_parser.cpp" +#line 2246 "bison_parser.cpp" break; case YYSYMBOL_select_clause: /* select_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2234 "bison_parser.cpp" +#line 2252 "bison_parser.cpp" break; case YYSYMBOL_opt_distinct: /* opt_distinct */ #line 147 "bison_parser.y" { } -#line 2240 "bison_parser.cpp" +#line 2258 "bison_parser.cpp" break; case YYSYMBOL_select_list: /* select_list */ @@ -2249,37 +2267,37 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2253 "bison_parser.cpp" +#line 2271 "bison_parser.cpp" break; case YYSYMBOL_opt_from_clause: /* opt_from_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2259 "bison_parser.cpp" +#line 2277 "bison_parser.cpp" break; case YYSYMBOL_from_clause: /* from_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2265 "bison_parser.cpp" +#line 2283 "bison_parser.cpp" break; case YYSYMBOL_opt_where: /* opt_where */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2271 "bison_parser.cpp" +#line 2289 "bison_parser.cpp" break; case YYSYMBOL_opt_group: /* opt_group */ #line 158 "bison_parser.y" { delete (((*yyvaluep).group_t)); } -#line 2277 "bison_parser.cpp" +#line 2295 "bison_parser.cpp" break; case YYSYMBOL_opt_having: /* opt_having */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2283 "bison_parser.cpp" +#line 2301 "bison_parser.cpp" break; case YYSYMBOL_opt_order: /* opt_order */ @@ -2292,7 +2310,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2296 "bison_parser.cpp" +#line 2314 "bison_parser.cpp" break; case YYSYMBOL_order_list: /* order_list */ @@ -2305,31 +2323,31 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2309 "bison_parser.cpp" +#line 2327 "bison_parser.cpp" break; case YYSYMBOL_order_desc: /* order_desc */ #line 158 "bison_parser.y" { delete (((*yyvaluep).order)); } -#line 2315 "bison_parser.cpp" +#line 2333 "bison_parser.cpp" break; case YYSYMBOL_opt_order_type: /* opt_order_type */ #line 147 "bison_parser.y" { } -#line 2321 "bison_parser.cpp" +#line 2339 "bison_parser.cpp" break; case YYSYMBOL_opt_top: /* opt_top */ #line 158 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2327 "bison_parser.cpp" +#line 2345 "bison_parser.cpp" break; case YYSYMBOL_opt_limit: /* opt_limit */ #line 158 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2333 "bison_parser.cpp" +#line 2351 "bison_parser.cpp" break; case YYSYMBOL_expr_list: /* expr_list */ @@ -2342,7 +2360,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2346 "bison_parser.cpp" +#line 2364 "bison_parser.cpp" break; case YYSYMBOL_opt_literal_list: /* opt_literal_list */ @@ -2355,7 +2373,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2359 "bison_parser.cpp" +#line 2377 "bison_parser.cpp" break; case YYSYMBOL_literal_list: /* literal_list */ @@ -2368,187 +2386,187 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2372 "bison_parser.cpp" +#line 2390 "bison_parser.cpp" break; case YYSYMBOL_expr_alias: /* expr_alias */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2378 "bison_parser.cpp" +#line 2396 "bison_parser.cpp" break; case YYSYMBOL_expr: /* expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2384 "bison_parser.cpp" +#line 2402 "bison_parser.cpp" break; case YYSYMBOL_operand: /* operand */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2390 "bison_parser.cpp" +#line 2408 "bison_parser.cpp" break; case YYSYMBOL_scalar_expr: /* scalar_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2396 "bison_parser.cpp" +#line 2414 "bison_parser.cpp" break; case YYSYMBOL_unary_expr: /* unary_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2402 "bison_parser.cpp" +#line 2420 "bison_parser.cpp" break; case YYSYMBOL_binary_expr: /* binary_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2408 "bison_parser.cpp" +#line 2426 "bison_parser.cpp" break; case YYSYMBOL_logic_expr: /* logic_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2414 "bison_parser.cpp" +#line 2432 "bison_parser.cpp" break; case YYSYMBOL_in_expr: /* in_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2420 "bison_parser.cpp" +#line 2438 "bison_parser.cpp" break; case YYSYMBOL_case_expr: /* case_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2426 "bison_parser.cpp" +#line 2444 "bison_parser.cpp" break; case YYSYMBOL_case_list: /* case_list */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2432 "bison_parser.cpp" +#line 2450 "bison_parser.cpp" break; case YYSYMBOL_exists_expr: /* exists_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2438 "bison_parser.cpp" +#line 2456 "bison_parser.cpp" break; case YYSYMBOL_comp_expr: /* comp_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2444 "bison_parser.cpp" +#line 2462 "bison_parser.cpp" break; case YYSYMBOL_function_expr: /* function_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2450 "bison_parser.cpp" +#line 2468 "bison_parser.cpp" break; case YYSYMBOL_extract_expr: /* extract_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2456 "bison_parser.cpp" +#line 2474 "bison_parser.cpp" break; case YYSYMBOL_cast_expr: /* cast_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2462 "bison_parser.cpp" +#line 2480 "bison_parser.cpp" break; case YYSYMBOL_datetime_field: /* datetime_field */ #line 147 "bison_parser.y" { } -#line 2468 "bison_parser.cpp" +#line 2486 "bison_parser.cpp" break; case YYSYMBOL_array_expr: /* array_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2474 "bison_parser.cpp" +#line 2492 "bison_parser.cpp" break; case YYSYMBOL_array_index: /* array_index */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2480 "bison_parser.cpp" +#line 2498 "bison_parser.cpp" break; case YYSYMBOL_between_expr: /* between_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2486 "bison_parser.cpp" +#line 2504 "bison_parser.cpp" break; case YYSYMBOL_column_name: /* column_name */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2492 "bison_parser.cpp" +#line 2510 "bison_parser.cpp" break; case YYSYMBOL_literal: /* literal */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2498 "bison_parser.cpp" +#line 2516 "bison_parser.cpp" break; case YYSYMBOL_string_literal: /* string_literal */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2504 "bison_parser.cpp" +#line 2522 "bison_parser.cpp" break; case YYSYMBOL_bool_literal: /* bool_literal */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2510 "bison_parser.cpp" +#line 2528 "bison_parser.cpp" break; case YYSYMBOL_num_literal: /* num_literal */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2516 "bison_parser.cpp" +#line 2534 "bison_parser.cpp" break; case YYSYMBOL_int_literal: /* int_literal */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2522 "bison_parser.cpp" +#line 2540 "bison_parser.cpp" break; case YYSYMBOL_null_literal: /* null_literal */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2528 "bison_parser.cpp" +#line 2546 "bison_parser.cpp" break; case YYSYMBOL_param_expr: /* param_expr */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2534 "bison_parser.cpp" +#line 2552 "bison_parser.cpp" break; case YYSYMBOL_table_ref: /* table_ref */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2540 "bison_parser.cpp" +#line 2558 "bison_parser.cpp" break; case YYSYMBOL_table_ref_atomic: /* table_ref_atomic */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2546 "bison_parser.cpp" +#line 2564 "bison_parser.cpp" break; case YYSYMBOL_nonjoin_table_ref_atomic: /* nonjoin_table_ref_atomic */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2552 "bison_parser.cpp" +#line 2570 "bison_parser.cpp" break; case YYSYMBOL_table_ref_commalist: /* table_ref_commalist */ @@ -2561,103 +2579,103 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).table_vec)); } -#line 2565 "bison_parser.cpp" +#line 2583 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name: /* table_ref_name */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2571 "bison_parser.cpp" +#line 2589 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name_no_alias: /* table_ref_name_no_alias */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2577 "bison_parser.cpp" +#line 2595 "bison_parser.cpp" break; case YYSYMBOL_table_name: /* table_name */ #line 148 "bison_parser.y" { free( (((*yyvaluep).table_name).name) ); free( (((*yyvaluep).table_name).schema) ); } -#line 2583 "bison_parser.cpp" +#line 2601 "bison_parser.cpp" break; case YYSYMBOL_opt_index_name: /* opt_index_name */ #line 149 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2589 "bison_parser.cpp" +#line 2607 "bison_parser.cpp" break; case YYSYMBOL_index_name: /* index_name */ #line 149 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2595 "bison_parser.cpp" +#line 2613 "bison_parser.cpp" break; case YYSYMBOL_table_alias: /* table_alias */ #line 158 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2601 "bison_parser.cpp" +#line 2619 "bison_parser.cpp" break; case YYSYMBOL_opt_table_alias: /* opt_table_alias */ #line 158 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2607 "bison_parser.cpp" +#line 2625 "bison_parser.cpp" break; case YYSYMBOL_alias: /* alias */ #line 158 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2613 "bison_parser.cpp" +#line 2631 "bison_parser.cpp" break; case YYSYMBOL_opt_alias: /* opt_alias */ #line 158 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2619 "bison_parser.cpp" +#line 2637 "bison_parser.cpp" break; case YYSYMBOL_opt_with_clause: /* opt_with_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2625 "bison_parser.cpp" +#line 2643 "bison_parser.cpp" break; case YYSYMBOL_with_clause: /* with_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2631 "bison_parser.cpp" +#line 2649 "bison_parser.cpp" break; case YYSYMBOL_with_description_list: /* with_description_list */ #line 158 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2637 "bison_parser.cpp" +#line 2655 "bison_parser.cpp" break; case YYSYMBOL_with_description: /* with_description */ #line 158 "bison_parser.y" { delete (((*yyvaluep).with_description_t)); } -#line 2643 "bison_parser.cpp" +#line 2661 "bison_parser.cpp" break; case YYSYMBOL_join_clause: /* join_clause */ #line 158 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2649 "bison_parser.cpp" +#line 2667 "bison_parser.cpp" break; case YYSYMBOL_opt_join_type: /* opt_join_type */ #line 147 "bison_parser.y" { } -#line 2655 "bison_parser.cpp" +#line 2673 "bison_parser.cpp" break; case YYSYMBOL_join_condition: /* join_condition */ #line 158 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2661 "bison_parser.cpp" +#line 2679 "bison_parser.cpp" break; case YYSYMBOL_ident_commalist: /* ident_commalist */ @@ -2670,7 +2688,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2674 "bison_parser.cpp" +#line 2692 "bison_parser.cpp" break; default: @@ -2777,7 +2795,7 @@ YYLTYPE yylloc = yyloc_default; yylloc.string_length = 0; } -#line 2781 "bison_parser.cpp" +#line 2799 "bison_parser.cpp" yylsp[0] = yylloc; goto yysetstate; @@ -3005,7 +3023,7 @@ YYLTYPE yylloc = yyloc_default; } delete (yyvsp[-1].stmt_vec); } -#line 3009 "bison_parser.cpp" +#line 3027 "bison_parser.cpp" break; case 3: /* statement_list: statement */ @@ -3016,7 +3034,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.stmt_vec) = new std::vector(); (yyval.stmt_vec)->push_back((yyvsp[0].statement)); } -#line 3020 "bison_parser.cpp" +#line 3038 "bison_parser.cpp" break; case 4: /* statement_list: statement_list ';' statement */ @@ -3027,7 +3045,7 @@ YYLTYPE yylloc = yyloc_default; (yyvsp[-2].stmt_vec)->push_back((yyvsp[0].statement)); (yyval.stmt_vec) = (yyvsp[-2].stmt_vec); } -#line 3031 "bison_parser.cpp" +#line 3049 "bison_parser.cpp" break; case 5: /* statement: prepare_statement opt_hints */ @@ -3036,7 +3054,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3040 "bison_parser.cpp" +#line 3058 "bison_parser.cpp" break; case 6: /* statement: preparable_statement opt_hints */ @@ -3045,7 +3063,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.statement) = (yyvsp[-1].statement); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3049 "bison_parser.cpp" +#line 3067 "bison_parser.cpp" break; case 7: /* statement: show_statement */ @@ -3053,7 +3071,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.statement) = (yyvsp[0].show_stmt); } -#line 3057 "bison_parser.cpp" +#line 3075 "bison_parser.cpp" break; case 8: /* statement: import_statement */ @@ -3061,7 +3079,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.statement) = (yyvsp[0].import_stmt); } -#line 3065 "bison_parser.cpp" +#line 3083 "bison_parser.cpp" break; case 9: /* statement: export_statement */ @@ -3069,85 +3087,85 @@ YYLTYPE yylloc = yyloc_default; { (yyval.statement) = (yyvsp[0].export_stmt); } -#line 3073 "bison_parser.cpp" +#line 3091 "bison_parser.cpp" break; case 10: /* preparable_statement: select_statement */ #line 328 "bison_parser.y" { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 3079 "bison_parser.cpp" +#line 3097 "bison_parser.cpp" break; case 11: /* preparable_statement: create_statement */ #line 329 "bison_parser.y" { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 3085 "bison_parser.cpp" +#line 3103 "bison_parser.cpp" break; case 12: /* preparable_statement: insert_statement */ #line 330 "bison_parser.y" { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 3091 "bison_parser.cpp" +#line 3109 "bison_parser.cpp" break; case 13: /* preparable_statement: delete_statement */ #line 331 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3097 "bison_parser.cpp" +#line 3115 "bison_parser.cpp" break; case 14: /* preparable_statement: truncate_statement */ #line 332 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3103 "bison_parser.cpp" +#line 3121 "bison_parser.cpp" break; case 15: /* preparable_statement: update_statement */ #line 333 "bison_parser.y" { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 3109 "bison_parser.cpp" +#line 3127 "bison_parser.cpp" break; case 16: /* preparable_statement: drop_statement */ #line 334 "bison_parser.y" { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 3115 "bison_parser.cpp" +#line 3133 "bison_parser.cpp" break; case 17: /* preparable_statement: execute_statement */ #line 335 "bison_parser.y" { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 3121 "bison_parser.cpp" +#line 3139 "bison_parser.cpp" break; case 18: /* preparable_statement: transaction_statement */ #line 336 "bison_parser.y" { (yyval.statement) = (yyvsp[0].transaction_stmt); } -#line 3127 "bison_parser.cpp" +#line 3145 "bison_parser.cpp" break; case 19: /* opt_hints: WITH HINT '(' hint_list ')' */ #line 345 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 3133 "bison_parser.cpp" +#line 3151 "bison_parser.cpp" break; case 20: /* opt_hints: %empty */ #line 346 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 3139 "bison_parser.cpp" +#line 3157 "bison_parser.cpp" break; case 21: /* hint_list: hint */ #line 351 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3145 "bison_parser.cpp" +#line 3163 "bison_parser.cpp" break; case 22: /* hint_list: hint_list ',' hint */ #line 352 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3151 "bison_parser.cpp" +#line 3169 "bison_parser.cpp" break; case 23: /* hint: IDENTIFIER */ @@ -3156,7 +3174,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[0].sval); } -#line 3160 "bison_parser.cpp" +#line 3178 "bison_parser.cpp" break; case 24: /* hint: IDENTIFIER '(' literal_list ')' */ @@ -3166,7 +3184,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expr)->name = (yyvsp[-3].sval); (yyval.expr)->exprList = (yyvsp[-1].expr_vec); } -#line 3170 "bison_parser.cpp" +#line 3188 "bison_parser.cpp" break; case 25: /* transaction_statement: BEGIN opt_transaction_keyword */ @@ -3174,7 +3192,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.transaction_stmt) = new TransactionStatement(kBeginTransaction); } -#line 3178 "bison_parser.cpp" +#line 3196 "bison_parser.cpp" break; case 26: /* transaction_statement: ROLLBACK opt_transaction_keyword */ @@ -3182,7 +3200,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.transaction_stmt) = new TransactionStatement(kRollbackTransaction); } -#line 3186 "bison_parser.cpp" +#line 3204 "bison_parser.cpp" break; case 27: /* transaction_statement: COMMIT opt_transaction_keyword */ @@ -3190,7 +3208,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.transaction_stmt) = new TransactionStatement(kCommitTransaction); } -#line 3194 "bison_parser.cpp" +#line 3212 "bison_parser.cpp" break; case 30: /* prepare_statement: PREPARE IDENTIFIER FROM prepare_target_query */ @@ -3200,7 +3218,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.prep_stmt)->name = (yyvsp[-2].sval); (yyval.prep_stmt)->query = (yyvsp[0].sval); } -#line 3204 "bison_parser.cpp" +#line 3222 "bison_parser.cpp" break; case 32: /* execute_statement: EXECUTE IDENTIFIER */ @@ -3209,7 +3227,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[0].sval); } -#line 3213 "bison_parser.cpp" +#line 3231 "bison_parser.cpp" break; case 33: /* execute_statement: EXECUTE IDENTIFIER '(' opt_literal_list ')' */ @@ -3219,7 +3237,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.exec_stmt)->name = (yyvsp[-3].sval); (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); } -#line 3223 "bison_parser.cpp" +#line 3241 "bison_parser.cpp" break; case 34: /* import_statement: IMPORT FROM file_type FILE file_path INTO table_name */ @@ -3230,7 +3248,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.import_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3234 "bison_parser.cpp" +#line 3252 "bison_parser.cpp" break; case 35: /* import_statement: COPY table_name FROM file_path opt_file_type */ @@ -3241,7 +3259,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.import_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3245 "bison_parser.cpp" +#line 3263 "bison_parser.cpp" break; case 36: /* file_type: IDENTIFIER */ @@ -3260,13 +3278,13 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[0].sval)); } -#line 3264 "bison_parser.cpp" +#line 3282 "bison_parser.cpp" break; case 37: /* file_path: string_literal */ #line 452 "bison_parser.y" { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 3270 "bison_parser.cpp" +#line 3288 "bison_parser.cpp" break; case 38: /* opt_file_type: WITH FORMAT file_type */ @@ -3274,13 +3292,13 @@ YYLTYPE yylloc = yyloc_default; { (yyval.import_type_t) = (yyvsp[0].import_type_t); } -#line 3278 "bison_parser.cpp" +#line 3296 "bison_parser.cpp" break; case 39: /* opt_file_type: %empty */ #line 459 "bison_parser.y" { (yyval.import_type_t) = kImportAuto; } -#line 3284 "bison_parser.cpp" +#line 3302 "bison_parser.cpp" break; case 40: /* export_statement: COPY table_name TO file_path opt_file_type */ @@ -3291,7 +3309,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.export_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.export_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3295 "bison_parser.cpp" +#line 3313 "bison_parser.cpp" break; case 41: /* show_statement: SHOW TABLES */ @@ -3299,7 +3317,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.show_stmt) = new ShowStatement(kShowTables); } -#line 3303 "bison_parser.cpp" +#line 3321 "bison_parser.cpp" break; case 42: /* show_statement: SHOW COLUMNS table_name */ @@ -3309,7 +3327,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.show_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.show_stmt)->name = (yyvsp[0].table_name).name; } -#line 3313 "bison_parser.cpp" +#line 3331 "bison_parser.cpp" break; case 43: /* show_statement: DESCRIBE table_name */ @@ -3319,7 +3337,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.show_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.show_stmt)->name = (yyvsp[0].table_name).name; } -#line 3323 "bison_parser.cpp" +#line 3341 "bison_parser.cpp" break; case 44: /* create_statement: CREATE TABLE opt_not_exists table_name FROM IDENTIFIER FILE file_path */ @@ -3337,7 +3355,7 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].sval)); (yyval.create_stmt)->filePath = (yyvsp[0].sval); } -#line 3341 "bison_parser.cpp" +#line 3359 "bison_parser.cpp" break; case 45: /* create_statement: CREATE TABLE opt_not_exists table_name '(' column_def_commalist ')' */ @@ -3349,7 +3367,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->columns = (yyvsp[-1].column_vec); } -#line 3353 "bison_parser.cpp" +#line 3371 "bison_parser.cpp" break; case 46: /* create_statement: CREATE TABLE opt_not_exists table_name AS select_statement */ @@ -3361,19 +3379,19 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-2].table_name).name; (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3365 "bison_parser.cpp" +#line 3383 "bison_parser.cpp" break; - case 47: /* create_statement: CREATE INDEX opt_index_name opt_not_exists ON table_name '(' ident_commalist ')' */ + case 47: /* create_statement: CREATE INDEX opt_not_exists opt_index_name ON table_name '(' ident_commalist ')' */ #line 531 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateIndex); - (yyval.create_stmt)->indexName = (yyvsp[-6].sval); - (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); + (yyval.create_stmt)->indexName = (yyvsp[-5].sval); + (yyval.create_stmt)->ifNotExists = (yyvsp[-6].bval); (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->indexColumns = (yyvsp[-1].str_vec); } -#line 3377 "bison_parser.cpp" +#line 3395 "bison_parser.cpp" break; case 48: /* create_statement: CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement */ @@ -3386,31 +3404,31 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3390 "bison_parser.cpp" +#line 3408 "bison_parser.cpp" break; case 49: /* opt_not_exists: IF NOT EXISTS */ #line 549 "bison_parser.y" { (yyval.bval) = true; } -#line 3396 "bison_parser.cpp" +#line 3414 "bison_parser.cpp" break; case 50: /* opt_not_exists: %empty */ #line 550 "bison_parser.y" { (yyval.bval) = false; } -#line 3402 "bison_parser.cpp" +#line 3420 "bison_parser.cpp" break; case 51: /* column_def_commalist: column_def */ #line 554 "bison_parser.y" { (yyval.column_vec) = new std::vector(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); } -#line 3408 "bison_parser.cpp" +#line 3426 "bison_parser.cpp" break; case 52: /* column_def_commalist: column_def_commalist ',' column_def */ #line 555 "bison_parser.y" { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } -#line 3414 "bison_parser.cpp" +#line 3432 "bison_parser.cpp" break; case 53: /* column_def: IDENTIFIER column_type opt_column_nullable */ @@ -3418,109 +3436,109 @@ YYLTYPE yylloc = yyloc_default; { (yyval.column_t) = new ColumnDefinition((yyvsp[-2].sval), (yyvsp[-1].column_type_t), (yyvsp[0].bval)); } -#line 3422 "bison_parser.cpp" +#line 3440 "bison_parser.cpp" break; case 54: /* column_type: INT */ #line 565 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3428 "bison_parser.cpp" +#line 3446 "bison_parser.cpp" break; case 55: /* column_type: INTEGER */ #line 566 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3434 "bison_parser.cpp" +#line 3452 "bison_parser.cpp" break; case 56: /* column_type: LONG */ #line 567 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::LONG}; } -#line 3440 "bison_parser.cpp" +#line 3458 "bison_parser.cpp" break; case 57: /* column_type: FLOAT */ #line 568 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3446 "bison_parser.cpp" +#line 3464 "bison_parser.cpp" break; case 58: /* column_type: DECIMAL '(' INTVAL ',' INTVAL ')' */ #line 569 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3452 "bison_parser.cpp" +#line 3470 "bison_parser.cpp" break; case 59: /* column_type: DOUBLE */ #line 570 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } -#line 3458 "bison_parser.cpp" +#line 3476 "bison_parser.cpp" break; case 60: /* column_type: REAL */ #line 571 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3464 "bison_parser.cpp" +#line 3482 "bison_parser.cpp" break; case 61: /* column_type: VARCHAR '(' INTVAL ')' */ #line 572 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3470 "bison_parser.cpp" +#line 3488 "bison_parser.cpp" break; case 62: /* column_type: CHARACTER VARYING '(' INTVAL ')' */ #line 573 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3476 "bison_parser.cpp" +#line 3494 "bison_parser.cpp" break; case 63: /* column_type: CHAR '(' INTVAL ')' */ #line 574 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } -#line 3482 "bison_parser.cpp" +#line 3500 "bison_parser.cpp" break; case 64: /* column_type: TEXT */ #line 575 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } -#line 3488 "bison_parser.cpp" +#line 3506 "bison_parser.cpp" break; case 65: /* column_type: TIME */ #line 576 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TIME}; } -#line 3494 "bison_parser.cpp" +#line 3512 "bison_parser.cpp" break; case 66: /* column_type: DATETIME */ #line 577 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } -#line 3500 "bison_parser.cpp" +#line 3518 "bison_parser.cpp" break; case 67: /* column_type: DATE */ #line 578 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATE}; } -#line 3506 "bison_parser.cpp" +#line 3524 "bison_parser.cpp" break; case 68: /* opt_column_nullable: NULL */ #line 582 "bison_parser.y" { (yyval.bval) = true; } -#line 3512 "bison_parser.cpp" +#line 3530 "bison_parser.cpp" break; case 69: /* opt_column_nullable: NOT NULL */ #line 583 "bison_parser.y" { (yyval.bval) = false; } -#line 3518 "bison_parser.cpp" +#line 3536 "bison_parser.cpp" break; case 70: /* opt_column_nullable: %empty */ #line 584 "bison_parser.y" { (yyval.bval) = false; } -#line 3524 "bison_parser.cpp" +#line 3542 "bison_parser.cpp" break; case 71: /* drop_statement: DROP TABLE opt_exists table_name */ @@ -3531,7 +3549,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.drop_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; } -#line 3535 "bison_parser.cpp" +#line 3553 "bison_parser.cpp" break; case 72: /* drop_statement: DROP VIEW opt_exists table_name */ @@ -3542,7 +3560,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.drop_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; } -#line 3546 "bison_parser.cpp" +#line 3564 "bison_parser.cpp" break; case 73: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ @@ -3552,7 +3570,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.drop_stmt)->ifExists = false; (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 3556 "bison_parser.cpp" +#line 3574 "bison_parser.cpp" break; case 74: /* drop_statement: DROP INDEX index_name ON table_name */ @@ -3562,19 +3580,19 @@ YYLTYPE yylloc = yyloc_default; (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; (yyval.drop_stmt)->index_name = (yyvsp[-2].sval); } -#line 3566 "bison_parser.cpp" +#line 3584 "bison_parser.cpp" break; case 75: /* opt_exists: IF EXISTS */ #line 619 "bison_parser.y" { (yyval.bval) = true; } -#line 3572 "bison_parser.cpp" +#line 3590 "bison_parser.cpp" break; case 76: /* opt_exists: %empty */ #line 620 "bison_parser.y" { (yyval.bval) = false; } -#line 3578 "bison_parser.cpp" +#line 3596 "bison_parser.cpp" break; case 77: /* delete_statement: DELETE FROM table_name opt_where */ @@ -3585,7 +3603,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.delete_stmt)->tableName = (yyvsp[-1].table_name).name; (yyval.delete_stmt)->expr = (yyvsp[0].expr); } -#line 3589 "bison_parser.cpp" +#line 3607 "bison_parser.cpp" break; case 78: /* truncate_statement: TRUNCATE table_name */ @@ -3595,7 +3613,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3599 "bison_parser.cpp" +#line 3617 "bison_parser.cpp" break; case 79: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ @@ -3607,7 +3625,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } -#line 3611 "bison_parser.cpp" +#line 3629 "bison_parser.cpp" break; case 80: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ @@ -3619,19 +3637,19 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } -#line 3623 "bison_parser.cpp" +#line 3641 "bison_parser.cpp" break; case 81: /* opt_column_list: '(' ident_commalist ')' */ #line 669 "bison_parser.y" { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 3629 "bison_parser.cpp" +#line 3647 "bison_parser.cpp" break; case 82: /* opt_column_list: %empty */ #line 670 "bison_parser.y" { (yyval.str_vec) = nullptr; } -#line 3635 "bison_parser.cpp" +#line 3653 "bison_parser.cpp" break; case 83: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ @@ -3642,19 +3660,19 @@ YYLTYPE yylloc = yyloc_default; (yyval.update_stmt)->updates = (yyvsp[-1].update_vec); (yyval.update_stmt)->where = (yyvsp[0].expr); } -#line 3646 "bison_parser.cpp" +#line 3664 "bison_parser.cpp" break; case 84: /* update_clause_commalist: update_clause */ #line 689 "bison_parser.y" { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 3652 "bison_parser.cpp" +#line 3670 "bison_parser.cpp" break; case 85: /* update_clause_commalist: update_clause_commalist ',' update_clause */ #line 690 "bison_parser.y" { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 3658 "bison_parser.cpp" +#line 3676 "bison_parser.cpp" break; case 86: /* update_clause: IDENTIFIER '=' expr */ @@ -3664,7 +3682,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 3668 "bison_parser.cpp" +#line 3686 "bison_parser.cpp" break; case 87: /* select_statement: opt_with_clause select_with_paren */ @@ -3673,7 +3691,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3677 "bison_parser.cpp" +#line 3695 "bison_parser.cpp" break; case 88: /* select_statement: opt_with_clause select_no_paren */ @@ -3682,7 +3700,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3686 "bison_parser.cpp" +#line 3704 "bison_parser.cpp" break; case 89: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ @@ -3698,13 +3716,13 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); (yyval.select_stmt)->withDescriptions = (yyvsp[-5].with_description_vec); } -#line 3702 "bison_parser.cpp" +#line 3720 "bison_parser.cpp" break; case 92: /* select_within_set_operation_no_parentheses: select_clause */ #line 732 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); } -#line 3708 "bison_parser.cpp" +#line 3726 "bison_parser.cpp" break; case 93: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ @@ -3717,19 +3735,19 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->push_back((yyvsp[-1].set_operator_t)); (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[0].select_stmt); } -#line 3721 "bison_parser.cpp" +#line 3739 "bison_parser.cpp" break; case 94: /* select_with_paren: '(' select_no_paren ')' */ #line 744 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3727 "bison_parser.cpp" +#line 3745 "bison_parser.cpp" break; case 95: /* select_with_paren: '(' select_with_paren ')' */ #line 745 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3733 "bison_parser.cpp" +#line 3751 "bison_parser.cpp" break; case 96: /* select_no_paren: select_clause opt_order opt_limit */ @@ -3744,7 +3762,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3748 "bison_parser.cpp" +#line 3766 "bison_parser.cpp" break; case 97: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ @@ -3759,7 +3777,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); } -#line 3763 "bison_parser.cpp" +#line 3781 "bison_parser.cpp" break; case 98: /* set_operator: set_type opt_all */ @@ -3768,7 +3786,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.set_operator_t) = (yyvsp[-1].set_operator_t); (yyval.set_operator_t)->isAll = (yyvsp[0].bval); } -#line 3772 "bison_parser.cpp" +#line 3790 "bison_parser.cpp" break; case 99: /* set_type: UNION */ @@ -3777,7 +3795,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetUnion; } -#line 3781 "bison_parser.cpp" +#line 3799 "bison_parser.cpp" break; case 100: /* set_type: INTERSECT */ @@ -3786,7 +3804,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetIntersect; } -#line 3790 "bison_parser.cpp" +#line 3808 "bison_parser.cpp" break; case 101: /* set_type: EXCEPT */ @@ -3795,7 +3813,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetExcept; } -#line 3799 "bison_parser.cpp" +#line 3817 "bison_parser.cpp" break; case 102: /* opt_all: ALL */ @@ -3803,7 +3821,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.bval) = true; } -#line 3807 "bison_parser.cpp" +#line 3825 "bison_parser.cpp" break; case 103: /* opt_all: %empty */ @@ -3811,7 +3829,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.bval) = false; } -#line 3815 "bison_parser.cpp" +#line 3833 "bison_parser.cpp" break; case 104: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ @@ -3825,49 +3843,49 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 3829 "bison_parser.cpp" +#line 3847 "bison_parser.cpp" break; case 105: /* opt_distinct: DISTINCT */ #line 815 "bison_parser.y" { (yyval.bval) = true; } -#line 3835 "bison_parser.cpp" +#line 3853 "bison_parser.cpp" break; case 106: /* opt_distinct: %empty */ #line 816 "bison_parser.y" { (yyval.bval) = false; } -#line 3841 "bison_parser.cpp" +#line 3859 "bison_parser.cpp" break; case 108: /* opt_from_clause: from_clause */ #line 824 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 3847 "bison_parser.cpp" +#line 3865 "bison_parser.cpp" break; case 109: /* opt_from_clause: %empty */ #line 825 "bison_parser.y" { (yyval.table) = nullptr; } -#line 3853 "bison_parser.cpp" +#line 3871 "bison_parser.cpp" break; case 110: /* from_clause: FROM table_ref */ #line 829 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 3859 "bison_parser.cpp" +#line 3877 "bison_parser.cpp" break; case 111: /* opt_where: WHERE expr */ #line 834 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 3865 "bison_parser.cpp" +#line 3883 "bison_parser.cpp" break; case 112: /* opt_where: %empty */ #line 835 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 3871 "bison_parser.cpp" +#line 3889 "bison_parser.cpp" break; case 113: /* opt_group: GROUP BY expr_list opt_having */ @@ -3877,157 +3895,157 @@ YYLTYPE yylloc = yyloc_default; (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 3881 "bison_parser.cpp" +#line 3899 "bison_parser.cpp" break; case 114: /* opt_group: %empty */ #line 844 "bison_parser.y" { (yyval.group_t) = nullptr; } -#line 3887 "bison_parser.cpp" +#line 3905 "bison_parser.cpp" break; case 115: /* opt_having: HAVING expr */ #line 848 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 3893 "bison_parser.cpp" +#line 3911 "bison_parser.cpp" break; case 116: /* opt_having: %empty */ #line 849 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 3899 "bison_parser.cpp" +#line 3917 "bison_parser.cpp" break; case 117: /* opt_order: ORDER BY order_list */ #line 853 "bison_parser.y" { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 3905 "bison_parser.cpp" +#line 3923 "bison_parser.cpp" break; case 118: /* opt_order: %empty */ #line 854 "bison_parser.y" { (yyval.order_vec) = nullptr; } -#line 3911 "bison_parser.cpp" +#line 3929 "bison_parser.cpp" break; case 119: /* order_list: order_desc */ #line 858 "bison_parser.y" { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 3917 "bison_parser.cpp" +#line 3935 "bison_parser.cpp" break; case 120: /* order_list: order_list ',' order_desc */ #line 859 "bison_parser.y" { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 3923 "bison_parser.cpp" +#line 3941 "bison_parser.cpp" break; case 121: /* order_desc: expr opt_order_type */ #line 863 "bison_parser.y" { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 3929 "bison_parser.cpp" +#line 3947 "bison_parser.cpp" break; case 122: /* opt_order_type: ASC */ #line 867 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 3935 "bison_parser.cpp" +#line 3953 "bison_parser.cpp" break; case 123: /* opt_order_type: DESC */ #line 868 "bison_parser.y" { (yyval.order_type) = kOrderDesc; } -#line 3941 "bison_parser.cpp" +#line 3959 "bison_parser.cpp" break; case 124: /* opt_order_type: %empty */ #line 869 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 3947 "bison_parser.cpp" +#line 3965 "bison_parser.cpp" break; case 125: /* opt_top: TOP int_literal */ #line 875 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 3953 "bison_parser.cpp" +#line 3971 "bison_parser.cpp" break; case 126: /* opt_top: %empty */ #line 876 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 3959 "bison_parser.cpp" +#line 3977 "bison_parser.cpp" break; case 127: /* opt_limit: LIMIT expr */ #line 880 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 3965 "bison_parser.cpp" +#line 3983 "bison_parser.cpp" break; case 128: /* opt_limit: OFFSET expr */ #line 881 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 3971 "bison_parser.cpp" +#line 3989 "bison_parser.cpp" break; case 129: /* opt_limit: LIMIT expr OFFSET expr */ #line 882 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 3977 "bison_parser.cpp" +#line 3995 "bison_parser.cpp" break; case 130: /* opt_limit: LIMIT ALL */ #line 883 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, nullptr); } -#line 3983 "bison_parser.cpp" +#line 4001 "bison_parser.cpp" break; case 131: /* opt_limit: LIMIT ALL OFFSET expr */ #line 884 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 3989 "bison_parser.cpp" +#line 4007 "bison_parser.cpp" break; case 132: /* opt_limit: %empty */ #line 885 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 3995 "bison_parser.cpp" +#line 4013 "bison_parser.cpp" break; case 133: /* expr_list: expr_alias */ #line 892 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4001 "bison_parser.cpp" +#line 4019 "bison_parser.cpp" break; case 134: /* expr_list: expr_list ',' expr_alias */ #line 893 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4007 "bison_parser.cpp" +#line 4025 "bison_parser.cpp" break; case 135: /* opt_literal_list: literal_list */ #line 897 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[0].expr_vec); } -#line 4013 "bison_parser.cpp" +#line 4031 "bison_parser.cpp" break; case 136: /* opt_literal_list: %empty */ #line 898 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 4019 "bison_parser.cpp" +#line 4037 "bison_parser.cpp" break; case 137: /* literal_list: literal */ #line 902 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4025 "bison_parser.cpp" +#line 4043 "bison_parser.cpp" break; case 138: /* literal_list: literal_list ',' literal */ #line 903 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4031 "bison_parser.cpp" +#line 4049 "bison_parser.cpp" break; case 139: /* expr_alias: expr opt_alias */ @@ -4039,373 +4057,373 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].alias_t); } } -#line 4043 "bison_parser.cpp" +#line 4061 "bison_parser.cpp" break; case 145: /* operand: '(' expr ')' */ #line 925 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); } -#line 4049 "bison_parser.cpp" +#line 4067 "bison_parser.cpp" break; case 155: /* operand: '(' select_no_paren ')' */ #line 935 "bison_parser.y" { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 4055 "bison_parser.cpp" +#line 4073 "bison_parser.cpp" break; case 158: /* unary_expr: '-' operand */ #line 944 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 4061 "bison_parser.cpp" +#line 4079 "bison_parser.cpp" break; case 159: /* unary_expr: NOT operand */ #line 945 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 4067 "bison_parser.cpp" +#line 4085 "bison_parser.cpp" break; case 160: /* unary_expr: operand ISNULL */ #line 946 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 4073 "bison_parser.cpp" +#line 4091 "bison_parser.cpp" break; case 161: /* unary_expr: operand IS NULL */ #line 947 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 4079 "bison_parser.cpp" +#line 4097 "bison_parser.cpp" break; case 162: /* unary_expr: operand IS NOT NULL */ #line 948 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 4085 "bison_parser.cpp" +#line 4103 "bison_parser.cpp" break; case 164: /* binary_expr: operand '-' operand */ #line 953 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 4091 "bison_parser.cpp" +#line 4109 "bison_parser.cpp" break; case 165: /* binary_expr: operand '+' operand */ #line 954 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 4097 "bison_parser.cpp" +#line 4115 "bison_parser.cpp" break; case 166: /* binary_expr: operand '/' operand */ #line 955 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 4103 "bison_parser.cpp" +#line 4121 "bison_parser.cpp" break; case 167: /* binary_expr: operand '*' operand */ #line 956 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 4109 "bison_parser.cpp" +#line 4127 "bison_parser.cpp" break; case 168: /* binary_expr: operand '%' operand */ #line 957 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 4115 "bison_parser.cpp" +#line 4133 "bison_parser.cpp" break; case 169: /* binary_expr: operand '^' operand */ #line 958 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 4121 "bison_parser.cpp" +#line 4139 "bison_parser.cpp" break; case 170: /* binary_expr: operand LIKE operand */ #line 959 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 4127 "bison_parser.cpp" +#line 4145 "bison_parser.cpp" break; case 171: /* binary_expr: operand NOT LIKE operand */ #line 960 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 4133 "bison_parser.cpp" +#line 4151 "bison_parser.cpp" break; case 172: /* binary_expr: operand ILIKE operand */ #line 961 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 4139 "bison_parser.cpp" +#line 4157 "bison_parser.cpp" break; case 173: /* binary_expr: operand CONCAT operand */ #line 962 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 4145 "bison_parser.cpp" +#line 4163 "bison_parser.cpp" break; case 174: /* logic_expr: expr AND expr */ #line 966 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 4151 "bison_parser.cpp" +#line 4169 "bison_parser.cpp" break; case 175: /* logic_expr: expr OR expr */ #line 967 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 4157 "bison_parser.cpp" +#line 4175 "bison_parser.cpp" break; case 176: /* in_expr: operand IN '(' expr_list ')' */ #line 971 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 4163 "bison_parser.cpp" +#line 4181 "bison_parser.cpp" break; case 177: /* in_expr: operand NOT IN '(' expr_list ')' */ #line 972 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 4169 "bison_parser.cpp" +#line 4187 "bison_parser.cpp" break; case 178: /* in_expr: operand IN '(' select_no_paren ')' */ #line 973 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 4175 "bison_parser.cpp" +#line 4193 "bison_parser.cpp" break; case 179: /* in_expr: operand NOT IN '(' select_no_paren ')' */ #line 974 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 4181 "bison_parser.cpp" +#line 4199 "bison_parser.cpp" break; case 180: /* case_expr: CASE expr case_list END */ #line 980 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } -#line 4187 "bison_parser.cpp" +#line 4205 "bison_parser.cpp" break; case 181: /* case_expr: CASE expr case_list ELSE expr END */ #line 981 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4193 "bison_parser.cpp" +#line 4211 "bison_parser.cpp" break; case 182: /* case_expr: CASE case_list END */ #line 982 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } -#line 4199 "bison_parser.cpp" +#line 4217 "bison_parser.cpp" break; case 183: /* case_expr: CASE case_list ELSE expr END */ #line 983 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4205 "bison_parser.cpp" +#line 4223 "bison_parser.cpp" break; case 184: /* case_list: WHEN expr THEN expr */ #line 987 "bison_parser.y" { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4211 "bison_parser.cpp" +#line 4229 "bison_parser.cpp" break; case 185: /* case_list: case_list WHEN expr THEN expr */ #line 988 "bison_parser.y" { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4217 "bison_parser.cpp" +#line 4235 "bison_parser.cpp" break; case 186: /* exists_expr: EXISTS '(' select_no_paren ')' */ #line 992 "bison_parser.y" { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 4223 "bison_parser.cpp" +#line 4241 "bison_parser.cpp" break; case 187: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ #line 993 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 4229 "bison_parser.cpp" +#line 4247 "bison_parser.cpp" break; case 188: /* comp_expr: operand '=' operand */ #line 997 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4235 "bison_parser.cpp" +#line 4253 "bison_parser.cpp" break; case 189: /* comp_expr: operand EQUALS operand */ #line 998 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4241 "bison_parser.cpp" +#line 4259 "bison_parser.cpp" break; case 190: /* comp_expr: operand NOTEQUALS operand */ #line 999 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 4247 "bison_parser.cpp" +#line 4265 "bison_parser.cpp" break; case 191: /* comp_expr: operand '<' operand */ #line 1000 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 4253 "bison_parser.cpp" +#line 4271 "bison_parser.cpp" break; case 192: /* comp_expr: operand '>' operand */ #line 1001 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 4259 "bison_parser.cpp" +#line 4277 "bison_parser.cpp" break; case 193: /* comp_expr: operand LESSEQ operand */ #line 1002 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 4265 "bison_parser.cpp" +#line 4283 "bison_parser.cpp" break; case 194: /* comp_expr: operand GREATEREQ operand */ #line 1003 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 4271 "bison_parser.cpp" +#line 4289 "bison_parser.cpp" break; case 195: /* function_expr: IDENTIFIER '(' ')' */ #line 1007 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 4277 "bison_parser.cpp" +#line 4295 "bison_parser.cpp" break; case 196: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ #line 1008 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 4283 "bison_parser.cpp" +#line 4301 "bison_parser.cpp" break; case 197: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ #line 1012 "bison_parser.y" { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } -#line 4289 "bison_parser.cpp" +#line 4307 "bison_parser.cpp" break; case 198: /* cast_expr: CAST '(' expr AS column_type ')' */ #line 1016 "bison_parser.y" { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } -#line 4295 "bison_parser.cpp" +#line 4313 "bison_parser.cpp" break; case 199: /* datetime_field: SECOND */ #line 1020 "bison_parser.y" { (yyval.datetime_field) = kDatetimeSecond; } -#line 4301 "bison_parser.cpp" +#line 4319 "bison_parser.cpp" break; case 200: /* datetime_field: MINUTE */ #line 1021 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMinute; } -#line 4307 "bison_parser.cpp" +#line 4325 "bison_parser.cpp" break; case 201: /* datetime_field: HOUR */ #line 1022 "bison_parser.y" { (yyval.datetime_field) = kDatetimeHour; } -#line 4313 "bison_parser.cpp" +#line 4331 "bison_parser.cpp" break; case 202: /* datetime_field: DAY */ #line 1023 "bison_parser.y" { (yyval.datetime_field) = kDatetimeDay; } -#line 4319 "bison_parser.cpp" +#line 4337 "bison_parser.cpp" break; case 203: /* datetime_field: MONTH */ #line 1024 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMonth; } -#line 4325 "bison_parser.cpp" +#line 4343 "bison_parser.cpp" break; case 204: /* datetime_field: YEAR */ #line 1025 "bison_parser.y" { (yyval.datetime_field) = kDatetimeYear; } -#line 4331 "bison_parser.cpp" +#line 4349 "bison_parser.cpp" break; case 205: /* array_expr: ARRAY '[' expr_list ']' */ #line 1029 "bison_parser.y" { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 4337 "bison_parser.cpp" +#line 4355 "bison_parser.cpp" break; case 206: /* array_index: operand '[' int_literal ']' */ #line 1033 "bison_parser.y" { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 4343 "bison_parser.cpp" +#line 4361 "bison_parser.cpp" break; case 207: /* between_expr: operand BETWEEN operand AND operand */ #line 1037 "bison_parser.y" { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4349 "bison_parser.cpp" +#line 4367 "bison_parser.cpp" break; case 208: /* column_name: IDENTIFIER */ #line 1041 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 4355 "bison_parser.cpp" +#line 4373 "bison_parser.cpp" break; case 209: /* column_name: IDENTIFIER '.' IDENTIFIER */ #line 1042 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 4361 "bison_parser.cpp" +#line 4379 "bison_parser.cpp" break; case 210: /* column_name: '*' */ #line 1043 "bison_parser.y" { (yyval.expr) = Expr::makeStar(); } -#line 4367 "bison_parser.cpp" +#line 4385 "bison_parser.cpp" break; case 211: /* column_name: IDENTIFIER '.' '*' */ #line 1044 "bison_parser.y" { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 4373 "bison_parser.cpp" +#line 4391 "bison_parser.cpp" break; case 217: /* string_literal: STRING */ #line 1056 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 4379 "bison_parser.cpp" +#line 4397 "bison_parser.cpp" break; case 218: /* bool_literal: TRUE */ #line 1060 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(true); } -#line 4385 "bison_parser.cpp" +#line 4403 "bison_parser.cpp" break; case 219: /* bool_literal: FALSE */ #line 1061 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(false); } -#line 4391 "bison_parser.cpp" +#line 4409 "bison_parser.cpp" break; case 220: /* num_literal: FLOATVAL */ #line 1065 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 4397 "bison_parser.cpp" +#line 4415 "bison_parser.cpp" break; case 222: /* int_literal: INTVAL */ #line 1070 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 4403 "bison_parser.cpp" +#line 4421 "bison_parser.cpp" break; case 223: /* null_literal: NULL */ #line 1074 "bison_parser.y" { (yyval.expr) = Expr::makeNullLiteral(); } -#line 4409 "bison_parser.cpp" +#line 4427 "bison_parser.cpp" break; case 224: /* param_expr: '?' */ @@ -4415,7 +4433,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 4419 "bison_parser.cpp" +#line 4437 "bison_parser.cpp" break; case 226: /* table_ref: table_ref_commalist ',' table_ref_atomic */ @@ -4426,7 +4444,7 @@ YYLTYPE yylloc = yyloc_default; tbl->list = (yyvsp[-2].table_vec); (yyval.table) = tbl; } -#line 4430 "bison_parser.cpp" +#line 4448 "bison_parser.cpp" break; case 230: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ @@ -4437,19 +4455,19 @@ YYLTYPE yylloc = yyloc_default; tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4441 "bison_parser.cpp" +#line 4459 "bison_parser.cpp" break; case 231: /* table_ref_commalist: table_ref_atomic */ #line 1116 "bison_parser.y" { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 4447 "bison_parser.cpp" +#line 4465 "bison_parser.cpp" break; case 232: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ #line 1117 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 4453 "bison_parser.cpp" +#line 4471 "bison_parser.cpp" break; case 233: /* table_ref_name: table_name opt_table_alias */ @@ -4461,7 +4479,7 @@ YYLTYPE yylloc = yyloc_default; tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4465 "bison_parser.cpp" +#line 4483 "bison_parser.cpp" break; case 234: /* table_ref_name_no_alias: table_name */ @@ -4471,79 +4489,79 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->schema = (yyvsp[0].table_name).schema; (yyval.table)->name = (yyvsp[0].table_name).name; } -#line 4475 "bison_parser.cpp" +#line 4493 "bison_parser.cpp" break; case 235: /* table_name: IDENTIFIER */ #line 1142 "bison_parser.y" { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} -#line 4481 "bison_parser.cpp" +#line 4499 "bison_parser.cpp" break; case 236: /* table_name: IDENTIFIER '.' IDENTIFIER */ #line 1143 "bison_parser.y" { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } -#line 4487 "bison_parser.cpp" +#line 4505 "bison_parser.cpp" break; case 237: /* opt_index_name: IDENTIFIER */ #line 1147 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4493 "bison_parser.cpp" +#line 4511 "bison_parser.cpp" break; case 238: /* opt_index_name: %empty */ #line 1148 "bison_parser.y" { (yyval.sval) = nullptr;} -#line 4499 "bison_parser.cpp" +#line 4517 "bison_parser.cpp" break; case 239: /* index_name: IDENTIFIER */ #line 1152 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4505 "bison_parser.cpp" +#line 4523 "bison_parser.cpp" break; case 241: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ #line 1158 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } -#line 4511 "bison_parser.cpp" +#line 4529 "bison_parser.cpp" break; case 243: /* opt_table_alias: %empty */ #line 1164 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4517 "bison_parser.cpp" +#line 4535 "bison_parser.cpp" break; case 244: /* alias: AS IDENTIFIER */ #line 1169 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4523 "bison_parser.cpp" +#line 4541 "bison_parser.cpp" break; case 245: /* alias: IDENTIFIER */ #line 1170 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4529 "bison_parser.cpp" +#line 4547 "bison_parser.cpp" break; case 247: /* opt_alias: %empty */ #line 1176 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4535 "bison_parser.cpp" +#line 4553 "bison_parser.cpp" break; case 249: /* opt_with_clause: %empty */ #line 1186 "bison_parser.y" { (yyval.with_description_vec) = nullptr; } -#line 4541 "bison_parser.cpp" +#line 4559 "bison_parser.cpp" break; case 250: /* with_clause: WITH with_description_list */ #line 1190 "bison_parser.y" { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } -#line 4547 "bison_parser.cpp" +#line 4565 "bison_parser.cpp" break; case 251: /* with_description_list: with_description */ @@ -4552,7 +4570,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.with_description_vec) = new std::vector(); (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); } -#line 4556 "bison_parser.cpp" +#line 4574 "bison_parser.cpp" break; case 252: /* with_description_list: with_description_list ',' with_description */ @@ -4561,7 +4579,7 @@ YYLTYPE yylloc = yyloc_default; (yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t)); (yyval.with_description_vec) = (yyvsp[-2].with_description_vec); } -#line 4565 "bison_parser.cpp" +#line 4583 "bison_parser.cpp" break; case 253: /* with_description: IDENTIFIER AS select_with_paren */ @@ -4571,7 +4589,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.with_description_t)->alias = (yyvsp[-2].sval); (yyval.with_description_t)->select = (yyvsp[0].select_stmt); } -#line 4575 "bison_parser.cpp" +#line 4593 "bison_parser.cpp" break; case 254: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ @@ -4583,7 +4601,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 4587 "bison_parser.cpp" +#line 4605 "bison_parser.cpp" break; case 255: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ @@ -4596,7 +4614,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 4600 "bison_parser.cpp" +#line 4618 "bison_parser.cpp" break; case 256: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ @@ -4616,83 +4634,83 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } -#line 4620 "bison_parser.cpp" +#line 4638 "bison_parser.cpp" break; case 257: /* opt_join_type: INNER */ #line 1255 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4626 "bison_parser.cpp" +#line 4644 "bison_parser.cpp" break; case 258: /* opt_join_type: LEFT OUTER */ #line 1256 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4632 "bison_parser.cpp" +#line 4650 "bison_parser.cpp" break; case 259: /* opt_join_type: LEFT */ #line 1257 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4638 "bison_parser.cpp" +#line 4656 "bison_parser.cpp" break; case 260: /* opt_join_type: RIGHT OUTER */ #line 1258 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4644 "bison_parser.cpp" +#line 4662 "bison_parser.cpp" break; case 261: /* opt_join_type: RIGHT */ #line 1259 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4650 "bison_parser.cpp" +#line 4668 "bison_parser.cpp" break; case 262: /* opt_join_type: FULL OUTER */ #line 1260 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4656 "bison_parser.cpp" +#line 4674 "bison_parser.cpp" break; case 263: /* opt_join_type: OUTER */ #line 1261 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4662 "bison_parser.cpp" +#line 4680 "bison_parser.cpp" break; case 264: /* opt_join_type: FULL */ #line 1262 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4668 "bison_parser.cpp" +#line 4686 "bison_parser.cpp" break; case 265: /* opt_join_type: CROSS */ #line 1263 "bison_parser.y" { (yyval.uval) = kJoinCross; } -#line 4674 "bison_parser.cpp" +#line 4692 "bison_parser.cpp" break; case 266: /* opt_join_type: %empty */ #line 1264 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4680 "bison_parser.cpp" +#line 4698 "bison_parser.cpp" break; case 270: /* ident_commalist: IDENTIFIER */ #line 1284 "bison_parser.y" { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 4686 "bison_parser.cpp" +#line 4704 "bison_parser.cpp" break; case 271: /* ident_commalist: ident_commalist ',' IDENTIFIER */ #line 1285 "bison_parser.y" { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 4692 "bison_parser.cpp" +#line 4710 "bison_parser.cpp" break; -#line 4696 "bison_parser.cpp" +#line 4714 "bison_parser.cpp" default: break; } diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 66714211..07c244a9 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -528,10 +528,10 @@ create_statement: $$->tableName = $4.name; $$->select = $6; } - | CREATE INDEX opt_index_name opt_not_exists ON table_name '(' ident_commalist ')' { + | CREATE INDEX opt_not_exists opt_index_name ON table_name '(' ident_commalist ')' { $$ = new CreateStatement(kCreateIndex); - $$->indexName = $3; - $$->ifNotExists = $4; + $$->indexName = $4; + $$->ifNotExists = $3; $$->tableName = $6.name; $$->indexColumns = $8; } From 8a5ad447040fe2285349abc42c77dc39a4113f2a Mon Sep 17 00:00:00 2001 From: simonstadlinger Date: Sat, 17 Jul 2021 12:41:05 +0200 Subject: [PATCH 25/73] Include if_exists flag to drop index --- src/parser/bison_parser.y | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 555d854f..3f704e41 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -630,10 +630,11 @@ drop_statement: $$->ifExists = false; $$->name = $3; } - | DROP INDEX index_name ON table_name { + | DROP INDEX opt_exists index_name ON table_name { $$ = new DropStatement(kDropIndex); $$->name = $5.name; - $$->index_name = $3; + $$->ifExists = $3 + $$->index_name = $4; } ; From 661013496466add59e11c86f7bc1405f19af2524 Mon Sep 17 00:00:00 2001 From: simonstadlinger Date: Sat, 17 Jul 2021 12:44:12 +0200 Subject: [PATCH 26/73] Fix drop index implementation --- src/parser/bison_parser.cpp | 2742 ++++++++++++++++++----------------- src/parser/bison_parser.h | 328 +++-- src/parser/bison_parser.y | 4 +- 3 files changed, 1578 insertions(+), 1496 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index f1b72c24..4513d40e 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -329,89 +329,92 @@ enum yysymbol_kind_t YYSYMBOL_column_def = 195, /* column_def */ YYSYMBOL_column_type = 196, /* column_type */ YYSYMBOL_opt_column_nullable = 197, /* opt_column_nullable */ - YYSYMBOL_drop_statement = 198, /* drop_statement */ - YYSYMBOL_opt_exists = 199, /* opt_exists */ - YYSYMBOL_delete_statement = 200, /* delete_statement */ - YYSYMBOL_truncate_statement = 201, /* truncate_statement */ - YYSYMBOL_insert_statement = 202, /* insert_statement */ - YYSYMBOL_opt_column_list = 203, /* opt_column_list */ - YYSYMBOL_update_statement = 204, /* update_statement */ - YYSYMBOL_update_clause_commalist = 205, /* update_clause_commalist */ - YYSYMBOL_update_clause = 206, /* update_clause */ - YYSYMBOL_select_statement = 207, /* select_statement */ - YYSYMBOL_select_within_set_operation = 208, /* select_within_set_operation */ - YYSYMBOL_select_within_set_operation_no_parentheses = 209, /* select_within_set_operation_no_parentheses */ - YYSYMBOL_select_with_paren = 210, /* select_with_paren */ - YYSYMBOL_select_no_paren = 211, /* select_no_paren */ - YYSYMBOL_set_operator = 212, /* set_operator */ - YYSYMBOL_set_type = 213, /* set_type */ - YYSYMBOL_opt_all = 214, /* opt_all */ - YYSYMBOL_select_clause = 215, /* select_clause */ - YYSYMBOL_opt_distinct = 216, /* opt_distinct */ - YYSYMBOL_select_list = 217, /* select_list */ - YYSYMBOL_opt_from_clause = 218, /* opt_from_clause */ - YYSYMBOL_from_clause = 219, /* from_clause */ - YYSYMBOL_opt_where = 220, /* opt_where */ - YYSYMBOL_opt_group = 221, /* opt_group */ - YYSYMBOL_opt_having = 222, /* opt_having */ - YYSYMBOL_opt_order = 223, /* opt_order */ - YYSYMBOL_order_list = 224, /* order_list */ - YYSYMBOL_order_desc = 225, /* order_desc */ - YYSYMBOL_opt_order_type = 226, /* opt_order_type */ - YYSYMBOL_opt_top = 227, /* opt_top */ - YYSYMBOL_opt_limit = 228, /* opt_limit */ - YYSYMBOL_expr_list = 229, /* expr_list */ - YYSYMBOL_opt_literal_list = 230, /* opt_literal_list */ - YYSYMBOL_literal_list = 231, /* literal_list */ - YYSYMBOL_expr_alias = 232, /* expr_alias */ - YYSYMBOL_expr = 233, /* expr */ - YYSYMBOL_operand = 234, /* operand */ - YYSYMBOL_scalar_expr = 235, /* scalar_expr */ - YYSYMBOL_unary_expr = 236, /* unary_expr */ - YYSYMBOL_binary_expr = 237, /* binary_expr */ - YYSYMBOL_logic_expr = 238, /* logic_expr */ - YYSYMBOL_in_expr = 239, /* in_expr */ - YYSYMBOL_case_expr = 240, /* case_expr */ - YYSYMBOL_case_list = 241, /* case_list */ - YYSYMBOL_exists_expr = 242, /* exists_expr */ - YYSYMBOL_comp_expr = 243, /* comp_expr */ - YYSYMBOL_function_expr = 244, /* function_expr */ - YYSYMBOL_extract_expr = 245, /* extract_expr */ - YYSYMBOL_cast_expr = 246, /* cast_expr */ - YYSYMBOL_datetime_field = 247, /* datetime_field */ - YYSYMBOL_array_expr = 248, /* array_expr */ - YYSYMBOL_array_index = 249, /* array_index */ - YYSYMBOL_between_expr = 250, /* between_expr */ - YYSYMBOL_column_name = 251, /* column_name */ - YYSYMBOL_literal = 252, /* literal */ - YYSYMBOL_string_literal = 253, /* string_literal */ - YYSYMBOL_bool_literal = 254, /* bool_literal */ - YYSYMBOL_num_literal = 255, /* num_literal */ - YYSYMBOL_int_literal = 256, /* int_literal */ - YYSYMBOL_null_literal = 257, /* null_literal */ - YYSYMBOL_param_expr = 258, /* param_expr */ - YYSYMBOL_table_ref = 259, /* table_ref */ - YYSYMBOL_table_ref_atomic = 260, /* table_ref_atomic */ - YYSYMBOL_nonjoin_table_ref_atomic = 261, /* nonjoin_table_ref_atomic */ - YYSYMBOL_table_ref_commalist = 262, /* table_ref_commalist */ - YYSYMBOL_table_ref_name = 263, /* table_ref_name */ - YYSYMBOL_table_ref_name_no_alias = 264, /* table_ref_name_no_alias */ - YYSYMBOL_table_name = 265, /* table_name */ - YYSYMBOL_opt_index_name = 266, /* opt_index_name */ - YYSYMBOL_index_name = 267, /* index_name */ - YYSYMBOL_table_alias = 268, /* table_alias */ - YYSYMBOL_opt_table_alias = 269, /* opt_table_alias */ - YYSYMBOL_alias = 270, /* alias */ - YYSYMBOL_opt_alias = 271, /* opt_alias */ - YYSYMBOL_opt_with_clause = 272, /* opt_with_clause */ - YYSYMBOL_with_clause = 273, /* with_clause */ - YYSYMBOL_with_description_list = 274, /* with_description_list */ - YYSYMBOL_with_description = 275, /* with_description */ - YYSYMBOL_join_clause = 276, /* join_clause */ - YYSYMBOL_opt_join_type = 277, /* opt_join_type */ - YYSYMBOL_join_condition = 278, /* join_condition */ - YYSYMBOL_opt_semicolon = 279, /* opt_semicolon */ - YYSYMBOL_ident_commalist = 280 /* ident_commalist */ + YYSYMBOL_opt_column_constraint = 198, /* opt_column_constraint */ + YYSYMBOL_opt_table_key_constraints = 199, /* opt_table_key_constraints */ + YYSYMBOL_table_key_constraint = 200, /* table_key_constraint */ + YYSYMBOL_drop_statement = 201, /* drop_statement */ + YYSYMBOL_opt_exists = 202, /* opt_exists */ + YYSYMBOL_delete_statement = 203, /* delete_statement */ + YYSYMBOL_truncate_statement = 204, /* truncate_statement */ + YYSYMBOL_insert_statement = 205, /* insert_statement */ + YYSYMBOL_opt_column_list = 206, /* opt_column_list */ + YYSYMBOL_update_statement = 207, /* update_statement */ + YYSYMBOL_update_clause_commalist = 208, /* update_clause_commalist */ + YYSYMBOL_update_clause = 209, /* update_clause */ + YYSYMBOL_select_statement = 210, /* select_statement */ + YYSYMBOL_select_within_set_operation = 211, /* select_within_set_operation */ + YYSYMBOL_select_within_set_operation_no_parentheses = 212, /* select_within_set_operation_no_parentheses */ + YYSYMBOL_select_with_paren = 213, /* select_with_paren */ + YYSYMBOL_select_no_paren = 214, /* select_no_paren */ + YYSYMBOL_set_operator = 215, /* set_operator */ + YYSYMBOL_set_type = 216, /* set_type */ + YYSYMBOL_opt_all = 217, /* opt_all */ + YYSYMBOL_select_clause = 218, /* select_clause */ + YYSYMBOL_opt_distinct = 219, /* opt_distinct */ + YYSYMBOL_select_list = 220, /* select_list */ + YYSYMBOL_opt_from_clause = 221, /* opt_from_clause */ + YYSYMBOL_from_clause = 222, /* from_clause */ + YYSYMBOL_opt_where = 223, /* opt_where */ + YYSYMBOL_opt_group = 224, /* opt_group */ + YYSYMBOL_opt_having = 225, /* opt_having */ + YYSYMBOL_opt_order = 226, /* opt_order */ + YYSYMBOL_order_list = 227, /* order_list */ + YYSYMBOL_order_desc = 228, /* order_desc */ + YYSYMBOL_opt_order_type = 229, /* opt_order_type */ + YYSYMBOL_opt_top = 230, /* opt_top */ + YYSYMBOL_opt_limit = 231, /* opt_limit */ + YYSYMBOL_expr_list = 232, /* expr_list */ + YYSYMBOL_opt_literal_list = 233, /* opt_literal_list */ + YYSYMBOL_literal_list = 234, /* literal_list */ + YYSYMBOL_expr_alias = 235, /* expr_alias */ + YYSYMBOL_expr = 236, /* expr */ + YYSYMBOL_operand = 237, /* operand */ + YYSYMBOL_scalar_expr = 238, /* scalar_expr */ + YYSYMBOL_unary_expr = 239, /* unary_expr */ + YYSYMBOL_binary_expr = 240, /* binary_expr */ + YYSYMBOL_logic_expr = 241, /* logic_expr */ + YYSYMBOL_in_expr = 242, /* in_expr */ + YYSYMBOL_case_expr = 243, /* case_expr */ + YYSYMBOL_case_list = 244, /* case_list */ + YYSYMBOL_exists_expr = 245, /* exists_expr */ + YYSYMBOL_comp_expr = 246, /* comp_expr */ + YYSYMBOL_function_expr = 247, /* function_expr */ + YYSYMBOL_extract_expr = 248, /* extract_expr */ + YYSYMBOL_cast_expr = 249, /* cast_expr */ + YYSYMBOL_datetime_field = 250, /* datetime_field */ + YYSYMBOL_array_expr = 251, /* array_expr */ + YYSYMBOL_array_index = 252, /* array_index */ + YYSYMBOL_between_expr = 253, /* between_expr */ + YYSYMBOL_column_name = 254, /* column_name */ + YYSYMBOL_literal = 255, /* literal */ + YYSYMBOL_string_literal = 256, /* string_literal */ + YYSYMBOL_bool_literal = 257, /* bool_literal */ + YYSYMBOL_num_literal = 258, /* num_literal */ + YYSYMBOL_int_literal = 259, /* int_literal */ + YYSYMBOL_null_literal = 260, /* null_literal */ + YYSYMBOL_param_expr = 261, /* param_expr */ + YYSYMBOL_table_ref = 262, /* table_ref */ + YYSYMBOL_table_ref_atomic = 263, /* table_ref_atomic */ + YYSYMBOL_nonjoin_table_ref_atomic = 264, /* nonjoin_table_ref_atomic */ + YYSYMBOL_table_ref_commalist = 265, /* table_ref_commalist */ + YYSYMBOL_table_ref_name = 266, /* table_ref_name */ + YYSYMBOL_table_ref_name_no_alias = 267, /* table_ref_name_no_alias */ + YYSYMBOL_table_name = 268, /* table_name */ + YYSYMBOL_opt_index_name = 269, /* opt_index_name */ + YYSYMBOL_index_name = 270, /* index_name */ + YYSYMBOL_table_alias = 271, /* table_alias */ + YYSYMBOL_opt_table_alias = 272, /* opt_table_alias */ + YYSYMBOL_alias = 273, /* alias */ + YYSYMBOL_opt_alias = 274, /* opt_alias */ + YYSYMBOL_opt_with_clause = 275, /* opt_with_clause */ + YYSYMBOL_with_clause = 276, /* with_clause */ + YYSYMBOL_with_description_list = 277, /* with_description_list */ + YYSYMBOL_with_description = 278, /* with_description */ + YYSYMBOL_join_clause = 279, /* join_clause */ + YYSYMBOL_opt_join_type = 280, /* opt_join_type */ + YYSYMBOL_join_condition = 281, /* join_condition */ + YYSYMBOL_opt_semicolon = 282, /* opt_semicolon */ + YYSYMBOL_ident_commalist = 283 /* ident_commalist */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -736,16 +739,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 64 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 823 +#define YYLAST 813 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 173 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 108 +#define YYNNTS 111 /* YYNRULES -- Number of rules. */ -#define YYNRULES 271 +#define YYNRULES 279 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 501 +#define YYNSTATES 519 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 410 @@ -810,34 +813,34 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 271, 271, 292, 298, 307, 311, 315, 318, 321, - 328, 329, 330, 331, 332, 333, 334, 335, 336, 345, - 346, 351, 352, 356, 360, 372, 375, 378, 384, 385, - 392, 399, 402, 406, 420, 426, 435, 452, 456, 459, - 468, 482, 485, 490, 504, 517, 524, 531, 538, 549, - 550, 554, 555, 559, 565, 566, 567, 568, 569, 570, - 571, 572, 573, 574, 575, 576, 577, 578, 582, 583, - 584, 594, 600, 606, 611, 619, 620, 629, 638, 651, - 658, 669, 670, 680, 689, 690, 694, 706, 710, 714, - 728, 729, 732, 733, 744, 745, 749, 759, 772, 779, - 783, 787, 794, 797, 803, 815, 816, 820, 824, 825, - 829, 834, 835, 839, 844, 848, 849, 853, 854, 858, - 859, 863, 867, 868, 869, 875, 876, 880, 881, 882, - 883, 884, 885, 892, 893, 897, 898, 902, 903, 907, - 917, 918, 919, 920, 921, 925, 926, 927, 928, 929, - 930, 931, 932, 933, 934, 935, 939, 940, 944, 945, - 946, 947, 948, 952, 953, 954, 955, 956, 957, 958, - 959, 960, 961, 962, 966, 967, 971, 972, 973, 974, - 980, 981, 982, 983, 987, 988, 992, 993, 997, 998, - 999, 1000, 1001, 1002, 1003, 1007, 1008, 1012, 1016, 1020, - 1021, 1022, 1023, 1024, 1025, 1029, 1033, 1037, 1041, 1042, - 1043, 1044, 1048, 1049, 1050, 1051, 1052, 1056, 1060, 1061, - 1065, 1066, 1070, 1074, 1078, 1090, 1091, 1101, 1102, 1106, - 1107, 1116, 1117, 1122, 1133, 1142, 1143, 1147, 1148, 1152, - 1157, 1158, 1163, 1164, 1169, 1170, 1175, 1176, 1185, 1186, - 1190, 1194, 1198, 1205, 1218, 1226, 1236, 1255, 1256, 1257, - 1258, 1259, 1260, 1261, 1262, 1263, 1264, 1269, 1278, 1279, - 1284, 1285 + 0, 277, 277, 298, 304, 313, 317, 321, 324, 327, + 334, 335, 336, 337, 338, 339, 340, 341, 342, 351, + 352, 357, 358, 362, 366, 378, 381, 384, 390, 391, + 398, 405, 408, 412, 426, 432, 441, 458, 462, 465, + 474, 488, 491, 496, 510, 523, 531, 538, 545, 556, + 557, 561, 562, 566, 572, 573, 574, 575, 576, 577, + 578, 579, 580, 581, 582, 583, 584, 585, 589, 590, + 591, 595, 596, 597, 601, 602, 603, 607, 608, 616, + 622, 628, 633, 642, 643, 652, 661, 674, 681, 692, + 693, 703, 712, 713, 717, 729, 733, 737, 751, 752, + 755, 756, 767, 768, 772, 782, 795, 802, 806, 810, + 817, 820, 826, 838, 839, 843, 847, 848, 852, 857, + 858, 862, 867, 871, 872, 876, 877, 881, 882, 886, + 890, 891, 892, 898, 899, 903, 904, 905, 906, 907, + 908, 915, 916, 920, 921, 925, 926, 930, 940, 941, + 942, 943, 944, 948, 949, 950, 951, 952, 953, 954, + 955, 956, 957, 958, 962, 963, 967, 968, 969, 970, + 971, 975, 976, 977, 978, 979, 980, 981, 982, 983, + 984, 985, 989, 990, 994, 995, 996, 997, 1003, 1004, + 1005, 1006, 1010, 1011, 1015, 1016, 1020, 1021, 1022, 1023, + 1024, 1025, 1026, 1030, 1031, 1035, 1039, 1043, 1044, 1045, + 1046, 1047, 1048, 1052, 1056, 1060, 1064, 1065, 1066, 1067, + 1071, 1072, 1073, 1074, 1075, 1079, 1083, 1084, 1088, 1089, + 1093, 1097, 1101, 1113, 1114, 1124, 1125, 1129, 1130, 1139, + 1140, 1145, 1156, 1165, 1166, 1170, 1171, 1175, 1180, 1181, + 1186, 1187, 1192, 1193, 1198, 1199, 1208, 1209, 1213, 1217, + 1221, 1228, 1241, 1249, 1259, 1278, 1279, 1280, 1281, 1282, + 1283, 1284, 1285, 1286, 1287, 1292, 1301, 1302, 1307, 1308 }; #endif @@ -883,10 +886,12 @@ static const char *const yytname[] = "file_type", "file_path", "opt_file_type", "export_statement", "show_statement", "create_statement", "opt_not_exists", "column_def_commalist", "column_def", "column_type", - "opt_column_nullable", "drop_statement", "opt_exists", - "delete_statement", "truncate_statement", "insert_statement", - "opt_column_list", "update_statement", "update_clause_commalist", - "update_clause", "select_statement", "select_within_set_operation", + "opt_column_nullable", "opt_column_constraint", + "opt_table_key_constraints", "table_key_constraint", "drop_statement", + "opt_exists", "delete_statement", "truncate_statement", + "insert_statement", "opt_column_list", "update_statement", + "update_clause_commalist", "update_clause", "select_statement", + "select_within_set_operation", "select_within_set_operation_no_parentheses", "select_with_paren", "select_no_paren", "set_operator", "set_type", "opt_all", "select_clause", "opt_distinct", "select_list", "opt_from_clause", @@ -940,12 +945,12 @@ static const yytype_int16 yytoknum[] = }; #endif -#define YYPACT_NINF (-376) +#define YYPACT_NINF (-404) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF (-269) +#define YYTABLE_NINF (-277) #define yytable_value_is_error(Yyn) \ ((Yyn) == YYTABLE_NINF) @@ -954,57 +959,58 @@ static const yytype_int16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - 444, 17, 90, 115, 176, 90, 22, -37, 68, 6, - 90, 90, 54, 20, 186, 65, 65, 65, 198, 50, - -376, 124, -376, 124, -376, -376, -376, -376, -376, -376, - -376, -376, -376, -376, -376, -38, -376, 237, 112, -376, - 118, 195, -376, 163, 163, 163, 90, 294, 90, 179, - -376, -27, 299, 188, 188, 90, -376, 199, 154, -376, - -376, -376, -376, -376, -376, 543, -376, 231, -376, -376, - 207, -38, 19, -376, 18, -376, 328, 16, 330, 212, - 332, 90, 90, 256, -376, 247, 173, 338, 340, 340, - -376, 215, 306, 90, 90, -376, 190, 186, -376, 191, - 357, 352, 197, 202, -376, -376, -376, -38, 255, 246, - -38, 78, -376, -376, -376, -376, -376, -376, -376, -376, - 209, 208, -376, -376, -376, -376, -376, -376, -376, -376, - -376, 342, -376, 264, -44, 173, 253, -376, 340, 395, - 130, 251, -64, -376, 290, -376, 290, 90, -376, -376, - -376, -376, -376, 400, -376, -376, 253, -376, -376, 331, - -376, -376, 19, -376, -376, 253, 331, 253, 110, -376, - -376, 16, -376, 90, 403, 297, 406, 286, 104, 244, - 248, 249, 200, 301, 252, 385, -376, 233, 66, 412, - -376, -376, -376, -376, -376, -376, -376, -376, -376, -376, - -376, -376, -376, -376, -376, -376, 317, -376, -126, 257, - -376, 253, 338, -376, 370, -376, -376, -376, 259, -100, - -376, 326, 265, -376, 38, 78, -38, 266, -376, -42, - 78, 66, 368, -29, -376, 260, 336, -376, 705, 73, - -376, 297, 14, 12, 366, 155, 253, 253, -49, 75, - 263, 385, 476, 253, 100, 267, -91, 253, 253, 385, - -376, 385, -41, 271, 81, 385, 385, 385, 385, 385, - 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, - 357, 90, -376, 436, 16, 66, -376, 294, 16, -376, - 400, 11, 256, -376, 253, -376, 437, -376, -376, -376, - -376, 253, -376, -376, -376, -376, 253, 253, 395, 340, - -376, 411, -376, 275, 278, -376, -376, 279, -376, -376, - -376, -376, -376, -376, 129, -376, 406, -376, -376, 253, - -376, -376, 280, -376, -376, -376, -376, -376, -376, 354, - 97, 69, 86, 253, 253, -376, 366, 349, 51, -376, - -376, -376, 339, 544, 563, 385, 283, 233, -376, 351, - 287, 563, 563, 563, 563, 599, 599, 599, 599, 100, - 100, -96, -96, -96, 30, 291, -376, -376, 83, -376, - 140, -376, 297, -376, 10, -376, 285, -376, 27, -376, - 389, -376, -376, -376, 66, 66, 144, -376, 295, 457, - 458, 461, -376, 369, -376, -376, 145, -376, 253, 705, - 253, 253, -376, 111, 85, 307, -376, 385, 563, 233, - 308, 151, -376, -376, -376, -376, 309, 373, -376, -376, - -376, 397, 401, 402, 383, 11, 479, -376, -376, -376, - 360, -376, -376, 480, 316, 321, 322, -376, -376, -78, - 323, 66, 117, -376, 253, -376, 476, 324, 153, -376, - -376, 27, 11, -376, -376, -376, 11, 284, 327, 253, - 325, 491, -376, -376, -376, -376, -376, 66, -376, -376, - -376, -376, 303, 395, -17, -376, 333, 335, 253, 158, - 253, -376, -376, 13, 66, -376, -376, 66, 329, 341, - -376 + 489, 20, 58, 103, 111, 58, -35, 33, 87, 19, + 58, 58, 116, 4, 193, 46, 46, 46, 212, 66, + -404, 146, -404, 146, -404, -404, -404, -404, -404, -404, + -404, -404, -404, -404, -404, -42, -404, 258, 107, -404, + 114, 222, -404, 197, 197, 197, 58, 295, 58, 220, + -404, -31, 232, 232, 232, 58, -404, 224, 194, -404, + -404, -404, -404, -404, -404, 458, -404, 273, -404, -404, + 248, -42, 84, -404, 125, -404, 378, 12, 388, 280, + 396, 58, 58, 320, -404, 312, 240, 405, 407, 407, + 364, 409, 58, 58, -404, 247, 193, -404, 249, 411, + 416, 251, 261, -404, -404, -404, -42, 317, 306, -42, + -16, -404, -404, -404, -404, -404, -404, -404, -404, 264, + 263, -404, -404, -404, -404, -404, -404, -404, -404, -404, + 390, -404, 307, -57, 240, 246, -404, 407, 433, 131, + 290, -58, -404, 328, -404, 328, -404, -404, 310, -404, + -404, -404, -404, 438, -404, -404, 246, -404, -404, 368, + -404, -404, 84, -404, -404, 246, 368, 246, 153, -404, + -404, 12, -404, 58, 442, 337, 446, 326, -65, 284, + 286, 289, 157, 300, 287, 86, -404, 218, -7, 327, + -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, + -404, -404, -404, -404, -404, -404, 360, -404, 67, 296, + -404, 246, 405, -404, 418, -404, -404, 58, 302, 139, + -404, 371, 299, -404, 83, -16, -42, 303, -404, 128, + -16, -7, 417, -26, -404, 314, 399, -404, 695, 322, + -404, 337, 10, 6, 443, 285, 246, 246, 187, 77, + 332, 86, 517, 246, 174, 333, -50, 246, 246, 86, + -404, 86, 82, 335, 88, 86, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, + 411, 58, -404, 492, 12, -7, -404, 295, -404, 12, + -404, 438, 16, 320, -404, 246, -404, 500, -404, -404, + -404, -404, 246, -404, -404, -404, -404, 246, 246, 433, + 407, -404, 475, -404, 339, 340, -404, -404, 341, -404, + -404, -404, -404, -404, -404, 159, 23, 143, -404, -404, + -404, 246, -404, -404, 344, -404, -404, -404, -404, -404, + -404, 420, 195, 140, 124, 246, 246, -404, 443, 414, + 60, -404, -404, -404, 402, 464, 553, 86, 351, 218, + -404, 419, 354, 553, 553, 553, 553, 589, 589, 589, + 589, 174, 174, -93, -93, -93, -97, 355, -404, -404, + 172, -404, 182, -404, 337, -404, 0, -404, 352, -404, + 26, -404, 455, -404, -404, -404, -7, -7, 184, -404, + 359, 521, 524, 525, -404, 429, 27, 415, 366, -404, + -404, 70, -404, 186, -404, 246, 695, 246, 246, -404, + -74, 141, 367, -404, 86, 553, 218, 369, 191, -404, + -404, -404, -404, 370, 441, -404, -404, -404, 459, 465, + 466, 447, 16, 543, -404, -404, -404, 422, -404, -404, + 544, 381, 385, 386, -404, 430, -404, -404, 389, 433, + -404, -49, 387, -7, 154, -404, 246, -404, 517, 391, + 196, -404, -404, 26, 16, -404, -404, -404, 16, 297, + 393, 246, 394, 551, -404, -404, -404, 433, 205, -404, + -404, -404, -7, -404, -404, -404, -404, 316, 433, -19, + -404, 397, 215, -404, 400, 246, 230, 246, -404, -404, + -404, 17, -7, -404, -404, -7, 392, 398, -404 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -1012,89 +1018,92 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_int16 yydefact[] = { - 249, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 29, 29, 29, 0, 269, + 257, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 29, 29, 29, 0, 277, 3, 20, 18, 20, 17, 8, 9, 7, 11, 16, - 13, 14, 12, 15, 10, 0, 248, 0, 235, 78, + 13, 14, 12, 15, 10, 0, 256, 0, 243, 86, 32, 0, 43, 50, 50, 50, 0, 0, 0, 0, - 234, 0, 0, 76, 76, 0, 41, 0, 250, 251, - 28, 25, 27, 26, 1, 249, 2, 0, 6, 5, - 126, 0, 87, 88, 118, 73, 0, 136, 0, 0, - 238, 0, 0, 112, 36, 0, 82, 0, 0, 0, - 239, 0, 0, 0, 0, 42, 0, 0, 4, 0, - 0, 106, 0, 0, 100, 101, 99, 0, 103, 0, - 0, 132, 236, 217, 220, 222, 223, 218, 219, 224, - 0, 135, 137, 212, 213, 214, 221, 215, 216, 31, - 30, 0, 237, 0, 0, 82, 0, 77, 0, 0, - 0, 0, 112, 84, 39, 37, 39, 0, 75, 71, - 72, 253, 252, 0, 125, 105, 0, 95, 94, 118, - 91, 90, 92, 102, 98, 0, 118, 0, 0, 96, - 33, 0, 49, 0, 0, 249, 0, 0, 208, 0, - 0, 0, 0, 0, 0, 0, 210, 0, 111, 140, - 147, 148, 149, 142, 144, 150, 143, 163, 151, 152, - 153, 154, 146, 141, 156, 157, 0, 270, 0, 0, - 80, 0, 0, 83, 0, 35, 40, 74, 23, 0, - 21, 109, 107, 133, 247, 132, 0, 117, 119, 124, - 132, 128, 130, 127, 138, 0, 0, 46, 0, 0, - 51, 249, 106, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 159, 0, 158, 0, 0, 0, 0, 0, - 160, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 242, 0, 84, 84, 84, 0, 41, 0, 258, 259, + 28, 25, 27, 26, 1, 257, 2, 0, 6, 5, + 134, 0, 95, 96, 126, 81, 0, 144, 0, 0, + 246, 0, 0, 120, 36, 0, 90, 0, 0, 0, + 0, 0, 0, 0, 42, 0, 0, 4, 0, 0, + 114, 0, 0, 108, 109, 107, 0, 111, 0, 0, + 140, 244, 225, 228, 230, 231, 226, 227, 232, 0, + 143, 145, 220, 221, 222, 229, 223, 224, 31, 30, + 0, 245, 0, 0, 90, 0, 85, 0, 0, 0, + 0, 120, 92, 39, 37, 39, 83, 247, 0, 79, + 80, 261, 260, 0, 133, 113, 0, 103, 102, 126, + 99, 98, 100, 110, 106, 0, 126, 0, 0, 104, + 33, 0, 49, 0, 0, 257, 0, 0, 216, 0, + 0, 0, 0, 0, 0, 0, 218, 0, 119, 148, + 155, 156, 157, 150, 152, 158, 151, 171, 159, 160, + 161, 162, 154, 149, 164, 165, 0, 278, 0, 0, + 88, 0, 0, 91, 0, 35, 40, 0, 23, 0, + 21, 117, 115, 141, 255, 140, 0, 125, 127, 132, + 140, 136, 138, 135, 146, 0, 0, 46, 0, 76, + 51, 257, 114, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 167, 0, 166, 0, 0, 0, 0, 0, + 168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 81, 0, 0, 86, 85, 0, 0, 19, - 0, 0, 112, 108, 0, 245, 0, 246, 139, 89, - 93, 0, 123, 122, 121, 97, 0, 0, 0, 0, - 55, 0, 60, 0, 0, 59, 57, 0, 67, 66, - 56, 64, 65, 54, 70, 45, 0, 48, 195, 0, - 209, 211, 0, 199, 200, 201, 202, 203, 204, 0, - 0, 0, 0, 0, 0, 182, 0, 0, 0, 155, - 145, 174, 175, 0, 170, 0, 0, 0, 161, 0, - 173, 172, 188, 189, 190, 191, 192, 193, 194, 165, - 164, 167, 166, 168, 169, 0, 34, 271, 0, 38, - 0, 22, 249, 110, 225, 227, 0, 229, 243, 228, - 114, 134, 244, 120, 131, 129, 0, 44, 0, 0, - 0, 0, 68, 0, 53, 52, 0, 186, 0, 0, - 0, 0, 180, 0, 0, 0, 205, 0, 171, 0, - 0, 0, 162, 206, 79, 24, 0, 0, 265, 257, - 263, 261, 264, 259, 0, 0, 0, 242, 233, 240, - 0, 104, 47, 0, 0, 0, 0, 69, 196, 0, - 0, 184, 0, 183, 0, 187, 207, 0, 0, 178, - 176, 243, 0, 260, 262, 258, 0, 226, 244, 0, - 0, 0, 61, 63, 197, 198, 181, 185, 179, 177, - 230, 254, 266, 0, 116, 62, 0, 0, 0, 0, - 0, 113, 58, 0, 267, 255, 241, 115, 208, 0, - 256 + 0, 0, 89, 0, 0, 94, 93, 0, 82, 0, + 19, 0, 0, 120, 116, 0, 253, 0, 254, 147, + 97, 101, 0, 131, 130, 129, 105, 0, 0, 0, + 0, 55, 0, 60, 0, 0, 59, 57, 0, 67, + 66, 56, 64, 65, 54, 70, 0, 0, 74, 48, + 203, 0, 217, 219, 0, 207, 208, 209, 210, 211, + 212, 0, 0, 0, 0, 0, 0, 190, 0, 0, + 0, 163, 153, 182, 183, 0, 178, 0, 0, 0, + 169, 0, 181, 180, 196, 197, 198, 199, 200, 201, + 202, 173, 172, 175, 174, 176, 177, 0, 34, 279, + 0, 38, 0, 22, 257, 118, 233, 235, 0, 237, + 251, 236, 122, 142, 252, 128, 139, 137, 0, 44, + 0, 0, 0, 0, 68, 0, 73, 0, 0, 52, + 45, 0, 75, 0, 194, 0, 0, 0, 0, 188, + 0, 0, 0, 213, 0, 179, 0, 0, 0, 170, + 214, 87, 24, 0, 0, 273, 265, 271, 269, 272, + 267, 0, 0, 0, 250, 241, 248, 0, 112, 47, + 0, 0, 0, 0, 69, 0, 72, 53, 0, 0, + 204, 0, 0, 192, 0, 191, 0, 195, 215, 0, + 0, 186, 184, 251, 0, 268, 270, 266, 0, 234, + 252, 0, 0, 0, 61, 63, 71, 0, 0, 205, + 206, 189, 193, 187, 185, 238, 262, 274, 0, 124, + 62, 0, 0, 78, 0, 0, 0, 0, 121, 58, + 77, 0, 275, 263, 249, 123, 216, 0, 264 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -376, -376, -376, 434, -376, 477, -376, 213, -376, 250, - -376, -376, -376, -376, 217, -80, 361, -376, -376, -376, - 82, -376, 182, 101, -376, -376, 459, -376, -376, -376, - 376, -376, -376, 302, -167, -66, -376, 29, -70, -50, - -376, -376, -73, 273, -376, -376, -376, -125, -376, -376, - 53, -376, 216, -376, -376, 25, -251, -376, -20, 222, - -136, -131, -376, -376, -376, -376, -376, -376, 272, -376, - -376, -376, -376, -376, -376, -376, -376, -376, 26, -74, - -83, -376, -376, -90, -376, -376, -376, -375, 59, -376, - -376, -376, 2, -376, -376, -376, 61, 300, -376, -376, - -376, -376, 426, -376, -376, -376, -376, -297 + -404, -404, -404, 493, -404, 545, -404, 281, -404, 271, + -404, -404, -404, -404, 293, -77, 426, -404, -404, -404, + 283, -404, 250, 158, -404, -404, -404, 254, -404, 279, + -404, -404, -404, 439, -404, -404, 365, -168, -75, -404, + 8, -70, -53, -404, -404, -61, 343, -404, -404, -404, + -114, -404, -404, -39, -404, 288, -404, -404, 14, -251, + -404, -15, 291, -135, -130, -404, -404, -404, -404, -404, + -404, 334, -404, -404, -404, -404, -404, -404, -404, -404, + -404, 72, -71, -78, -404, -404, -95, -404, -404, -404, + -403, 113, -404, -404, -404, 3, -404, -404, -404, 115, + 372, -404, -404, -404, -404, 495, -404, -404, -404, -404, + -306 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { 0, 18, 19, 20, 21, 68, 219, 220, 22, 61, - 23, 130, 24, 25, 85, 144, 215, 26, 27, 28, - 80, 239, 240, 324, 404, 29, 93, 30, 31, 32, - 140, 33, 142, 143, 34, 159, 160, 161, 73, 107, - 108, 164, 74, 156, 221, 292, 293, 137, 441, 491, - 111, 227, 228, 304, 101, 169, 222, 120, 121, 223, - 224, 189, 190, 191, 192, 193, 194, 195, 249, 196, - 197, 198, 199, 200, 339, 201, 202, 203, 204, 205, - 123, 124, 125, 126, 127, 128, 383, 384, 385, 386, - 387, 49, 388, 133, 91, 437, 438, 439, 298, 35, - 36, 58, 59, 389, 434, 495, 66, 208 + 23, 129, 24, 25, 85, 143, 215, 26, 27, 28, + 80, 239, 240, 325, 406, 457, 327, 328, 29, 91, + 30, 31, 32, 139, 33, 141, 142, 34, 159, 160, + 161, 73, 106, 107, 164, 74, 156, 221, 293, 294, + 136, 448, 508, 110, 227, 228, 305, 100, 169, 222, + 119, 120, 223, 224, 189, 190, 191, 192, 193, 194, + 195, 249, 196, 197, 198, 199, 200, 341, 201, 202, + 203, 204, 205, 122, 123, 124, 125, 126, 127, 385, + 386, 387, 388, 389, 49, 390, 132, 148, 444, 445, + 446, 299, 35, 36, 58, 59, 391, 441, 513, 66, + 208 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1102,164 +1111,162 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 188, 103, 348, 122, 39, 145, 145, 42, 237, 146, - 154, 396, 50, 51, 38, 330, 498, 213, 136, 70, - 113, 114, 115, 257, 110, 307, 155, 104, 104, 229, - 295, 231, 233, 490, 162, 427, 257, 162, 265, 55, - 258, 295, 282, 37, 166, 283, 248, 302, 83, 174, - 86, 256, 252, 258, 254, 145, 46, 95, 206, 355, - 467, 247, 105, 105, 72, 257, 88, 279, 289, 280, - 210, 290, 257, 303, 327, 285, 428, 350, 406, 56, - 175, 429, 258, 134, 135, 257, 356, 430, 431, 258, - 474, 482, 43, 38, 109, 149, 150, 234, 106, 106, - 102, 44, 258, 48, 432, 89, 421, 212, -266, 433, - 340, 341, 226, 178, 113, 114, 115, 255, 40, 116, - 252, 351, 352, 176, 52, 151, 81, 82, 353, 71, - 354, 45, 167, 53, 360, 361, 362, 363, 364, 365, - 366, 367, 368, 369, 370, 371, 372, 373, 374, 217, - 168, 436, 257, 162, 294, 179, 180, 181, 117, 118, - 300, 47, 296, 54, 265, 229, 343, 390, 458, 258, - 394, 395, 331, 186, 332, 235, 410, 411, 382, 41, - 257, -231, 328, 257, 358, 344, 489, 70, 119, 57, - 375, 345, 454, 209, 182, 280, 344, 258, 64, 257, - 258, 359, 412, 178, 113, 114, 115, 413, 414, 60, - 122, 257, 225, 116, 122, 426, 258, 416, 484, 230, - 65, 409, 294, 232, 418, 257, 145, 453, 258, 397, - 183, 257, 402, 476, 265, 67, 178, 113, 114, 115, - 75, 325, 258, 184, 326, 179, 180, 181, 258, 403, - 299, 424, 117, 118, 171, 305, 178, 113, 114, 115, - 276, 277, 278, 279, 378, 280, 62, 63, 380, 185, - 186, 242, 449, 243, 451, 452, 415, 187, 179, 180, - 181, 76, 119, 376, 182, 77, 456, 420, 78, 79, - 70, 333, 334, 335, 336, 337, 338, 84, 179, 180, - 181, 87, 90, 116, 178, 113, 114, 115, 425, 427, - 247, 171, 442, 448, 92, 283, 294, 182, 477, 460, - 183, 479, 294, 96, 294, 97, 496, 99, 427, 283, - 100, 112, 131, 184, 129, 132, 116, 182, 136, 138, - 139, 141, 117, 118, 113, 147, 250, 180, 181, 457, - 428, 148, 494, 183, 497, 429, 116, 71, 153, 185, - 186, 430, 431, 115, 155, 157, 184, 187, 163, 428, - 158, 165, 119, 183, 429, 117, 118, 170, 432, 171, - 430, 431, -266, 433, 487, 182, 184, 172, 178, 113, - 114, 115, 185, 186, 173, 117, 118, 432, 207, 211, - 187, 214, 433, 218, 116, 119, 236, 109, 14, 238, - 241, 244, 185, 186, 281, 245, 246, 253, 287, 291, - 187, 251, 306, 70, 284, 119, 288, 308, 309, 259, - 346, 180, 181, 488, 184, 349, 294, 301, 357, 377, - 392, 398, 399, 117, 118, 400, 401, 408, 407, 355, - 419, 1, 280, 257, 422, -232, 435, 423, 440, 2, - 185, 186, 443, 444, 445, 260, 3, 446, 187, 182, - 4, 462, 447, 119, 463, 455, 459, 461, 464, 465, - 5, 466, 468, 6, 7, 469, 470, 471, 116, 472, - 473, 475, 478, 485, 483, 8, 9, 486, 243, 98, - 69, 492, 493, 381, 379, 251, 10, 216, 405, 500, - 450, 177, 261, 94, 286, 329, 391, 393, 184, 499, - 342, 481, 480, 152, 297, 0, 0, 117, 118, 260, - 11, 0, 262, 0, 12, 0, 0, 0, 0, 263, - 264, 0, 0, -268, 185, 186, 265, 266, 0, 13, - 1, 0, 187, 0, 0, 14, 0, 119, 2, 0, - 267, 268, 269, 270, 271, 3, 0, 272, 273, 4, - 274, 275, 276, 277, 278, 279, 261, 280, 0, 5, - 0, 0, 6, 7, 0, 0, 0, 0, 0, 15, - 16, 17, 0, 0, 8, 9, 347, 260, 0, 0, - 0, 0, 0, 0, 264, 10, 0, 0, 0, 0, - 265, 266, 0, 0, 0, 0, 260, 0, 0, 0, - 0, 0, 0, 0, 267, 268, 269, 270, 271, 11, - 0, 272, 273, 12, 274, 275, 276, 277, 278, 279, - 0, 280, 0, 0, 261, 0, 0, 0, 13, 0, - 0, 0, 260, 0, 14, 0, 0, 0, 417, 0, - 0, 0, 0, -269, 347, 0, 0, 0, 0, 0, - 0, 0, 264, 0, 0, 0, 0, 0, 265, 266, - 0, 0, 0, 0, 0, 0, 0, 0, 15, 16, - 17, 264, 267, 268, 269, 270, 271, 265, -269, 272, + 188, 102, 350, 398, 154, 39, 121, 237, 42, 332, + 144, 144, 145, 50, 51, 70, 112, 113, 114, 38, + 516, 109, 155, 55, 135, 434, 238, 213, 308, 296, + 229, 507, 231, 233, 166, 43, 174, 265, 167, 479, + 257, 265, 465, 72, 44, 162, 37, 248, 162, 83, + 407, 86, 256, 252, 455, 254, 168, 258, 94, 144, + 206, 38, 88, 56, 257, 257, 435, 175, 280, 210, + 279, 436, 280, 329, 45, 497, 285, 437, 438, 101, + 413, 258, 258, 408, 133, 134, 296, 456, 257, 178, + 112, 113, 114, 103, 439, 149, 150, 407, -274, 440, + 234, 89, 242, 151, 243, 258, 40, 257, 428, 226, + 176, 342, 343, 212, 41, 115, 48, 255, 352, 489, + 225, 252, 353, 354, 258, 71, 46, 230, 104, 355, + 408, 356, 180, 181, 103, 362, 363, 364, 365, 366, + 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, + 443, 301, 295, 488, 116, 117, 178, 112, 113, 114, + 178, 112, 113, 114, 105, 162, 333, 229, 345, 104, + 182, -239, 396, 397, 334, 470, 235, 186, 330, 392, + 47, 502, 357, 384, 118, 377, 52, 346, 70, 115, + 60, 360, 506, 347, 209, 53, 57, 257, 179, 180, + 181, 108, 179, 180, 181, 105, 251, 297, 361, 358, + 420, 421, 64, 121, 258, 418, 433, 303, 121, 184, + 288, 178, 112, 113, 114, 54, 423, 425, 116, 117, + 499, 295, 144, 399, 346, 282, 65, 182, 283, 300, + 419, 182, 257, 304, 306, 185, 186, 417, 466, 178, + 112, 113, 114, 187, 257, 257, 115, 67, 118, 258, + 115, 75, 404, 179, 180, 181, 232, 247, 257, 380, + 491, 258, 258, 183, 382, 70, 76, 183, 422, 405, + 461, 77, 463, 464, 378, 258, 184, 62, 63, 427, + 184, 179, 180, 181, 468, 116, 117, 247, 84, 116, + 117, 257, 182, 178, 112, 113, 114, 290, 265, 257, + 291, 410, 185, 186, 411, 78, 185, 186, 258, 416, + 187, 115, 434, 79, 187, 118, 258, 81, 82, 118, + 182, 492, 92, 93, 276, 277, 278, 279, 183, 280, + 431, 434, 87, 171, 259, 250, 180, 181, 95, 115, + 432, 184, 449, 171, 460, 283, 469, 295, 90, 472, + 116, 117, 295, 435, 494, 96, 183, 295, 436, 98, + 512, 99, 515, 503, 437, 438, 283, 185, 186, 184, + 260, 111, 435, 510, 182, 187, 283, 436, 116, 117, + 118, 439, 128, 437, 438, -274, 440, 504, 514, 131, + 130, 283, 135, 115, 137, 185, 186, 138, 140, 146, + 439, 112, 147, 187, 71, 440, 153, 114, 118, 157, + 251, 335, 336, 337, 338, 339, 340, 261, 155, 158, + 163, 165, 170, 184, 171, 172, 207, 173, 211, 214, + 217, 218, 116, 117, 108, 236, 505, 262, 14, 238, + 241, 244, 253, 245, 263, 264, 246, 281, -276, 185, + 186, 265, 266, 284, 292, 1, 287, 187, -240, 289, + 295, 307, 118, 2, 302, 267, 268, 269, 270, 271, + 3, 309, 272, 273, 4, 274, 275, 276, 277, 278, + 279, 310, 280, 326, 5, 379, 1, 6, 7, 348, + 70, 351, 359, 394, 2, 400, 401, 402, 403, 8, + 9, 3, 414, 415, 357, 4, 257, 260, 426, 280, + 10, 430, 429, 442, 447, 5, 450, 451, 6, 7, + 452, 453, 454, 459, 458, 467, 475, 471, 473, 474, + 8, 9, 476, 477, 11, 478, 480, 481, 12, 486, + 482, 10, 483, 484, 485, 490, 487, 501, 97, 493, + 498, 243, 500, 13, 261, 509, 518, 511, 69, 14, + 260, 216, 383, 177, 462, 11, 409, 286, 424, 12, + 381, 412, 344, 517, 349, 331, 393, 496, 495, 0, + 395, 152, 264, 0, 13, 0, 298, 0, 265, 266, + 14, 0, 0, 15, 16, 17, 260, 0, 0, 0, + 0, 0, 267, 268, 269, 270, 271, 261, 0, 272, 273, 0, 274, 275, 276, 277, 278, 279, 0, 280, - 0, -269, -269, -269, 270, 271, 0, 0, 272, 273, - 0, 274, 275, 276, 277, 278, 279, 264, 280, 310, - 0, 0, 0, 265, 311, 0, 312, 313, 0, 314, - 0, 0, 0, 0, 0, 0, 0, 315, 0, 0, - -269, -269, 0, 0, -269, -269, 0, 274, 275, 276, + 0, 0, 0, 0, 15, 16, 17, 349, 0, 0, + 0, 0, 260, 0, 0, 264, 0, 0, 0, 0, + 0, 265, 266, -277, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 267, 268, 269, 270, 271, + 0, 0, 272, 273, 0, 274, 275, 276, 277, 278, + 279, 264, 280, 0, 0, 0, 0, 265, -277, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -277, -277, -277, 270, 271, 0, 0, 272, 273, + 0, 274, 275, 276, 277, 278, 279, 264, 280, 311, + 0, 0, 0, 265, 312, 0, 313, 314, 0, 315, + 0, 0, 0, 0, 0, 0, 0, 316, 0, 0, + -277, -277, 0, 0, -277, -277, 0, 274, 275, 276, 277, 278, 279, 0, 280, 0, 0, 0, 0, 0, - 0, 0, 0, 316, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 317, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 317, 0, 318, 319, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 320, 0, 0, - 0, 321, 0, 322, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 323 + 318, 0, 319, 320, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 321, 0, 0, + 0, 322, 0, 323, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 324 }; static const yytype_int16 yycheck[] = { - 136, 71, 253, 77, 2, 88, 89, 5, 175, 89, - 100, 308, 10, 11, 3, 3, 3, 142, 82, 57, - 4, 5, 6, 114, 74, 54, 12, 9, 9, 165, - 3, 167, 168, 50, 107, 25, 114, 110, 134, 19, - 131, 3, 168, 26, 110, 171, 182, 89, 46, 93, - 48, 187, 183, 131, 185, 138, 93, 55, 138, 100, - 435, 110, 44, 44, 35, 114, 93, 163, 168, 165, - 140, 171, 114, 115, 241, 211, 66, 168, 329, 59, - 124, 71, 131, 81, 82, 114, 127, 77, 78, 131, - 168, 466, 70, 3, 76, 93, 94, 171, 80, 80, - 71, 79, 131, 97, 94, 132, 357, 171, 98, 99, - 246, 247, 162, 3, 4, 5, 6, 187, 3, 103, - 251, 257, 258, 167, 70, 96, 44, 45, 259, 167, - 261, 109, 54, 79, 265, 266, 267, 268, 269, 270, - 271, 272, 273, 274, 275, 276, 277, 278, 279, 147, - 72, 124, 114, 226, 171, 45, 46, 47, 142, 143, - 226, 93, 124, 109, 134, 301, 91, 292, 419, 131, - 306, 307, 160, 160, 244, 173, 107, 91, 167, 3, - 114, 171, 168, 114, 103, 110, 483, 57, 172, 3, - 280, 116, 107, 63, 84, 165, 110, 131, 0, 114, - 131, 120, 116, 3, 4, 5, 6, 343, 344, 144, - 284, 114, 159, 103, 288, 382, 131, 166, 469, 166, - 170, 124, 171, 113, 355, 114, 309, 116, 131, 309, - 120, 114, 103, 116, 134, 111, 3, 4, 5, 6, - 3, 168, 131, 133, 171, 45, 46, 47, 131, 120, - 225, 168, 142, 143, 171, 230, 3, 4, 5, 6, - 160, 161, 162, 163, 284, 165, 16, 17, 288, 159, - 160, 167, 408, 169, 410, 411, 346, 167, 45, 46, - 47, 169, 172, 281, 84, 167, 417, 357, 93, 126, - 57, 136, 137, 138, 139, 140, 141, 3, 45, 46, - 47, 122, 3, 103, 3, 4, 5, 6, 168, 25, - 110, 171, 168, 168, 126, 171, 171, 84, 454, 168, - 120, 168, 171, 124, 171, 171, 168, 96, 25, 171, - 123, 3, 120, 133, 4, 3, 103, 84, 82, 92, - 167, 3, 142, 143, 4, 130, 45, 46, 47, 419, - 66, 45, 488, 120, 490, 71, 103, 167, 167, 159, - 160, 77, 78, 6, 12, 168, 133, 167, 113, 66, - 168, 125, 172, 120, 71, 142, 143, 168, 94, 171, - 77, 78, 98, 99, 81, 84, 133, 45, 3, 4, - 5, 6, 159, 160, 130, 142, 143, 94, 3, 148, - 167, 111, 99, 3, 103, 172, 3, 76, 111, 3, - 124, 167, 159, 160, 97, 167, 167, 165, 48, 93, - 167, 120, 54, 57, 167, 172, 167, 167, 92, 17, - 167, 46, 47, 130, 133, 168, 171, 171, 167, 3, - 3, 30, 167, 142, 143, 167, 167, 93, 168, 100, - 167, 7, 165, 114, 103, 171, 171, 166, 69, 15, - 159, 160, 167, 6, 6, 53, 22, 6, 167, 84, - 26, 98, 103, 172, 77, 168, 168, 168, 77, 77, - 36, 98, 3, 39, 40, 125, 6, 171, 103, 168, - 168, 168, 168, 168, 167, 51, 52, 6, 169, 65, - 23, 168, 167, 290, 287, 120, 62, 146, 326, 168, - 409, 135, 100, 54, 212, 242, 294, 301, 133, 493, - 248, 462, 461, 97, 224, -1, -1, 142, 143, 53, - 86, -1, 120, -1, 90, -1, -1, -1, -1, 127, - 128, -1, -1, 0, 159, 160, 134, 135, -1, 105, - 7, -1, 167, -1, -1, 111, -1, 172, 15, -1, - 148, 149, 150, 151, 152, 22, -1, 155, 156, 26, - 158, 159, 160, 161, 162, 163, 100, 165, -1, 36, - -1, -1, 39, 40, -1, -1, -1, -1, -1, 145, - 146, 147, -1, -1, 51, 52, 120, 53, -1, -1, - -1, -1, -1, -1, 128, 62, -1, -1, -1, -1, - 134, 135, -1, -1, -1, -1, 53, -1, -1, -1, - -1, -1, -1, -1, 148, 149, 150, 151, 152, 86, - -1, 155, 156, 90, 158, 159, 160, 161, 162, 163, - -1, 165, -1, -1, 100, -1, -1, -1, 105, -1, - -1, -1, 53, -1, 111, -1, -1, -1, 114, -1, - -1, -1, -1, 100, 120, -1, -1, -1, -1, -1, - -1, -1, 128, -1, -1, -1, -1, -1, 134, 135, - -1, -1, -1, -1, -1, -1, -1, -1, 145, 146, - 147, 128, 148, 149, 150, 151, 152, 134, 135, 155, + 135, 71, 253, 309, 99, 2, 77, 175, 5, 3, + 88, 89, 89, 10, 11, 57, 4, 5, 6, 3, + 3, 74, 12, 19, 82, 25, 3, 141, 54, 3, + 165, 50, 167, 168, 109, 70, 93, 134, 54, 442, + 114, 134, 116, 35, 79, 106, 26, 182, 109, 46, + 27, 48, 187, 183, 27, 185, 72, 131, 55, 137, + 137, 3, 93, 59, 114, 114, 66, 124, 165, 139, + 163, 71, 165, 241, 109, 478, 211, 77, 78, 71, + 331, 131, 131, 60, 81, 82, 3, 60, 114, 3, + 4, 5, 6, 9, 94, 92, 93, 27, 98, 99, + 171, 132, 167, 95, 169, 131, 3, 114, 359, 162, + 167, 246, 247, 171, 3, 103, 97, 187, 168, 168, + 159, 251, 257, 258, 131, 167, 93, 166, 44, 259, + 60, 261, 46, 47, 9, 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, + 124, 226, 171, 459, 142, 143, 3, 4, 5, 6, + 3, 4, 5, 6, 80, 226, 160, 302, 91, 44, + 84, 171, 307, 308, 244, 426, 173, 160, 168, 293, + 93, 487, 100, 167, 172, 280, 70, 110, 57, 103, + 144, 103, 498, 116, 63, 79, 3, 114, 45, 46, + 47, 76, 45, 46, 47, 80, 120, 124, 120, 127, + 345, 346, 0, 284, 131, 91, 384, 89, 289, 133, + 217, 3, 4, 5, 6, 109, 166, 357, 142, 143, + 481, 171, 310, 310, 110, 168, 170, 84, 171, 225, + 116, 84, 114, 115, 230, 159, 160, 107, 107, 3, + 4, 5, 6, 167, 114, 114, 103, 111, 172, 131, + 103, 3, 103, 45, 46, 47, 113, 110, 114, 284, + 116, 131, 131, 120, 289, 57, 169, 120, 348, 120, + 415, 167, 417, 418, 281, 131, 133, 16, 17, 359, + 133, 45, 46, 47, 424, 142, 143, 110, 3, 142, + 143, 114, 84, 3, 4, 5, 6, 168, 134, 114, + 171, 168, 159, 160, 171, 93, 159, 160, 131, 124, + 167, 103, 25, 126, 167, 172, 131, 44, 45, 172, + 84, 466, 53, 54, 160, 161, 162, 163, 120, 165, + 168, 25, 122, 171, 17, 45, 46, 47, 124, 103, + 168, 133, 168, 171, 168, 171, 426, 171, 126, 168, + 142, 143, 171, 66, 168, 171, 120, 171, 71, 96, + 505, 123, 507, 168, 77, 78, 171, 159, 160, 133, + 53, 3, 66, 168, 84, 167, 171, 71, 142, 143, + 172, 94, 4, 77, 78, 98, 99, 81, 168, 3, + 120, 171, 82, 103, 92, 159, 160, 167, 3, 45, + 94, 4, 3, 167, 167, 99, 167, 6, 172, 168, + 120, 136, 137, 138, 139, 140, 141, 100, 12, 168, + 113, 125, 168, 133, 171, 45, 3, 130, 148, 111, + 130, 3, 142, 143, 76, 3, 130, 120, 111, 3, + 124, 167, 165, 167, 127, 128, 167, 97, 0, 159, + 160, 134, 135, 167, 93, 7, 48, 167, 171, 167, + 171, 54, 172, 15, 171, 148, 149, 150, 151, 152, + 22, 167, 155, 156, 26, 158, 159, 160, 161, 162, + 163, 92, 165, 171, 36, 3, 7, 39, 40, 167, + 57, 168, 167, 3, 15, 30, 167, 167, 167, 51, + 52, 22, 168, 93, 100, 26, 114, 53, 167, 165, + 62, 166, 103, 171, 69, 36, 167, 6, 39, 40, + 6, 6, 103, 167, 119, 168, 77, 168, 168, 98, + 51, 52, 77, 77, 86, 98, 3, 125, 90, 119, + 6, 62, 171, 168, 168, 168, 167, 6, 65, 168, + 167, 169, 168, 105, 100, 168, 168, 167, 23, 111, + 53, 145, 291, 134, 416, 86, 326, 212, 114, 90, + 287, 327, 248, 511, 120, 242, 295, 474, 473, -1, + 302, 96, 128, -1, 105, -1, 224, -1, 134, 135, + 111, -1, -1, 145, 146, 147, 53, -1, -1, -1, + -1, -1, 148, 149, 150, 151, 152, 100, -1, 155, 156, -1, 158, 159, 160, 161, 162, 163, -1, 165, + -1, -1, -1, -1, 145, 146, 147, 120, -1, -1, + -1, -1, 53, -1, -1, 128, -1, -1, -1, -1, + -1, 134, 135, 100, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 148, 149, 150, 151, 152, + -1, -1, 155, 156, -1, 158, 159, 160, 161, 162, + 163, 128, 165, -1, -1, -1, -1, 134, 135, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 148, 149, 150, 151, 152, -1, -1, 155, 156, -1, 158, 159, 160, 161, 162, 163, 128, 165, 24, -1, -1, -1, 134, 29, -1, 31, 32, -1, 34, @@ -1280,55 +1287,56 @@ static const yytype_int16 yystos[] = { 0, 7, 15, 22, 26, 36, 39, 40, 51, 52, 62, 86, 90, 105, 111, 145, 146, 147, 174, 175, - 176, 177, 181, 183, 185, 186, 190, 191, 192, 198, - 200, 201, 202, 204, 207, 272, 273, 26, 3, 265, - 3, 3, 265, 70, 79, 109, 93, 93, 97, 264, - 265, 265, 70, 79, 109, 19, 59, 3, 274, 275, - 144, 182, 182, 182, 0, 170, 279, 111, 178, 178, - 57, 167, 210, 211, 215, 3, 169, 167, 93, 126, - 193, 193, 193, 265, 3, 187, 265, 122, 93, 132, - 3, 267, 126, 199, 199, 265, 124, 171, 176, 96, - 123, 227, 210, 211, 9, 44, 80, 212, 213, 76, - 212, 223, 3, 4, 5, 6, 103, 142, 143, 172, - 230, 231, 252, 253, 254, 255, 256, 257, 258, 4, - 184, 120, 3, 266, 265, 265, 82, 220, 92, 167, - 203, 3, 205, 206, 188, 253, 188, 130, 45, 265, - 265, 210, 275, 167, 256, 12, 216, 168, 168, 208, - 209, 210, 215, 113, 214, 125, 208, 54, 72, 228, - 168, 171, 45, 130, 93, 124, 167, 203, 3, 45, - 46, 47, 84, 120, 133, 159, 160, 167, 233, 234, - 235, 236, 237, 238, 239, 240, 242, 243, 244, 245, - 246, 248, 249, 250, 251, 252, 188, 3, 280, 63, - 211, 148, 171, 220, 111, 189, 189, 265, 3, 179, - 180, 217, 229, 232, 233, 223, 212, 224, 225, 233, - 223, 233, 113, 233, 252, 265, 3, 207, 3, 194, - 195, 124, 167, 169, 167, 167, 167, 110, 233, 241, - 45, 120, 234, 165, 234, 211, 233, 114, 131, 17, + 176, 177, 181, 183, 185, 186, 190, 191, 192, 201, + 203, 204, 205, 207, 210, 275, 276, 26, 3, 268, + 3, 3, 268, 70, 79, 109, 93, 93, 97, 267, + 268, 268, 70, 79, 109, 19, 59, 3, 277, 278, + 144, 182, 182, 182, 0, 170, 282, 111, 178, 178, + 57, 167, 213, 214, 218, 3, 169, 167, 93, 126, + 193, 193, 193, 268, 3, 187, 268, 122, 93, 132, + 126, 202, 202, 202, 268, 124, 171, 176, 96, 123, + 230, 213, 214, 9, 44, 80, 215, 216, 76, 215, + 226, 3, 4, 5, 6, 103, 142, 143, 172, 233, + 234, 255, 256, 257, 258, 259, 260, 261, 4, 184, + 120, 3, 269, 268, 268, 82, 223, 92, 167, 206, + 3, 208, 209, 188, 256, 188, 45, 3, 270, 268, + 268, 213, 278, 167, 259, 12, 219, 168, 168, 211, + 212, 213, 218, 113, 217, 125, 211, 54, 72, 231, + 168, 171, 45, 130, 93, 124, 167, 206, 3, 45, + 46, 47, 84, 120, 133, 159, 160, 167, 236, 237, + 238, 239, 240, 241, 242, 243, 245, 246, 247, 248, + 249, 251, 252, 253, 254, 255, 188, 3, 283, 63, + 214, 148, 171, 223, 111, 189, 189, 130, 3, 179, + 180, 220, 232, 235, 236, 226, 215, 227, 228, 236, + 226, 236, 113, 236, 255, 268, 3, 210, 3, 194, + 195, 124, 167, 169, 167, 167, 167, 110, 236, 244, + 45, 120, 237, 165, 237, 214, 236, 114, 131, 17, 53, 100, 120, 127, 128, 134, 135, 148, 149, 150, 151, 152, 155, 156, 158, 159, 160, 161, 162, 163, - 165, 97, 168, 171, 167, 233, 206, 48, 167, 168, - 171, 93, 218, 219, 171, 3, 124, 270, 271, 228, - 208, 171, 89, 115, 226, 228, 54, 54, 167, 92, - 24, 29, 31, 32, 34, 42, 68, 85, 87, 88, - 102, 106, 108, 118, 196, 168, 171, 207, 168, 216, - 3, 160, 211, 136, 137, 138, 139, 140, 141, 247, - 233, 233, 241, 91, 110, 116, 167, 120, 229, 168, - 168, 233, 233, 234, 234, 100, 127, 167, 103, 120, - 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, - 234, 234, 234, 234, 234, 256, 265, 3, 231, 187, - 231, 180, 167, 259, 260, 261, 262, 263, 265, 276, - 220, 232, 3, 225, 233, 233, 280, 188, 30, 167, - 167, 167, 103, 120, 197, 195, 229, 168, 93, 124, - 107, 91, 116, 233, 233, 211, 166, 114, 234, 167, - 211, 229, 103, 166, 168, 168, 207, 25, 66, 71, - 77, 78, 94, 99, 277, 171, 124, 268, 269, 270, - 69, 221, 168, 167, 6, 6, 6, 103, 168, 233, - 196, 233, 233, 116, 107, 168, 234, 211, 229, 168, - 168, 168, 98, 77, 77, 77, 98, 260, 3, 125, - 6, 171, 168, 168, 168, 168, 116, 233, 168, 168, - 269, 261, 260, 167, 229, 168, 6, 81, 130, 280, - 50, 222, 168, 167, 233, 278, 168, 233, 3, 251, - 168 + 165, 97, 168, 171, 167, 236, 209, 48, 268, 167, + 168, 171, 93, 221, 222, 171, 3, 124, 273, 274, + 231, 211, 171, 89, 115, 229, 231, 54, 54, 167, + 92, 24, 29, 31, 32, 34, 42, 68, 85, 87, + 88, 102, 106, 108, 118, 196, 171, 199, 200, 210, + 168, 219, 3, 160, 214, 136, 137, 138, 139, 140, + 141, 250, 236, 236, 244, 91, 110, 116, 167, 120, + 232, 168, 168, 236, 236, 237, 237, 100, 127, 167, + 103, 120, 237, 237, 237, 237, 237, 237, 237, 237, + 237, 237, 237, 237, 237, 237, 237, 259, 268, 3, + 234, 187, 234, 180, 167, 262, 263, 264, 265, 266, + 268, 279, 223, 235, 3, 228, 236, 236, 283, 188, + 30, 167, 167, 167, 103, 120, 197, 27, 60, 195, + 168, 171, 200, 232, 168, 93, 124, 107, 91, 116, + 236, 236, 214, 166, 114, 237, 167, 214, 232, 103, + 166, 168, 168, 210, 25, 66, 71, 77, 78, 94, + 99, 280, 171, 124, 271, 272, 273, 69, 224, 168, + 167, 6, 6, 6, 103, 27, 60, 198, 119, 167, + 168, 236, 196, 236, 236, 116, 107, 168, 237, 214, + 232, 168, 168, 168, 98, 77, 77, 77, 98, 263, + 3, 125, 6, 171, 168, 168, 119, 167, 283, 168, + 168, 116, 236, 168, 168, 272, 264, 263, 167, 232, + 168, 6, 283, 168, 81, 130, 283, 50, 225, 168, + 168, 167, 236, 281, 168, 236, 3, 254, 168 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ @@ -1341,27 +1349,27 @@ static const yytype_int16 yyr1[] = 190, 191, 191, 191, 192, 192, 192, 192, 192, 193, 193, 194, 194, 195, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 197, 197, - 197, 198, 198, 198, 198, 199, 199, 200, 201, 202, - 202, 203, 203, 204, 205, 205, 206, 207, 207, 207, - 208, 208, 209, 209, 210, 210, 211, 211, 212, 213, - 213, 213, 214, 214, 215, 216, 216, 217, 218, 218, - 219, 220, 220, 221, 221, 222, 222, 223, 223, 224, - 224, 225, 226, 226, 226, 227, 227, 228, 228, 228, - 228, 228, 228, 229, 229, 230, 230, 231, 231, 232, - 233, 233, 233, 233, 233, 234, 234, 234, 234, 234, - 234, 234, 234, 234, 234, 234, 235, 235, 236, 236, + 197, 198, 198, 198, 199, 199, 199, 200, 200, 201, + 201, 201, 201, 202, 202, 203, 204, 205, 205, 206, + 206, 207, 208, 208, 209, 210, 210, 210, 211, 211, + 212, 212, 213, 213, 214, 214, 215, 216, 216, 216, + 217, 217, 218, 219, 219, 220, 221, 221, 222, 223, + 223, 224, 224, 225, 225, 226, 226, 227, 227, 228, + 229, 229, 229, 230, 230, 231, 231, 231, 231, 231, + 231, 232, 232, 233, 233, 234, 234, 235, 236, 236, 236, 236, 236, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 238, 238, 239, 239, 239, 239, - 240, 240, 240, 240, 241, 241, 242, 242, 243, 243, - 243, 243, 243, 243, 243, 244, 244, 245, 246, 247, - 247, 247, 247, 247, 247, 248, 249, 250, 251, 251, - 251, 251, 252, 252, 252, 252, 252, 253, 254, 254, - 255, 255, 256, 257, 258, 259, 259, 260, 260, 261, - 261, 262, 262, 263, 264, 265, 265, 266, 266, 267, - 268, 268, 269, 269, 270, 270, 271, 271, 272, 272, - 273, 274, 274, 275, 276, 276, 276, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 278, 279, 279, - 280, 280 + 239, 240, 240, 240, 240, 240, 240, 240, 240, 240, + 240, 240, 241, 241, 242, 242, 242, 242, 243, 243, + 243, 243, 244, 244, 245, 245, 246, 246, 246, 246, + 246, 246, 246, 247, 247, 248, 249, 250, 250, 250, + 250, 250, 250, 251, 252, 253, 254, 254, 254, 254, + 255, 255, 255, 255, 255, 256, 257, 257, 258, 258, + 259, 260, 261, 262, 262, 263, 263, 264, 264, 265, + 265, 266, 267, 268, 268, 269, 269, 270, 271, 271, + 272, 272, 273, 273, 274, 274, 275, 275, 276, 277, + 277, 278, 279, 279, 279, 280, 280, 280, 280, 280, + 280, 280, 280, 280, 280, 281, 282, 282, 283, 283 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -1371,30 +1379,30 @@ static const yytype_int8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 0, 1, 3, 1, 4, 2, 2, 2, 1, 0, 4, 1, 2, 5, 7, 5, 1, 1, 3, 0, - 5, 2, 3, 2, 8, 7, 6, 9, 7, 3, - 0, 1, 3, 3, 1, 1, 1, 1, 6, 1, + 5, 2, 3, 2, 8, 8, 6, 9, 7, 3, + 0, 1, 3, 4, 1, 1, 1, 1, 6, 1, 1, 4, 5, 4, 1, 1, 1, 1, 1, 2, - 0, 4, 4, 3, 5, 2, 0, 4, 2, 8, - 5, 3, 0, 5, 1, 3, 3, 2, 2, 6, - 1, 1, 1, 3, 3, 3, 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, 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, 6, 1, - 1, 1, 1, 1, 1, 4, 4, 5, 1, 3, - 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, - 4, 1, 3, 2, 1, 1, 3, 1, 0, 1, - 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 + 0, 2, 1, 0, 1, 2, 0, 6, 5, 4, + 4, 3, 6, 2, 0, 4, 2, 8, 5, 3, + 0, 5, 1, 3, 3, 2, 2, 6, 1, 1, + 1, 3, 3, 3, 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, 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, 6, 1, 1, 1, + 1, 1, 1, 4, 4, 5, 1, 3, 1, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 3, 1, 1, 1, 4, 1, + 3, 2, 1, 1, 3, 1, 0, 1, 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 }; @@ -1946,31 +1954,31 @@ yydestruct (const char *yymsg, switch (yykind) { case YYSYMBOL_IDENTIFIER: /* IDENTIFIER */ -#line 149 "bison_parser.y" +#line 152 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1952 "bison_parser.cpp" +#line 1960 "bison_parser.cpp" break; case YYSYMBOL_STRING: /* STRING */ -#line 149 "bison_parser.y" +#line 152 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1958 "bison_parser.cpp" +#line 1966 "bison_parser.cpp" break; case YYSYMBOL_FLOATVAL: /* FLOATVAL */ -#line 147 "bison_parser.y" +#line 150 "bison_parser.y" { } -#line 1964 "bison_parser.cpp" +#line 1972 "bison_parser.cpp" break; case YYSYMBOL_INTVAL: /* INTVAL */ -#line 147 "bison_parser.y" +#line 150 "bison_parser.y" { } -#line 1970 "bison_parser.cpp" +#line 1978 "bison_parser.cpp" break; case YYSYMBOL_statement_list: /* statement_list */ -#line 150 "bison_parser.y" +#line 153 "bison_parser.y" { if ((((*yyvaluep).stmt_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).stmt_vec))) { @@ -1979,23 +1987,23 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).stmt_vec)); } -#line 1983 "bison_parser.cpp" +#line 1991 "bison_parser.cpp" break; case YYSYMBOL_statement: /* statement */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 1989 "bison_parser.cpp" +#line 1997 "bison_parser.cpp" break; case YYSYMBOL_preparable_statement: /* preparable_statement */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 1995 "bison_parser.cpp" +#line 2003 "bison_parser.cpp" break; case YYSYMBOL_opt_hints: /* opt_hints */ -#line 150 "bison_parser.y" +#line 153 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2004,11 +2012,11 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2008 "bison_parser.cpp" +#line 2016 "bison_parser.cpp" break; case YYSYMBOL_hint_list: /* hint_list */ -#line 150 "bison_parser.y" +#line 153 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2017,89 +2025,89 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2021 "bison_parser.cpp" +#line 2029 "bison_parser.cpp" break; case YYSYMBOL_hint: /* hint */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2027 "bison_parser.cpp" +#line 2035 "bison_parser.cpp" break; case YYSYMBOL_transaction_statement: /* transaction_statement */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).transaction_stmt)); } -#line 2033 "bison_parser.cpp" +#line 2041 "bison_parser.cpp" break; case YYSYMBOL_prepare_statement: /* prepare_statement */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).prep_stmt)); } -#line 2039 "bison_parser.cpp" +#line 2047 "bison_parser.cpp" break; case YYSYMBOL_prepare_target_query: /* prepare_target_query */ -#line 149 "bison_parser.y" +#line 152 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2045 "bison_parser.cpp" +#line 2053 "bison_parser.cpp" break; case YYSYMBOL_execute_statement: /* execute_statement */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).exec_stmt)); } -#line 2051 "bison_parser.cpp" +#line 2059 "bison_parser.cpp" break; case YYSYMBOL_import_statement: /* import_statement */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).import_stmt)); } -#line 2057 "bison_parser.cpp" +#line 2065 "bison_parser.cpp" break; case YYSYMBOL_file_type: /* file_type */ -#line 147 "bison_parser.y" +#line 150 "bison_parser.y" { } -#line 2063 "bison_parser.cpp" +#line 2071 "bison_parser.cpp" break; case YYSYMBOL_file_path: /* file_path */ -#line 149 "bison_parser.y" +#line 152 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2069 "bison_parser.cpp" +#line 2077 "bison_parser.cpp" break; case YYSYMBOL_opt_file_type: /* opt_file_type */ -#line 147 "bison_parser.y" +#line 150 "bison_parser.y" { } -#line 2075 "bison_parser.cpp" +#line 2083 "bison_parser.cpp" break; case YYSYMBOL_export_statement: /* export_statement */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).export_stmt)); } -#line 2081 "bison_parser.cpp" +#line 2089 "bison_parser.cpp" break; case YYSYMBOL_show_statement: /* show_statement */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).show_stmt)); } -#line 2087 "bison_parser.cpp" +#line 2095 "bison_parser.cpp" break; case YYSYMBOL_create_statement: /* create_statement */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).create_stmt)); } -#line 2093 "bison_parser.cpp" +#line 2101 "bison_parser.cpp" break; case YYSYMBOL_opt_not_exists: /* opt_not_exists */ -#line 147 "bison_parser.y" +#line 150 "bison_parser.y" { } -#line 2099 "bison_parser.cpp" +#line 2107 "bison_parser.cpp" break; case YYSYMBOL_column_def_commalist: /* column_def_commalist */ -#line 150 "bison_parser.y" +#line 153 "bison_parser.y" { if ((((*yyvaluep).column_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).column_vec))) { @@ -2108,59 +2116,77 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).column_vec)); } -#line 2112 "bison_parser.cpp" +#line 2120 "bison_parser.cpp" break; case YYSYMBOL_column_def: /* column_def */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).column_t)); } -#line 2118 "bison_parser.cpp" +#line 2126 "bison_parser.cpp" break; case YYSYMBOL_column_type: /* column_type */ -#line 147 "bison_parser.y" +#line 150 "bison_parser.y" { } -#line 2124 "bison_parser.cpp" +#line 2132 "bison_parser.cpp" break; case YYSYMBOL_opt_column_nullable: /* opt_column_nullable */ -#line 147 "bison_parser.y" +#line 150 "bison_parser.y" + { } +#line 2138 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_column_constraint: /* opt_column_constraint */ +#line 150 "bison_parser.y" { } -#line 2130 "bison_parser.cpp" +#line 2144 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_table_key_constraints: /* opt_table_key_constraints */ +#line 161 "bison_parser.y" + { delete (((*yyvaluep).table_key_constraint_vec)); } +#line 2150 "bison_parser.cpp" + break; + + case YYSYMBOL_table_key_constraint: /* table_key_constraint */ +#line 161 "bison_parser.y" + { delete (((*yyvaluep).table_key_constraint_t)); } +#line 2156 "bison_parser.cpp" break; case YYSYMBOL_drop_statement: /* drop_statement */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).drop_stmt)); } -#line 2136 "bison_parser.cpp" +#line 2162 "bison_parser.cpp" break; case YYSYMBOL_opt_exists: /* opt_exists */ -#line 147 "bison_parser.y" +#line 150 "bison_parser.y" { } -#line 2142 "bison_parser.cpp" +#line 2168 "bison_parser.cpp" break; case YYSYMBOL_delete_statement: /* delete_statement */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2148 "bison_parser.cpp" +#line 2174 "bison_parser.cpp" break; case YYSYMBOL_truncate_statement: /* truncate_statement */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2154 "bison_parser.cpp" +#line 2180 "bison_parser.cpp" break; case YYSYMBOL_insert_statement: /* insert_statement */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).insert_stmt)); } -#line 2160 "bison_parser.cpp" +#line 2186 "bison_parser.cpp" break; case YYSYMBOL_opt_column_list: /* opt_column_list */ -#line 150 "bison_parser.y" +#line 153 "bison_parser.y" { if ((((*yyvaluep).str_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).str_vec))) { @@ -2169,17 +2195,17 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2173 "bison_parser.cpp" +#line 2199 "bison_parser.cpp" break; case YYSYMBOL_update_statement: /* update_statement */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).update_stmt)); } -#line 2179 "bison_parser.cpp" +#line 2205 "bison_parser.cpp" break; case YYSYMBOL_update_clause_commalist: /* update_clause_commalist */ -#line 150 "bison_parser.y" +#line 153 "bison_parser.y" { if ((((*yyvaluep).update_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).update_vec))) { @@ -2188,77 +2214,77 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).update_vec)); } -#line 2192 "bison_parser.cpp" +#line 2218 "bison_parser.cpp" break; case YYSYMBOL_update_clause: /* update_clause */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).update_t)); } -#line 2198 "bison_parser.cpp" +#line 2224 "bison_parser.cpp" break; case YYSYMBOL_select_statement: /* select_statement */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2204 "bison_parser.cpp" +#line 2230 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation: /* select_within_set_operation */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2210 "bison_parser.cpp" +#line 2236 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation_no_parentheses: /* select_within_set_operation_no_parentheses */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2216 "bison_parser.cpp" +#line 2242 "bison_parser.cpp" break; case YYSYMBOL_select_with_paren: /* select_with_paren */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2222 "bison_parser.cpp" +#line 2248 "bison_parser.cpp" break; case YYSYMBOL_select_no_paren: /* select_no_paren */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2228 "bison_parser.cpp" +#line 2254 "bison_parser.cpp" break; case YYSYMBOL_set_operator: /* set_operator */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2234 "bison_parser.cpp" +#line 2260 "bison_parser.cpp" break; case YYSYMBOL_set_type: /* set_type */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2240 "bison_parser.cpp" +#line 2266 "bison_parser.cpp" break; case YYSYMBOL_opt_all: /* opt_all */ -#line 147 "bison_parser.y" +#line 150 "bison_parser.y" { } -#line 2246 "bison_parser.cpp" +#line 2272 "bison_parser.cpp" break; case YYSYMBOL_select_clause: /* select_clause */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2252 "bison_parser.cpp" +#line 2278 "bison_parser.cpp" break; case YYSYMBOL_opt_distinct: /* opt_distinct */ -#line 147 "bison_parser.y" +#line 150 "bison_parser.y" { } -#line 2258 "bison_parser.cpp" +#line 2284 "bison_parser.cpp" break; case YYSYMBOL_select_list: /* select_list */ -#line 150 "bison_parser.y" +#line 153 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2267,41 +2293,41 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2271 "bison_parser.cpp" +#line 2297 "bison_parser.cpp" break; case YYSYMBOL_opt_from_clause: /* opt_from_clause */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2277 "bison_parser.cpp" +#line 2303 "bison_parser.cpp" break; case YYSYMBOL_from_clause: /* from_clause */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2283 "bison_parser.cpp" +#line 2309 "bison_parser.cpp" break; case YYSYMBOL_opt_where: /* opt_where */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2289 "bison_parser.cpp" +#line 2315 "bison_parser.cpp" break; case YYSYMBOL_opt_group: /* opt_group */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).group_t)); } -#line 2295 "bison_parser.cpp" +#line 2321 "bison_parser.cpp" break; case YYSYMBOL_opt_having: /* opt_having */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2301 "bison_parser.cpp" +#line 2327 "bison_parser.cpp" break; case YYSYMBOL_opt_order: /* opt_order */ -#line 150 "bison_parser.y" +#line 153 "bison_parser.y" { if ((((*yyvaluep).order_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).order_vec))) { @@ -2310,11 +2336,11 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2314 "bison_parser.cpp" +#line 2340 "bison_parser.cpp" break; case YYSYMBOL_order_list: /* order_list */ -#line 150 "bison_parser.y" +#line 153 "bison_parser.y" { if ((((*yyvaluep).order_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).order_vec))) { @@ -2323,35 +2349,35 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2327 "bison_parser.cpp" +#line 2353 "bison_parser.cpp" break; case YYSYMBOL_order_desc: /* order_desc */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).order)); } -#line 2333 "bison_parser.cpp" +#line 2359 "bison_parser.cpp" break; case YYSYMBOL_opt_order_type: /* opt_order_type */ -#line 147 "bison_parser.y" +#line 150 "bison_parser.y" { } -#line 2339 "bison_parser.cpp" +#line 2365 "bison_parser.cpp" break; case YYSYMBOL_opt_top: /* opt_top */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2345 "bison_parser.cpp" +#line 2371 "bison_parser.cpp" break; case YYSYMBOL_opt_limit: /* opt_limit */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2351 "bison_parser.cpp" +#line 2377 "bison_parser.cpp" break; case YYSYMBOL_expr_list: /* expr_list */ -#line 150 "bison_parser.y" +#line 153 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2360,11 +2386,11 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2364 "bison_parser.cpp" +#line 2390 "bison_parser.cpp" break; case YYSYMBOL_opt_literal_list: /* opt_literal_list */ -#line 150 "bison_parser.y" +#line 153 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2373,11 +2399,11 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2377 "bison_parser.cpp" +#line 2403 "bison_parser.cpp" break; case YYSYMBOL_literal_list: /* literal_list */ -#line 150 "bison_parser.y" +#line 153 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2386,191 +2412,191 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2390 "bison_parser.cpp" +#line 2416 "bison_parser.cpp" break; case YYSYMBOL_expr_alias: /* expr_alias */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2396 "bison_parser.cpp" +#line 2422 "bison_parser.cpp" break; case YYSYMBOL_expr: /* expr */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2402 "bison_parser.cpp" +#line 2428 "bison_parser.cpp" break; case YYSYMBOL_operand: /* operand */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2408 "bison_parser.cpp" +#line 2434 "bison_parser.cpp" break; case YYSYMBOL_scalar_expr: /* scalar_expr */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2414 "bison_parser.cpp" +#line 2440 "bison_parser.cpp" break; case YYSYMBOL_unary_expr: /* unary_expr */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2420 "bison_parser.cpp" +#line 2446 "bison_parser.cpp" break; case YYSYMBOL_binary_expr: /* binary_expr */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2426 "bison_parser.cpp" +#line 2452 "bison_parser.cpp" break; case YYSYMBOL_logic_expr: /* logic_expr */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2432 "bison_parser.cpp" +#line 2458 "bison_parser.cpp" break; case YYSYMBOL_in_expr: /* in_expr */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2438 "bison_parser.cpp" +#line 2464 "bison_parser.cpp" break; case YYSYMBOL_case_expr: /* case_expr */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2444 "bison_parser.cpp" +#line 2470 "bison_parser.cpp" break; case YYSYMBOL_case_list: /* case_list */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2450 "bison_parser.cpp" +#line 2476 "bison_parser.cpp" break; case YYSYMBOL_exists_expr: /* exists_expr */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2456 "bison_parser.cpp" +#line 2482 "bison_parser.cpp" break; case YYSYMBOL_comp_expr: /* comp_expr */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2462 "bison_parser.cpp" +#line 2488 "bison_parser.cpp" break; case YYSYMBOL_function_expr: /* function_expr */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2468 "bison_parser.cpp" +#line 2494 "bison_parser.cpp" break; case YYSYMBOL_extract_expr: /* extract_expr */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2474 "bison_parser.cpp" +#line 2500 "bison_parser.cpp" break; case YYSYMBOL_cast_expr: /* cast_expr */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2480 "bison_parser.cpp" +#line 2506 "bison_parser.cpp" break; case YYSYMBOL_datetime_field: /* datetime_field */ -#line 147 "bison_parser.y" +#line 150 "bison_parser.y" { } -#line 2486 "bison_parser.cpp" +#line 2512 "bison_parser.cpp" break; case YYSYMBOL_array_expr: /* array_expr */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2492 "bison_parser.cpp" +#line 2518 "bison_parser.cpp" break; case YYSYMBOL_array_index: /* array_index */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2498 "bison_parser.cpp" +#line 2524 "bison_parser.cpp" break; case YYSYMBOL_between_expr: /* between_expr */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2504 "bison_parser.cpp" +#line 2530 "bison_parser.cpp" break; case YYSYMBOL_column_name: /* column_name */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2510 "bison_parser.cpp" +#line 2536 "bison_parser.cpp" break; case YYSYMBOL_literal: /* literal */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2516 "bison_parser.cpp" +#line 2542 "bison_parser.cpp" break; case YYSYMBOL_string_literal: /* string_literal */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2522 "bison_parser.cpp" +#line 2548 "bison_parser.cpp" break; case YYSYMBOL_bool_literal: /* bool_literal */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2528 "bison_parser.cpp" +#line 2554 "bison_parser.cpp" break; case YYSYMBOL_num_literal: /* num_literal */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2534 "bison_parser.cpp" +#line 2560 "bison_parser.cpp" break; case YYSYMBOL_int_literal: /* int_literal */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2540 "bison_parser.cpp" +#line 2566 "bison_parser.cpp" break; case YYSYMBOL_null_literal: /* null_literal */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2546 "bison_parser.cpp" +#line 2572 "bison_parser.cpp" break; case YYSYMBOL_param_expr: /* param_expr */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2552 "bison_parser.cpp" +#line 2578 "bison_parser.cpp" break; case YYSYMBOL_table_ref: /* table_ref */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2558 "bison_parser.cpp" +#line 2584 "bison_parser.cpp" break; case YYSYMBOL_table_ref_atomic: /* table_ref_atomic */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2564 "bison_parser.cpp" +#line 2590 "bison_parser.cpp" break; case YYSYMBOL_nonjoin_table_ref_atomic: /* nonjoin_table_ref_atomic */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2570 "bison_parser.cpp" +#line 2596 "bison_parser.cpp" break; case YYSYMBOL_table_ref_commalist: /* table_ref_commalist */ -#line 150 "bison_parser.y" +#line 153 "bison_parser.y" { if ((((*yyvaluep).table_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).table_vec))) { @@ -2579,107 +2605,107 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).table_vec)); } -#line 2583 "bison_parser.cpp" +#line 2609 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name: /* table_ref_name */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2589 "bison_parser.cpp" +#line 2615 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name_no_alias: /* table_ref_name_no_alias */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2595 "bison_parser.cpp" +#line 2621 "bison_parser.cpp" break; case YYSYMBOL_table_name: /* table_name */ -#line 148 "bison_parser.y" +#line 151 "bison_parser.y" { free( (((*yyvaluep).table_name).name) ); free( (((*yyvaluep).table_name).schema) ); } -#line 2601 "bison_parser.cpp" +#line 2627 "bison_parser.cpp" break; case YYSYMBOL_opt_index_name: /* opt_index_name */ -#line 149 "bison_parser.y" +#line 152 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2607 "bison_parser.cpp" +#line 2633 "bison_parser.cpp" break; case YYSYMBOL_index_name: /* index_name */ -#line 149 "bison_parser.y" +#line 152 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2613 "bison_parser.cpp" +#line 2639 "bison_parser.cpp" break; case YYSYMBOL_table_alias: /* table_alias */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2619 "bison_parser.cpp" +#line 2645 "bison_parser.cpp" break; case YYSYMBOL_opt_table_alias: /* opt_table_alias */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2625 "bison_parser.cpp" +#line 2651 "bison_parser.cpp" break; case YYSYMBOL_alias: /* alias */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2631 "bison_parser.cpp" +#line 2657 "bison_parser.cpp" break; case YYSYMBOL_opt_alias: /* opt_alias */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2637 "bison_parser.cpp" +#line 2663 "bison_parser.cpp" break; case YYSYMBOL_opt_with_clause: /* opt_with_clause */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2643 "bison_parser.cpp" +#line 2669 "bison_parser.cpp" break; case YYSYMBOL_with_clause: /* with_clause */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2649 "bison_parser.cpp" +#line 2675 "bison_parser.cpp" break; case YYSYMBOL_with_description_list: /* with_description_list */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2655 "bison_parser.cpp" +#line 2681 "bison_parser.cpp" break; case YYSYMBOL_with_description: /* with_description */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).with_description_t)); } -#line 2661 "bison_parser.cpp" +#line 2687 "bison_parser.cpp" break; case YYSYMBOL_join_clause: /* join_clause */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2667 "bison_parser.cpp" +#line 2693 "bison_parser.cpp" break; case YYSYMBOL_opt_join_type: /* opt_join_type */ -#line 147 "bison_parser.y" +#line 150 "bison_parser.y" { } -#line 2673 "bison_parser.cpp" +#line 2699 "bison_parser.cpp" break; case YYSYMBOL_join_condition: /* join_condition */ -#line 158 "bison_parser.y" +#line 161 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2679 "bison_parser.cpp" +#line 2705 "bison_parser.cpp" break; case YYSYMBOL_ident_commalist: /* ident_commalist */ -#line 150 "bison_parser.y" +#line 153 "bison_parser.y" { if ((((*yyvaluep).str_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).str_vec))) { @@ -2688,7 +2714,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2692 "bison_parser.cpp" +#line 2718 "bison_parser.cpp" break; default: @@ -2795,7 +2821,7 @@ YYLTYPE yylloc = yyloc_default; yylloc.string_length = 0; } -#line 2799 "bison_parser.cpp" +#line 2825 "bison_parser.cpp" yylsp[0] = yylloc; goto yysetstate; @@ -3005,7 +3031,7 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* input: statement_list opt_semicolon */ -#line 271 "bison_parser.y" +#line 277 "bison_parser.y" { for (SQLStatement* stmt : *(yyvsp[-1].stmt_vec)) { // Transfers ownership of the statement. @@ -3023,247 +3049,247 @@ YYLTYPE yylloc = yyloc_default; } delete (yyvsp[-1].stmt_vec); } -#line 3027 "bison_parser.cpp" +#line 3053 "bison_parser.cpp" break; case 3: /* statement_list: statement */ -#line 292 "bison_parser.y" +#line 298 "bison_parser.y" { (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 3038 "bison_parser.cpp" +#line 3064 "bison_parser.cpp" break; case 4: /* statement_list: statement_list ';' statement */ -#line 298 "bison_parser.y" +#line 304 "bison_parser.y" { (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 3049 "bison_parser.cpp" +#line 3075 "bison_parser.cpp" break; case 5: /* statement: prepare_statement opt_hints */ -#line 307 "bison_parser.y" +#line 313 "bison_parser.y" { (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3058 "bison_parser.cpp" +#line 3084 "bison_parser.cpp" break; case 6: /* statement: preparable_statement opt_hints */ -#line 311 "bison_parser.y" +#line 317 "bison_parser.y" { (yyval.statement) = (yyvsp[-1].statement); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3067 "bison_parser.cpp" +#line 3093 "bison_parser.cpp" break; case 7: /* statement: show_statement */ -#line 315 "bison_parser.y" +#line 321 "bison_parser.y" { (yyval.statement) = (yyvsp[0].show_stmt); } -#line 3075 "bison_parser.cpp" +#line 3101 "bison_parser.cpp" break; case 8: /* statement: import_statement */ -#line 318 "bison_parser.y" +#line 324 "bison_parser.y" { (yyval.statement) = (yyvsp[0].import_stmt); } -#line 3083 "bison_parser.cpp" +#line 3109 "bison_parser.cpp" break; case 9: /* statement: export_statement */ -#line 321 "bison_parser.y" +#line 327 "bison_parser.y" { (yyval.statement) = (yyvsp[0].export_stmt); } -#line 3091 "bison_parser.cpp" +#line 3117 "bison_parser.cpp" break; case 10: /* preparable_statement: select_statement */ -#line 328 "bison_parser.y" +#line 334 "bison_parser.y" { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 3097 "bison_parser.cpp" +#line 3123 "bison_parser.cpp" break; case 11: /* preparable_statement: create_statement */ -#line 329 "bison_parser.y" +#line 335 "bison_parser.y" { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 3103 "bison_parser.cpp" +#line 3129 "bison_parser.cpp" break; case 12: /* preparable_statement: insert_statement */ -#line 330 "bison_parser.y" +#line 336 "bison_parser.y" { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 3109 "bison_parser.cpp" +#line 3135 "bison_parser.cpp" break; case 13: /* preparable_statement: delete_statement */ -#line 331 "bison_parser.y" +#line 337 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3115 "bison_parser.cpp" +#line 3141 "bison_parser.cpp" break; case 14: /* preparable_statement: truncate_statement */ -#line 332 "bison_parser.y" +#line 338 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3121 "bison_parser.cpp" +#line 3147 "bison_parser.cpp" break; case 15: /* preparable_statement: update_statement */ -#line 333 "bison_parser.y" +#line 339 "bison_parser.y" { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 3127 "bison_parser.cpp" +#line 3153 "bison_parser.cpp" break; case 16: /* preparable_statement: drop_statement */ -#line 334 "bison_parser.y" +#line 340 "bison_parser.y" { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 3133 "bison_parser.cpp" +#line 3159 "bison_parser.cpp" break; case 17: /* preparable_statement: execute_statement */ -#line 335 "bison_parser.y" +#line 341 "bison_parser.y" { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 3139 "bison_parser.cpp" +#line 3165 "bison_parser.cpp" break; case 18: /* preparable_statement: transaction_statement */ -#line 336 "bison_parser.y" +#line 342 "bison_parser.y" { (yyval.statement) = (yyvsp[0].transaction_stmt); } -#line 3145 "bison_parser.cpp" +#line 3171 "bison_parser.cpp" break; case 19: /* opt_hints: WITH HINT '(' hint_list ')' */ -#line 345 "bison_parser.y" +#line 351 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 3151 "bison_parser.cpp" +#line 3177 "bison_parser.cpp" break; case 20: /* opt_hints: %empty */ -#line 346 "bison_parser.y" +#line 352 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 3157 "bison_parser.cpp" +#line 3183 "bison_parser.cpp" break; case 21: /* hint_list: hint */ -#line 351 "bison_parser.y" +#line 357 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3163 "bison_parser.cpp" +#line 3189 "bison_parser.cpp" break; case 22: /* hint_list: hint_list ',' hint */ -#line 352 "bison_parser.y" +#line 358 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3169 "bison_parser.cpp" +#line 3195 "bison_parser.cpp" break; case 23: /* hint: IDENTIFIER */ -#line 356 "bison_parser.y" +#line 362 "bison_parser.y" { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[0].sval); } -#line 3178 "bison_parser.cpp" +#line 3204 "bison_parser.cpp" break; case 24: /* hint: IDENTIFIER '(' literal_list ')' */ -#line 360 "bison_parser.y" +#line 366 "bison_parser.y" { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[-3].sval); (yyval.expr)->exprList = (yyvsp[-1].expr_vec); } -#line 3188 "bison_parser.cpp" +#line 3214 "bison_parser.cpp" break; case 25: /* transaction_statement: BEGIN opt_transaction_keyword */ -#line 372 "bison_parser.y" +#line 378 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kBeginTransaction); } -#line 3196 "bison_parser.cpp" +#line 3222 "bison_parser.cpp" break; case 26: /* transaction_statement: ROLLBACK opt_transaction_keyword */ -#line 375 "bison_parser.y" +#line 381 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kRollbackTransaction); } -#line 3204 "bison_parser.cpp" +#line 3230 "bison_parser.cpp" break; case 27: /* transaction_statement: COMMIT opt_transaction_keyword */ -#line 378 "bison_parser.y" +#line 384 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kCommitTransaction); } -#line 3212 "bison_parser.cpp" +#line 3238 "bison_parser.cpp" break; case 30: /* prepare_statement: PREPARE IDENTIFIER FROM prepare_target_query */ -#line 392 "bison_parser.y" +#line 398 "bison_parser.y" { (yyval.prep_stmt) = new PrepareStatement(); (yyval.prep_stmt)->name = (yyvsp[-2].sval); (yyval.prep_stmt)->query = (yyvsp[0].sval); } -#line 3222 "bison_parser.cpp" +#line 3248 "bison_parser.cpp" break; case 32: /* execute_statement: EXECUTE IDENTIFIER */ -#line 402 "bison_parser.y" +#line 408 "bison_parser.y" { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[0].sval); } -#line 3231 "bison_parser.cpp" +#line 3257 "bison_parser.cpp" break; case 33: /* execute_statement: EXECUTE IDENTIFIER '(' opt_literal_list ')' */ -#line 406 "bison_parser.y" +#line 412 "bison_parser.y" { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[-3].sval); (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); } -#line 3241 "bison_parser.cpp" +#line 3267 "bison_parser.cpp" break; case 34: /* import_statement: IMPORT FROM file_type FILE file_path INTO table_name */ -#line 420 "bison_parser.y" +#line 426 "bison_parser.y" { (yyval.import_stmt) = new ImportStatement((yyvsp[-4].import_type_t)); (yyval.import_stmt)->filePath = (yyvsp[-2].sval); (yyval.import_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3252 "bison_parser.cpp" +#line 3278 "bison_parser.cpp" break; case 35: /* import_statement: COPY table_name FROM file_path opt_file_type */ -#line 426 "bison_parser.y" +#line 432 "bison_parser.y" { (yyval.import_stmt) = new ImportStatement((yyvsp[0].import_type_t)); (yyval.import_stmt)->filePath = (yyvsp[-1].sval); (yyval.import_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3263 "bison_parser.cpp" +#line 3289 "bison_parser.cpp" break; case 36: /* file_type: IDENTIFIER */ -#line 435 "bison_parser.y" +#line 441 "bison_parser.y" { if (strcasecmp((yyvsp[0].sval), "csv") == 0) { (yyval.import_type_t) = kImportCSV; @@ -3278,70 +3304,70 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[0].sval)); } -#line 3282 "bison_parser.cpp" +#line 3308 "bison_parser.cpp" break; case 37: /* file_path: string_literal */ -#line 452 "bison_parser.y" +#line 458 "bison_parser.y" { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 3288 "bison_parser.cpp" +#line 3314 "bison_parser.cpp" break; case 38: /* opt_file_type: WITH FORMAT file_type */ -#line 456 "bison_parser.y" +#line 462 "bison_parser.y" { (yyval.import_type_t) = (yyvsp[0].import_type_t); } -#line 3296 "bison_parser.cpp" +#line 3322 "bison_parser.cpp" break; case 39: /* opt_file_type: %empty */ -#line 459 "bison_parser.y" +#line 465 "bison_parser.y" { (yyval.import_type_t) = kImportAuto; } -#line 3302 "bison_parser.cpp" +#line 3328 "bison_parser.cpp" break; case 40: /* export_statement: COPY table_name TO file_path opt_file_type */ -#line 468 "bison_parser.y" +#line 474 "bison_parser.y" { (yyval.export_stmt) = new ExportStatement((yyvsp[0].import_type_t)); (yyval.export_stmt)->filePath = (yyvsp[-1].sval); (yyval.export_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.export_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3313 "bison_parser.cpp" +#line 3339 "bison_parser.cpp" break; case 41: /* show_statement: SHOW TABLES */ -#line 482 "bison_parser.y" +#line 488 "bison_parser.y" { (yyval.show_stmt) = new ShowStatement(kShowTables); } -#line 3321 "bison_parser.cpp" +#line 3347 "bison_parser.cpp" break; case 42: /* show_statement: SHOW COLUMNS table_name */ -#line 485 "bison_parser.y" +#line 491 "bison_parser.y" { (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 3331 "bison_parser.cpp" +#line 3357 "bison_parser.cpp" break; case 43: /* show_statement: DESCRIBE table_name */ -#line 490 "bison_parser.y" +#line 496 "bison_parser.y" { (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 3341 "bison_parser.cpp" +#line 3367 "bison_parser.cpp" break; case 44: /* create_statement: CREATE TABLE opt_not_exists table_name FROM IDENTIFIER FILE file_path */ -#line 504 "bison_parser.y" +#line 510 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTableFromTbl); (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); @@ -3355,23 +3381,24 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].sval)); (yyval.create_stmt)->filePath = (yyvsp[0].sval); } -#line 3359 "bison_parser.cpp" +#line 3385 "bison_parser.cpp" break; - case 45: /* create_statement: CREATE TABLE opt_not_exists table_name '(' column_def_commalist ')' */ -#line 517 "bison_parser.y" - { + case 45: /* create_statement: CREATE TABLE opt_not_exists table_name '(' column_def_commalist opt_table_key_constraints ')' */ +#line 523 "bison_parser.y" + { (yyval.create_stmt) = new CreateStatement(kCreateTable); - (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); - (yyval.create_stmt)->schema = (yyvsp[-3].table_name).schema; - (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; - (yyval.create_stmt)->columns = (yyvsp[-1].column_vec); + (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); + (yyval.create_stmt)->schema = (yyvsp[-4].table_name).schema; + (yyval.create_stmt)->tableName = (yyvsp[-4].table_name).name; + (yyval.create_stmt)->columns = (yyvsp[-2].column_vec); + (yyval.create_stmt)->tableKeyConstraints = (yyvsp[-1].table_key_constraint_vec); } -#line 3371 "bison_parser.cpp" +#line 3398 "bison_parser.cpp" break; case 46: /* create_statement: CREATE TABLE opt_not_exists table_name AS select_statement */ -#line 524 "bison_parser.y" +#line 531 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-3].bval); @@ -3379,11 +3406,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-2].table_name).name; (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3383 "bison_parser.cpp" +#line 3410 "bison_parser.cpp" break; case 47: /* create_statement: CREATE INDEX opt_not_exists opt_index_name ON table_name '(' ident_commalist ')' */ -#line 531 "bison_parser.y" +#line 538 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateIndex); (yyval.create_stmt)->indexName = (yyvsp[-5].sval); @@ -3391,11 +3418,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->indexColumns = (yyvsp[-1].str_vec); } -#line 3395 "bison_parser.cpp" +#line 3422 "bison_parser.cpp" break; case 48: /* create_statement: CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement */ -#line 538 "bison_parser.y" +#line 545 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateView); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -3404,220 +3431,269 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3408 "bison_parser.cpp" +#line 3435 "bison_parser.cpp" break; case 49: /* opt_not_exists: IF NOT EXISTS */ -#line 549 "bison_parser.y" +#line 556 "bison_parser.y" { (yyval.bval) = true; } -#line 3414 "bison_parser.cpp" +#line 3441 "bison_parser.cpp" break; case 50: /* opt_not_exists: %empty */ -#line 550 "bison_parser.y" +#line 557 "bison_parser.y" { (yyval.bval) = false; } -#line 3420 "bison_parser.cpp" +#line 3447 "bison_parser.cpp" break; case 51: /* column_def_commalist: column_def */ -#line 554 "bison_parser.y" +#line 561 "bison_parser.y" { (yyval.column_vec) = new std::vector(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); } -#line 3426 "bison_parser.cpp" +#line 3453 "bison_parser.cpp" break; case 52: /* column_def_commalist: column_def_commalist ',' column_def */ -#line 555 "bison_parser.y" +#line 562 "bison_parser.y" { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } -#line 3432 "bison_parser.cpp" +#line 3459 "bison_parser.cpp" break; - case 53: /* column_def: IDENTIFIER column_type opt_column_nullable */ -#line 559 "bison_parser.y" - { - (yyval.column_t) = new ColumnDefinition((yyvsp[-2].sval), (yyvsp[-1].column_type_t), (yyvsp[0].bval)); + case 53: /* column_def: IDENTIFIER column_type opt_column_nullable opt_column_constraint */ +#line 566 "bison_parser.y" + { + (yyval.column_t) = new ColumnDefinition((yyvsp[-3].sval), (yyvsp[-2].column_type_t), (yyvsp[-1].bval), (yyvsp[0].column_constraint_t)); } -#line 3440 "bison_parser.cpp" +#line 3467 "bison_parser.cpp" break; case 54: /* column_type: INT */ -#line 565 "bison_parser.y" +#line 572 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3446 "bison_parser.cpp" +#line 3473 "bison_parser.cpp" break; case 55: /* column_type: INTEGER */ -#line 566 "bison_parser.y" +#line 573 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3452 "bison_parser.cpp" +#line 3479 "bison_parser.cpp" break; case 56: /* column_type: LONG */ -#line 567 "bison_parser.y" +#line 574 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::LONG}; } -#line 3458 "bison_parser.cpp" +#line 3485 "bison_parser.cpp" break; case 57: /* column_type: FLOAT */ -#line 568 "bison_parser.y" +#line 575 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3464 "bison_parser.cpp" +#line 3491 "bison_parser.cpp" break; case 58: /* column_type: DECIMAL '(' INTVAL ',' INTVAL ')' */ -#line 569 "bison_parser.y" +#line 576 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3470 "bison_parser.cpp" +#line 3497 "bison_parser.cpp" break; case 59: /* column_type: DOUBLE */ -#line 570 "bison_parser.y" +#line 577 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } -#line 3476 "bison_parser.cpp" +#line 3503 "bison_parser.cpp" break; case 60: /* column_type: REAL */ -#line 571 "bison_parser.y" +#line 578 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3482 "bison_parser.cpp" +#line 3509 "bison_parser.cpp" break; case 61: /* column_type: VARCHAR '(' INTVAL ')' */ -#line 572 "bison_parser.y" +#line 579 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3488 "bison_parser.cpp" +#line 3515 "bison_parser.cpp" break; case 62: /* column_type: CHARACTER VARYING '(' INTVAL ')' */ -#line 573 "bison_parser.y" +#line 580 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3494 "bison_parser.cpp" +#line 3521 "bison_parser.cpp" break; case 63: /* column_type: CHAR '(' INTVAL ')' */ -#line 574 "bison_parser.y" +#line 581 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } -#line 3500 "bison_parser.cpp" +#line 3527 "bison_parser.cpp" break; case 64: /* column_type: TEXT */ -#line 575 "bison_parser.y" +#line 582 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } -#line 3506 "bison_parser.cpp" +#line 3533 "bison_parser.cpp" break; case 65: /* column_type: TIME */ -#line 576 "bison_parser.y" +#line 583 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TIME}; } -#line 3512 "bison_parser.cpp" +#line 3539 "bison_parser.cpp" break; case 66: /* column_type: DATETIME */ -#line 577 "bison_parser.y" +#line 584 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } -#line 3518 "bison_parser.cpp" +#line 3545 "bison_parser.cpp" break; case 67: /* column_type: DATE */ -#line 578 "bison_parser.y" +#line 585 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATE}; } -#line 3524 "bison_parser.cpp" +#line 3551 "bison_parser.cpp" break; case 68: /* opt_column_nullable: NULL */ -#line 582 "bison_parser.y" +#line 589 "bison_parser.y" { (yyval.bval) = true; } -#line 3530 "bison_parser.cpp" +#line 3557 "bison_parser.cpp" break; case 69: /* opt_column_nullable: NOT NULL */ -#line 583 "bison_parser.y" +#line 590 "bison_parser.y" { (yyval.bval) = false; } -#line 3536 "bison_parser.cpp" +#line 3563 "bison_parser.cpp" break; case 70: /* opt_column_nullable: %empty */ -#line 584 "bison_parser.y" +#line 591 "bison_parser.y" { (yyval.bval) = false; } -#line 3542 "bison_parser.cpp" +#line 3569 "bison_parser.cpp" + break; + + case 71: /* opt_column_constraint: PRIMARY KEY */ +#line 595 "bison_parser.y" + { (yyval.column_constraint_t) = ConstraintType::PRIMARY_KEY; } +#line 3575 "bison_parser.cpp" + break; + + case 72: /* opt_column_constraint: UNIQUE */ +#line 596 "bison_parser.y" + { (yyval.column_constraint_t) = ConstraintType::UNIQUE; } +#line 3581 "bison_parser.cpp" + break; + + case 73: /* opt_column_constraint: %empty */ +#line 597 "bison_parser.y" + { (yyval.column_constraint_t) = ConstraintType::NOT_SET; } +#line 3587 "bison_parser.cpp" + break; + + case 74: /* opt_table_key_constraints: table_key_constraint */ +#line 601 "bison_parser.y" + {(yyval.table_key_constraint_vec) = new std::vector(); (yyval.table_key_constraint_vec)->push_back((yyvsp[0].table_key_constraint_t)); } +#line 3593 "bison_parser.cpp" + break; + + case 75: /* opt_table_key_constraints: opt_table_key_constraints table_key_constraint */ +#line 602 "bison_parser.y" + { (yyvsp[-1].table_key_constraint_vec)->push_back((yyvsp[0].table_key_constraint_t)); (yyval.table_key_constraint_vec) = (yyvsp[-1].table_key_constraint_vec); } +#line 3599 "bison_parser.cpp" + break; + + case 76: /* opt_table_key_constraints: %empty */ +#line 603 "bison_parser.y" + {(yyval.table_key_constraint_vec) = new std::vector(); } +#line 3605 "bison_parser.cpp" + break; + + case 77: /* table_key_constraint: ',' PRIMARY KEY '(' ident_commalist ')' */ +#line 607 "bison_parser.y" + { (yyval.table_key_constraint_t) = new TableKeyConstraint(ConstraintType::PRIMARY_KEY, (yyvsp[-1].str_vec)); } +#line 3611 "bison_parser.cpp" + break; + + case 78: /* table_key_constraint: ',' UNIQUE '(' ident_commalist ')' */ +#line 608 "bison_parser.y" + { (yyval.table_key_constraint_t) = new TableKeyConstraint(ConstraintType::UNIQUE, (yyvsp[-1].str_vec)); } +#line 3617 "bison_parser.cpp" break; - case 71: /* drop_statement: DROP TABLE opt_exists table_name */ -#line 594 "bison_parser.y" + case 79: /* drop_statement: DROP TABLE opt_exists table_name */ +#line 616 "bison_parser.y" { (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 3553 "bison_parser.cpp" +#line 3628 "bison_parser.cpp" break; - case 72: /* drop_statement: DROP VIEW opt_exists table_name */ -#line 600 "bison_parser.y" + case 80: /* drop_statement: DROP VIEW opt_exists table_name */ +#line 622 "bison_parser.y" { (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 3564 "bison_parser.cpp" +#line 3639 "bison_parser.cpp" break; - case 73: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ -#line 606 "bison_parser.y" + case 81: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ +#line 628 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); (yyval.drop_stmt)->ifExists = false; (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 3574 "bison_parser.cpp" +#line 3649 "bison_parser.cpp" break; - case 74: /* drop_statement: DROP INDEX index_name ON table_name */ -#line 611 "bison_parser.y" - { + case 82: /* drop_statement: DROP INDEX opt_exists index_name ON table_name */ +#line 633 "bison_parser.y" + { (yyval.drop_stmt) = new DropStatement(kDropIndex); (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; + (yyval.drop_stmt)->ifExists = (yyvsp[-3].bval); (yyval.drop_stmt)->index_name = (yyvsp[-2].sval); } -#line 3584 "bison_parser.cpp" +#line 3660 "bison_parser.cpp" break; - case 75: /* opt_exists: IF EXISTS */ -#line 619 "bison_parser.y" + case 83: /* opt_exists: IF EXISTS */ +#line 642 "bison_parser.y" { (yyval.bval) = true; } -#line 3590 "bison_parser.cpp" +#line 3666 "bison_parser.cpp" break; - case 76: /* opt_exists: %empty */ -#line 620 "bison_parser.y" + case 84: /* opt_exists: %empty */ +#line 643 "bison_parser.y" { (yyval.bval) = false; } -#line 3596 "bison_parser.cpp" +#line 3672 "bison_parser.cpp" break; - case 77: /* delete_statement: DELETE FROM table_name opt_where */ -#line 629 "bison_parser.y" + case 85: /* delete_statement: DELETE FROM table_name opt_where */ +#line 652 "bison_parser.y" { (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 3607 "bison_parser.cpp" +#line 3683 "bison_parser.cpp" break; - case 78: /* truncate_statement: TRUNCATE table_name */ -#line 638 "bison_parser.y" + case 86: /* truncate_statement: TRUNCATE table_name */ +#line 661 "bison_parser.y" { (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3617 "bison_parser.cpp" +#line 3693 "bison_parser.cpp" break; - case 79: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ -#line 651 "bison_parser.y" + case 87: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ +#line 674 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertValues); (yyval.insert_stmt)->schema = (yyvsp[-5].table_name).schema; @@ -3625,11 +3701,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } -#line 3629 "bison_parser.cpp" +#line 3705 "bison_parser.cpp" break; - case 80: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ -#line 658 "bison_parser.y" + case 88: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ +#line 681 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertSelect); (yyval.insert_stmt)->schema = (yyvsp[-2].table_name).schema; @@ -3637,74 +3713,74 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } -#line 3641 "bison_parser.cpp" +#line 3717 "bison_parser.cpp" break; - case 81: /* opt_column_list: '(' ident_commalist ')' */ -#line 669 "bison_parser.y" + case 89: /* opt_column_list: '(' ident_commalist ')' */ +#line 692 "bison_parser.y" { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 3647 "bison_parser.cpp" +#line 3723 "bison_parser.cpp" break; - case 82: /* opt_column_list: %empty */ -#line 670 "bison_parser.y" + case 90: /* opt_column_list: %empty */ +#line 693 "bison_parser.y" { (yyval.str_vec) = nullptr; } -#line 3653 "bison_parser.cpp" +#line 3729 "bison_parser.cpp" break; - case 83: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ -#line 680 "bison_parser.y" + case 91: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ +#line 703 "bison_parser.y" { (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 3664 "bison_parser.cpp" +#line 3740 "bison_parser.cpp" break; - case 84: /* update_clause_commalist: update_clause */ -#line 689 "bison_parser.y" + case 92: /* update_clause_commalist: update_clause */ +#line 712 "bison_parser.y" { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 3670 "bison_parser.cpp" +#line 3746 "bison_parser.cpp" break; - case 85: /* update_clause_commalist: update_clause_commalist ',' update_clause */ -#line 690 "bison_parser.y" + case 93: /* update_clause_commalist: update_clause_commalist ',' update_clause */ +#line 713 "bison_parser.y" { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 3676 "bison_parser.cpp" +#line 3752 "bison_parser.cpp" break; - case 86: /* update_clause: IDENTIFIER '=' expr */ -#line 694 "bison_parser.y" + case 94: /* update_clause: IDENTIFIER '=' expr */ +#line 717 "bison_parser.y" { (yyval.update_t) = new UpdateClause(); (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 3686 "bison_parser.cpp" +#line 3762 "bison_parser.cpp" break; - case 87: /* select_statement: opt_with_clause select_with_paren */ -#line 706 "bison_parser.y" + case 95: /* select_statement: opt_with_clause select_with_paren */ +#line 729 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3695 "bison_parser.cpp" +#line 3771 "bison_parser.cpp" break; - case 88: /* select_statement: opt_with_clause select_no_paren */ -#line 710 "bison_parser.y" + case 96: /* select_statement: opt_with_clause select_no_paren */ +#line 733 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3704 "bison_parser.cpp" +#line 3780 "bison_parser.cpp" break; - case 89: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ -#line 714 "bison_parser.y" + case 97: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ +#line 737 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3716,17 +3792,17 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); (yyval.select_stmt)->withDescriptions = (yyvsp[-5].with_description_vec); } -#line 3720 "bison_parser.cpp" +#line 3796 "bison_parser.cpp" break; - case 92: /* select_within_set_operation_no_parentheses: select_clause */ -#line 732 "bison_parser.y" + case 100: /* select_within_set_operation_no_parentheses: select_clause */ +#line 755 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); } -#line 3726 "bison_parser.cpp" +#line 3802 "bison_parser.cpp" break; - case 93: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ -#line 733 "bison_parser.y" + case 101: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ +#line 756 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3735,23 +3811,23 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->push_back((yyvsp[-1].set_operator_t)); (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[0].select_stmt); } -#line 3739 "bison_parser.cpp" +#line 3815 "bison_parser.cpp" break; - case 94: /* select_with_paren: '(' select_no_paren ')' */ -#line 744 "bison_parser.y" + case 102: /* select_with_paren: '(' select_no_paren ')' */ +#line 767 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3745 "bison_parser.cpp" +#line 3821 "bison_parser.cpp" break; - case 95: /* select_with_paren: '(' select_with_paren ')' */ -#line 745 "bison_parser.y" + case 103: /* select_with_paren: '(' select_with_paren ')' */ +#line 768 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3751 "bison_parser.cpp" +#line 3827 "bison_parser.cpp" break; - case 96: /* select_no_paren: select_clause opt_order opt_limit */ -#line 749 "bison_parser.y" + case 104: /* select_no_paren: select_clause opt_order opt_limit */ +#line 772 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); (yyval.select_stmt)->order = (yyvsp[-1].order_vec); @@ -3762,11 +3838,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3766 "bison_parser.cpp" +#line 3842 "bison_parser.cpp" break; - case 97: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ -#line 759 "bison_parser.y" + case 105: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ +#line 782 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3777,63 +3853,63 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); } -#line 3781 "bison_parser.cpp" +#line 3857 "bison_parser.cpp" break; - case 98: /* set_operator: set_type opt_all */ -#line 772 "bison_parser.y" + case 106: /* set_operator: set_type opt_all */ +#line 795 "bison_parser.y" { (yyval.set_operator_t) = (yyvsp[-1].set_operator_t); (yyval.set_operator_t)->isAll = (yyvsp[0].bval); } -#line 3790 "bison_parser.cpp" +#line 3866 "bison_parser.cpp" break; - case 99: /* set_type: UNION */ -#line 779 "bison_parser.y" + case 107: /* set_type: UNION */ +#line 802 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetUnion; } -#line 3799 "bison_parser.cpp" +#line 3875 "bison_parser.cpp" break; - case 100: /* set_type: INTERSECT */ -#line 783 "bison_parser.y" + case 108: /* set_type: INTERSECT */ +#line 806 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetIntersect; } -#line 3808 "bison_parser.cpp" +#line 3884 "bison_parser.cpp" break; - case 101: /* set_type: EXCEPT */ -#line 787 "bison_parser.y" + case 109: /* set_type: EXCEPT */ +#line 810 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetExcept; } -#line 3817 "bison_parser.cpp" +#line 3893 "bison_parser.cpp" break; - case 102: /* opt_all: ALL */ -#line 794 "bison_parser.y" + case 110: /* opt_all: ALL */ +#line 817 "bison_parser.y" { (yyval.bval) = true; } -#line 3825 "bison_parser.cpp" +#line 3901 "bison_parser.cpp" break; - case 103: /* opt_all: %empty */ -#line 797 "bison_parser.y" + case 111: /* opt_all: %empty */ +#line 820 "bison_parser.y" { (yyval.bval) = false; } -#line 3833 "bison_parser.cpp" +#line 3909 "bison_parser.cpp" break; - case 104: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ -#line 803 "bison_parser.y" + case 112: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ +#line 826 "bison_parser.y" { (yyval.select_stmt) = new SelectStatement(); (yyval.select_stmt)->limit = (yyvsp[-5].limit); @@ -3843,213 +3919,213 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 3847 "bison_parser.cpp" +#line 3923 "bison_parser.cpp" break; - case 105: /* opt_distinct: DISTINCT */ -#line 815 "bison_parser.y" + case 113: /* opt_distinct: DISTINCT */ +#line 838 "bison_parser.y" { (yyval.bval) = true; } -#line 3853 "bison_parser.cpp" +#line 3929 "bison_parser.cpp" break; - case 106: /* opt_distinct: %empty */ -#line 816 "bison_parser.y" + case 114: /* opt_distinct: %empty */ +#line 839 "bison_parser.y" { (yyval.bval) = false; } -#line 3859 "bison_parser.cpp" +#line 3935 "bison_parser.cpp" break; - case 108: /* opt_from_clause: from_clause */ -#line 824 "bison_parser.y" + case 116: /* opt_from_clause: from_clause */ +#line 847 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 3865 "bison_parser.cpp" +#line 3941 "bison_parser.cpp" break; - case 109: /* opt_from_clause: %empty */ -#line 825 "bison_parser.y" + case 117: /* opt_from_clause: %empty */ +#line 848 "bison_parser.y" { (yyval.table) = nullptr; } -#line 3871 "bison_parser.cpp" +#line 3947 "bison_parser.cpp" break; - case 110: /* from_clause: FROM table_ref */ -#line 829 "bison_parser.y" + case 118: /* from_clause: FROM table_ref */ +#line 852 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 3877 "bison_parser.cpp" +#line 3953 "bison_parser.cpp" break; - case 111: /* opt_where: WHERE expr */ -#line 834 "bison_parser.y" + case 119: /* opt_where: WHERE expr */ +#line 857 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 3883 "bison_parser.cpp" +#line 3959 "bison_parser.cpp" break; - case 112: /* opt_where: %empty */ -#line 835 "bison_parser.y" + case 120: /* opt_where: %empty */ +#line 858 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 3889 "bison_parser.cpp" +#line 3965 "bison_parser.cpp" break; - case 113: /* opt_group: GROUP BY expr_list opt_having */ -#line 839 "bison_parser.y" + case 121: /* opt_group: GROUP BY expr_list opt_having */ +#line 862 "bison_parser.y" { (yyval.group_t) = new GroupByDescription(); (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 3899 "bison_parser.cpp" +#line 3975 "bison_parser.cpp" break; - case 114: /* opt_group: %empty */ -#line 844 "bison_parser.y" + case 122: /* opt_group: %empty */ +#line 867 "bison_parser.y" { (yyval.group_t) = nullptr; } -#line 3905 "bison_parser.cpp" +#line 3981 "bison_parser.cpp" break; - case 115: /* opt_having: HAVING expr */ -#line 848 "bison_parser.y" + case 123: /* opt_having: HAVING expr */ +#line 871 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 3911 "bison_parser.cpp" +#line 3987 "bison_parser.cpp" break; - case 116: /* opt_having: %empty */ -#line 849 "bison_parser.y" + case 124: /* opt_having: %empty */ +#line 872 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 3917 "bison_parser.cpp" +#line 3993 "bison_parser.cpp" break; - case 117: /* opt_order: ORDER BY order_list */ -#line 853 "bison_parser.y" + case 125: /* opt_order: ORDER BY order_list */ +#line 876 "bison_parser.y" { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 3923 "bison_parser.cpp" +#line 3999 "bison_parser.cpp" break; - case 118: /* opt_order: %empty */ -#line 854 "bison_parser.y" + case 126: /* opt_order: %empty */ +#line 877 "bison_parser.y" { (yyval.order_vec) = nullptr; } -#line 3929 "bison_parser.cpp" +#line 4005 "bison_parser.cpp" break; - case 119: /* order_list: order_desc */ -#line 858 "bison_parser.y" + case 127: /* order_list: order_desc */ +#line 881 "bison_parser.y" { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 3935 "bison_parser.cpp" +#line 4011 "bison_parser.cpp" break; - case 120: /* order_list: order_list ',' order_desc */ -#line 859 "bison_parser.y" + case 128: /* order_list: order_list ',' order_desc */ +#line 882 "bison_parser.y" { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 3941 "bison_parser.cpp" +#line 4017 "bison_parser.cpp" break; - case 121: /* order_desc: expr opt_order_type */ -#line 863 "bison_parser.y" + case 129: /* order_desc: expr opt_order_type */ +#line 886 "bison_parser.y" { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 3947 "bison_parser.cpp" +#line 4023 "bison_parser.cpp" break; - case 122: /* opt_order_type: ASC */ -#line 867 "bison_parser.y" + case 130: /* opt_order_type: ASC */ +#line 890 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 3953 "bison_parser.cpp" +#line 4029 "bison_parser.cpp" break; - case 123: /* opt_order_type: DESC */ -#line 868 "bison_parser.y" + case 131: /* opt_order_type: DESC */ +#line 891 "bison_parser.y" { (yyval.order_type) = kOrderDesc; } -#line 3959 "bison_parser.cpp" +#line 4035 "bison_parser.cpp" break; - case 124: /* opt_order_type: %empty */ -#line 869 "bison_parser.y" + case 132: /* opt_order_type: %empty */ +#line 892 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 3965 "bison_parser.cpp" +#line 4041 "bison_parser.cpp" break; - case 125: /* opt_top: TOP int_literal */ -#line 875 "bison_parser.y" + case 133: /* opt_top: TOP int_literal */ +#line 898 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 3971 "bison_parser.cpp" +#line 4047 "bison_parser.cpp" break; - case 126: /* opt_top: %empty */ -#line 876 "bison_parser.y" + case 134: /* opt_top: %empty */ +#line 899 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 3977 "bison_parser.cpp" +#line 4053 "bison_parser.cpp" break; - case 127: /* opt_limit: LIMIT expr */ -#line 880 "bison_parser.y" + case 135: /* opt_limit: LIMIT expr */ +#line 903 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 3983 "bison_parser.cpp" +#line 4059 "bison_parser.cpp" break; - case 128: /* opt_limit: OFFSET expr */ -#line 881 "bison_parser.y" + case 136: /* opt_limit: OFFSET expr */ +#line 904 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 3989 "bison_parser.cpp" +#line 4065 "bison_parser.cpp" break; - case 129: /* opt_limit: LIMIT expr OFFSET expr */ -#line 882 "bison_parser.y" + case 137: /* opt_limit: LIMIT expr OFFSET expr */ +#line 905 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 3995 "bison_parser.cpp" +#line 4071 "bison_parser.cpp" break; - case 130: /* opt_limit: LIMIT ALL */ -#line 883 "bison_parser.y" + case 138: /* opt_limit: LIMIT ALL */ +#line 906 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, nullptr); } -#line 4001 "bison_parser.cpp" +#line 4077 "bison_parser.cpp" break; - case 131: /* opt_limit: LIMIT ALL OFFSET expr */ -#line 884 "bison_parser.y" + case 139: /* opt_limit: LIMIT ALL OFFSET expr */ +#line 907 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 4007 "bison_parser.cpp" +#line 4083 "bison_parser.cpp" break; - case 132: /* opt_limit: %empty */ -#line 885 "bison_parser.y" + case 140: /* opt_limit: %empty */ +#line 908 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 4013 "bison_parser.cpp" +#line 4089 "bison_parser.cpp" break; - case 133: /* expr_list: expr_alias */ -#line 892 "bison_parser.y" + case 141: /* expr_list: expr_alias */ +#line 915 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4019 "bison_parser.cpp" +#line 4095 "bison_parser.cpp" break; - case 134: /* expr_list: expr_list ',' expr_alias */ -#line 893 "bison_parser.y" + case 142: /* expr_list: expr_list ',' expr_alias */ +#line 916 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4025 "bison_parser.cpp" +#line 4101 "bison_parser.cpp" break; - case 135: /* opt_literal_list: literal_list */ -#line 897 "bison_parser.y" + case 143: /* opt_literal_list: literal_list */ +#line 920 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[0].expr_vec); } -#line 4031 "bison_parser.cpp" +#line 4107 "bison_parser.cpp" break; - case 136: /* opt_literal_list: %empty */ -#line 898 "bison_parser.y" + case 144: /* opt_literal_list: %empty */ +#line 921 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 4037 "bison_parser.cpp" +#line 4113 "bison_parser.cpp" break; - case 137: /* literal_list: literal */ -#line 902 "bison_parser.y" + case 145: /* literal_list: literal */ +#line 925 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4043 "bison_parser.cpp" +#line 4119 "bison_parser.cpp" break; - case 138: /* literal_list: literal_list ',' literal */ -#line 903 "bison_parser.y" + case 146: /* literal_list: literal_list ',' literal */ +#line 926 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4049 "bison_parser.cpp" +#line 4125 "bison_parser.cpp" break; - case 139: /* expr_alias: expr opt_alias */ -#line 907 "bison_parser.y" + case 147: /* expr_alias: expr opt_alias */ +#line 930 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); if ((yyvsp[0].alias_t)) { @@ -4057,421 +4133,421 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].alias_t); } } -#line 4061 "bison_parser.cpp" +#line 4137 "bison_parser.cpp" break; - case 145: /* operand: '(' expr ')' */ -#line 925 "bison_parser.y" + case 153: /* operand: '(' expr ')' */ +#line 948 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); } -#line 4067 "bison_parser.cpp" +#line 4143 "bison_parser.cpp" break; - case 155: /* operand: '(' select_no_paren ')' */ -#line 935 "bison_parser.y" + case 163: /* operand: '(' select_no_paren ')' */ +#line 958 "bison_parser.y" { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 4073 "bison_parser.cpp" +#line 4149 "bison_parser.cpp" break; - case 158: /* unary_expr: '-' operand */ -#line 944 "bison_parser.y" + case 166: /* unary_expr: '-' operand */ +#line 967 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 4079 "bison_parser.cpp" +#line 4155 "bison_parser.cpp" break; - case 159: /* unary_expr: NOT operand */ -#line 945 "bison_parser.y" + case 167: /* unary_expr: NOT operand */ +#line 968 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 4085 "bison_parser.cpp" +#line 4161 "bison_parser.cpp" break; - case 160: /* unary_expr: operand ISNULL */ -#line 946 "bison_parser.y" + case 168: /* unary_expr: operand ISNULL */ +#line 969 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 4091 "bison_parser.cpp" +#line 4167 "bison_parser.cpp" break; - case 161: /* unary_expr: operand IS NULL */ -#line 947 "bison_parser.y" + case 169: /* unary_expr: operand IS NULL */ +#line 970 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 4097 "bison_parser.cpp" +#line 4173 "bison_parser.cpp" break; - case 162: /* unary_expr: operand IS NOT NULL */ -#line 948 "bison_parser.y" + case 170: /* unary_expr: operand IS NOT NULL */ +#line 971 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 4103 "bison_parser.cpp" +#line 4179 "bison_parser.cpp" break; - case 164: /* binary_expr: operand '-' operand */ -#line 953 "bison_parser.y" + case 172: /* binary_expr: operand '-' operand */ +#line 976 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 4109 "bison_parser.cpp" +#line 4185 "bison_parser.cpp" break; - case 165: /* binary_expr: operand '+' operand */ -#line 954 "bison_parser.y" + case 173: /* binary_expr: operand '+' operand */ +#line 977 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 4115 "bison_parser.cpp" +#line 4191 "bison_parser.cpp" break; - case 166: /* binary_expr: operand '/' operand */ -#line 955 "bison_parser.y" + case 174: /* binary_expr: operand '/' operand */ +#line 978 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 4121 "bison_parser.cpp" +#line 4197 "bison_parser.cpp" break; - case 167: /* binary_expr: operand '*' operand */ -#line 956 "bison_parser.y" + case 175: /* binary_expr: operand '*' operand */ +#line 979 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 4127 "bison_parser.cpp" +#line 4203 "bison_parser.cpp" break; - case 168: /* binary_expr: operand '%' operand */ -#line 957 "bison_parser.y" + case 176: /* binary_expr: operand '%' operand */ +#line 980 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 4133 "bison_parser.cpp" +#line 4209 "bison_parser.cpp" break; - case 169: /* binary_expr: operand '^' operand */ -#line 958 "bison_parser.y" + case 177: /* binary_expr: operand '^' operand */ +#line 981 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 4139 "bison_parser.cpp" +#line 4215 "bison_parser.cpp" break; - case 170: /* binary_expr: operand LIKE operand */ -#line 959 "bison_parser.y" + case 178: /* binary_expr: operand LIKE operand */ +#line 982 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 4145 "bison_parser.cpp" +#line 4221 "bison_parser.cpp" break; - case 171: /* binary_expr: operand NOT LIKE operand */ -#line 960 "bison_parser.y" + case 179: /* binary_expr: operand NOT LIKE operand */ +#line 983 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 4151 "bison_parser.cpp" +#line 4227 "bison_parser.cpp" break; - case 172: /* binary_expr: operand ILIKE operand */ -#line 961 "bison_parser.y" + case 180: /* binary_expr: operand ILIKE operand */ +#line 984 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 4157 "bison_parser.cpp" +#line 4233 "bison_parser.cpp" break; - case 173: /* binary_expr: operand CONCAT operand */ -#line 962 "bison_parser.y" + case 181: /* binary_expr: operand CONCAT operand */ +#line 985 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 4163 "bison_parser.cpp" +#line 4239 "bison_parser.cpp" break; - case 174: /* logic_expr: expr AND expr */ -#line 966 "bison_parser.y" + case 182: /* logic_expr: expr AND expr */ +#line 989 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 4169 "bison_parser.cpp" +#line 4245 "bison_parser.cpp" break; - case 175: /* logic_expr: expr OR expr */ -#line 967 "bison_parser.y" + case 183: /* logic_expr: expr OR expr */ +#line 990 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 4175 "bison_parser.cpp" +#line 4251 "bison_parser.cpp" break; - case 176: /* in_expr: operand IN '(' expr_list ')' */ -#line 971 "bison_parser.y" + case 184: /* in_expr: operand IN '(' expr_list ')' */ +#line 994 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 4181 "bison_parser.cpp" +#line 4257 "bison_parser.cpp" break; - case 177: /* in_expr: operand NOT IN '(' expr_list ')' */ -#line 972 "bison_parser.y" + case 185: /* in_expr: operand NOT IN '(' expr_list ')' */ +#line 995 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 4187 "bison_parser.cpp" +#line 4263 "bison_parser.cpp" break; - case 178: /* in_expr: operand IN '(' select_no_paren ')' */ -#line 973 "bison_parser.y" + case 186: /* in_expr: operand IN '(' select_no_paren ')' */ +#line 996 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 4193 "bison_parser.cpp" +#line 4269 "bison_parser.cpp" break; - case 179: /* in_expr: operand NOT IN '(' select_no_paren ')' */ -#line 974 "bison_parser.y" + case 187: /* in_expr: operand NOT IN '(' select_no_paren ')' */ +#line 997 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 4199 "bison_parser.cpp" +#line 4275 "bison_parser.cpp" break; - case 180: /* case_expr: CASE expr case_list END */ -#line 980 "bison_parser.y" + case 188: /* case_expr: CASE expr case_list END */ +#line 1003 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } -#line 4205 "bison_parser.cpp" +#line 4281 "bison_parser.cpp" break; - case 181: /* case_expr: CASE expr case_list ELSE expr END */ -#line 981 "bison_parser.y" + case 189: /* case_expr: CASE expr case_list ELSE expr END */ +#line 1004 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4211 "bison_parser.cpp" +#line 4287 "bison_parser.cpp" break; - case 182: /* case_expr: CASE case_list END */ -#line 982 "bison_parser.y" + case 190: /* case_expr: CASE case_list END */ +#line 1005 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } -#line 4217 "bison_parser.cpp" +#line 4293 "bison_parser.cpp" break; - case 183: /* case_expr: CASE case_list ELSE expr END */ -#line 983 "bison_parser.y" + case 191: /* case_expr: CASE case_list ELSE expr END */ +#line 1006 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4223 "bison_parser.cpp" +#line 4299 "bison_parser.cpp" break; - case 184: /* case_list: WHEN expr THEN expr */ -#line 987 "bison_parser.y" + case 192: /* case_list: WHEN expr THEN expr */ +#line 1010 "bison_parser.y" { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4229 "bison_parser.cpp" +#line 4305 "bison_parser.cpp" break; - case 185: /* case_list: case_list WHEN expr THEN expr */ -#line 988 "bison_parser.y" + case 193: /* case_list: case_list WHEN expr THEN expr */ +#line 1011 "bison_parser.y" { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4235 "bison_parser.cpp" +#line 4311 "bison_parser.cpp" break; - case 186: /* exists_expr: EXISTS '(' select_no_paren ')' */ -#line 992 "bison_parser.y" + case 194: /* exists_expr: EXISTS '(' select_no_paren ')' */ +#line 1015 "bison_parser.y" { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 4241 "bison_parser.cpp" +#line 4317 "bison_parser.cpp" break; - case 187: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ -#line 993 "bison_parser.y" + case 195: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ +#line 1016 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 4247 "bison_parser.cpp" +#line 4323 "bison_parser.cpp" break; - case 188: /* comp_expr: operand '=' operand */ -#line 997 "bison_parser.y" + case 196: /* comp_expr: operand '=' operand */ +#line 1020 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4253 "bison_parser.cpp" +#line 4329 "bison_parser.cpp" break; - case 189: /* comp_expr: operand EQUALS operand */ -#line 998 "bison_parser.y" + case 197: /* comp_expr: operand EQUALS operand */ +#line 1021 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4259 "bison_parser.cpp" +#line 4335 "bison_parser.cpp" break; - case 190: /* comp_expr: operand NOTEQUALS operand */ -#line 999 "bison_parser.y" + case 198: /* comp_expr: operand NOTEQUALS operand */ +#line 1022 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 4265 "bison_parser.cpp" +#line 4341 "bison_parser.cpp" break; - case 191: /* comp_expr: operand '<' operand */ -#line 1000 "bison_parser.y" + case 199: /* comp_expr: operand '<' operand */ +#line 1023 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 4271 "bison_parser.cpp" +#line 4347 "bison_parser.cpp" break; - case 192: /* comp_expr: operand '>' operand */ -#line 1001 "bison_parser.y" + case 200: /* comp_expr: operand '>' operand */ +#line 1024 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 4277 "bison_parser.cpp" +#line 4353 "bison_parser.cpp" break; - case 193: /* comp_expr: operand LESSEQ operand */ -#line 1002 "bison_parser.y" + case 201: /* comp_expr: operand LESSEQ operand */ +#line 1025 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 4283 "bison_parser.cpp" +#line 4359 "bison_parser.cpp" break; - case 194: /* comp_expr: operand GREATEREQ operand */ -#line 1003 "bison_parser.y" + case 202: /* comp_expr: operand GREATEREQ operand */ +#line 1026 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 4289 "bison_parser.cpp" +#line 4365 "bison_parser.cpp" break; - case 195: /* function_expr: IDENTIFIER '(' ')' */ -#line 1007 "bison_parser.y" + case 203: /* function_expr: IDENTIFIER '(' ')' */ +#line 1030 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 4295 "bison_parser.cpp" +#line 4371 "bison_parser.cpp" break; - case 196: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ -#line 1008 "bison_parser.y" + case 204: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ +#line 1031 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 4301 "bison_parser.cpp" +#line 4377 "bison_parser.cpp" break; - case 197: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ -#line 1012 "bison_parser.y" + case 205: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ +#line 1035 "bison_parser.y" { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } -#line 4307 "bison_parser.cpp" +#line 4383 "bison_parser.cpp" break; - case 198: /* cast_expr: CAST '(' expr AS column_type ')' */ -#line 1016 "bison_parser.y" + case 206: /* cast_expr: CAST '(' expr AS column_type ')' */ +#line 1039 "bison_parser.y" { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } -#line 4313 "bison_parser.cpp" +#line 4389 "bison_parser.cpp" break; - case 199: /* datetime_field: SECOND */ -#line 1020 "bison_parser.y" + case 207: /* datetime_field: SECOND */ +#line 1043 "bison_parser.y" { (yyval.datetime_field) = kDatetimeSecond; } -#line 4319 "bison_parser.cpp" +#line 4395 "bison_parser.cpp" break; - case 200: /* datetime_field: MINUTE */ -#line 1021 "bison_parser.y" + case 208: /* datetime_field: MINUTE */ +#line 1044 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMinute; } -#line 4325 "bison_parser.cpp" +#line 4401 "bison_parser.cpp" break; - case 201: /* datetime_field: HOUR */ -#line 1022 "bison_parser.y" + case 209: /* datetime_field: HOUR */ +#line 1045 "bison_parser.y" { (yyval.datetime_field) = kDatetimeHour; } -#line 4331 "bison_parser.cpp" +#line 4407 "bison_parser.cpp" break; - case 202: /* datetime_field: DAY */ -#line 1023 "bison_parser.y" + case 210: /* datetime_field: DAY */ +#line 1046 "bison_parser.y" { (yyval.datetime_field) = kDatetimeDay; } -#line 4337 "bison_parser.cpp" +#line 4413 "bison_parser.cpp" break; - case 203: /* datetime_field: MONTH */ -#line 1024 "bison_parser.y" + case 211: /* datetime_field: MONTH */ +#line 1047 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMonth; } -#line 4343 "bison_parser.cpp" +#line 4419 "bison_parser.cpp" break; - case 204: /* datetime_field: YEAR */ -#line 1025 "bison_parser.y" + case 212: /* datetime_field: YEAR */ +#line 1048 "bison_parser.y" { (yyval.datetime_field) = kDatetimeYear; } -#line 4349 "bison_parser.cpp" +#line 4425 "bison_parser.cpp" break; - case 205: /* array_expr: ARRAY '[' expr_list ']' */ -#line 1029 "bison_parser.y" + case 213: /* array_expr: ARRAY '[' expr_list ']' */ +#line 1052 "bison_parser.y" { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 4355 "bison_parser.cpp" +#line 4431 "bison_parser.cpp" break; - case 206: /* array_index: operand '[' int_literal ']' */ -#line 1033 "bison_parser.y" + case 214: /* array_index: operand '[' int_literal ']' */ +#line 1056 "bison_parser.y" { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 4361 "bison_parser.cpp" +#line 4437 "bison_parser.cpp" break; - case 207: /* between_expr: operand BETWEEN operand AND operand */ -#line 1037 "bison_parser.y" + case 215: /* between_expr: operand BETWEEN operand AND operand */ +#line 1060 "bison_parser.y" { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4367 "bison_parser.cpp" +#line 4443 "bison_parser.cpp" break; - case 208: /* column_name: IDENTIFIER */ -#line 1041 "bison_parser.y" + case 216: /* column_name: IDENTIFIER */ +#line 1064 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 4373 "bison_parser.cpp" +#line 4449 "bison_parser.cpp" break; - case 209: /* column_name: IDENTIFIER '.' IDENTIFIER */ -#line 1042 "bison_parser.y" + case 217: /* column_name: IDENTIFIER '.' IDENTIFIER */ +#line 1065 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 4379 "bison_parser.cpp" +#line 4455 "bison_parser.cpp" break; - case 210: /* column_name: '*' */ -#line 1043 "bison_parser.y" + case 218: /* column_name: '*' */ +#line 1066 "bison_parser.y" { (yyval.expr) = Expr::makeStar(); } -#line 4385 "bison_parser.cpp" +#line 4461 "bison_parser.cpp" break; - case 211: /* column_name: IDENTIFIER '.' '*' */ -#line 1044 "bison_parser.y" + case 219: /* column_name: IDENTIFIER '.' '*' */ +#line 1067 "bison_parser.y" { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 4391 "bison_parser.cpp" +#line 4467 "bison_parser.cpp" break; - case 217: /* string_literal: STRING */ -#line 1056 "bison_parser.y" + case 225: /* string_literal: STRING */ +#line 1079 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 4397 "bison_parser.cpp" +#line 4473 "bison_parser.cpp" break; - case 218: /* bool_literal: TRUE */ -#line 1060 "bison_parser.y" + case 226: /* bool_literal: TRUE */ +#line 1083 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(true); } -#line 4403 "bison_parser.cpp" +#line 4479 "bison_parser.cpp" break; - case 219: /* bool_literal: FALSE */ -#line 1061 "bison_parser.y" + case 227: /* bool_literal: FALSE */ +#line 1084 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(false); } -#line 4409 "bison_parser.cpp" +#line 4485 "bison_parser.cpp" break; - case 220: /* num_literal: FLOATVAL */ -#line 1065 "bison_parser.y" + case 228: /* num_literal: FLOATVAL */ +#line 1088 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 4415 "bison_parser.cpp" +#line 4491 "bison_parser.cpp" break; - case 222: /* int_literal: INTVAL */ -#line 1070 "bison_parser.y" + case 230: /* int_literal: INTVAL */ +#line 1093 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 4421 "bison_parser.cpp" +#line 4497 "bison_parser.cpp" break; - case 223: /* null_literal: NULL */ -#line 1074 "bison_parser.y" + case 231: /* null_literal: NULL */ +#line 1097 "bison_parser.y" { (yyval.expr) = Expr::makeNullLiteral(); } -#line 4427 "bison_parser.cpp" +#line 4503 "bison_parser.cpp" break; - case 224: /* param_expr: '?' */ -#line 1078 "bison_parser.y" + case 232: /* param_expr: '?' */ +#line 1101 "bison_parser.y" { (yyval.expr) = Expr::makeParameter(yylloc.total_column); (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 4437 "bison_parser.cpp" +#line 4513 "bison_parser.cpp" break; - case 226: /* table_ref: table_ref_commalist ',' table_ref_atomic */ -#line 1091 "bison_parser.y" + case 234: /* table_ref: table_ref_commalist ',' table_ref_atomic */ +#line 1114 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); auto tbl = new TableRef(kTableCrossProduct); tbl->list = (yyvsp[-2].table_vec); (yyval.table) = tbl; } -#line 4448 "bison_parser.cpp" +#line 4524 "bison_parser.cpp" break; - case 230: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ -#line 1107 "bison_parser.y" + case 238: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ +#line 1130 "bison_parser.y" { auto tbl = new TableRef(kTableSelect); tbl->select = (yyvsp[-2].select_stmt); tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4459 "bison_parser.cpp" +#line 4535 "bison_parser.cpp" break; - case 231: /* table_ref_commalist: table_ref_atomic */ -#line 1116 "bison_parser.y" + case 239: /* table_ref_commalist: table_ref_atomic */ +#line 1139 "bison_parser.y" { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 4465 "bison_parser.cpp" +#line 4541 "bison_parser.cpp" break; - case 232: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ -#line 1117 "bison_parser.y" + case 240: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ +#line 1140 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 4471 "bison_parser.cpp" +#line 4547 "bison_parser.cpp" break; - case 233: /* table_ref_name: table_name opt_table_alias */ -#line 1122 "bison_parser.y" + case 241: /* table_ref_name: table_name opt_table_alias */ +#line 1145 "bison_parser.y" { auto tbl = new TableRef(kTableName); tbl->schema = (yyvsp[-1].table_name).schema; @@ -4479,121 +4555,121 @@ YYLTYPE yylloc = yyloc_default; tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4483 "bison_parser.cpp" +#line 4559 "bison_parser.cpp" break; - case 234: /* table_ref_name_no_alias: table_name */ -#line 1133 "bison_parser.y" + case 242: /* table_ref_name_no_alias: table_name */ +#line 1156 "bison_parser.y" { (yyval.table) = new TableRef(kTableName); (yyval.table)->schema = (yyvsp[0].table_name).schema; (yyval.table)->name = (yyvsp[0].table_name).name; } -#line 4493 "bison_parser.cpp" +#line 4569 "bison_parser.cpp" break; - case 235: /* table_name: IDENTIFIER */ -#line 1142 "bison_parser.y" + case 243: /* table_name: IDENTIFIER */ +#line 1165 "bison_parser.y" { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} -#line 4499 "bison_parser.cpp" +#line 4575 "bison_parser.cpp" break; - case 236: /* table_name: IDENTIFIER '.' IDENTIFIER */ -#line 1143 "bison_parser.y" + case 244: /* table_name: IDENTIFIER '.' IDENTIFIER */ +#line 1166 "bison_parser.y" { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } -#line 4505 "bison_parser.cpp" +#line 4581 "bison_parser.cpp" break; - case 237: /* opt_index_name: IDENTIFIER */ -#line 1147 "bison_parser.y" + case 245: /* opt_index_name: IDENTIFIER */ +#line 1170 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4511 "bison_parser.cpp" +#line 4587 "bison_parser.cpp" break; - case 238: /* opt_index_name: %empty */ -#line 1148 "bison_parser.y" + case 246: /* opt_index_name: %empty */ +#line 1171 "bison_parser.y" { (yyval.sval) = nullptr;} -#line 4517 "bison_parser.cpp" +#line 4593 "bison_parser.cpp" break; - case 239: /* index_name: IDENTIFIER */ -#line 1152 "bison_parser.y" + case 247: /* index_name: IDENTIFIER */ +#line 1175 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4523 "bison_parser.cpp" +#line 4599 "bison_parser.cpp" break; - case 241: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ -#line 1158 "bison_parser.y" + case 249: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ +#line 1181 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } -#line 4529 "bison_parser.cpp" +#line 4605 "bison_parser.cpp" break; - case 243: /* opt_table_alias: %empty */ -#line 1164 "bison_parser.y" + case 251: /* opt_table_alias: %empty */ +#line 1187 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4535 "bison_parser.cpp" +#line 4611 "bison_parser.cpp" break; - case 244: /* alias: AS IDENTIFIER */ -#line 1169 "bison_parser.y" + case 252: /* alias: AS IDENTIFIER */ +#line 1192 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4541 "bison_parser.cpp" +#line 4617 "bison_parser.cpp" break; - case 245: /* alias: IDENTIFIER */ -#line 1170 "bison_parser.y" + case 253: /* alias: IDENTIFIER */ +#line 1193 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4547 "bison_parser.cpp" +#line 4623 "bison_parser.cpp" break; - case 247: /* opt_alias: %empty */ -#line 1176 "bison_parser.y" + case 255: /* opt_alias: %empty */ +#line 1199 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4553 "bison_parser.cpp" +#line 4629 "bison_parser.cpp" break; - case 249: /* opt_with_clause: %empty */ -#line 1186 "bison_parser.y" + case 257: /* opt_with_clause: %empty */ +#line 1209 "bison_parser.y" { (yyval.with_description_vec) = nullptr; } -#line 4559 "bison_parser.cpp" +#line 4635 "bison_parser.cpp" break; - case 250: /* with_clause: WITH with_description_list */ -#line 1190 "bison_parser.y" + case 258: /* with_clause: WITH with_description_list */ +#line 1213 "bison_parser.y" { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } -#line 4565 "bison_parser.cpp" +#line 4641 "bison_parser.cpp" break; - case 251: /* with_description_list: with_description */ -#line 1194 "bison_parser.y" + case 259: /* with_description_list: with_description */ +#line 1217 "bison_parser.y" { (yyval.with_description_vec) = new std::vector(); (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); } -#line 4574 "bison_parser.cpp" +#line 4650 "bison_parser.cpp" break; - case 252: /* with_description_list: with_description_list ',' with_description */ -#line 1198 "bison_parser.y" + case 260: /* with_description_list: with_description_list ',' with_description */ +#line 1221 "bison_parser.y" { (yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t)); (yyval.with_description_vec) = (yyvsp[-2].with_description_vec); } -#line 4583 "bison_parser.cpp" +#line 4659 "bison_parser.cpp" break; - case 253: /* with_description: IDENTIFIER AS select_with_paren */ -#line 1205 "bison_parser.y" + case 261: /* with_description: IDENTIFIER AS select_with_paren */ +#line 1228 "bison_parser.y" { (yyval.with_description_t) = new WithDescription(); (yyval.with_description_t)->alias = (yyvsp[-2].sval); (yyval.with_description_t)->select = (yyvsp[0].select_stmt); } -#line 4593 "bison_parser.cpp" +#line 4669 "bison_parser.cpp" break; - case 254: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ -#line 1219 "bison_parser.y" + case 262: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ +#line 1242 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4601,11 +4677,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 4605 "bison_parser.cpp" +#line 4681 "bison_parser.cpp" break; - case 255: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ -#line 1227 "bison_parser.y" + case 263: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ +#line 1250 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4614,11 +4690,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 4618 "bison_parser.cpp" +#line 4694 "bison_parser.cpp" break; - case 256: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ -#line 1237 "bison_parser.y" + case 264: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ +#line 1260 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4634,83 +4710,83 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } -#line 4638 "bison_parser.cpp" +#line 4714 "bison_parser.cpp" break; - case 257: /* opt_join_type: INNER */ -#line 1255 "bison_parser.y" + case 265: /* opt_join_type: INNER */ +#line 1278 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4644 "bison_parser.cpp" +#line 4720 "bison_parser.cpp" break; - case 258: /* opt_join_type: LEFT OUTER */ -#line 1256 "bison_parser.y" + case 266: /* opt_join_type: LEFT OUTER */ +#line 1279 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4650 "bison_parser.cpp" +#line 4726 "bison_parser.cpp" break; - case 259: /* opt_join_type: LEFT */ -#line 1257 "bison_parser.y" + case 267: /* opt_join_type: LEFT */ +#line 1280 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4656 "bison_parser.cpp" +#line 4732 "bison_parser.cpp" break; - case 260: /* opt_join_type: RIGHT OUTER */ -#line 1258 "bison_parser.y" + case 268: /* opt_join_type: RIGHT OUTER */ +#line 1281 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4662 "bison_parser.cpp" +#line 4738 "bison_parser.cpp" break; - case 261: /* opt_join_type: RIGHT */ -#line 1259 "bison_parser.y" + case 269: /* opt_join_type: RIGHT */ +#line 1282 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4668 "bison_parser.cpp" +#line 4744 "bison_parser.cpp" break; - case 262: /* opt_join_type: FULL OUTER */ -#line 1260 "bison_parser.y" + case 270: /* opt_join_type: FULL OUTER */ +#line 1283 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4674 "bison_parser.cpp" +#line 4750 "bison_parser.cpp" break; - case 263: /* opt_join_type: OUTER */ -#line 1261 "bison_parser.y" + case 271: /* opt_join_type: OUTER */ +#line 1284 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4680 "bison_parser.cpp" +#line 4756 "bison_parser.cpp" break; - case 264: /* opt_join_type: FULL */ -#line 1262 "bison_parser.y" + case 272: /* opt_join_type: FULL */ +#line 1285 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4686 "bison_parser.cpp" +#line 4762 "bison_parser.cpp" break; - case 265: /* opt_join_type: CROSS */ -#line 1263 "bison_parser.y" + case 273: /* opt_join_type: CROSS */ +#line 1286 "bison_parser.y" { (yyval.uval) = kJoinCross; } -#line 4692 "bison_parser.cpp" +#line 4768 "bison_parser.cpp" break; - case 266: /* opt_join_type: %empty */ -#line 1264 "bison_parser.y" + case 274: /* opt_join_type: %empty */ +#line 1287 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4698 "bison_parser.cpp" +#line 4774 "bison_parser.cpp" break; - case 270: /* ident_commalist: IDENTIFIER */ -#line 1284 "bison_parser.y" + case 278: /* ident_commalist: IDENTIFIER */ +#line 1307 "bison_parser.y" { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 4704 "bison_parser.cpp" +#line 4780 "bison_parser.cpp" break; - case 271: /* ident_commalist: ident_commalist ',' IDENTIFIER */ -#line 1285 "bison_parser.y" + case 279: /* ident_commalist: ident_commalist ',' IDENTIFIER */ +#line 1308 "bison_parser.y" { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 4710 "bison_parser.cpp" +#line 4786 "bison_parser.cpp" break; -#line 4714 "bison_parser.cpp" +#line 4790 "bison_parser.cpp" default: break; } @@ -4940,7 +5016,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 1288 "bison_parser.y" +#line 1311 "bison_parser.y" /********************************* ** Section 4: Additional C code diff --git a/src/parser/bison_parser.h b/src/parser/bison_parser.h index 8ecea5d7..8dc1b2b8 100644 --- a/src/parser/bison_parser.h +++ b/src/parser/bison_parser.h @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.5.1. */ +/* A Bison parser, made by GNU Bison 3.7.6. */ /* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -31,8 +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. */ +/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, + especially those whose name start with YY_ or yy_. They are + private implementation details that can be changed or removed. */ #ifndef YY_HSQL_BISON_PARSER_H_INCLUDED # define YY_HSQL_BISON_PARSER_H_INCLUDED @@ -76,167 +77,172 @@ extern int hsql_debug; } \ } -#line 80 "bison_parser.h" +#line 81 "bison_parser.h" -/* Token type. */ +/* Token kinds. */ #ifndef HSQL_TOKENTYPE # define HSQL_TOKENTYPE enum hsql_tokentype { - SQL_IDENTIFIER = 258, - SQL_STRING = 259, - SQL_FLOATVAL = 260, - SQL_INTVAL = 261, - SQL_DEALLOCATE = 262, - SQL_PARAMETERS = 263, - SQL_INTERSECT = 264, - SQL_TEMPORARY = 265, - SQL_TIMESTAMP = 266, - SQL_DISTINCT = 267, - SQL_NVARCHAR = 268, - SQL_RESTRICT = 269, - SQL_TRUNCATE = 270, - SQL_ANALYZE = 271, - SQL_BETWEEN = 272, - SQL_CASCADE = 273, - SQL_COLUMNS = 274, - SQL_CONTROL = 275, - SQL_DEFAULT = 276, - SQL_EXECUTE = 277, - SQL_EXPLAIN = 278, - SQL_INTEGER = 279, - SQL_NATURAL = 280, - SQL_PREPARE = 281, - SQL_PRIMARY = 282, - SQL_SCHEMAS = 283, - SQL_CHARACTER = 284, - SQL_VARYING = 285, - SQL_REAL = 286, - SQL_DECIMAL = 287, - SQL_SPATIAL = 288, - SQL_VARCHAR = 289, - SQL_VIRTUAL = 290, - SQL_DESCRIBE = 291, - SQL_BEFORE = 292, - SQL_COLUMN = 293, - SQL_CREATE = 294, - SQL_DELETE = 295, - SQL_DIRECT = 296, - SQL_DOUBLE = 297, - SQL_ESCAPE = 298, - SQL_EXCEPT = 299, - SQL_EXISTS = 300, - SQL_EXTRACT = 301, - SQL_CAST = 302, - SQL_FORMAT = 303, - SQL_GLOBAL = 304, - SQL_HAVING = 305, - SQL_IMPORT = 306, - SQL_INSERT = 307, - SQL_ISNULL = 308, - SQL_OFFSET = 309, - SQL_RENAME = 310, - SQL_SCHEMA = 311, - SQL_SELECT = 312, - SQL_SORTED = 313, - SQL_TABLES = 314, - SQL_UNIQUE = 315, - SQL_UNLOAD = 316, - SQL_UPDATE = 317, - SQL_VALUES = 318, - SQL_AFTER = 319, - SQL_ALTER = 320, - SQL_CROSS = 321, - SQL_DELTA = 322, - SQL_FLOAT = 323, - SQL_GROUP = 324, - SQL_INDEX = 325, - SQL_INNER = 326, - SQL_LIMIT = 327, - SQL_LOCAL = 328, - SQL_MERGE = 329, - SQL_MINUS = 330, - SQL_ORDER = 331, - SQL_OUTER = 332, - SQL_RIGHT = 333, - SQL_TABLE = 334, - SQL_UNION = 335, - SQL_USING = 336, - SQL_WHERE = 337, - SQL_CALL = 338, - SQL_CASE = 339, - SQL_CHAR = 340, - SQL_COPY = 341, - SQL_DATE = 342, - SQL_DATETIME = 343, - SQL_DESC = 344, - SQL_DROP = 345, - SQL_ELSE = 346, - SQL_FILE = 347, - SQL_FROM = 348, - SQL_FULL = 349, - SQL_HASH = 350, - SQL_HINT = 351, - SQL_INTO = 352, - SQL_JOIN = 353, - SQL_LEFT = 354, - SQL_LIKE = 355, - SQL_LOAD = 356, - SQL_LONG = 357, - SQL_NULL = 358, - SQL_PLAN = 359, - SQL_SHOW = 360, - SQL_TEXT = 361, - SQL_THEN = 362, - SQL_TIME = 363, - SQL_VIEW = 364, - SQL_WHEN = 365, - SQL_WITH = 366, - SQL_ADD = 367, - SQL_ALL = 368, - SQL_AND = 369, - SQL_ASC = 370, - SQL_END = 371, - SQL_FOR = 372, - SQL_INT = 373, - SQL_KEY = 374, - SQL_NOT = 375, - SQL_OFF = 376, - SQL_SET = 377, - SQL_TOP = 378, - SQL_AS = 379, - SQL_BY = 380, - SQL_IF = 381, - SQL_IN = 382, - SQL_IS = 383, - SQL_OF = 384, - SQL_ON = 385, - SQL_OR = 386, - SQL_TO = 387, - SQL_ARRAY = 388, - SQL_CONCAT = 389, - SQL_ILIKE = 390, - SQL_SECOND = 391, - SQL_MINUTE = 392, - SQL_HOUR = 393, - SQL_DAY = 394, - SQL_MONTH = 395, - SQL_YEAR = 396, - SQL_TRUE = 397, - SQL_FALSE = 398, - SQL_TRANSACTION = 399, - SQL_BEGIN = 400, - SQL_COMMIT = 401, - SQL_ROLLBACK = 402, - SQL_EQUALS = 403, - SQL_NOTEQUALS = 404, - SQL_LESS = 405, - SQL_GREATER = 406, - SQL_LESSEQ = 407, - SQL_GREATEREQ = 408, - SQL_NOTNULL = 409, - SQL_UMINUS = 410 + SQL_HSQL_EMPTY = -2, + SQL_YYEOF = 0, /* "end of file" */ + SQL_HSQL_error = 256, /* error */ + SQL_HSQL_UNDEF = 257, /* "invalid token" */ + SQL_IDENTIFIER = 258, /* IDENTIFIER */ + SQL_STRING = 259, /* STRING */ + SQL_FLOATVAL = 260, /* FLOATVAL */ + SQL_INTVAL = 261, /* INTVAL */ + SQL_DEALLOCATE = 262, /* DEALLOCATE */ + SQL_PARAMETERS = 263, /* PARAMETERS */ + SQL_INTERSECT = 264, /* INTERSECT */ + SQL_TEMPORARY = 265, /* TEMPORARY */ + SQL_TIMESTAMP = 266, /* TIMESTAMP */ + SQL_DISTINCT = 267, /* DISTINCT */ + SQL_NVARCHAR = 268, /* NVARCHAR */ + SQL_RESTRICT = 269, /* RESTRICT */ + SQL_TRUNCATE = 270, /* TRUNCATE */ + SQL_ANALYZE = 271, /* ANALYZE */ + SQL_BETWEEN = 272, /* BETWEEN */ + SQL_CASCADE = 273, /* CASCADE */ + SQL_COLUMNS = 274, /* COLUMNS */ + SQL_CONTROL = 275, /* CONTROL */ + SQL_DEFAULT = 276, /* DEFAULT */ + SQL_EXECUTE = 277, /* EXECUTE */ + SQL_EXPLAIN = 278, /* EXPLAIN */ + SQL_INTEGER = 279, /* INTEGER */ + SQL_NATURAL = 280, /* NATURAL */ + SQL_PREPARE = 281, /* PREPARE */ + SQL_PRIMARY = 282, /* PRIMARY */ + SQL_SCHEMAS = 283, /* SCHEMAS */ + SQL_CHARACTER = 284, /* CHARACTER */ + SQL_VARYING = 285, /* VARYING */ + SQL_REAL = 286, /* REAL */ + SQL_DECIMAL = 287, /* DECIMAL */ + SQL_SPATIAL = 288, /* SPATIAL */ + SQL_VARCHAR = 289, /* VARCHAR */ + SQL_VIRTUAL = 290, /* VIRTUAL */ + SQL_DESCRIBE = 291, /* DESCRIBE */ + SQL_BEFORE = 292, /* BEFORE */ + SQL_COLUMN = 293, /* COLUMN */ + SQL_CREATE = 294, /* CREATE */ + SQL_DELETE = 295, /* DELETE */ + SQL_DIRECT = 296, /* DIRECT */ + SQL_DOUBLE = 297, /* DOUBLE */ + SQL_ESCAPE = 298, /* ESCAPE */ + SQL_EXCEPT = 299, /* EXCEPT */ + SQL_EXISTS = 300, /* EXISTS */ + SQL_EXTRACT = 301, /* EXTRACT */ + SQL_CAST = 302, /* CAST */ + SQL_FORMAT = 303, /* FORMAT */ + SQL_GLOBAL = 304, /* GLOBAL */ + SQL_HAVING = 305, /* HAVING */ + SQL_IMPORT = 306, /* IMPORT */ + SQL_INSERT = 307, /* INSERT */ + SQL_ISNULL = 308, /* ISNULL */ + SQL_OFFSET = 309, /* OFFSET */ + SQL_RENAME = 310, /* RENAME */ + SQL_SCHEMA = 311, /* SCHEMA */ + SQL_SELECT = 312, /* SELECT */ + SQL_SORTED = 313, /* SORTED */ + SQL_TABLES = 314, /* TABLES */ + SQL_UNIQUE = 315, /* UNIQUE */ + SQL_UNLOAD = 316, /* UNLOAD */ + SQL_UPDATE = 317, /* UPDATE */ + SQL_VALUES = 318, /* VALUES */ + SQL_AFTER = 319, /* AFTER */ + SQL_ALTER = 320, /* ALTER */ + SQL_CROSS = 321, /* CROSS */ + SQL_DELTA = 322, /* DELTA */ + SQL_FLOAT = 323, /* FLOAT */ + SQL_GROUP = 324, /* GROUP */ + SQL_INDEX = 325, /* INDEX */ + SQL_INNER = 326, /* INNER */ + SQL_LIMIT = 327, /* LIMIT */ + SQL_LOCAL = 328, /* LOCAL */ + SQL_MERGE = 329, /* MERGE */ + SQL_MINUS = 330, /* MINUS */ + SQL_ORDER = 331, /* ORDER */ + SQL_OUTER = 332, /* OUTER */ + SQL_RIGHT = 333, /* RIGHT */ + SQL_TABLE = 334, /* TABLE */ + SQL_UNION = 335, /* UNION */ + SQL_USING = 336, /* USING */ + SQL_WHERE = 337, /* WHERE */ + SQL_CALL = 338, /* CALL */ + SQL_CASE = 339, /* CASE */ + SQL_CHAR = 340, /* CHAR */ + SQL_COPY = 341, /* COPY */ + SQL_DATE = 342, /* DATE */ + SQL_DATETIME = 343, /* DATETIME */ + SQL_DESC = 344, /* DESC */ + SQL_DROP = 345, /* DROP */ + SQL_ELSE = 346, /* ELSE */ + SQL_FILE = 347, /* FILE */ + SQL_FROM = 348, /* FROM */ + SQL_FULL = 349, /* FULL */ + SQL_HASH = 350, /* HASH */ + SQL_HINT = 351, /* HINT */ + SQL_INTO = 352, /* INTO */ + SQL_JOIN = 353, /* JOIN */ + SQL_LEFT = 354, /* LEFT */ + SQL_LIKE = 355, /* LIKE */ + SQL_LOAD = 356, /* LOAD */ + SQL_LONG = 357, /* LONG */ + SQL_NULL = 358, /* NULL */ + SQL_PLAN = 359, /* PLAN */ + SQL_SHOW = 360, /* SHOW */ + SQL_TEXT = 361, /* TEXT */ + SQL_THEN = 362, /* THEN */ + SQL_TIME = 363, /* TIME */ + SQL_VIEW = 364, /* VIEW */ + SQL_WHEN = 365, /* WHEN */ + SQL_WITH = 366, /* WITH */ + SQL_ADD = 367, /* ADD */ + SQL_ALL = 368, /* ALL */ + SQL_AND = 369, /* AND */ + SQL_ASC = 370, /* ASC */ + SQL_END = 371, /* END */ + SQL_FOR = 372, /* FOR */ + SQL_INT = 373, /* INT */ + SQL_KEY = 374, /* KEY */ + SQL_NOT = 375, /* NOT */ + SQL_OFF = 376, /* OFF */ + SQL_SET = 377, /* SET */ + SQL_TOP = 378, /* TOP */ + SQL_AS = 379, /* AS */ + SQL_BY = 380, /* BY */ + SQL_IF = 381, /* IF */ + SQL_IN = 382, /* IN */ + SQL_IS = 383, /* IS */ + SQL_OF = 384, /* OF */ + SQL_ON = 385, /* ON */ + SQL_OR = 386, /* OR */ + SQL_TO = 387, /* TO */ + SQL_ARRAY = 388, /* ARRAY */ + SQL_CONCAT = 389, /* CONCAT */ + SQL_ILIKE = 390, /* ILIKE */ + SQL_SECOND = 391, /* SECOND */ + SQL_MINUTE = 392, /* MINUTE */ + SQL_HOUR = 393, /* HOUR */ + SQL_DAY = 394, /* DAY */ + SQL_MONTH = 395, /* MONTH */ + SQL_YEAR = 396, /* YEAR */ + SQL_TRUE = 397, /* TRUE */ + SQL_FALSE = 398, /* FALSE */ + SQL_TRANSACTION = 399, /* TRANSACTION */ + SQL_BEGIN = 400, /* BEGIN */ + SQL_COMMIT = 401, /* COMMIT */ + SQL_ROLLBACK = 402, /* ROLLBACK */ + SQL_EQUALS = 403, /* EQUALS */ + SQL_NOTEQUALS = 404, /* NOTEQUALS */ + SQL_LESS = 405, /* LESS */ + SQL_GREATER = 406, /* GREATER */ + SQL_LESSEQ = 407, /* LESSEQ */ + SQL_GREATEREQ = 408, /* GREATEREQ */ + SQL_NOTNULL = 409, /* NOTNULL */ + SQL_UMINUS = 410 /* UMINUS */ }; + typedef enum hsql_tokentype hsql_token_kind_t; #endif /* Value type. */ @@ -294,7 +300,7 @@ union HSQL_STYPE std::vector* with_description_vec; std::vector* table_key_constraint_vec; -#line 297 "bison_parser.h" +#line 304 "bison_parser.h" }; typedef union HSQL_STYPE HSQL_STYPE; diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 3f704e41..20b9ddfe 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -632,8 +632,8 @@ drop_statement: } | DROP INDEX opt_exists index_name ON table_name { $$ = new DropStatement(kDropIndex); - $$->name = $5.name; - $$->ifExists = $3 + $$->name = $6.name; + $$->ifExists = $3; $$->index_name = $4; } ; From b8a2892aa52751a10b6aeeb8e1f15556dd75098e Mon Sep 17 00:00:00 2001 From: Moritz Spranger Date: Sun, 18 Jul 2021 12:20:50 +0200 Subject: [PATCH 27/73] Add Tests --- src/parser/bison_parser.y | 8 +++++++- src/sql/AlterStatement.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index b67c856e..88a3d02a 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -629,14 +629,20 @@ opt_exists: ******************************/ alter_statement: - ALTER TABLE table_name DROP COLUMN column_name { + ALTER TABLE table_name DROP COLUMN opt_exists column_name { $$ = new AlterStatement(kAlterDropColumn); + $$->if_exists = $6; $$->schema = $3.schema; $$->name = $3.name; $$->column_name = $6->name; } ; +opt_exists: + IF EXISTS { $$ = true; } + | /* empty */ { $$ = false; } + ; + /****************************** * Delete Statement / Truncate statement * DELETE FROM students WHERE grade > 3.0 diff --git a/src/sql/AlterStatement.h b/src/sql/AlterStatement.h index 5a6238f6..b7f8940c 100755 --- a/src/sql/AlterStatement.h +++ b/src/sql/AlterStatement.h @@ -19,6 +19,7 @@ namespace hsql { AlterType type; char* schema; + bool if_exists; char* name; char* column_name; }; From 506b161e65acea44e2dfcbbf7ff9b9c244d67bda Mon Sep 17 00:00:00 2001 From: Moritz Spranger Date: Tue, 20 Jul 2021 18:17:34 +0200 Subject: [PATCH 28/73] Add sql translator tests for ALTER TABLE --- src/parser/bison_parser.cpp | 1617 +++++++++++++++++------------------ src/parser/bison_parser.y | 7 +- 2 files changed, 804 insertions(+), 820 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 1ffad7a3..3d70bd19 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -737,7 +737,7 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 67 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 842 +#define YYLAST 785 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 173 @@ -746,7 +746,7 @@ union yyalloc /* YYNRULES -- Number of rules. */ #define YYNRULES 273 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 508 +#define YYNSTATES 509 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 410 @@ -818,27 +818,27 @@ static const yytype_int16 yyrline[] = 462, 471, 485, 488, 493, 507, 520, 527, 534, 541, 552, 553, 557, 558, 562, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 585, - 586, 587, 597, 603, 609, 614, 622, 623, 632, 646, - 655, 668, 675, 686, 687, 697, 706, 707, 711, 723, - 727, 731, 745, 746, 749, 750, 761, 762, 766, 776, - 789, 796, 800, 804, 811, 814, 820, 832, 833, 837, - 841, 842, 846, 851, 852, 856, 861, 865, 866, 870, - 871, 875, 876, 880, 884, 885, 886, 892, 893, 897, - 898, 899, 900, 901, 902, 909, 910, 914, 915, 919, - 920, 924, 934, 935, 936, 937, 938, 942, 943, 944, - 945, 946, 947, 948, 949, 950, 951, 952, 956, 957, - 961, 962, 963, 964, 965, 969, 970, 971, 972, 973, - 974, 975, 976, 977, 978, 979, 983, 984, 988, 989, - 990, 991, 997, 998, 999, 1000, 1004, 1005, 1009, 1010, - 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1024, 1025, 1029, - 1033, 1037, 1038, 1039, 1040, 1041, 1042, 1046, 1050, 1054, - 1058, 1059, 1060, 1061, 1065, 1066, 1067, 1068, 1069, 1073, - 1077, 1078, 1082, 1083, 1087, 1091, 1095, 1107, 1108, 1118, - 1119, 1123, 1124, 1133, 1134, 1139, 1150, 1159, 1160, 1164, - 1165, 1169, 1174, 1175, 1180, 1181, 1186, 1187, 1192, 1193, - 1202, 1203, 1207, 1211, 1215, 1222, 1235, 1243, 1253, 1272, - 1273, 1274, 1275, 1276, 1277, 1278, 1279, 1280, 1281, 1286, - 1295, 1296, 1301, 1302 + 586, 587, 597, 603, 609, 614, 622, 623, 632, 647, + 656, 669, 676, 687, 688, 698, 707, 708, 712, 724, + 728, 732, 746, 747, 750, 751, 762, 763, 767, 777, + 790, 797, 801, 805, 812, 815, 821, 833, 834, 838, + 842, 843, 847, 852, 853, 857, 862, 866, 867, 871, + 872, 876, 877, 881, 885, 886, 887, 893, 894, 898, + 899, 900, 901, 902, 903, 910, 911, 915, 916, 920, + 921, 925, 935, 936, 937, 938, 939, 943, 944, 945, + 946, 947, 948, 949, 950, 951, 952, 953, 957, 958, + 962, 963, 964, 965, 966, 970, 971, 972, 973, 974, + 975, 976, 977, 978, 979, 980, 984, 985, 989, 990, + 991, 992, 998, 999, 1000, 1001, 1005, 1006, 1010, 1011, + 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1025, 1026, 1030, + 1034, 1038, 1039, 1040, 1041, 1042, 1043, 1047, 1051, 1055, + 1059, 1060, 1061, 1062, 1066, 1067, 1068, 1069, 1070, 1074, + 1078, 1079, 1083, 1084, 1088, 1092, 1096, 1108, 1109, 1119, + 1120, 1124, 1125, 1134, 1135, 1140, 1151, 1160, 1161, 1165, + 1166, 1170, 1175, 1176, 1181, 1182, 1187, 1188, 1193, 1194, + 1203, 1204, 1208, 1212, 1216, 1223, 1236, 1244, 1254, 1273, + 1274, 1275, 1276, 1277, 1278, 1279, 1280, 1281, 1282, 1287, + 1296, 1297, 1302, 1303 }; #endif @@ -941,7 +941,7 @@ static const yytype_int16 yytoknum[] = }; #endif -#define YYPACT_NINF (-324) +#define YYPACT_NINF (-310) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -955,57 +955,57 @@ static const yytype_int16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - 562, 10, 47, 62, 66, 47, -31, -2, 133, 70, - 47, 122, 47, 25, 39, 211, 83, 83, 83, 234, - 76, -324, 136, -324, 136, -324, -324, -324, -324, -324, - -324, -324, -324, -324, -324, -324, -324, -36, -324, 261, - 101, -324, 106, 184, -324, 279, 165, 165, 47, 290, - 47, 183, -324, 47, -49, 304, 199, 199, 47, -324, - 206, 161, -324, -324, -324, -324, -324, -324, 463, -324, - 235, -324, -324, 210, -36, 31, -324, 26, -324, 331, - 18, 338, -324, 165, 215, 47, 47, 268, -324, 251, - 185, 348, 265, 349, 349, -324, 227, 314, 47, 47, - -324, 194, 211, -324, 197, 359, 355, 200, 201, -324, - -324, -324, -36, 258, 247, -36, 108, -324, -324, -324, - -324, -324, -324, -324, -324, 205, 207, -324, -324, -324, - -324, -324, -324, -324, -324, -324, 244, 337, -64, 185, - 263, -324, 349, 373, 167, 236, -55, -324, 347, 276, - -324, 276, 47, -324, -324, -324, -324, -324, 385, -324, - -324, 263, -324, -324, 313, -324, -324, 31, -324, -324, - 263, 313, 263, 152, -324, -324, 18, 47, -324, 388, - 281, 390, 270, -40, 228, 230, 231, 203, 334, 237, - 404, -324, 257, -68, 431, -324, -324, -324, -324, -324, - -324, -324, -324, -324, -324, -324, -324, -324, -324, -324, - -324, 306, -324, -54, 245, -324, 263, 348, -324, 13, - 353, -324, -324, -324, 246, -3, -324, 311, 240, -324, - 71, 108, -36, 243, -324, -47, 108, -68, 365, -26, - -324, 248, 328, -324, 724, 86, -324, 281, 14, 16, - 368, 160, 263, 263, -69, 109, 259, 404, 495, 263, - 79, 260, -50, 263, 263, 404, -324, 404, 64, 264, - 5, 404, 404, 404, 404, 404, 404, 404, 404, 404, - 404, 404, 404, 404, 404, 404, 359, 47, -324, 430, - 18, -68, -324, 267, -324, 290, 18, -324, 385, 12, - 268, -324, 263, -324, 437, -324, -324, -324, -324, 263, - -324, -324, -324, -324, 263, 263, 373, 349, -324, 411, - -324, 277, 278, -324, -324, 280, -324, -324, -324, -324, - -324, -324, 67, -324, 390, -324, -324, 263, -324, -324, - 266, -324, -324, -324, -324, -324, -324, 350, 72, -22, - 113, 263, 263, -324, 368, 346, 87, -324, -324, -324, - 335, 563, 582, 404, 285, 257, -324, 354, 288, 582, - 582, 582, 582, 618, 618, 618, 618, 79, 79, 29, - 29, 29, -37, 292, -324, -324, 88, -324, 103, -324, - 281, -324, -5, -324, 291, -324, 28, -324, 387, -324, - -324, -324, -68, -68, 112, -324, 294, 453, 458, 459, - -324, 363, -324, -324, 118, -324, 263, 724, 263, 263, - -324, 102, 74, 300, -324, 404, 582, 257, 301, 147, - -324, -324, -324, -324, 303, 374, -324, -324, -324, 396, - 397, 398, 381, 12, 477, -324, -324, -324, 356, -324, - -324, 476, 312, 318, 319, -324, -324, -35, 322, -68, - 121, -324, 263, -324, 495, 324, 149, -324, -324, 28, - 12, -324, -324, -324, 12, 250, 329, 263, 327, 491, - -324, -324, -324, -324, -324, -68, -324, -324, -324, -324, - 361, 373, -12, -324, 330, 333, 263, 158, 263, -324, - -324, 13, -68, -324, -324, -68, 336, -324 + 530, 13, 37, 112, 128, 37, -5, 82, 98, 93, + 37, 127, 37, 147, 4, 237, 109, 109, 109, 254, + 104, -310, 189, -310, 189, -310, -310, -310, -310, -310, + -310, -310, -310, -310, -310, -310, -310, -35, -310, 282, + 143, -310, 152, 224, -310, 321, 199, 199, 37, 323, + 37, 212, -310, 37, -57, 332, 210, 210, 37, -310, + 220, 183, -310, -310, -310, -310, -310, -310, 525, -310, + 262, -310, -310, 240, -35, 26, -310, 29, -310, 365, + 14, 366, -310, 199, 249, 37, 37, 289, -310, 283, + 207, 373, 288, 375, 375, -310, 252, 338, 37, 37, + -310, 217, 237, -310, 221, 381, 379, 227, 228, -310, + -310, -310, -35, 285, 276, -35, 15, -310, -310, -310, + -310, -310, -310, -310, -310, 234, 235, -310, -310, -310, + -310, -310, -310, -310, -310, -310, 278, 364, -64, 207, + 257, -310, 375, 407, -13, 263, -55, -310, 374, 303, + -310, 303, 37, -310, -310, -310, -310, -310, 410, -310, + -310, 257, -310, -310, 339, -310, -310, 26, -310, -310, + 257, 339, 257, 92, -310, -310, 14, 37, -310, 416, + 312, 423, 304, 30, 260, 264, 265, 155, 302, 268, + 334, -310, 124, 116, 368, -310, -310, -310, -310, -310, + -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, + -310, 333, -310, -46, 267, -310, 257, 373, -310, 210, + 388, -310, -310, -310, 271, 118, -310, 346, 269, -310, + 63, 15, -35, 270, -310, -47, 15, 116, 389, -20, + -310, 275, 354, -310, 659, 142, -310, 312, 16, 22, + 390, 192, 257, 257, -32, 97, 281, 334, 561, 257, + 108, 284, -77, 257, 257, 334, -310, 334, -42, 286, + 130, 334, 334, 334, 334, 334, 334, 334, 334, 334, + 334, 334, 334, 334, 334, 334, 381, 37, -310, 446, + 14, 116, -310, 23, 323, 14, -310, 410, 18, 289, + -310, 257, -310, 447, -310, -310, -310, -310, 257, -310, + -310, -310, -310, 257, 257, 407, 375, -310, 421, -310, + 290, 291, -310, -310, 292, -310, -310, -310, -310, -310, + -310, 191, -310, 423, -310, -310, 257, -310, -310, 287, + -310, -310, -310, -310, -310, -310, 367, 114, 89, 133, + 257, 257, -310, 390, 363, 27, -310, -310, -310, 350, + 504, 580, 334, 298, 124, -310, 369, 305, 580, 580, + 580, 580, 620, 620, 620, 620, 108, 108, -44, -44, + -44, -103, 307, -310, -310, 150, 306, -310, -310, 174, + -310, 312, -310, 138, -310, 300, -310, 38, -310, 409, + -310, -310, -310, 116, 116, 175, -310, 313, 473, 475, + 476, -310, 380, -310, -310, 182, -310, 257, 659, 257, + 257, -310, 162, 141, 316, -310, 334, 580, 124, 317, + 184, -310, -310, -310, -310, 318, 391, -310, -310, -310, + 413, 414, 415, 399, 18, 484, -310, -310, -310, 382, + -310, -310, 492, 328, 336, 337, -310, -310, -50, 340, + 116, 185, -310, 257, -310, 561, 341, 194, -310, -310, + 38, 18, -310, -310, -310, 18, 295, 343, 257, 344, + 494, -310, -310, -310, -310, -310, 116, -310, -310, -310, + -310, 326, 407, -7, -310, 345, 347, 257, 196, 257, + -310, -310, 23, 116, -310, -310, 116, 353, -310 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -1034,7 +1034,7 @@ static const yytype_int16 yydefact[] = 251, 0, 0, 210, 0, 0, 0, 0, 0, 0, 0, 212, 0, 113, 142, 149, 150, 151, 144, 146, 152, 145, 165, 153, 154, 155, 156, 148, 143, 158, - 159, 0, 272, 0, 0, 82, 0, 0, 85, 0, + 159, 0, 272, 0, 0, 82, 0, 0, 85, 77, 0, 36, 41, 75, 24, 0, 22, 111, 109, 135, 249, 134, 0, 119, 121, 126, 134, 130, 132, 129, 140, 0, 0, 47, 0, 0, 52, 251, 108, 0, @@ -1042,44 +1042,44 @@ static const yytype_int16 yydefact[] = 160, 0, 0, 0, 0, 0, 162, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 0, - 0, 88, 87, 210, 78, 0, 0, 20, 0, 0, - 114, 110, 0, 247, 0, 248, 141, 91, 95, 0, - 125, 124, 123, 99, 0, 0, 0, 0, 56, 0, - 61, 0, 0, 60, 58, 0, 68, 67, 57, 65, - 66, 55, 71, 46, 0, 49, 197, 0, 211, 213, - 0, 201, 202, 203, 204, 205, 206, 0, 0, 0, - 0, 0, 0, 184, 0, 0, 0, 157, 147, 176, - 177, 0, 172, 0, 0, 0, 163, 0, 175, 174, - 190, 191, 192, 193, 194, 195, 196, 167, 166, 169, - 168, 170, 171, 0, 35, 273, 0, 39, 0, 23, - 251, 112, 227, 229, 0, 231, 245, 230, 116, 136, - 246, 122, 133, 131, 0, 45, 0, 0, 0, 0, - 69, 0, 54, 53, 0, 188, 0, 0, 0, 0, - 182, 0, 0, 0, 207, 0, 173, 0, 0, 0, - 164, 208, 81, 25, 0, 0, 267, 259, 265, 263, - 266, 261, 0, 0, 0, 244, 235, 242, 0, 106, - 48, 0, 0, 0, 0, 70, 198, 0, 0, 186, - 0, 185, 0, 189, 209, 0, 0, 180, 178, 245, - 0, 262, 264, 260, 0, 228, 246, 0, 0, 0, - 62, 64, 199, 200, 183, 187, 181, 179, 232, 256, - 268, 0, 118, 63, 0, 0, 0, 0, 0, 115, - 59, 0, 269, 257, 243, 117, 0, 258 + 0, 88, 87, 0, 0, 0, 20, 0, 0, 114, + 110, 0, 247, 0, 248, 141, 91, 95, 0, 125, + 124, 123, 99, 0, 0, 0, 0, 56, 0, 61, + 0, 0, 60, 58, 0, 68, 67, 57, 65, 66, + 55, 71, 46, 0, 49, 197, 0, 211, 213, 0, + 201, 202, 203, 204, 205, 206, 0, 0, 0, 0, + 0, 0, 184, 0, 0, 0, 157, 147, 176, 177, + 0, 172, 0, 0, 0, 163, 0, 175, 174, 190, + 191, 192, 193, 194, 195, 196, 167, 166, 169, 168, + 170, 171, 0, 35, 273, 0, 210, 78, 39, 0, + 23, 251, 112, 227, 229, 0, 231, 245, 230, 116, + 136, 246, 122, 133, 131, 0, 45, 0, 0, 0, + 0, 69, 0, 54, 53, 0, 188, 0, 0, 0, + 0, 182, 0, 0, 0, 207, 0, 173, 0, 0, + 0, 164, 208, 81, 25, 0, 0, 267, 259, 265, + 263, 266, 261, 0, 0, 0, 244, 235, 242, 0, + 106, 48, 0, 0, 0, 0, 70, 198, 0, 0, + 186, 0, 185, 0, 189, 209, 0, 0, 180, 178, + 245, 0, 262, 264, 260, 0, 228, 246, 0, 0, + 0, 62, 64, 199, 200, 183, 187, 181, 179, 232, + 256, 268, 0, 118, 63, 0, 0, 0, 0, 0, + 115, 59, 0, 269, 257, 243, 117, 0, 258 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -324, -324, -324, 440, -324, 481, -324, 212, -324, 166, - -324, -324, -324, -324, 214, -85, 360, -324, -324, -324, - 43, -324, 178, 96, -324, -324, 460, -324, -324, -324, - -324, 377, -324, -324, 302, -170, -97, -324, 6, -73, - -52, -324, -324, -78, 272, -324, -324, -324, -129, -324, - -324, 46, -324, 209, -324, -324, 7, -255, -324, -45, - 219, -140, -135, -324, -324, -324, -324, -324, -324, 269, - -324, -324, -324, -324, -324, -324, -324, -324, -324, -217, - -75, -86, -324, -324, -93, -324, -324, -324, -323, 52, - -324, -324, -324, 1, -324, -324, -324, 57, 297, -324, - -324, -324, -324, 427, -324, -324, -324, -324, -302 + -310, -310, -310, 443, -310, 491, -310, 225, -310, 75, + -310, -310, -310, -310, 241, -93, 383, -310, -310, -310, + 24, -310, 203, 120, -310, -310, -40, -310, -310, -310, + -310, 400, -310, -310, 324, -170, -99, -310, 9, -72, + -53, -310, -310, -67, 294, -310, -310, -310, -132, -310, + -310, -85, -310, 236, -310, -310, 10, -256, -310, -8, + 242, -140, -131, -310, -310, -310, -310, -310, -310, 296, + -310, -310, -310, -310, -310, -310, -310, -310, -310, -284, + -76, -87, -310, -310, -94, -310, -310, -310, -309, 77, + -310, -310, -310, 3, -310, -310, -310, 76, 319, -310, + -310, -310, -310, 451, -310, -310, -310, -310, -303 }; /* YYDEFGOTO[NTERM-NUM]. */ @@ -1087,15 +1087,15 @@ static const yytype_int16 yydefgoto[] = { 0, 19, 20, 21, 22, 71, 225, 226, 23, 64, 24, 135, 25, 26, 89, 149, 221, 27, 28, 29, - 85, 245, 246, 332, 412, 30, 98, 31, 32, 33, + 85, 245, 246, 331, 413, 30, 98, 31, 32, 33, 34, 144, 35, 146, 147, 36, 164, 165, 166, 76, - 112, 113, 169, 77, 161, 227, 300, 301, 141, 449, - 499, 116, 233, 234, 312, 106, 174, 228, 125, 126, + 112, 113, 169, 77, 161, 227, 299, 300, 141, 450, + 500, 116, 233, 234, 311, 106, 174, 228, 125, 126, 229, 230, 194, 195, 196, 197, 198, 199, 200, 255, - 201, 202, 203, 204, 205, 347, 206, 207, 208, 209, - 210, 128, 129, 130, 131, 132, 133, 391, 392, 393, - 394, 395, 51, 396, 83, 96, 445, 446, 447, 306, - 37, 38, 61, 62, 397, 442, 503, 69, 213 + 201, 202, 203, 204, 205, 346, 206, 207, 208, 209, + 210, 128, 129, 130, 131, 132, 133, 392, 393, 394, + 395, 396, 51, 397, 83, 96, 446, 447, 448, 305, + 37, 38, 61, 62, 398, 443, 504, 69, 213 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1103,180 +1103,168 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 193, 108, 294, 41, 356, 127, 44, 150, 150, 151, - 243, 52, 159, 54, 404, 40, 293, 218, 171, 338, - 435, 73, 118, 119, 120, 115, 160, 140, 315, 179, - 235, 303, 237, 239, 167, 109, 39, 167, 498, 45, - 109, 253, 310, 75, 93, 263, 263, 254, 46, 87, - 40, 90, 262, 258, 92, 260, 150, 211, 58, 100, - 180, 436, 264, 264, 263, 42, 437, 263, 311, 43, - 110, 215, 438, 439, 303, 110, 291, 335, 47, 263, - 107, 264, 414, 94, 264, 418, 138, 139, 263, 440, - 86, 48, 263, -268, 441, 55, 264, 271, 59, 154, - 155, 240, 114, 181, 56, 264, 111, 156, 366, 264, - 429, 111, 348, 349, 288, 232, 217, 289, 358, 261, - 475, 121, 258, 359, 360, 367, 136, 248, 286, 249, - 361, 74, 362, 482, 57, 308, 368, 369, 370, 371, - 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, - 382, 490, 444, 223, 167, 183, 118, 119, 120, 302, - 122, 123, 172, 271, 363, 297, -233, 50, 298, 235, - 410, 398, 466, 191, 402, 403, 339, 340, 241, 390, - 173, 462, 336, 65, 66, 263, 263, 411, 263, 497, - 124, 364, 285, 383, 286, 304, 417, 184, 185, 186, - 351, 53, 264, 264, 419, 264, 183, 118, 119, 120, - 231, 421, 422, 271, 60, 127, 263, 236, 461, 352, - 434, 127, 492, 352, 73, 353, 49, 63, 426, 420, - 214, 150, 405, 264, 67, 263, 187, 484, 307, 282, - 283, 284, 285, 313, 286, 386, 68, 70, 184, 185, - 186, 388, 264, 424, 333, 121, 432, 334, 302, 176, - 183, 118, 119, 120, 78, 238, 183, 118, 119, 120, - 79, 433, 188, 80, 176, 435, 457, 81, 459, 460, - 450, 423, 82, 289, 506, 189, 456, 187, 384, 302, - 464, 84, 428, 88, 122, 123, 341, 342, 343, 344, - 345, 346, 184, 185, 186, 91, 121, 95, 184, 185, - 186, 190, 191, 253, 73, 468, 436, 487, 302, 192, - 302, 437, 485, 188, 124, 97, 504, 438, 439, 289, - 101, 104, 102, 105, 117, 137, 189, 183, 118, 119, - 120, 187, 134, 142, 440, 122, 123, 187, -268, 441, - 140, 145, 143, 118, 465, 148, 502, 152, 505, 153, - 121, 74, 190, 191, 158, 120, 121, 160, 162, 163, - 192, 168, 170, 175, 177, 124, 212, 188, 176, 256, - 185, 186, 178, 188, 216, 219, 435, 220, 224, 114, - 189, 242, 15, 244, 247, 250, 189, 251, 252, 122, - 123, 295, 259, 287, 299, 122, 123, 183, 118, 119, - 120, 302, 290, 296, 309, 316, 190, 191, 187, 314, - 317, -234, 190, 191, 192, 73, 354, 436, 357, 124, - 192, 365, 437, 385, 415, 124, 249, 121, 438, 439, - 400, 406, 495, 416, 407, 408, 363, 409, 265, 263, - 185, 186, 427, 286, 257, 440, 448, 430, 431, 452, - 441, 451, 443, -270, 453, 454, 455, 189, 463, 467, - 1, 469, 470, 471, 472, 473, 122, 123, 2, 474, - 476, 477, 478, 479, 266, 3, 480, 481, 187, 4, - 483, 496, 486, 190, 191, 493, 491, 494, 500, 5, - 501, 192, 6, 7, 507, 72, 124, 121, 103, 387, - 389, 222, 413, 458, 8, 9, 182, 99, 401, 292, - 337, 399, 489, 350, 257, 10, 488, 305, 11, 157, - 0, 267, 0, 0, 0, 0, 0, 189, 0, 0, - 0, 0, 0, 0, 0, 0, 122, 123, 266, 12, - 0, 268, 0, 13, 0, 0, 0, 0, 269, 270, - 0, 0, 0, 190, 191, 271, 272, 0, 14, 1, - 0, 192, 0, 0, 15, 0, 124, 2, 0, 273, - 274, 275, 276, 277, 3, 0, 278, 279, 4, 280, - 281, 282, 283, 284, 285, 267, 286, 0, 5, 0, - 0, 6, 7, 0, 0, 0, 0, 0, 16, 17, - 18, 0, 0, 8, 9, 355, 266, 0, 0, 0, - 0, 0, 0, 270, 10, 0, 0, 11, 0, 271, - 272, 0, 0, 0, 0, 266, 0, 0, 0, 0, - 0, 0, 0, 273, 274, 275, 276, 277, 12, 0, - 278, 279, 13, 280, 281, 282, 283, 284, 285, 0, - 286, 0, 0, 267, 0, 0, 0, 14, 0, 0, - 0, 266, 0, 15, 0, 0, 0, 425, 0, 0, - 0, 0, -271, 355, 0, 0, 0, 0, 0, 0, - 0, 270, 0, 0, 0, 0, 0, 271, 272, 0, - 0, 0, 0, 0, 0, 0, 0, 16, 17, 18, - 270, 273, 274, 275, 276, 277, 271, -271, 278, 279, - 0, 280, 281, 282, 283, 284, 285, 0, 286, 0, - -271, -271, -271, 276, 277, 0, 0, 278, 279, 0, - 280, 281, 282, 283, 284, 285, 270, 286, 318, 0, - 0, 0, 271, 319, 0, 320, 321, 0, 322, 0, - 0, 0, 0, 0, 0, 0, 323, 0, 0, -271, - -271, 0, 0, -271, -271, 0, 280, 281, 282, 283, - 284, 285, 0, 286, 0, 0, 0, 0, 0, 0, - 0, 0, 324, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 325, - 0, 326, 327, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 328, 0, 0, 0, - 329, 0, 330, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 331 + 193, 151, 108, 355, 127, 41, 150, 150, 44, 387, + 243, 159, 405, 52, 218, 54, 171, 99, 118, 119, + 120, 40, 73, 58, 115, 337, 386, 140, 160, 179, + 235, 271, 237, 239, 314, 109, 93, 263, 109, 39, + 40, 302, 309, 499, 73, 167, 75, 254, 167, 211, + 214, 87, 262, 90, 264, 150, 92, 258, 362, 260, + 180, 100, 286, 59, 263, 45, 302, 263, 310, 172, + 110, 86, 215, 110, 46, 94, 291, 334, 253, 231, + 415, 264, 263, 107, 264, 363, 236, 173, 138, 139, + 271, 357, 65, 66, 263, 183, 118, 119, 120, 264, + 240, 154, 155, 181, 47, 114, 111, 136, 430, 111, + 156, 264, 347, 348, 232, 42, 217, 121, 483, 285, + 261, 286, 288, 358, 359, 289, 258, 183, 118, 119, + 120, 43, 74, 307, 360, 476, 361, 184, 185, 186, + 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, + 377, 378, 379, 380, 381, 223, 122, 123, 183, 118, + 119, 120, 445, 436, 301, 167, 491, 399, 235, 184, + 185, 186, 467, 403, 404, 48, 187, 263, 339, 293, + 241, 73, 338, 191, 335, 391, 124, 303, 350, 498, + 50, 49, 382, 425, 264, 121, 419, 248, 301, 249, + 184, 185, 186, 263, 437, 238, 53, 351, 187, 438, + 422, 423, 188, 352, 127, 439, 440, 55, 507, 127, + 264, 435, 493, 406, 420, 189, 56, 121, 263, 150, + 263, 427, 441, 365, 122, 123, -268, 442, 418, 187, + 60, 306, 271, 351, 188, 264, 312, 264, 463, 421, + 366, 190, 191, 63, 67, 263, 57, 189, 121, 192, + 183, 118, 119, 120, 124, 253, 122, 123, 282, 283, + 284, 285, 264, 286, 68, 188, 263, 458, 462, 460, + 461, 424, 385, 190, 191, 78, 296, 389, 189, 297, + 383, 192, 429, 264, 411, 465, 124, 122, 123, 263, + 70, 485, 184, 185, 186, 183, 118, 119, 120, -233, + 332, 412, 79, 333, 190, 191, 264, 81, 433, 80, + 436, 176, 192, 486, 82, 84, 88, 124, 340, 341, + 342, 343, 344, 345, 91, 95, 97, 183, 118, 119, + 120, 187, 434, 451, 101, 176, 289, 256, 185, 186, + 457, 436, 469, 301, 102, 301, 466, 503, 104, 506, + 121, 437, 488, 105, 505, 301, 438, 289, 117, 137, + 134, 140, 439, 440, 143, 142, 145, 188, 148, 118, + 185, 186, 152, 153, 74, 265, 187, 120, 158, 441, + 189, 160, 437, -268, 442, 162, 163, 438, 168, 122, + 123, 170, 175, 439, 440, 121, 176, 496, 177, 178, + 212, 216, 219, 224, 220, 114, 190, 191, 187, 242, + 441, 266, 257, 15, 192, 442, 244, 250, 247, 124, + 287, 251, 252, 259, 290, 189, 294, 121, 295, 298, + 301, 308, 315, 313, 122, 123, 316, 73, 353, 384, + 401, 407, 356, 364, 257, 416, 497, 408, 409, 410, + 417, 190, 191, 362, 263, 428, -234, 189, 267, 192, + 286, 444, 431, 432, 124, 249, 122, 123, 449, 453, + 452, 454, 455, 456, 464, 468, 470, 477, 268, 471, + 472, 473, 474, 190, 191, 269, 270, 475, 479, 480, + 495, 192, 271, 272, 481, 482, 124, 478, 484, 487, + 492, 103, 494, 501, 502, 72, 273, 274, 275, 276, + 277, 508, 390, 278, 279, -270, 280, 281, 282, 283, + 284, 285, 1, 286, 222, 388, 414, 1, 459, 182, + 2, 292, 336, 400, 402, 2, 489, 3, 490, 304, + 349, 4, 3, 157, 0, 0, 4, 266, 0, 0, + 0, 5, 0, 0, 6, 7, 5, 0, 0, 6, + 7, 0, 0, 0, 0, 0, 8, 9, 0, 0, + 0, 8, 9, 0, 0, 0, 0, 10, 0, 0, + 11, 0, 10, 0, 0, 11, 0, 0, 0, 0, + 0, 0, 0, 0, 267, 0, 0, 0, 0, 0, + 0, 12, 0, 0, 266, 13, 12, 0, 426, 0, + 13, 0, 0, 0, 354, 0, 0, 0, 0, 0, + 14, 0, 270, 266, 0, 14, 15, 0, 271, 272, + 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 273, 274, 275, 276, 277, 0, 0, 278, + 279, 267, 280, 281, 282, 283, 284, 285, 0, 286, + 16, 17, 18, 266, 0, 16, 17, 18, 0, 0, + -271, 354, 0, 317, 0, 0, 0, 0, 318, 270, + 319, 320, 0, 321, 0, 271, 272, 0, 0, 0, + 0, 322, 0, 0, 0, 0, 0, 0, 270, 273, + 274, 275, 276, 277, 271, -271, 278, 279, 0, 280, + 281, 282, 283, 284, 285, 0, 286, 323, -271, -271, + -271, 276, 277, 0, 0, 278, 279, 0, 280, 281, + 282, 283, 284, 285, 324, 286, 325, 326, 270, 0, + 0, 0, 0, 0, 271, 0, 0, 0, 0, 0, + 0, 327, 0, 0, 0, 328, 0, 329, 0, 0, + 0, -271, -271, 0, 0, -271, -271, 330, 280, 281, + 282, 283, 284, 285, 0, 286 }; static const yytype_int16 yycheck[] = { - 140, 74, 219, 2, 259, 80, 5, 93, 94, 94, - 180, 10, 105, 12, 316, 3, 3, 146, 115, 3, - 25, 57, 4, 5, 6, 77, 12, 82, 54, 93, - 170, 3, 172, 173, 112, 9, 26, 115, 50, 70, - 9, 110, 89, 37, 93, 114, 114, 187, 79, 48, - 3, 50, 192, 188, 53, 190, 142, 142, 19, 58, - 124, 66, 131, 131, 114, 3, 71, 114, 115, 3, - 44, 144, 77, 78, 3, 44, 216, 247, 109, 114, - 74, 131, 337, 132, 131, 107, 85, 86, 114, 94, - 47, 93, 114, 98, 99, 70, 131, 134, 59, 98, - 99, 176, 76, 167, 79, 131, 80, 101, 103, 131, - 365, 80, 252, 253, 168, 167, 171, 171, 168, 192, - 443, 103, 257, 263, 264, 120, 83, 167, 165, 169, - 265, 167, 267, 168, 109, 232, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 474, 124, 152, 232, 3, 4, 5, 6, 171, - 142, 143, 54, 134, 100, 168, 171, 97, 171, 309, - 103, 300, 427, 160, 314, 315, 160, 250, 177, 167, - 72, 107, 168, 17, 18, 114, 114, 120, 114, 491, - 172, 127, 163, 286, 165, 124, 124, 45, 46, 47, - 91, 79, 131, 131, 91, 131, 3, 4, 5, 6, - 164, 351, 352, 134, 3, 290, 114, 171, 116, 110, - 390, 296, 477, 110, 57, 116, 93, 144, 363, 116, - 63, 317, 317, 131, 0, 114, 84, 116, 231, 160, - 161, 162, 163, 236, 165, 290, 170, 111, 45, 46, - 47, 296, 131, 166, 168, 103, 168, 171, 171, 171, - 3, 4, 5, 6, 3, 113, 3, 4, 5, 6, - 169, 168, 120, 167, 171, 25, 416, 93, 418, 419, - 168, 354, 3, 171, 501, 133, 168, 84, 287, 171, - 425, 126, 365, 3, 142, 143, 136, 137, 138, 139, - 140, 141, 45, 46, 47, 122, 103, 3, 45, 46, - 47, 159, 160, 110, 57, 168, 66, 168, 171, 167, - 171, 71, 462, 120, 172, 126, 168, 77, 78, 171, - 124, 96, 171, 123, 3, 120, 133, 3, 4, 5, - 6, 84, 4, 92, 94, 142, 143, 84, 98, 99, - 82, 3, 167, 4, 427, 90, 496, 130, 498, 45, - 103, 167, 159, 160, 167, 6, 103, 12, 168, 168, - 167, 113, 125, 168, 130, 172, 3, 120, 171, 45, - 46, 47, 45, 120, 148, 38, 25, 111, 3, 76, - 133, 3, 111, 3, 124, 167, 133, 167, 167, 142, - 143, 48, 165, 97, 93, 142, 143, 3, 4, 5, - 6, 171, 167, 167, 171, 167, 159, 160, 84, 54, - 92, 171, 159, 160, 167, 57, 167, 66, 168, 172, - 167, 167, 71, 3, 168, 172, 169, 103, 77, 78, - 3, 30, 81, 93, 167, 167, 100, 167, 17, 114, - 46, 47, 167, 165, 120, 94, 69, 103, 166, 6, - 99, 167, 171, 0, 6, 6, 103, 133, 168, 168, - 7, 168, 98, 77, 77, 77, 142, 143, 15, 98, - 3, 125, 6, 171, 53, 22, 168, 168, 84, 26, - 168, 130, 168, 159, 160, 168, 167, 6, 168, 36, - 167, 167, 39, 40, 168, 24, 172, 103, 68, 295, - 298, 151, 334, 417, 51, 52, 139, 57, 309, 217, - 248, 302, 470, 254, 120, 62, 469, 230, 65, 102, - -1, 100, -1, -1, -1, -1, -1, 133, -1, -1, - -1, -1, -1, -1, -1, -1, 142, 143, 53, 86, - -1, 120, -1, 90, -1, -1, -1, -1, 127, 128, - -1, -1, -1, 159, 160, 134, 135, -1, 105, 7, - -1, 167, -1, -1, 111, -1, 172, 15, -1, 148, - 149, 150, 151, 152, 22, -1, 155, 156, 26, 158, - 159, 160, 161, 162, 163, 100, 165, -1, 36, -1, - -1, 39, 40, -1, -1, -1, -1, -1, 145, 146, - 147, -1, -1, 51, 52, 120, 53, -1, -1, -1, - -1, -1, -1, 128, 62, -1, -1, 65, -1, 134, - 135, -1, -1, -1, -1, 53, -1, -1, -1, -1, - -1, -1, -1, 148, 149, 150, 151, 152, 86, -1, - 155, 156, 90, 158, 159, 160, 161, 162, 163, -1, - 165, -1, -1, 100, -1, -1, -1, 105, -1, -1, - -1, 53, -1, 111, -1, -1, -1, 114, -1, -1, - -1, -1, 100, 120, -1, -1, -1, -1, -1, -1, - -1, 128, -1, -1, -1, -1, -1, 134, 135, -1, - -1, -1, -1, -1, -1, -1, -1, 145, 146, 147, - 128, 148, 149, 150, 151, 152, 134, 135, 155, 156, - -1, 158, 159, 160, 161, 162, 163, -1, 165, -1, - 148, 149, 150, 151, 152, -1, -1, 155, 156, -1, - 158, 159, 160, 161, 162, 163, 128, 165, 24, -1, - -1, -1, 134, 29, -1, 31, 32, -1, 34, -1, - -1, -1, -1, -1, -1, -1, 42, -1, -1, 151, - 152, -1, -1, 155, 156, -1, 158, 159, 160, 161, - 162, 163, -1, 165, -1, -1, -1, -1, -1, -1, - -1, -1, 68, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 85, - -1, 87, 88, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 102, -1, -1, -1, - 106, -1, 108, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 118 + 140, 94, 74, 259, 80, 2, 93, 94, 5, 293, + 180, 105, 315, 10, 146, 12, 115, 57, 4, 5, + 6, 3, 57, 19, 77, 3, 3, 82, 12, 93, + 170, 134, 172, 173, 54, 9, 93, 114, 9, 26, + 3, 3, 89, 50, 57, 112, 37, 187, 115, 142, + 63, 48, 192, 50, 131, 142, 53, 188, 100, 190, + 124, 58, 165, 59, 114, 70, 3, 114, 115, 54, + 44, 47, 144, 44, 79, 132, 216, 247, 110, 164, + 336, 131, 114, 74, 131, 127, 171, 72, 85, 86, + 134, 168, 17, 18, 114, 3, 4, 5, 6, 131, + 176, 98, 99, 167, 109, 76, 80, 83, 364, 80, + 101, 131, 252, 253, 167, 3, 171, 103, 168, 163, + 192, 165, 168, 263, 264, 171, 257, 3, 4, 5, + 6, 3, 167, 232, 265, 444, 267, 45, 46, 47, + 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, + 281, 282, 283, 284, 285, 152, 142, 143, 3, 4, + 5, 6, 124, 25, 171, 232, 475, 299, 308, 45, + 46, 47, 428, 313, 314, 93, 84, 114, 250, 219, + 177, 57, 160, 160, 168, 167, 172, 124, 91, 492, + 97, 93, 286, 166, 131, 103, 107, 167, 171, 169, + 45, 46, 47, 114, 66, 113, 79, 110, 84, 71, + 350, 351, 120, 116, 290, 77, 78, 70, 502, 295, + 131, 391, 478, 316, 91, 133, 79, 103, 114, 316, + 114, 362, 94, 103, 142, 143, 98, 99, 124, 84, + 3, 231, 134, 110, 120, 131, 236, 131, 107, 116, + 120, 159, 160, 144, 0, 114, 109, 133, 103, 167, + 3, 4, 5, 6, 172, 110, 142, 143, 160, 161, + 162, 163, 131, 165, 170, 120, 114, 417, 116, 419, + 420, 353, 290, 159, 160, 3, 168, 295, 133, 171, + 287, 167, 364, 131, 103, 426, 172, 142, 143, 114, + 111, 116, 45, 46, 47, 3, 4, 5, 6, 171, + 168, 120, 169, 171, 159, 160, 131, 93, 168, 167, + 25, 171, 167, 463, 3, 126, 3, 172, 136, 137, + 138, 139, 140, 141, 122, 3, 126, 3, 4, 5, + 6, 84, 168, 168, 124, 171, 171, 45, 46, 47, + 168, 25, 168, 171, 171, 171, 428, 497, 96, 499, + 103, 66, 168, 123, 168, 171, 71, 171, 3, 120, + 4, 82, 77, 78, 167, 92, 3, 120, 90, 4, + 46, 47, 130, 45, 167, 17, 84, 6, 167, 94, + 133, 12, 66, 98, 99, 168, 168, 71, 113, 142, + 143, 125, 168, 77, 78, 103, 171, 81, 130, 45, + 3, 148, 38, 3, 111, 76, 159, 160, 84, 3, + 94, 53, 120, 111, 167, 99, 3, 167, 124, 172, + 97, 167, 167, 165, 167, 133, 48, 103, 167, 93, + 171, 171, 167, 54, 142, 143, 92, 57, 167, 3, + 3, 30, 168, 167, 120, 168, 130, 167, 167, 167, + 93, 159, 160, 100, 114, 167, 171, 133, 100, 167, + 165, 171, 103, 166, 172, 169, 142, 143, 69, 6, + 167, 6, 6, 103, 168, 168, 168, 3, 120, 98, + 77, 77, 77, 159, 160, 127, 128, 98, 6, 171, + 6, 167, 134, 135, 168, 168, 172, 125, 168, 168, + 167, 68, 168, 168, 167, 24, 148, 149, 150, 151, + 152, 168, 297, 155, 156, 0, 158, 159, 160, 161, + 162, 163, 7, 165, 151, 294, 333, 7, 418, 139, + 15, 217, 248, 301, 308, 15, 470, 22, 471, 230, + 254, 26, 22, 102, -1, -1, 26, 53, -1, -1, + -1, 36, -1, -1, 39, 40, 36, -1, -1, 39, + 40, -1, -1, -1, -1, -1, 51, 52, -1, -1, + -1, 51, 52, -1, -1, -1, -1, 62, -1, -1, + 65, -1, 62, -1, -1, 65, -1, -1, -1, -1, + -1, -1, -1, -1, 100, -1, -1, -1, -1, -1, + -1, 86, -1, -1, 53, 90, 86, -1, 114, -1, + 90, -1, -1, -1, 120, -1, -1, -1, -1, -1, + 105, -1, 128, 53, -1, 105, 111, -1, 134, 135, + -1, 111, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 148, 149, 150, 151, 152, -1, -1, 155, + 156, 100, 158, 159, 160, 161, 162, 163, -1, 165, + 145, 146, 147, 53, -1, 145, 146, 147, -1, -1, + 100, 120, -1, 24, -1, -1, -1, -1, 29, 128, + 31, 32, -1, 34, -1, 134, 135, -1, -1, -1, + -1, 42, -1, -1, -1, -1, -1, -1, 128, 148, + 149, 150, 151, 152, 134, 135, 155, 156, -1, 158, + 159, 160, 161, 162, 163, -1, 165, 68, 148, 149, + 150, 151, 152, -1, -1, 155, 156, -1, 158, 159, + 160, 161, 162, 163, 85, 165, 87, 88, 128, -1, + -1, -1, -1, -1, 134, -1, -1, -1, -1, -1, + -1, 102, -1, -1, -1, 106, -1, 108, -1, -1, + -1, 151, 152, -1, -1, 155, 156, 118, 158, 159, + 160, 161, 162, 163, -1, 165 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1312,28 +1300,28 @@ static const yytype_int16 yystos[] = 235, 212, 234, 114, 131, 17, 53, 100, 120, 127, 128, 134, 135, 148, 149, 150, 151, 152, 155, 156, 158, 159, 160, 161, 162, 163, 165, 97, 168, 171, - 167, 234, 207, 3, 252, 48, 167, 168, 171, 93, - 219, 220, 171, 3, 124, 271, 272, 229, 209, 171, - 89, 115, 227, 229, 54, 54, 167, 92, 24, 29, - 31, 32, 34, 42, 68, 85, 87, 88, 102, 106, - 108, 118, 196, 168, 171, 208, 168, 217, 3, 160, - 212, 136, 137, 138, 139, 140, 141, 248, 234, 234, - 242, 91, 110, 116, 167, 120, 230, 168, 168, 234, - 234, 235, 235, 100, 127, 167, 103, 120, 235, 235, + 167, 234, 207, 199, 48, 167, 168, 171, 93, 219, + 220, 171, 3, 124, 271, 272, 229, 209, 171, 89, + 115, 227, 229, 54, 54, 167, 92, 24, 29, 31, + 32, 34, 42, 68, 85, 87, 88, 102, 106, 108, + 118, 196, 168, 171, 208, 168, 217, 3, 160, 212, + 136, 137, 138, 139, 140, 141, 248, 234, 234, 242, + 91, 110, 116, 167, 120, 230, 168, 168, 234, 234, + 235, 235, 100, 127, 167, 103, 120, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235, 235, 235, 257, 266, 3, 232, 187, 232, 180, - 167, 260, 261, 262, 263, 264, 266, 277, 221, 233, - 3, 226, 234, 234, 281, 188, 30, 167, 167, 167, - 103, 120, 197, 195, 230, 168, 93, 124, 107, 91, - 116, 234, 234, 212, 166, 114, 235, 167, 212, 230, - 103, 166, 168, 168, 208, 25, 66, 71, 77, 78, - 94, 99, 278, 171, 124, 269, 270, 271, 69, 222, - 168, 167, 6, 6, 6, 103, 168, 234, 196, 234, - 234, 116, 107, 168, 235, 212, 230, 168, 168, 168, - 98, 77, 77, 77, 98, 261, 3, 125, 6, 171, - 168, 168, 168, 168, 116, 234, 168, 168, 270, 262, - 261, 167, 230, 168, 6, 81, 130, 281, 50, 223, - 168, 167, 234, 279, 168, 234, 252, 168 + 235, 235, 257, 266, 3, 232, 3, 252, 187, 232, + 180, 167, 260, 261, 262, 263, 264, 266, 277, 221, + 233, 3, 226, 234, 234, 281, 188, 30, 167, 167, + 167, 103, 120, 197, 195, 230, 168, 93, 124, 107, + 91, 116, 234, 234, 212, 166, 114, 235, 167, 212, + 230, 103, 166, 168, 168, 208, 25, 66, 71, 77, + 78, 94, 99, 278, 171, 124, 269, 270, 271, 69, + 222, 168, 167, 6, 6, 6, 103, 168, 234, 196, + 234, 234, 116, 107, 168, 235, 212, 230, 168, 168, + 168, 98, 77, 77, 77, 98, 261, 3, 125, 6, + 171, 168, 168, 168, 168, 116, 234, 168, 168, 270, + 262, 261, 167, 230, 168, 6, 81, 130, 281, 50, + 223, 168, 167, 234, 279, 168, 234, 252, 168 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ @@ -1379,7 +1367,7 @@ static const yytype_int8 yyr2[] = 0, 5, 2, 3, 2, 8, 7, 6, 9, 7, 3, 0, 1, 3, 3, 1, 1, 1, 1, 6, 1, 1, 4, 5, 4, 1, 1, 1, 1, 1, - 2, 0, 4, 4, 3, 5, 2, 0, 6, 4, + 2, 0, 4, 4, 3, 5, 2, 0, 7, 4, 2, 8, 5, 3, 0, 5, 1, 3, 3, 2, 2, 6, 1, 1, 1, 3, 3, 3, 3, 5, 2, 1, 1, 1, 1, 0, 7, 1, 0, 1, @@ -1953,25 +1941,25 @@ yydestruct (const char *yymsg, case YYSYMBOL_IDENTIFIER: /* IDENTIFIER */ #line 150 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1957 "bison_parser.cpp" +#line 1945 "bison_parser.cpp" break; case YYSYMBOL_STRING: /* STRING */ #line 150 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1963 "bison_parser.cpp" +#line 1951 "bison_parser.cpp" break; case YYSYMBOL_FLOATVAL: /* FLOATVAL */ #line 148 "bison_parser.y" { } -#line 1969 "bison_parser.cpp" +#line 1957 "bison_parser.cpp" break; case YYSYMBOL_INTVAL: /* INTVAL */ #line 148 "bison_parser.y" { } -#line 1975 "bison_parser.cpp" +#line 1963 "bison_parser.cpp" break; case YYSYMBOL_statement_list: /* statement_list */ @@ -1984,19 +1972,19 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).stmt_vec)); } -#line 1988 "bison_parser.cpp" +#line 1976 "bison_parser.cpp" break; case YYSYMBOL_statement: /* statement */ #line 159 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 1994 "bison_parser.cpp" +#line 1982 "bison_parser.cpp" break; case YYSYMBOL_preparable_statement: /* preparable_statement */ #line 159 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 2000 "bison_parser.cpp" +#line 1988 "bison_parser.cpp" break; case YYSYMBOL_opt_hints: /* opt_hints */ @@ -2009,7 +1997,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2013 "bison_parser.cpp" +#line 2001 "bison_parser.cpp" break; case YYSYMBOL_hint_list: /* hint_list */ @@ -2022,85 +2010,85 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2026 "bison_parser.cpp" +#line 2014 "bison_parser.cpp" break; case YYSYMBOL_hint: /* hint */ #line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2032 "bison_parser.cpp" +#line 2020 "bison_parser.cpp" break; case YYSYMBOL_transaction_statement: /* transaction_statement */ #line 159 "bison_parser.y" { delete (((*yyvaluep).transaction_stmt)); } -#line 2038 "bison_parser.cpp" +#line 2026 "bison_parser.cpp" break; case YYSYMBOL_prepare_statement: /* prepare_statement */ #line 159 "bison_parser.y" { delete (((*yyvaluep).prep_stmt)); } -#line 2044 "bison_parser.cpp" +#line 2032 "bison_parser.cpp" break; case YYSYMBOL_prepare_target_query: /* prepare_target_query */ #line 150 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2050 "bison_parser.cpp" +#line 2038 "bison_parser.cpp" break; case YYSYMBOL_execute_statement: /* execute_statement */ #line 159 "bison_parser.y" { delete (((*yyvaluep).exec_stmt)); } -#line 2056 "bison_parser.cpp" +#line 2044 "bison_parser.cpp" break; case YYSYMBOL_import_statement: /* import_statement */ #line 159 "bison_parser.y" { delete (((*yyvaluep).import_stmt)); } -#line 2062 "bison_parser.cpp" +#line 2050 "bison_parser.cpp" break; case YYSYMBOL_file_type: /* file_type */ #line 148 "bison_parser.y" { } -#line 2068 "bison_parser.cpp" +#line 2056 "bison_parser.cpp" break; case YYSYMBOL_file_path: /* file_path */ #line 150 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2074 "bison_parser.cpp" +#line 2062 "bison_parser.cpp" break; case YYSYMBOL_opt_file_type: /* opt_file_type */ #line 148 "bison_parser.y" { } -#line 2080 "bison_parser.cpp" +#line 2068 "bison_parser.cpp" break; case YYSYMBOL_export_statement: /* export_statement */ #line 159 "bison_parser.y" { delete (((*yyvaluep).export_stmt)); } -#line 2086 "bison_parser.cpp" +#line 2074 "bison_parser.cpp" break; case YYSYMBOL_show_statement: /* show_statement */ #line 159 "bison_parser.y" { delete (((*yyvaluep).show_stmt)); } -#line 2092 "bison_parser.cpp" +#line 2080 "bison_parser.cpp" break; case YYSYMBOL_create_statement: /* create_statement */ #line 159 "bison_parser.y" { delete (((*yyvaluep).create_stmt)); } -#line 2098 "bison_parser.cpp" +#line 2086 "bison_parser.cpp" break; case YYSYMBOL_opt_not_exists: /* opt_not_exists */ #line 148 "bison_parser.y" { } -#line 2104 "bison_parser.cpp" +#line 2092 "bison_parser.cpp" break; case YYSYMBOL_column_def_commalist: /* column_def_commalist */ @@ -2113,61 +2101,61 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).column_vec)); } -#line 2117 "bison_parser.cpp" +#line 2105 "bison_parser.cpp" break; case YYSYMBOL_column_def: /* column_def */ #line 159 "bison_parser.y" { delete (((*yyvaluep).column_t)); } -#line 2123 "bison_parser.cpp" +#line 2111 "bison_parser.cpp" break; case YYSYMBOL_column_type: /* column_type */ #line 148 "bison_parser.y" { } -#line 2129 "bison_parser.cpp" +#line 2117 "bison_parser.cpp" break; case YYSYMBOL_opt_column_nullable: /* opt_column_nullable */ #line 148 "bison_parser.y" { } -#line 2135 "bison_parser.cpp" +#line 2123 "bison_parser.cpp" break; case YYSYMBOL_drop_statement: /* drop_statement */ #line 159 "bison_parser.y" { delete (((*yyvaluep).drop_stmt)); } -#line 2141 "bison_parser.cpp" +#line 2129 "bison_parser.cpp" break; case YYSYMBOL_opt_exists: /* opt_exists */ #line 148 "bison_parser.y" { } -#line 2147 "bison_parser.cpp" +#line 2135 "bison_parser.cpp" break; case YYSYMBOL_alter_statement: /* alter_statement */ #line 159 "bison_parser.y" { delete (((*yyvaluep).alter_stmt)); } -#line 2153 "bison_parser.cpp" +#line 2141 "bison_parser.cpp" break; case YYSYMBOL_delete_statement: /* delete_statement */ #line 159 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2159 "bison_parser.cpp" +#line 2147 "bison_parser.cpp" break; case YYSYMBOL_truncate_statement: /* truncate_statement */ #line 159 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2165 "bison_parser.cpp" +#line 2153 "bison_parser.cpp" break; case YYSYMBOL_insert_statement: /* insert_statement */ #line 159 "bison_parser.y" { delete (((*yyvaluep).insert_stmt)); } -#line 2171 "bison_parser.cpp" +#line 2159 "bison_parser.cpp" break; case YYSYMBOL_opt_column_list: /* opt_column_list */ @@ -2180,13 +2168,13 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2184 "bison_parser.cpp" +#line 2172 "bison_parser.cpp" break; case YYSYMBOL_update_statement: /* update_statement */ #line 159 "bison_parser.y" { delete (((*yyvaluep).update_stmt)); } -#line 2190 "bison_parser.cpp" +#line 2178 "bison_parser.cpp" break; case YYSYMBOL_update_clause_commalist: /* update_clause_commalist */ @@ -2199,73 +2187,73 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).update_vec)); } -#line 2203 "bison_parser.cpp" +#line 2191 "bison_parser.cpp" break; case YYSYMBOL_update_clause: /* update_clause */ #line 159 "bison_parser.y" { delete (((*yyvaluep).update_t)); } -#line 2209 "bison_parser.cpp" +#line 2197 "bison_parser.cpp" break; case YYSYMBOL_select_statement: /* select_statement */ #line 159 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2215 "bison_parser.cpp" +#line 2203 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation: /* select_within_set_operation */ #line 159 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2221 "bison_parser.cpp" +#line 2209 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation_no_parentheses: /* select_within_set_operation_no_parentheses */ #line 159 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2227 "bison_parser.cpp" +#line 2215 "bison_parser.cpp" break; case YYSYMBOL_select_with_paren: /* select_with_paren */ #line 159 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2233 "bison_parser.cpp" +#line 2221 "bison_parser.cpp" break; case YYSYMBOL_select_no_paren: /* select_no_paren */ #line 159 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2239 "bison_parser.cpp" +#line 2227 "bison_parser.cpp" break; case YYSYMBOL_set_operator: /* set_operator */ #line 159 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2245 "bison_parser.cpp" +#line 2233 "bison_parser.cpp" break; case YYSYMBOL_set_type: /* set_type */ #line 159 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2251 "bison_parser.cpp" +#line 2239 "bison_parser.cpp" break; case YYSYMBOL_opt_all: /* opt_all */ #line 148 "bison_parser.y" { } -#line 2257 "bison_parser.cpp" +#line 2245 "bison_parser.cpp" break; case YYSYMBOL_select_clause: /* select_clause */ #line 159 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2263 "bison_parser.cpp" +#line 2251 "bison_parser.cpp" break; case YYSYMBOL_opt_distinct: /* opt_distinct */ #line 148 "bison_parser.y" { } -#line 2269 "bison_parser.cpp" +#line 2257 "bison_parser.cpp" break; case YYSYMBOL_select_list: /* select_list */ @@ -2278,37 +2266,37 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2282 "bison_parser.cpp" +#line 2270 "bison_parser.cpp" break; case YYSYMBOL_opt_from_clause: /* opt_from_clause */ #line 159 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2288 "bison_parser.cpp" +#line 2276 "bison_parser.cpp" break; case YYSYMBOL_from_clause: /* from_clause */ #line 159 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2294 "bison_parser.cpp" +#line 2282 "bison_parser.cpp" break; case YYSYMBOL_opt_where: /* opt_where */ #line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2300 "bison_parser.cpp" +#line 2288 "bison_parser.cpp" break; case YYSYMBOL_opt_group: /* opt_group */ #line 159 "bison_parser.y" { delete (((*yyvaluep).group_t)); } -#line 2306 "bison_parser.cpp" +#line 2294 "bison_parser.cpp" break; case YYSYMBOL_opt_having: /* opt_having */ #line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2312 "bison_parser.cpp" +#line 2300 "bison_parser.cpp" break; case YYSYMBOL_opt_order: /* opt_order */ @@ -2321,7 +2309,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2325 "bison_parser.cpp" +#line 2313 "bison_parser.cpp" break; case YYSYMBOL_order_list: /* order_list */ @@ -2334,31 +2322,31 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2338 "bison_parser.cpp" +#line 2326 "bison_parser.cpp" break; case YYSYMBOL_order_desc: /* order_desc */ #line 159 "bison_parser.y" { delete (((*yyvaluep).order)); } -#line 2344 "bison_parser.cpp" +#line 2332 "bison_parser.cpp" break; case YYSYMBOL_opt_order_type: /* opt_order_type */ #line 148 "bison_parser.y" { } -#line 2350 "bison_parser.cpp" +#line 2338 "bison_parser.cpp" break; case YYSYMBOL_opt_top: /* opt_top */ #line 159 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2356 "bison_parser.cpp" +#line 2344 "bison_parser.cpp" break; case YYSYMBOL_opt_limit: /* opt_limit */ #line 159 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2362 "bison_parser.cpp" +#line 2350 "bison_parser.cpp" break; case YYSYMBOL_expr_list: /* expr_list */ @@ -2371,7 +2359,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2375 "bison_parser.cpp" +#line 2363 "bison_parser.cpp" break; case YYSYMBOL_opt_literal_list: /* opt_literal_list */ @@ -2384,7 +2372,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2388 "bison_parser.cpp" +#line 2376 "bison_parser.cpp" break; case YYSYMBOL_literal_list: /* literal_list */ @@ -2397,187 +2385,187 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2401 "bison_parser.cpp" +#line 2389 "bison_parser.cpp" break; case YYSYMBOL_expr_alias: /* expr_alias */ #line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2407 "bison_parser.cpp" +#line 2395 "bison_parser.cpp" break; case YYSYMBOL_expr: /* expr */ #line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2413 "bison_parser.cpp" +#line 2401 "bison_parser.cpp" break; case YYSYMBOL_operand: /* operand */ #line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2419 "bison_parser.cpp" +#line 2407 "bison_parser.cpp" break; case YYSYMBOL_scalar_expr: /* scalar_expr */ #line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2425 "bison_parser.cpp" +#line 2413 "bison_parser.cpp" break; case YYSYMBOL_unary_expr: /* unary_expr */ #line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2431 "bison_parser.cpp" +#line 2419 "bison_parser.cpp" break; case YYSYMBOL_binary_expr: /* binary_expr */ #line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2437 "bison_parser.cpp" +#line 2425 "bison_parser.cpp" break; case YYSYMBOL_logic_expr: /* logic_expr */ #line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2443 "bison_parser.cpp" +#line 2431 "bison_parser.cpp" break; case YYSYMBOL_in_expr: /* in_expr */ #line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2449 "bison_parser.cpp" +#line 2437 "bison_parser.cpp" break; case YYSYMBOL_case_expr: /* case_expr */ #line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2455 "bison_parser.cpp" +#line 2443 "bison_parser.cpp" break; case YYSYMBOL_case_list: /* case_list */ #line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2461 "bison_parser.cpp" +#line 2449 "bison_parser.cpp" break; case YYSYMBOL_exists_expr: /* exists_expr */ #line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2467 "bison_parser.cpp" +#line 2455 "bison_parser.cpp" break; case YYSYMBOL_comp_expr: /* comp_expr */ #line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2473 "bison_parser.cpp" +#line 2461 "bison_parser.cpp" break; case YYSYMBOL_function_expr: /* function_expr */ #line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2479 "bison_parser.cpp" +#line 2467 "bison_parser.cpp" break; case YYSYMBOL_extract_expr: /* extract_expr */ #line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2485 "bison_parser.cpp" +#line 2473 "bison_parser.cpp" break; case YYSYMBOL_cast_expr: /* cast_expr */ #line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2491 "bison_parser.cpp" +#line 2479 "bison_parser.cpp" break; case YYSYMBOL_datetime_field: /* datetime_field */ #line 148 "bison_parser.y" { } -#line 2497 "bison_parser.cpp" +#line 2485 "bison_parser.cpp" break; case YYSYMBOL_array_expr: /* array_expr */ #line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2503 "bison_parser.cpp" +#line 2491 "bison_parser.cpp" break; case YYSYMBOL_array_index: /* array_index */ #line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2509 "bison_parser.cpp" +#line 2497 "bison_parser.cpp" break; case YYSYMBOL_between_expr: /* between_expr */ #line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2515 "bison_parser.cpp" +#line 2503 "bison_parser.cpp" break; case YYSYMBOL_column_name: /* column_name */ #line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2521 "bison_parser.cpp" +#line 2509 "bison_parser.cpp" break; case YYSYMBOL_literal: /* literal */ #line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2527 "bison_parser.cpp" +#line 2515 "bison_parser.cpp" break; case YYSYMBOL_string_literal: /* string_literal */ #line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2533 "bison_parser.cpp" +#line 2521 "bison_parser.cpp" break; case YYSYMBOL_bool_literal: /* bool_literal */ #line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2539 "bison_parser.cpp" +#line 2527 "bison_parser.cpp" break; case YYSYMBOL_num_literal: /* num_literal */ #line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2545 "bison_parser.cpp" +#line 2533 "bison_parser.cpp" break; case YYSYMBOL_int_literal: /* int_literal */ #line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2551 "bison_parser.cpp" +#line 2539 "bison_parser.cpp" break; case YYSYMBOL_null_literal: /* null_literal */ #line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2557 "bison_parser.cpp" +#line 2545 "bison_parser.cpp" break; case YYSYMBOL_param_expr: /* param_expr */ #line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2563 "bison_parser.cpp" +#line 2551 "bison_parser.cpp" break; case YYSYMBOL_table_ref: /* table_ref */ #line 159 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2569 "bison_parser.cpp" +#line 2557 "bison_parser.cpp" break; case YYSYMBOL_table_ref_atomic: /* table_ref_atomic */ #line 159 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2575 "bison_parser.cpp" +#line 2563 "bison_parser.cpp" break; case YYSYMBOL_nonjoin_table_ref_atomic: /* nonjoin_table_ref_atomic */ #line 159 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2581 "bison_parser.cpp" +#line 2569 "bison_parser.cpp" break; case YYSYMBOL_table_ref_commalist: /* table_ref_commalist */ @@ -2590,103 +2578,103 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).table_vec)); } -#line 2594 "bison_parser.cpp" +#line 2582 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name: /* table_ref_name */ #line 159 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2600 "bison_parser.cpp" +#line 2588 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name_no_alias: /* table_ref_name_no_alias */ #line 159 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2606 "bison_parser.cpp" +#line 2594 "bison_parser.cpp" break; case YYSYMBOL_table_name: /* table_name */ #line 149 "bison_parser.y" { free( (((*yyvaluep).table_name).name) ); free( (((*yyvaluep).table_name).schema) ); } -#line 2612 "bison_parser.cpp" +#line 2600 "bison_parser.cpp" break; case YYSYMBOL_opt_index_name: /* opt_index_name */ #line 150 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2618 "bison_parser.cpp" +#line 2606 "bison_parser.cpp" break; case YYSYMBOL_index_name: /* index_name */ #line 150 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2624 "bison_parser.cpp" +#line 2612 "bison_parser.cpp" break; case YYSYMBOL_table_alias: /* table_alias */ #line 159 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2630 "bison_parser.cpp" +#line 2618 "bison_parser.cpp" break; case YYSYMBOL_opt_table_alias: /* opt_table_alias */ #line 159 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2636 "bison_parser.cpp" +#line 2624 "bison_parser.cpp" break; case YYSYMBOL_alias: /* alias */ #line 159 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2642 "bison_parser.cpp" +#line 2630 "bison_parser.cpp" break; case YYSYMBOL_opt_alias: /* opt_alias */ #line 159 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2648 "bison_parser.cpp" +#line 2636 "bison_parser.cpp" break; case YYSYMBOL_opt_with_clause: /* opt_with_clause */ #line 159 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2654 "bison_parser.cpp" +#line 2642 "bison_parser.cpp" break; case YYSYMBOL_with_clause: /* with_clause */ #line 159 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2660 "bison_parser.cpp" +#line 2648 "bison_parser.cpp" break; case YYSYMBOL_with_description_list: /* with_description_list */ #line 159 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2666 "bison_parser.cpp" +#line 2654 "bison_parser.cpp" break; case YYSYMBOL_with_description: /* with_description */ #line 159 "bison_parser.y" { delete (((*yyvaluep).with_description_t)); } -#line 2672 "bison_parser.cpp" +#line 2660 "bison_parser.cpp" break; case YYSYMBOL_join_clause: /* join_clause */ #line 159 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2678 "bison_parser.cpp" +#line 2666 "bison_parser.cpp" break; case YYSYMBOL_opt_join_type: /* opt_join_type */ #line 148 "bison_parser.y" { } -#line 2684 "bison_parser.cpp" +#line 2672 "bison_parser.cpp" break; case YYSYMBOL_join_condition: /* join_condition */ #line 159 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2690 "bison_parser.cpp" +#line 2678 "bison_parser.cpp" break; case YYSYMBOL_ident_commalist: /* ident_commalist */ @@ -2699,7 +2687,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2703 "bison_parser.cpp" +#line 2691 "bison_parser.cpp" break; default: @@ -2806,7 +2794,7 @@ YYLTYPE yylloc = yyloc_default; yylloc.string_length = 0; } -#line 2810 "bison_parser.cpp" +#line 2798 "bison_parser.cpp" yylsp[0] = yylloc; goto yysetstate; @@ -3034,7 +3022,7 @@ YYLTYPE yylloc = yyloc_default; } delete (yyvsp[-1].stmt_vec); } -#line 3038 "bison_parser.cpp" +#line 3026 "bison_parser.cpp" break; case 3: /* statement_list: statement */ @@ -3045,7 +3033,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.stmt_vec) = new std::vector(); (yyval.stmt_vec)->push_back((yyvsp[0].statement)); } -#line 3049 "bison_parser.cpp" +#line 3037 "bison_parser.cpp" break; case 4: /* statement_list: statement_list ';' statement */ @@ -3056,7 +3044,7 @@ YYLTYPE yylloc = yyloc_default; (yyvsp[-2].stmt_vec)->push_back((yyvsp[0].statement)); (yyval.stmt_vec) = (yyvsp[-2].stmt_vec); } -#line 3060 "bison_parser.cpp" +#line 3048 "bison_parser.cpp" break; case 5: /* statement: prepare_statement opt_hints */ @@ -3065,7 +3053,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3069 "bison_parser.cpp" +#line 3057 "bison_parser.cpp" break; case 6: /* statement: preparable_statement opt_hints */ @@ -3074,7 +3062,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.statement) = (yyvsp[-1].statement); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3078 "bison_parser.cpp" +#line 3066 "bison_parser.cpp" break; case 7: /* statement: show_statement */ @@ -3082,7 +3070,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.statement) = (yyvsp[0].show_stmt); } -#line 3086 "bison_parser.cpp" +#line 3074 "bison_parser.cpp" break; case 8: /* statement: import_statement */ @@ -3090,7 +3078,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.statement) = (yyvsp[0].import_stmt); } -#line 3094 "bison_parser.cpp" +#line 3082 "bison_parser.cpp" break; case 9: /* statement: export_statement */ @@ -3098,91 +3086,91 @@ YYLTYPE yylloc = yyloc_default; { (yyval.statement) = (yyvsp[0].export_stmt); } -#line 3102 "bison_parser.cpp" +#line 3090 "bison_parser.cpp" break; case 10: /* preparable_statement: select_statement */ #line 330 "bison_parser.y" { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 3108 "bison_parser.cpp" +#line 3096 "bison_parser.cpp" break; case 11: /* preparable_statement: create_statement */ #line 331 "bison_parser.y" { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 3114 "bison_parser.cpp" +#line 3102 "bison_parser.cpp" break; case 12: /* preparable_statement: insert_statement */ #line 332 "bison_parser.y" { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 3120 "bison_parser.cpp" +#line 3108 "bison_parser.cpp" break; case 13: /* preparable_statement: delete_statement */ #line 333 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3126 "bison_parser.cpp" +#line 3114 "bison_parser.cpp" break; case 14: /* preparable_statement: truncate_statement */ #line 334 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3132 "bison_parser.cpp" +#line 3120 "bison_parser.cpp" break; case 15: /* preparable_statement: update_statement */ #line 335 "bison_parser.y" { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 3138 "bison_parser.cpp" +#line 3126 "bison_parser.cpp" break; case 16: /* preparable_statement: drop_statement */ #line 336 "bison_parser.y" { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 3144 "bison_parser.cpp" +#line 3132 "bison_parser.cpp" break; case 17: /* preparable_statement: alter_statement */ #line 337 "bison_parser.y" { (yyval.statement) = (yyvsp[0].alter_stmt); } -#line 3150 "bison_parser.cpp" +#line 3138 "bison_parser.cpp" break; case 18: /* preparable_statement: execute_statement */ #line 338 "bison_parser.y" { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 3156 "bison_parser.cpp" +#line 3144 "bison_parser.cpp" break; case 19: /* preparable_statement: transaction_statement */ #line 339 "bison_parser.y" { (yyval.statement) = (yyvsp[0].transaction_stmt); } -#line 3162 "bison_parser.cpp" +#line 3150 "bison_parser.cpp" break; case 20: /* opt_hints: WITH HINT '(' hint_list ')' */ #line 348 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 3168 "bison_parser.cpp" +#line 3156 "bison_parser.cpp" break; case 21: /* opt_hints: %empty */ #line 349 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 3174 "bison_parser.cpp" +#line 3162 "bison_parser.cpp" break; case 22: /* hint_list: hint */ #line 354 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3180 "bison_parser.cpp" +#line 3168 "bison_parser.cpp" break; case 23: /* hint_list: hint_list ',' hint */ #line 355 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3186 "bison_parser.cpp" +#line 3174 "bison_parser.cpp" break; case 24: /* hint: IDENTIFIER */ @@ -3191,7 +3179,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[0].sval); } -#line 3195 "bison_parser.cpp" +#line 3183 "bison_parser.cpp" break; case 25: /* hint: IDENTIFIER '(' literal_list ')' */ @@ -3201,7 +3189,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expr)->name = (yyvsp[-3].sval); (yyval.expr)->exprList = (yyvsp[-1].expr_vec); } -#line 3205 "bison_parser.cpp" +#line 3193 "bison_parser.cpp" break; case 26: /* transaction_statement: BEGIN opt_transaction_keyword */ @@ -3209,7 +3197,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.transaction_stmt) = new TransactionStatement(kBeginTransaction); } -#line 3213 "bison_parser.cpp" +#line 3201 "bison_parser.cpp" break; case 27: /* transaction_statement: ROLLBACK opt_transaction_keyword */ @@ -3217,7 +3205,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.transaction_stmt) = new TransactionStatement(kRollbackTransaction); } -#line 3221 "bison_parser.cpp" +#line 3209 "bison_parser.cpp" break; case 28: /* transaction_statement: COMMIT opt_transaction_keyword */ @@ -3225,7 +3213,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.transaction_stmt) = new TransactionStatement(kCommitTransaction); } -#line 3229 "bison_parser.cpp" +#line 3217 "bison_parser.cpp" break; case 31: /* prepare_statement: PREPARE IDENTIFIER FROM prepare_target_query */ @@ -3235,7 +3223,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.prep_stmt)->name = (yyvsp[-2].sval); (yyval.prep_stmt)->query = (yyvsp[0].sval); } -#line 3239 "bison_parser.cpp" +#line 3227 "bison_parser.cpp" break; case 33: /* execute_statement: EXECUTE IDENTIFIER */ @@ -3244,7 +3232,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[0].sval); } -#line 3248 "bison_parser.cpp" +#line 3236 "bison_parser.cpp" break; case 34: /* execute_statement: EXECUTE IDENTIFIER '(' opt_literal_list ')' */ @@ -3254,7 +3242,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.exec_stmt)->name = (yyvsp[-3].sval); (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); } -#line 3258 "bison_parser.cpp" +#line 3246 "bison_parser.cpp" break; case 35: /* import_statement: IMPORT FROM file_type FILE file_path INTO table_name */ @@ -3265,7 +3253,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.import_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3269 "bison_parser.cpp" +#line 3257 "bison_parser.cpp" break; case 36: /* import_statement: COPY table_name FROM file_path opt_file_type */ @@ -3276,7 +3264,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.import_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3280 "bison_parser.cpp" +#line 3268 "bison_parser.cpp" break; case 37: /* file_type: IDENTIFIER */ @@ -3295,13 +3283,13 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[0].sval)); } -#line 3299 "bison_parser.cpp" +#line 3287 "bison_parser.cpp" break; case 38: /* file_path: string_literal */ #line 455 "bison_parser.y" { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 3305 "bison_parser.cpp" +#line 3293 "bison_parser.cpp" break; case 39: /* opt_file_type: WITH FORMAT file_type */ @@ -3309,13 +3297,13 @@ YYLTYPE yylloc = yyloc_default; { (yyval.import_type_t) = (yyvsp[0].import_type_t); } -#line 3313 "bison_parser.cpp" +#line 3301 "bison_parser.cpp" break; case 40: /* opt_file_type: %empty */ #line 462 "bison_parser.y" { (yyval.import_type_t) = kImportAuto; } -#line 3319 "bison_parser.cpp" +#line 3307 "bison_parser.cpp" break; case 41: /* export_statement: COPY table_name TO file_path opt_file_type */ @@ -3326,7 +3314,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.export_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.export_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3330 "bison_parser.cpp" +#line 3318 "bison_parser.cpp" break; case 42: /* show_statement: SHOW TABLES */ @@ -3334,7 +3322,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.show_stmt) = new ShowStatement(kShowTables); } -#line 3338 "bison_parser.cpp" +#line 3326 "bison_parser.cpp" break; case 43: /* show_statement: SHOW COLUMNS table_name */ @@ -3344,7 +3332,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.show_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.show_stmt)->name = (yyvsp[0].table_name).name; } -#line 3348 "bison_parser.cpp" +#line 3336 "bison_parser.cpp" break; case 44: /* show_statement: DESCRIBE table_name */ @@ -3354,7 +3342,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.show_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.show_stmt)->name = (yyvsp[0].table_name).name; } -#line 3358 "bison_parser.cpp" +#line 3346 "bison_parser.cpp" break; case 45: /* create_statement: CREATE TABLE opt_not_exists table_name FROM IDENTIFIER FILE file_path */ @@ -3372,7 +3360,7 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].sval)); (yyval.create_stmt)->filePath = (yyvsp[0].sval); } -#line 3376 "bison_parser.cpp" +#line 3364 "bison_parser.cpp" break; case 46: /* create_statement: CREATE TABLE opt_not_exists table_name '(' column_def_commalist ')' */ @@ -3384,7 +3372,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->columns = (yyvsp[-1].column_vec); } -#line 3388 "bison_parser.cpp" +#line 3376 "bison_parser.cpp" break; case 47: /* create_statement: CREATE TABLE opt_not_exists table_name AS select_statement */ @@ -3396,7 +3384,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-2].table_name).name; (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3400 "bison_parser.cpp" +#line 3388 "bison_parser.cpp" break; case 48: /* create_statement: CREATE INDEX opt_index_name opt_not_exists ON table_name '(' ident_commalist ')' */ @@ -3408,7 +3396,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->indexColumns = (yyvsp[-1].str_vec); } -#line 3412 "bison_parser.cpp" +#line 3400 "bison_parser.cpp" break; case 49: /* create_statement: CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement */ @@ -3421,31 +3409,31 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3425 "bison_parser.cpp" +#line 3413 "bison_parser.cpp" break; case 50: /* opt_not_exists: IF NOT EXISTS */ #line 552 "bison_parser.y" { (yyval.bval) = true; } -#line 3431 "bison_parser.cpp" +#line 3419 "bison_parser.cpp" break; case 51: /* opt_not_exists: %empty */ #line 553 "bison_parser.y" { (yyval.bval) = false; } -#line 3437 "bison_parser.cpp" +#line 3425 "bison_parser.cpp" break; case 52: /* column_def_commalist: column_def */ #line 557 "bison_parser.y" { (yyval.column_vec) = new std::vector(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); } -#line 3443 "bison_parser.cpp" +#line 3431 "bison_parser.cpp" break; case 53: /* column_def_commalist: column_def_commalist ',' column_def */ #line 558 "bison_parser.y" { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } -#line 3449 "bison_parser.cpp" +#line 3437 "bison_parser.cpp" break; case 54: /* column_def: IDENTIFIER column_type opt_column_nullable */ @@ -3453,109 +3441,109 @@ YYLTYPE yylloc = yyloc_default; { (yyval.column_t) = new ColumnDefinition((yyvsp[-2].sval), (yyvsp[-1].column_type_t), (yyvsp[0].bval)); } -#line 3457 "bison_parser.cpp" +#line 3445 "bison_parser.cpp" break; case 55: /* column_type: INT */ #line 568 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3463 "bison_parser.cpp" +#line 3451 "bison_parser.cpp" break; case 56: /* column_type: INTEGER */ #line 569 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3469 "bison_parser.cpp" +#line 3457 "bison_parser.cpp" break; case 57: /* column_type: LONG */ #line 570 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::LONG}; } -#line 3475 "bison_parser.cpp" +#line 3463 "bison_parser.cpp" break; case 58: /* column_type: FLOAT */ #line 571 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3481 "bison_parser.cpp" +#line 3469 "bison_parser.cpp" break; case 59: /* column_type: DECIMAL '(' INTVAL ',' INTVAL ')' */ #line 572 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DECIMAL}; } -#line 3487 "bison_parser.cpp" +#line 3475 "bison_parser.cpp" break; case 60: /* column_type: DOUBLE */ #line 573 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } -#line 3493 "bison_parser.cpp" +#line 3481 "bison_parser.cpp" break; case 61: /* column_type: REAL */ #line 574 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::REAL}; } -#line 3499 "bison_parser.cpp" +#line 3487 "bison_parser.cpp" break; case 62: /* column_type: VARCHAR '(' INTVAL ')' */ #line 575 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3505 "bison_parser.cpp" +#line 3493 "bison_parser.cpp" break; case 63: /* column_type: CHARACTER VARYING '(' INTVAL ')' */ #line 576 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR_VARYING, (yyvsp[-1].ival)}; } -#line 3511 "bison_parser.cpp" +#line 3499 "bison_parser.cpp" break; case 64: /* column_type: CHAR '(' INTVAL ')' */ #line 577 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } -#line 3517 "bison_parser.cpp" +#line 3505 "bison_parser.cpp" break; case 65: /* column_type: TEXT */ #line 578 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } -#line 3523 "bison_parser.cpp" +#line 3511 "bison_parser.cpp" break; case 66: /* column_type: TIME */ #line 579 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TIME}; } -#line 3529 "bison_parser.cpp" +#line 3517 "bison_parser.cpp" break; case 67: /* column_type: DATETIME */ #line 580 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } -#line 3535 "bison_parser.cpp" +#line 3523 "bison_parser.cpp" break; case 68: /* column_type: DATE */ #line 581 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATE}; } -#line 3541 "bison_parser.cpp" +#line 3529 "bison_parser.cpp" break; case 69: /* opt_column_nullable: NULL */ #line 585 "bison_parser.y" { (yyval.bval) = true; } -#line 3547 "bison_parser.cpp" +#line 3535 "bison_parser.cpp" break; case 70: /* opt_column_nullable: NOT NULL */ #line 586 "bison_parser.y" { (yyval.bval) = false; } -#line 3553 "bison_parser.cpp" +#line 3541 "bison_parser.cpp" break; case 71: /* opt_column_nullable: %empty */ #line 587 "bison_parser.y" { (yyval.bval) = false; } -#line 3559 "bison_parser.cpp" +#line 3547 "bison_parser.cpp" break; case 72: /* drop_statement: DROP TABLE opt_exists table_name */ @@ -3566,7 +3554,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.drop_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; } -#line 3570 "bison_parser.cpp" +#line 3558 "bison_parser.cpp" break; case 73: /* drop_statement: DROP VIEW opt_exists table_name */ @@ -3577,7 +3565,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.drop_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; } -#line 3581 "bison_parser.cpp" +#line 3569 "bison_parser.cpp" break; case 74: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ @@ -3587,7 +3575,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.drop_stmt)->ifExists = false; (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 3591 "bison_parser.cpp" +#line 3579 "bison_parser.cpp" break; case 75: /* drop_statement: DROP INDEX index_name ON table_name */ @@ -3597,55 +3585,56 @@ YYLTYPE yylloc = yyloc_default; (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; (yyval.drop_stmt)->index_name = (yyvsp[-2].sval); } -#line 3601 "bison_parser.cpp" +#line 3589 "bison_parser.cpp" break; case 76: /* opt_exists: IF EXISTS */ #line 622 "bison_parser.y" { (yyval.bval) = true; } -#line 3607 "bison_parser.cpp" +#line 3595 "bison_parser.cpp" break; case 77: /* opt_exists: %empty */ #line 623 "bison_parser.y" { (yyval.bval) = false; } -#line 3613 "bison_parser.cpp" +#line 3601 "bison_parser.cpp" break; - case 78: /* alter_statement: ALTER TABLE table_name DROP COLUMN column_name */ + case 78: /* alter_statement: ALTER TABLE table_name DROP COLUMN opt_exists column_name */ #line 632 "bison_parser.y" - { + { (yyval.alter_stmt) = new AlterStatement(kAlterDropColumn); - (yyval.alter_stmt)->schema = (yyvsp[-3].table_name).schema; - (yyval.alter_stmt)->name = (yyvsp[-3].table_name).name; + (yyval.alter_stmt)->if_exists = (yyvsp[-1].bval); + (yyval.alter_stmt)->schema = (yyvsp[-4].table_name).schema; + (yyval.alter_stmt)->name = (yyvsp[-4].table_name).name; (yyval.alter_stmt)->column_name = (yyvsp[0].expr)->name; } -#line 3624 "bison_parser.cpp" +#line 3613 "bison_parser.cpp" break; case 79: /* delete_statement: DELETE FROM table_name opt_where */ -#line 646 "bison_parser.y" +#line 647 "bison_parser.y" { (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 3635 "bison_parser.cpp" +#line 3624 "bison_parser.cpp" break; case 80: /* truncate_statement: TRUNCATE table_name */ -#line 655 "bison_parser.y" +#line 656 "bison_parser.y" { (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3645 "bison_parser.cpp" +#line 3634 "bison_parser.cpp" break; case 81: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ -#line 668 "bison_parser.y" +#line 669 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertValues); (yyval.insert_stmt)->schema = (yyvsp[-5].table_name).schema; @@ -3653,11 +3642,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } -#line 3657 "bison_parser.cpp" +#line 3646 "bison_parser.cpp" break; case 82: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ -#line 675 "bison_parser.y" +#line 676 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertSelect); (yyval.insert_stmt)->schema = (yyvsp[-2].table_name).schema; @@ -3665,74 +3654,74 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } -#line 3669 "bison_parser.cpp" +#line 3658 "bison_parser.cpp" break; case 83: /* opt_column_list: '(' ident_commalist ')' */ -#line 686 "bison_parser.y" +#line 687 "bison_parser.y" { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 3675 "bison_parser.cpp" +#line 3664 "bison_parser.cpp" break; case 84: /* opt_column_list: %empty */ -#line 687 "bison_parser.y" +#line 688 "bison_parser.y" { (yyval.str_vec) = nullptr; } -#line 3681 "bison_parser.cpp" +#line 3670 "bison_parser.cpp" break; case 85: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ -#line 697 "bison_parser.y" +#line 698 "bison_parser.y" { (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 3692 "bison_parser.cpp" +#line 3681 "bison_parser.cpp" break; case 86: /* update_clause_commalist: update_clause */ -#line 706 "bison_parser.y" +#line 707 "bison_parser.y" { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 3698 "bison_parser.cpp" +#line 3687 "bison_parser.cpp" break; case 87: /* update_clause_commalist: update_clause_commalist ',' update_clause */ -#line 707 "bison_parser.y" +#line 708 "bison_parser.y" { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 3704 "bison_parser.cpp" +#line 3693 "bison_parser.cpp" break; case 88: /* update_clause: IDENTIFIER '=' expr */ -#line 711 "bison_parser.y" +#line 712 "bison_parser.y" { (yyval.update_t) = new UpdateClause(); (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 3714 "bison_parser.cpp" +#line 3703 "bison_parser.cpp" break; case 89: /* select_statement: opt_with_clause select_with_paren */ -#line 723 "bison_parser.y" +#line 724 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3723 "bison_parser.cpp" +#line 3712 "bison_parser.cpp" break; case 90: /* select_statement: opt_with_clause select_no_paren */ -#line 727 "bison_parser.y" +#line 728 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3732 "bison_parser.cpp" +#line 3721 "bison_parser.cpp" break; case 91: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ -#line 731 "bison_parser.y" +#line 732 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3744,17 +3733,17 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); (yyval.select_stmt)->withDescriptions = (yyvsp[-5].with_description_vec); } -#line 3748 "bison_parser.cpp" +#line 3737 "bison_parser.cpp" break; case 94: /* select_within_set_operation_no_parentheses: select_clause */ -#line 749 "bison_parser.y" +#line 750 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); } -#line 3754 "bison_parser.cpp" +#line 3743 "bison_parser.cpp" break; case 95: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ -#line 750 "bison_parser.y" +#line 751 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3763,23 +3752,23 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->push_back((yyvsp[-1].set_operator_t)); (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[0].select_stmt); } -#line 3767 "bison_parser.cpp" +#line 3756 "bison_parser.cpp" break; case 96: /* select_with_paren: '(' select_no_paren ')' */ -#line 761 "bison_parser.y" +#line 762 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3773 "bison_parser.cpp" +#line 3762 "bison_parser.cpp" break; case 97: /* select_with_paren: '(' select_with_paren ')' */ -#line 762 "bison_parser.y" +#line 763 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3779 "bison_parser.cpp" +#line 3768 "bison_parser.cpp" break; case 98: /* select_no_paren: select_clause opt_order opt_limit */ -#line 766 "bison_parser.y" +#line 767 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); (yyval.select_stmt)->order = (yyvsp[-1].order_vec); @@ -3790,11 +3779,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3794 "bison_parser.cpp" +#line 3783 "bison_parser.cpp" break; case 99: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ -#line 776 "bison_parser.y" +#line 777 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3805,63 +3794,63 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); } -#line 3809 "bison_parser.cpp" +#line 3798 "bison_parser.cpp" break; case 100: /* set_operator: set_type opt_all */ -#line 789 "bison_parser.y" +#line 790 "bison_parser.y" { (yyval.set_operator_t) = (yyvsp[-1].set_operator_t); (yyval.set_operator_t)->isAll = (yyvsp[0].bval); } -#line 3818 "bison_parser.cpp" +#line 3807 "bison_parser.cpp" break; case 101: /* set_type: UNION */ -#line 796 "bison_parser.y" +#line 797 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetUnion; } -#line 3827 "bison_parser.cpp" +#line 3816 "bison_parser.cpp" break; case 102: /* set_type: INTERSECT */ -#line 800 "bison_parser.y" +#line 801 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetIntersect; } -#line 3836 "bison_parser.cpp" +#line 3825 "bison_parser.cpp" break; case 103: /* set_type: EXCEPT */ -#line 804 "bison_parser.y" +#line 805 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetExcept; } -#line 3845 "bison_parser.cpp" +#line 3834 "bison_parser.cpp" break; case 104: /* opt_all: ALL */ -#line 811 "bison_parser.y" +#line 812 "bison_parser.y" { (yyval.bval) = true; } -#line 3853 "bison_parser.cpp" +#line 3842 "bison_parser.cpp" break; case 105: /* opt_all: %empty */ -#line 814 "bison_parser.y" +#line 815 "bison_parser.y" { (yyval.bval) = false; } -#line 3861 "bison_parser.cpp" +#line 3850 "bison_parser.cpp" break; case 106: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ -#line 820 "bison_parser.y" +#line 821 "bison_parser.y" { (yyval.select_stmt) = new SelectStatement(); (yyval.select_stmt)->limit = (yyvsp[-5].limit); @@ -3871,213 +3860,213 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 3875 "bison_parser.cpp" +#line 3864 "bison_parser.cpp" break; case 107: /* opt_distinct: DISTINCT */ -#line 832 "bison_parser.y" +#line 833 "bison_parser.y" { (yyval.bval) = true; } -#line 3881 "bison_parser.cpp" +#line 3870 "bison_parser.cpp" break; case 108: /* opt_distinct: %empty */ -#line 833 "bison_parser.y" +#line 834 "bison_parser.y" { (yyval.bval) = false; } -#line 3887 "bison_parser.cpp" +#line 3876 "bison_parser.cpp" break; case 110: /* opt_from_clause: from_clause */ -#line 841 "bison_parser.y" +#line 842 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 3893 "bison_parser.cpp" +#line 3882 "bison_parser.cpp" break; case 111: /* opt_from_clause: %empty */ -#line 842 "bison_parser.y" +#line 843 "bison_parser.y" { (yyval.table) = nullptr; } -#line 3899 "bison_parser.cpp" +#line 3888 "bison_parser.cpp" break; case 112: /* from_clause: FROM table_ref */ -#line 846 "bison_parser.y" +#line 847 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 3905 "bison_parser.cpp" +#line 3894 "bison_parser.cpp" break; case 113: /* opt_where: WHERE expr */ -#line 851 "bison_parser.y" +#line 852 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 3911 "bison_parser.cpp" +#line 3900 "bison_parser.cpp" break; case 114: /* opt_where: %empty */ -#line 852 "bison_parser.y" +#line 853 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 3917 "bison_parser.cpp" +#line 3906 "bison_parser.cpp" break; case 115: /* opt_group: GROUP BY expr_list opt_having */ -#line 856 "bison_parser.y" +#line 857 "bison_parser.y" { (yyval.group_t) = new GroupByDescription(); (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 3927 "bison_parser.cpp" +#line 3916 "bison_parser.cpp" break; case 116: /* opt_group: %empty */ -#line 861 "bison_parser.y" +#line 862 "bison_parser.y" { (yyval.group_t) = nullptr; } -#line 3933 "bison_parser.cpp" +#line 3922 "bison_parser.cpp" break; case 117: /* opt_having: HAVING expr */ -#line 865 "bison_parser.y" +#line 866 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 3939 "bison_parser.cpp" +#line 3928 "bison_parser.cpp" break; case 118: /* opt_having: %empty */ -#line 866 "bison_parser.y" +#line 867 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 3945 "bison_parser.cpp" +#line 3934 "bison_parser.cpp" break; case 119: /* opt_order: ORDER BY order_list */ -#line 870 "bison_parser.y" +#line 871 "bison_parser.y" { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 3951 "bison_parser.cpp" +#line 3940 "bison_parser.cpp" break; case 120: /* opt_order: %empty */ -#line 871 "bison_parser.y" +#line 872 "bison_parser.y" { (yyval.order_vec) = nullptr; } -#line 3957 "bison_parser.cpp" +#line 3946 "bison_parser.cpp" break; case 121: /* order_list: order_desc */ -#line 875 "bison_parser.y" +#line 876 "bison_parser.y" { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 3963 "bison_parser.cpp" +#line 3952 "bison_parser.cpp" break; case 122: /* order_list: order_list ',' order_desc */ -#line 876 "bison_parser.y" +#line 877 "bison_parser.y" { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 3969 "bison_parser.cpp" +#line 3958 "bison_parser.cpp" break; case 123: /* order_desc: expr opt_order_type */ -#line 880 "bison_parser.y" +#line 881 "bison_parser.y" { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 3975 "bison_parser.cpp" +#line 3964 "bison_parser.cpp" break; case 124: /* opt_order_type: ASC */ -#line 884 "bison_parser.y" +#line 885 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 3981 "bison_parser.cpp" +#line 3970 "bison_parser.cpp" break; case 125: /* opt_order_type: DESC */ -#line 885 "bison_parser.y" +#line 886 "bison_parser.y" { (yyval.order_type) = kOrderDesc; } -#line 3987 "bison_parser.cpp" +#line 3976 "bison_parser.cpp" break; case 126: /* opt_order_type: %empty */ -#line 886 "bison_parser.y" +#line 887 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 3993 "bison_parser.cpp" +#line 3982 "bison_parser.cpp" break; case 127: /* opt_top: TOP int_literal */ -#line 892 "bison_parser.y" +#line 893 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 3999 "bison_parser.cpp" +#line 3988 "bison_parser.cpp" break; case 128: /* opt_top: %empty */ -#line 893 "bison_parser.y" +#line 894 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 4005 "bison_parser.cpp" +#line 3994 "bison_parser.cpp" break; case 129: /* opt_limit: LIMIT expr */ -#line 897 "bison_parser.y" +#line 898 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 4011 "bison_parser.cpp" +#line 4000 "bison_parser.cpp" break; case 130: /* opt_limit: OFFSET expr */ -#line 898 "bison_parser.y" +#line 899 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 4017 "bison_parser.cpp" +#line 4006 "bison_parser.cpp" break; case 131: /* opt_limit: LIMIT expr OFFSET expr */ -#line 899 "bison_parser.y" +#line 900 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4023 "bison_parser.cpp" +#line 4012 "bison_parser.cpp" break; case 132: /* opt_limit: LIMIT ALL */ -#line 900 "bison_parser.y" +#line 901 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, nullptr); } -#line 4029 "bison_parser.cpp" +#line 4018 "bison_parser.cpp" break; case 133: /* opt_limit: LIMIT ALL OFFSET expr */ -#line 901 "bison_parser.y" +#line 902 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 4035 "bison_parser.cpp" +#line 4024 "bison_parser.cpp" break; case 134: /* opt_limit: %empty */ -#line 902 "bison_parser.y" +#line 903 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 4041 "bison_parser.cpp" +#line 4030 "bison_parser.cpp" break; case 135: /* expr_list: expr_alias */ -#line 909 "bison_parser.y" +#line 910 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4047 "bison_parser.cpp" +#line 4036 "bison_parser.cpp" break; case 136: /* expr_list: expr_list ',' expr_alias */ -#line 910 "bison_parser.y" +#line 911 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4053 "bison_parser.cpp" +#line 4042 "bison_parser.cpp" break; case 137: /* opt_literal_list: literal_list */ -#line 914 "bison_parser.y" +#line 915 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[0].expr_vec); } -#line 4059 "bison_parser.cpp" +#line 4048 "bison_parser.cpp" break; case 138: /* opt_literal_list: %empty */ -#line 915 "bison_parser.y" +#line 916 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 4065 "bison_parser.cpp" +#line 4054 "bison_parser.cpp" break; case 139: /* literal_list: literal */ -#line 919 "bison_parser.y" +#line 920 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4071 "bison_parser.cpp" +#line 4060 "bison_parser.cpp" break; case 140: /* literal_list: literal_list ',' literal */ -#line 920 "bison_parser.y" +#line 921 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4077 "bison_parser.cpp" +#line 4066 "bison_parser.cpp" break; case 141: /* expr_alias: expr opt_alias */ -#line 924 "bison_parser.y" +#line 925 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); if ((yyvsp[0].alias_t)) { @@ -4085,421 +4074,421 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].alias_t); } } -#line 4089 "bison_parser.cpp" +#line 4078 "bison_parser.cpp" break; case 147: /* operand: '(' expr ')' */ -#line 942 "bison_parser.y" +#line 943 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); } -#line 4095 "bison_parser.cpp" +#line 4084 "bison_parser.cpp" break; case 157: /* operand: '(' select_no_paren ')' */ -#line 952 "bison_parser.y" +#line 953 "bison_parser.y" { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 4101 "bison_parser.cpp" +#line 4090 "bison_parser.cpp" break; case 160: /* unary_expr: '-' operand */ -#line 961 "bison_parser.y" +#line 962 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 4107 "bison_parser.cpp" +#line 4096 "bison_parser.cpp" break; case 161: /* unary_expr: NOT operand */ -#line 962 "bison_parser.y" +#line 963 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 4113 "bison_parser.cpp" +#line 4102 "bison_parser.cpp" break; case 162: /* unary_expr: operand ISNULL */ -#line 963 "bison_parser.y" +#line 964 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 4119 "bison_parser.cpp" +#line 4108 "bison_parser.cpp" break; case 163: /* unary_expr: operand IS NULL */ -#line 964 "bison_parser.y" +#line 965 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 4125 "bison_parser.cpp" +#line 4114 "bison_parser.cpp" break; case 164: /* unary_expr: operand IS NOT NULL */ -#line 965 "bison_parser.y" +#line 966 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 4131 "bison_parser.cpp" +#line 4120 "bison_parser.cpp" break; case 166: /* binary_expr: operand '-' operand */ -#line 970 "bison_parser.y" +#line 971 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 4137 "bison_parser.cpp" +#line 4126 "bison_parser.cpp" break; case 167: /* binary_expr: operand '+' operand */ -#line 971 "bison_parser.y" +#line 972 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 4143 "bison_parser.cpp" +#line 4132 "bison_parser.cpp" break; case 168: /* binary_expr: operand '/' operand */ -#line 972 "bison_parser.y" +#line 973 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 4149 "bison_parser.cpp" +#line 4138 "bison_parser.cpp" break; case 169: /* binary_expr: operand '*' operand */ -#line 973 "bison_parser.y" +#line 974 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 4155 "bison_parser.cpp" +#line 4144 "bison_parser.cpp" break; case 170: /* binary_expr: operand '%' operand */ -#line 974 "bison_parser.y" +#line 975 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 4161 "bison_parser.cpp" +#line 4150 "bison_parser.cpp" break; case 171: /* binary_expr: operand '^' operand */ -#line 975 "bison_parser.y" +#line 976 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 4167 "bison_parser.cpp" +#line 4156 "bison_parser.cpp" break; case 172: /* binary_expr: operand LIKE operand */ -#line 976 "bison_parser.y" +#line 977 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 4173 "bison_parser.cpp" +#line 4162 "bison_parser.cpp" break; case 173: /* binary_expr: operand NOT LIKE operand */ -#line 977 "bison_parser.y" +#line 978 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 4179 "bison_parser.cpp" +#line 4168 "bison_parser.cpp" break; case 174: /* binary_expr: operand ILIKE operand */ -#line 978 "bison_parser.y" +#line 979 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 4185 "bison_parser.cpp" +#line 4174 "bison_parser.cpp" break; case 175: /* binary_expr: operand CONCAT operand */ -#line 979 "bison_parser.y" +#line 980 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 4191 "bison_parser.cpp" +#line 4180 "bison_parser.cpp" break; case 176: /* logic_expr: expr AND expr */ -#line 983 "bison_parser.y" +#line 984 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 4197 "bison_parser.cpp" +#line 4186 "bison_parser.cpp" break; case 177: /* logic_expr: expr OR expr */ -#line 984 "bison_parser.y" +#line 985 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 4203 "bison_parser.cpp" +#line 4192 "bison_parser.cpp" break; case 178: /* in_expr: operand IN '(' expr_list ')' */ -#line 988 "bison_parser.y" +#line 989 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 4209 "bison_parser.cpp" +#line 4198 "bison_parser.cpp" break; case 179: /* in_expr: operand NOT IN '(' expr_list ')' */ -#line 989 "bison_parser.y" +#line 990 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 4215 "bison_parser.cpp" +#line 4204 "bison_parser.cpp" break; case 180: /* in_expr: operand IN '(' select_no_paren ')' */ -#line 990 "bison_parser.y" +#line 991 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 4221 "bison_parser.cpp" +#line 4210 "bison_parser.cpp" break; case 181: /* in_expr: operand NOT IN '(' select_no_paren ')' */ -#line 991 "bison_parser.y" +#line 992 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 4227 "bison_parser.cpp" +#line 4216 "bison_parser.cpp" break; case 182: /* case_expr: CASE expr case_list END */ -#line 997 "bison_parser.y" +#line 998 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } -#line 4233 "bison_parser.cpp" +#line 4222 "bison_parser.cpp" break; case 183: /* case_expr: CASE expr case_list ELSE expr END */ -#line 998 "bison_parser.y" +#line 999 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4239 "bison_parser.cpp" +#line 4228 "bison_parser.cpp" break; case 184: /* case_expr: CASE case_list END */ -#line 999 "bison_parser.y" +#line 1000 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } -#line 4245 "bison_parser.cpp" +#line 4234 "bison_parser.cpp" break; case 185: /* case_expr: CASE case_list ELSE expr END */ -#line 1000 "bison_parser.y" +#line 1001 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4251 "bison_parser.cpp" +#line 4240 "bison_parser.cpp" break; case 186: /* case_list: WHEN expr THEN expr */ -#line 1004 "bison_parser.y" +#line 1005 "bison_parser.y" { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4257 "bison_parser.cpp" +#line 4246 "bison_parser.cpp" break; case 187: /* case_list: case_list WHEN expr THEN expr */ -#line 1005 "bison_parser.y" +#line 1006 "bison_parser.y" { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4263 "bison_parser.cpp" +#line 4252 "bison_parser.cpp" break; case 188: /* exists_expr: EXISTS '(' select_no_paren ')' */ -#line 1009 "bison_parser.y" +#line 1010 "bison_parser.y" { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 4269 "bison_parser.cpp" +#line 4258 "bison_parser.cpp" break; case 189: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ -#line 1010 "bison_parser.y" +#line 1011 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 4275 "bison_parser.cpp" +#line 4264 "bison_parser.cpp" break; case 190: /* comp_expr: operand '=' operand */ -#line 1014 "bison_parser.y" +#line 1015 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4281 "bison_parser.cpp" +#line 4270 "bison_parser.cpp" break; case 191: /* comp_expr: operand EQUALS operand */ -#line 1015 "bison_parser.y" +#line 1016 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4287 "bison_parser.cpp" +#line 4276 "bison_parser.cpp" break; case 192: /* comp_expr: operand NOTEQUALS operand */ -#line 1016 "bison_parser.y" +#line 1017 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 4293 "bison_parser.cpp" +#line 4282 "bison_parser.cpp" break; case 193: /* comp_expr: operand '<' operand */ -#line 1017 "bison_parser.y" +#line 1018 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 4299 "bison_parser.cpp" +#line 4288 "bison_parser.cpp" break; case 194: /* comp_expr: operand '>' operand */ -#line 1018 "bison_parser.y" +#line 1019 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 4305 "bison_parser.cpp" +#line 4294 "bison_parser.cpp" break; case 195: /* comp_expr: operand LESSEQ operand */ -#line 1019 "bison_parser.y" +#line 1020 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 4311 "bison_parser.cpp" +#line 4300 "bison_parser.cpp" break; case 196: /* comp_expr: operand GREATEREQ operand */ -#line 1020 "bison_parser.y" +#line 1021 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 4317 "bison_parser.cpp" +#line 4306 "bison_parser.cpp" break; case 197: /* function_expr: IDENTIFIER '(' ')' */ -#line 1024 "bison_parser.y" +#line 1025 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 4323 "bison_parser.cpp" +#line 4312 "bison_parser.cpp" break; case 198: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ -#line 1025 "bison_parser.y" +#line 1026 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 4329 "bison_parser.cpp" +#line 4318 "bison_parser.cpp" break; case 199: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ -#line 1029 "bison_parser.y" +#line 1030 "bison_parser.y" { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } -#line 4335 "bison_parser.cpp" +#line 4324 "bison_parser.cpp" break; case 200: /* cast_expr: CAST '(' expr AS column_type ')' */ -#line 1033 "bison_parser.y" +#line 1034 "bison_parser.y" { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } -#line 4341 "bison_parser.cpp" +#line 4330 "bison_parser.cpp" break; case 201: /* datetime_field: SECOND */ -#line 1037 "bison_parser.y" +#line 1038 "bison_parser.y" { (yyval.datetime_field) = kDatetimeSecond; } -#line 4347 "bison_parser.cpp" +#line 4336 "bison_parser.cpp" break; case 202: /* datetime_field: MINUTE */ -#line 1038 "bison_parser.y" +#line 1039 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMinute; } -#line 4353 "bison_parser.cpp" +#line 4342 "bison_parser.cpp" break; case 203: /* datetime_field: HOUR */ -#line 1039 "bison_parser.y" +#line 1040 "bison_parser.y" { (yyval.datetime_field) = kDatetimeHour; } -#line 4359 "bison_parser.cpp" +#line 4348 "bison_parser.cpp" break; case 204: /* datetime_field: DAY */ -#line 1040 "bison_parser.y" +#line 1041 "bison_parser.y" { (yyval.datetime_field) = kDatetimeDay; } -#line 4365 "bison_parser.cpp" +#line 4354 "bison_parser.cpp" break; case 205: /* datetime_field: MONTH */ -#line 1041 "bison_parser.y" +#line 1042 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMonth; } -#line 4371 "bison_parser.cpp" +#line 4360 "bison_parser.cpp" break; case 206: /* datetime_field: YEAR */ -#line 1042 "bison_parser.y" +#line 1043 "bison_parser.y" { (yyval.datetime_field) = kDatetimeYear; } -#line 4377 "bison_parser.cpp" +#line 4366 "bison_parser.cpp" break; case 207: /* array_expr: ARRAY '[' expr_list ']' */ -#line 1046 "bison_parser.y" +#line 1047 "bison_parser.y" { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 4383 "bison_parser.cpp" +#line 4372 "bison_parser.cpp" break; case 208: /* array_index: operand '[' int_literal ']' */ -#line 1050 "bison_parser.y" +#line 1051 "bison_parser.y" { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 4389 "bison_parser.cpp" +#line 4378 "bison_parser.cpp" break; case 209: /* between_expr: operand BETWEEN operand AND operand */ -#line 1054 "bison_parser.y" +#line 1055 "bison_parser.y" { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4395 "bison_parser.cpp" +#line 4384 "bison_parser.cpp" break; case 210: /* column_name: IDENTIFIER */ -#line 1058 "bison_parser.y" +#line 1059 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 4401 "bison_parser.cpp" +#line 4390 "bison_parser.cpp" break; case 211: /* column_name: IDENTIFIER '.' IDENTIFIER */ -#line 1059 "bison_parser.y" +#line 1060 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 4407 "bison_parser.cpp" +#line 4396 "bison_parser.cpp" break; case 212: /* column_name: '*' */ -#line 1060 "bison_parser.y" +#line 1061 "bison_parser.y" { (yyval.expr) = Expr::makeStar(); } -#line 4413 "bison_parser.cpp" +#line 4402 "bison_parser.cpp" break; case 213: /* column_name: IDENTIFIER '.' '*' */ -#line 1061 "bison_parser.y" +#line 1062 "bison_parser.y" { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 4419 "bison_parser.cpp" +#line 4408 "bison_parser.cpp" break; case 219: /* string_literal: STRING */ -#line 1073 "bison_parser.y" +#line 1074 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 4425 "bison_parser.cpp" +#line 4414 "bison_parser.cpp" break; case 220: /* bool_literal: TRUE */ -#line 1077 "bison_parser.y" +#line 1078 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(true); } -#line 4431 "bison_parser.cpp" +#line 4420 "bison_parser.cpp" break; case 221: /* bool_literal: FALSE */ -#line 1078 "bison_parser.y" +#line 1079 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(false); } -#line 4437 "bison_parser.cpp" +#line 4426 "bison_parser.cpp" break; case 222: /* num_literal: FLOATVAL */ -#line 1082 "bison_parser.y" +#line 1083 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 4443 "bison_parser.cpp" +#line 4432 "bison_parser.cpp" break; case 224: /* int_literal: INTVAL */ -#line 1087 "bison_parser.y" +#line 1088 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 4449 "bison_parser.cpp" +#line 4438 "bison_parser.cpp" break; case 225: /* null_literal: NULL */ -#line 1091 "bison_parser.y" +#line 1092 "bison_parser.y" { (yyval.expr) = Expr::makeNullLiteral(); } -#line 4455 "bison_parser.cpp" +#line 4444 "bison_parser.cpp" break; case 226: /* param_expr: '?' */ -#line 1095 "bison_parser.y" +#line 1096 "bison_parser.y" { (yyval.expr) = Expr::makeParameter(yylloc.total_column); (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 4465 "bison_parser.cpp" +#line 4454 "bison_parser.cpp" break; case 228: /* table_ref: table_ref_commalist ',' table_ref_atomic */ -#line 1108 "bison_parser.y" +#line 1109 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); auto tbl = new TableRef(kTableCrossProduct); tbl->list = (yyvsp[-2].table_vec); (yyval.table) = tbl; } -#line 4476 "bison_parser.cpp" +#line 4465 "bison_parser.cpp" break; case 232: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ -#line 1124 "bison_parser.y" +#line 1125 "bison_parser.y" { auto tbl = new TableRef(kTableSelect); tbl->select = (yyvsp[-2].select_stmt); tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4487 "bison_parser.cpp" +#line 4476 "bison_parser.cpp" break; case 233: /* table_ref_commalist: table_ref_atomic */ -#line 1133 "bison_parser.y" +#line 1134 "bison_parser.y" { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 4493 "bison_parser.cpp" +#line 4482 "bison_parser.cpp" break; case 234: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ -#line 1134 "bison_parser.y" +#line 1135 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 4499 "bison_parser.cpp" +#line 4488 "bison_parser.cpp" break; case 235: /* table_ref_name: table_name opt_table_alias */ -#line 1139 "bison_parser.y" +#line 1140 "bison_parser.y" { auto tbl = new TableRef(kTableName); tbl->schema = (yyvsp[-1].table_name).schema; @@ -4507,121 +4496,121 @@ YYLTYPE yylloc = yyloc_default; tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4511 "bison_parser.cpp" +#line 4500 "bison_parser.cpp" break; case 236: /* table_ref_name_no_alias: table_name */ -#line 1150 "bison_parser.y" +#line 1151 "bison_parser.y" { (yyval.table) = new TableRef(kTableName); (yyval.table)->schema = (yyvsp[0].table_name).schema; (yyval.table)->name = (yyvsp[0].table_name).name; } -#line 4521 "bison_parser.cpp" +#line 4510 "bison_parser.cpp" break; case 237: /* table_name: IDENTIFIER */ -#line 1159 "bison_parser.y" +#line 1160 "bison_parser.y" { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} -#line 4527 "bison_parser.cpp" +#line 4516 "bison_parser.cpp" break; case 238: /* table_name: IDENTIFIER '.' IDENTIFIER */ -#line 1160 "bison_parser.y" +#line 1161 "bison_parser.y" { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } -#line 4533 "bison_parser.cpp" +#line 4522 "bison_parser.cpp" break; case 239: /* opt_index_name: IDENTIFIER */ -#line 1164 "bison_parser.y" +#line 1165 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4539 "bison_parser.cpp" +#line 4528 "bison_parser.cpp" break; case 240: /* opt_index_name: %empty */ -#line 1165 "bison_parser.y" +#line 1166 "bison_parser.y" { (yyval.sval) = nullptr;} -#line 4545 "bison_parser.cpp" +#line 4534 "bison_parser.cpp" break; case 241: /* index_name: IDENTIFIER */ -#line 1169 "bison_parser.y" +#line 1170 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4551 "bison_parser.cpp" +#line 4540 "bison_parser.cpp" break; case 243: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ -#line 1175 "bison_parser.y" +#line 1176 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } -#line 4557 "bison_parser.cpp" +#line 4546 "bison_parser.cpp" break; case 245: /* opt_table_alias: %empty */ -#line 1181 "bison_parser.y" +#line 1182 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4563 "bison_parser.cpp" +#line 4552 "bison_parser.cpp" break; case 246: /* alias: AS IDENTIFIER */ -#line 1186 "bison_parser.y" +#line 1187 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4569 "bison_parser.cpp" +#line 4558 "bison_parser.cpp" break; case 247: /* alias: IDENTIFIER */ -#line 1187 "bison_parser.y" +#line 1188 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4575 "bison_parser.cpp" +#line 4564 "bison_parser.cpp" break; case 249: /* opt_alias: %empty */ -#line 1193 "bison_parser.y" +#line 1194 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4581 "bison_parser.cpp" +#line 4570 "bison_parser.cpp" break; case 251: /* opt_with_clause: %empty */ -#line 1203 "bison_parser.y" +#line 1204 "bison_parser.y" { (yyval.with_description_vec) = nullptr; } -#line 4587 "bison_parser.cpp" +#line 4576 "bison_parser.cpp" break; case 252: /* with_clause: WITH with_description_list */ -#line 1207 "bison_parser.y" +#line 1208 "bison_parser.y" { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } -#line 4593 "bison_parser.cpp" +#line 4582 "bison_parser.cpp" break; case 253: /* with_description_list: with_description */ -#line 1211 "bison_parser.y" +#line 1212 "bison_parser.y" { (yyval.with_description_vec) = new std::vector(); (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); } -#line 4602 "bison_parser.cpp" +#line 4591 "bison_parser.cpp" break; case 254: /* with_description_list: with_description_list ',' with_description */ -#line 1215 "bison_parser.y" +#line 1216 "bison_parser.y" { (yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t)); (yyval.with_description_vec) = (yyvsp[-2].with_description_vec); } -#line 4611 "bison_parser.cpp" +#line 4600 "bison_parser.cpp" break; case 255: /* with_description: IDENTIFIER AS select_with_paren */ -#line 1222 "bison_parser.y" +#line 1223 "bison_parser.y" { (yyval.with_description_t) = new WithDescription(); (yyval.with_description_t)->alias = (yyvsp[-2].sval); (yyval.with_description_t)->select = (yyvsp[0].select_stmt); } -#line 4621 "bison_parser.cpp" +#line 4610 "bison_parser.cpp" break; case 256: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ -#line 1236 "bison_parser.y" +#line 1237 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4629,11 +4618,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 4633 "bison_parser.cpp" +#line 4622 "bison_parser.cpp" break; case 257: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ -#line 1244 "bison_parser.y" +#line 1245 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4642,11 +4631,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 4646 "bison_parser.cpp" +#line 4635 "bison_parser.cpp" break; case 258: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ -#line 1254 "bison_parser.y" +#line 1255 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4662,83 +4651,83 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } -#line 4666 "bison_parser.cpp" +#line 4655 "bison_parser.cpp" break; case 259: /* opt_join_type: INNER */ -#line 1272 "bison_parser.y" +#line 1273 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4672 "bison_parser.cpp" +#line 4661 "bison_parser.cpp" break; case 260: /* opt_join_type: LEFT OUTER */ -#line 1273 "bison_parser.y" +#line 1274 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4678 "bison_parser.cpp" +#line 4667 "bison_parser.cpp" break; case 261: /* opt_join_type: LEFT */ -#line 1274 "bison_parser.y" +#line 1275 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4684 "bison_parser.cpp" +#line 4673 "bison_parser.cpp" break; case 262: /* opt_join_type: RIGHT OUTER */ -#line 1275 "bison_parser.y" +#line 1276 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4690 "bison_parser.cpp" +#line 4679 "bison_parser.cpp" break; case 263: /* opt_join_type: RIGHT */ -#line 1276 "bison_parser.y" +#line 1277 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4696 "bison_parser.cpp" +#line 4685 "bison_parser.cpp" break; case 264: /* opt_join_type: FULL OUTER */ -#line 1277 "bison_parser.y" +#line 1278 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4702 "bison_parser.cpp" +#line 4691 "bison_parser.cpp" break; case 265: /* opt_join_type: OUTER */ -#line 1278 "bison_parser.y" +#line 1279 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4708 "bison_parser.cpp" +#line 4697 "bison_parser.cpp" break; case 266: /* opt_join_type: FULL */ -#line 1279 "bison_parser.y" +#line 1280 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4714 "bison_parser.cpp" +#line 4703 "bison_parser.cpp" break; case 267: /* opt_join_type: CROSS */ -#line 1280 "bison_parser.y" +#line 1281 "bison_parser.y" { (yyval.uval) = kJoinCross; } -#line 4720 "bison_parser.cpp" +#line 4709 "bison_parser.cpp" break; case 268: /* opt_join_type: %empty */ -#line 1281 "bison_parser.y" +#line 1282 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4726 "bison_parser.cpp" +#line 4715 "bison_parser.cpp" break; case 272: /* ident_commalist: IDENTIFIER */ -#line 1301 "bison_parser.y" +#line 1302 "bison_parser.y" { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 4732 "bison_parser.cpp" +#line 4721 "bison_parser.cpp" break; case 273: /* ident_commalist: ident_commalist ',' IDENTIFIER */ -#line 1302 "bison_parser.y" +#line 1303 "bison_parser.y" { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 4738 "bison_parser.cpp" +#line 4727 "bison_parser.cpp" break; -#line 4742 "bison_parser.cpp" +#line 4731 "bison_parser.cpp" default: break; } @@ -4968,7 +4957,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 1305 "bison_parser.y" +#line 1306 "bison_parser.y" /********************************* ** Section 4: Additional C code diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 88a3d02a..e0eff712 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -634,15 +634,10 @@ alter_statement: $$->if_exists = $6; $$->schema = $3.schema; $$->name = $3.name; - $$->column_name = $6->name; + $$->column_name = $7->name; } ; -opt_exists: - IF EXISTS { $$ = true; } - | /* empty */ { $$ = false; } - ; - /****************************** * Delete Statement / Truncate statement * DELETE FROM students WHERE grade > 3.0 From 67e6d65ecc5ae7d30f6738aa103971e4afa5cb94 Mon Sep 17 00:00:00 2001 From: Moritz Spranger Date: Tue, 20 Jul 2021 19:12:08 +0200 Subject: [PATCH 29/73] Fix decimal --- src/parser/bison_parser.cpp | 2761 ++++++++++++++++++----------------- src/parser/bison_parser.h | 3 +- src/parser/bison_parser.y | 11 +- src/sql/ColumnType.h | 10 +- src/sql/statements.cpp | 9 +- 5 files changed, 1425 insertions(+), 1369 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 4513d40e..f59b70eb 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -328,93 +328,94 @@ enum yysymbol_kind_t YYSYMBOL_column_def_commalist = 194, /* column_def_commalist */ YYSYMBOL_column_def = 195, /* column_def */ YYSYMBOL_column_type = 196, /* column_type */ - YYSYMBOL_opt_column_nullable = 197, /* opt_column_nullable */ - YYSYMBOL_opt_column_constraint = 198, /* opt_column_constraint */ - YYSYMBOL_opt_table_key_constraints = 199, /* opt_table_key_constraints */ - YYSYMBOL_table_key_constraint = 200, /* table_key_constraint */ - YYSYMBOL_drop_statement = 201, /* drop_statement */ - YYSYMBOL_opt_exists = 202, /* opt_exists */ - YYSYMBOL_delete_statement = 203, /* delete_statement */ - YYSYMBOL_truncate_statement = 204, /* truncate_statement */ - YYSYMBOL_insert_statement = 205, /* insert_statement */ - YYSYMBOL_opt_column_list = 206, /* opt_column_list */ - YYSYMBOL_update_statement = 207, /* update_statement */ - YYSYMBOL_update_clause_commalist = 208, /* update_clause_commalist */ - YYSYMBOL_update_clause = 209, /* update_clause */ - YYSYMBOL_select_statement = 210, /* select_statement */ - YYSYMBOL_select_within_set_operation = 211, /* select_within_set_operation */ - YYSYMBOL_select_within_set_operation_no_parentheses = 212, /* select_within_set_operation_no_parentheses */ - YYSYMBOL_select_with_paren = 213, /* select_with_paren */ - YYSYMBOL_select_no_paren = 214, /* select_no_paren */ - YYSYMBOL_set_operator = 215, /* set_operator */ - YYSYMBOL_set_type = 216, /* set_type */ - YYSYMBOL_opt_all = 217, /* opt_all */ - YYSYMBOL_select_clause = 218, /* select_clause */ - YYSYMBOL_opt_distinct = 219, /* opt_distinct */ - YYSYMBOL_select_list = 220, /* select_list */ - YYSYMBOL_opt_from_clause = 221, /* opt_from_clause */ - YYSYMBOL_from_clause = 222, /* from_clause */ - YYSYMBOL_opt_where = 223, /* opt_where */ - YYSYMBOL_opt_group = 224, /* opt_group */ - YYSYMBOL_opt_having = 225, /* opt_having */ - YYSYMBOL_opt_order = 226, /* opt_order */ - YYSYMBOL_order_list = 227, /* order_list */ - YYSYMBOL_order_desc = 228, /* order_desc */ - YYSYMBOL_opt_order_type = 229, /* opt_order_type */ - YYSYMBOL_opt_top = 230, /* opt_top */ - YYSYMBOL_opt_limit = 231, /* opt_limit */ - YYSYMBOL_expr_list = 232, /* expr_list */ - YYSYMBOL_opt_literal_list = 233, /* opt_literal_list */ - YYSYMBOL_literal_list = 234, /* literal_list */ - YYSYMBOL_expr_alias = 235, /* expr_alias */ - YYSYMBOL_expr = 236, /* expr */ - YYSYMBOL_operand = 237, /* operand */ - YYSYMBOL_scalar_expr = 238, /* scalar_expr */ - YYSYMBOL_unary_expr = 239, /* unary_expr */ - YYSYMBOL_binary_expr = 240, /* binary_expr */ - YYSYMBOL_logic_expr = 241, /* logic_expr */ - YYSYMBOL_in_expr = 242, /* in_expr */ - YYSYMBOL_case_expr = 243, /* case_expr */ - YYSYMBOL_case_list = 244, /* case_list */ - YYSYMBOL_exists_expr = 245, /* exists_expr */ - YYSYMBOL_comp_expr = 246, /* comp_expr */ - YYSYMBOL_function_expr = 247, /* function_expr */ - YYSYMBOL_extract_expr = 248, /* extract_expr */ - YYSYMBOL_cast_expr = 249, /* cast_expr */ - YYSYMBOL_datetime_field = 250, /* datetime_field */ - YYSYMBOL_array_expr = 251, /* array_expr */ - YYSYMBOL_array_index = 252, /* array_index */ - YYSYMBOL_between_expr = 253, /* between_expr */ - YYSYMBOL_column_name = 254, /* column_name */ - YYSYMBOL_literal = 255, /* literal */ - YYSYMBOL_string_literal = 256, /* string_literal */ - YYSYMBOL_bool_literal = 257, /* bool_literal */ - YYSYMBOL_num_literal = 258, /* num_literal */ - YYSYMBOL_int_literal = 259, /* int_literal */ - YYSYMBOL_null_literal = 260, /* null_literal */ - YYSYMBOL_param_expr = 261, /* param_expr */ - YYSYMBOL_table_ref = 262, /* table_ref */ - YYSYMBOL_table_ref_atomic = 263, /* table_ref_atomic */ - YYSYMBOL_nonjoin_table_ref_atomic = 264, /* nonjoin_table_ref_atomic */ - YYSYMBOL_table_ref_commalist = 265, /* table_ref_commalist */ - YYSYMBOL_table_ref_name = 266, /* table_ref_name */ - YYSYMBOL_table_ref_name_no_alias = 267, /* table_ref_name_no_alias */ - YYSYMBOL_table_name = 268, /* table_name */ - YYSYMBOL_opt_index_name = 269, /* opt_index_name */ - YYSYMBOL_index_name = 270, /* index_name */ - YYSYMBOL_table_alias = 271, /* table_alias */ - YYSYMBOL_opt_table_alias = 272, /* opt_table_alias */ - YYSYMBOL_alias = 273, /* alias */ - YYSYMBOL_opt_alias = 274, /* opt_alias */ - YYSYMBOL_opt_with_clause = 275, /* opt_with_clause */ - YYSYMBOL_with_clause = 276, /* with_clause */ - YYSYMBOL_with_description_list = 277, /* with_description_list */ - YYSYMBOL_with_description = 278, /* with_description */ - YYSYMBOL_join_clause = 279, /* join_clause */ - YYSYMBOL_opt_join_type = 280, /* opt_join_type */ - YYSYMBOL_join_condition = 281, /* join_condition */ - YYSYMBOL_opt_semicolon = 282, /* opt_semicolon */ - YYSYMBOL_ident_commalist = 283 /* ident_commalist */ + YYSYMBOL_opt_decimal_specification = 197, /* opt_decimal_specification */ + YYSYMBOL_opt_column_nullable = 198, /* opt_column_nullable */ + YYSYMBOL_opt_column_constraint = 199, /* opt_column_constraint */ + YYSYMBOL_opt_table_key_constraints = 200, /* opt_table_key_constraints */ + YYSYMBOL_table_key_constraint = 201, /* table_key_constraint */ + YYSYMBOL_drop_statement = 202, /* drop_statement */ + YYSYMBOL_opt_exists = 203, /* opt_exists */ + YYSYMBOL_delete_statement = 204, /* delete_statement */ + YYSYMBOL_truncate_statement = 205, /* truncate_statement */ + YYSYMBOL_insert_statement = 206, /* insert_statement */ + YYSYMBOL_opt_column_list = 207, /* opt_column_list */ + YYSYMBOL_update_statement = 208, /* update_statement */ + YYSYMBOL_update_clause_commalist = 209, /* update_clause_commalist */ + YYSYMBOL_update_clause = 210, /* update_clause */ + YYSYMBOL_select_statement = 211, /* select_statement */ + YYSYMBOL_select_within_set_operation = 212, /* select_within_set_operation */ + YYSYMBOL_select_within_set_operation_no_parentheses = 213, /* select_within_set_operation_no_parentheses */ + YYSYMBOL_select_with_paren = 214, /* select_with_paren */ + YYSYMBOL_select_no_paren = 215, /* select_no_paren */ + YYSYMBOL_set_operator = 216, /* set_operator */ + YYSYMBOL_set_type = 217, /* set_type */ + YYSYMBOL_opt_all = 218, /* opt_all */ + YYSYMBOL_select_clause = 219, /* select_clause */ + YYSYMBOL_opt_distinct = 220, /* opt_distinct */ + YYSYMBOL_select_list = 221, /* select_list */ + YYSYMBOL_opt_from_clause = 222, /* opt_from_clause */ + YYSYMBOL_from_clause = 223, /* from_clause */ + YYSYMBOL_opt_where = 224, /* opt_where */ + YYSYMBOL_opt_group = 225, /* opt_group */ + YYSYMBOL_opt_having = 226, /* opt_having */ + YYSYMBOL_opt_order = 227, /* opt_order */ + YYSYMBOL_order_list = 228, /* order_list */ + YYSYMBOL_order_desc = 229, /* order_desc */ + YYSYMBOL_opt_order_type = 230, /* opt_order_type */ + YYSYMBOL_opt_top = 231, /* opt_top */ + YYSYMBOL_opt_limit = 232, /* opt_limit */ + YYSYMBOL_expr_list = 233, /* expr_list */ + YYSYMBOL_opt_literal_list = 234, /* opt_literal_list */ + YYSYMBOL_literal_list = 235, /* literal_list */ + YYSYMBOL_expr_alias = 236, /* expr_alias */ + YYSYMBOL_expr = 237, /* expr */ + YYSYMBOL_operand = 238, /* operand */ + YYSYMBOL_scalar_expr = 239, /* scalar_expr */ + YYSYMBOL_unary_expr = 240, /* unary_expr */ + YYSYMBOL_binary_expr = 241, /* binary_expr */ + YYSYMBOL_logic_expr = 242, /* logic_expr */ + YYSYMBOL_in_expr = 243, /* in_expr */ + YYSYMBOL_case_expr = 244, /* case_expr */ + YYSYMBOL_case_list = 245, /* case_list */ + YYSYMBOL_exists_expr = 246, /* exists_expr */ + YYSYMBOL_comp_expr = 247, /* comp_expr */ + YYSYMBOL_function_expr = 248, /* function_expr */ + YYSYMBOL_extract_expr = 249, /* extract_expr */ + YYSYMBOL_cast_expr = 250, /* cast_expr */ + YYSYMBOL_datetime_field = 251, /* datetime_field */ + YYSYMBOL_array_expr = 252, /* array_expr */ + YYSYMBOL_array_index = 253, /* array_index */ + YYSYMBOL_between_expr = 254, /* between_expr */ + YYSYMBOL_column_name = 255, /* column_name */ + YYSYMBOL_literal = 256, /* literal */ + YYSYMBOL_string_literal = 257, /* string_literal */ + YYSYMBOL_bool_literal = 258, /* bool_literal */ + YYSYMBOL_num_literal = 259, /* num_literal */ + YYSYMBOL_int_literal = 260, /* int_literal */ + YYSYMBOL_null_literal = 261, /* null_literal */ + YYSYMBOL_param_expr = 262, /* param_expr */ + YYSYMBOL_table_ref = 263, /* table_ref */ + YYSYMBOL_table_ref_atomic = 264, /* table_ref_atomic */ + YYSYMBOL_nonjoin_table_ref_atomic = 265, /* nonjoin_table_ref_atomic */ + YYSYMBOL_table_ref_commalist = 266, /* table_ref_commalist */ + YYSYMBOL_table_ref_name = 267, /* table_ref_name */ + YYSYMBOL_table_ref_name_no_alias = 268, /* table_ref_name_no_alias */ + YYSYMBOL_table_name = 269, /* table_name */ + YYSYMBOL_opt_index_name = 270, /* opt_index_name */ + YYSYMBOL_index_name = 271, /* index_name */ + YYSYMBOL_table_alias = 272, /* table_alias */ + YYSYMBOL_opt_table_alias = 273, /* opt_table_alias */ + YYSYMBOL_alias = 274, /* alias */ + YYSYMBOL_opt_alias = 275, /* opt_alias */ + YYSYMBOL_opt_with_clause = 276, /* opt_with_clause */ + YYSYMBOL_with_clause = 277, /* with_clause */ + YYSYMBOL_with_description_list = 278, /* with_description_list */ + YYSYMBOL_with_description = 279, /* with_description */ + YYSYMBOL_join_clause = 280, /* join_clause */ + YYSYMBOL_opt_join_type = 281, /* opt_join_type */ + YYSYMBOL_join_condition = 282, /* join_condition */ + YYSYMBOL_opt_semicolon = 283, /* opt_semicolon */ + YYSYMBOL_ident_commalist = 284 /* ident_commalist */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -739,16 +740,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 64 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 813 +#define YYLAST 833 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 173 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 111 +#define YYNNTS 112 /* YYNRULES -- Number of rules. */ -#define YYNRULES 279 +#define YYNRULES 282 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 519 +#define YYNSTATES 521 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 410 @@ -813,34 +814,35 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 277, 277, 298, 304, 313, 317, 321, 324, 327, - 334, 335, 336, 337, 338, 339, 340, 341, 342, 351, - 352, 357, 358, 362, 366, 378, 381, 384, 390, 391, - 398, 405, 408, 412, 426, 432, 441, 458, 462, 465, - 474, 488, 491, 496, 510, 523, 531, 538, 545, 556, - 557, 561, 562, 566, 572, 573, 574, 575, 576, 577, - 578, 579, 580, 581, 582, 583, 584, 585, 589, 590, - 591, 595, 596, 597, 601, 602, 603, 607, 608, 616, - 622, 628, 633, 642, 643, 652, 661, 674, 681, 692, - 693, 703, 712, 713, 717, 729, 733, 737, 751, 752, - 755, 756, 767, 768, 772, 782, 795, 802, 806, 810, - 817, 820, 826, 838, 839, 843, 847, 848, 852, 857, - 858, 862, 867, 871, 872, 876, 877, 881, 882, 886, - 890, 891, 892, 898, 899, 903, 904, 905, 906, 907, - 908, 915, 916, 920, 921, 925, 926, 930, 940, 941, - 942, 943, 944, 948, 949, 950, 951, 952, 953, 954, - 955, 956, 957, 958, 962, 963, 967, 968, 969, 970, - 971, 975, 976, 977, 978, 979, 980, 981, 982, 983, - 984, 985, 989, 990, 994, 995, 996, 997, 1003, 1004, - 1005, 1006, 1010, 1011, 1015, 1016, 1020, 1021, 1022, 1023, - 1024, 1025, 1026, 1030, 1031, 1035, 1039, 1043, 1044, 1045, - 1046, 1047, 1048, 1052, 1056, 1060, 1064, 1065, 1066, 1067, - 1071, 1072, 1073, 1074, 1075, 1079, 1083, 1084, 1088, 1089, - 1093, 1097, 1101, 1113, 1114, 1124, 1125, 1129, 1130, 1139, - 1140, 1145, 1156, 1165, 1166, 1170, 1171, 1175, 1180, 1181, - 1186, 1187, 1192, 1193, 1198, 1199, 1208, 1209, 1213, 1217, - 1221, 1228, 1241, 1249, 1259, 1278, 1279, 1280, 1281, 1282, - 1283, 1284, 1285, 1286, 1287, 1292, 1301, 1302, 1307, 1308 + 0, 279, 279, 300, 306, 315, 319, 323, 326, 329, + 336, 337, 338, 339, 340, 341, 342, 343, 344, 353, + 354, 359, 360, 364, 368, 380, 383, 386, 392, 393, + 400, 407, 410, 414, 428, 434, 443, 460, 464, 467, + 476, 490, 493, 498, 512, 525, 533, 540, 547, 558, + 559, 563, 564, 568, 574, 575, 576, 577, 578, 579, + 580, 581, 582, 583, 584, 585, 586, 587, 591, 592, + 593, 596, 597, 598, 602, 603, 604, 608, 609, 610, + 614, 615, 623, 629, 635, 640, 649, 650, 659, 668, + 681, 688, 699, 700, 710, 719, 720, 724, 736, 740, + 744, 758, 759, 762, 763, 774, 775, 779, 789, 802, + 809, 813, 817, 824, 827, 833, 845, 846, 850, 854, + 855, 859, 864, 865, 869, 874, 878, 879, 883, 884, + 888, 889, 893, 897, 898, 899, 905, 906, 910, 911, + 912, 913, 914, 915, 922, 923, 927, 928, 932, 933, + 937, 947, 948, 949, 950, 951, 955, 956, 957, 958, + 959, 960, 961, 962, 963, 964, 965, 969, 970, 974, + 975, 976, 977, 978, 982, 983, 984, 985, 986, 987, + 988, 989, 990, 991, 992, 996, 997, 1001, 1002, 1003, + 1004, 1010, 1011, 1012, 1013, 1017, 1018, 1022, 1023, 1027, + 1028, 1029, 1030, 1031, 1032, 1033, 1037, 1038, 1042, 1046, + 1050, 1051, 1052, 1053, 1054, 1055, 1059, 1063, 1067, 1071, + 1072, 1073, 1074, 1078, 1079, 1080, 1081, 1082, 1086, 1090, + 1091, 1095, 1096, 1100, 1104, 1108, 1120, 1121, 1131, 1132, + 1136, 1137, 1146, 1147, 1152, 1163, 1172, 1173, 1177, 1178, + 1182, 1187, 1188, 1193, 1194, 1199, 1200, 1205, 1206, 1215, + 1216, 1220, 1224, 1228, 1235, 1248, 1256, 1266, 1285, 1286, + 1287, 1288, 1289, 1290, 1291, 1292, 1293, 1294, 1299, 1308, + 1309, 1314, 1315 }; #endif @@ -886,12 +888,12 @@ static const char *const yytname[] = "file_type", "file_path", "opt_file_type", "export_statement", "show_statement", "create_statement", "opt_not_exists", "column_def_commalist", "column_def", "column_type", - "opt_column_nullable", "opt_column_constraint", - "opt_table_key_constraints", "table_key_constraint", "drop_statement", - "opt_exists", "delete_statement", "truncate_statement", - "insert_statement", "opt_column_list", "update_statement", - "update_clause_commalist", "update_clause", "select_statement", - "select_within_set_operation", + "opt_decimal_specification", "opt_column_nullable", + "opt_column_constraint", "opt_table_key_constraints", + "table_key_constraint", "drop_statement", "opt_exists", + "delete_statement", "truncate_statement", "insert_statement", + "opt_column_list", "update_statement", "update_clause_commalist", + "update_clause", "select_statement", "select_within_set_operation", "select_within_set_operation_no_parentheses", "select_with_paren", "select_no_paren", "set_operator", "set_type", "opt_all", "select_clause", "opt_distinct", "select_list", "opt_from_clause", @@ -945,12 +947,12 @@ static const yytype_int16 yytoknum[] = }; #endif -#define YYPACT_NINF (-404) +#define YYPACT_NINF (-409) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF (-277) +#define YYTABLE_NINF (-280) #define yytable_value_is_error(Yyn) \ ((Yyn) == YYTABLE_NINF) @@ -959,58 +961,59 @@ static const yytype_int16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - 489, 20, 58, 103, 111, 58, -35, 33, 87, 19, - 58, 58, 116, 4, 193, 46, 46, 46, 212, 66, - -404, 146, -404, 146, -404, -404, -404, -404, -404, -404, - -404, -404, -404, -404, -404, -42, -404, 258, 107, -404, - 114, 222, -404, 197, 197, 197, 58, 295, 58, 220, - -404, -31, 232, 232, 232, 58, -404, 224, 194, -404, - -404, -404, -404, -404, -404, 458, -404, 273, -404, -404, - 248, -42, 84, -404, 125, -404, 378, 12, 388, 280, - 396, 58, 58, 320, -404, 312, 240, 405, 407, 407, - 364, 409, 58, 58, -404, 247, 193, -404, 249, 411, - 416, 251, 261, -404, -404, -404, -42, 317, 306, -42, - -16, -404, -404, -404, -404, -404, -404, -404, -404, 264, - 263, -404, -404, -404, -404, -404, -404, -404, -404, -404, - 390, -404, 307, -57, 240, 246, -404, 407, 433, 131, - 290, -58, -404, 328, -404, 328, -404, -404, 310, -404, - -404, -404, -404, 438, -404, -404, 246, -404, -404, 368, - -404, -404, 84, -404, -404, 246, 368, 246, 153, -404, - -404, 12, -404, 58, 442, 337, 446, 326, -65, 284, - 286, 289, 157, 300, 287, 86, -404, 218, -7, 327, - -404, -404, -404, -404, -404, -404, -404, -404, -404, -404, - -404, -404, -404, -404, -404, -404, 360, -404, 67, 296, - -404, 246, 405, -404, 418, -404, -404, 58, 302, 139, - -404, 371, 299, -404, 83, -16, -42, 303, -404, 128, - -16, -7, 417, -26, -404, 314, 399, -404, 695, 322, - -404, 337, 10, 6, 443, 285, 246, 246, 187, 77, - 332, 86, 517, 246, 174, 333, -50, 246, 246, 86, - -404, 86, 82, 335, 88, 86, 86, 86, 86, 86, - 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, - 411, 58, -404, 492, 12, -7, -404, 295, -404, 12, - -404, 438, 16, 320, -404, 246, -404, 500, -404, -404, - -404, -404, 246, -404, -404, -404, -404, 246, 246, 433, - 407, -404, 475, -404, 339, 340, -404, -404, 341, -404, - -404, -404, -404, -404, -404, 159, 23, 143, -404, -404, - -404, 246, -404, -404, 344, -404, -404, -404, -404, -404, - -404, 420, 195, 140, 124, 246, 246, -404, 443, 414, - 60, -404, -404, -404, 402, 464, 553, 86, 351, 218, - -404, 419, 354, 553, 553, 553, 553, 589, 589, 589, - 589, 174, 174, -93, -93, -93, -97, 355, -404, -404, - 172, -404, 182, -404, 337, -404, 0, -404, 352, -404, - 26, -404, 455, -404, -404, -404, -7, -7, 184, -404, - 359, 521, 524, 525, -404, 429, 27, 415, 366, -404, - -404, 70, -404, 186, -404, 246, 695, 246, 246, -404, - -74, 141, 367, -404, 86, 553, 218, 369, 191, -404, - -404, -404, -404, 370, 441, -404, -404, -404, 459, 465, - 466, 447, 16, 543, -404, -404, -404, 422, -404, -404, - 544, 381, 385, 386, -404, 430, -404, -404, 389, 433, - -404, -49, 387, -7, 154, -404, 246, -404, 517, 391, - 196, -404, -404, 26, 16, -404, -404, -404, 16, 297, - 393, 246, 394, 551, -404, -404, -404, 433, 205, -404, - -404, -404, -7, -404, -404, -404, -404, 316, 433, -19, - -404, 397, 215, -404, 400, 246, 230, 246, -404, -404, - -404, 17, -7, -404, -404, -7, 392, 398, -404 + 521, 14, 184, 190, 198, 184, 20, 158, 163, 166, + 184, 184, 133, 8, 256, 153, 153, 153, 292, 141, + -409, 189, -409, 189, -409, -409, -409, -409, -409, -409, + -409, -409, -409, -409, -409, -36, -409, 298, 134, -409, + 150, 229, -409, 205, 205, 205, 184, 341, 184, 223, + -409, -50, 228, 228, 228, 184, -409, 226, 185, -409, + -409, -409, -409, -409, -409, 530, -409, 259, -409, -409, + 237, -36, 35, -409, 173, -409, 355, 13, 357, 245, + 363, 184, 184, 285, -409, 279, 209, 374, 377, 377, + 333, 379, 184, 184, -409, 216, 256, -409, 217, 383, + 373, 222, 225, -409, -409, -409, -36, 278, 281, -36, + 135, -409, -409, -409, -409, -409, -409, -409, -409, 236, + 238, -409, -409, -409, -409, -409, -409, -409, -409, -409, + 365, -409, 282, -67, 209, 302, -409, 377, 405, 207, + 265, -57, -409, 307, -409, 307, -409, -409, 290, -409, + -409, -409, -409, 418, -409, -409, 302, -409, -409, 347, + -409, -409, 35, -409, -409, 302, 347, 302, 115, -409, + -409, 13, -409, 184, 421, 314, 424, 304, 104, 263, + 264, 266, 192, 323, 267, 391, -409, 220, 138, 358, + -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, + -409, -409, -409, -409, -409, -409, 332, -409, -87, 269, + -409, 302, 374, -409, 386, -409, -409, 184, 272, -43, + -409, 348, 271, -409, 39, 135, -36, 275, -409, 119, + 135, 138, 393, -26, -409, 273, 356, -409, 715, 280, + -409, 314, 12, 9, 392, 262, 302, 302, 74, -6, + 283, 391, 552, 302, 254, 284, -85, 302, 302, 391, + -409, 391, 37, 286, 126, 391, 391, 391, 391, 391, + 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, + 383, 184, -409, 451, 13, 138, -409, 341, -409, 13, + -409, 418, 10, 285, -409, 302, -409, 452, -409, -409, + -409, -409, 302, -409, -409, -409, -409, 302, 302, 405, + 377, -409, 427, -409, 293, 296, -409, -409, 297, -409, + -409, -409, -409, -409, -409, 152, 132, 117, -409, -409, + -409, 302, -409, -409, 291, -409, -409, -409, -409, -409, + -409, 375, 130, -1, 90, 302, 302, -409, 392, 367, + 43, -409, -409, -409, 359, 495, 571, 391, 303, 220, + -409, 368, 311, 571, 571, 571, 571, 609, 609, 609, + 609, 254, 254, -56, -56, -56, -100, 306, -409, -409, + 122, -409, 123, -409, 314, -409, -5, -409, 308, -409, + 33, -409, 408, -409, -409, -409, 138, 138, 128, -409, + 313, 475, -409, 478, 481, -409, 385, 4, 370, 324, + -409, -409, 76, -409, 142, -409, 302, 715, 302, 302, + -409, 88, 129, 328, -409, 391, 571, 220, 329, 147, + -409, -409, -409, -409, 330, 401, -409, -409, -409, 423, + 425, 426, 403, 10, 501, -409, -409, -409, 380, -409, + -409, 506, 148, 354, 361, -409, 396, -409, -409, 360, + 405, -409, -76, 364, 138, 131, -409, 302, -409, 552, + 371, 162, -409, -409, 33, 10, -409, -409, -409, 10, + -3, 382, 302, 372, -409, 519, -409, -409, -409, 405, + 168, -409, -409, -409, 138, -409, -409, -409, -409, 243, + 405, -13, -409, 376, 170, -409, 387, 302, 175, 302, + -409, -409, -409, 11, 138, -409, -409, 138, 362, 378, + -409 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -1018,75 +1021,76 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_int16 yydefact[] = { - 257, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 29, 29, 29, 0, 277, + 260, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 29, 29, 29, 0, 280, 3, 20, 18, 20, 17, 8, 9, 7, 11, 16, - 13, 14, 12, 15, 10, 0, 256, 0, 243, 86, + 13, 14, 12, 15, 10, 0, 259, 0, 246, 89, 32, 0, 43, 50, 50, 50, 0, 0, 0, 0, - 242, 0, 84, 84, 84, 0, 41, 0, 258, 259, - 28, 25, 27, 26, 1, 257, 2, 0, 6, 5, - 134, 0, 95, 96, 126, 81, 0, 144, 0, 0, - 246, 0, 0, 120, 36, 0, 90, 0, 0, 0, + 245, 0, 87, 87, 87, 0, 41, 0, 261, 262, + 28, 25, 27, 26, 1, 260, 2, 0, 6, 5, + 137, 0, 98, 99, 129, 84, 0, 147, 0, 0, + 249, 0, 0, 123, 36, 0, 93, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 4, 0, 0, - 114, 0, 0, 108, 109, 107, 0, 111, 0, 0, - 140, 244, 225, 228, 230, 231, 226, 227, 232, 0, - 143, 145, 220, 221, 222, 229, 223, 224, 31, 30, - 0, 245, 0, 0, 90, 0, 85, 0, 0, 0, - 0, 120, 92, 39, 37, 39, 83, 247, 0, 79, - 80, 261, 260, 0, 133, 113, 0, 103, 102, 126, - 99, 98, 100, 110, 106, 0, 126, 0, 0, 104, - 33, 0, 49, 0, 0, 257, 0, 0, 216, 0, - 0, 0, 0, 0, 0, 0, 218, 0, 119, 148, - 155, 156, 157, 150, 152, 158, 151, 171, 159, 160, - 161, 162, 154, 149, 164, 165, 0, 278, 0, 0, - 88, 0, 0, 91, 0, 35, 40, 0, 23, 0, - 21, 117, 115, 141, 255, 140, 0, 125, 127, 132, - 140, 136, 138, 135, 146, 0, 0, 46, 0, 76, - 51, 257, 114, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 167, 0, 166, 0, 0, 0, 0, 0, - 168, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 117, 0, 0, 111, 112, 110, 0, 114, 0, 0, + 143, 247, 228, 231, 233, 234, 229, 230, 235, 0, + 146, 148, 223, 224, 225, 232, 226, 227, 31, 30, + 0, 248, 0, 0, 93, 0, 88, 0, 0, 0, + 0, 123, 95, 39, 37, 39, 86, 250, 0, 82, + 83, 264, 263, 0, 136, 116, 0, 106, 105, 129, + 102, 101, 103, 113, 109, 0, 129, 0, 0, 107, + 33, 0, 49, 0, 0, 260, 0, 0, 219, 0, + 0, 0, 0, 0, 0, 0, 221, 0, 122, 151, + 158, 159, 160, 153, 155, 161, 154, 174, 162, 163, + 164, 165, 157, 152, 167, 168, 0, 281, 0, 0, + 91, 0, 0, 94, 0, 35, 40, 0, 23, 0, + 21, 120, 118, 144, 258, 143, 0, 128, 130, 135, + 143, 139, 141, 138, 149, 0, 0, 46, 0, 79, + 51, 260, 117, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 170, 0, 169, 0, 0, 0, 0, 0, + 171, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 89, 0, 0, 94, 93, 0, 82, 0, - 19, 0, 0, 120, 116, 0, 253, 0, 254, 147, - 97, 101, 0, 131, 130, 129, 105, 0, 0, 0, - 0, 55, 0, 60, 0, 0, 59, 57, 0, 67, - 66, 56, 64, 65, 54, 70, 0, 0, 74, 48, - 203, 0, 217, 219, 0, 207, 208, 209, 210, 211, - 212, 0, 0, 0, 0, 0, 0, 190, 0, 0, - 0, 163, 153, 182, 183, 0, 178, 0, 0, 0, - 169, 0, 181, 180, 196, 197, 198, 199, 200, 201, - 202, 173, 172, 175, 174, 176, 177, 0, 34, 279, - 0, 38, 0, 22, 257, 118, 233, 235, 0, 237, - 251, 236, 122, 142, 252, 128, 139, 137, 0, 44, - 0, 0, 0, 0, 68, 0, 73, 0, 0, 52, - 45, 0, 75, 0, 194, 0, 0, 0, 0, 188, - 0, 0, 0, 213, 0, 179, 0, 0, 0, 170, - 214, 87, 24, 0, 0, 273, 265, 271, 269, 272, - 267, 0, 0, 0, 250, 241, 248, 0, 112, 47, - 0, 0, 0, 0, 69, 0, 72, 53, 0, 0, - 204, 0, 0, 192, 0, 191, 0, 195, 215, 0, - 0, 186, 184, 251, 0, 268, 270, 266, 0, 234, - 252, 0, 0, 0, 61, 63, 71, 0, 0, 205, - 206, 189, 193, 187, 185, 238, 262, 274, 0, 124, - 62, 0, 0, 78, 0, 0, 0, 0, 121, 58, - 77, 0, 275, 263, 249, 123, 216, 0, 264 + 0, 0, 92, 0, 0, 97, 96, 0, 85, 0, + 19, 0, 0, 123, 119, 0, 256, 0, 257, 150, + 100, 104, 0, 134, 133, 132, 108, 0, 0, 0, + 0, 55, 0, 60, 70, 0, 59, 57, 0, 67, + 66, 56, 64, 65, 54, 73, 0, 0, 77, 48, + 206, 0, 220, 222, 0, 210, 211, 212, 213, 214, + 215, 0, 0, 0, 0, 0, 0, 193, 0, 0, + 0, 166, 156, 185, 186, 0, 181, 0, 0, 0, + 172, 0, 184, 183, 199, 200, 201, 202, 203, 204, + 205, 176, 175, 178, 177, 179, 180, 0, 34, 282, + 0, 38, 0, 22, 260, 121, 236, 238, 0, 240, + 254, 239, 125, 145, 255, 131, 142, 140, 0, 44, + 0, 0, 58, 0, 0, 71, 0, 76, 0, 0, + 52, 45, 0, 78, 0, 197, 0, 0, 0, 0, + 191, 0, 0, 0, 216, 0, 182, 0, 0, 0, + 173, 217, 90, 24, 0, 0, 276, 268, 274, 272, + 275, 270, 0, 0, 0, 253, 244, 251, 0, 115, + 47, 0, 0, 0, 0, 72, 0, 75, 53, 0, + 0, 207, 0, 0, 195, 0, 194, 0, 198, 218, + 0, 0, 189, 187, 254, 0, 271, 273, 269, 0, + 237, 255, 0, 0, 69, 0, 61, 63, 74, 0, + 0, 208, 209, 192, 196, 190, 188, 241, 265, 277, + 0, 127, 62, 0, 0, 81, 0, 0, 0, 0, + 124, 68, 80, 0, 278, 266, 252, 126, 219, 0, + 267 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -404, -404, -404, 493, -404, 545, -404, 281, -404, 271, - -404, -404, -404, -404, 293, -77, 426, -404, -404, -404, - 283, -404, 250, 158, -404, -404, -404, 254, -404, 279, - -404, -404, -404, 439, -404, -404, 365, -168, -75, -404, - 8, -70, -53, -404, -404, -61, 343, -404, -404, -404, - -114, -404, -404, -39, -404, 288, -404, -404, 14, -251, - -404, -15, 291, -135, -130, -404, -404, -404, -404, -404, - -404, 334, -404, -404, -404, -404, -404, -404, -404, -404, - -404, 72, -71, -78, -404, -404, -95, -404, -404, -404, - -403, 113, -404, -404, -404, 3, -404, -404, -404, 115, - 372, -404, -404, -404, -404, 495, -404, -404, -404, -404, - -306 + -409, -409, -409, 461, -409, 512, -409, 247, -409, 224, + -409, -409, -409, -409, 255, -78, 410, -409, -409, -409, + 235, -409, 215, 136, -409, -409, -409, -409, 232, -409, + -4, -409, -409, -409, 428, -409, -409, 352, -171, -47, + -409, 6, -70, -35, -409, -409, -61, 325, -409, -409, + -409, -118, -409, -409, -33, -409, 274, -409, -409, -39, + -251, -409, -68, 270, -135, -127, -409, -409, -409, -409, + -409, -409, 320, -409, -409, -409, -409, -409, -409, -409, + -409, -409, 58, -69, -83, -409, -409, -90, -409, -409, + -409, -408, 99, -409, -409, -409, 5, -409, -409, -409, + 101, 353, -409, -409, -409, -409, 482, -409, -409, -409, + -409, -306 }; /* YYDEFGOTO[NTERM-NUM]. */ @@ -1094,16 +1098,16 @@ static const yytype_int16 yydefgoto[] = { 0, 18, 19, 20, 21, 68, 219, 220, 22, 61, 23, 129, 24, 25, 85, 143, 215, 26, 27, 28, - 80, 239, 240, 325, 406, 457, 327, 328, 29, 91, - 30, 31, 32, 139, 33, 141, 142, 34, 159, 160, - 161, 73, 106, 107, 164, 74, 156, 221, 293, 294, - 136, 448, 508, 110, 227, 228, 305, 100, 169, 222, - 119, 120, 223, 224, 189, 190, 191, 192, 193, 194, - 195, 249, 196, 197, 198, 199, 200, 341, 201, 202, - 203, 204, 205, 122, 123, 124, 125, 126, 127, 385, - 386, 387, 388, 389, 49, 390, 132, 148, 444, 445, - 446, 299, 35, 36, 58, 59, 391, 441, 513, 66, - 208 + 80, 239, 240, 325, 402, 407, 458, 327, 328, 29, + 91, 30, 31, 32, 139, 33, 141, 142, 34, 159, + 160, 161, 73, 106, 107, 164, 74, 156, 221, 293, + 294, 136, 449, 510, 110, 227, 228, 305, 100, 169, + 222, 119, 120, 223, 224, 189, 190, 191, 192, 193, + 194, 195, 249, 196, 197, 198, 199, 200, 341, 201, + 202, 203, 204, 205, 122, 123, 124, 125, 126, 127, + 385, 386, 387, 388, 389, 49, 390, 132, 148, 445, + 446, 447, 299, 35, 36, 58, 59, 391, 442, 515, + 66, 208 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1111,81 +1115,83 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 188, 102, 350, 398, 154, 39, 121, 237, 42, 332, - 144, 144, 145, 50, 51, 70, 112, 113, 114, 38, - 516, 109, 155, 55, 135, 434, 238, 213, 308, 296, - 229, 507, 231, 233, 166, 43, 174, 265, 167, 479, - 257, 265, 465, 72, 44, 162, 37, 248, 162, 83, - 407, 86, 256, 252, 455, 254, 168, 258, 94, 144, - 206, 38, 88, 56, 257, 257, 435, 175, 280, 210, - 279, 436, 280, 329, 45, 497, 285, 437, 438, 101, - 413, 258, 258, 408, 133, 134, 296, 456, 257, 178, - 112, 113, 114, 103, 439, 149, 150, 407, -274, 440, - 234, 89, 242, 151, 243, 258, 40, 257, 428, 226, - 176, 342, 343, 212, 41, 115, 48, 255, 352, 489, - 225, 252, 353, 354, 258, 71, 46, 230, 104, 355, - 408, 356, 180, 181, 103, 362, 363, 364, 365, 366, - 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, - 443, 301, 295, 488, 116, 117, 178, 112, 113, 114, - 178, 112, 113, 114, 105, 162, 333, 229, 345, 104, - 182, -239, 396, 397, 334, 470, 235, 186, 330, 392, - 47, 502, 357, 384, 118, 377, 52, 346, 70, 115, - 60, 360, 506, 347, 209, 53, 57, 257, 179, 180, - 181, 108, 179, 180, 181, 105, 251, 297, 361, 358, - 420, 421, 64, 121, 258, 418, 433, 303, 121, 184, - 288, 178, 112, 113, 114, 54, 423, 425, 116, 117, - 499, 295, 144, 399, 346, 282, 65, 182, 283, 300, - 419, 182, 257, 304, 306, 185, 186, 417, 466, 178, - 112, 113, 114, 187, 257, 257, 115, 67, 118, 258, - 115, 75, 404, 179, 180, 181, 232, 247, 257, 380, - 491, 258, 258, 183, 382, 70, 76, 183, 422, 405, - 461, 77, 463, 464, 378, 258, 184, 62, 63, 427, - 184, 179, 180, 181, 468, 116, 117, 247, 84, 116, - 117, 257, 182, 178, 112, 113, 114, 290, 265, 257, - 291, 410, 185, 186, 411, 78, 185, 186, 258, 416, - 187, 115, 434, 79, 187, 118, 258, 81, 82, 118, - 182, 492, 92, 93, 276, 277, 278, 279, 183, 280, - 431, 434, 87, 171, 259, 250, 180, 181, 95, 115, - 432, 184, 449, 171, 460, 283, 469, 295, 90, 472, - 116, 117, 295, 435, 494, 96, 183, 295, 436, 98, - 512, 99, 515, 503, 437, 438, 283, 185, 186, 184, - 260, 111, 435, 510, 182, 187, 283, 436, 116, 117, - 118, 439, 128, 437, 438, -274, 440, 504, 514, 131, - 130, 283, 135, 115, 137, 185, 186, 138, 140, 146, - 439, 112, 147, 187, 71, 440, 153, 114, 118, 157, - 251, 335, 336, 337, 338, 339, 340, 261, 155, 158, - 163, 165, 170, 184, 171, 172, 207, 173, 211, 214, - 217, 218, 116, 117, 108, 236, 505, 262, 14, 238, - 241, 244, 253, 245, 263, 264, 246, 281, -276, 185, - 186, 265, 266, 284, 292, 1, 287, 187, -240, 289, - 295, 307, 118, 2, 302, 267, 268, 269, 270, 271, - 3, 309, 272, 273, 4, 274, 275, 276, 277, 278, - 279, 310, 280, 326, 5, 379, 1, 6, 7, 348, - 70, 351, 359, 394, 2, 400, 401, 402, 403, 8, - 9, 3, 414, 415, 357, 4, 257, 260, 426, 280, - 10, 430, 429, 442, 447, 5, 450, 451, 6, 7, - 452, 453, 454, 459, 458, 467, 475, 471, 473, 474, - 8, 9, 476, 477, 11, 478, 480, 481, 12, 486, - 482, 10, 483, 484, 485, 490, 487, 501, 97, 493, - 498, 243, 500, 13, 261, 509, 518, 511, 69, 14, - 260, 216, 383, 177, 462, 11, 409, 286, 424, 12, - 381, 412, 344, 517, 349, 331, 393, 496, 495, 0, - 395, 152, 264, 0, 13, 0, 298, 0, 265, 266, - 14, 0, 0, 15, 16, 17, 260, 0, 0, 0, - 0, 0, 267, 268, 269, 270, 271, 261, 0, 272, - 273, 0, 274, 275, 276, 277, 278, 279, 0, 280, - 0, 0, 0, 0, 15, 16, 17, 349, 0, 0, - 0, 0, 260, 0, 0, 264, 0, 0, 0, 0, - 0, 265, 266, -277, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 267, 268, 269, 270, 271, - 0, 0, 272, 273, 0, 274, 275, 276, 277, 278, - 279, 264, 280, 0, 0, 0, 0, 265, -277, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, -277, -277, -277, 270, 271, 0, 0, 272, 273, - 0, 274, 275, 276, 277, 278, 279, 264, 280, 311, + 188, 102, 350, 398, 237, 144, 144, 39, 121, 154, + 42, 145, 332, 38, 518, 50, 51, 112, 113, 114, + 435, 70, 435, 213, 155, 135, 174, 55, 308, 257, + 229, 456, 231, 233, 265, 480, 296, 509, 257, 109, + 37, 72, 296, 88, 103, 162, 258, 248, 162, 92, + 93, 83, 256, 86, 144, 258, 252, 175, 254, 206, + 94, 436, 166, 436, 457, 280, 437, 56, 437, 210, + 329, 499, 438, 439, 438, 439, 285, 101, 265, 104, + 414, 282, 89, 352, 283, 345, 133, 134, 257, 440, + 43, 440, 491, -277, 441, -277, 441, 149, 150, 44, + 176, 151, 234, 408, 346, 258, 418, 279, 429, 280, + 347, 342, 343, 257, 212, 105, 115, 255, 178, 112, + 113, 114, 353, 354, 252, 290, 225, 226, 291, 45, + 258, 71, 355, 230, 356, 238, 409, 357, 362, 363, + 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, + 374, 375, 376, 257, 490, 116, 117, 444, 295, 408, + 179, 180, 181, 297, 358, 162, -242, 229, -243, 333, + 258, 186, 396, 397, 334, 392, 471, 384, 235, 301, + 330, 419, 103, 504, 247, 118, 300, 38, 257, 167, + 377, 306, 409, 40, 508, 178, 112, 113, 114, 182, + 346, 41, 257, 52, 466, 258, 420, 168, 303, 424, + 421, 422, 53, 434, 295, 121, 380, 104, 115, 258, + 121, 382, 288, 178, 112, 113, 114, 144, 232, 360, + 426, 501, 399, 257, 304, 183, 467, 179, 180, 181, + 62, 63, 54, 257, 257, 257, 361, 493, 184, 108, + 258, 46, 257, 105, 417, 405, 47, 116, 117, 57, + 258, 258, 258, 48, 70, 179, 180, 181, 435, 258, + 209, 242, 406, 243, 185, 186, 182, 70, 423, 81, + 82, 462, 187, 464, 465, 411, 378, 118, 412, 428, + 432, 433, 64, 171, 171, 115, 450, 60, 469, 283, + 67, 75, 247, 76, 182, 178, 112, 113, 114, 436, + 461, 65, 183, 295, 437, 473, 484, 77, 295, 485, + 438, 439, 78, 115, 506, 184, 178, 112, 113, 114, + 496, 79, 494, 295, 116, 117, 505, 440, 512, 283, + 183, 283, 441, 516, 84, 87, 283, 179, 180, 181, + 95, 185, 186, 184, 90, 98, 96, 470, 111, 187, + 99, 128, 116, 117, 118, 130, 131, 135, 250, 180, + 181, 137, 514, 507, 517, 259, 138, 140, 146, 185, + 186, 112, 147, 71, 153, 155, 182, 187, 265, 114, + 157, 163, 118, 158, 178, 112, 113, 114, 335, 336, + 337, 338, 339, 340, 170, 115, 165, 182, 207, 171, + 172, 260, 173, 211, 276, 277, 278, 279, 214, 280, + 217, 218, 183, 108, 236, 14, 115, 238, 241, 281, + 244, 245, 253, 246, 287, 184, 284, 180, 181, 289, + 309, 292, 295, 251, 116, 117, 302, 307, 310, 70, + 348, 326, 351, 359, 379, 394, 184, 400, 261, 415, + 401, 185, 186, 403, 404, 116, 117, 357, 416, 187, + 427, 430, 431, 257, 118, 182, 280, 448, 262, 443, + 451, 452, 185, 186, 453, 263, 264, 454, 455, 459, + 187, 460, 265, 266, 115, 118, 468, 472, 474, 475, + 476, 479, 477, 478, 481, 482, 267, 268, 269, 270, + 271, 251, 483, 272, 273, 488, 274, 275, 276, 277, + 278, 279, 486, 280, 184, 503, 97, 489, 1, 487, + -279, 243, 492, 116, 117, 69, 2, 1, 383, 495, + 502, 410, 381, 3, 511, 2, 520, 4, 260, 500, + 185, 186, 3, 463, 513, 216, 4, 5, 187, 413, + 6, 7, 177, 118, 286, 393, 5, 331, 344, 6, + 7, 519, 8, 9, 498, 497, 395, 298, 152, 0, + 0, 8, 9, 10, 0, 0, 0, 0, 0, 0, + 0, 0, 10, 0, 0, 261, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 260, 0, 11, 0, 425, + 0, 12, 0, 0, 0, 349, 11, 0, 0, 0, + 12, 0, 0, 264, 260, 0, 13, 0, 0, 265, + 266, 0, 14, 0, 0, 13, 0, 0, 0, 0, + 0, 14, 0, 267, 268, 269, 270, 271, 0, 0, + 272, 273, 261, 274, 275, 276, 277, 278, 279, 0, + 280, 0, 260, 0, 0, 0, 15, 16, 17, 0, + 0, -280, 349, 0, 0, 15, 16, 17, 0, 0, + 264, 0, 0, 0, 0, 0, 265, 266, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 264, + 267, 268, 269, 270, 271, 265, -280, 272, 273, 0, + 274, 275, 276, 277, 278, 279, 0, 280, 0, -280, + -280, -280, 270, 271, 0, 0, 272, 273, 0, 274, + 275, 276, 277, 278, 279, 0, 280, 264, 0, 311, 0, 0, 0, 265, 312, 0, 313, 314, 0, 315, 0, 0, 0, 0, 0, 0, 0, 316, 0, 0, - -277, -277, 0, 0, -277, -277, 0, 274, 275, 276, + -280, -280, 0, 0, -280, -280, 0, 274, 275, 276, 277, 278, 279, 0, 280, 0, 0, 0, 0, 0, 0, 0, 0, 317, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1197,78 +1203,80 @@ static const yytype_int16 yytable[] = static const yytype_int16 yycheck[] = { - 135, 71, 253, 309, 99, 2, 77, 175, 5, 3, - 88, 89, 89, 10, 11, 57, 4, 5, 6, 3, - 3, 74, 12, 19, 82, 25, 3, 141, 54, 3, - 165, 50, 167, 168, 109, 70, 93, 134, 54, 442, - 114, 134, 116, 35, 79, 106, 26, 182, 109, 46, - 27, 48, 187, 183, 27, 185, 72, 131, 55, 137, - 137, 3, 93, 59, 114, 114, 66, 124, 165, 139, - 163, 71, 165, 241, 109, 478, 211, 77, 78, 71, - 331, 131, 131, 60, 81, 82, 3, 60, 114, 3, - 4, 5, 6, 9, 94, 92, 93, 27, 98, 99, - 171, 132, 167, 95, 169, 131, 3, 114, 359, 162, - 167, 246, 247, 171, 3, 103, 97, 187, 168, 168, - 159, 251, 257, 258, 131, 167, 93, 166, 44, 259, - 60, 261, 46, 47, 9, 265, 266, 267, 268, 269, - 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, - 124, 226, 171, 459, 142, 143, 3, 4, 5, 6, - 3, 4, 5, 6, 80, 226, 160, 302, 91, 44, - 84, 171, 307, 308, 244, 426, 173, 160, 168, 293, - 93, 487, 100, 167, 172, 280, 70, 110, 57, 103, - 144, 103, 498, 116, 63, 79, 3, 114, 45, 46, - 47, 76, 45, 46, 47, 80, 120, 124, 120, 127, - 345, 346, 0, 284, 131, 91, 384, 89, 289, 133, - 217, 3, 4, 5, 6, 109, 166, 357, 142, 143, - 481, 171, 310, 310, 110, 168, 170, 84, 171, 225, - 116, 84, 114, 115, 230, 159, 160, 107, 107, 3, - 4, 5, 6, 167, 114, 114, 103, 111, 172, 131, - 103, 3, 103, 45, 46, 47, 113, 110, 114, 284, - 116, 131, 131, 120, 289, 57, 169, 120, 348, 120, - 415, 167, 417, 418, 281, 131, 133, 16, 17, 359, - 133, 45, 46, 47, 424, 142, 143, 110, 3, 142, - 143, 114, 84, 3, 4, 5, 6, 168, 134, 114, - 171, 168, 159, 160, 171, 93, 159, 160, 131, 124, - 167, 103, 25, 126, 167, 172, 131, 44, 45, 172, - 84, 466, 53, 54, 160, 161, 162, 163, 120, 165, - 168, 25, 122, 171, 17, 45, 46, 47, 124, 103, - 168, 133, 168, 171, 168, 171, 426, 171, 126, 168, - 142, 143, 171, 66, 168, 171, 120, 171, 71, 96, - 505, 123, 507, 168, 77, 78, 171, 159, 160, 133, - 53, 3, 66, 168, 84, 167, 171, 71, 142, 143, - 172, 94, 4, 77, 78, 98, 99, 81, 168, 3, - 120, 171, 82, 103, 92, 159, 160, 167, 3, 45, - 94, 4, 3, 167, 167, 99, 167, 6, 172, 168, - 120, 136, 137, 138, 139, 140, 141, 100, 12, 168, - 113, 125, 168, 133, 171, 45, 3, 130, 148, 111, - 130, 3, 142, 143, 76, 3, 130, 120, 111, 3, - 124, 167, 165, 167, 127, 128, 167, 97, 0, 159, - 160, 134, 135, 167, 93, 7, 48, 167, 171, 167, - 171, 54, 172, 15, 171, 148, 149, 150, 151, 152, - 22, 167, 155, 156, 26, 158, 159, 160, 161, 162, - 163, 92, 165, 171, 36, 3, 7, 39, 40, 167, - 57, 168, 167, 3, 15, 30, 167, 167, 167, 51, - 52, 22, 168, 93, 100, 26, 114, 53, 167, 165, - 62, 166, 103, 171, 69, 36, 167, 6, 39, 40, - 6, 6, 103, 167, 119, 168, 77, 168, 168, 98, - 51, 52, 77, 77, 86, 98, 3, 125, 90, 119, - 6, 62, 171, 168, 168, 168, 167, 6, 65, 168, - 167, 169, 168, 105, 100, 168, 168, 167, 23, 111, - 53, 145, 291, 134, 416, 86, 326, 212, 114, 90, - 287, 327, 248, 511, 120, 242, 295, 474, 473, -1, - 302, 96, 128, -1, 105, -1, 224, -1, 134, 135, - 111, -1, -1, 145, 146, 147, 53, -1, -1, -1, - -1, -1, 148, 149, 150, 151, 152, 100, -1, 155, - 156, -1, 158, 159, 160, 161, 162, 163, -1, 165, - -1, -1, -1, -1, 145, 146, 147, 120, -1, -1, - -1, -1, 53, -1, -1, 128, -1, -1, -1, -1, - -1, 134, 135, 100, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 148, 149, 150, 151, 152, - -1, -1, 155, 156, -1, 158, 159, 160, 161, 162, - 163, 128, 165, -1, -1, -1, -1, 134, 135, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 148, 149, 150, 151, 152, -1, -1, 155, 156, - -1, 158, 159, 160, 161, 162, 163, 128, 165, 24, + 135, 71, 253, 309, 175, 88, 89, 2, 77, 99, + 5, 89, 3, 3, 3, 10, 11, 4, 5, 6, + 25, 57, 25, 141, 12, 82, 93, 19, 54, 114, + 165, 27, 167, 168, 134, 443, 3, 50, 114, 74, + 26, 35, 3, 93, 9, 106, 131, 182, 109, 53, + 54, 46, 187, 48, 137, 131, 183, 124, 185, 137, + 55, 66, 109, 66, 60, 165, 71, 59, 71, 139, + 241, 479, 77, 78, 77, 78, 211, 71, 134, 44, + 331, 168, 132, 168, 171, 91, 81, 82, 114, 94, + 70, 94, 168, 98, 99, 98, 99, 92, 93, 79, + 167, 95, 171, 27, 110, 131, 107, 163, 359, 165, + 116, 246, 247, 114, 171, 80, 103, 187, 3, 4, + 5, 6, 257, 258, 251, 168, 159, 162, 171, 109, + 131, 167, 259, 166, 261, 3, 60, 100, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 114, 460, 142, 143, 124, 171, 27, + 45, 46, 47, 124, 127, 226, 171, 302, 171, 160, + 131, 160, 307, 308, 244, 293, 427, 167, 173, 226, + 168, 91, 9, 489, 110, 172, 225, 3, 114, 54, + 280, 230, 60, 3, 500, 3, 4, 5, 6, 84, + 110, 3, 114, 70, 116, 131, 116, 72, 89, 166, + 345, 346, 79, 384, 171, 284, 284, 44, 103, 131, + 289, 289, 217, 3, 4, 5, 6, 310, 113, 103, + 357, 482, 310, 114, 115, 120, 107, 45, 46, 47, + 16, 17, 109, 114, 114, 114, 120, 116, 133, 76, + 131, 93, 114, 80, 124, 103, 93, 142, 143, 3, + 131, 131, 131, 97, 57, 45, 46, 47, 25, 131, + 63, 167, 120, 169, 159, 160, 84, 57, 348, 44, + 45, 416, 167, 418, 419, 168, 281, 172, 171, 359, + 168, 168, 0, 171, 171, 103, 168, 144, 425, 171, + 111, 3, 110, 169, 84, 3, 4, 5, 6, 66, + 168, 170, 120, 171, 71, 168, 168, 167, 171, 171, + 77, 78, 93, 103, 81, 133, 3, 4, 5, 6, + 168, 126, 467, 171, 142, 143, 168, 94, 168, 171, + 120, 171, 99, 168, 3, 122, 171, 45, 46, 47, + 124, 159, 160, 133, 126, 96, 171, 427, 3, 167, + 123, 4, 142, 143, 172, 120, 3, 82, 45, 46, + 47, 92, 507, 130, 509, 17, 167, 3, 45, 159, + 160, 4, 3, 167, 167, 12, 84, 167, 134, 6, + 168, 113, 172, 168, 3, 4, 5, 6, 136, 137, + 138, 139, 140, 141, 168, 103, 125, 84, 3, 171, + 45, 53, 130, 148, 160, 161, 162, 163, 111, 165, + 130, 3, 120, 76, 3, 111, 103, 3, 124, 97, + 167, 167, 165, 167, 48, 133, 167, 46, 47, 167, + 167, 93, 171, 120, 142, 143, 171, 54, 92, 57, + 167, 171, 168, 167, 3, 3, 133, 30, 100, 168, + 167, 159, 160, 167, 167, 142, 143, 100, 93, 167, + 167, 103, 166, 114, 172, 84, 165, 69, 120, 171, + 167, 6, 159, 160, 6, 127, 128, 6, 103, 119, + 167, 167, 134, 135, 103, 172, 168, 168, 168, 98, + 77, 98, 77, 77, 3, 125, 148, 149, 150, 151, + 152, 120, 6, 155, 156, 119, 158, 159, 160, 161, + 162, 163, 168, 165, 133, 6, 65, 167, 7, 168, + 0, 169, 168, 142, 143, 23, 15, 7, 291, 168, + 168, 326, 287, 22, 168, 15, 168, 26, 53, 167, + 159, 160, 22, 417, 167, 145, 26, 36, 167, 327, + 39, 40, 134, 172, 212, 295, 36, 242, 248, 39, + 40, 513, 51, 52, 475, 474, 302, 224, 96, -1, + -1, 51, 52, 62, -1, -1, -1, -1, -1, -1, + -1, -1, 62, -1, -1, 100, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 53, -1, 86, -1, 114, + -1, 90, -1, -1, -1, 120, 86, -1, -1, -1, + 90, -1, -1, 128, 53, -1, 105, -1, -1, 134, + 135, -1, 111, -1, -1, 105, -1, -1, -1, -1, + -1, 111, -1, 148, 149, 150, 151, 152, -1, -1, + 155, 156, 100, 158, 159, 160, 161, 162, 163, -1, + 165, -1, 53, -1, -1, -1, 145, 146, 147, -1, + -1, 100, 120, -1, -1, 145, 146, 147, -1, -1, + 128, -1, -1, -1, -1, -1, 134, 135, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 128, + 148, 149, 150, 151, 152, 134, 135, 155, 156, -1, + 158, 159, 160, 161, 162, 163, -1, 165, -1, 148, + 149, 150, 151, 152, -1, -1, 155, 156, -1, 158, + 159, 160, 161, 162, 163, -1, 165, 128, -1, 24, -1, -1, -1, 134, 29, -1, 31, 32, -1, 34, -1, -1, -1, -1, -1, -1, -1, 42, -1, -1, 151, 152, -1, -1, 155, 156, -1, 158, 159, 160, @@ -1287,56 +1295,57 @@ static const yytype_int16 yystos[] = { 0, 7, 15, 22, 26, 36, 39, 40, 51, 52, 62, 86, 90, 105, 111, 145, 146, 147, 174, 175, - 176, 177, 181, 183, 185, 186, 190, 191, 192, 201, - 203, 204, 205, 207, 210, 275, 276, 26, 3, 268, - 3, 3, 268, 70, 79, 109, 93, 93, 97, 267, - 268, 268, 70, 79, 109, 19, 59, 3, 277, 278, - 144, 182, 182, 182, 0, 170, 282, 111, 178, 178, - 57, 167, 213, 214, 218, 3, 169, 167, 93, 126, - 193, 193, 193, 268, 3, 187, 268, 122, 93, 132, - 126, 202, 202, 202, 268, 124, 171, 176, 96, 123, - 230, 213, 214, 9, 44, 80, 215, 216, 76, 215, - 226, 3, 4, 5, 6, 103, 142, 143, 172, 233, - 234, 255, 256, 257, 258, 259, 260, 261, 4, 184, - 120, 3, 269, 268, 268, 82, 223, 92, 167, 206, - 3, 208, 209, 188, 256, 188, 45, 3, 270, 268, - 268, 213, 278, 167, 259, 12, 219, 168, 168, 211, - 212, 213, 218, 113, 217, 125, 211, 54, 72, 231, - 168, 171, 45, 130, 93, 124, 167, 206, 3, 45, - 46, 47, 84, 120, 133, 159, 160, 167, 236, 237, - 238, 239, 240, 241, 242, 243, 245, 246, 247, 248, - 249, 251, 252, 253, 254, 255, 188, 3, 283, 63, - 214, 148, 171, 223, 111, 189, 189, 130, 3, 179, - 180, 220, 232, 235, 236, 226, 215, 227, 228, 236, - 226, 236, 113, 236, 255, 268, 3, 210, 3, 194, - 195, 124, 167, 169, 167, 167, 167, 110, 236, 244, - 45, 120, 237, 165, 237, 214, 236, 114, 131, 17, + 176, 177, 181, 183, 185, 186, 190, 191, 192, 202, + 204, 205, 206, 208, 211, 276, 277, 26, 3, 269, + 3, 3, 269, 70, 79, 109, 93, 93, 97, 268, + 269, 269, 70, 79, 109, 19, 59, 3, 278, 279, + 144, 182, 182, 182, 0, 170, 283, 111, 178, 178, + 57, 167, 214, 215, 219, 3, 169, 167, 93, 126, + 193, 193, 193, 269, 3, 187, 269, 122, 93, 132, + 126, 203, 203, 203, 269, 124, 171, 176, 96, 123, + 231, 214, 215, 9, 44, 80, 216, 217, 76, 216, + 227, 3, 4, 5, 6, 103, 142, 143, 172, 234, + 235, 256, 257, 258, 259, 260, 261, 262, 4, 184, + 120, 3, 270, 269, 269, 82, 224, 92, 167, 207, + 3, 209, 210, 188, 257, 188, 45, 3, 271, 269, + 269, 214, 279, 167, 260, 12, 220, 168, 168, 212, + 213, 214, 219, 113, 218, 125, 212, 54, 72, 232, + 168, 171, 45, 130, 93, 124, 167, 207, 3, 45, + 46, 47, 84, 120, 133, 159, 160, 167, 237, 238, + 239, 240, 241, 242, 243, 244, 246, 247, 248, 249, + 250, 252, 253, 254, 255, 256, 188, 3, 284, 63, + 215, 148, 171, 224, 111, 189, 189, 130, 3, 179, + 180, 221, 233, 236, 237, 227, 216, 228, 229, 237, + 227, 237, 113, 237, 256, 269, 3, 211, 3, 194, + 195, 124, 167, 169, 167, 167, 167, 110, 237, 245, + 45, 120, 238, 165, 238, 215, 237, 114, 131, 17, 53, 100, 120, 127, 128, 134, 135, 148, 149, 150, 151, 152, 155, 156, 158, 159, 160, 161, 162, 163, - 165, 97, 168, 171, 167, 236, 209, 48, 268, 167, - 168, 171, 93, 221, 222, 171, 3, 124, 273, 274, - 231, 211, 171, 89, 115, 229, 231, 54, 54, 167, + 165, 97, 168, 171, 167, 237, 210, 48, 269, 167, + 168, 171, 93, 222, 223, 171, 3, 124, 274, 275, + 232, 212, 171, 89, 115, 230, 232, 54, 54, 167, 92, 24, 29, 31, 32, 34, 42, 68, 85, 87, - 88, 102, 106, 108, 118, 196, 171, 199, 200, 210, - 168, 219, 3, 160, 214, 136, 137, 138, 139, 140, - 141, 250, 236, 236, 244, 91, 110, 116, 167, 120, - 232, 168, 168, 236, 236, 237, 237, 100, 127, 167, - 103, 120, 237, 237, 237, 237, 237, 237, 237, 237, - 237, 237, 237, 237, 237, 237, 237, 259, 268, 3, - 234, 187, 234, 180, 167, 262, 263, 264, 265, 266, - 268, 279, 223, 235, 3, 228, 236, 236, 283, 188, - 30, 167, 167, 167, 103, 120, 197, 27, 60, 195, - 168, 171, 200, 232, 168, 93, 124, 107, 91, 116, - 236, 236, 214, 166, 114, 237, 167, 214, 232, 103, - 166, 168, 168, 210, 25, 66, 71, 77, 78, 94, - 99, 280, 171, 124, 271, 272, 273, 69, 224, 168, - 167, 6, 6, 6, 103, 27, 60, 198, 119, 167, - 168, 236, 196, 236, 236, 116, 107, 168, 237, 214, - 232, 168, 168, 168, 98, 77, 77, 77, 98, 263, - 3, 125, 6, 171, 168, 168, 119, 167, 283, 168, - 168, 116, 236, 168, 168, 272, 264, 263, 167, 232, - 168, 6, 283, 168, 81, 130, 283, 50, 225, 168, - 168, 167, 236, 281, 168, 236, 3, 254, 168 + 88, 102, 106, 108, 118, 196, 171, 200, 201, 211, + 168, 220, 3, 160, 215, 136, 137, 138, 139, 140, + 141, 251, 237, 237, 245, 91, 110, 116, 167, 120, + 233, 168, 168, 237, 237, 238, 238, 100, 127, 167, + 103, 120, 238, 238, 238, 238, 238, 238, 238, 238, + 238, 238, 238, 238, 238, 238, 238, 260, 269, 3, + 235, 187, 235, 180, 167, 263, 264, 265, 266, 267, + 269, 280, 224, 236, 3, 229, 237, 237, 284, 188, + 30, 167, 197, 167, 167, 103, 120, 198, 27, 60, + 195, 168, 171, 201, 233, 168, 93, 124, 107, 91, + 116, 237, 237, 215, 166, 114, 238, 167, 215, 233, + 103, 166, 168, 168, 211, 25, 66, 71, 77, 78, + 94, 99, 281, 171, 124, 272, 273, 274, 69, 225, + 168, 167, 6, 6, 6, 103, 27, 60, 199, 119, + 167, 168, 237, 196, 237, 237, 116, 107, 168, 238, + 215, 233, 168, 168, 168, 98, 77, 77, 77, 98, + 264, 3, 125, 6, 168, 171, 168, 168, 119, 167, + 284, 168, 168, 116, 237, 168, 168, 273, 265, 264, + 167, 233, 168, 6, 284, 168, 81, 130, 284, 50, + 226, 168, 168, 167, 237, 282, 168, 237, 3, 255, + 168 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ @@ -1349,27 +1358,28 @@ static const yytype_int16 yyr1[] = 190, 191, 191, 191, 192, 192, 192, 192, 192, 193, 193, 194, 194, 195, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 197, 197, - 197, 198, 198, 198, 199, 199, 199, 200, 200, 201, - 201, 201, 201, 202, 202, 203, 204, 205, 205, 206, - 206, 207, 208, 208, 209, 210, 210, 210, 211, 211, - 212, 212, 213, 213, 214, 214, 215, 216, 216, 216, - 217, 217, 218, 219, 219, 220, 221, 221, 222, 223, - 223, 224, 224, 225, 225, 226, 226, 227, 227, 228, - 229, 229, 229, 230, 230, 231, 231, 231, 231, 231, - 231, 232, 232, 233, 233, 234, 234, 235, 236, 236, - 236, 236, 236, 237, 237, 237, 237, 237, 237, 237, - 237, 237, 237, 237, 238, 238, 239, 239, 239, 239, - 239, 240, 240, 240, 240, 240, 240, 240, 240, 240, - 240, 240, 241, 241, 242, 242, 242, 242, 243, 243, - 243, 243, 244, 244, 245, 245, 246, 246, 246, 246, - 246, 246, 246, 247, 247, 248, 249, 250, 250, 250, - 250, 250, 250, 251, 252, 253, 254, 254, 254, 254, - 255, 255, 255, 255, 255, 256, 257, 257, 258, 258, - 259, 260, 261, 262, 262, 263, 263, 264, 264, 265, - 265, 266, 267, 268, 268, 269, 269, 270, 271, 271, - 272, 272, 273, 273, 274, 274, 275, 275, 276, 277, - 277, 278, 279, 279, 279, 280, 280, 280, 280, 280, - 280, 280, 280, 280, 280, 281, 282, 282, 283, 283 + 197, 198, 198, 198, 199, 199, 199, 200, 200, 200, + 201, 201, 202, 202, 202, 202, 203, 203, 204, 205, + 206, 206, 207, 207, 208, 209, 209, 210, 211, 211, + 211, 212, 212, 213, 213, 214, 214, 215, 215, 216, + 217, 217, 217, 218, 218, 219, 220, 220, 221, 222, + 222, 223, 224, 224, 225, 225, 226, 226, 227, 227, + 228, 228, 229, 230, 230, 230, 231, 231, 232, 232, + 232, 232, 232, 232, 233, 233, 234, 234, 235, 235, + 236, 237, 237, 237, 237, 237, 238, 238, 238, 238, + 238, 238, 238, 238, 238, 238, 238, 239, 239, 240, + 240, 240, 240, 240, 241, 241, 241, 241, 241, 241, + 241, 241, 241, 241, 241, 242, 242, 243, 243, 243, + 243, 244, 244, 244, 244, 245, 245, 246, 246, 247, + 247, 247, 247, 247, 247, 247, 248, 248, 249, 250, + 251, 251, 251, 251, 251, 251, 252, 253, 254, 255, + 255, 255, 255, 256, 256, 256, 256, 256, 257, 258, + 258, 259, 259, 260, 261, 262, 263, 263, 264, 264, + 265, 265, 266, 266, 267, 268, 269, 269, 270, 270, + 271, 272, 272, 273, 273, 274, 274, 275, 275, 276, + 276, 277, 278, 278, 279, 280, 280, 280, 281, 281, + 281, 281, 281, 281, 281, 281, 281, 281, 282, 283, + 283, 284, 284 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -1380,29 +1390,30 @@ static const yytype_int8 yyr2[] = 0, 1, 3, 1, 4, 2, 2, 2, 1, 0, 4, 1, 2, 5, 7, 5, 1, 1, 3, 0, 5, 2, 3, 2, 8, 8, 6, 9, 7, 3, - 0, 1, 3, 4, 1, 1, 1, 1, 6, 1, - 1, 4, 5, 4, 1, 1, 1, 1, 1, 2, - 0, 2, 1, 0, 1, 2, 0, 6, 5, 4, - 4, 3, 6, 2, 0, 4, 2, 8, 5, 3, - 0, 5, 1, 3, 3, 2, 2, 6, 1, 1, - 1, 3, 3, 3, 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, 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, 6, 1, 1, 1, - 1, 1, 1, 4, 4, 5, 1, 3, 1, 3, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 3, 1, 1, 1, 4, 1, - 3, 2, 1, 1, 3, 1, 0, 1, 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 + 0, 1, 3, 4, 1, 1, 1, 1, 2, 1, + 1, 4, 5, 4, 1, 1, 1, 1, 5, 3, + 0, 1, 2, 0, 2, 1, 0, 1, 2, 0, + 6, 5, 4, 4, 3, 6, 2, 0, 4, 2, + 8, 5, 3, 0, 5, 1, 3, 3, 2, 2, + 6, 1, 1, 1, 3, 3, 3, 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, 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, 6, + 1, 1, 1, 1, 1, 1, 4, 4, 5, 1, + 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, + 1, 4, 1, 3, 2, 1, 1, 3, 1, 0, + 1, 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 }; @@ -1954,31 +1965,31 @@ yydestruct (const char *yymsg, switch (yykind) { case YYSYMBOL_IDENTIFIER: /* IDENTIFIER */ -#line 152 "bison_parser.y" +#line 153 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1960 "bison_parser.cpp" +#line 1971 "bison_parser.cpp" break; case YYSYMBOL_STRING: /* STRING */ -#line 152 "bison_parser.y" +#line 153 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1966 "bison_parser.cpp" +#line 1977 "bison_parser.cpp" break; case YYSYMBOL_FLOATVAL: /* FLOATVAL */ -#line 150 "bison_parser.y" +#line 151 "bison_parser.y" { } -#line 1972 "bison_parser.cpp" +#line 1983 "bison_parser.cpp" break; case YYSYMBOL_INTVAL: /* INTVAL */ -#line 150 "bison_parser.y" +#line 151 "bison_parser.y" { } -#line 1978 "bison_parser.cpp" +#line 1989 "bison_parser.cpp" break; case YYSYMBOL_statement_list: /* statement_list */ -#line 153 "bison_parser.y" +#line 154 "bison_parser.y" { if ((((*yyvaluep).stmt_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).stmt_vec))) { @@ -1987,23 +1998,23 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).stmt_vec)); } -#line 1991 "bison_parser.cpp" +#line 2002 "bison_parser.cpp" break; case YYSYMBOL_statement: /* statement */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 1997 "bison_parser.cpp" +#line 2008 "bison_parser.cpp" break; case YYSYMBOL_preparable_statement: /* preparable_statement */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 2003 "bison_parser.cpp" +#line 2014 "bison_parser.cpp" break; case YYSYMBOL_opt_hints: /* opt_hints */ -#line 153 "bison_parser.y" +#line 154 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2012,11 +2023,11 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2016 "bison_parser.cpp" +#line 2027 "bison_parser.cpp" break; case YYSYMBOL_hint_list: /* hint_list */ -#line 153 "bison_parser.y" +#line 154 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2025,89 +2036,89 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2029 "bison_parser.cpp" +#line 2040 "bison_parser.cpp" break; case YYSYMBOL_hint: /* hint */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2035 "bison_parser.cpp" +#line 2046 "bison_parser.cpp" break; case YYSYMBOL_transaction_statement: /* transaction_statement */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).transaction_stmt)); } -#line 2041 "bison_parser.cpp" +#line 2052 "bison_parser.cpp" break; case YYSYMBOL_prepare_statement: /* prepare_statement */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).prep_stmt)); } -#line 2047 "bison_parser.cpp" +#line 2058 "bison_parser.cpp" break; case YYSYMBOL_prepare_target_query: /* prepare_target_query */ -#line 152 "bison_parser.y" +#line 153 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2053 "bison_parser.cpp" +#line 2064 "bison_parser.cpp" break; case YYSYMBOL_execute_statement: /* execute_statement */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).exec_stmt)); } -#line 2059 "bison_parser.cpp" +#line 2070 "bison_parser.cpp" break; case YYSYMBOL_import_statement: /* import_statement */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).import_stmt)); } -#line 2065 "bison_parser.cpp" +#line 2076 "bison_parser.cpp" break; case YYSYMBOL_file_type: /* file_type */ -#line 150 "bison_parser.y" +#line 151 "bison_parser.y" { } -#line 2071 "bison_parser.cpp" +#line 2082 "bison_parser.cpp" break; case YYSYMBOL_file_path: /* file_path */ -#line 152 "bison_parser.y" +#line 153 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2077 "bison_parser.cpp" +#line 2088 "bison_parser.cpp" break; case YYSYMBOL_opt_file_type: /* opt_file_type */ -#line 150 "bison_parser.y" +#line 151 "bison_parser.y" { } -#line 2083 "bison_parser.cpp" +#line 2094 "bison_parser.cpp" break; case YYSYMBOL_export_statement: /* export_statement */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).export_stmt)); } -#line 2089 "bison_parser.cpp" +#line 2100 "bison_parser.cpp" break; case YYSYMBOL_show_statement: /* show_statement */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).show_stmt)); } -#line 2095 "bison_parser.cpp" +#line 2106 "bison_parser.cpp" break; case YYSYMBOL_create_statement: /* create_statement */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).create_stmt)); } -#line 2101 "bison_parser.cpp" +#line 2112 "bison_parser.cpp" break; case YYSYMBOL_opt_not_exists: /* opt_not_exists */ -#line 150 "bison_parser.y" +#line 151 "bison_parser.y" { } -#line 2107 "bison_parser.cpp" +#line 2118 "bison_parser.cpp" break; case YYSYMBOL_column_def_commalist: /* column_def_commalist */ -#line 153 "bison_parser.y" +#line 154 "bison_parser.y" { if ((((*yyvaluep).column_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).column_vec))) { @@ -2116,77 +2127,83 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).column_vec)); } -#line 2120 "bison_parser.cpp" +#line 2131 "bison_parser.cpp" break; case YYSYMBOL_column_def: /* column_def */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).column_t)); } -#line 2126 "bison_parser.cpp" +#line 2137 "bison_parser.cpp" break; case YYSYMBOL_column_type: /* column_type */ -#line 150 "bison_parser.y" +#line 151 "bison_parser.y" + { } +#line 2143 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_decimal_specification: /* opt_decimal_specification */ +#line 151 "bison_parser.y" { } -#line 2132 "bison_parser.cpp" +#line 2149 "bison_parser.cpp" break; case YYSYMBOL_opt_column_nullable: /* opt_column_nullable */ -#line 150 "bison_parser.y" +#line 151 "bison_parser.y" { } -#line 2138 "bison_parser.cpp" +#line 2155 "bison_parser.cpp" break; case YYSYMBOL_opt_column_constraint: /* opt_column_constraint */ -#line 150 "bison_parser.y" +#line 151 "bison_parser.y" { } -#line 2144 "bison_parser.cpp" +#line 2161 "bison_parser.cpp" break; case YYSYMBOL_opt_table_key_constraints: /* opt_table_key_constraints */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).table_key_constraint_vec)); } -#line 2150 "bison_parser.cpp" +#line 2167 "bison_parser.cpp" break; case YYSYMBOL_table_key_constraint: /* table_key_constraint */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).table_key_constraint_t)); } -#line 2156 "bison_parser.cpp" +#line 2173 "bison_parser.cpp" break; case YYSYMBOL_drop_statement: /* drop_statement */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).drop_stmt)); } -#line 2162 "bison_parser.cpp" +#line 2179 "bison_parser.cpp" break; case YYSYMBOL_opt_exists: /* opt_exists */ -#line 150 "bison_parser.y" +#line 151 "bison_parser.y" { } -#line 2168 "bison_parser.cpp" +#line 2185 "bison_parser.cpp" break; case YYSYMBOL_delete_statement: /* delete_statement */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2174 "bison_parser.cpp" +#line 2191 "bison_parser.cpp" break; case YYSYMBOL_truncate_statement: /* truncate_statement */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2180 "bison_parser.cpp" +#line 2197 "bison_parser.cpp" break; case YYSYMBOL_insert_statement: /* insert_statement */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).insert_stmt)); } -#line 2186 "bison_parser.cpp" +#line 2203 "bison_parser.cpp" break; case YYSYMBOL_opt_column_list: /* opt_column_list */ -#line 153 "bison_parser.y" +#line 154 "bison_parser.y" { if ((((*yyvaluep).str_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).str_vec))) { @@ -2195,17 +2212,17 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2199 "bison_parser.cpp" +#line 2216 "bison_parser.cpp" break; case YYSYMBOL_update_statement: /* update_statement */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).update_stmt)); } -#line 2205 "bison_parser.cpp" +#line 2222 "bison_parser.cpp" break; case YYSYMBOL_update_clause_commalist: /* update_clause_commalist */ -#line 153 "bison_parser.y" +#line 154 "bison_parser.y" { if ((((*yyvaluep).update_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).update_vec))) { @@ -2214,77 +2231,77 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).update_vec)); } -#line 2218 "bison_parser.cpp" +#line 2235 "bison_parser.cpp" break; case YYSYMBOL_update_clause: /* update_clause */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).update_t)); } -#line 2224 "bison_parser.cpp" +#line 2241 "bison_parser.cpp" break; case YYSYMBOL_select_statement: /* select_statement */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2230 "bison_parser.cpp" +#line 2247 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation: /* select_within_set_operation */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2236 "bison_parser.cpp" +#line 2253 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation_no_parentheses: /* select_within_set_operation_no_parentheses */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2242 "bison_parser.cpp" +#line 2259 "bison_parser.cpp" break; case YYSYMBOL_select_with_paren: /* select_with_paren */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2248 "bison_parser.cpp" +#line 2265 "bison_parser.cpp" break; case YYSYMBOL_select_no_paren: /* select_no_paren */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2254 "bison_parser.cpp" +#line 2271 "bison_parser.cpp" break; case YYSYMBOL_set_operator: /* set_operator */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2260 "bison_parser.cpp" +#line 2277 "bison_parser.cpp" break; case YYSYMBOL_set_type: /* set_type */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2266 "bison_parser.cpp" +#line 2283 "bison_parser.cpp" break; case YYSYMBOL_opt_all: /* opt_all */ -#line 150 "bison_parser.y" +#line 151 "bison_parser.y" { } -#line 2272 "bison_parser.cpp" +#line 2289 "bison_parser.cpp" break; case YYSYMBOL_select_clause: /* select_clause */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2278 "bison_parser.cpp" +#line 2295 "bison_parser.cpp" break; case YYSYMBOL_opt_distinct: /* opt_distinct */ -#line 150 "bison_parser.y" +#line 151 "bison_parser.y" { } -#line 2284 "bison_parser.cpp" +#line 2301 "bison_parser.cpp" break; case YYSYMBOL_select_list: /* select_list */ -#line 153 "bison_parser.y" +#line 154 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2293,41 +2310,41 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2297 "bison_parser.cpp" +#line 2314 "bison_parser.cpp" break; case YYSYMBOL_opt_from_clause: /* opt_from_clause */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2303 "bison_parser.cpp" +#line 2320 "bison_parser.cpp" break; case YYSYMBOL_from_clause: /* from_clause */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2309 "bison_parser.cpp" +#line 2326 "bison_parser.cpp" break; case YYSYMBOL_opt_where: /* opt_where */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2315 "bison_parser.cpp" +#line 2332 "bison_parser.cpp" break; case YYSYMBOL_opt_group: /* opt_group */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).group_t)); } -#line 2321 "bison_parser.cpp" +#line 2338 "bison_parser.cpp" break; case YYSYMBOL_opt_having: /* opt_having */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2327 "bison_parser.cpp" +#line 2344 "bison_parser.cpp" break; case YYSYMBOL_opt_order: /* opt_order */ -#line 153 "bison_parser.y" +#line 154 "bison_parser.y" { if ((((*yyvaluep).order_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).order_vec))) { @@ -2336,11 +2353,11 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2340 "bison_parser.cpp" +#line 2357 "bison_parser.cpp" break; case YYSYMBOL_order_list: /* order_list */ -#line 153 "bison_parser.y" +#line 154 "bison_parser.y" { if ((((*yyvaluep).order_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).order_vec))) { @@ -2349,35 +2366,35 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2353 "bison_parser.cpp" +#line 2370 "bison_parser.cpp" break; case YYSYMBOL_order_desc: /* order_desc */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).order)); } -#line 2359 "bison_parser.cpp" +#line 2376 "bison_parser.cpp" break; case YYSYMBOL_opt_order_type: /* opt_order_type */ -#line 150 "bison_parser.y" +#line 151 "bison_parser.y" { } -#line 2365 "bison_parser.cpp" +#line 2382 "bison_parser.cpp" break; case YYSYMBOL_opt_top: /* opt_top */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2371 "bison_parser.cpp" +#line 2388 "bison_parser.cpp" break; case YYSYMBOL_opt_limit: /* opt_limit */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2377 "bison_parser.cpp" +#line 2394 "bison_parser.cpp" break; case YYSYMBOL_expr_list: /* expr_list */ -#line 153 "bison_parser.y" +#line 154 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2386,11 +2403,11 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2390 "bison_parser.cpp" +#line 2407 "bison_parser.cpp" break; case YYSYMBOL_opt_literal_list: /* opt_literal_list */ -#line 153 "bison_parser.y" +#line 154 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2399,11 +2416,11 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2403 "bison_parser.cpp" +#line 2420 "bison_parser.cpp" break; case YYSYMBOL_literal_list: /* literal_list */ -#line 153 "bison_parser.y" +#line 154 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2412,191 +2429,191 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2416 "bison_parser.cpp" +#line 2433 "bison_parser.cpp" break; case YYSYMBOL_expr_alias: /* expr_alias */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2422 "bison_parser.cpp" +#line 2439 "bison_parser.cpp" break; case YYSYMBOL_expr: /* expr */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2428 "bison_parser.cpp" +#line 2445 "bison_parser.cpp" break; case YYSYMBOL_operand: /* operand */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2434 "bison_parser.cpp" +#line 2451 "bison_parser.cpp" break; case YYSYMBOL_scalar_expr: /* scalar_expr */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2440 "bison_parser.cpp" +#line 2457 "bison_parser.cpp" break; case YYSYMBOL_unary_expr: /* unary_expr */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2446 "bison_parser.cpp" +#line 2463 "bison_parser.cpp" break; case YYSYMBOL_binary_expr: /* binary_expr */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2452 "bison_parser.cpp" +#line 2469 "bison_parser.cpp" break; case YYSYMBOL_logic_expr: /* logic_expr */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2458 "bison_parser.cpp" +#line 2475 "bison_parser.cpp" break; case YYSYMBOL_in_expr: /* in_expr */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2464 "bison_parser.cpp" +#line 2481 "bison_parser.cpp" break; case YYSYMBOL_case_expr: /* case_expr */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2470 "bison_parser.cpp" +#line 2487 "bison_parser.cpp" break; case YYSYMBOL_case_list: /* case_list */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2476 "bison_parser.cpp" +#line 2493 "bison_parser.cpp" break; case YYSYMBOL_exists_expr: /* exists_expr */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2482 "bison_parser.cpp" +#line 2499 "bison_parser.cpp" break; case YYSYMBOL_comp_expr: /* comp_expr */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2488 "bison_parser.cpp" +#line 2505 "bison_parser.cpp" break; case YYSYMBOL_function_expr: /* function_expr */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2494 "bison_parser.cpp" +#line 2511 "bison_parser.cpp" break; case YYSYMBOL_extract_expr: /* extract_expr */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2500 "bison_parser.cpp" +#line 2517 "bison_parser.cpp" break; case YYSYMBOL_cast_expr: /* cast_expr */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2506 "bison_parser.cpp" +#line 2523 "bison_parser.cpp" break; case YYSYMBOL_datetime_field: /* datetime_field */ -#line 150 "bison_parser.y" +#line 151 "bison_parser.y" { } -#line 2512 "bison_parser.cpp" +#line 2529 "bison_parser.cpp" break; case YYSYMBOL_array_expr: /* array_expr */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2518 "bison_parser.cpp" +#line 2535 "bison_parser.cpp" break; case YYSYMBOL_array_index: /* array_index */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2524 "bison_parser.cpp" +#line 2541 "bison_parser.cpp" break; case YYSYMBOL_between_expr: /* between_expr */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2530 "bison_parser.cpp" +#line 2547 "bison_parser.cpp" break; case YYSYMBOL_column_name: /* column_name */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2536 "bison_parser.cpp" +#line 2553 "bison_parser.cpp" break; case YYSYMBOL_literal: /* literal */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2542 "bison_parser.cpp" +#line 2559 "bison_parser.cpp" break; case YYSYMBOL_string_literal: /* string_literal */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2548 "bison_parser.cpp" +#line 2565 "bison_parser.cpp" break; case YYSYMBOL_bool_literal: /* bool_literal */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2554 "bison_parser.cpp" +#line 2571 "bison_parser.cpp" break; case YYSYMBOL_num_literal: /* num_literal */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2560 "bison_parser.cpp" +#line 2577 "bison_parser.cpp" break; case YYSYMBOL_int_literal: /* int_literal */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2566 "bison_parser.cpp" +#line 2583 "bison_parser.cpp" break; case YYSYMBOL_null_literal: /* null_literal */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2572 "bison_parser.cpp" +#line 2589 "bison_parser.cpp" break; case YYSYMBOL_param_expr: /* param_expr */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2578 "bison_parser.cpp" +#line 2595 "bison_parser.cpp" break; case YYSYMBOL_table_ref: /* table_ref */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2584 "bison_parser.cpp" +#line 2601 "bison_parser.cpp" break; case YYSYMBOL_table_ref_atomic: /* table_ref_atomic */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2590 "bison_parser.cpp" +#line 2607 "bison_parser.cpp" break; case YYSYMBOL_nonjoin_table_ref_atomic: /* nonjoin_table_ref_atomic */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2596 "bison_parser.cpp" +#line 2613 "bison_parser.cpp" break; case YYSYMBOL_table_ref_commalist: /* table_ref_commalist */ -#line 153 "bison_parser.y" +#line 154 "bison_parser.y" { if ((((*yyvaluep).table_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).table_vec))) { @@ -2605,107 +2622,107 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).table_vec)); } -#line 2609 "bison_parser.cpp" +#line 2626 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name: /* table_ref_name */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2615 "bison_parser.cpp" +#line 2632 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name_no_alias: /* table_ref_name_no_alias */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2621 "bison_parser.cpp" +#line 2638 "bison_parser.cpp" break; case YYSYMBOL_table_name: /* table_name */ -#line 151 "bison_parser.y" +#line 152 "bison_parser.y" { free( (((*yyvaluep).table_name).name) ); free( (((*yyvaluep).table_name).schema) ); } -#line 2627 "bison_parser.cpp" +#line 2644 "bison_parser.cpp" break; case YYSYMBOL_opt_index_name: /* opt_index_name */ -#line 152 "bison_parser.y" +#line 153 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2633 "bison_parser.cpp" +#line 2650 "bison_parser.cpp" break; case YYSYMBOL_index_name: /* index_name */ -#line 152 "bison_parser.y" +#line 153 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2639 "bison_parser.cpp" +#line 2656 "bison_parser.cpp" break; case YYSYMBOL_table_alias: /* table_alias */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2645 "bison_parser.cpp" +#line 2662 "bison_parser.cpp" break; case YYSYMBOL_opt_table_alias: /* opt_table_alias */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2651 "bison_parser.cpp" +#line 2668 "bison_parser.cpp" break; case YYSYMBOL_alias: /* alias */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2657 "bison_parser.cpp" +#line 2674 "bison_parser.cpp" break; case YYSYMBOL_opt_alias: /* opt_alias */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2663 "bison_parser.cpp" +#line 2680 "bison_parser.cpp" break; case YYSYMBOL_opt_with_clause: /* opt_with_clause */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2669 "bison_parser.cpp" +#line 2686 "bison_parser.cpp" break; case YYSYMBOL_with_clause: /* with_clause */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2675 "bison_parser.cpp" +#line 2692 "bison_parser.cpp" break; case YYSYMBOL_with_description_list: /* with_description_list */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2681 "bison_parser.cpp" +#line 2698 "bison_parser.cpp" break; case YYSYMBOL_with_description: /* with_description */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).with_description_t)); } -#line 2687 "bison_parser.cpp" +#line 2704 "bison_parser.cpp" break; case YYSYMBOL_join_clause: /* join_clause */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2693 "bison_parser.cpp" +#line 2710 "bison_parser.cpp" break; case YYSYMBOL_opt_join_type: /* opt_join_type */ -#line 150 "bison_parser.y" +#line 151 "bison_parser.y" { } -#line 2699 "bison_parser.cpp" +#line 2716 "bison_parser.cpp" break; case YYSYMBOL_join_condition: /* join_condition */ -#line 161 "bison_parser.y" +#line 162 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2705 "bison_parser.cpp" +#line 2722 "bison_parser.cpp" break; case YYSYMBOL_ident_commalist: /* ident_commalist */ -#line 153 "bison_parser.y" +#line 154 "bison_parser.y" { if ((((*yyvaluep).str_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).str_vec))) { @@ -2714,7 +2731,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2718 "bison_parser.cpp" +#line 2735 "bison_parser.cpp" break; default: @@ -2821,7 +2838,7 @@ YYLTYPE yylloc = yyloc_default; yylloc.string_length = 0; } -#line 2825 "bison_parser.cpp" +#line 2842 "bison_parser.cpp" yylsp[0] = yylloc; goto yysetstate; @@ -3031,7 +3048,7 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* input: statement_list opt_semicolon */ -#line 277 "bison_parser.y" +#line 279 "bison_parser.y" { for (SQLStatement* stmt : *(yyvsp[-1].stmt_vec)) { // Transfers ownership of the statement. @@ -3049,247 +3066,247 @@ YYLTYPE yylloc = yyloc_default; } delete (yyvsp[-1].stmt_vec); } -#line 3053 "bison_parser.cpp" +#line 3070 "bison_parser.cpp" break; case 3: /* statement_list: statement */ -#line 298 "bison_parser.y" +#line 300 "bison_parser.y" { (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 3064 "bison_parser.cpp" +#line 3081 "bison_parser.cpp" break; case 4: /* statement_list: statement_list ';' statement */ -#line 304 "bison_parser.y" +#line 306 "bison_parser.y" { (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 3075 "bison_parser.cpp" +#line 3092 "bison_parser.cpp" break; case 5: /* statement: prepare_statement opt_hints */ -#line 313 "bison_parser.y" +#line 315 "bison_parser.y" { (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3084 "bison_parser.cpp" +#line 3101 "bison_parser.cpp" break; case 6: /* statement: preparable_statement opt_hints */ -#line 317 "bison_parser.y" +#line 319 "bison_parser.y" { (yyval.statement) = (yyvsp[-1].statement); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3093 "bison_parser.cpp" +#line 3110 "bison_parser.cpp" break; case 7: /* statement: show_statement */ -#line 321 "bison_parser.y" +#line 323 "bison_parser.y" { (yyval.statement) = (yyvsp[0].show_stmt); } -#line 3101 "bison_parser.cpp" +#line 3118 "bison_parser.cpp" break; case 8: /* statement: import_statement */ -#line 324 "bison_parser.y" +#line 326 "bison_parser.y" { (yyval.statement) = (yyvsp[0].import_stmt); } -#line 3109 "bison_parser.cpp" +#line 3126 "bison_parser.cpp" break; case 9: /* statement: export_statement */ -#line 327 "bison_parser.y" +#line 329 "bison_parser.y" { (yyval.statement) = (yyvsp[0].export_stmt); } -#line 3117 "bison_parser.cpp" +#line 3134 "bison_parser.cpp" break; case 10: /* preparable_statement: select_statement */ -#line 334 "bison_parser.y" +#line 336 "bison_parser.y" { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 3123 "bison_parser.cpp" +#line 3140 "bison_parser.cpp" break; case 11: /* preparable_statement: create_statement */ -#line 335 "bison_parser.y" +#line 337 "bison_parser.y" { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 3129 "bison_parser.cpp" +#line 3146 "bison_parser.cpp" break; case 12: /* preparable_statement: insert_statement */ -#line 336 "bison_parser.y" +#line 338 "bison_parser.y" { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 3135 "bison_parser.cpp" +#line 3152 "bison_parser.cpp" break; case 13: /* preparable_statement: delete_statement */ -#line 337 "bison_parser.y" +#line 339 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3141 "bison_parser.cpp" +#line 3158 "bison_parser.cpp" break; case 14: /* preparable_statement: truncate_statement */ -#line 338 "bison_parser.y" +#line 340 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3147 "bison_parser.cpp" +#line 3164 "bison_parser.cpp" break; case 15: /* preparable_statement: update_statement */ -#line 339 "bison_parser.y" +#line 341 "bison_parser.y" { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 3153 "bison_parser.cpp" +#line 3170 "bison_parser.cpp" break; case 16: /* preparable_statement: drop_statement */ -#line 340 "bison_parser.y" +#line 342 "bison_parser.y" { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 3159 "bison_parser.cpp" +#line 3176 "bison_parser.cpp" break; case 17: /* preparable_statement: execute_statement */ -#line 341 "bison_parser.y" +#line 343 "bison_parser.y" { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 3165 "bison_parser.cpp" +#line 3182 "bison_parser.cpp" break; case 18: /* preparable_statement: transaction_statement */ -#line 342 "bison_parser.y" +#line 344 "bison_parser.y" { (yyval.statement) = (yyvsp[0].transaction_stmt); } -#line 3171 "bison_parser.cpp" +#line 3188 "bison_parser.cpp" break; case 19: /* opt_hints: WITH HINT '(' hint_list ')' */ -#line 351 "bison_parser.y" +#line 353 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 3177 "bison_parser.cpp" +#line 3194 "bison_parser.cpp" break; case 20: /* opt_hints: %empty */ -#line 352 "bison_parser.y" +#line 354 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 3183 "bison_parser.cpp" +#line 3200 "bison_parser.cpp" break; case 21: /* hint_list: hint */ -#line 357 "bison_parser.y" +#line 359 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3189 "bison_parser.cpp" +#line 3206 "bison_parser.cpp" break; case 22: /* hint_list: hint_list ',' hint */ -#line 358 "bison_parser.y" +#line 360 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3195 "bison_parser.cpp" +#line 3212 "bison_parser.cpp" break; case 23: /* hint: IDENTIFIER */ -#line 362 "bison_parser.y" +#line 364 "bison_parser.y" { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[0].sval); } -#line 3204 "bison_parser.cpp" +#line 3221 "bison_parser.cpp" break; case 24: /* hint: IDENTIFIER '(' literal_list ')' */ -#line 366 "bison_parser.y" +#line 368 "bison_parser.y" { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[-3].sval); (yyval.expr)->exprList = (yyvsp[-1].expr_vec); } -#line 3214 "bison_parser.cpp" +#line 3231 "bison_parser.cpp" break; case 25: /* transaction_statement: BEGIN opt_transaction_keyword */ -#line 378 "bison_parser.y" +#line 380 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kBeginTransaction); } -#line 3222 "bison_parser.cpp" +#line 3239 "bison_parser.cpp" break; case 26: /* transaction_statement: ROLLBACK opt_transaction_keyword */ -#line 381 "bison_parser.y" +#line 383 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kRollbackTransaction); } -#line 3230 "bison_parser.cpp" +#line 3247 "bison_parser.cpp" break; case 27: /* transaction_statement: COMMIT opt_transaction_keyword */ -#line 384 "bison_parser.y" +#line 386 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kCommitTransaction); } -#line 3238 "bison_parser.cpp" +#line 3255 "bison_parser.cpp" break; case 30: /* prepare_statement: PREPARE IDENTIFIER FROM prepare_target_query */ -#line 398 "bison_parser.y" +#line 400 "bison_parser.y" { (yyval.prep_stmt) = new PrepareStatement(); (yyval.prep_stmt)->name = (yyvsp[-2].sval); (yyval.prep_stmt)->query = (yyvsp[0].sval); } -#line 3248 "bison_parser.cpp" +#line 3265 "bison_parser.cpp" break; case 32: /* execute_statement: EXECUTE IDENTIFIER */ -#line 408 "bison_parser.y" +#line 410 "bison_parser.y" { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[0].sval); } -#line 3257 "bison_parser.cpp" +#line 3274 "bison_parser.cpp" break; case 33: /* execute_statement: EXECUTE IDENTIFIER '(' opt_literal_list ')' */ -#line 412 "bison_parser.y" +#line 414 "bison_parser.y" { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[-3].sval); (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); } -#line 3267 "bison_parser.cpp" +#line 3284 "bison_parser.cpp" break; case 34: /* import_statement: IMPORT FROM file_type FILE file_path INTO table_name */ -#line 426 "bison_parser.y" +#line 428 "bison_parser.y" { (yyval.import_stmt) = new ImportStatement((yyvsp[-4].import_type_t)); (yyval.import_stmt)->filePath = (yyvsp[-2].sval); (yyval.import_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3278 "bison_parser.cpp" +#line 3295 "bison_parser.cpp" break; case 35: /* import_statement: COPY table_name FROM file_path opt_file_type */ -#line 432 "bison_parser.y" +#line 434 "bison_parser.y" { (yyval.import_stmt) = new ImportStatement((yyvsp[0].import_type_t)); (yyval.import_stmt)->filePath = (yyvsp[-1].sval); (yyval.import_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3289 "bison_parser.cpp" +#line 3306 "bison_parser.cpp" break; case 36: /* file_type: IDENTIFIER */ -#line 441 "bison_parser.y" +#line 443 "bison_parser.y" { if (strcasecmp((yyvsp[0].sval), "csv") == 0) { (yyval.import_type_t) = kImportCSV; @@ -3304,70 +3321,70 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[0].sval)); } -#line 3308 "bison_parser.cpp" +#line 3325 "bison_parser.cpp" break; case 37: /* file_path: string_literal */ -#line 458 "bison_parser.y" +#line 460 "bison_parser.y" { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 3314 "bison_parser.cpp" +#line 3331 "bison_parser.cpp" break; case 38: /* opt_file_type: WITH FORMAT file_type */ -#line 462 "bison_parser.y" +#line 464 "bison_parser.y" { (yyval.import_type_t) = (yyvsp[0].import_type_t); } -#line 3322 "bison_parser.cpp" +#line 3339 "bison_parser.cpp" break; case 39: /* opt_file_type: %empty */ -#line 465 "bison_parser.y" +#line 467 "bison_parser.y" { (yyval.import_type_t) = kImportAuto; } -#line 3328 "bison_parser.cpp" +#line 3345 "bison_parser.cpp" break; case 40: /* export_statement: COPY table_name TO file_path opt_file_type */ -#line 474 "bison_parser.y" +#line 476 "bison_parser.y" { (yyval.export_stmt) = new ExportStatement((yyvsp[0].import_type_t)); (yyval.export_stmt)->filePath = (yyvsp[-1].sval); (yyval.export_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.export_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3339 "bison_parser.cpp" +#line 3356 "bison_parser.cpp" break; case 41: /* show_statement: SHOW TABLES */ -#line 488 "bison_parser.y" +#line 490 "bison_parser.y" { (yyval.show_stmt) = new ShowStatement(kShowTables); } -#line 3347 "bison_parser.cpp" +#line 3364 "bison_parser.cpp" break; case 42: /* show_statement: SHOW COLUMNS table_name */ -#line 491 "bison_parser.y" +#line 493 "bison_parser.y" { (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 3357 "bison_parser.cpp" +#line 3374 "bison_parser.cpp" break; case 43: /* show_statement: DESCRIBE table_name */ -#line 496 "bison_parser.y" +#line 498 "bison_parser.y" { (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 3367 "bison_parser.cpp" +#line 3384 "bison_parser.cpp" break; case 44: /* create_statement: CREATE TABLE opt_not_exists table_name FROM IDENTIFIER FILE file_path */ -#line 510 "bison_parser.y" +#line 512 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTableFromTbl); (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); @@ -3381,11 +3398,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].sval)); (yyval.create_stmt)->filePath = (yyvsp[0].sval); } -#line 3385 "bison_parser.cpp" +#line 3402 "bison_parser.cpp" break; case 45: /* create_statement: CREATE TABLE opt_not_exists table_name '(' column_def_commalist opt_table_key_constraints ')' */ -#line 523 "bison_parser.y" +#line 525 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); @@ -3394,11 +3411,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->columns = (yyvsp[-2].column_vec); (yyval.create_stmt)->tableKeyConstraints = (yyvsp[-1].table_key_constraint_vec); } -#line 3398 "bison_parser.cpp" +#line 3415 "bison_parser.cpp" break; case 46: /* create_statement: CREATE TABLE opt_not_exists table_name AS select_statement */ -#line 531 "bison_parser.y" +#line 533 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-3].bval); @@ -3406,11 +3423,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-2].table_name).name; (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3410 "bison_parser.cpp" +#line 3427 "bison_parser.cpp" break; case 47: /* create_statement: CREATE INDEX opt_not_exists opt_index_name ON table_name '(' ident_commalist ')' */ -#line 538 "bison_parser.y" +#line 540 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateIndex); (yyval.create_stmt)->indexName = (yyvsp[-5].sval); @@ -3418,11 +3435,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->indexColumns = (yyvsp[-1].str_vec); } -#line 3422 "bison_parser.cpp" +#line 3439 "bison_parser.cpp" break; case 48: /* create_statement: CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement */ -#line 545 "bison_parser.y" +#line 547 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateView); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -3431,269 +3448,287 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3435 "bison_parser.cpp" +#line 3452 "bison_parser.cpp" break; case 49: /* opt_not_exists: IF NOT EXISTS */ -#line 556 "bison_parser.y" +#line 558 "bison_parser.y" { (yyval.bval) = true; } -#line 3441 "bison_parser.cpp" +#line 3458 "bison_parser.cpp" break; case 50: /* opt_not_exists: %empty */ -#line 557 "bison_parser.y" +#line 559 "bison_parser.y" { (yyval.bval) = false; } -#line 3447 "bison_parser.cpp" +#line 3464 "bison_parser.cpp" break; case 51: /* column_def_commalist: column_def */ -#line 561 "bison_parser.y" +#line 563 "bison_parser.y" { (yyval.column_vec) = new std::vector(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); } -#line 3453 "bison_parser.cpp" +#line 3470 "bison_parser.cpp" break; case 52: /* column_def_commalist: column_def_commalist ',' column_def */ -#line 562 "bison_parser.y" +#line 564 "bison_parser.y" { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } -#line 3459 "bison_parser.cpp" +#line 3476 "bison_parser.cpp" break; case 53: /* column_def: IDENTIFIER column_type opt_column_nullable opt_column_constraint */ -#line 566 "bison_parser.y" +#line 568 "bison_parser.y" { (yyval.column_t) = new ColumnDefinition((yyvsp[-3].sval), (yyvsp[-2].column_type_t), (yyvsp[-1].bval), (yyvsp[0].column_constraint_t)); } -#line 3467 "bison_parser.cpp" +#line 3484 "bison_parser.cpp" break; case 54: /* column_type: INT */ -#line 572 "bison_parser.y" +#line 574 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3473 "bison_parser.cpp" +#line 3490 "bison_parser.cpp" break; case 55: /* column_type: INTEGER */ -#line 573 "bison_parser.y" +#line 575 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3479 "bison_parser.cpp" +#line 3496 "bison_parser.cpp" break; case 56: /* column_type: LONG */ -#line 574 "bison_parser.y" +#line 576 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::LONG}; } -#line 3485 "bison_parser.cpp" +#line 3502 "bison_parser.cpp" break; case 57: /* column_type: FLOAT */ -#line 575 "bison_parser.y" +#line 577 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3491 "bison_parser.cpp" +#line 3508 "bison_parser.cpp" break; - case 58: /* column_type: DECIMAL '(' INTVAL ',' INTVAL ')' */ -#line 576 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3497 "bison_parser.cpp" + case 58: /* column_type: DECIMAL opt_decimal_specification */ +#line 578 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::DECIMAL, 0, (yyvsp[0].decimal_specification_t)}; } +#line 3514 "bison_parser.cpp" break; case 59: /* column_type: DOUBLE */ -#line 577 "bison_parser.y" +#line 579 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } -#line 3503 "bison_parser.cpp" +#line 3520 "bison_parser.cpp" break; case 60: /* column_type: REAL */ -#line 578 "bison_parser.y" +#line 580 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3509 "bison_parser.cpp" +#line 3526 "bison_parser.cpp" break; case 61: /* column_type: VARCHAR '(' INTVAL ')' */ -#line 579 "bison_parser.y" +#line 581 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3515 "bison_parser.cpp" +#line 3532 "bison_parser.cpp" break; case 62: /* column_type: CHARACTER VARYING '(' INTVAL ')' */ -#line 580 "bison_parser.y" +#line 582 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3521 "bison_parser.cpp" +#line 3538 "bison_parser.cpp" break; case 63: /* column_type: CHAR '(' INTVAL ')' */ -#line 581 "bison_parser.y" +#line 583 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } -#line 3527 "bison_parser.cpp" +#line 3544 "bison_parser.cpp" break; case 64: /* column_type: TEXT */ -#line 582 "bison_parser.y" +#line 584 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } -#line 3533 "bison_parser.cpp" +#line 3550 "bison_parser.cpp" break; case 65: /* column_type: TIME */ -#line 583 "bison_parser.y" +#line 585 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TIME}; } -#line 3539 "bison_parser.cpp" +#line 3556 "bison_parser.cpp" break; case 66: /* column_type: DATETIME */ -#line 584 "bison_parser.y" +#line 586 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } -#line 3545 "bison_parser.cpp" +#line 3562 "bison_parser.cpp" break; case 67: /* column_type: DATE */ -#line 585 "bison_parser.y" +#line 587 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATE}; } -#line 3551 "bison_parser.cpp" +#line 3568 "bison_parser.cpp" + break; + + case 68: /* opt_decimal_specification: '(' INTVAL ',' INTVAL ')' */ +#line 591 "bison_parser.y" + { (yyval.decimal_specification_t) = DecimalSpecification{(yyvsp[-3].ival), (yyvsp[-1].ival)}; } +#line 3574 "bison_parser.cpp" + break; + + case 69: /* opt_decimal_specification: '(' INTVAL ')' */ +#line 592 "bison_parser.y" + { (yyval.decimal_specification_t) = DecimalSpecification{(yyvsp[-1].ival), 0}; } +#line 3580 "bison_parser.cpp" break; - case 68: /* opt_column_nullable: NULL */ -#line 589 "bison_parser.y" + case 70: /* opt_decimal_specification: %empty */ +#line 593 "bison_parser.y" + { (yyval.decimal_specification_t) = DecimalSpecification{0, 0}; } +#line 3586 "bison_parser.cpp" + break; + + case 71: /* opt_column_nullable: NULL */ +#line 596 "bison_parser.y" { (yyval.bval) = true; } -#line 3557 "bison_parser.cpp" +#line 3592 "bison_parser.cpp" break; - case 69: /* opt_column_nullable: NOT NULL */ -#line 590 "bison_parser.y" + case 72: /* opt_column_nullable: NOT NULL */ +#line 597 "bison_parser.y" { (yyval.bval) = false; } -#line 3563 "bison_parser.cpp" +#line 3598 "bison_parser.cpp" break; - case 70: /* opt_column_nullable: %empty */ -#line 591 "bison_parser.y" + case 73: /* opt_column_nullable: %empty */ +#line 598 "bison_parser.y" { (yyval.bval) = false; } -#line 3569 "bison_parser.cpp" +#line 3604 "bison_parser.cpp" break; - case 71: /* opt_column_constraint: PRIMARY KEY */ -#line 595 "bison_parser.y" + case 74: /* opt_column_constraint: PRIMARY KEY */ +#line 602 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::PRIMARY_KEY; } -#line 3575 "bison_parser.cpp" +#line 3610 "bison_parser.cpp" break; - case 72: /* opt_column_constraint: UNIQUE */ -#line 596 "bison_parser.y" + case 75: /* opt_column_constraint: UNIQUE */ +#line 603 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::UNIQUE; } -#line 3581 "bison_parser.cpp" +#line 3616 "bison_parser.cpp" break; - case 73: /* opt_column_constraint: %empty */ -#line 597 "bison_parser.y" + case 76: /* opt_column_constraint: %empty */ +#line 604 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::NOT_SET; } -#line 3587 "bison_parser.cpp" +#line 3622 "bison_parser.cpp" break; - case 74: /* opt_table_key_constraints: table_key_constraint */ -#line 601 "bison_parser.y" + case 77: /* opt_table_key_constraints: table_key_constraint */ +#line 608 "bison_parser.y" {(yyval.table_key_constraint_vec) = new std::vector(); (yyval.table_key_constraint_vec)->push_back((yyvsp[0].table_key_constraint_t)); } -#line 3593 "bison_parser.cpp" +#line 3628 "bison_parser.cpp" break; - case 75: /* opt_table_key_constraints: opt_table_key_constraints table_key_constraint */ -#line 602 "bison_parser.y" + case 78: /* opt_table_key_constraints: opt_table_key_constraints table_key_constraint */ +#line 609 "bison_parser.y" { (yyvsp[-1].table_key_constraint_vec)->push_back((yyvsp[0].table_key_constraint_t)); (yyval.table_key_constraint_vec) = (yyvsp[-1].table_key_constraint_vec); } -#line 3599 "bison_parser.cpp" +#line 3634 "bison_parser.cpp" break; - case 76: /* opt_table_key_constraints: %empty */ -#line 603 "bison_parser.y" + case 79: /* opt_table_key_constraints: %empty */ +#line 610 "bison_parser.y" {(yyval.table_key_constraint_vec) = new std::vector(); } -#line 3605 "bison_parser.cpp" +#line 3640 "bison_parser.cpp" break; - case 77: /* table_key_constraint: ',' PRIMARY KEY '(' ident_commalist ')' */ -#line 607 "bison_parser.y" + case 80: /* table_key_constraint: ',' PRIMARY KEY '(' ident_commalist ')' */ +#line 614 "bison_parser.y" { (yyval.table_key_constraint_t) = new TableKeyConstraint(ConstraintType::PRIMARY_KEY, (yyvsp[-1].str_vec)); } -#line 3611 "bison_parser.cpp" +#line 3646 "bison_parser.cpp" break; - case 78: /* table_key_constraint: ',' UNIQUE '(' ident_commalist ')' */ -#line 608 "bison_parser.y" + case 81: /* table_key_constraint: ',' UNIQUE '(' ident_commalist ')' */ +#line 615 "bison_parser.y" { (yyval.table_key_constraint_t) = new TableKeyConstraint(ConstraintType::UNIQUE, (yyvsp[-1].str_vec)); } -#line 3617 "bison_parser.cpp" +#line 3652 "bison_parser.cpp" break; - case 79: /* drop_statement: DROP TABLE opt_exists table_name */ -#line 616 "bison_parser.y" + case 82: /* drop_statement: DROP TABLE opt_exists table_name */ +#line 623 "bison_parser.y" { (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 3628 "bison_parser.cpp" +#line 3663 "bison_parser.cpp" break; - case 80: /* drop_statement: DROP VIEW opt_exists table_name */ -#line 622 "bison_parser.y" + case 83: /* drop_statement: DROP VIEW opt_exists table_name */ +#line 629 "bison_parser.y" { (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 3639 "bison_parser.cpp" +#line 3674 "bison_parser.cpp" break; - case 81: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ -#line 628 "bison_parser.y" + case 84: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ +#line 635 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); (yyval.drop_stmt)->ifExists = false; (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 3649 "bison_parser.cpp" +#line 3684 "bison_parser.cpp" break; - case 82: /* drop_statement: DROP INDEX opt_exists index_name ON table_name */ -#line 633 "bison_parser.y" + case 85: /* drop_statement: DROP INDEX opt_exists index_name ON table_name */ +#line 640 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropIndex); (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; (yyval.drop_stmt)->ifExists = (yyvsp[-3].bval); (yyval.drop_stmt)->index_name = (yyvsp[-2].sval); } -#line 3660 "bison_parser.cpp" +#line 3695 "bison_parser.cpp" break; - case 83: /* opt_exists: IF EXISTS */ -#line 642 "bison_parser.y" + case 86: /* opt_exists: IF EXISTS */ +#line 649 "bison_parser.y" { (yyval.bval) = true; } -#line 3666 "bison_parser.cpp" +#line 3701 "bison_parser.cpp" break; - case 84: /* opt_exists: %empty */ -#line 643 "bison_parser.y" + case 87: /* opt_exists: %empty */ +#line 650 "bison_parser.y" { (yyval.bval) = false; } -#line 3672 "bison_parser.cpp" +#line 3707 "bison_parser.cpp" break; - case 85: /* delete_statement: DELETE FROM table_name opt_where */ -#line 652 "bison_parser.y" + case 88: /* delete_statement: DELETE FROM table_name opt_where */ +#line 659 "bison_parser.y" { (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 3683 "bison_parser.cpp" +#line 3718 "bison_parser.cpp" break; - case 86: /* truncate_statement: TRUNCATE table_name */ -#line 661 "bison_parser.y" + case 89: /* truncate_statement: TRUNCATE table_name */ +#line 668 "bison_parser.y" { (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3693 "bison_parser.cpp" +#line 3728 "bison_parser.cpp" break; - case 87: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ -#line 674 "bison_parser.y" + case 90: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ +#line 681 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertValues); (yyval.insert_stmt)->schema = (yyvsp[-5].table_name).schema; @@ -3701,11 +3736,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } -#line 3705 "bison_parser.cpp" +#line 3740 "bison_parser.cpp" break; - case 88: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ -#line 681 "bison_parser.y" + case 91: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ +#line 688 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertSelect); (yyval.insert_stmt)->schema = (yyvsp[-2].table_name).schema; @@ -3713,74 +3748,74 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } -#line 3717 "bison_parser.cpp" +#line 3752 "bison_parser.cpp" break; - case 89: /* opt_column_list: '(' ident_commalist ')' */ -#line 692 "bison_parser.y" + case 92: /* opt_column_list: '(' ident_commalist ')' */ +#line 699 "bison_parser.y" { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 3723 "bison_parser.cpp" +#line 3758 "bison_parser.cpp" break; - case 90: /* opt_column_list: %empty */ -#line 693 "bison_parser.y" + case 93: /* opt_column_list: %empty */ +#line 700 "bison_parser.y" { (yyval.str_vec) = nullptr; } -#line 3729 "bison_parser.cpp" +#line 3764 "bison_parser.cpp" break; - case 91: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ -#line 703 "bison_parser.y" + case 94: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ +#line 710 "bison_parser.y" { (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 3740 "bison_parser.cpp" +#line 3775 "bison_parser.cpp" break; - case 92: /* update_clause_commalist: update_clause */ -#line 712 "bison_parser.y" + case 95: /* update_clause_commalist: update_clause */ +#line 719 "bison_parser.y" { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 3746 "bison_parser.cpp" +#line 3781 "bison_parser.cpp" break; - case 93: /* update_clause_commalist: update_clause_commalist ',' update_clause */ -#line 713 "bison_parser.y" + case 96: /* update_clause_commalist: update_clause_commalist ',' update_clause */ +#line 720 "bison_parser.y" { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 3752 "bison_parser.cpp" +#line 3787 "bison_parser.cpp" break; - case 94: /* update_clause: IDENTIFIER '=' expr */ -#line 717 "bison_parser.y" + case 97: /* update_clause: IDENTIFIER '=' expr */ +#line 724 "bison_parser.y" { (yyval.update_t) = new UpdateClause(); (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 3762 "bison_parser.cpp" +#line 3797 "bison_parser.cpp" break; - case 95: /* select_statement: opt_with_clause select_with_paren */ -#line 729 "bison_parser.y" + case 98: /* select_statement: opt_with_clause select_with_paren */ +#line 736 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3771 "bison_parser.cpp" +#line 3806 "bison_parser.cpp" break; - case 96: /* select_statement: opt_with_clause select_no_paren */ -#line 733 "bison_parser.y" + case 99: /* select_statement: opt_with_clause select_no_paren */ +#line 740 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3780 "bison_parser.cpp" +#line 3815 "bison_parser.cpp" break; - case 97: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ -#line 737 "bison_parser.y" + case 100: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ +#line 744 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3792,17 +3827,17 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); (yyval.select_stmt)->withDescriptions = (yyvsp[-5].with_description_vec); } -#line 3796 "bison_parser.cpp" +#line 3831 "bison_parser.cpp" break; - case 100: /* select_within_set_operation_no_parentheses: select_clause */ -#line 755 "bison_parser.y" + case 103: /* select_within_set_operation_no_parentheses: select_clause */ +#line 762 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); } -#line 3802 "bison_parser.cpp" +#line 3837 "bison_parser.cpp" break; - case 101: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ -#line 756 "bison_parser.y" + case 104: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ +#line 763 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3811,23 +3846,23 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->push_back((yyvsp[-1].set_operator_t)); (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[0].select_stmt); } -#line 3815 "bison_parser.cpp" +#line 3850 "bison_parser.cpp" break; - case 102: /* select_with_paren: '(' select_no_paren ')' */ -#line 767 "bison_parser.y" + case 105: /* select_with_paren: '(' select_no_paren ')' */ +#line 774 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3821 "bison_parser.cpp" +#line 3856 "bison_parser.cpp" break; - case 103: /* select_with_paren: '(' select_with_paren ')' */ -#line 768 "bison_parser.y" + case 106: /* select_with_paren: '(' select_with_paren ')' */ +#line 775 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3827 "bison_parser.cpp" +#line 3862 "bison_parser.cpp" break; - case 104: /* select_no_paren: select_clause opt_order opt_limit */ -#line 772 "bison_parser.y" + case 107: /* select_no_paren: select_clause opt_order opt_limit */ +#line 779 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); (yyval.select_stmt)->order = (yyvsp[-1].order_vec); @@ -3838,11 +3873,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3842 "bison_parser.cpp" +#line 3877 "bison_parser.cpp" break; - case 105: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ -#line 782 "bison_parser.y" + case 108: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ +#line 789 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3853,63 +3888,63 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); } -#line 3857 "bison_parser.cpp" +#line 3892 "bison_parser.cpp" break; - case 106: /* set_operator: set_type opt_all */ -#line 795 "bison_parser.y" + case 109: /* set_operator: set_type opt_all */ +#line 802 "bison_parser.y" { (yyval.set_operator_t) = (yyvsp[-1].set_operator_t); (yyval.set_operator_t)->isAll = (yyvsp[0].bval); } -#line 3866 "bison_parser.cpp" +#line 3901 "bison_parser.cpp" break; - case 107: /* set_type: UNION */ -#line 802 "bison_parser.y" + case 110: /* set_type: UNION */ +#line 809 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetUnion; } -#line 3875 "bison_parser.cpp" +#line 3910 "bison_parser.cpp" break; - case 108: /* set_type: INTERSECT */ -#line 806 "bison_parser.y" + case 111: /* set_type: INTERSECT */ +#line 813 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetIntersect; } -#line 3884 "bison_parser.cpp" +#line 3919 "bison_parser.cpp" break; - case 109: /* set_type: EXCEPT */ -#line 810 "bison_parser.y" + case 112: /* set_type: EXCEPT */ +#line 817 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetExcept; } -#line 3893 "bison_parser.cpp" +#line 3928 "bison_parser.cpp" break; - case 110: /* opt_all: ALL */ -#line 817 "bison_parser.y" + case 113: /* opt_all: ALL */ +#line 824 "bison_parser.y" { (yyval.bval) = true; } -#line 3901 "bison_parser.cpp" +#line 3936 "bison_parser.cpp" break; - case 111: /* opt_all: %empty */ -#line 820 "bison_parser.y" + case 114: /* opt_all: %empty */ +#line 827 "bison_parser.y" { (yyval.bval) = false; } -#line 3909 "bison_parser.cpp" +#line 3944 "bison_parser.cpp" break; - case 112: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ -#line 826 "bison_parser.y" + case 115: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ +#line 833 "bison_parser.y" { (yyval.select_stmt) = new SelectStatement(); (yyval.select_stmt)->limit = (yyvsp[-5].limit); @@ -3919,213 +3954,213 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 3923 "bison_parser.cpp" +#line 3958 "bison_parser.cpp" break; - case 113: /* opt_distinct: DISTINCT */ -#line 838 "bison_parser.y" + case 116: /* opt_distinct: DISTINCT */ +#line 845 "bison_parser.y" { (yyval.bval) = true; } -#line 3929 "bison_parser.cpp" +#line 3964 "bison_parser.cpp" break; - case 114: /* opt_distinct: %empty */ -#line 839 "bison_parser.y" + case 117: /* opt_distinct: %empty */ +#line 846 "bison_parser.y" { (yyval.bval) = false; } -#line 3935 "bison_parser.cpp" +#line 3970 "bison_parser.cpp" break; - case 116: /* opt_from_clause: from_clause */ -#line 847 "bison_parser.y" + case 119: /* opt_from_clause: from_clause */ +#line 854 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 3941 "bison_parser.cpp" +#line 3976 "bison_parser.cpp" break; - case 117: /* opt_from_clause: %empty */ -#line 848 "bison_parser.y" + case 120: /* opt_from_clause: %empty */ +#line 855 "bison_parser.y" { (yyval.table) = nullptr; } -#line 3947 "bison_parser.cpp" +#line 3982 "bison_parser.cpp" break; - case 118: /* from_clause: FROM table_ref */ -#line 852 "bison_parser.y" + case 121: /* from_clause: FROM table_ref */ +#line 859 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 3953 "bison_parser.cpp" +#line 3988 "bison_parser.cpp" break; - case 119: /* opt_where: WHERE expr */ -#line 857 "bison_parser.y" + case 122: /* opt_where: WHERE expr */ +#line 864 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 3959 "bison_parser.cpp" +#line 3994 "bison_parser.cpp" break; - case 120: /* opt_where: %empty */ -#line 858 "bison_parser.y" + case 123: /* opt_where: %empty */ +#line 865 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 3965 "bison_parser.cpp" +#line 4000 "bison_parser.cpp" break; - case 121: /* opt_group: GROUP BY expr_list opt_having */ -#line 862 "bison_parser.y" + case 124: /* opt_group: GROUP BY expr_list opt_having */ +#line 869 "bison_parser.y" { (yyval.group_t) = new GroupByDescription(); (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 3975 "bison_parser.cpp" +#line 4010 "bison_parser.cpp" break; - case 122: /* opt_group: %empty */ -#line 867 "bison_parser.y" + case 125: /* opt_group: %empty */ +#line 874 "bison_parser.y" { (yyval.group_t) = nullptr; } -#line 3981 "bison_parser.cpp" +#line 4016 "bison_parser.cpp" break; - case 123: /* opt_having: HAVING expr */ -#line 871 "bison_parser.y" + case 126: /* opt_having: HAVING expr */ +#line 878 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 3987 "bison_parser.cpp" +#line 4022 "bison_parser.cpp" break; - case 124: /* opt_having: %empty */ -#line 872 "bison_parser.y" + case 127: /* opt_having: %empty */ +#line 879 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 3993 "bison_parser.cpp" +#line 4028 "bison_parser.cpp" break; - case 125: /* opt_order: ORDER BY order_list */ -#line 876 "bison_parser.y" + case 128: /* opt_order: ORDER BY order_list */ +#line 883 "bison_parser.y" { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 3999 "bison_parser.cpp" +#line 4034 "bison_parser.cpp" break; - case 126: /* opt_order: %empty */ -#line 877 "bison_parser.y" + case 129: /* opt_order: %empty */ +#line 884 "bison_parser.y" { (yyval.order_vec) = nullptr; } -#line 4005 "bison_parser.cpp" +#line 4040 "bison_parser.cpp" break; - case 127: /* order_list: order_desc */ -#line 881 "bison_parser.y" + case 130: /* order_list: order_desc */ +#line 888 "bison_parser.y" { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 4011 "bison_parser.cpp" +#line 4046 "bison_parser.cpp" break; - case 128: /* order_list: order_list ',' order_desc */ -#line 882 "bison_parser.y" + case 131: /* order_list: order_list ',' order_desc */ +#line 889 "bison_parser.y" { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 4017 "bison_parser.cpp" +#line 4052 "bison_parser.cpp" break; - case 129: /* order_desc: expr opt_order_type */ -#line 886 "bison_parser.y" + case 132: /* order_desc: expr opt_order_type */ +#line 893 "bison_parser.y" { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 4023 "bison_parser.cpp" +#line 4058 "bison_parser.cpp" break; - case 130: /* opt_order_type: ASC */ -#line 890 "bison_parser.y" + case 133: /* opt_order_type: ASC */ +#line 897 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 4029 "bison_parser.cpp" +#line 4064 "bison_parser.cpp" break; - case 131: /* opt_order_type: DESC */ -#line 891 "bison_parser.y" + case 134: /* opt_order_type: DESC */ +#line 898 "bison_parser.y" { (yyval.order_type) = kOrderDesc; } -#line 4035 "bison_parser.cpp" +#line 4070 "bison_parser.cpp" break; - case 132: /* opt_order_type: %empty */ -#line 892 "bison_parser.y" + case 135: /* opt_order_type: %empty */ +#line 899 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 4041 "bison_parser.cpp" +#line 4076 "bison_parser.cpp" break; - case 133: /* opt_top: TOP int_literal */ -#line 898 "bison_parser.y" + case 136: /* opt_top: TOP int_literal */ +#line 905 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 4047 "bison_parser.cpp" +#line 4082 "bison_parser.cpp" break; - case 134: /* opt_top: %empty */ -#line 899 "bison_parser.y" + case 137: /* opt_top: %empty */ +#line 906 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 4053 "bison_parser.cpp" +#line 4088 "bison_parser.cpp" break; - case 135: /* opt_limit: LIMIT expr */ -#line 903 "bison_parser.y" + case 138: /* opt_limit: LIMIT expr */ +#line 910 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 4059 "bison_parser.cpp" +#line 4094 "bison_parser.cpp" break; - case 136: /* opt_limit: OFFSET expr */ -#line 904 "bison_parser.y" + case 139: /* opt_limit: OFFSET expr */ +#line 911 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 4065 "bison_parser.cpp" +#line 4100 "bison_parser.cpp" break; - case 137: /* opt_limit: LIMIT expr OFFSET expr */ -#line 905 "bison_parser.y" + case 140: /* opt_limit: LIMIT expr OFFSET expr */ +#line 912 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4071 "bison_parser.cpp" +#line 4106 "bison_parser.cpp" break; - case 138: /* opt_limit: LIMIT ALL */ -#line 906 "bison_parser.y" + case 141: /* opt_limit: LIMIT ALL */ +#line 913 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, nullptr); } -#line 4077 "bison_parser.cpp" +#line 4112 "bison_parser.cpp" break; - case 139: /* opt_limit: LIMIT ALL OFFSET expr */ -#line 907 "bison_parser.y" + case 142: /* opt_limit: LIMIT ALL OFFSET expr */ +#line 914 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 4083 "bison_parser.cpp" +#line 4118 "bison_parser.cpp" break; - case 140: /* opt_limit: %empty */ -#line 908 "bison_parser.y" + case 143: /* opt_limit: %empty */ +#line 915 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 4089 "bison_parser.cpp" +#line 4124 "bison_parser.cpp" break; - case 141: /* expr_list: expr_alias */ -#line 915 "bison_parser.y" + case 144: /* expr_list: expr_alias */ +#line 922 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4095 "bison_parser.cpp" +#line 4130 "bison_parser.cpp" break; - case 142: /* expr_list: expr_list ',' expr_alias */ -#line 916 "bison_parser.y" + case 145: /* expr_list: expr_list ',' expr_alias */ +#line 923 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4101 "bison_parser.cpp" +#line 4136 "bison_parser.cpp" break; - case 143: /* opt_literal_list: literal_list */ -#line 920 "bison_parser.y" + case 146: /* opt_literal_list: literal_list */ +#line 927 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[0].expr_vec); } -#line 4107 "bison_parser.cpp" +#line 4142 "bison_parser.cpp" break; - case 144: /* opt_literal_list: %empty */ -#line 921 "bison_parser.y" + case 147: /* opt_literal_list: %empty */ +#line 928 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 4113 "bison_parser.cpp" +#line 4148 "bison_parser.cpp" break; - case 145: /* literal_list: literal */ -#line 925 "bison_parser.y" + case 148: /* literal_list: literal */ +#line 932 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4119 "bison_parser.cpp" +#line 4154 "bison_parser.cpp" break; - case 146: /* literal_list: literal_list ',' literal */ -#line 926 "bison_parser.y" + case 149: /* literal_list: literal_list ',' literal */ +#line 933 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4125 "bison_parser.cpp" +#line 4160 "bison_parser.cpp" break; - case 147: /* expr_alias: expr opt_alias */ -#line 930 "bison_parser.y" + case 150: /* expr_alias: expr opt_alias */ +#line 937 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); if ((yyvsp[0].alias_t)) { @@ -4133,421 +4168,421 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].alias_t); } } -#line 4137 "bison_parser.cpp" +#line 4172 "bison_parser.cpp" break; - case 153: /* operand: '(' expr ')' */ -#line 948 "bison_parser.y" + case 156: /* operand: '(' expr ')' */ +#line 955 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); } -#line 4143 "bison_parser.cpp" +#line 4178 "bison_parser.cpp" break; - case 163: /* operand: '(' select_no_paren ')' */ -#line 958 "bison_parser.y" + case 166: /* operand: '(' select_no_paren ')' */ +#line 965 "bison_parser.y" { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 4149 "bison_parser.cpp" +#line 4184 "bison_parser.cpp" break; - case 166: /* unary_expr: '-' operand */ -#line 967 "bison_parser.y" + case 169: /* unary_expr: '-' operand */ +#line 974 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 4155 "bison_parser.cpp" +#line 4190 "bison_parser.cpp" break; - case 167: /* unary_expr: NOT operand */ -#line 968 "bison_parser.y" + case 170: /* unary_expr: NOT operand */ +#line 975 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 4161 "bison_parser.cpp" +#line 4196 "bison_parser.cpp" break; - case 168: /* unary_expr: operand ISNULL */ -#line 969 "bison_parser.y" + case 171: /* unary_expr: operand ISNULL */ +#line 976 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 4167 "bison_parser.cpp" +#line 4202 "bison_parser.cpp" break; - case 169: /* unary_expr: operand IS NULL */ -#line 970 "bison_parser.y" + case 172: /* unary_expr: operand IS NULL */ +#line 977 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 4173 "bison_parser.cpp" +#line 4208 "bison_parser.cpp" break; - case 170: /* unary_expr: operand IS NOT NULL */ -#line 971 "bison_parser.y" + case 173: /* unary_expr: operand IS NOT NULL */ +#line 978 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 4179 "bison_parser.cpp" +#line 4214 "bison_parser.cpp" break; - case 172: /* binary_expr: operand '-' operand */ -#line 976 "bison_parser.y" + case 175: /* binary_expr: operand '-' operand */ +#line 983 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 4185 "bison_parser.cpp" +#line 4220 "bison_parser.cpp" break; - case 173: /* binary_expr: operand '+' operand */ -#line 977 "bison_parser.y" + case 176: /* binary_expr: operand '+' operand */ +#line 984 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 4191 "bison_parser.cpp" +#line 4226 "bison_parser.cpp" break; - case 174: /* binary_expr: operand '/' operand */ -#line 978 "bison_parser.y" + case 177: /* binary_expr: operand '/' operand */ +#line 985 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 4197 "bison_parser.cpp" +#line 4232 "bison_parser.cpp" break; - case 175: /* binary_expr: operand '*' operand */ -#line 979 "bison_parser.y" + case 178: /* binary_expr: operand '*' operand */ +#line 986 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 4203 "bison_parser.cpp" +#line 4238 "bison_parser.cpp" break; - case 176: /* binary_expr: operand '%' operand */ -#line 980 "bison_parser.y" + case 179: /* binary_expr: operand '%' operand */ +#line 987 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 4209 "bison_parser.cpp" +#line 4244 "bison_parser.cpp" break; - case 177: /* binary_expr: operand '^' operand */ -#line 981 "bison_parser.y" + case 180: /* binary_expr: operand '^' operand */ +#line 988 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 4215 "bison_parser.cpp" +#line 4250 "bison_parser.cpp" break; - case 178: /* binary_expr: operand LIKE operand */ -#line 982 "bison_parser.y" + case 181: /* binary_expr: operand LIKE operand */ +#line 989 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 4221 "bison_parser.cpp" +#line 4256 "bison_parser.cpp" break; - case 179: /* binary_expr: operand NOT LIKE operand */ -#line 983 "bison_parser.y" + case 182: /* binary_expr: operand NOT LIKE operand */ +#line 990 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 4227 "bison_parser.cpp" +#line 4262 "bison_parser.cpp" break; - case 180: /* binary_expr: operand ILIKE operand */ -#line 984 "bison_parser.y" + case 183: /* binary_expr: operand ILIKE operand */ +#line 991 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 4233 "bison_parser.cpp" +#line 4268 "bison_parser.cpp" break; - case 181: /* binary_expr: operand CONCAT operand */ -#line 985 "bison_parser.y" + case 184: /* binary_expr: operand CONCAT operand */ +#line 992 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 4239 "bison_parser.cpp" +#line 4274 "bison_parser.cpp" break; - case 182: /* logic_expr: expr AND expr */ -#line 989 "bison_parser.y" + case 185: /* logic_expr: expr AND expr */ +#line 996 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 4245 "bison_parser.cpp" +#line 4280 "bison_parser.cpp" break; - case 183: /* logic_expr: expr OR expr */ -#line 990 "bison_parser.y" + case 186: /* logic_expr: expr OR expr */ +#line 997 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 4251 "bison_parser.cpp" +#line 4286 "bison_parser.cpp" break; - case 184: /* in_expr: operand IN '(' expr_list ')' */ -#line 994 "bison_parser.y" + case 187: /* in_expr: operand IN '(' expr_list ')' */ +#line 1001 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 4257 "bison_parser.cpp" +#line 4292 "bison_parser.cpp" break; - case 185: /* in_expr: operand NOT IN '(' expr_list ')' */ -#line 995 "bison_parser.y" + case 188: /* in_expr: operand NOT IN '(' expr_list ')' */ +#line 1002 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 4263 "bison_parser.cpp" +#line 4298 "bison_parser.cpp" break; - case 186: /* in_expr: operand IN '(' select_no_paren ')' */ -#line 996 "bison_parser.y" + case 189: /* in_expr: operand IN '(' select_no_paren ')' */ +#line 1003 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 4269 "bison_parser.cpp" +#line 4304 "bison_parser.cpp" break; - case 187: /* in_expr: operand NOT IN '(' select_no_paren ')' */ -#line 997 "bison_parser.y" + case 190: /* in_expr: operand NOT IN '(' select_no_paren ')' */ +#line 1004 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 4275 "bison_parser.cpp" +#line 4310 "bison_parser.cpp" break; - case 188: /* case_expr: CASE expr case_list END */ -#line 1003 "bison_parser.y" + case 191: /* case_expr: CASE expr case_list END */ +#line 1010 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } -#line 4281 "bison_parser.cpp" +#line 4316 "bison_parser.cpp" break; - case 189: /* case_expr: CASE expr case_list ELSE expr END */ -#line 1004 "bison_parser.y" + case 192: /* case_expr: CASE expr case_list ELSE expr END */ +#line 1011 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4287 "bison_parser.cpp" +#line 4322 "bison_parser.cpp" break; - case 190: /* case_expr: CASE case_list END */ -#line 1005 "bison_parser.y" + case 193: /* case_expr: CASE case_list END */ +#line 1012 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } -#line 4293 "bison_parser.cpp" +#line 4328 "bison_parser.cpp" break; - case 191: /* case_expr: CASE case_list ELSE expr END */ -#line 1006 "bison_parser.y" + case 194: /* case_expr: CASE case_list ELSE expr END */ +#line 1013 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4299 "bison_parser.cpp" +#line 4334 "bison_parser.cpp" break; - case 192: /* case_list: WHEN expr THEN expr */ -#line 1010 "bison_parser.y" + case 195: /* case_list: WHEN expr THEN expr */ +#line 1017 "bison_parser.y" { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4305 "bison_parser.cpp" +#line 4340 "bison_parser.cpp" break; - case 193: /* case_list: case_list WHEN expr THEN expr */ -#line 1011 "bison_parser.y" + case 196: /* case_list: case_list WHEN expr THEN expr */ +#line 1018 "bison_parser.y" { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4311 "bison_parser.cpp" +#line 4346 "bison_parser.cpp" break; - case 194: /* exists_expr: EXISTS '(' select_no_paren ')' */ -#line 1015 "bison_parser.y" + case 197: /* exists_expr: EXISTS '(' select_no_paren ')' */ +#line 1022 "bison_parser.y" { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 4317 "bison_parser.cpp" +#line 4352 "bison_parser.cpp" break; - case 195: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ -#line 1016 "bison_parser.y" + case 198: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ +#line 1023 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 4323 "bison_parser.cpp" +#line 4358 "bison_parser.cpp" break; - case 196: /* comp_expr: operand '=' operand */ -#line 1020 "bison_parser.y" + case 199: /* comp_expr: operand '=' operand */ +#line 1027 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4329 "bison_parser.cpp" +#line 4364 "bison_parser.cpp" break; - case 197: /* comp_expr: operand EQUALS operand */ -#line 1021 "bison_parser.y" + case 200: /* comp_expr: operand EQUALS operand */ +#line 1028 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4335 "bison_parser.cpp" +#line 4370 "bison_parser.cpp" break; - case 198: /* comp_expr: operand NOTEQUALS operand */ -#line 1022 "bison_parser.y" + case 201: /* comp_expr: operand NOTEQUALS operand */ +#line 1029 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 4341 "bison_parser.cpp" +#line 4376 "bison_parser.cpp" break; - case 199: /* comp_expr: operand '<' operand */ -#line 1023 "bison_parser.y" + case 202: /* comp_expr: operand '<' operand */ +#line 1030 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 4347 "bison_parser.cpp" +#line 4382 "bison_parser.cpp" break; - case 200: /* comp_expr: operand '>' operand */ -#line 1024 "bison_parser.y" + case 203: /* comp_expr: operand '>' operand */ +#line 1031 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 4353 "bison_parser.cpp" +#line 4388 "bison_parser.cpp" break; - case 201: /* comp_expr: operand LESSEQ operand */ -#line 1025 "bison_parser.y" + case 204: /* comp_expr: operand LESSEQ operand */ +#line 1032 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 4359 "bison_parser.cpp" +#line 4394 "bison_parser.cpp" break; - case 202: /* comp_expr: operand GREATEREQ operand */ -#line 1026 "bison_parser.y" + case 205: /* comp_expr: operand GREATEREQ operand */ +#line 1033 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 4365 "bison_parser.cpp" +#line 4400 "bison_parser.cpp" break; - case 203: /* function_expr: IDENTIFIER '(' ')' */ -#line 1030 "bison_parser.y" + case 206: /* function_expr: IDENTIFIER '(' ')' */ +#line 1037 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 4371 "bison_parser.cpp" +#line 4406 "bison_parser.cpp" break; - case 204: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ -#line 1031 "bison_parser.y" + case 207: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ +#line 1038 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 4377 "bison_parser.cpp" +#line 4412 "bison_parser.cpp" break; - case 205: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ -#line 1035 "bison_parser.y" + case 208: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ +#line 1042 "bison_parser.y" { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } -#line 4383 "bison_parser.cpp" +#line 4418 "bison_parser.cpp" break; - case 206: /* cast_expr: CAST '(' expr AS column_type ')' */ -#line 1039 "bison_parser.y" + case 209: /* cast_expr: CAST '(' expr AS column_type ')' */ +#line 1046 "bison_parser.y" { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } -#line 4389 "bison_parser.cpp" +#line 4424 "bison_parser.cpp" break; - case 207: /* datetime_field: SECOND */ -#line 1043 "bison_parser.y" + case 210: /* datetime_field: SECOND */ +#line 1050 "bison_parser.y" { (yyval.datetime_field) = kDatetimeSecond; } -#line 4395 "bison_parser.cpp" +#line 4430 "bison_parser.cpp" break; - case 208: /* datetime_field: MINUTE */ -#line 1044 "bison_parser.y" + case 211: /* datetime_field: MINUTE */ +#line 1051 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMinute; } -#line 4401 "bison_parser.cpp" +#line 4436 "bison_parser.cpp" break; - case 209: /* datetime_field: HOUR */ -#line 1045 "bison_parser.y" + case 212: /* datetime_field: HOUR */ +#line 1052 "bison_parser.y" { (yyval.datetime_field) = kDatetimeHour; } -#line 4407 "bison_parser.cpp" +#line 4442 "bison_parser.cpp" break; - case 210: /* datetime_field: DAY */ -#line 1046 "bison_parser.y" + case 213: /* datetime_field: DAY */ +#line 1053 "bison_parser.y" { (yyval.datetime_field) = kDatetimeDay; } -#line 4413 "bison_parser.cpp" +#line 4448 "bison_parser.cpp" break; - case 211: /* datetime_field: MONTH */ -#line 1047 "bison_parser.y" + case 214: /* datetime_field: MONTH */ +#line 1054 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMonth; } -#line 4419 "bison_parser.cpp" +#line 4454 "bison_parser.cpp" break; - case 212: /* datetime_field: YEAR */ -#line 1048 "bison_parser.y" + case 215: /* datetime_field: YEAR */ +#line 1055 "bison_parser.y" { (yyval.datetime_field) = kDatetimeYear; } -#line 4425 "bison_parser.cpp" +#line 4460 "bison_parser.cpp" break; - case 213: /* array_expr: ARRAY '[' expr_list ']' */ -#line 1052 "bison_parser.y" + case 216: /* array_expr: ARRAY '[' expr_list ']' */ +#line 1059 "bison_parser.y" { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 4431 "bison_parser.cpp" +#line 4466 "bison_parser.cpp" break; - case 214: /* array_index: operand '[' int_literal ']' */ -#line 1056 "bison_parser.y" + case 217: /* array_index: operand '[' int_literal ']' */ +#line 1063 "bison_parser.y" { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 4437 "bison_parser.cpp" +#line 4472 "bison_parser.cpp" break; - case 215: /* between_expr: operand BETWEEN operand AND operand */ -#line 1060 "bison_parser.y" + case 218: /* between_expr: operand BETWEEN operand AND operand */ +#line 1067 "bison_parser.y" { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4443 "bison_parser.cpp" +#line 4478 "bison_parser.cpp" break; - case 216: /* column_name: IDENTIFIER */ -#line 1064 "bison_parser.y" + case 219: /* column_name: IDENTIFIER */ +#line 1071 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 4449 "bison_parser.cpp" +#line 4484 "bison_parser.cpp" break; - case 217: /* column_name: IDENTIFIER '.' IDENTIFIER */ -#line 1065 "bison_parser.y" + case 220: /* column_name: IDENTIFIER '.' IDENTIFIER */ +#line 1072 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 4455 "bison_parser.cpp" +#line 4490 "bison_parser.cpp" break; - case 218: /* column_name: '*' */ -#line 1066 "bison_parser.y" + case 221: /* column_name: '*' */ +#line 1073 "bison_parser.y" { (yyval.expr) = Expr::makeStar(); } -#line 4461 "bison_parser.cpp" +#line 4496 "bison_parser.cpp" break; - case 219: /* column_name: IDENTIFIER '.' '*' */ -#line 1067 "bison_parser.y" + case 222: /* column_name: IDENTIFIER '.' '*' */ +#line 1074 "bison_parser.y" { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 4467 "bison_parser.cpp" +#line 4502 "bison_parser.cpp" break; - case 225: /* string_literal: STRING */ -#line 1079 "bison_parser.y" + case 228: /* string_literal: STRING */ +#line 1086 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 4473 "bison_parser.cpp" +#line 4508 "bison_parser.cpp" break; - case 226: /* bool_literal: TRUE */ -#line 1083 "bison_parser.y" + case 229: /* bool_literal: TRUE */ +#line 1090 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(true); } -#line 4479 "bison_parser.cpp" +#line 4514 "bison_parser.cpp" break; - case 227: /* bool_literal: FALSE */ -#line 1084 "bison_parser.y" + case 230: /* bool_literal: FALSE */ +#line 1091 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(false); } -#line 4485 "bison_parser.cpp" +#line 4520 "bison_parser.cpp" break; - case 228: /* num_literal: FLOATVAL */ -#line 1088 "bison_parser.y" + case 231: /* num_literal: FLOATVAL */ +#line 1095 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 4491 "bison_parser.cpp" +#line 4526 "bison_parser.cpp" break; - case 230: /* int_literal: INTVAL */ -#line 1093 "bison_parser.y" + case 233: /* int_literal: INTVAL */ +#line 1100 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 4497 "bison_parser.cpp" +#line 4532 "bison_parser.cpp" break; - case 231: /* null_literal: NULL */ -#line 1097 "bison_parser.y" + case 234: /* null_literal: NULL */ +#line 1104 "bison_parser.y" { (yyval.expr) = Expr::makeNullLiteral(); } -#line 4503 "bison_parser.cpp" +#line 4538 "bison_parser.cpp" break; - case 232: /* param_expr: '?' */ -#line 1101 "bison_parser.y" + case 235: /* param_expr: '?' */ +#line 1108 "bison_parser.y" { (yyval.expr) = Expr::makeParameter(yylloc.total_column); (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 4513 "bison_parser.cpp" +#line 4548 "bison_parser.cpp" break; - case 234: /* table_ref: table_ref_commalist ',' table_ref_atomic */ -#line 1114 "bison_parser.y" + case 237: /* table_ref: table_ref_commalist ',' table_ref_atomic */ +#line 1121 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); auto tbl = new TableRef(kTableCrossProduct); tbl->list = (yyvsp[-2].table_vec); (yyval.table) = tbl; } -#line 4524 "bison_parser.cpp" +#line 4559 "bison_parser.cpp" break; - case 238: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ -#line 1130 "bison_parser.y" + case 241: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ +#line 1137 "bison_parser.y" { auto tbl = new TableRef(kTableSelect); tbl->select = (yyvsp[-2].select_stmt); tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4535 "bison_parser.cpp" +#line 4570 "bison_parser.cpp" break; - case 239: /* table_ref_commalist: table_ref_atomic */ -#line 1139 "bison_parser.y" + case 242: /* table_ref_commalist: table_ref_atomic */ +#line 1146 "bison_parser.y" { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 4541 "bison_parser.cpp" +#line 4576 "bison_parser.cpp" break; - case 240: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ -#line 1140 "bison_parser.y" + case 243: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ +#line 1147 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 4547 "bison_parser.cpp" +#line 4582 "bison_parser.cpp" break; - case 241: /* table_ref_name: table_name opt_table_alias */ -#line 1145 "bison_parser.y" + case 244: /* table_ref_name: table_name opt_table_alias */ +#line 1152 "bison_parser.y" { auto tbl = new TableRef(kTableName); tbl->schema = (yyvsp[-1].table_name).schema; @@ -4555,121 +4590,121 @@ YYLTYPE yylloc = yyloc_default; tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4559 "bison_parser.cpp" +#line 4594 "bison_parser.cpp" break; - case 242: /* table_ref_name_no_alias: table_name */ -#line 1156 "bison_parser.y" + case 245: /* table_ref_name_no_alias: table_name */ +#line 1163 "bison_parser.y" { (yyval.table) = new TableRef(kTableName); (yyval.table)->schema = (yyvsp[0].table_name).schema; (yyval.table)->name = (yyvsp[0].table_name).name; } -#line 4569 "bison_parser.cpp" +#line 4604 "bison_parser.cpp" break; - case 243: /* table_name: IDENTIFIER */ -#line 1165 "bison_parser.y" + case 246: /* table_name: IDENTIFIER */ +#line 1172 "bison_parser.y" { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} -#line 4575 "bison_parser.cpp" +#line 4610 "bison_parser.cpp" break; - case 244: /* table_name: IDENTIFIER '.' IDENTIFIER */ -#line 1166 "bison_parser.y" + case 247: /* table_name: IDENTIFIER '.' IDENTIFIER */ +#line 1173 "bison_parser.y" { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } -#line 4581 "bison_parser.cpp" +#line 4616 "bison_parser.cpp" break; - case 245: /* opt_index_name: IDENTIFIER */ -#line 1170 "bison_parser.y" + case 248: /* opt_index_name: IDENTIFIER */ +#line 1177 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4587 "bison_parser.cpp" +#line 4622 "bison_parser.cpp" break; - case 246: /* opt_index_name: %empty */ -#line 1171 "bison_parser.y" + case 249: /* opt_index_name: %empty */ +#line 1178 "bison_parser.y" { (yyval.sval) = nullptr;} -#line 4593 "bison_parser.cpp" +#line 4628 "bison_parser.cpp" break; - case 247: /* index_name: IDENTIFIER */ -#line 1175 "bison_parser.y" + case 250: /* index_name: IDENTIFIER */ +#line 1182 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4599 "bison_parser.cpp" +#line 4634 "bison_parser.cpp" break; - case 249: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ -#line 1181 "bison_parser.y" + case 252: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ +#line 1188 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } -#line 4605 "bison_parser.cpp" +#line 4640 "bison_parser.cpp" break; - case 251: /* opt_table_alias: %empty */ -#line 1187 "bison_parser.y" + case 254: /* opt_table_alias: %empty */ +#line 1194 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4611 "bison_parser.cpp" +#line 4646 "bison_parser.cpp" break; - case 252: /* alias: AS IDENTIFIER */ -#line 1192 "bison_parser.y" + case 255: /* alias: AS IDENTIFIER */ +#line 1199 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4617 "bison_parser.cpp" +#line 4652 "bison_parser.cpp" break; - case 253: /* alias: IDENTIFIER */ -#line 1193 "bison_parser.y" + case 256: /* alias: IDENTIFIER */ +#line 1200 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4623 "bison_parser.cpp" +#line 4658 "bison_parser.cpp" break; - case 255: /* opt_alias: %empty */ -#line 1199 "bison_parser.y" + case 258: /* opt_alias: %empty */ +#line 1206 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4629 "bison_parser.cpp" +#line 4664 "bison_parser.cpp" break; - case 257: /* opt_with_clause: %empty */ -#line 1209 "bison_parser.y" + case 260: /* opt_with_clause: %empty */ +#line 1216 "bison_parser.y" { (yyval.with_description_vec) = nullptr; } -#line 4635 "bison_parser.cpp" +#line 4670 "bison_parser.cpp" break; - case 258: /* with_clause: WITH with_description_list */ -#line 1213 "bison_parser.y" + case 261: /* with_clause: WITH with_description_list */ +#line 1220 "bison_parser.y" { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } -#line 4641 "bison_parser.cpp" +#line 4676 "bison_parser.cpp" break; - case 259: /* with_description_list: with_description */ -#line 1217 "bison_parser.y" + case 262: /* with_description_list: with_description */ +#line 1224 "bison_parser.y" { (yyval.with_description_vec) = new std::vector(); (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); } -#line 4650 "bison_parser.cpp" +#line 4685 "bison_parser.cpp" break; - case 260: /* with_description_list: with_description_list ',' with_description */ -#line 1221 "bison_parser.y" + case 263: /* with_description_list: with_description_list ',' with_description */ +#line 1228 "bison_parser.y" { (yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t)); (yyval.with_description_vec) = (yyvsp[-2].with_description_vec); } -#line 4659 "bison_parser.cpp" +#line 4694 "bison_parser.cpp" break; - case 261: /* with_description: IDENTIFIER AS select_with_paren */ -#line 1228 "bison_parser.y" + case 264: /* with_description: IDENTIFIER AS select_with_paren */ +#line 1235 "bison_parser.y" { (yyval.with_description_t) = new WithDescription(); (yyval.with_description_t)->alias = (yyvsp[-2].sval); (yyval.with_description_t)->select = (yyvsp[0].select_stmt); } -#line 4669 "bison_parser.cpp" +#line 4704 "bison_parser.cpp" break; - case 262: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ -#line 1242 "bison_parser.y" + case 265: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ +#line 1249 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4677,11 +4712,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 4681 "bison_parser.cpp" +#line 4716 "bison_parser.cpp" break; - case 263: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ -#line 1250 "bison_parser.y" + case 266: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ +#line 1257 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4690,11 +4725,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 4694 "bison_parser.cpp" +#line 4729 "bison_parser.cpp" break; - case 264: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ -#line 1260 "bison_parser.y" + case 267: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ +#line 1267 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4710,83 +4745,83 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } -#line 4714 "bison_parser.cpp" +#line 4749 "bison_parser.cpp" break; - case 265: /* opt_join_type: INNER */ -#line 1278 "bison_parser.y" + case 268: /* opt_join_type: INNER */ +#line 1285 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4720 "bison_parser.cpp" +#line 4755 "bison_parser.cpp" break; - case 266: /* opt_join_type: LEFT OUTER */ -#line 1279 "bison_parser.y" + case 269: /* opt_join_type: LEFT OUTER */ +#line 1286 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4726 "bison_parser.cpp" +#line 4761 "bison_parser.cpp" break; - case 267: /* opt_join_type: LEFT */ -#line 1280 "bison_parser.y" + case 270: /* opt_join_type: LEFT */ +#line 1287 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4732 "bison_parser.cpp" +#line 4767 "bison_parser.cpp" break; - case 268: /* opt_join_type: RIGHT OUTER */ -#line 1281 "bison_parser.y" + case 271: /* opt_join_type: RIGHT OUTER */ +#line 1288 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4738 "bison_parser.cpp" +#line 4773 "bison_parser.cpp" break; - case 269: /* opt_join_type: RIGHT */ -#line 1282 "bison_parser.y" + case 272: /* opt_join_type: RIGHT */ +#line 1289 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4744 "bison_parser.cpp" +#line 4779 "bison_parser.cpp" break; - case 270: /* opt_join_type: FULL OUTER */ -#line 1283 "bison_parser.y" + case 273: /* opt_join_type: FULL OUTER */ +#line 1290 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4750 "bison_parser.cpp" +#line 4785 "bison_parser.cpp" break; - case 271: /* opt_join_type: OUTER */ -#line 1284 "bison_parser.y" + case 274: /* opt_join_type: OUTER */ +#line 1291 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4756 "bison_parser.cpp" +#line 4791 "bison_parser.cpp" break; - case 272: /* opt_join_type: FULL */ -#line 1285 "bison_parser.y" + case 275: /* opt_join_type: FULL */ +#line 1292 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4762 "bison_parser.cpp" +#line 4797 "bison_parser.cpp" break; - case 273: /* opt_join_type: CROSS */ -#line 1286 "bison_parser.y" + case 276: /* opt_join_type: CROSS */ +#line 1293 "bison_parser.y" { (yyval.uval) = kJoinCross; } -#line 4768 "bison_parser.cpp" +#line 4803 "bison_parser.cpp" break; - case 274: /* opt_join_type: %empty */ -#line 1287 "bison_parser.y" + case 277: /* opt_join_type: %empty */ +#line 1294 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4774 "bison_parser.cpp" +#line 4809 "bison_parser.cpp" break; - case 278: /* ident_commalist: IDENTIFIER */ -#line 1307 "bison_parser.y" + case 281: /* ident_commalist: IDENTIFIER */ +#line 1314 "bison_parser.y" { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 4780 "bison_parser.cpp" +#line 4815 "bison_parser.cpp" break; - case 279: /* ident_commalist: ident_commalist ',' IDENTIFIER */ -#line 1308 "bison_parser.y" + case 282: /* ident_commalist: ident_commalist ',' IDENTIFIER */ +#line 1315 "bison_parser.y" { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 4786 "bison_parser.cpp" +#line 4821 "bison_parser.cpp" break; -#line 4790 "bison_parser.cpp" +#line 4825 "bison_parser.cpp" default: break; } @@ -5016,7 +5051,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 1311 "bison_parser.y" +#line 1318 "bison_parser.y" /********************************* ** Section 4: Additional C code diff --git a/src/parser/bison_parser.h b/src/parser/bison_parser.h index 8dc1b2b8..600ad9dc 100644 --- a/src/parser/bison_parser.h +++ b/src/parser/bison_parser.h @@ -288,6 +288,7 @@ union HSQL_STYPE hsql::UpdateClause* update_t; hsql::Alias* alias_t; hsql::SetOperation* set_operator_t; + hsql::DecimalSpecification decimal_specification_t; std::vector* stmt_vec; @@ -300,7 +301,7 @@ union HSQL_STYPE std::vector* with_description_vec; std::vector* table_key_constraint_vec; -#line 304 "bison_parser.h" +#line 305 "bison_parser.h" }; typedef union HSQL_STYPE HSQL_STYPE; diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 20b9ddfe..9f4f8a70 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -130,6 +130,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha hsql::UpdateClause* update_t; hsql::Alias* alias_t; hsql::SetOperation* set_operator_t; + hsql::DecimalSpecification decimal_specification_t; std::vector* stmt_vec; @@ -147,7 +148,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha /********************************* ** Destructor symbols *********************************/ -%destructor { } +%destructor { } %destructor { free( ($$.name) ); free( ($$.schema) ); } %destructor { free( ($$) ); } %destructor { @@ -209,6 +210,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha %type index_name %type file_path prepare_target_query %type opt_not_exists opt_exists opt_distinct opt_column_nullable opt_all +%type opt_decimal_specification %type opt_join_type %type opt_from_clause from_clause table_ref table_ref_atomic table_ref_name nonjoin_table_ref_atomic %type
join_clause table_ref_name_no_alias @@ -573,7 +575,7 @@ column_type: | INTEGER { $$ = ColumnType{DataType::INT}; } | LONG { $$ = ColumnType{DataType::LONG}; } | FLOAT { $$ = ColumnType{DataType::FLOAT}; } - | DECIMAL '(' INTVAL ',' INTVAL ')' { $$ = ColumnType{DataType::FLOAT}; } + | DECIMAL opt_decimal_specification { $$ = ColumnType{DataType::DECIMAL, 0, $2}; } | DOUBLE { $$ = ColumnType{DataType::DOUBLE}; } | REAL { $$ = ColumnType{DataType::FLOAT}; } | VARCHAR '(' INTVAL ')' { $$ = ColumnType{DataType::VARCHAR, $3}; } @@ -585,6 +587,11 @@ column_type: | DATE { $$ = ColumnType{DataType::DATE}; } ; +opt_decimal_specification: + '(' INTVAL ',' INTVAL ')' { $$ = DecimalSpecification{$2, $4}; } + | '(' INTVAL ')' { $$ = DecimalSpecification{$2, 0}; } + | /* empty */ { $$ = DecimalSpecification{0, 0}; } + opt_column_nullable: NULL { $$ = true; } | NOT NULL { $$ = false; } diff --git a/src/sql/ColumnType.h b/src/sql/ColumnType.h index 0d7e9b74..003dd0d3 100755 --- a/src/sql/ColumnType.h +++ b/src/sql/ColumnType.h @@ -21,12 +21,20 @@ namespace hsql { VARCHAR_VARYING, }; + struct DecimalSpecification { + DecimalSpecification() = default; + DecimalSpecification(int64_t precision, int64_t scale); + int64_t precision; + int64_t scale; +}; + // Represents the type of a column, e.g., FLOAT or VARCHAR(10) struct ColumnType { ColumnType() = default; - ColumnType(DataType data_type, int64_t length = 0); + ColumnType(DataType data_type, int64_t length = 0, DecimalSpecification decimal_specification = DecimalSpecification{}); DataType data_type; int64_t length; // Used for, e.g., VARCHAR(10) + DecimalSpecification decimal_specification; // used for, e.g., DECIMAL(6, 4) }; bool operator==(const ColumnType& lhs, const ColumnType& rhs); diff --git a/src/sql/statements.cpp b/src/sql/statements.cpp index 84e1c5fa..b8ceb826 100755 --- a/src/sql/statements.cpp +++ b/src/sql/statements.cpp @@ -24,9 +24,14 @@ namespace hsql { free(name); } - ColumnType::ColumnType(DataType data_type, int64_t length) : + ColumnType::ColumnType(DataType data_type, int64_t length, DecimalSpecification decimal_specification) : data_type(data_type), - length(length) {}; + length(length), + decimal_specification(decimal_specification) {}; + + DecimalSpecification::DecimalSpecification(int64_t precision, int64_t scale) : + precision(precision), + scale(scale) {}; bool operator==(const ColumnType& lhs, const ColumnType& rhs) { if (lhs.data_type != rhs.data_type) return false; From dd8211a98a482ea17ab0f8426b89deb8232bc8c2 Mon Sep 17 00:00:00 2001 From: Moritz Spranger Date: Tue, 20 Jul 2021 21:15:39 +0200 Subject: [PATCH 30/73] Fix failing tests --- src/parser/bison_parser.cpp | 2846 ++++++++++++++++++----------------- src/parser/bison_parser.h | 6 +- src/sql/ColumnType.h | 3 - src/sql/statements.cpp | 9 - 4 files changed, 1494 insertions(+), 1370 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 3d70bd19..7f0102f1 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -328,91 +328,95 @@ enum yysymbol_kind_t YYSYMBOL_column_def_commalist = 194, /* column_def_commalist */ YYSYMBOL_column_def = 195, /* column_def */ YYSYMBOL_column_type = 196, /* column_type */ - YYSYMBOL_opt_column_nullable = 197, /* opt_column_nullable */ - YYSYMBOL_drop_statement = 198, /* drop_statement */ - YYSYMBOL_opt_exists = 199, /* opt_exists */ - YYSYMBOL_alter_statement = 200, /* alter_statement */ - YYSYMBOL_delete_statement = 201, /* delete_statement */ - YYSYMBOL_truncate_statement = 202, /* truncate_statement */ - YYSYMBOL_insert_statement = 203, /* insert_statement */ - YYSYMBOL_opt_column_list = 204, /* opt_column_list */ - YYSYMBOL_update_statement = 205, /* update_statement */ - YYSYMBOL_update_clause_commalist = 206, /* update_clause_commalist */ - YYSYMBOL_update_clause = 207, /* update_clause */ - YYSYMBOL_select_statement = 208, /* select_statement */ - YYSYMBOL_select_within_set_operation = 209, /* select_within_set_operation */ - YYSYMBOL_select_within_set_operation_no_parentheses = 210, /* select_within_set_operation_no_parentheses */ - YYSYMBOL_select_with_paren = 211, /* select_with_paren */ - YYSYMBOL_select_no_paren = 212, /* select_no_paren */ - YYSYMBOL_set_operator = 213, /* set_operator */ - YYSYMBOL_set_type = 214, /* set_type */ - YYSYMBOL_opt_all = 215, /* opt_all */ - YYSYMBOL_select_clause = 216, /* select_clause */ - YYSYMBOL_opt_distinct = 217, /* opt_distinct */ - YYSYMBOL_select_list = 218, /* select_list */ - YYSYMBOL_opt_from_clause = 219, /* opt_from_clause */ - YYSYMBOL_from_clause = 220, /* from_clause */ - YYSYMBOL_opt_where = 221, /* opt_where */ - YYSYMBOL_opt_group = 222, /* opt_group */ - YYSYMBOL_opt_having = 223, /* opt_having */ - YYSYMBOL_opt_order = 224, /* opt_order */ - YYSYMBOL_order_list = 225, /* order_list */ - YYSYMBOL_order_desc = 226, /* order_desc */ - YYSYMBOL_opt_order_type = 227, /* opt_order_type */ - YYSYMBOL_opt_top = 228, /* opt_top */ - YYSYMBOL_opt_limit = 229, /* opt_limit */ - YYSYMBOL_expr_list = 230, /* expr_list */ - YYSYMBOL_opt_literal_list = 231, /* opt_literal_list */ - YYSYMBOL_literal_list = 232, /* literal_list */ - YYSYMBOL_expr_alias = 233, /* expr_alias */ - YYSYMBOL_expr = 234, /* expr */ - YYSYMBOL_operand = 235, /* operand */ - YYSYMBOL_scalar_expr = 236, /* scalar_expr */ - YYSYMBOL_unary_expr = 237, /* unary_expr */ - YYSYMBOL_binary_expr = 238, /* binary_expr */ - YYSYMBOL_logic_expr = 239, /* logic_expr */ - YYSYMBOL_in_expr = 240, /* in_expr */ - YYSYMBOL_case_expr = 241, /* case_expr */ - YYSYMBOL_case_list = 242, /* case_list */ - YYSYMBOL_exists_expr = 243, /* exists_expr */ - YYSYMBOL_comp_expr = 244, /* comp_expr */ - YYSYMBOL_function_expr = 245, /* function_expr */ - YYSYMBOL_extract_expr = 246, /* extract_expr */ - YYSYMBOL_cast_expr = 247, /* cast_expr */ - YYSYMBOL_datetime_field = 248, /* datetime_field */ - YYSYMBOL_array_expr = 249, /* array_expr */ - YYSYMBOL_array_index = 250, /* array_index */ - YYSYMBOL_between_expr = 251, /* between_expr */ - YYSYMBOL_column_name = 252, /* column_name */ - YYSYMBOL_literal = 253, /* literal */ - YYSYMBOL_string_literal = 254, /* string_literal */ - YYSYMBOL_bool_literal = 255, /* bool_literal */ - YYSYMBOL_num_literal = 256, /* num_literal */ - YYSYMBOL_int_literal = 257, /* int_literal */ - YYSYMBOL_null_literal = 258, /* null_literal */ - YYSYMBOL_param_expr = 259, /* param_expr */ - YYSYMBOL_table_ref = 260, /* table_ref */ - YYSYMBOL_table_ref_atomic = 261, /* table_ref_atomic */ - YYSYMBOL_nonjoin_table_ref_atomic = 262, /* nonjoin_table_ref_atomic */ - YYSYMBOL_table_ref_commalist = 263, /* table_ref_commalist */ - YYSYMBOL_table_ref_name = 264, /* table_ref_name */ - YYSYMBOL_table_ref_name_no_alias = 265, /* table_ref_name_no_alias */ - YYSYMBOL_table_name = 266, /* table_name */ - YYSYMBOL_opt_index_name = 267, /* opt_index_name */ - YYSYMBOL_index_name = 268, /* index_name */ - YYSYMBOL_table_alias = 269, /* table_alias */ - YYSYMBOL_opt_table_alias = 270, /* opt_table_alias */ - YYSYMBOL_alias = 271, /* alias */ - YYSYMBOL_opt_alias = 272, /* opt_alias */ - YYSYMBOL_opt_with_clause = 273, /* opt_with_clause */ - YYSYMBOL_with_clause = 274, /* with_clause */ - YYSYMBOL_with_description_list = 275, /* with_description_list */ - YYSYMBOL_with_description = 276, /* with_description */ - YYSYMBOL_join_clause = 277, /* join_clause */ - YYSYMBOL_opt_join_type = 278, /* opt_join_type */ - YYSYMBOL_join_condition = 279, /* join_condition */ - YYSYMBOL_opt_semicolon = 280, /* opt_semicolon */ - YYSYMBOL_ident_commalist = 281 /* ident_commalist */ + YYSYMBOL_opt_decimal_specification = 197, /* opt_decimal_specification */ + YYSYMBOL_opt_column_nullable = 198, /* opt_column_nullable */ + YYSYMBOL_opt_column_constraint = 199, /* opt_column_constraint */ + YYSYMBOL_opt_table_key_constraints = 200, /* opt_table_key_constraints */ + YYSYMBOL_table_key_constraint = 201, /* table_key_constraint */ + YYSYMBOL_drop_statement = 202, /* drop_statement */ + YYSYMBOL_opt_exists = 203, /* opt_exists */ + YYSYMBOL_alter_statement = 204, /* alter_statement */ + YYSYMBOL_delete_statement = 205, /* delete_statement */ + YYSYMBOL_truncate_statement = 206, /* truncate_statement */ + YYSYMBOL_insert_statement = 207, /* insert_statement */ + YYSYMBOL_opt_column_list = 208, /* opt_column_list */ + YYSYMBOL_update_statement = 209, /* update_statement */ + YYSYMBOL_update_clause_commalist = 210, /* update_clause_commalist */ + YYSYMBOL_update_clause = 211, /* update_clause */ + YYSYMBOL_select_statement = 212, /* select_statement */ + YYSYMBOL_select_within_set_operation = 213, /* select_within_set_operation */ + YYSYMBOL_select_within_set_operation_no_parentheses = 214, /* select_within_set_operation_no_parentheses */ + YYSYMBOL_select_with_paren = 215, /* select_with_paren */ + YYSYMBOL_select_no_paren = 216, /* select_no_paren */ + YYSYMBOL_set_operator = 217, /* set_operator */ + YYSYMBOL_set_type = 218, /* set_type */ + YYSYMBOL_opt_all = 219, /* opt_all */ + YYSYMBOL_select_clause = 220, /* select_clause */ + YYSYMBOL_opt_distinct = 221, /* opt_distinct */ + YYSYMBOL_select_list = 222, /* select_list */ + YYSYMBOL_opt_from_clause = 223, /* opt_from_clause */ + YYSYMBOL_from_clause = 224, /* from_clause */ + YYSYMBOL_opt_where = 225, /* opt_where */ + YYSYMBOL_opt_group = 226, /* opt_group */ + YYSYMBOL_opt_having = 227, /* opt_having */ + YYSYMBOL_opt_order = 228, /* opt_order */ + YYSYMBOL_order_list = 229, /* order_list */ + YYSYMBOL_order_desc = 230, /* order_desc */ + YYSYMBOL_opt_order_type = 231, /* opt_order_type */ + YYSYMBOL_opt_top = 232, /* opt_top */ + YYSYMBOL_opt_limit = 233, /* opt_limit */ + YYSYMBOL_expr_list = 234, /* expr_list */ + YYSYMBOL_opt_literal_list = 235, /* opt_literal_list */ + YYSYMBOL_literal_list = 236, /* literal_list */ + YYSYMBOL_expr_alias = 237, /* expr_alias */ + YYSYMBOL_expr = 238, /* expr */ + YYSYMBOL_operand = 239, /* operand */ + YYSYMBOL_scalar_expr = 240, /* scalar_expr */ + YYSYMBOL_unary_expr = 241, /* unary_expr */ + YYSYMBOL_binary_expr = 242, /* binary_expr */ + YYSYMBOL_logic_expr = 243, /* logic_expr */ + YYSYMBOL_in_expr = 244, /* in_expr */ + YYSYMBOL_case_expr = 245, /* case_expr */ + YYSYMBOL_case_list = 246, /* case_list */ + YYSYMBOL_exists_expr = 247, /* exists_expr */ + YYSYMBOL_comp_expr = 248, /* comp_expr */ + YYSYMBOL_function_expr = 249, /* function_expr */ + YYSYMBOL_extract_expr = 250, /* extract_expr */ + YYSYMBOL_cast_expr = 251, /* cast_expr */ + YYSYMBOL_datetime_field = 252, /* datetime_field */ + YYSYMBOL_array_expr = 253, /* array_expr */ + YYSYMBOL_array_index = 254, /* array_index */ + YYSYMBOL_between_expr = 255, /* between_expr */ + YYSYMBOL_column_name = 256, /* column_name */ + YYSYMBOL_literal = 257, /* literal */ + YYSYMBOL_string_literal = 258, /* string_literal */ + YYSYMBOL_bool_literal = 259, /* bool_literal */ + YYSYMBOL_num_literal = 260, /* num_literal */ + YYSYMBOL_int_literal = 261, /* int_literal */ + YYSYMBOL_null_literal = 262, /* null_literal */ + YYSYMBOL_param_expr = 263, /* param_expr */ + YYSYMBOL_table_ref = 264, /* table_ref */ + YYSYMBOL_table_ref_atomic = 265, /* table_ref_atomic */ + YYSYMBOL_nonjoin_table_ref_atomic = 266, /* nonjoin_table_ref_atomic */ + YYSYMBOL_table_ref_commalist = 267, /* table_ref_commalist */ + YYSYMBOL_table_ref_name = 268, /* table_ref_name */ + YYSYMBOL_table_ref_name_no_alias = 269, /* table_ref_name_no_alias */ + YYSYMBOL_table_name = 270, /* table_name */ + YYSYMBOL_opt_index_name = 271, /* opt_index_name */ + YYSYMBOL_index_name = 272, /* index_name */ + YYSYMBOL_table_alias = 273, /* table_alias */ + YYSYMBOL_opt_table_alias = 274, /* opt_table_alias */ + YYSYMBOL_alias = 275, /* alias */ + YYSYMBOL_opt_alias = 276, /* opt_alias */ + YYSYMBOL_opt_with_clause = 277, /* opt_with_clause */ + YYSYMBOL_with_clause = 278, /* with_clause */ + YYSYMBOL_with_description_list = 279, /* with_description_list */ + YYSYMBOL_with_description = 280, /* with_description */ + YYSYMBOL_join_clause = 281, /* join_clause */ + YYSYMBOL_opt_join_type = 282, /* opt_join_type */ + YYSYMBOL_join_condition = 283, /* join_condition */ + YYSYMBOL_opt_semicolon = 284, /* opt_semicolon */ + YYSYMBOL_ident_commalist = 285 /* ident_commalist */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -737,16 +741,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 67 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 785 +#define YYLAST 890 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 173 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 109 +#define YYNNTS 113 /* YYNRULES -- Number of rules. */ -#define YYNRULES 273 +#define YYNRULES 284 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 509 +#define YYNSTATES 529 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 410 @@ -811,34 +815,35 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 273, 273, 294, 300, 309, 313, 317, 320, 323, - 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, - 348, 349, 354, 355, 359, 363, 375, 378, 381, 387, - 388, 395, 402, 405, 409, 423, 429, 438, 455, 459, - 462, 471, 485, 488, 493, 507, 520, 527, 534, 541, - 552, 553, 557, 558, 562, 568, 569, 570, 571, 572, - 573, 574, 575, 576, 577, 578, 579, 580, 581, 585, - 586, 587, 597, 603, 609, 614, 622, 623, 632, 647, - 656, 669, 676, 687, 688, 698, 707, 708, 712, 724, - 728, 732, 746, 747, 750, 751, 762, 763, 767, 777, - 790, 797, 801, 805, 812, 815, 821, 833, 834, 838, - 842, 843, 847, 852, 853, 857, 862, 866, 867, 871, - 872, 876, 877, 881, 885, 886, 887, 893, 894, 898, - 899, 900, 901, 902, 903, 910, 911, 915, 916, 920, - 921, 925, 935, 936, 937, 938, 939, 943, 944, 945, - 946, 947, 948, 949, 950, 951, 952, 953, 957, 958, - 962, 963, 964, 965, 966, 970, 971, 972, 973, 974, - 975, 976, 977, 978, 979, 980, 984, 985, 989, 990, - 991, 992, 998, 999, 1000, 1001, 1005, 1006, 1010, 1011, - 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1025, 1026, 1030, - 1034, 1038, 1039, 1040, 1041, 1042, 1043, 1047, 1051, 1055, - 1059, 1060, 1061, 1062, 1066, 1067, 1068, 1069, 1070, 1074, - 1078, 1079, 1083, 1084, 1088, 1092, 1096, 1108, 1109, 1119, - 1120, 1124, 1125, 1134, 1135, 1140, 1151, 1160, 1161, 1165, - 1166, 1170, 1175, 1176, 1181, 1182, 1187, 1188, 1193, 1194, - 1203, 1204, 1208, 1212, 1216, 1223, 1236, 1244, 1254, 1273, - 1274, 1275, 1276, 1277, 1278, 1279, 1280, 1281, 1282, 1287, - 1296, 1297, 1302, 1303 + 0, 281, 281, 302, 308, 317, 321, 325, 328, 331, + 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, + 356, 357, 362, 363, 367, 371, 383, 386, 389, 395, + 396, 403, 410, 413, 417, 431, 437, 446, 463, 467, + 470, 479, 493, 496, 501, 515, 528, 536, 543, 550, + 561, 562, 566, 567, 571, 577, 578, 579, 580, 581, + 582, 583, 584, 585, 586, 587, 588, 589, 590, 594, + 595, 596, 599, 600, 601, 605, 606, 607, 611, 612, + 613, 617, 618, 626, 632, 638, 643, 652, 653, 662, + 677, 686, 699, 706, 717, 718, 728, 737, 738, 742, + 754, 758, 762, 776, 777, 780, 781, 792, 793, 797, + 807, 820, 827, 831, 835, 842, 845, 851, 863, 864, + 868, 872, 873, 877, 882, 883, 887, 892, 896, 897, + 901, 902, 906, 907, 911, 915, 916, 917, 923, 924, + 928, 929, 930, 931, 932, 933, 940, 941, 945, 946, + 950, 951, 955, 965, 966, 967, 968, 969, 973, 974, + 975, 976, 977, 978, 979, 980, 981, 982, 983, 987, + 988, 992, 993, 994, 995, 996, 1000, 1001, 1002, 1003, + 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1014, 1015, 1019, + 1020, 1021, 1022, 1028, 1029, 1030, 1031, 1035, 1036, 1040, + 1041, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1055, 1056, + 1060, 1064, 1068, 1069, 1070, 1071, 1072, 1073, 1077, 1081, + 1085, 1089, 1090, 1091, 1092, 1096, 1097, 1098, 1099, 1100, + 1104, 1108, 1109, 1113, 1114, 1118, 1122, 1126, 1138, 1139, + 1149, 1150, 1154, 1155, 1164, 1165, 1170, 1181, 1190, 1191, + 1195, 1196, 1200, 1205, 1206, 1211, 1212, 1217, 1218, 1223, + 1224, 1233, 1234, 1238, 1242, 1246, 1253, 1266, 1274, 1284, + 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1310, 1311, 1312, + 1317, 1326, 1327, 1332, 1333 }; #endif @@ -884,10 +889,13 @@ static const char *const yytname[] = "file_type", "file_path", "opt_file_type", "export_statement", "show_statement", "create_statement", "opt_not_exists", "column_def_commalist", "column_def", "column_type", - "opt_column_nullable", "drop_statement", "opt_exists", "alter_statement", - "delete_statement", "truncate_statement", "insert_statement", - "opt_column_list", "update_statement", "update_clause_commalist", - "update_clause", "select_statement", "select_within_set_operation", + "opt_decimal_specification", "opt_column_nullable", + "opt_column_constraint", "opt_table_key_constraints", + "table_key_constraint", "drop_statement", "opt_exists", + "alter_statement", "delete_statement", "truncate_statement", + "insert_statement", "opt_column_list", "update_statement", + "update_clause_commalist", "update_clause", "select_statement", + "select_within_set_operation", "select_within_set_operation_no_parentheses", "select_with_paren", "select_no_paren", "set_operator", "set_type", "opt_all", "select_clause", "opt_distinct", "select_list", "opt_from_clause", @@ -941,12 +949,12 @@ static const yytype_int16 yytoknum[] = }; #endif -#define YYPACT_NINF (-310) +#define YYPACT_NINF (-410) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF (-271) +#define YYTABLE_NINF (-282) #define yytable_value_is_error(Yyn) \ ((Yyn) == YYTABLE_NINF) @@ -955,57 +963,59 @@ static const yytype_int16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - 530, 13, 37, 112, 128, 37, -5, 82, 98, 93, - 37, 127, 37, 147, 4, 237, 109, 109, 109, 254, - 104, -310, 189, -310, 189, -310, -310, -310, -310, -310, - -310, -310, -310, -310, -310, -310, -310, -35, -310, 282, - 143, -310, 152, 224, -310, 321, 199, 199, 37, 323, - 37, 212, -310, 37, -57, 332, 210, 210, 37, -310, - 220, 183, -310, -310, -310, -310, -310, -310, 525, -310, - 262, -310, -310, 240, -35, 26, -310, 29, -310, 365, - 14, 366, -310, 199, 249, 37, 37, 289, -310, 283, - 207, 373, 288, 375, 375, -310, 252, 338, 37, 37, - -310, 217, 237, -310, 221, 381, 379, 227, 228, -310, - -310, -310, -35, 285, 276, -35, 15, -310, -310, -310, - -310, -310, -310, -310, -310, 234, 235, -310, -310, -310, - -310, -310, -310, -310, -310, -310, 278, 364, -64, 207, - 257, -310, 375, 407, -13, 263, -55, -310, 374, 303, - -310, 303, 37, -310, -310, -310, -310, -310, 410, -310, - -310, 257, -310, -310, 339, -310, -310, 26, -310, -310, - 257, 339, 257, 92, -310, -310, 14, 37, -310, 416, - 312, 423, 304, 30, 260, 264, 265, 155, 302, 268, - 334, -310, 124, 116, 368, -310, -310, -310, -310, -310, - -310, -310, -310, -310, -310, -310, -310, -310, -310, -310, - -310, 333, -310, -46, 267, -310, 257, 373, -310, 210, - 388, -310, -310, -310, 271, 118, -310, 346, 269, -310, - 63, 15, -35, 270, -310, -47, 15, 116, 389, -20, - -310, 275, 354, -310, 659, 142, -310, 312, 16, 22, - 390, 192, 257, 257, -32, 97, 281, 334, 561, 257, - 108, 284, -77, 257, 257, 334, -310, 334, -42, 286, - 130, 334, 334, 334, 334, 334, 334, 334, 334, 334, - 334, 334, 334, 334, 334, 334, 381, 37, -310, 446, - 14, 116, -310, 23, 323, 14, -310, 410, 18, 289, - -310, 257, -310, 447, -310, -310, -310, -310, 257, -310, - -310, -310, -310, 257, 257, 407, 375, -310, 421, -310, - 290, 291, -310, -310, 292, -310, -310, -310, -310, -310, - -310, 191, -310, 423, -310, -310, 257, -310, -310, 287, - -310, -310, -310, -310, -310, -310, 367, 114, 89, 133, - 257, 257, -310, 390, 363, 27, -310, -310, -310, 350, - 504, 580, 334, 298, 124, -310, 369, 305, 580, 580, - 580, 580, 620, 620, 620, 620, 108, 108, -44, -44, - -44, -103, 307, -310, -310, 150, 306, -310, -310, 174, - -310, 312, -310, 138, -310, 300, -310, 38, -310, 409, - -310, -310, -310, 116, 116, 175, -310, 313, 473, 475, - 476, -310, 380, -310, -310, 182, -310, 257, 659, 257, - 257, -310, 162, 141, 316, -310, 334, 580, 124, 317, - 184, -310, -310, -310, -310, 318, 391, -310, -310, -310, - 413, 414, 415, 399, 18, 484, -310, -310, -310, 382, - -310, -310, 492, 328, 336, 337, -310, -310, -50, 340, - 116, 185, -310, 257, -310, 561, 341, 194, -310, -310, - 38, 18, -310, -310, -310, 18, 295, 343, 257, 344, - 494, -310, -310, -310, -310, -310, 116, -310, -310, -310, - -310, 326, 407, -7, -310, 345, 347, 257, 196, 257, - -310, -310, 23, 116, -310, -310, 116, 353, -310 + 566, 33, 80, 84, 99, 80, 120, 28, 43, 95, + 80, 93, 80, 121, 13, 194, 61, 61, 61, 207, + 54, -410, 117, -410, 117, -410, -410, -410, -410, -410, + -410, -410, -410, -410, -410, -410, -410, -29, -410, 230, + 76, -410, 77, 181, -410, 142, 142, 142, 80, 272, + 80, 180, -410, 80, -57, 153, 153, 153, 80, -410, + 179, 116, -410, -410, -410, -410, -410, -410, 535, -410, + 223, -410, -410, 197, -29, 40, -410, 32, -410, 318, + 14, 321, 206, 324, 80, 80, 250, -410, 242, 171, + 344, 262, 354, 354, 315, 359, 80, 80, -410, 203, + 194, -410, 204, 370, 366, 212, 216, -410, -410, -410, + -29, 273, 264, -29, -3, -410, -410, -410, -410, -410, + -410, -410, -410, 219, 220, -410, -410, -410, -410, -410, + -410, -410, -410, -410, 348, -410, 265, -56, 171, 308, + -410, 354, 391, 138, 251, -55, -410, 360, 289, -410, + 289, -410, -410, 271, -410, -410, -410, -410, 399, -410, + -410, 308, -410, -410, 327, -410, -410, 40, -410, -410, + 308, 327, 308, 157, -410, -410, 14, -410, 80, 401, + 294, 403, 284, 82, 243, 245, 247, 163, 336, 244, + 369, -410, 304, -36, 404, -410, -410, -410, -410, -410, + -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, + -410, 322, -410, 87, 255, -410, 308, 344, -410, 153, + 375, -410, -410, 80, 258, 94, -410, 333, 256, -410, + 9, -3, -29, 259, -410, 107, -3, -36, 377, -24, + -410, 266, 337, -410, 772, 261, -410, 294, 5, 21, + 378, 228, 308, 308, 75, 102, 267, 369, 594, 308, + -31, 268, -64, 308, 308, 369, -410, 369, -54, 275, + 19, 369, 369, 369, 369, 369, 369, 369, 369, 369, + 369, 369, 369, 369, 369, 369, 370, 80, -410, 435, + 14, -36, -410, 23, 272, -410, 14, -410, 399, 12, + 250, -410, 308, -410, 437, -410, -410, -410, -410, 308, + -410, -410, -410, -410, 308, 308, 391, 354, -410, 413, + -410, 277, 278, -410, -410, 281, -410, -410, -410, -410, + -410, -410, 68, 36, 101, -410, -410, -410, 308, -410, + -410, 286, -410, -410, -410, -410, -410, -410, 356, 122, + -22, 132, 308, 308, -410, 378, 352, -131, -410, -410, + -410, 341, 541, 630, 369, 291, 304, -410, 357, 296, + 630, 630, 630, 630, 666, 666, 666, 666, -31, -31, + -37, -37, -37, -60, 293, -410, -410, 110, 297, -410, + -410, 124, -410, 294, -410, 186, -410, 299, -410, 35, + -410, 393, -410, -410, -410, -36, -36, 126, -410, 298, + 467, -410, 471, 475, -410, 379, 20, 364, 317, -410, + -410, 38, -410, 130, -410, 308, 772, 308, 308, -410, + 140, 136, 320, -410, 369, 630, 304, 323, 147, -410, + -410, -410, -410, 325, 387, -410, -410, -410, 409, 410, + 415, 396, 12, 494, -410, -410, -410, 373, -410, -410, + 493, 160, 332, 338, -410, 382, -410, -410, 340, 391, + -410, -50, 342, -36, 145, -410, 308, -410, 594, 345, + 165, -410, -410, 35, 12, -410, -410, -410, 12, 319, + 347, 308, 349, -410, 499, -410, -410, -410, 391, 175, + -410, -410, -410, -36, -410, -410, -410, -410, 449, 391, + -6, -410, 350, 177, -410, 355, 308, 188, 308, -410, + -410, -410, 23, -36, -410, -410, -36, 351, -410 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -1013,89 +1023,93 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_int16 yydefact[] = { - 251, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 262, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 30, 30, 0, - 271, 3, 21, 19, 21, 18, 8, 9, 7, 11, - 16, 17, 13, 14, 12, 15, 10, 0, 250, 0, - 237, 80, 33, 0, 44, 240, 51, 51, 0, 0, - 0, 0, 236, 0, 0, 0, 77, 77, 0, 42, - 0, 252, 253, 29, 26, 28, 27, 1, 251, 2, - 0, 6, 5, 128, 0, 89, 90, 120, 74, 0, - 138, 0, 239, 51, 0, 0, 0, 114, 37, 0, - 84, 0, 0, 0, 0, 241, 0, 0, 0, 0, - 43, 0, 0, 4, 0, 0, 108, 0, 0, 102, - 103, 101, 0, 105, 0, 0, 134, 238, 219, 222, - 224, 225, 220, 221, 226, 0, 137, 139, 214, 215, - 216, 223, 217, 218, 32, 31, 0, 0, 0, 84, - 0, 79, 0, 0, 0, 0, 114, 86, 0, 40, - 38, 40, 0, 76, 72, 73, 255, 254, 0, 127, - 107, 0, 97, 96, 120, 93, 92, 94, 104, 100, - 0, 120, 0, 0, 98, 34, 0, 0, 50, 0, - 251, 0, 0, 210, 0, 0, 0, 0, 0, 0, - 0, 212, 0, 113, 142, 149, 150, 151, 144, 146, - 152, 145, 165, 153, 154, 155, 156, 148, 143, 158, - 159, 0, 272, 0, 0, 82, 0, 0, 85, 77, - 0, 36, 41, 75, 24, 0, 22, 111, 109, 135, - 249, 134, 0, 119, 121, 126, 134, 130, 132, 129, - 140, 0, 0, 47, 0, 0, 52, 251, 108, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 161, 0, - 160, 0, 0, 0, 0, 0, 162, 0, 0, 0, + 282, 3, 21, 19, 21, 18, 8, 9, 7, 11, + 16, 17, 13, 14, 12, 15, 10, 0, 261, 0, + 248, 91, 33, 0, 44, 51, 51, 51, 0, 0, + 0, 0, 247, 0, 0, 88, 88, 88, 0, 42, + 0, 263, 264, 29, 26, 28, 27, 1, 262, 2, + 0, 6, 5, 139, 0, 100, 101, 131, 85, 0, + 149, 0, 0, 251, 0, 0, 125, 37, 0, 95, + 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, + 0, 4, 0, 0, 119, 0, 0, 113, 114, 112, + 0, 116, 0, 0, 145, 249, 230, 233, 235, 236, + 231, 232, 237, 0, 148, 150, 225, 226, 227, 234, + 228, 229, 32, 31, 0, 250, 0, 0, 95, 0, + 90, 0, 0, 0, 0, 125, 97, 0, 40, 38, + 40, 87, 252, 0, 83, 84, 266, 265, 0, 138, + 118, 0, 108, 107, 131, 104, 103, 105, 115, 111, + 0, 131, 0, 0, 109, 34, 0, 50, 0, 0, + 262, 0, 0, 221, 0, 0, 0, 0, 0, 0, + 0, 223, 0, 124, 153, 160, 161, 162, 155, 157, + 163, 156, 176, 164, 165, 166, 167, 159, 154, 169, + 170, 0, 283, 0, 0, 93, 0, 0, 96, 88, + 0, 36, 41, 0, 24, 0, 22, 122, 120, 146, + 260, 145, 0, 130, 132, 137, 145, 141, 143, 140, + 151, 0, 0, 47, 0, 80, 52, 262, 119, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 172, 0, + 171, 0, 0, 0, 0, 0, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 83, 0, - 0, 88, 87, 0, 0, 0, 20, 0, 0, 114, - 110, 0, 247, 0, 248, 141, 91, 95, 0, 125, - 124, 123, 99, 0, 0, 0, 0, 56, 0, 61, - 0, 0, 60, 58, 0, 68, 67, 57, 65, 66, - 55, 71, 46, 0, 49, 197, 0, 211, 213, 0, - 201, 202, 203, 204, 205, 206, 0, 0, 0, 0, - 0, 0, 184, 0, 0, 0, 157, 147, 176, 177, - 0, 172, 0, 0, 0, 163, 0, 175, 174, 190, - 191, 192, 193, 194, 195, 196, 167, 166, 169, 168, - 170, 171, 0, 35, 273, 0, 210, 78, 39, 0, - 23, 251, 112, 227, 229, 0, 231, 245, 230, 116, - 136, 246, 122, 133, 131, 0, 45, 0, 0, 0, - 0, 69, 0, 54, 53, 0, 188, 0, 0, 0, - 0, 182, 0, 0, 0, 207, 0, 173, 0, 0, - 0, 164, 208, 81, 25, 0, 0, 267, 259, 265, - 263, 266, 261, 0, 0, 0, 244, 235, 242, 0, - 106, 48, 0, 0, 0, 0, 70, 198, 0, 0, - 186, 0, 185, 0, 189, 209, 0, 0, 180, 178, - 245, 0, 262, 264, 260, 0, 228, 246, 0, 0, - 0, 62, 64, 199, 200, 183, 187, 181, 179, 232, - 256, 268, 0, 118, 63, 0, 0, 0, 0, 0, - 115, 59, 0, 269, 257, 243, 117, 0, 258 + 0, 0, 0, 0, 0, 0, 0, 0, 94, 0, + 0, 99, 98, 0, 0, 86, 0, 20, 0, 0, + 125, 121, 0, 258, 0, 259, 152, 102, 106, 0, + 136, 135, 134, 110, 0, 0, 0, 0, 56, 0, + 61, 71, 0, 60, 58, 0, 68, 67, 57, 65, + 66, 55, 74, 0, 0, 78, 49, 208, 0, 222, + 224, 0, 212, 213, 214, 215, 216, 217, 0, 0, + 0, 0, 0, 0, 195, 0, 0, 0, 168, 158, + 187, 188, 0, 183, 0, 0, 0, 174, 0, 186, + 185, 201, 202, 203, 204, 205, 206, 207, 178, 177, + 180, 179, 181, 182, 0, 35, 284, 0, 221, 89, + 39, 0, 23, 262, 123, 238, 240, 0, 242, 256, + 241, 127, 147, 257, 133, 144, 142, 0, 45, 0, + 0, 59, 0, 0, 72, 0, 77, 0, 0, 53, + 46, 0, 79, 0, 199, 0, 0, 0, 0, 193, + 0, 0, 0, 218, 0, 184, 0, 0, 0, 175, + 219, 92, 25, 0, 0, 278, 270, 276, 274, 277, + 272, 0, 0, 0, 255, 246, 253, 0, 117, 48, + 0, 0, 0, 0, 73, 0, 76, 54, 0, 0, + 209, 0, 0, 197, 0, 196, 0, 200, 220, 0, + 0, 191, 189, 256, 0, 273, 275, 271, 0, 239, + 257, 0, 0, 70, 0, 62, 64, 75, 0, 0, + 210, 211, 194, 198, 192, 190, 243, 267, 279, 0, + 129, 63, 0, 0, 82, 0, 0, 0, 0, 126, + 69, 81, 0, 280, 268, 254, 128, 0, 269 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -310, -310, -310, 443, -310, 491, -310, 225, -310, 75, - -310, -310, -310, -310, 241, -93, 383, -310, -310, -310, - 24, -310, 203, 120, -310, -310, -40, -310, -310, -310, - -310, 400, -310, -310, 324, -170, -99, -310, 9, -72, - -53, -310, -310, -67, 294, -310, -310, -310, -132, -310, - -310, -85, -310, 236, -310, -310, 10, -256, -310, -8, - 242, -140, -131, -310, -310, -310, -310, -310, -310, 296, - -310, -310, -310, -310, -310, -310, -310, -310, -310, -284, - -76, -87, -310, -310, -94, -310, -310, -310, -309, 77, - -310, -310, -310, 3, -310, -310, -310, 76, 319, -310, - -310, -310, -310, 451, -310, -310, -310, -310, -303 + -410, -410, -410, 441, -410, 492, -410, 225, -410, 198, + -410, -410, -410, -410, 227, -80, 383, -410, -410, -410, + 193, -410, 192, 108, -410, -410, -410, -410, 210, -410, + -35, -410, -410, -410, -410, 402, -410, -410, 328, -176, + -58, -410, -8, -73, -52, -410, -410, -68, 301, -410, + -410, -410, -122, -410, -410, -78, -410, 237, -410, -410, + -137, -256, -410, -71, 235, -139, -130, -410, -410, -410, + -410, -410, -410, 314, -410, -410, -410, -410, -410, -410, + -410, -410, -410, -291, -70, -85, -410, -410, -92, -410, + -410, -410, -409, 63, -410, -410, -410, 4, -410, -410, + -410, 89, 346, -410, -410, -410, -410, 451, -410, -410, + -410, -410, -311 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { 0, 19, 20, 21, 22, 71, 225, 226, 23, 64, - 24, 135, 25, 26, 89, 149, 221, 27, 28, 29, - 85, 245, 246, 331, 413, 30, 98, 31, 32, 33, - 34, 144, 35, 146, 147, 36, 164, 165, 166, 76, - 112, 113, 169, 77, 161, 227, 299, 300, 141, 450, - 500, 116, 233, 234, 311, 106, 174, 228, 125, 126, - 229, 230, 194, 195, 196, 197, 198, 199, 200, 255, - 201, 202, 203, 204, 205, 346, 206, 207, 208, 209, - 210, 128, 129, 130, 131, 132, 133, 392, 393, 394, - 395, 396, 51, 397, 83, 96, 446, 447, 448, 305, - 37, 38, 61, 62, 398, 443, 504, 69, 213 + 24, 133, 25, 26, 88, 148, 221, 27, 28, 29, + 83, 245, 246, 332, 411, 416, 467, 334, 335, 30, + 95, 31, 32, 33, 34, 143, 35, 145, 146, 36, + 164, 165, 166, 76, 110, 111, 169, 77, 161, 227, + 300, 301, 140, 458, 519, 114, 233, 234, 312, 104, + 174, 228, 123, 124, 229, 230, 194, 195, 196, 197, + 198, 199, 200, 255, 201, 202, 203, 204, 205, 348, + 206, 207, 208, 209, 210, 126, 127, 128, 129, 130, + 131, 394, 395, 396, 397, 398, 51, 399, 136, 153, + 454, 455, 456, 306, 37, 38, 61, 62, 400, 451, + 524, 69, 213 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1103,168 +1117,190 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 193, 151, 108, 355, 127, 41, 150, 150, 44, 387, - 243, 159, 405, 52, 218, 54, 171, 99, 118, 119, - 120, 40, 73, 58, 115, 337, 386, 140, 160, 179, - 235, 271, 237, 239, 314, 109, 93, 263, 109, 39, - 40, 302, 309, 499, 73, 167, 75, 254, 167, 211, - 214, 87, 262, 90, 264, 150, 92, 258, 362, 260, - 180, 100, 286, 59, 263, 45, 302, 263, 310, 172, - 110, 86, 215, 110, 46, 94, 291, 334, 253, 231, - 415, 264, 263, 107, 264, 363, 236, 173, 138, 139, - 271, 357, 65, 66, 263, 183, 118, 119, 120, 264, - 240, 154, 155, 181, 47, 114, 111, 136, 430, 111, - 156, 264, 347, 348, 232, 42, 217, 121, 483, 285, - 261, 286, 288, 358, 359, 289, 258, 183, 118, 119, - 120, 43, 74, 307, 360, 476, 361, 184, 185, 186, - 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, - 377, 378, 379, 380, 381, 223, 122, 123, 183, 118, - 119, 120, 445, 436, 301, 167, 491, 399, 235, 184, - 185, 186, 467, 403, 404, 48, 187, 263, 339, 293, - 241, 73, 338, 191, 335, 391, 124, 303, 350, 498, - 50, 49, 382, 425, 264, 121, 419, 248, 301, 249, - 184, 185, 186, 263, 437, 238, 53, 351, 187, 438, - 422, 423, 188, 352, 127, 439, 440, 55, 507, 127, - 264, 435, 493, 406, 420, 189, 56, 121, 263, 150, - 263, 427, 441, 365, 122, 123, -268, 442, 418, 187, - 60, 306, 271, 351, 188, 264, 312, 264, 463, 421, - 366, 190, 191, 63, 67, 263, 57, 189, 121, 192, - 183, 118, 119, 120, 124, 253, 122, 123, 282, 283, - 284, 285, 264, 286, 68, 188, 263, 458, 462, 460, - 461, 424, 385, 190, 191, 78, 296, 389, 189, 297, - 383, 192, 429, 264, 411, 465, 124, 122, 123, 263, - 70, 485, 184, 185, 186, 183, 118, 119, 120, -233, - 332, 412, 79, 333, 190, 191, 264, 81, 433, 80, - 436, 176, 192, 486, 82, 84, 88, 124, 340, 341, - 342, 343, 344, 345, 91, 95, 97, 183, 118, 119, - 120, 187, 434, 451, 101, 176, 289, 256, 185, 186, - 457, 436, 469, 301, 102, 301, 466, 503, 104, 506, - 121, 437, 488, 105, 505, 301, 438, 289, 117, 137, - 134, 140, 439, 440, 143, 142, 145, 188, 148, 118, - 185, 186, 152, 153, 74, 265, 187, 120, 158, 441, - 189, 160, 437, -268, 442, 162, 163, 438, 168, 122, - 123, 170, 175, 439, 440, 121, 176, 496, 177, 178, - 212, 216, 219, 224, 220, 114, 190, 191, 187, 242, - 441, 266, 257, 15, 192, 442, 244, 250, 247, 124, - 287, 251, 252, 259, 290, 189, 294, 121, 295, 298, - 301, 308, 315, 313, 122, 123, 316, 73, 353, 384, - 401, 407, 356, 364, 257, 416, 497, 408, 409, 410, - 417, 190, 191, 362, 263, 428, -234, 189, 267, 192, - 286, 444, 431, 432, 124, 249, 122, 123, 449, 453, - 452, 454, 455, 456, 464, 468, 470, 477, 268, 471, - 472, 473, 474, 190, 191, 269, 270, 475, 479, 480, - 495, 192, 271, 272, 481, 482, 124, 478, 484, 487, - 492, 103, 494, 501, 502, 72, 273, 274, 275, 276, - 277, 508, 390, 278, 279, -270, 280, 281, 282, 283, - 284, 285, 1, 286, 222, 388, 414, 1, 459, 182, - 2, 292, 336, 400, 402, 2, 489, 3, 490, 304, - 349, 4, 3, 157, 0, 0, 4, 266, 0, 0, - 0, 5, 0, 0, 6, 7, 5, 0, 0, 6, - 7, 0, 0, 0, 0, 0, 8, 9, 0, 0, - 0, 8, 9, 0, 0, 0, 0, 10, 0, 0, - 11, 0, 10, 0, 0, 11, 0, 0, 0, 0, - 0, 0, 0, 0, 267, 0, 0, 0, 0, 0, - 0, 12, 0, 0, 266, 13, 12, 0, 426, 0, - 13, 0, 0, 0, 354, 0, 0, 0, 0, 0, - 14, 0, 270, 266, 0, 14, 15, 0, 271, 272, - 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, + 193, 106, 389, 357, 243, 407, 41, 149, 149, 44, + 125, 159, 303, 150, 52, 40, 54, 160, 116, 117, + 118, 96, 97, 218, 339, 113, 388, 139, 73, 75, + 315, 235, 58, 237, 239, 433, 92, 179, 303, 244, + 302, 107, 167, 489, 518, 167, 364, 465, 254, 107, + 263, 172, 86, 262, 89, 171, 149, 91, 258, 39, + 260, 211, 98, 417, 263, 417, 105, 264, 180, 173, + 215, 336, 59, 365, 271, 93, 108, 291, 263, 508, + 466, 264, 423, 40, 108, 427, 231, 42, 137, 138, + 263, 156, 263, 236, 307, 264, 418, 271, 418, 313, + 154, 155, 43, 271, 359, 286, 240, 264, 112, 264, + 438, 181, 109, 349, 350, 232, 217, 119, 500, 261, + 109, 48, 367, 263, 360, 361, 285, 258, 286, 282, + 283, 284, 285, 304, 286, 362, 49, 363, 74, 368, + 264, 369, 370, 371, 372, 373, 374, 375, 376, 377, + 378, 379, 380, 381, 382, 383, 120, 121, 499, 453, + 183, 116, 117, 118, 167, 302, 183, 116, 117, 118, + 235, 414, 53, 337, 308, 405, 406, 341, 401, 393, + 480, 340, 241, 191, 293, 253, 122, 513, 415, 263, + 45, 55, 50, 352, 384, 73, 310, 60, 517, 46, + 56, 214, 184, 185, 186, 63, 264, 67, 184, 185, + 186, 444, 353, 430, 431, 65, 66, 443, 354, 387, + 125, 263, 311, 428, 68, 391, 125, 295, 70, 47, + 57, 527, 149, 78, 435, 510, 263, 408, 264, 84, + 85, 187, 353, 476, 80, 79, 426, 187, 429, 248, + 263, 249, 445, 264, 263, 288, 475, 446, 289, 263, + 119, 502, 297, 447, 448, 298, 119, 264, 82, 420, + 238, 264, 421, 253, 81, 87, 264, 188, 441, 94, + 449, 176, 432, 188, -279, 450, 471, 100, 473, 474, + 189, 385, 442, 437, 459, 176, 189, 289, 470, 120, + 121, 302, 90, 99, 478, 120, 121, 183, 116, 117, + 118, 183, 116, 117, 118, 482, 190, 191, 302, 102, + 103, 115, 190, 191, 192, 132, 134, 135, 493, 122, + 192, 494, 139, 505, 141, 122, 302, 503, 142, 183, + 116, 117, 118, 514, 444, 521, 289, 144, 289, 184, + 185, 186, 147, 184, 185, 186, 525, -244, 116, 289, + 151, 73, 152, 479, 342, 343, 344, 345, 346, 347, + 74, 158, 183, 116, 117, 118, 118, 523, 160, 526, + 162, 256, 185, 186, 163, 445, 168, 175, 187, 170, + 446, 176, 187, 177, 212, 178, 447, 448, 219, 216, + 220, 223, 224, 112, 242, 15, 244, 119, 247, 259, + 250, 119, 251, 449, 252, 185, 186, -279, 450, 287, + 187, 265, 290, 294, 188, 296, 299, 302, 188, 317, + 309, 314, 333, 316, 355, 73, 358, 189, 386, 119, + 403, 189, 366, 409, 410, 412, 120, 121, 413, 425, + 120, 121, 364, 187, 424, 263, 257, 266, 436, 440, + 439, 286, 457, 190, 191, 460, 249, 190, 191, 189, + 452, 192, 119, 461, 444, 192, 122, 462, 120, 121, + 122, 463, 464, 468, 469, 484, 485, 486, 477, 257, + -245, 481, 487, 483, 488, 190, 191, 490, 491, 492, + 495, 497, 189, 192, 267, 512, 496, 498, 122, 101, + 501, 120, 121, 504, 509, 445, 72, 511, 520, 528, + 446, 390, 522, 392, 268, 419, 447, 448, 190, 191, + 515, 269, 270, 222, 472, -281, 192, 402, 271, 272, + 182, 122, 1, 449, 422, 292, 404, 507, 450, 338, + 2, 157, 273, 274, 275, 276, 277, 3, 0, 278, + 279, 4, 280, 281, 282, 283, 284, 285, 351, 286, + 0, 5, 506, 1, 6, 7, 305, 0, 0, 516, + 0, 2, 0, 0, 0, 0, 8, 9, 3, 0, + 0, 0, 4, 0, 266, 0, 0, 10, 0, 0, + 11, 0, 5, 0, 0, 6, 7, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 8, 9, 0, + 0, 12, 0, 0, 0, 13, 0, 0, 10, 0, + 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, + 14, 267, 0, 0, 0, 0, 15, 266, 0, 0, + 0, 0, 12, 0, 0, 434, 13, 0, 0, 0, + 0, 356, 0, 0, 0, 0, 0, 0, 0, 270, + 0, 14, 0, 0, 0, 271, 272, 15, 0, 0, + 16, 17, 18, 266, 0, 0, 0, 0, 0, 273, + 274, 275, 276, 277, 267, 0, 278, 279, 0, 280, + 281, 282, 283, 284, 285, 0, 286, 0, 0, 0, + 0, 16, 17, 18, 356, 0, 0, 0, 0, 266, + 0, 0, 270, 0, 0, 0, 0, 0, 271, 272, + -282, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 273, 274, 275, 276, 277, 0, 0, 278, - 279, 267, 280, 281, 282, 283, 284, 285, 0, 286, - 16, 17, 18, 266, 0, 16, 17, 18, 0, 0, - -271, 354, 0, 317, 0, 0, 0, 0, 318, 270, - 319, 320, 0, 321, 0, 271, 272, 0, 0, 0, - 0, 322, 0, 0, 0, 0, 0, 0, 270, 273, - 274, 275, 276, 277, 271, -271, 278, 279, 0, 280, - 281, 282, 283, 284, 285, 0, 286, 323, -271, -271, - -271, 276, 277, 0, 0, 278, 279, 0, 280, 281, - 282, 283, 284, 285, 324, 286, 325, 326, 270, 0, - 0, 0, 0, 0, 271, 0, 0, 0, 0, 0, - 0, 327, 0, 0, 0, 328, 0, 329, 0, 0, - 0, -271, -271, 0, 0, -271, -271, 330, 280, 281, - 282, 283, 284, 285, 0, 286 + 279, 0, 280, 281, 282, 283, 284, 285, 270, 286, + 0, 0, 0, 0, 271, -282, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, -282, -282, + -282, 276, 277, 0, 0, 278, 279, 0, 280, 281, + 282, 283, 284, 285, 270, 286, 318, 0, 0, 0, + 271, 319, 0, 320, 321, 0, 322, 0, 0, 0, + 0, 0, 0, 0, 323, 0, 0, -282, -282, 0, + 0, -282, -282, 0, 280, 281, 282, 283, 284, 285, + 0, 286, 0, 0, 0, 0, 0, 0, 0, 0, + 324, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 325, 0, 326, + 327, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 328, 0, 0, 0, 329, 0, + 330, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 331 }; static const yytype_int16 yycheck[] = { - 140, 94, 74, 259, 80, 2, 93, 94, 5, 293, - 180, 105, 315, 10, 146, 12, 115, 57, 4, 5, - 6, 3, 57, 19, 77, 3, 3, 82, 12, 93, - 170, 134, 172, 173, 54, 9, 93, 114, 9, 26, - 3, 3, 89, 50, 57, 112, 37, 187, 115, 142, - 63, 48, 192, 50, 131, 142, 53, 188, 100, 190, - 124, 58, 165, 59, 114, 70, 3, 114, 115, 54, - 44, 47, 144, 44, 79, 132, 216, 247, 110, 164, - 336, 131, 114, 74, 131, 127, 171, 72, 85, 86, - 134, 168, 17, 18, 114, 3, 4, 5, 6, 131, - 176, 98, 99, 167, 109, 76, 80, 83, 364, 80, - 101, 131, 252, 253, 167, 3, 171, 103, 168, 163, - 192, 165, 168, 263, 264, 171, 257, 3, 4, 5, - 6, 3, 167, 232, 265, 444, 267, 45, 46, 47, - 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, - 281, 282, 283, 284, 285, 152, 142, 143, 3, 4, - 5, 6, 124, 25, 171, 232, 475, 299, 308, 45, - 46, 47, 428, 313, 314, 93, 84, 114, 250, 219, - 177, 57, 160, 160, 168, 167, 172, 124, 91, 492, - 97, 93, 286, 166, 131, 103, 107, 167, 171, 169, - 45, 46, 47, 114, 66, 113, 79, 110, 84, 71, - 350, 351, 120, 116, 290, 77, 78, 70, 502, 295, - 131, 391, 478, 316, 91, 133, 79, 103, 114, 316, - 114, 362, 94, 103, 142, 143, 98, 99, 124, 84, - 3, 231, 134, 110, 120, 131, 236, 131, 107, 116, - 120, 159, 160, 144, 0, 114, 109, 133, 103, 167, - 3, 4, 5, 6, 172, 110, 142, 143, 160, 161, - 162, 163, 131, 165, 170, 120, 114, 417, 116, 419, - 420, 353, 290, 159, 160, 3, 168, 295, 133, 171, - 287, 167, 364, 131, 103, 426, 172, 142, 143, 114, - 111, 116, 45, 46, 47, 3, 4, 5, 6, 171, - 168, 120, 169, 171, 159, 160, 131, 93, 168, 167, - 25, 171, 167, 463, 3, 126, 3, 172, 136, 137, - 138, 139, 140, 141, 122, 3, 126, 3, 4, 5, - 6, 84, 168, 168, 124, 171, 171, 45, 46, 47, - 168, 25, 168, 171, 171, 171, 428, 497, 96, 499, - 103, 66, 168, 123, 168, 171, 71, 171, 3, 120, - 4, 82, 77, 78, 167, 92, 3, 120, 90, 4, - 46, 47, 130, 45, 167, 17, 84, 6, 167, 94, - 133, 12, 66, 98, 99, 168, 168, 71, 113, 142, - 143, 125, 168, 77, 78, 103, 171, 81, 130, 45, - 3, 148, 38, 3, 111, 76, 159, 160, 84, 3, - 94, 53, 120, 111, 167, 99, 3, 167, 124, 172, - 97, 167, 167, 165, 167, 133, 48, 103, 167, 93, - 171, 171, 167, 54, 142, 143, 92, 57, 167, 3, - 3, 30, 168, 167, 120, 168, 130, 167, 167, 167, - 93, 159, 160, 100, 114, 167, 171, 133, 100, 167, - 165, 171, 103, 166, 172, 169, 142, 143, 69, 6, - 167, 6, 6, 103, 168, 168, 168, 3, 120, 98, - 77, 77, 77, 159, 160, 127, 128, 98, 6, 171, - 6, 167, 134, 135, 168, 168, 172, 125, 168, 168, - 167, 68, 168, 168, 167, 24, 148, 149, 150, 151, - 152, 168, 297, 155, 156, 0, 158, 159, 160, 161, - 162, 163, 7, 165, 151, 294, 333, 7, 418, 139, - 15, 217, 248, 301, 308, 15, 470, 22, 471, 230, - 254, 26, 22, 102, -1, -1, 26, 53, -1, -1, - -1, 36, -1, -1, 39, 40, 36, -1, -1, 39, - 40, -1, -1, -1, -1, -1, 51, 52, -1, -1, - -1, 51, 52, -1, -1, -1, -1, 62, -1, -1, - 65, -1, 62, -1, -1, 65, -1, -1, -1, -1, - -1, -1, -1, -1, 100, -1, -1, -1, -1, -1, - -1, 86, -1, -1, 53, 90, 86, -1, 114, -1, - 90, -1, -1, -1, 120, -1, -1, -1, -1, -1, - 105, -1, 128, 53, -1, 105, 111, -1, 134, 135, - -1, 111, -1, -1, -1, -1, -1, -1, -1, -1, + 139, 74, 293, 259, 180, 316, 2, 92, 93, 5, + 80, 103, 3, 93, 10, 3, 12, 12, 4, 5, + 6, 56, 57, 145, 3, 77, 3, 82, 57, 37, + 54, 170, 19, 172, 173, 166, 93, 93, 3, 3, + 171, 9, 110, 452, 50, 113, 100, 27, 187, 9, + 114, 54, 48, 192, 50, 113, 141, 53, 188, 26, + 190, 141, 58, 27, 114, 27, 74, 131, 124, 72, + 143, 247, 59, 127, 134, 132, 44, 216, 114, 488, + 60, 131, 338, 3, 44, 107, 164, 3, 84, 85, + 114, 99, 114, 171, 231, 131, 60, 134, 60, 236, + 96, 97, 3, 134, 168, 165, 176, 131, 76, 131, + 366, 167, 80, 252, 253, 167, 171, 103, 168, 192, + 80, 93, 103, 114, 263, 264, 163, 257, 165, 160, + 161, 162, 163, 124, 165, 265, 93, 267, 167, 120, + 131, 271, 272, 273, 274, 275, 276, 277, 278, 279, + 280, 281, 282, 283, 284, 285, 142, 143, 469, 124, + 3, 4, 5, 6, 232, 171, 3, 4, 5, 6, + 309, 103, 79, 168, 232, 314, 315, 250, 300, 167, + 436, 160, 178, 160, 219, 110, 172, 498, 120, 114, + 70, 70, 97, 91, 286, 57, 89, 3, 509, 79, + 79, 63, 45, 46, 47, 144, 131, 0, 45, 46, + 47, 25, 110, 352, 353, 17, 18, 393, 116, 290, + 290, 114, 115, 91, 170, 296, 296, 223, 111, 109, + 109, 522, 317, 3, 364, 491, 114, 317, 131, 46, + 47, 84, 110, 107, 167, 169, 124, 84, 116, 167, + 114, 169, 66, 131, 114, 168, 116, 71, 171, 114, + 103, 116, 168, 77, 78, 171, 103, 131, 126, 168, + 113, 131, 171, 110, 93, 3, 131, 120, 168, 126, + 94, 171, 355, 120, 98, 99, 425, 171, 427, 428, + 133, 287, 168, 366, 168, 171, 133, 171, 168, 142, + 143, 171, 122, 124, 434, 142, 143, 3, 4, 5, + 6, 3, 4, 5, 6, 168, 159, 160, 171, 96, + 123, 3, 159, 160, 167, 4, 120, 3, 168, 172, + 167, 171, 82, 168, 92, 172, 171, 476, 167, 3, + 4, 5, 6, 168, 25, 168, 171, 3, 171, 45, + 46, 47, 90, 45, 46, 47, 168, 171, 4, 171, + 45, 57, 3, 436, 136, 137, 138, 139, 140, 141, + 167, 167, 3, 4, 5, 6, 6, 516, 12, 518, + 168, 45, 46, 47, 168, 66, 113, 168, 84, 125, + 71, 171, 84, 45, 3, 130, 77, 78, 38, 148, + 111, 130, 3, 76, 3, 111, 3, 103, 124, 165, + 167, 103, 167, 94, 167, 46, 47, 98, 99, 97, + 84, 17, 167, 48, 120, 167, 93, 171, 120, 92, + 171, 54, 171, 167, 167, 57, 168, 133, 3, 103, + 3, 133, 167, 30, 167, 167, 142, 143, 167, 93, + 142, 143, 100, 84, 168, 114, 120, 53, 167, 166, + 103, 165, 69, 159, 160, 167, 169, 159, 160, 133, + 171, 167, 103, 6, 25, 167, 172, 6, 142, 143, + 172, 6, 103, 119, 167, 98, 77, 77, 168, 120, + 171, 168, 77, 168, 98, 159, 160, 3, 125, 6, + 168, 119, 133, 167, 100, 6, 168, 167, 172, 68, + 168, 142, 143, 168, 167, 66, 24, 168, 168, 168, + 71, 294, 167, 298, 120, 333, 77, 78, 159, 160, + 81, 127, 128, 150, 426, 0, 167, 302, 134, 135, + 138, 172, 7, 94, 334, 217, 309, 484, 99, 248, + 15, 100, 148, 149, 150, 151, 152, 22, -1, 155, + 156, 26, 158, 159, 160, 161, 162, 163, 254, 165, + -1, 36, 483, 7, 39, 40, 230, -1, -1, 130, + -1, 15, -1, -1, -1, -1, 51, 52, 22, -1, + -1, -1, 26, -1, 53, -1, -1, 62, -1, -1, + 65, -1, 36, -1, -1, 39, 40, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 51, 52, -1, + -1, 86, -1, -1, -1, 90, -1, -1, 62, -1, + -1, 65, -1, -1, -1, -1, -1, -1, -1, -1, + 105, 100, -1, -1, -1, -1, 111, 53, -1, -1, + -1, -1, 86, -1, -1, 114, 90, -1, -1, -1, + -1, 120, -1, -1, -1, -1, -1, -1, -1, 128, + -1, 105, -1, -1, -1, 134, 135, 111, -1, -1, + 145, 146, 147, 53, -1, -1, -1, -1, -1, 148, + 149, 150, 151, 152, 100, -1, 155, 156, -1, 158, + 159, 160, 161, 162, 163, -1, 165, -1, -1, -1, + -1, 145, 146, 147, 120, -1, -1, -1, -1, 53, + -1, -1, 128, -1, -1, -1, -1, -1, 134, 135, + 100, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 148, 149, 150, 151, 152, -1, -1, 155, - 156, 100, 158, 159, 160, 161, 162, 163, -1, 165, - 145, 146, 147, 53, -1, 145, 146, 147, -1, -1, - 100, 120, -1, 24, -1, -1, -1, -1, 29, 128, - 31, 32, -1, 34, -1, 134, 135, -1, -1, -1, - -1, 42, -1, -1, -1, -1, -1, -1, 128, 148, - 149, 150, 151, 152, 134, 135, 155, 156, -1, 158, - 159, 160, 161, 162, 163, -1, 165, 68, 148, 149, + 156, -1, 158, 159, 160, 161, 162, 163, 128, 165, + -1, -1, -1, -1, 134, 135, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 148, 149, 150, 151, 152, -1, -1, 155, 156, -1, 158, 159, - 160, 161, 162, 163, 85, 165, 87, 88, 128, -1, - -1, -1, -1, -1, 134, -1, -1, -1, -1, -1, - -1, 102, -1, -1, -1, 106, -1, 108, -1, -1, - -1, 151, 152, -1, -1, 155, 156, 118, 158, 159, - 160, 161, 162, 163, -1, 165 + 160, 161, 162, 163, 128, 165, 24, -1, -1, -1, + 134, 29, -1, 31, 32, -1, 34, -1, -1, -1, + -1, -1, -1, -1, 42, -1, -1, 151, 152, -1, + -1, 155, 156, -1, 158, 159, 160, 161, 162, 163, + -1, 165, -1, -1, -1, -1, -1, -1, -1, -1, + 68, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 85, -1, 87, + 88, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 102, -1, -1, -1, 106, -1, + 108, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 118 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1274,54 +1310,56 @@ static const yytype_int16 yystos[] = 0, 7, 15, 22, 26, 36, 39, 40, 51, 52, 62, 65, 86, 90, 105, 111, 145, 146, 147, 174, 175, 176, 177, 181, 183, 185, 186, 190, 191, 192, - 198, 200, 201, 202, 203, 205, 208, 273, 274, 26, - 3, 266, 3, 3, 266, 70, 79, 109, 93, 93, - 97, 265, 266, 79, 266, 70, 79, 109, 19, 59, - 3, 275, 276, 144, 182, 182, 182, 0, 170, 280, - 111, 178, 178, 57, 167, 211, 212, 216, 3, 169, - 167, 93, 3, 267, 126, 193, 193, 266, 3, 187, - 266, 122, 266, 93, 132, 3, 268, 126, 199, 199, - 266, 124, 171, 176, 96, 123, 228, 211, 212, 9, - 44, 80, 213, 214, 76, 213, 224, 3, 4, 5, - 6, 103, 142, 143, 172, 231, 232, 253, 254, 255, - 256, 257, 258, 259, 4, 184, 193, 120, 266, 266, - 82, 221, 92, 167, 204, 3, 206, 207, 90, 188, - 254, 188, 130, 45, 266, 266, 211, 276, 167, 257, - 12, 217, 168, 168, 209, 210, 211, 216, 113, 215, - 125, 209, 54, 72, 229, 168, 171, 130, 45, 93, - 124, 167, 204, 3, 45, 46, 47, 84, 120, 133, - 159, 160, 167, 234, 235, 236, 237, 238, 239, 240, - 241, 243, 244, 245, 246, 247, 249, 250, 251, 252, - 253, 188, 3, 281, 63, 212, 148, 171, 221, 38, - 111, 189, 189, 266, 3, 179, 180, 218, 230, 233, - 234, 224, 213, 225, 226, 234, 224, 234, 113, 234, - 253, 266, 3, 208, 3, 194, 195, 124, 167, 169, - 167, 167, 167, 110, 234, 242, 45, 120, 235, 165, - 235, 212, 234, 114, 131, 17, 53, 100, 120, 127, + 202, 204, 205, 206, 207, 209, 212, 277, 278, 26, + 3, 270, 3, 3, 270, 70, 79, 109, 93, 93, + 97, 269, 270, 79, 270, 70, 79, 109, 19, 59, + 3, 279, 280, 144, 182, 182, 182, 0, 170, 284, + 111, 178, 178, 57, 167, 215, 216, 220, 3, 169, + 167, 93, 126, 193, 193, 193, 270, 3, 187, 270, + 122, 270, 93, 132, 126, 203, 203, 203, 270, 124, + 171, 176, 96, 123, 232, 215, 216, 9, 44, 80, + 217, 218, 76, 217, 228, 3, 4, 5, 6, 103, + 142, 143, 172, 235, 236, 257, 258, 259, 260, 261, + 262, 263, 4, 184, 120, 3, 271, 270, 270, 82, + 225, 92, 167, 208, 3, 210, 211, 90, 188, 258, + 188, 45, 3, 272, 270, 270, 215, 280, 167, 261, + 12, 221, 168, 168, 213, 214, 215, 220, 113, 219, + 125, 213, 54, 72, 233, 168, 171, 45, 130, 93, + 124, 167, 208, 3, 45, 46, 47, 84, 120, 133, + 159, 160, 167, 238, 239, 240, 241, 242, 243, 244, + 245, 247, 248, 249, 250, 251, 253, 254, 255, 256, + 257, 188, 3, 285, 63, 216, 148, 171, 225, 38, + 111, 189, 189, 130, 3, 179, 180, 222, 234, 237, + 238, 228, 217, 229, 230, 238, 228, 238, 113, 238, + 257, 270, 3, 212, 3, 194, 195, 124, 167, 169, + 167, 167, 167, 110, 238, 246, 45, 120, 239, 165, + 239, 216, 238, 114, 131, 17, 53, 100, 120, 127, 128, 134, 135, 148, 149, 150, 151, 152, 155, 156, 158, 159, 160, 161, 162, 163, 165, 97, 168, 171, - 167, 234, 207, 199, 48, 167, 168, 171, 93, 219, - 220, 171, 3, 124, 271, 272, 229, 209, 171, 89, - 115, 227, 229, 54, 54, 167, 92, 24, 29, 31, - 32, 34, 42, 68, 85, 87, 88, 102, 106, 108, - 118, 196, 168, 171, 208, 168, 217, 3, 160, 212, - 136, 137, 138, 139, 140, 141, 248, 234, 234, 242, - 91, 110, 116, 167, 120, 230, 168, 168, 234, 234, - 235, 235, 100, 127, 167, 103, 120, 235, 235, 235, - 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235, 235, 257, 266, 3, 232, 3, 252, 187, 232, - 180, 167, 260, 261, 262, 263, 264, 266, 277, 221, - 233, 3, 226, 234, 234, 281, 188, 30, 167, 167, - 167, 103, 120, 197, 195, 230, 168, 93, 124, 107, - 91, 116, 234, 234, 212, 166, 114, 235, 167, 212, - 230, 103, 166, 168, 168, 208, 25, 66, 71, 77, - 78, 94, 99, 278, 171, 124, 269, 270, 271, 69, - 222, 168, 167, 6, 6, 6, 103, 168, 234, 196, - 234, 234, 116, 107, 168, 235, 212, 230, 168, 168, - 168, 98, 77, 77, 77, 98, 261, 3, 125, 6, - 171, 168, 168, 168, 168, 116, 234, 168, 168, 270, - 262, 261, 167, 230, 168, 6, 81, 130, 281, 50, - 223, 168, 167, 234, 279, 168, 234, 252, 168 + 167, 238, 211, 203, 48, 270, 167, 168, 171, 93, + 223, 224, 171, 3, 124, 275, 276, 233, 213, 171, + 89, 115, 231, 233, 54, 54, 167, 92, 24, 29, + 31, 32, 34, 42, 68, 85, 87, 88, 102, 106, + 108, 118, 196, 171, 200, 201, 212, 168, 221, 3, + 160, 216, 136, 137, 138, 139, 140, 141, 252, 238, + 238, 246, 91, 110, 116, 167, 120, 234, 168, 168, + 238, 238, 239, 239, 100, 127, 167, 103, 120, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + 239, 239, 239, 239, 261, 270, 3, 236, 3, 256, + 187, 236, 180, 167, 264, 265, 266, 267, 268, 270, + 281, 225, 237, 3, 230, 238, 238, 285, 188, 30, + 167, 197, 167, 167, 103, 120, 198, 27, 60, 195, + 168, 171, 201, 234, 168, 93, 124, 107, 91, 116, + 238, 238, 216, 166, 114, 239, 167, 216, 234, 103, + 166, 168, 168, 212, 25, 66, 71, 77, 78, 94, + 99, 282, 171, 124, 273, 274, 275, 69, 226, 168, + 167, 6, 6, 6, 103, 27, 60, 199, 119, 167, + 168, 238, 196, 238, 238, 116, 107, 168, 239, 216, + 234, 168, 168, 168, 98, 77, 77, 77, 98, 265, + 3, 125, 6, 168, 171, 168, 168, 119, 167, 285, + 168, 168, 116, 238, 168, 168, 274, 266, 265, 167, + 234, 168, 6, 285, 168, 81, 130, 285, 50, 227, + 168, 168, 167, 238, 283, 168, 238, 256, 168 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ @@ -1334,27 +1372,28 @@ static const yytype_int16 yyr1[] = 189, 190, 191, 191, 191, 192, 192, 192, 192, 192, 193, 193, 194, 194, 195, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 197, - 197, 197, 198, 198, 198, 198, 199, 199, 200, 201, - 202, 203, 203, 204, 204, 205, 206, 206, 207, 208, - 208, 208, 209, 209, 210, 210, 211, 211, 212, 212, - 213, 214, 214, 214, 215, 215, 216, 217, 217, 218, - 219, 219, 220, 221, 221, 222, 222, 223, 223, 224, - 224, 225, 225, 226, 227, 227, 227, 228, 228, 229, - 229, 229, 229, 229, 229, 230, 230, 231, 231, 232, - 232, 233, 234, 234, 234, 234, 234, 235, 235, 235, - 235, 235, 235, 235, 235, 235, 235, 235, 236, 236, - 237, 237, 237, 237, 237, 238, 238, 238, 238, 238, - 238, 238, 238, 238, 238, 238, 239, 239, 240, 240, - 240, 240, 241, 241, 241, 241, 242, 242, 243, 243, - 244, 244, 244, 244, 244, 244, 244, 245, 245, 246, - 247, 248, 248, 248, 248, 248, 248, 249, 250, 251, - 252, 252, 252, 252, 253, 253, 253, 253, 253, 254, - 255, 255, 256, 256, 257, 258, 259, 260, 260, 261, - 261, 262, 262, 263, 263, 264, 265, 266, 266, 267, - 267, 268, 269, 269, 270, 270, 271, 271, 272, 272, - 273, 273, 274, 275, 275, 276, 277, 277, 277, 278, - 278, 278, 278, 278, 278, 278, 278, 278, 278, 279, - 280, 280, 281, 281 + 197, 197, 198, 198, 198, 199, 199, 199, 200, 200, + 200, 201, 201, 202, 202, 202, 202, 203, 203, 204, + 205, 206, 207, 207, 208, 208, 209, 210, 210, 211, + 212, 212, 212, 213, 213, 214, 214, 215, 215, 216, + 216, 217, 218, 218, 218, 219, 219, 220, 221, 221, + 222, 223, 223, 224, 225, 225, 226, 226, 227, 227, + 228, 228, 229, 229, 230, 231, 231, 231, 232, 232, + 233, 233, 233, 233, 233, 233, 234, 234, 235, 235, + 236, 236, 237, 238, 238, 238, 238, 238, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 240, + 240, 241, 241, 241, 241, 241, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 243, 243, 244, + 244, 244, 244, 245, 245, 245, 245, 246, 246, 247, + 247, 248, 248, 248, 248, 248, 248, 248, 249, 249, + 250, 251, 252, 252, 252, 252, 252, 252, 253, 254, + 255, 256, 256, 256, 256, 257, 257, 257, 257, 257, + 258, 259, 259, 260, 260, 261, 262, 263, 264, 264, + 265, 265, 266, 266, 267, 267, 268, 269, 270, 270, + 271, 271, 272, 273, 273, 274, 274, 275, 275, 276, + 276, 277, 277, 278, 279, 279, 280, 281, 281, 281, + 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, + 283, 284, 284, 285, 285 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -1364,30 +1403,31 @@ static const yytype_int8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 0, 1, 3, 1, 4, 2, 2, 2, 1, 0, 4, 1, 2, 5, 7, 5, 1, 1, 3, - 0, 5, 2, 3, 2, 8, 7, 6, 9, 7, - 3, 0, 1, 3, 3, 1, 1, 1, 1, 6, - 1, 1, 4, 5, 4, 1, 1, 1, 1, 1, - 2, 0, 4, 4, 3, 5, 2, 0, 7, 4, - 2, 8, 5, 3, 0, 5, 1, 3, 3, 2, - 2, 6, 1, 1, 1, 3, 3, 3, 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, 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, - 6, 1, 1, 1, 1, 1, 1, 4, 4, 5, - 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, + 0, 5, 2, 3, 2, 8, 8, 6, 9, 7, + 3, 0, 1, 3, 4, 1, 1, 1, 1, 2, + 1, 1, 4, 5, 4, 1, 1, 1, 1, 5, + 3, 0, 1, 2, 0, 2, 1, 0, 1, 2, + 0, 6, 5, 4, 4, 3, 6, 2, 0, 7, + 4, 2, 8, 5, 3, 0, 5, 1, 3, 3, + 2, 2, 6, 1, 1, 1, 3, 3, 3, 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, 1, 3, 1, - 1, 1, 4, 1, 3, 2, 1, 1, 3, 1, - 0, 1, 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, 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, 6, 1, 1, 1, 1, 1, 1, 4, 4, + 5, 1, 3, 1, 3, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, + 1, 1, 1, 4, 1, 3, 2, 1, 1, 3, + 1, 0, 1, 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 }; @@ -1939,31 +1979,31 @@ yydestruct (const char *yymsg, switch (yykind) { case YYSYMBOL_IDENTIFIER: /* IDENTIFIER */ -#line 150 "bison_parser.y" +#line 154 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1945 "bison_parser.cpp" +#line 1985 "bison_parser.cpp" break; case YYSYMBOL_STRING: /* STRING */ -#line 150 "bison_parser.y" +#line 154 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1951 "bison_parser.cpp" +#line 1991 "bison_parser.cpp" break; case YYSYMBOL_FLOATVAL: /* FLOATVAL */ -#line 148 "bison_parser.y" +#line 152 "bison_parser.y" { } -#line 1957 "bison_parser.cpp" +#line 1997 "bison_parser.cpp" break; case YYSYMBOL_INTVAL: /* INTVAL */ -#line 148 "bison_parser.y" +#line 152 "bison_parser.y" { } -#line 1963 "bison_parser.cpp" +#line 2003 "bison_parser.cpp" break; case YYSYMBOL_statement_list: /* statement_list */ -#line 151 "bison_parser.y" +#line 155 "bison_parser.y" { if ((((*yyvaluep).stmt_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).stmt_vec))) { @@ -1972,23 +2012,23 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).stmt_vec)); } -#line 1976 "bison_parser.cpp" +#line 2016 "bison_parser.cpp" break; case YYSYMBOL_statement: /* statement */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 1982 "bison_parser.cpp" +#line 2022 "bison_parser.cpp" break; case YYSYMBOL_preparable_statement: /* preparable_statement */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 1988 "bison_parser.cpp" +#line 2028 "bison_parser.cpp" break; case YYSYMBOL_opt_hints: /* opt_hints */ -#line 151 "bison_parser.y" +#line 155 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -1997,11 +2037,11 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2001 "bison_parser.cpp" +#line 2041 "bison_parser.cpp" break; case YYSYMBOL_hint_list: /* hint_list */ -#line 151 "bison_parser.y" +#line 155 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2010,89 +2050,89 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2014 "bison_parser.cpp" +#line 2054 "bison_parser.cpp" break; case YYSYMBOL_hint: /* hint */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2020 "bison_parser.cpp" +#line 2060 "bison_parser.cpp" break; case YYSYMBOL_transaction_statement: /* transaction_statement */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).transaction_stmt)); } -#line 2026 "bison_parser.cpp" +#line 2066 "bison_parser.cpp" break; case YYSYMBOL_prepare_statement: /* prepare_statement */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).prep_stmt)); } -#line 2032 "bison_parser.cpp" +#line 2072 "bison_parser.cpp" break; case YYSYMBOL_prepare_target_query: /* prepare_target_query */ -#line 150 "bison_parser.y" +#line 154 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2038 "bison_parser.cpp" +#line 2078 "bison_parser.cpp" break; case YYSYMBOL_execute_statement: /* execute_statement */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).exec_stmt)); } -#line 2044 "bison_parser.cpp" +#line 2084 "bison_parser.cpp" break; case YYSYMBOL_import_statement: /* import_statement */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).import_stmt)); } -#line 2050 "bison_parser.cpp" +#line 2090 "bison_parser.cpp" break; case YYSYMBOL_file_type: /* file_type */ -#line 148 "bison_parser.y" +#line 152 "bison_parser.y" { } -#line 2056 "bison_parser.cpp" +#line 2096 "bison_parser.cpp" break; case YYSYMBOL_file_path: /* file_path */ -#line 150 "bison_parser.y" +#line 154 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2062 "bison_parser.cpp" +#line 2102 "bison_parser.cpp" break; case YYSYMBOL_opt_file_type: /* opt_file_type */ -#line 148 "bison_parser.y" +#line 152 "bison_parser.y" { } -#line 2068 "bison_parser.cpp" +#line 2108 "bison_parser.cpp" break; case YYSYMBOL_export_statement: /* export_statement */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).export_stmt)); } -#line 2074 "bison_parser.cpp" +#line 2114 "bison_parser.cpp" break; case YYSYMBOL_show_statement: /* show_statement */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).show_stmt)); } -#line 2080 "bison_parser.cpp" +#line 2120 "bison_parser.cpp" break; case YYSYMBOL_create_statement: /* create_statement */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).create_stmt)); } -#line 2086 "bison_parser.cpp" +#line 2126 "bison_parser.cpp" break; case YYSYMBOL_opt_not_exists: /* opt_not_exists */ -#line 148 "bison_parser.y" +#line 152 "bison_parser.y" { } -#line 2092 "bison_parser.cpp" +#line 2132 "bison_parser.cpp" break; case YYSYMBOL_column_def_commalist: /* column_def_commalist */ -#line 151 "bison_parser.y" +#line 155 "bison_parser.y" { if ((((*yyvaluep).column_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).column_vec))) { @@ -2101,65 +2141,89 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).column_vec)); } -#line 2105 "bison_parser.cpp" +#line 2145 "bison_parser.cpp" break; case YYSYMBOL_column_def: /* column_def */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).column_t)); } -#line 2111 "bison_parser.cpp" +#line 2151 "bison_parser.cpp" break; case YYSYMBOL_column_type: /* column_type */ -#line 148 "bison_parser.y" +#line 152 "bison_parser.y" { } -#line 2117 "bison_parser.cpp" +#line 2157 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_decimal_specification: /* opt_decimal_specification */ +#line 152 "bison_parser.y" + { } +#line 2163 "bison_parser.cpp" break; case YYSYMBOL_opt_column_nullable: /* opt_column_nullable */ -#line 148 "bison_parser.y" +#line 152 "bison_parser.y" + { } +#line 2169 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_column_constraint: /* opt_column_constraint */ +#line 152 "bison_parser.y" { } -#line 2123 "bison_parser.cpp" +#line 2175 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_table_key_constraints: /* opt_table_key_constraints */ +#line 163 "bison_parser.y" + { delete (((*yyvaluep).table_key_constraint_vec)); } +#line 2181 "bison_parser.cpp" + break; + + case YYSYMBOL_table_key_constraint: /* table_key_constraint */ +#line 163 "bison_parser.y" + { delete (((*yyvaluep).table_key_constraint_t)); } +#line 2187 "bison_parser.cpp" break; case YYSYMBOL_drop_statement: /* drop_statement */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).drop_stmt)); } -#line 2129 "bison_parser.cpp" +#line 2193 "bison_parser.cpp" break; case YYSYMBOL_opt_exists: /* opt_exists */ -#line 148 "bison_parser.y" +#line 152 "bison_parser.y" { } -#line 2135 "bison_parser.cpp" +#line 2199 "bison_parser.cpp" break; case YYSYMBOL_alter_statement: /* alter_statement */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).alter_stmt)); } -#line 2141 "bison_parser.cpp" +#line 2205 "bison_parser.cpp" break; case YYSYMBOL_delete_statement: /* delete_statement */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2147 "bison_parser.cpp" +#line 2211 "bison_parser.cpp" break; case YYSYMBOL_truncate_statement: /* truncate_statement */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2153 "bison_parser.cpp" +#line 2217 "bison_parser.cpp" break; case YYSYMBOL_insert_statement: /* insert_statement */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).insert_stmt)); } -#line 2159 "bison_parser.cpp" +#line 2223 "bison_parser.cpp" break; case YYSYMBOL_opt_column_list: /* opt_column_list */ -#line 151 "bison_parser.y" +#line 155 "bison_parser.y" { if ((((*yyvaluep).str_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).str_vec))) { @@ -2168,17 +2232,17 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2172 "bison_parser.cpp" +#line 2236 "bison_parser.cpp" break; case YYSYMBOL_update_statement: /* update_statement */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).update_stmt)); } -#line 2178 "bison_parser.cpp" +#line 2242 "bison_parser.cpp" break; case YYSYMBOL_update_clause_commalist: /* update_clause_commalist */ -#line 151 "bison_parser.y" +#line 155 "bison_parser.y" { if ((((*yyvaluep).update_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).update_vec))) { @@ -2187,77 +2251,77 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).update_vec)); } -#line 2191 "bison_parser.cpp" +#line 2255 "bison_parser.cpp" break; case YYSYMBOL_update_clause: /* update_clause */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).update_t)); } -#line 2197 "bison_parser.cpp" +#line 2261 "bison_parser.cpp" break; case YYSYMBOL_select_statement: /* select_statement */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2203 "bison_parser.cpp" +#line 2267 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation: /* select_within_set_operation */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2209 "bison_parser.cpp" +#line 2273 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation_no_parentheses: /* select_within_set_operation_no_parentheses */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2215 "bison_parser.cpp" +#line 2279 "bison_parser.cpp" break; case YYSYMBOL_select_with_paren: /* select_with_paren */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2221 "bison_parser.cpp" +#line 2285 "bison_parser.cpp" break; case YYSYMBOL_select_no_paren: /* select_no_paren */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2227 "bison_parser.cpp" +#line 2291 "bison_parser.cpp" break; case YYSYMBOL_set_operator: /* set_operator */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2233 "bison_parser.cpp" +#line 2297 "bison_parser.cpp" break; case YYSYMBOL_set_type: /* set_type */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2239 "bison_parser.cpp" +#line 2303 "bison_parser.cpp" break; case YYSYMBOL_opt_all: /* opt_all */ -#line 148 "bison_parser.y" +#line 152 "bison_parser.y" { } -#line 2245 "bison_parser.cpp" +#line 2309 "bison_parser.cpp" break; case YYSYMBOL_select_clause: /* select_clause */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2251 "bison_parser.cpp" +#line 2315 "bison_parser.cpp" break; case YYSYMBOL_opt_distinct: /* opt_distinct */ -#line 148 "bison_parser.y" +#line 152 "bison_parser.y" { } -#line 2257 "bison_parser.cpp" +#line 2321 "bison_parser.cpp" break; case YYSYMBOL_select_list: /* select_list */ -#line 151 "bison_parser.y" +#line 155 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2266,41 +2330,41 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2270 "bison_parser.cpp" +#line 2334 "bison_parser.cpp" break; case YYSYMBOL_opt_from_clause: /* opt_from_clause */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2276 "bison_parser.cpp" +#line 2340 "bison_parser.cpp" break; case YYSYMBOL_from_clause: /* from_clause */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2282 "bison_parser.cpp" +#line 2346 "bison_parser.cpp" break; case YYSYMBOL_opt_where: /* opt_where */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2288 "bison_parser.cpp" +#line 2352 "bison_parser.cpp" break; case YYSYMBOL_opt_group: /* opt_group */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).group_t)); } -#line 2294 "bison_parser.cpp" +#line 2358 "bison_parser.cpp" break; case YYSYMBOL_opt_having: /* opt_having */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2300 "bison_parser.cpp" +#line 2364 "bison_parser.cpp" break; case YYSYMBOL_opt_order: /* opt_order */ -#line 151 "bison_parser.y" +#line 155 "bison_parser.y" { if ((((*yyvaluep).order_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).order_vec))) { @@ -2309,11 +2373,11 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2313 "bison_parser.cpp" +#line 2377 "bison_parser.cpp" break; case YYSYMBOL_order_list: /* order_list */ -#line 151 "bison_parser.y" +#line 155 "bison_parser.y" { if ((((*yyvaluep).order_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).order_vec))) { @@ -2322,35 +2386,35 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2326 "bison_parser.cpp" +#line 2390 "bison_parser.cpp" break; case YYSYMBOL_order_desc: /* order_desc */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).order)); } -#line 2332 "bison_parser.cpp" +#line 2396 "bison_parser.cpp" break; case YYSYMBOL_opt_order_type: /* opt_order_type */ -#line 148 "bison_parser.y" +#line 152 "bison_parser.y" { } -#line 2338 "bison_parser.cpp" +#line 2402 "bison_parser.cpp" break; case YYSYMBOL_opt_top: /* opt_top */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2344 "bison_parser.cpp" +#line 2408 "bison_parser.cpp" break; case YYSYMBOL_opt_limit: /* opt_limit */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2350 "bison_parser.cpp" +#line 2414 "bison_parser.cpp" break; case YYSYMBOL_expr_list: /* expr_list */ -#line 151 "bison_parser.y" +#line 155 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2359,11 +2423,11 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2363 "bison_parser.cpp" +#line 2427 "bison_parser.cpp" break; case YYSYMBOL_opt_literal_list: /* opt_literal_list */ -#line 151 "bison_parser.y" +#line 155 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2372,11 +2436,11 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2376 "bison_parser.cpp" +#line 2440 "bison_parser.cpp" break; case YYSYMBOL_literal_list: /* literal_list */ -#line 151 "bison_parser.y" +#line 155 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2385,191 +2449,191 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2389 "bison_parser.cpp" +#line 2453 "bison_parser.cpp" break; case YYSYMBOL_expr_alias: /* expr_alias */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2395 "bison_parser.cpp" +#line 2459 "bison_parser.cpp" break; case YYSYMBOL_expr: /* expr */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2401 "bison_parser.cpp" +#line 2465 "bison_parser.cpp" break; case YYSYMBOL_operand: /* operand */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2407 "bison_parser.cpp" +#line 2471 "bison_parser.cpp" break; case YYSYMBOL_scalar_expr: /* scalar_expr */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2413 "bison_parser.cpp" +#line 2477 "bison_parser.cpp" break; case YYSYMBOL_unary_expr: /* unary_expr */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2419 "bison_parser.cpp" +#line 2483 "bison_parser.cpp" break; case YYSYMBOL_binary_expr: /* binary_expr */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2425 "bison_parser.cpp" +#line 2489 "bison_parser.cpp" break; case YYSYMBOL_logic_expr: /* logic_expr */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2431 "bison_parser.cpp" +#line 2495 "bison_parser.cpp" break; case YYSYMBOL_in_expr: /* in_expr */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2437 "bison_parser.cpp" +#line 2501 "bison_parser.cpp" break; case YYSYMBOL_case_expr: /* case_expr */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2443 "bison_parser.cpp" +#line 2507 "bison_parser.cpp" break; case YYSYMBOL_case_list: /* case_list */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2449 "bison_parser.cpp" +#line 2513 "bison_parser.cpp" break; case YYSYMBOL_exists_expr: /* exists_expr */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2455 "bison_parser.cpp" +#line 2519 "bison_parser.cpp" break; case YYSYMBOL_comp_expr: /* comp_expr */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2461 "bison_parser.cpp" +#line 2525 "bison_parser.cpp" break; case YYSYMBOL_function_expr: /* function_expr */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2467 "bison_parser.cpp" +#line 2531 "bison_parser.cpp" break; case YYSYMBOL_extract_expr: /* extract_expr */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2473 "bison_parser.cpp" +#line 2537 "bison_parser.cpp" break; case YYSYMBOL_cast_expr: /* cast_expr */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2479 "bison_parser.cpp" +#line 2543 "bison_parser.cpp" break; case YYSYMBOL_datetime_field: /* datetime_field */ -#line 148 "bison_parser.y" +#line 152 "bison_parser.y" { } -#line 2485 "bison_parser.cpp" +#line 2549 "bison_parser.cpp" break; case YYSYMBOL_array_expr: /* array_expr */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2491 "bison_parser.cpp" +#line 2555 "bison_parser.cpp" break; case YYSYMBOL_array_index: /* array_index */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2497 "bison_parser.cpp" +#line 2561 "bison_parser.cpp" break; case YYSYMBOL_between_expr: /* between_expr */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2503 "bison_parser.cpp" +#line 2567 "bison_parser.cpp" break; case YYSYMBOL_column_name: /* column_name */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2509 "bison_parser.cpp" +#line 2573 "bison_parser.cpp" break; case YYSYMBOL_literal: /* literal */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2515 "bison_parser.cpp" +#line 2579 "bison_parser.cpp" break; case YYSYMBOL_string_literal: /* string_literal */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2521 "bison_parser.cpp" +#line 2585 "bison_parser.cpp" break; case YYSYMBOL_bool_literal: /* bool_literal */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2527 "bison_parser.cpp" +#line 2591 "bison_parser.cpp" break; case YYSYMBOL_num_literal: /* num_literal */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2533 "bison_parser.cpp" +#line 2597 "bison_parser.cpp" break; case YYSYMBOL_int_literal: /* int_literal */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2539 "bison_parser.cpp" +#line 2603 "bison_parser.cpp" break; case YYSYMBOL_null_literal: /* null_literal */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2545 "bison_parser.cpp" +#line 2609 "bison_parser.cpp" break; case YYSYMBOL_param_expr: /* param_expr */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2551 "bison_parser.cpp" +#line 2615 "bison_parser.cpp" break; case YYSYMBOL_table_ref: /* table_ref */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2557 "bison_parser.cpp" +#line 2621 "bison_parser.cpp" break; case YYSYMBOL_table_ref_atomic: /* table_ref_atomic */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2563 "bison_parser.cpp" +#line 2627 "bison_parser.cpp" break; case YYSYMBOL_nonjoin_table_ref_atomic: /* nonjoin_table_ref_atomic */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2569 "bison_parser.cpp" +#line 2633 "bison_parser.cpp" break; case YYSYMBOL_table_ref_commalist: /* table_ref_commalist */ -#line 151 "bison_parser.y" +#line 155 "bison_parser.y" { if ((((*yyvaluep).table_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).table_vec))) { @@ -2578,107 +2642,107 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).table_vec)); } -#line 2582 "bison_parser.cpp" +#line 2646 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name: /* table_ref_name */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2588 "bison_parser.cpp" +#line 2652 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name_no_alias: /* table_ref_name_no_alias */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2594 "bison_parser.cpp" +#line 2658 "bison_parser.cpp" break; case YYSYMBOL_table_name: /* table_name */ -#line 149 "bison_parser.y" +#line 153 "bison_parser.y" { free( (((*yyvaluep).table_name).name) ); free( (((*yyvaluep).table_name).schema) ); } -#line 2600 "bison_parser.cpp" +#line 2664 "bison_parser.cpp" break; case YYSYMBOL_opt_index_name: /* opt_index_name */ -#line 150 "bison_parser.y" +#line 154 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2606 "bison_parser.cpp" +#line 2670 "bison_parser.cpp" break; case YYSYMBOL_index_name: /* index_name */ -#line 150 "bison_parser.y" +#line 154 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2612 "bison_parser.cpp" +#line 2676 "bison_parser.cpp" break; case YYSYMBOL_table_alias: /* table_alias */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2618 "bison_parser.cpp" +#line 2682 "bison_parser.cpp" break; case YYSYMBOL_opt_table_alias: /* opt_table_alias */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2624 "bison_parser.cpp" +#line 2688 "bison_parser.cpp" break; case YYSYMBOL_alias: /* alias */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2630 "bison_parser.cpp" +#line 2694 "bison_parser.cpp" break; case YYSYMBOL_opt_alias: /* opt_alias */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2636 "bison_parser.cpp" +#line 2700 "bison_parser.cpp" break; case YYSYMBOL_opt_with_clause: /* opt_with_clause */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2642 "bison_parser.cpp" +#line 2706 "bison_parser.cpp" break; case YYSYMBOL_with_clause: /* with_clause */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2648 "bison_parser.cpp" +#line 2712 "bison_parser.cpp" break; case YYSYMBOL_with_description_list: /* with_description_list */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2654 "bison_parser.cpp" +#line 2718 "bison_parser.cpp" break; case YYSYMBOL_with_description: /* with_description */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).with_description_t)); } -#line 2660 "bison_parser.cpp" +#line 2724 "bison_parser.cpp" break; case YYSYMBOL_join_clause: /* join_clause */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2666 "bison_parser.cpp" +#line 2730 "bison_parser.cpp" break; case YYSYMBOL_opt_join_type: /* opt_join_type */ -#line 148 "bison_parser.y" +#line 152 "bison_parser.y" { } -#line 2672 "bison_parser.cpp" +#line 2736 "bison_parser.cpp" break; case YYSYMBOL_join_condition: /* join_condition */ -#line 159 "bison_parser.y" +#line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2678 "bison_parser.cpp" +#line 2742 "bison_parser.cpp" break; case YYSYMBOL_ident_commalist: /* ident_commalist */ -#line 151 "bison_parser.y" +#line 155 "bison_parser.y" { if ((((*yyvaluep).str_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).str_vec))) { @@ -2687,7 +2751,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2691 "bison_parser.cpp" +#line 2755 "bison_parser.cpp" break; default: @@ -2794,7 +2858,7 @@ YYLTYPE yylloc = yyloc_default; yylloc.string_length = 0; } -#line 2798 "bison_parser.cpp" +#line 2862 "bison_parser.cpp" yylsp[0] = yylloc; goto yysetstate; @@ -3004,7 +3068,7 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* input: statement_list opt_semicolon */ -#line 273 "bison_parser.y" +#line 281 "bison_parser.y" { for (SQLStatement* stmt : *(yyvsp[-1].stmt_vec)) { // Transfers ownership of the statement. @@ -3022,253 +3086,253 @@ YYLTYPE yylloc = yyloc_default; } delete (yyvsp[-1].stmt_vec); } -#line 3026 "bison_parser.cpp" +#line 3090 "bison_parser.cpp" break; case 3: /* statement_list: statement */ -#line 294 "bison_parser.y" +#line 302 "bison_parser.y" { (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 3037 "bison_parser.cpp" +#line 3101 "bison_parser.cpp" break; case 4: /* statement_list: statement_list ';' statement */ -#line 300 "bison_parser.y" +#line 308 "bison_parser.y" { (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 3048 "bison_parser.cpp" +#line 3112 "bison_parser.cpp" break; case 5: /* statement: prepare_statement opt_hints */ -#line 309 "bison_parser.y" +#line 317 "bison_parser.y" { (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3057 "bison_parser.cpp" +#line 3121 "bison_parser.cpp" break; case 6: /* statement: preparable_statement opt_hints */ -#line 313 "bison_parser.y" +#line 321 "bison_parser.y" { (yyval.statement) = (yyvsp[-1].statement); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3066 "bison_parser.cpp" +#line 3130 "bison_parser.cpp" break; case 7: /* statement: show_statement */ -#line 317 "bison_parser.y" +#line 325 "bison_parser.y" { (yyval.statement) = (yyvsp[0].show_stmt); } -#line 3074 "bison_parser.cpp" +#line 3138 "bison_parser.cpp" break; case 8: /* statement: import_statement */ -#line 320 "bison_parser.y" +#line 328 "bison_parser.y" { (yyval.statement) = (yyvsp[0].import_stmt); } -#line 3082 "bison_parser.cpp" +#line 3146 "bison_parser.cpp" break; case 9: /* statement: export_statement */ -#line 323 "bison_parser.y" +#line 331 "bison_parser.y" { (yyval.statement) = (yyvsp[0].export_stmt); } -#line 3090 "bison_parser.cpp" +#line 3154 "bison_parser.cpp" break; case 10: /* preparable_statement: select_statement */ -#line 330 "bison_parser.y" +#line 338 "bison_parser.y" { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 3096 "bison_parser.cpp" +#line 3160 "bison_parser.cpp" break; case 11: /* preparable_statement: create_statement */ -#line 331 "bison_parser.y" +#line 339 "bison_parser.y" { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 3102 "bison_parser.cpp" +#line 3166 "bison_parser.cpp" break; case 12: /* preparable_statement: insert_statement */ -#line 332 "bison_parser.y" +#line 340 "bison_parser.y" { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 3108 "bison_parser.cpp" +#line 3172 "bison_parser.cpp" break; case 13: /* preparable_statement: delete_statement */ -#line 333 "bison_parser.y" +#line 341 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3114 "bison_parser.cpp" +#line 3178 "bison_parser.cpp" break; case 14: /* preparable_statement: truncate_statement */ -#line 334 "bison_parser.y" +#line 342 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3120 "bison_parser.cpp" +#line 3184 "bison_parser.cpp" break; case 15: /* preparable_statement: update_statement */ -#line 335 "bison_parser.y" +#line 343 "bison_parser.y" { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 3126 "bison_parser.cpp" +#line 3190 "bison_parser.cpp" break; case 16: /* preparable_statement: drop_statement */ -#line 336 "bison_parser.y" +#line 344 "bison_parser.y" { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 3132 "bison_parser.cpp" +#line 3196 "bison_parser.cpp" break; case 17: /* preparable_statement: alter_statement */ -#line 337 "bison_parser.y" +#line 345 "bison_parser.y" { (yyval.statement) = (yyvsp[0].alter_stmt); } -#line 3138 "bison_parser.cpp" +#line 3202 "bison_parser.cpp" break; case 18: /* preparable_statement: execute_statement */ -#line 338 "bison_parser.y" +#line 346 "bison_parser.y" { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 3144 "bison_parser.cpp" +#line 3208 "bison_parser.cpp" break; case 19: /* preparable_statement: transaction_statement */ -#line 339 "bison_parser.y" +#line 347 "bison_parser.y" { (yyval.statement) = (yyvsp[0].transaction_stmt); } -#line 3150 "bison_parser.cpp" +#line 3214 "bison_parser.cpp" break; case 20: /* opt_hints: WITH HINT '(' hint_list ')' */ -#line 348 "bison_parser.y" +#line 356 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 3156 "bison_parser.cpp" +#line 3220 "bison_parser.cpp" break; case 21: /* opt_hints: %empty */ -#line 349 "bison_parser.y" +#line 357 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 3162 "bison_parser.cpp" +#line 3226 "bison_parser.cpp" break; case 22: /* hint_list: hint */ -#line 354 "bison_parser.y" +#line 362 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3168 "bison_parser.cpp" +#line 3232 "bison_parser.cpp" break; case 23: /* hint_list: hint_list ',' hint */ -#line 355 "bison_parser.y" +#line 363 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3174 "bison_parser.cpp" +#line 3238 "bison_parser.cpp" break; case 24: /* hint: IDENTIFIER */ -#line 359 "bison_parser.y" +#line 367 "bison_parser.y" { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[0].sval); } -#line 3183 "bison_parser.cpp" +#line 3247 "bison_parser.cpp" break; case 25: /* hint: IDENTIFIER '(' literal_list ')' */ -#line 363 "bison_parser.y" +#line 371 "bison_parser.y" { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[-3].sval); (yyval.expr)->exprList = (yyvsp[-1].expr_vec); } -#line 3193 "bison_parser.cpp" +#line 3257 "bison_parser.cpp" break; case 26: /* transaction_statement: BEGIN opt_transaction_keyword */ -#line 375 "bison_parser.y" +#line 383 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kBeginTransaction); } -#line 3201 "bison_parser.cpp" +#line 3265 "bison_parser.cpp" break; case 27: /* transaction_statement: ROLLBACK opt_transaction_keyword */ -#line 378 "bison_parser.y" +#line 386 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kRollbackTransaction); } -#line 3209 "bison_parser.cpp" +#line 3273 "bison_parser.cpp" break; case 28: /* transaction_statement: COMMIT opt_transaction_keyword */ -#line 381 "bison_parser.y" +#line 389 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kCommitTransaction); } -#line 3217 "bison_parser.cpp" +#line 3281 "bison_parser.cpp" break; case 31: /* prepare_statement: PREPARE IDENTIFIER FROM prepare_target_query */ -#line 395 "bison_parser.y" +#line 403 "bison_parser.y" { (yyval.prep_stmt) = new PrepareStatement(); (yyval.prep_stmt)->name = (yyvsp[-2].sval); (yyval.prep_stmt)->query = (yyvsp[0].sval); } -#line 3227 "bison_parser.cpp" +#line 3291 "bison_parser.cpp" break; case 33: /* execute_statement: EXECUTE IDENTIFIER */ -#line 405 "bison_parser.y" +#line 413 "bison_parser.y" { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[0].sval); } -#line 3236 "bison_parser.cpp" +#line 3300 "bison_parser.cpp" break; case 34: /* execute_statement: EXECUTE IDENTIFIER '(' opt_literal_list ')' */ -#line 409 "bison_parser.y" +#line 417 "bison_parser.y" { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[-3].sval); (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); } -#line 3246 "bison_parser.cpp" +#line 3310 "bison_parser.cpp" break; case 35: /* import_statement: IMPORT FROM file_type FILE file_path INTO table_name */ -#line 423 "bison_parser.y" +#line 431 "bison_parser.y" { (yyval.import_stmt) = new ImportStatement((yyvsp[-4].import_type_t)); (yyval.import_stmt)->filePath = (yyvsp[-2].sval); (yyval.import_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3257 "bison_parser.cpp" +#line 3321 "bison_parser.cpp" break; case 36: /* import_statement: COPY table_name FROM file_path opt_file_type */ -#line 429 "bison_parser.y" +#line 437 "bison_parser.y" { (yyval.import_stmt) = new ImportStatement((yyvsp[0].import_type_t)); (yyval.import_stmt)->filePath = (yyvsp[-1].sval); (yyval.import_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3268 "bison_parser.cpp" +#line 3332 "bison_parser.cpp" break; case 37: /* file_type: IDENTIFIER */ -#line 438 "bison_parser.y" +#line 446 "bison_parser.y" { if (strcasecmp((yyvsp[0].sval), "csv") == 0) { (yyval.import_type_t) = kImportCSV; @@ -3283,70 +3347,70 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[0].sval)); } -#line 3287 "bison_parser.cpp" +#line 3351 "bison_parser.cpp" break; case 38: /* file_path: string_literal */ -#line 455 "bison_parser.y" +#line 463 "bison_parser.y" { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 3293 "bison_parser.cpp" +#line 3357 "bison_parser.cpp" break; case 39: /* opt_file_type: WITH FORMAT file_type */ -#line 459 "bison_parser.y" +#line 467 "bison_parser.y" { (yyval.import_type_t) = (yyvsp[0].import_type_t); } -#line 3301 "bison_parser.cpp" +#line 3365 "bison_parser.cpp" break; case 40: /* opt_file_type: %empty */ -#line 462 "bison_parser.y" +#line 470 "bison_parser.y" { (yyval.import_type_t) = kImportAuto; } -#line 3307 "bison_parser.cpp" +#line 3371 "bison_parser.cpp" break; case 41: /* export_statement: COPY table_name TO file_path opt_file_type */ -#line 471 "bison_parser.y" +#line 479 "bison_parser.y" { (yyval.export_stmt) = new ExportStatement((yyvsp[0].import_type_t)); (yyval.export_stmt)->filePath = (yyvsp[-1].sval); (yyval.export_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.export_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3318 "bison_parser.cpp" +#line 3382 "bison_parser.cpp" break; case 42: /* show_statement: SHOW TABLES */ -#line 485 "bison_parser.y" +#line 493 "bison_parser.y" { (yyval.show_stmt) = new ShowStatement(kShowTables); } -#line 3326 "bison_parser.cpp" +#line 3390 "bison_parser.cpp" break; case 43: /* show_statement: SHOW COLUMNS table_name */ -#line 488 "bison_parser.y" +#line 496 "bison_parser.y" { (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 3336 "bison_parser.cpp" +#line 3400 "bison_parser.cpp" break; case 44: /* show_statement: DESCRIBE table_name */ -#line 493 "bison_parser.y" +#line 501 "bison_parser.y" { (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 3346 "bison_parser.cpp" +#line 3410 "bison_parser.cpp" break; case 45: /* create_statement: CREATE TABLE opt_not_exists table_name FROM IDENTIFIER FILE file_path */ -#line 507 "bison_parser.y" +#line 515 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTableFromTbl); (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); @@ -3360,23 +3424,24 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].sval)); (yyval.create_stmt)->filePath = (yyvsp[0].sval); } -#line 3364 "bison_parser.cpp" +#line 3428 "bison_parser.cpp" break; - case 46: /* create_statement: CREATE TABLE opt_not_exists table_name '(' column_def_commalist ')' */ -#line 520 "bison_parser.y" - { + case 46: /* create_statement: CREATE TABLE opt_not_exists table_name '(' column_def_commalist opt_table_key_constraints ')' */ +#line 528 "bison_parser.y" + { (yyval.create_stmt) = new CreateStatement(kCreateTable); - (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); - (yyval.create_stmt)->schema = (yyvsp[-3].table_name).schema; - (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; - (yyval.create_stmt)->columns = (yyvsp[-1].column_vec); + (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); + (yyval.create_stmt)->schema = (yyvsp[-4].table_name).schema; + (yyval.create_stmt)->tableName = (yyvsp[-4].table_name).name; + (yyval.create_stmt)->columns = (yyvsp[-2].column_vec); + (yyval.create_stmt)->tableKeyConstraints = (yyvsp[-1].table_key_constraint_vec); } -#line 3376 "bison_parser.cpp" +#line 3441 "bison_parser.cpp" break; case 47: /* create_statement: CREATE TABLE opt_not_exists table_name AS select_statement */ -#line 527 "bison_parser.y" +#line 536 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-3].bval); @@ -3384,23 +3449,23 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-2].table_name).name; (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3388 "bison_parser.cpp" +#line 3453 "bison_parser.cpp" break; - case 48: /* create_statement: CREATE INDEX opt_index_name opt_not_exists ON table_name '(' ident_commalist ')' */ -#line 534 "bison_parser.y" + case 48: /* create_statement: CREATE INDEX opt_not_exists opt_index_name ON table_name '(' ident_commalist ')' */ +#line 543 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateIndex); - (yyval.create_stmt)->indexName = (yyvsp[-6].sval); - (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); + (yyval.create_stmt)->indexName = (yyvsp[-5].sval); + (yyval.create_stmt)->ifNotExists = (yyvsp[-6].bval); (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->indexColumns = (yyvsp[-1].str_vec); } -#line 3400 "bison_parser.cpp" +#line 3465 "bison_parser.cpp" break; case 49: /* create_statement: CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement */ -#line 541 "bison_parser.y" +#line 550 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateView); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -3409,199 +3474,266 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3413 "bison_parser.cpp" +#line 3478 "bison_parser.cpp" break; case 50: /* opt_not_exists: IF NOT EXISTS */ -#line 552 "bison_parser.y" +#line 561 "bison_parser.y" { (yyval.bval) = true; } -#line 3419 "bison_parser.cpp" +#line 3484 "bison_parser.cpp" break; case 51: /* opt_not_exists: %empty */ -#line 553 "bison_parser.y" +#line 562 "bison_parser.y" { (yyval.bval) = false; } -#line 3425 "bison_parser.cpp" +#line 3490 "bison_parser.cpp" break; case 52: /* column_def_commalist: column_def */ -#line 557 "bison_parser.y" +#line 566 "bison_parser.y" { (yyval.column_vec) = new std::vector(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); } -#line 3431 "bison_parser.cpp" +#line 3496 "bison_parser.cpp" break; case 53: /* column_def_commalist: column_def_commalist ',' column_def */ -#line 558 "bison_parser.y" +#line 567 "bison_parser.y" { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } -#line 3437 "bison_parser.cpp" +#line 3502 "bison_parser.cpp" break; - case 54: /* column_def: IDENTIFIER column_type opt_column_nullable */ -#line 562 "bison_parser.y" - { - (yyval.column_t) = new ColumnDefinition((yyvsp[-2].sval), (yyvsp[-1].column_type_t), (yyvsp[0].bval)); + case 54: /* column_def: IDENTIFIER column_type opt_column_nullable opt_column_constraint */ +#line 571 "bison_parser.y" + { + (yyval.column_t) = new ColumnDefinition((yyvsp[-3].sval), (yyvsp[-2].column_type_t), (yyvsp[-1].bval), (yyvsp[0].column_constraint_t)); } -#line 3445 "bison_parser.cpp" +#line 3510 "bison_parser.cpp" break; case 55: /* column_type: INT */ -#line 568 "bison_parser.y" +#line 577 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3451 "bison_parser.cpp" +#line 3516 "bison_parser.cpp" break; case 56: /* column_type: INTEGER */ -#line 569 "bison_parser.y" +#line 578 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3457 "bison_parser.cpp" +#line 3522 "bison_parser.cpp" break; case 57: /* column_type: LONG */ -#line 570 "bison_parser.y" +#line 579 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::LONG}; } -#line 3463 "bison_parser.cpp" +#line 3528 "bison_parser.cpp" break; case 58: /* column_type: FLOAT */ -#line 571 "bison_parser.y" +#line 580 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3469 "bison_parser.cpp" +#line 3534 "bison_parser.cpp" break; - case 59: /* column_type: DECIMAL '(' INTVAL ',' INTVAL ')' */ -#line 572 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::DECIMAL}; } -#line 3475 "bison_parser.cpp" + case 59: /* column_type: DECIMAL opt_decimal_specification */ +#line 581 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::DECIMAL, 0, (yyvsp[0].decimal_specification_t)}; } +#line 3540 "bison_parser.cpp" break; case 60: /* column_type: DOUBLE */ -#line 573 "bison_parser.y" +#line 582 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } -#line 3481 "bison_parser.cpp" +#line 3546 "bison_parser.cpp" break; case 61: /* column_type: REAL */ -#line 574 "bison_parser.y" +#line 583 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::REAL}; } -#line 3487 "bison_parser.cpp" +#line 3552 "bison_parser.cpp" break; case 62: /* column_type: VARCHAR '(' INTVAL ')' */ -#line 575 "bison_parser.y" +#line 584 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3493 "bison_parser.cpp" +#line 3558 "bison_parser.cpp" break; case 63: /* column_type: CHARACTER VARYING '(' INTVAL ')' */ -#line 576 "bison_parser.y" +#line 585 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR_VARYING, (yyvsp[-1].ival)}; } -#line 3499 "bison_parser.cpp" +#line 3564 "bison_parser.cpp" break; case 64: /* column_type: CHAR '(' INTVAL ')' */ -#line 577 "bison_parser.y" +#line 586 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } -#line 3505 "bison_parser.cpp" +#line 3570 "bison_parser.cpp" break; case 65: /* column_type: TEXT */ -#line 578 "bison_parser.y" +#line 587 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } -#line 3511 "bison_parser.cpp" +#line 3576 "bison_parser.cpp" break; case 66: /* column_type: TIME */ -#line 579 "bison_parser.y" +#line 588 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TIME}; } -#line 3517 "bison_parser.cpp" +#line 3582 "bison_parser.cpp" break; case 67: /* column_type: DATETIME */ -#line 580 "bison_parser.y" +#line 589 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } -#line 3523 "bison_parser.cpp" +#line 3588 "bison_parser.cpp" break; case 68: /* column_type: DATE */ -#line 581 "bison_parser.y" +#line 590 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATE}; } -#line 3529 "bison_parser.cpp" +#line 3594 "bison_parser.cpp" break; - case 69: /* opt_column_nullable: NULL */ -#line 585 "bison_parser.y" + case 69: /* opt_decimal_specification: '(' INTVAL ',' INTVAL ')' */ +#line 594 "bison_parser.y" + { (yyval.decimal_specification_t) = DecimalSpecification{(yyvsp[-3].ival), (yyvsp[-1].ival)}; } +#line 3600 "bison_parser.cpp" + break; + + case 70: /* opt_decimal_specification: '(' INTVAL ')' */ +#line 595 "bison_parser.y" + { (yyval.decimal_specification_t) = DecimalSpecification{(yyvsp[-1].ival), 0}; } +#line 3606 "bison_parser.cpp" + break; + + case 71: /* opt_decimal_specification: %empty */ +#line 596 "bison_parser.y" + { (yyval.decimal_specification_t) = DecimalSpecification{0, 0}; } +#line 3612 "bison_parser.cpp" + break; + + case 72: /* opt_column_nullable: NULL */ +#line 599 "bison_parser.y" { (yyval.bval) = true; } -#line 3535 "bison_parser.cpp" +#line 3618 "bison_parser.cpp" break; - case 70: /* opt_column_nullable: NOT NULL */ -#line 586 "bison_parser.y" + case 73: /* opt_column_nullable: NOT NULL */ +#line 600 "bison_parser.y" { (yyval.bval) = false; } -#line 3541 "bison_parser.cpp" +#line 3624 "bison_parser.cpp" break; - case 71: /* opt_column_nullable: %empty */ -#line 587 "bison_parser.y" + case 74: /* opt_column_nullable: %empty */ +#line 601 "bison_parser.y" { (yyval.bval) = false; } -#line 3547 "bison_parser.cpp" +#line 3630 "bison_parser.cpp" + break; + + case 75: /* opt_column_constraint: PRIMARY KEY */ +#line 605 "bison_parser.y" + { (yyval.column_constraint_t) = ConstraintType::PRIMARY_KEY; } +#line 3636 "bison_parser.cpp" + break; + + case 76: /* opt_column_constraint: UNIQUE */ +#line 606 "bison_parser.y" + { (yyval.column_constraint_t) = ConstraintType::UNIQUE; } +#line 3642 "bison_parser.cpp" + break; + + case 77: /* opt_column_constraint: %empty */ +#line 607 "bison_parser.y" + { (yyval.column_constraint_t) = ConstraintType::NOT_SET; } +#line 3648 "bison_parser.cpp" + break; + + case 78: /* opt_table_key_constraints: table_key_constraint */ +#line 611 "bison_parser.y" + {(yyval.table_key_constraint_vec) = new std::vector(); (yyval.table_key_constraint_vec)->push_back((yyvsp[0].table_key_constraint_t)); } +#line 3654 "bison_parser.cpp" + break; + + case 79: /* opt_table_key_constraints: opt_table_key_constraints table_key_constraint */ +#line 612 "bison_parser.y" + { (yyvsp[-1].table_key_constraint_vec)->push_back((yyvsp[0].table_key_constraint_t)); (yyval.table_key_constraint_vec) = (yyvsp[-1].table_key_constraint_vec); } +#line 3660 "bison_parser.cpp" + break; + + case 80: /* opt_table_key_constraints: %empty */ +#line 613 "bison_parser.y" + {(yyval.table_key_constraint_vec) = new std::vector(); } +#line 3666 "bison_parser.cpp" + break; + + case 81: /* table_key_constraint: ',' PRIMARY KEY '(' ident_commalist ')' */ +#line 617 "bison_parser.y" + { (yyval.table_key_constraint_t) = new TableKeyConstraint(ConstraintType::PRIMARY_KEY, (yyvsp[-1].str_vec)); } +#line 3672 "bison_parser.cpp" + break; + + case 82: /* table_key_constraint: ',' UNIQUE '(' ident_commalist ')' */ +#line 618 "bison_parser.y" + { (yyval.table_key_constraint_t) = new TableKeyConstraint(ConstraintType::UNIQUE, (yyvsp[-1].str_vec)); } +#line 3678 "bison_parser.cpp" break; - case 72: /* drop_statement: DROP TABLE opt_exists table_name */ -#line 597 "bison_parser.y" + case 83: /* drop_statement: DROP TABLE opt_exists table_name */ +#line 626 "bison_parser.y" { (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 3558 "bison_parser.cpp" +#line 3689 "bison_parser.cpp" break; - case 73: /* drop_statement: DROP VIEW opt_exists table_name */ -#line 603 "bison_parser.y" + case 84: /* drop_statement: DROP VIEW opt_exists table_name */ +#line 632 "bison_parser.y" { (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 3569 "bison_parser.cpp" +#line 3700 "bison_parser.cpp" break; - case 74: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ -#line 609 "bison_parser.y" + case 85: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ +#line 638 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); (yyval.drop_stmt)->ifExists = false; (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 3579 "bison_parser.cpp" +#line 3710 "bison_parser.cpp" break; - case 75: /* drop_statement: DROP INDEX index_name ON table_name */ -#line 614 "bison_parser.y" - { + case 86: /* drop_statement: DROP INDEX opt_exists index_name ON table_name */ +#line 643 "bison_parser.y" + { (yyval.drop_stmt) = new DropStatement(kDropIndex); (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; + (yyval.drop_stmt)->ifExists = (yyvsp[-3].bval); (yyval.drop_stmt)->index_name = (yyvsp[-2].sval); } -#line 3589 "bison_parser.cpp" +#line 3721 "bison_parser.cpp" break; - case 76: /* opt_exists: IF EXISTS */ -#line 622 "bison_parser.y" + case 87: /* opt_exists: IF EXISTS */ +#line 652 "bison_parser.y" { (yyval.bval) = true; } -#line 3595 "bison_parser.cpp" +#line 3727 "bison_parser.cpp" break; - case 77: /* opt_exists: %empty */ -#line 623 "bison_parser.y" + case 88: /* opt_exists: %empty */ +#line 653 "bison_parser.y" { (yyval.bval) = false; } -#line 3601 "bison_parser.cpp" +#line 3733 "bison_parser.cpp" break; - case 78: /* alter_statement: ALTER TABLE table_name DROP COLUMN opt_exists column_name */ -#line 632 "bison_parser.y" + case 89: /* alter_statement: ALTER TABLE table_name DROP COLUMN opt_exists column_name */ +#line 662 "bison_parser.y" { (yyval.alter_stmt) = new AlterStatement(kAlterDropColumn); (yyval.alter_stmt)->if_exists = (yyvsp[-1].bval); @@ -3609,32 +3741,32 @@ YYLTYPE yylloc = yyloc_default; (yyval.alter_stmt)->name = (yyvsp[-4].table_name).name; (yyval.alter_stmt)->column_name = (yyvsp[0].expr)->name; } -#line 3613 "bison_parser.cpp" +#line 3745 "bison_parser.cpp" break; - case 79: /* delete_statement: DELETE FROM table_name opt_where */ -#line 647 "bison_parser.y" + case 90: /* delete_statement: DELETE FROM table_name opt_where */ +#line 677 "bison_parser.y" { (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 3624 "bison_parser.cpp" +#line 3756 "bison_parser.cpp" break; - case 80: /* truncate_statement: TRUNCATE table_name */ -#line 656 "bison_parser.y" + case 91: /* truncate_statement: TRUNCATE table_name */ +#line 686 "bison_parser.y" { (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3634 "bison_parser.cpp" +#line 3766 "bison_parser.cpp" break; - case 81: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ -#line 669 "bison_parser.y" + case 92: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ +#line 699 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertValues); (yyval.insert_stmt)->schema = (yyvsp[-5].table_name).schema; @@ -3642,11 +3774,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } -#line 3646 "bison_parser.cpp" +#line 3778 "bison_parser.cpp" break; - case 82: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ -#line 676 "bison_parser.y" + case 93: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ +#line 706 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertSelect); (yyval.insert_stmt)->schema = (yyvsp[-2].table_name).schema; @@ -3654,74 +3786,74 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } -#line 3658 "bison_parser.cpp" +#line 3790 "bison_parser.cpp" break; - case 83: /* opt_column_list: '(' ident_commalist ')' */ -#line 687 "bison_parser.y" + case 94: /* opt_column_list: '(' ident_commalist ')' */ +#line 717 "bison_parser.y" { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 3664 "bison_parser.cpp" +#line 3796 "bison_parser.cpp" break; - case 84: /* opt_column_list: %empty */ -#line 688 "bison_parser.y" + case 95: /* opt_column_list: %empty */ +#line 718 "bison_parser.y" { (yyval.str_vec) = nullptr; } -#line 3670 "bison_parser.cpp" +#line 3802 "bison_parser.cpp" break; - case 85: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ -#line 698 "bison_parser.y" + case 96: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ +#line 728 "bison_parser.y" { (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 3681 "bison_parser.cpp" +#line 3813 "bison_parser.cpp" break; - case 86: /* update_clause_commalist: update_clause */ -#line 707 "bison_parser.y" + case 97: /* update_clause_commalist: update_clause */ +#line 737 "bison_parser.y" { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 3687 "bison_parser.cpp" +#line 3819 "bison_parser.cpp" break; - case 87: /* update_clause_commalist: update_clause_commalist ',' update_clause */ -#line 708 "bison_parser.y" + case 98: /* update_clause_commalist: update_clause_commalist ',' update_clause */ +#line 738 "bison_parser.y" { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 3693 "bison_parser.cpp" +#line 3825 "bison_parser.cpp" break; - case 88: /* update_clause: IDENTIFIER '=' expr */ -#line 712 "bison_parser.y" + case 99: /* update_clause: IDENTIFIER '=' expr */ +#line 742 "bison_parser.y" { (yyval.update_t) = new UpdateClause(); (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 3703 "bison_parser.cpp" +#line 3835 "bison_parser.cpp" break; - case 89: /* select_statement: opt_with_clause select_with_paren */ -#line 724 "bison_parser.y" + case 100: /* select_statement: opt_with_clause select_with_paren */ +#line 754 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3712 "bison_parser.cpp" +#line 3844 "bison_parser.cpp" break; - case 90: /* select_statement: opt_with_clause select_no_paren */ -#line 728 "bison_parser.y" + case 101: /* select_statement: opt_with_clause select_no_paren */ +#line 758 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3721 "bison_parser.cpp" +#line 3853 "bison_parser.cpp" break; - case 91: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ -#line 732 "bison_parser.y" + case 102: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ +#line 762 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3733,17 +3865,17 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); (yyval.select_stmt)->withDescriptions = (yyvsp[-5].with_description_vec); } -#line 3737 "bison_parser.cpp" +#line 3869 "bison_parser.cpp" break; - case 94: /* select_within_set_operation_no_parentheses: select_clause */ -#line 750 "bison_parser.y" + case 105: /* select_within_set_operation_no_parentheses: select_clause */ +#line 780 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); } -#line 3743 "bison_parser.cpp" +#line 3875 "bison_parser.cpp" break; - case 95: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ -#line 751 "bison_parser.y" + case 106: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ +#line 781 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3752,23 +3884,23 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->push_back((yyvsp[-1].set_operator_t)); (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[0].select_stmt); } -#line 3756 "bison_parser.cpp" +#line 3888 "bison_parser.cpp" break; - case 96: /* select_with_paren: '(' select_no_paren ')' */ -#line 762 "bison_parser.y" + case 107: /* select_with_paren: '(' select_no_paren ')' */ +#line 792 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3762 "bison_parser.cpp" +#line 3894 "bison_parser.cpp" break; - case 97: /* select_with_paren: '(' select_with_paren ')' */ -#line 763 "bison_parser.y" + case 108: /* select_with_paren: '(' select_with_paren ')' */ +#line 793 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3768 "bison_parser.cpp" +#line 3900 "bison_parser.cpp" break; - case 98: /* select_no_paren: select_clause opt_order opt_limit */ -#line 767 "bison_parser.y" + case 109: /* select_no_paren: select_clause opt_order opt_limit */ +#line 797 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); (yyval.select_stmt)->order = (yyvsp[-1].order_vec); @@ -3779,11 +3911,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3783 "bison_parser.cpp" +#line 3915 "bison_parser.cpp" break; - case 99: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ -#line 777 "bison_parser.y" + case 110: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ +#line 807 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3794,63 +3926,63 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); } -#line 3798 "bison_parser.cpp" +#line 3930 "bison_parser.cpp" break; - case 100: /* set_operator: set_type opt_all */ -#line 790 "bison_parser.y" + case 111: /* set_operator: set_type opt_all */ +#line 820 "bison_parser.y" { (yyval.set_operator_t) = (yyvsp[-1].set_operator_t); (yyval.set_operator_t)->isAll = (yyvsp[0].bval); } -#line 3807 "bison_parser.cpp" +#line 3939 "bison_parser.cpp" break; - case 101: /* set_type: UNION */ -#line 797 "bison_parser.y" + case 112: /* set_type: UNION */ +#line 827 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetUnion; } -#line 3816 "bison_parser.cpp" +#line 3948 "bison_parser.cpp" break; - case 102: /* set_type: INTERSECT */ -#line 801 "bison_parser.y" + case 113: /* set_type: INTERSECT */ +#line 831 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetIntersect; } -#line 3825 "bison_parser.cpp" +#line 3957 "bison_parser.cpp" break; - case 103: /* set_type: EXCEPT */ -#line 805 "bison_parser.y" + case 114: /* set_type: EXCEPT */ +#line 835 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetExcept; } -#line 3834 "bison_parser.cpp" +#line 3966 "bison_parser.cpp" break; - case 104: /* opt_all: ALL */ -#line 812 "bison_parser.y" + case 115: /* opt_all: ALL */ +#line 842 "bison_parser.y" { (yyval.bval) = true; } -#line 3842 "bison_parser.cpp" +#line 3974 "bison_parser.cpp" break; - case 105: /* opt_all: %empty */ -#line 815 "bison_parser.y" + case 116: /* opt_all: %empty */ +#line 845 "bison_parser.y" { (yyval.bval) = false; } -#line 3850 "bison_parser.cpp" +#line 3982 "bison_parser.cpp" break; - case 106: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ -#line 821 "bison_parser.y" + case 117: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ +#line 851 "bison_parser.y" { (yyval.select_stmt) = new SelectStatement(); (yyval.select_stmt)->limit = (yyvsp[-5].limit); @@ -3860,213 +3992,213 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 3864 "bison_parser.cpp" +#line 3996 "bison_parser.cpp" break; - case 107: /* opt_distinct: DISTINCT */ -#line 833 "bison_parser.y" + case 118: /* opt_distinct: DISTINCT */ +#line 863 "bison_parser.y" { (yyval.bval) = true; } -#line 3870 "bison_parser.cpp" +#line 4002 "bison_parser.cpp" break; - case 108: /* opt_distinct: %empty */ -#line 834 "bison_parser.y" + case 119: /* opt_distinct: %empty */ +#line 864 "bison_parser.y" { (yyval.bval) = false; } -#line 3876 "bison_parser.cpp" +#line 4008 "bison_parser.cpp" break; - case 110: /* opt_from_clause: from_clause */ -#line 842 "bison_parser.y" + case 121: /* opt_from_clause: from_clause */ +#line 872 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 3882 "bison_parser.cpp" +#line 4014 "bison_parser.cpp" break; - case 111: /* opt_from_clause: %empty */ -#line 843 "bison_parser.y" + case 122: /* opt_from_clause: %empty */ +#line 873 "bison_parser.y" { (yyval.table) = nullptr; } -#line 3888 "bison_parser.cpp" +#line 4020 "bison_parser.cpp" break; - case 112: /* from_clause: FROM table_ref */ -#line 847 "bison_parser.y" + case 123: /* from_clause: FROM table_ref */ +#line 877 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 3894 "bison_parser.cpp" +#line 4026 "bison_parser.cpp" break; - case 113: /* opt_where: WHERE expr */ -#line 852 "bison_parser.y" + case 124: /* opt_where: WHERE expr */ +#line 882 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 3900 "bison_parser.cpp" +#line 4032 "bison_parser.cpp" break; - case 114: /* opt_where: %empty */ -#line 853 "bison_parser.y" + case 125: /* opt_where: %empty */ +#line 883 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 3906 "bison_parser.cpp" +#line 4038 "bison_parser.cpp" break; - case 115: /* opt_group: GROUP BY expr_list opt_having */ -#line 857 "bison_parser.y" + case 126: /* opt_group: GROUP BY expr_list opt_having */ +#line 887 "bison_parser.y" { (yyval.group_t) = new GroupByDescription(); (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 3916 "bison_parser.cpp" +#line 4048 "bison_parser.cpp" break; - case 116: /* opt_group: %empty */ -#line 862 "bison_parser.y" + case 127: /* opt_group: %empty */ +#line 892 "bison_parser.y" { (yyval.group_t) = nullptr; } -#line 3922 "bison_parser.cpp" +#line 4054 "bison_parser.cpp" break; - case 117: /* opt_having: HAVING expr */ -#line 866 "bison_parser.y" + case 128: /* opt_having: HAVING expr */ +#line 896 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 3928 "bison_parser.cpp" +#line 4060 "bison_parser.cpp" break; - case 118: /* opt_having: %empty */ -#line 867 "bison_parser.y" + case 129: /* opt_having: %empty */ +#line 897 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 3934 "bison_parser.cpp" +#line 4066 "bison_parser.cpp" break; - case 119: /* opt_order: ORDER BY order_list */ -#line 871 "bison_parser.y" + case 130: /* opt_order: ORDER BY order_list */ +#line 901 "bison_parser.y" { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 3940 "bison_parser.cpp" +#line 4072 "bison_parser.cpp" break; - case 120: /* opt_order: %empty */ -#line 872 "bison_parser.y" + case 131: /* opt_order: %empty */ +#line 902 "bison_parser.y" { (yyval.order_vec) = nullptr; } -#line 3946 "bison_parser.cpp" +#line 4078 "bison_parser.cpp" break; - case 121: /* order_list: order_desc */ -#line 876 "bison_parser.y" + case 132: /* order_list: order_desc */ +#line 906 "bison_parser.y" { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 3952 "bison_parser.cpp" +#line 4084 "bison_parser.cpp" break; - case 122: /* order_list: order_list ',' order_desc */ -#line 877 "bison_parser.y" + case 133: /* order_list: order_list ',' order_desc */ +#line 907 "bison_parser.y" { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 3958 "bison_parser.cpp" +#line 4090 "bison_parser.cpp" break; - case 123: /* order_desc: expr opt_order_type */ -#line 881 "bison_parser.y" + case 134: /* order_desc: expr opt_order_type */ +#line 911 "bison_parser.y" { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 3964 "bison_parser.cpp" +#line 4096 "bison_parser.cpp" break; - case 124: /* opt_order_type: ASC */ -#line 885 "bison_parser.y" + case 135: /* opt_order_type: ASC */ +#line 915 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 3970 "bison_parser.cpp" +#line 4102 "bison_parser.cpp" break; - case 125: /* opt_order_type: DESC */ -#line 886 "bison_parser.y" + case 136: /* opt_order_type: DESC */ +#line 916 "bison_parser.y" { (yyval.order_type) = kOrderDesc; } -#line 3976 "bison_parser.cpp" +#line 4108 "bison_parser.cpp" break; - case 126: /* opt_order_type: %empty */ -#line 887 "bison_parser.y" + case 137: /* opt_order_type: %empty */ +#line 917 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 3982 "bison_parser.cpp" +#line 4114 "bison_parser.cpp" break; - case 127: /* opt_top: TOP int_literal */ -#line 893 "bison_parser.y" + case 138: /* opt_top: TOP int_literal */ +#line 923 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 3988 "bison_parser.cpp" +#line 4120 "bison_parser.cpp" break; - case 128: /* opt_top: %empty */ -#line 894 "bison_parser.y" + case 139: /* opt_top: %empty */ +#line 924 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 3994 "bison_parser.cpp" +#line 4126 "bison_parser.cpp" break; - case 129: /* opt_limit: LIMIT expr */ -#line 898 "bison_parser.y" + case 140: /* opt_limit: LIMIT expr */ +#line 928 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 4000 "bison_parser.cpp" +#line 4132 "bison_parser.cpp" break; - case 130: /* opt_limit: OFFSET expr */ -#line 899 "bison_parser.y" + case 141: /* opt_limit: OFFSET expr */ +#line 929 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 4006 "bison_parser.cpp" +#line 4138 "bison_parser.cpp" break; - case 131: /* opt_limit: LIMIT expr OFFSET expr */ -#line 900 "bison_parser.y" + case 142: /* opt_limit: LIMIT expr OFFSET expr */ +#line 930 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4012 "bison_parser.cpp" +#line 4144 "bison_parser.cpp" break; - case 132: /* opt_limit: LIMIT ALL */ -#line 901 "bison_parser.y" + case 143: /* opt_limit: LIMIT ALL */ +#line 931 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, nullptr); } -#line 4018 "bison_parser.cpp" +#line 4150 "bison_parser.cpp" break; - case 133: /* opt_limit: LIMIT ALL OFFSET expr */ -#line 902 "bison_parser.y" + case 144: /* opt_limit: LIMIT ALL OFFSET expr */ +#line 932 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 4024 "bison_parser.cpp" +#line 4156 "bison_parser.cpp" break; - case 134: /* opt_limit: %empty */ -#line 903 "bison_parser.y" + case 145: /* opt_limit: %empty */ +#line 933 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 4030 "bison_parser.cpp" +#line 4162 "bison_parser.cpp" break; - case 135: /* expr_list: expr_alias */ -#line 910 "bison_parser.y" + case 146: /* expr_list: expr_alias */ +#line 940 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4036 "bison_parser.cpp" +#line 4168 "bison_parser.cpp" break; - case 136: /* expr_list: expr_list ',' expr_alias */ -#line 911 "bison_parser.y" + case 147: /* expr_list: expr_list ',' expr_alias */ +#line 941 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4042 "bison_parser.cpp" +#line 4174 "bison_parser.cpp" break; - case 137: /* opt_literal_list: literal_list */ -#line 915 "bison_parser.y" + case 148: /* opt_literal_list: literal_list */ +#line 945 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[0].expr_vec); } -#line 4048 "bison_parser.cpp" +#line 4180 "bison_parser.cpp" break; - case 138: /* opt_literal_list: %empty */ -#line 916 "bison_parser.y" + case 149: /* opt_literal_list: %empty */ +#line 946 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 4054 "bison_parser.cpp" +#line 4186 "bison_parser.cpp" break; - case 139: /* literal_list: literal */ -#line 920 "bison_parser.y" + case 150: /* literal_list: literal */ +#line 950 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4060 "bison_parser.cpp" +#line 4192 "bison_parser.cpp" break; - case 140: /* literal_list: literal_list ',' literal */ -#line 921 "bison_parser.y" + case 151: /* literal_list: literal_list ',' literal */ +#line 951 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4066 "bison_parser.cpp" +#line 4198 "bison_parser.cpp" break; - case 141: /* expr_alias: expr opt_alias */ -#line 925 "bison_parser.y" + case 152: /* expr_alias: expr opt_alias */ +#line 955 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); if ((yyvsp[0].alias_t)) { @@ -4074,421 +4206,421 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].alias_t); } } -#line 4078 "bison_parser.cpp" +#line 4210 "bison_parser.cpp" break; - case 147: /* operand: '(' expr ')' */ -#line 943 "bison_parser.y" + case 158: /* operand: '(' expr ')' */ +#line 973 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); } -#line 4084 "bison_parser.cpp" +#line 4216 "bison_parser.cpp" break; - case 157: /* operand: '(' select_no_paren ')' */ -#line 953 "bison_parser.y" + case 168: /* operand: '(' select_no_paren ')' */ +#line 983 "bison_parser.y" { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 4090 "bison_parser.cpp" +#line 4222 "bison_parser.cpp" break; - case 160: /* unary_expr: '-' operand */ -#line 962 "bison_parser.y" + case 171: /* unary_expr: '-' operand */ +#line 992 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 4096 "bison_parser.cpp" +#line 4228 "bison_parser.cpp" break; - case 161: /* unary_expr: NOT operand */ -#line 963 "bison_parser.y" + case 172: /* unary_expr: NOT operand */ +#line 993 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 4102 "bison_parser.cpp" +#line 4234 "bison_parser.cpp" break; - case 162: /* unary_expr: operand ISNULL */ -#line 964 "bison_parser.y" + case 173: /* unary_expr: operand ISNULL */ +#line 994 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 4108 "bison_parser.cpp" +#line 4240 "bison_parser.cpp" break; - case 163: /* unary_expr: operand IS NULL */ -#line 965 "bison_parser.y" + case 174: /* unary_expr: operand IS NULL */ +#line 995 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 4114 "bison_parser.cpp" +#line 4246 "bison_parser.cpp" break; - case 164: /* unary_expr: operand IS NOT NULL */ -#line 966 "bison_parser.y" + case 175: /* unary_expr: operand IS NOT NULL */ +#line 996 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 4120 "bison_parser.cpp" +#line 4252 "bison_parser.cpp" break; - case 166: /* binary_expr: operand '-' operand */ -#line 971 "bison_parser.y" + case 177: /* binary_expr: operand '-' operand */ +#line 1001 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 4126 "bison_parser.cpp" +#line 4258 "bison_parser.cpp" break; - case 167: /* binary_expr: operand '+' operand */ -#line 972 "bison_parser.y" + case 178: /* binary_expr: operand '+' operand */ +#line 1002 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 4132 "bison_parser.cpp" +#line 4264 "bison_parser.cpp" break; - case 168: /* binary_expr: operand '/' operand */ -#line 973 "bison_parser.y" + case 179: /* binary_expr: operand '/' operand */ +#line 1003 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 4138 "bison_parser.cpp" +#line 4270 "bison_parser.cpp" break; - case 169: /* binary_expr: operand '*' operand */ -#line 974 "bison_parser.y" + case 180: /* binary_expr: operand '*' operand */ +#line 1004 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 4144 "bison_parser.cpp" +#line 4276 "bison_parser.cpp" break; - case 170: /* binary_expr: operand '%' operand */ -#line 975 "bison_parser.y" + case 181: /* binary_expr: operand '%' operand */ +#line 1005 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 4150 "bison_parser.cpp" +#line 4282 "bison_parser.cpp" break; - case 171: /* binary_expr: operand '^' operand */ -#line 976 "bison_parser.y" + case 182: /* binary_expr: operand '^' operand */ +#line 1006 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 4156 "bison_parser.cpp" +#line 4288 "bison_parser.cpp" break; - case 172: /* binary_expr: operand LIKE operand */ -#line 977 "bison_parser.y" + case 183: /* binary_expr: operand LIKE operand */ +#line 1007 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 4162 "bison_parser.cpp" +#line 4294 "bison_parser.cpp" break; - case 173: /* binary_expr: operand NOT LIKE operand */ -#line 978 "bison_parser.y" + case 184: /* binary_expr: operand NOT LIKE operand */ +#line 1008 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 4168 "bison_parser.cpp" +#line 4300 "bison_parser.cpp" break; - case 174: /* binary_expr: operand ILIKE operand */ -#line 979 "bison_parser.y" + case 185: /* binary_expr: operand ILIKE operand */ +#line 1009 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 4174 "bison_parser.cpp" +#line 4306 "bison_parser.cpp" break; - case 175: /* binary_expr: operand CONCAT operand */ -#line 980 "bison_parser.y" + case 186: /* binary_expr: operand CONCAT operand */ +#line 1010 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 4180 "bison_parser.cpp" +#line 4312 "bison_parser.cpp" break; - case 176: /* logic_expr: expr AND expr */ -#line 984 "bison_parser.y" + case 187: /* logic_expr: expr AND expr */ +#line 1014 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 4186 "bison_parser.cpp" +#line 4318 "bison_parser.cpp" break; - case 177: /* logic_expr: expr OR expr */ -#line 985 "bison_parser.y" + case 188: /* logic_expr: expr OR expr */ +#line 1015 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 4192 "bison_parser.cpp" +#line 4324 "bison_parser.cpp" break; - case 178: /* in_expr: operand IN '(' expr_list ')' */ -#line 989 "bison_parser.y" + case 189: /* in_expr: operand IN '(' expr_list ')' */ +#line 1019 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 4198 "bison_parser.cpp" +#line 4330 "bison_parser.cpp" break; - case 179: /* in_expr: operand NOT IN '(' expr_list ')' */ -#line 990 "bison_parser.y" + case 190: /* in_expr: operand NOT IN '(' expr_list ')' */ +#line 1020 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 4204 "bison_parser.cpp" +#line 4336 "bison_parser.cpp" break; - case 180: /* in_expr: operand IN '(' select_no_paren ')' */ -#line 991 "bison_parser.y" + case 191: /* in_expr: operand IN '(' select_no_paren ')' */ +#line 1021 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 4210 "bison_parser.cpp" +#line 4342 "bison_parser.cpp" break; - case 181: /* in_expr: operand NOT IN '(' select_no_paren ')' */ -#line 992 "bison_parser.y" + case 192: /* in_expr: operand NOT IN '(' select_no_paren ')' */ +#line 1022 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 4216 "bison_parser.cpp" +#line 4348 "bison_parser.cpp" break; - case 182: /* case_expr: CASE expr case_list END */ -#line 998 "bison_parser.y" + case 193: /* case_expr: CASE expr case_list END */ +#line 1028 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } -#line 4222 "bison_parser.cpp" +#line 4354 "bison_parser.cpp" break; - case 183: /* case_expr: CASE expr case_list ELSE expr END */ -#line 999 "bison_parser.y" + case 194: /* case_expr: CASE expr case_list ELSE expr END */ +#line 1029 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4228 "bison_parser.cpp" +#line 4360 "bison_parser.cpp" break; - case 184: /* case_expr: CASE case_list END */ -#line 1000 "bison_parser.y" + case 195: /* case_expr: CASE case_list END */ +#line 1030 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } -#line 4234 "bison_parser.cpp" +#line 4366 "bison_parser.cpp" break; - case 185: /* case_expr: CASE case_list ELSE expr END */ -#line 1001 "bison_parser.y" + case 196: /* case_expr: CASE case_list ELSE expr END */ +#line 1031 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4240 "bison_parser.cpp" +#line 4372 "bison_parser.cpp" break; - case 186: /* case_list: WHEN expr THEN expr */ -#line 1005 "bison_parser.y" + case 197: /* case_list: WHEN expr THEN expr */ +#line 1035 "bison_parser.y" { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4246 "bison_parser.cpp" +#line 4378 "bison_parser.cpp" break; - case 187: /* case_list: case_list WHEN expr THEN expr */ -#line 1006 "bison_parser.y" + case 198: /* case_list: case_list WHEN expr THEN expr */ +#line 1036 "bison_parser.y" { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4252 "bison_parser.cpp" +#line 4384 "bison_parser.cpp" break; - case 188: /* exists_expr: EXISTS '(' select_no_paren ')' */ -#line 1010 "bison_parser.y" + case 199: /* exists_expr: EXISTS '(' select_no_paren ')' */ +#line 1040 "bison_parser.y" { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 4258 "bison_parser.cpp" +#line 4390 "bison_parser.cpp" break; - case 189: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ -#line 1011 "bison_parser.y" + case 200: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ +#line 1041 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 4264 "bison_parser.cpp" +#line 4396 "bison_parser.cpp" break; - case 190: /* comp_expr: operand '=' operand */ -#line 1015 "bison_parser.y" + case 201: /* comp_expr: operand '=' operand */ +#line 1045 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4270 "bison_parser.cpp" +#line 4402 "bison_parser.cpp" break; - case 191: /* comp_expr: operand EQUALS operand */ -#line 1016 "bison_parser.y" + case 202: /* comp_expr: operand EQUALS operand */ +#line 1046 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4276 "bison_parser.cpp" +#line 4408 "bison_parser.cpp" break; - case 192: /* comp_expr: operand NOTEQUALS operand */ -#line 1017 "bison_parser.y" + case 203: /* comp_expr: operand NOTEQUALS operand */ +#line 1047 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 4282 "bison_parser.cpp" +#line 4414 "bison_parser.cpp" break; - case 193: /* comp_expr: operand '<' operand */ -#line 1018 "bison_parser.y" + case 204: /* comp_expr: operand '<' operand */ +#line 1048 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 4288 "bison_parser.cpp" +#line 4420 "bison_parser.cpp" break; - case 194: /* comp_expr: operand '>' operand */ -#line 1019 "bison_parser.y" + case 205: /* comp_expr: operand '>' operand */ +#line 1049 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 4294 "bison_parser.cpp" +#line 4426 "bison_parser.cpp" break; - case 195: /* comp_expr: operand LESSEQ operand */ -#line 1020 "bison_parser.y" + case 206: /* comp_expr: operand LESSEQ operand */ +#line 1050 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 4300 "bison_parser.cpp" +#line 4432 "bison_parser.cpp" break; - case 196: /* comp_expr: operand GREATEREQ operand */ -#line 1021 "bison_parser.y" + case 207: /* comp_expr: operand GREATEREQ operand */ +#line 1051 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 4306 "bison_parser.cpp" +#line 4438 "bison_parser.cpp" break; - case 197: /* function_expr: IDENTIFIER '(' ')' */ -#line 1025 "bison_parser.y" + case 208: /* function_expr: IDENTIFIER '(' ')' */ +#line 1055 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 4312 "bison_parser.cpp" +#line 4444 "bison_parser.cpp" break; - case 198: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ -#line 1026 "bison_parser.y" + case 209: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ +#line 1056 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 4318 "bison_parser.cpp" +#line 4450 "bison_parser.cpp" break; - case 199: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ -#line 1030 "bison_parser.y" + case 210: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ +#line 1060 "bison_parser.y" { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } -#line 4324 "bison_parser.cpp" +#line 4456 "bison_parser.cpp" break; - case 200: /* cast_expr: CAST '(' expr AS column_type ')' */ -#line 1034 "bison_parser.y" + case 211: /* cast_expr: CAST '(' expr AS column_type ')' */ +#line 1064 "bison_parser.y" { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } -#line 4330 "bison_parser.cpp" +#line 4462 "bison_parser.cpp" break; - case 201: /* datetime_field: SECOND */ -#line 1038 "bison_parser.y" + case 212: /* datetime_field: SECOND */ +#line 1068 "bison_parser.y" { (yyval.datetime_field) = kDatetimeSecond; } -#line 4336 "bison_parser.cpp" +#line 4468 "bison_parser.cpp" break; - case 202: /* datetime_field: MINUTE */ -#line 1039 "bison_parser.y" + case 213: /* datetime_field: MINUTE */ +#line 1069 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMinute; } -#line 4342 "bison_parser.cpp" +#line 4474 "bison_parser.cpp" break; - case 203: /* datetime_field: HOUR */ -#line 1040 "bison_parser.y" + case 214: /* datetime_field: HOUR */ +#line 1070 "bison_parser.y" { (yyval.datetime_field) = kDatetimeHour; } -#line 4348 "bison_parser.cpp" +#line 4480 "bison_parser.cpp" break; - case 204: /* datetime_field: DAY */ -#line 1041 "bison_parser.y" + case 215: /* datetime_field: DAY */ +#line 1071 "bison_parser.y" { (yyval.datetime_field) = kDatetimeDay; } -#line 4354 "bison_parser.cpp" +#line 4486 "bison_parser.cpp" break; - case 205: /* datetime_field: MONTH */ -#line 1042 "bison_parser.y" + case 216: /* datetime_field: MONTH */ +#line 1072 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMonth; } -#line 4360 "bison_parser.cpp" +#line 4492 "bison_parser.cpp" break; - case 206: /* datetime_field: YEAR */ -#line 1043 "bison_parser.y" + case 217: /* datetime_field: YEAR */ +#line 1073 "bison_parser.y" { (yyval.datetime_field) = kDatetimeYear; } -#line 4366 "bison_parser.cpp" +#line 4498 "bison_parser.cpp" break; - case 207: /* array_expr: ARRAY '[' expr_list ']' */ -#line 1047 "bison_parser.y" + case 218: /* array_expr: ARRAY '[' expr_list ']' */ +#line 1077 "bison_parser.y" { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 4372 "bison_parser.cpp" +#line 4504 "bison_parser.cpp" break; - case 208: /* array_index: operand '[' int_literal ']' */ -#line 1051 "bison_parser.y" + case 219: /* array_index: operand '[' int_literal ']' */ +#line 1081 "bison_parser.y" { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 4378 "bison_parser.cpp" +#line 4510 "bison_parser.cpp" break; - case 209: /* between_expr: operand BETWEEN operand AND operand */ -#line 1055 "bison_parser.y" + case 220: /* between_expr: operand BETWEEN operand AND operand */ +#line 1085 "bison_parser.y" { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4384 "bison_parser.cpp" +#line 4516 "bison_parser.cpp" break; - case 210: /* column_name: IDENTIFIER */ -#line 1059 "bison_parser.y" + case 221: /* column_name: IDENTIFIER */ +#line 1089 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 4390 "bison_parser.cpp" +#line 4522 "bison_parser.cpp" break; - case 211: /* column_name: IDENTIFIER '.' IDENTIFIER */ -#line 1060 "bison_parser.y" + case 222: /* column_name: IDENTIFIER '.' IDENTIFIER */ +#line 1090 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 4396 "bison_parser.cpp" +#line 4528 "bison_parser.cpp" break; - case 212: /* column_name: '*' */ -#line 1061 "bison_parser.y" + case 223: /* column_name: '*' */ +#line 1091 "bison_parser.y" { (yyval.expr) = Expr::makeStar(); } -#line 4402 "bison_parser.cpp" +#line 4534 "bison_parser.cpp" break; - case 213: /* column_name: IDENTIFIER '.' '*' */ -#line 1062 "bison_parser.y" + case 224: /* column_name: IDENTIFIER '.' '*' */ +#line 1092 "bison_parser.y" { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 4408 "bison_parser.cpp" +#line 4540 "bison_parser.cpp" break; - case 219: /* string_literal: STRING */ -#line 1074 "bison_parser.y" + case 230: /* string_literal: STRING */ +#line 1104 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 4414 "bison_parser.cpp" +#line 4546 "bison_parser.cpp" break; - case 220: /* bool_literal: TRUE */ -#line 1078 "bison_parser.y" + case 231: /* bool_literal: TRUE */ +#line 1108 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(true); } -#line 4420 "bison_parser.cpp" +#line 4552 "bison_parser.cpp" break; - case 221: /* bool_literal: FALSE */ -#line 1079 "bison_parser.y" + case 232: /* bool_literal: FALSE */ +#line 1109 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(false); } -#line 4426 "bison_parser.cpp" +#line 4558 "bison_parser.cpp" break; - case 222: /* num_literal: FLOATVAL */ -#line 1083 "bison_parser.y" + case 233: /* num_literal: FLOATVAL */ +#line 1113 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 4432 "bison_parser.cpp" +#line 4564 "bison_parser.cpp" break; - case 224: /* int_literal: INTVAL */ -#line 1088 "bison_parser.y" + case 235: /* int_literal: INTVAL */ +#line 1118 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 4438 "bison_parser.cpp" +#line 4570 "bison_parser.cpp" break; - case 225: /* null_literal: NULL */ -#line 1092 "bison_parser.y" + case 236: /* null_literal: NULL */ +#line 1122 "bison_parser.y" { (yyval.expr) = Expr::makeNullLiteral(); } -#line 4444 "bison_parser.cpp" +#line 4576 "bison_parser.cpp" break; - case 226: /* param_expr: '?' */ -#line 1096 "bison_parser.y" + case 237: /* param_expr: '?' */ +#line 1126 "bison_parser.y" { (yyval.expr) = Expr::makeParameter(yylloc.total_column); (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 4454 "bison_parser.cpp" +#line 4586 "bison_parser.cpp" break; - case 228: /* table_ref: table_ref_commalist ',' table_ref_atomic */ -#line 1109 "bison_parser.y" + case 239: /* table_ref: table_ref_commalist ',' table_ref_atomic */ +#line 1139 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); auto tbl = new TableRef(kTableCrossProduct); tbl->list = (yyvsp[-2].table_vec); (yyval.table) = tbl; } -#line 4465 "bison_parser.cpp" +#line 4597 "bison_parser.cpp" break; - case 232: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ -#line 1125 "bison_parser.y" + case 243: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ +#line 1155 "bison_parser.y" { auto tbl = new TableRef(kTableSelect); tbl->select = (yyvsp[-2].select_stmt); tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4476 "bison_parser.cpp" +#line 4608 "bison_parser.cpp" break; - case 233: /* table_ref_commalist: table_ref_atomic */ -#line 1134 "bison_parser.y" + case 244: /* table_ref_commalist: table_ref_atomic */ +#line 1164 "bison_parser.y" { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 4482 "bison_parser.cpp" +#line 4614 "bison_parser.cpp" break; - case 234: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ -#line 1135 "bison_parser.y" + case 245: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ +#line 1165 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 4488 "bison_parser.cpp" +#line 4620 "bison_parser.cpp" break; - case 235: /* table_ref_name: table_name opt_table_alias */ -#line 1140 "bison_parser.y" + case 246: /* table_ref_name: table_name opt_table_alias */ +#line 1170 "bison_parser.y" { auto tbl = new TableRef(kTableName); tbl->schema = (yyvsp[-1].table_name).schema; @@ -4496,121 +4628,121 @@ YYLTYPE yylloc = yyloc_default; tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4500 "bison_parser.cpp" +#line 4632 "bison_parser.cpp" break; - case 236: /* table_ref_name_no_alias: table_name */ -#line 1151 "bison_parser.y" + case 247: /* table_ref_name_no_alias: table_name */ +#line 1181 "bison_parser.y" { (yyval.table) = new TableRef(kTableName); (yyval.table)->schema = (yyvsp[0].table_name).schema; (yyval.table)->name = (yyvsp[0].table_name).name; } -#line 4510 "bison_parser.cpp" +#line 4642 "bison_parser.cpp" break; - case 237: /* table_name: IDENTIFIER */ -#line 1160 "bison_parser.y" + case 248: /* table_name: IDENTIFIER */ +#line 1190 "bison_parser.y" { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} -#line 4516 "bison_parser.cpp" +#line 4648 "bison_parser.cpp" break; - case 238: /* table_name: IDENTIFIER '.' IDENTIFIER */ -#line 1161 "bison_parser.y" + case 249: /* table_name: IDENTIFIER '.' IDENTIFIER */ +#line 1191 "bison_parser.y" { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } -#line 4522 "bison_parser.cpp" +#line 4654 "bison_parser.cpp" break; - case 239: /* opt_index_name: IDENTIFIER */ -#line 1165 "bison_parser.y" + case 250: /* opt_index_name: IDENTIFIER */ +#line 1195 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4528 "bison_parser.cpp" +#line 4660 "bison_parser.cpp" break; - case 240: /* opt_index_name: %empty */ -#line 1166 "bison_parser.y" + case 251: /* opt_index_name: %empty */ +#line 1196 "bison_parser.y" { (yyval.sval) = nullptr;} -#line 4534 "bison_parser.cpp" +#line 4666 "bison_parser.cpp" break; - case 241: /* index_name: IDENTIFIER */ -#line 1170 "bison_parser.y" + case 252: /* index_name: IDENTIFIER */ +#line 1200 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4540 "bison_parser.cpp" +#line 4672 "bison_parser.cpp" break; - case 243: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ -#line 1176 "bison_parser.y" + case 254: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ +#line 1206 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } -#line 4546 "bison_parser.cpp" +#line 4678 "bison_parser.cpp" break; - case 245: /* opt_table_alias: %empty */ -#line 1182 "bison_parser.y" + case 256: /* opt_table_alias: %empty */ +#line 1212 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4552 "bison_parser.cpp" +#line 4684 "bison_parser.cpp" break; - case 246: /* alias: AS IDENTIFIER */ -#line 1187 "bison_parser.y" + case 257: /* alias: AS IDENTIFIER */ +#line 1217 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4558 "bison_parser.cpp" +#line 4690 "bison_parser.cpp" break; - case 247: /* alias: IDENTIFIER */ -#line 1188 "bison_parser.y" + case 258: /* alias: IDENTIFIER */ +#line 1218 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4564 "bison_parser.cpp" +#line 4696 "bison_parser.cpp" break; - case 249: /* opt_alias: %empty */ -#line 1194 "bison_parser.y" + case 260: /* opt_alias: %empty */ +#line 1224 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4570 "bison_parser.cpp" +#line 4702 "bison_parser.cpp" break; - case 251: /* opt_with_clause: %empty */ -#line 1204 "bison_parser.y" + case 262: /* opt_with_clause: %empty */ +#line 1234 "bison_parser.y" { (yyval.with_description_vec) = nullptr; } -#line 4576 "bison_parser.cpp" +#line 4708 "bison_parser.cpp" break; - case 252: /* with_clause: WITH with_description_list */ -#line 1208 "bison_parser.y" + case 263: /* with_clause: WITH with_description_list */ +#line 1238 "bison_parser.y" { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } -#line 4582 "bison_parser.cpp" +#line 4714 "bison_parser.cpp" break; - case 253: /* with_description_list: with_description */ -#line 1212 "bison_parser.y" + case 264: /* with_description_list: with_description */ +#line 1242 "bison_parser.y" { (yyval.with_description_vec) = new std::vector(); (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); } -#line 4591 "bison_parser.cpp" +#line 4723 "bison_parser.cpp" break; - case 254: /* with_description_list: with_description_list ',' with_description */ -#line 1216 "bison_parser.y" + case 265: /* with_description_list: with_description_list ',' with_description */ +#line 1246 "bison_parser.y" { (yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t)); (yyval.with_description_vec) = (yyvsp[-2].with_description_vec); } -#line 4600 "bison_parser.cpp" +#line 4732 "bison_parser.cpp" break; - case 255: /* with_description: IDENTIFIER AS select_with_paren */ -#line 1223 "bison_parser.y" + case 266: /* with_description: IDENTIFIER AS select_with_paren */ +#line 1253 "bison_parser.y" { (yyval.with_description_t) = new WithDescription(); (yyval.with_description_t)->alias = (yyvsp[-2].sval); (yyval.with_description_t)->select = (yyvsp[0].select_stmt); } -#line 4610 "bison_parser.cpp" +#line 4742 "bison_parser.cpp" break; - case 256: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ -#line 1237 "bison_parser.y" + case 267: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ +#line 1267 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4618,11 +4750,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 4622 "bison_parser.cpp" +#line 4754 "bison_parser.cpp" break; - case 257: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ -#line 1245 "bison_parser.y" + case 268: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ +#line 1275 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4631,11 +4763,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 4635 "bison_parser.cpp" +#line 4767 "bison_parser.cpp" break; - case 258: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ -#line 1255 "bison_parser.y" + case 269: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ +#line 1285 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4651,83 +4783,83 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } -#line 4655 "bison_parser.cpp" +#line 4787 "bison_parser.cpp" break; - case 259: /* opt_join_type: INNER */ -#line 1273 "bison_parser.y" + case 270: /* opt_join_type: INNER */ +#line 1303 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4661 "bison_parser.cpp" +#line 4793 "bison_parser.cpp" break; - case 260: /* opt_join_type: LEFT OUTER */ -#line 1274 "bison_parser.y" + case 271: /* opt_join_type: LEFT OUTER */ +#line 1304 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4667 "bison_parser.cpp" +#line 4799 "bison_parser.cpp" break; - case 261: /* opt_join_type: LEFT */ -#line 1275 "bison_parser.y" + case 272: /* opt_join_type: LEFT */ +#line 1305 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4673 "bison_parser.cpp" +#line 4805 "bison_parser.cpp" break; - case 262: /* opt_join_type: RIGHT OUTER */ -#line 1276 "bison_parser.y" + case 273: /* opt_join_type: RIGHT OUTER */ +#line 1306 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4679 "bison_parser.cpp" +#line 4811 "bison_parser.cpp" break; - case 263: /* opt_join_type: RIGHT */ -#line 1277 "bison_parser.y" + case 274: /* opt_join_type: RIGHT */ +#line 1307 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4685 "bison_parser.cpp" +#line 4817 "bison_parser.cpp" break; - case 264: /* opt_join_type: FULL OUTER */ -#line 1278 "bison_parser.y" + case 275: /* opt_join_type: FULL OUTER */ +#line 1308 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4691 "bison_parser.cpp" +#line 4823 "bison_parser.cpp" break; - case 265: /* opt_join_type: OUTER */ -#line 1279 "bison_parser.y" + case 276: /* opt_join_type: OUTER */ +#line 1309 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4697 "bison_parser.cpp" +#line 4829 "bison_parser.cpp" break; - case 266: /* opt_join_type: FULL */ -#line 1280 "bison_parser.y" + case 277: /* opt_join_type: FULL */ +#line 1310 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4703 "bison_parser.cpp" +#line 4835 "bison_parser.cpp" break; - case 267: /* opt_join_type: CROSS */ -#line 1281 "bison_parser.y" + case 278: /* opt_join_type: CROSS */ +#line 1311 "bison_parser.y" { (yyval.uval) = kJoinCross; } -#line 4709 "bison_parser.cpp" +#line 4841 "bison_parser.cpp" break; - case 268: /* opt_join_type: %empty */ -#line 1282 "bison_parser.y" + case 279: /* opt_join_type: %empty */ +#line 1312 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4715 "bison_parser.cpp" +#line 4847 "bison_parser.cpp" break; - case 272: /* ident_commalist: IDENTIFIER */ -#line 1302 "bison_parser.y" + case 283: /* ident_commalist: IDENTIFIER */ +#line 1332 "bison_parser.y" { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 4721 "bison_parser.cpp" +#line 4853 "bison_parser.cpp" break; - case 273: /* ident_commalist: ident_commalist ',' IDENTIFIER */ -#line 1303 "bison_parser.y" + case 284: /* ident_commalist: ident_commalist ',' IDENTIFIER */ +#line 1333 "bison_parser.y" { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 4727 "bison_parser.cpp" +#line 4859 "bison_parser.cpp" break; -#line 4731 "bison_parser.cpp" +#line 4863 "bison_parser.cpp" default: break; } @@ -4957,7 +5089,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 1306 "bison_parser.y" +#line 1336 "bison_parser.y" /********************************* ** Section 4: Additional C code diff --git a/src/parser/bison_parser.h b/src/parser/bison_parser.h index d6d5ca76..64faef28 100644 --- a/src/parser/bison_parser.h +++ b/src/parser/bison_parser.h @@ -281,12 +281,15 @@ union HSQL_STYPE hsql::DatetimeField datetime_field; hsql::LimitDescription* limit; hsql::ColumnDefinition* column_t; + hsql::TableKeyConstraint* table_key_constraint_t; + hsql::ConstraintType column_constraint_t; hsql::ColumnType column_type_t; hsql::ImportType import_type_t; hsql::GroupByDescription* group_t; hsql::UpdateClause* update_t; hsql::Alias* alias_t; hsql::SetOperation* set_operator_t; + hsql::DecimalSpecification decimal_specification_t; std::vector* stmt_vec; @@ -297,8 +300,9 @@ union HSQL_STYPE std::vector* expr_vec; std::vector* order_vec; std::vector* with_description_vec; + std::vector* table_key_constraint_vec; -#line 302 "bison_parser.h" +#line 306 "bison_parser.h" }; typedef union HSQL_STYPE HSQL_STYPE; diff --git a/src/sql/ColumnType.h b/src/sql/ColumnType.h index b2d1f287..9053648d 100755 --- a/src/sql/ColumnType.h +++ b/src/sql/ColumnType.h @@ -19,9 +19,6 @@ namespace hsql { DATETIME, DATE, TIME, - DECIMAL, - REAL, - VARCHAR_VARYING, }; struct DecimalSpecification { diff --git a/src/sql/statements.cpp b/src/sql/statements.cpp index ad217ff4..394c75d1 100755 --- a/src/sql/statements.cpp +++ b/src/sql/statements.cpp @@ -62,9 +62,6 @@ namespace hsql { case DataType::DOUBLE: stream << "DOUBLE"; break; - case DataType::DECIMAL: - stream << "DECIMAL"; - break; case DataType::REAL: stream << "REAL"; break; @@ -77,15 +74,9 @@ namespace hsql { case DataType::VARCHAR: stream << "VARCHAR(" << column_type.length << ")"; break; - case DataType::VARCHAR_VARYING: - stream << "VARCHAR_VARYING"; - break; case DataType::DECIMAL: stream << "DECIMAL"; break; - case DataType::REAL: - stream << "REAL"; - break; case DataType::TEXT: stream << "TEXT"; break; From e567de135390ddf328a83bcdf60371d3b54863da Mon Sep 17 00:00:00 2001 From: simonstadlinger Date: Tue, 24 Aug 2021 10:37:11 +0200 Subject: [PATCH 31/73] Rename tableKeyConstraints to tableConstraints --- src/parser/bison_parser.cpp | 765 ++++++++++++++++++------------------ src/parser/bison_parser.h | 4 +- src/parser/bison_parser.y | 26 +- src/sql/CreateStatement.h | 8 +- src/sql/statements.cpp | 12 +- 5 files changed, 407 insertions(+), 408 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 7f0102f1..0353bba7 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -331,8 +331,8 @@ enum yysymbol_kind_t YYSYMBOL_opt_decimal_specification = 197, /* opt_decimal_specification */ YYSYMBOL_opt_column_nullable = 198, /* opt_column_nullable */ YYSYMBOL_opt_column_constraint = 199, /* opt_column_constraint */ - YYSYMBOL_opt_table_key_constraints = 200, /* opt_table_key_constraints */ - YYSYMBOL_table_key_constraint = 201, /* table_key_constraint */ + YYSYMBOL_opt_table_constraints = 200, /* opt_table_constraints */ + YYSYMBOL_table_constraint = 201, /* table_constraint */ YYSYMBOL_drop_statement = 202, /* drop_statement */ YYSYMBOL_opt_exists = 203, /* opt_exists */ YYSYMBOL_alter_statement = 204, /* alter_statement */ @@ -890,12 +890,11 @@ static const char *const yytname[] = "show_statement", "create_statement", "opt_not_exists", "column_def_commalist", "column_def", "column_type", "opt_decimal_specification", "opt_column_nullable", - "opt_column_constraint", "opt_table_key_constraints", - "table_key_constraint", "drop_statement", "opt_exists", - "alter_statement", "delete_statement", "truncate_statement", - "insert_statement", "opt_column_list", "update_statement", - "update_clause_commalist", "update_clause", "select_statement", - "select_within_set_operation", + "opt_column_constraint", "opt_table_constraints", "table_constraint", + "drop_statement", "opt_exists", "alter_statement", "delete_statement", + "truncate_statement", "insert_statement", "opt_column_list", + "update_statement", "update_clause_commalist", "update_clause", + "select_statement", "select_within_set_operation", "select_within_set_operation_no_parentheses", "select_with_paren", "select_no_paren", "set_operator", "set_type", "opt_all", "select_clause", "opt_distinct", "select_list", "opt_from_clause", @@ -1981,25 +1980,25 @@ yydestruct (const char *yymsg, case YYSYMBOL_IDENTIFIER: /* IDENTIFIER */ #line 154 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1985 "bison_parser.cpp" +#line 1984 "bison_parser.cpp" break; case YYSYMBOL_STRING: /* STRING */ #line 154 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1991 "bison_parser.cpp" +#line 1990 "bison_parser.cpp" break; case YYSYMBOL_FLOATVAL: /* FLOATVAL */ #line 152 "bison_parser.y" { } -#line 1997 "bison_parser.cpp" +#line 1996 "bison_parser.cpp" break; case YYSYMBOL_INTVAL: /* INTVAL */ #line 152 "bison_parser.y" { } -#line 2003 "bison_parser.cpp" +#line 2002 "bison_parser.cpp" break; case YYSYMBOL_statement_list: /* statement_list */ @@ -2012,19 +2011,19 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).stmt_vec)); } -#line 2016 "bison_parser.cpp" +#line 2015 "bison_parser.cpp" break; case YYSYMBOL_statement: /* statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 2022 "bison_parser.cpp" +#line 2021 "bison_parser.cpp" break; case YYSYMBOL_preparable_statement: /* preparable_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 2028 "bison_parser.cpp" +#line 2027 "bison_parser.cpp" break; case YYSYMBOL_opt_hints: /* opt_hints */ @@ -2037,7 +2036,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2041 "bison_parser.cpp" +#line 2040 "bison_parser.cpp" break; case YYSYMBOL_hint_list: /* hint_list */ @@ -2050,85 +2049,85 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2054 "bison_parser.cpp" +#line 2053 "bison_parser.cpp" break; case YYSYMBOL_hint: /* hint */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2060 "bison_parser.cpp" +#line 2059 "bison_parser.cpp" break; case YYSYMBOL_transaction_statement: /* transaction_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).transaction_stmt)); } -#line 2066 "bison_parser.cpp" +#line 2065 "bison_parser.cpp" break; case YYSYMBOL_prepare_statement: /* prepare_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).prep_stmt)); } -#line 2072 "bison_parser.cpp" +#line 2071 "bison_parser.cpp" break; case YYSYMBOL_prepare_target_query: /* prepare_target_query */ #line 154 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2078 "bison_parser.cpp" +#line 2077 "bison_parser.cpp" break; case YYSYMBOL_execute_statement: /* execute_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).exec_stmt)); } -#line 2084 "bison_parser.cpp" +#line 2083 "bison_parser.cpp" break; case YYSYMBOL_import_statement: /* import_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).import_stmt)); } -#line 2090 "bison_parser.cpp" +#line 2089 "bison_parser.cpp" break; case YYSYMBOL_file_type: /* file_type */ #line 152 "bison_parser.y" { } -#line 2096 "bison_parser.cpp" +#line 2095 "bison_parser.cpp" break; case YYSYMBOL_file_path: /* file_path */ #line 154 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2102 "bison_parser.cpp" +#line 2101 "bison_parser.cpp" break; case YYSYMBOL_opt_file_type: /* opt_file_type */ #line 152 "bison_parser.y" { } -#line 2108 "bison_parser.cpp" +#line 2107 "bison_parser.cpp" break; case YYSYMBOL_export_statement: /* export_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).export_stmt)); } -#line 2114 "bison_parser.cpp" +#line 2113 "bison_parser.cpp" break; case YYSYMBOL_show_statement: /* show_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).show_stmt)); } -#line 2120 "bison_parser.cpp" +#line 2119 "bison_parser.cpp" break; case YYSYMBOL_create_statement: /* create_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).create_stmt)); } -#line 2126 "bison_parser.cpp" +#line 2125 "bison_parser.cpp" break; case YYSYMBOL_opt_not_exists: /* opt_not_exists */ #line 152 "bison_parser.y" { } -#line 2132 "bison_parser.cpp" +#line 2131 "bison_parser.cpp" break; case YYSYMBOL_column_def_commalist: /* column_def_commalist */ @@ -2141,85 +2140,85 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).column_vec)); } -#line 2145 "bison_parser.cpp" +#line 2144 "bison_parser.cpp" break; case YYSYMBOL_column_def: /* column_def */ #line 163 "bison_parser.y" { delete (((*yyvaluep).column_t)); } -#line 2151 "bison_parser.cpp" +#line 2150 "bison_parser.cpp" break; case YYSYMBOL_column_type: /* column_type */ #line 152 "bison_parser.y" { } -#line 2157 "bison_parser.cpp" +#line 2156 "bison_parser.cpp" break; case YYSYMBOL_opt_decimal_specification: /* opt_decimal_specification */ #line 152 "bison_parser.y" { } -#line 2163 "bison_parser.cpp" +#line 2162 "bison_parser.cpp" break; case YYSYMBOL_opt_column_nullable: /* opt_column_nullable */ #line 152 "bison_parser.y" { } -#line 2169 "bison_parser.cpp" +#line 2168 "bison_parser.cpp" break; case YYSYMBOL_opt_column_constraint: /* opt_column_constraint */ #line 152 "bison_parser.y" { } -#line 2175 "bison_parser.cpp" +#line 2174 "bison_parser.cpp" break; - case YYSYMBOL_opt_table_key_constraints: /* opt_table_key_constraints */ + case YYSYMBOL_opt_table_constraints: /* opt_table_constraints */ #line 163 "bison_parser.y" - { delete (((*yyvaluep).table_key_constraint_vec)); } -#line 2181 "bison_parser.cpp" + { delete (((*yyvaluep).table_constraint_vec)); } +#line 2180 "bison_parser.cpp" break; - case YYSYMBOL_table_key_constraint: /* table_key_constraint */ + case YYSYMBOL_table_constraint: /* table_constraint */ #line 163 "bison_parser.y" - { delete (((*yyvaluep).table_key_constraint_t)); } -#line 2187 "bison_parser.cpp" + { delete (((*yyvaluep).table_constraint_t)); } +#line 2186 "bison_parser.cpp" break; case YYSYMBOL_drop_statement: /* drop_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).drop_stmt)); } -#line 2193 "bison_parser.cpp" +#line 2192 "bison_parser.cpp" break; case YYSYMBOL_opt_exists: /* opt_exists */ #line 152 "bison_parser.y" { } -#line 2199 "bison_parser.cpp" +#line 2198 "bison_parser.cpp" break; case YYSYMBOL_alter_statement: /* alter_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).alter_stmt)); } -#line 2205 "bison_parser.cpp" +#line 2204 "bison_parser.cpp" break; case YYSYMBOL_delete_statement: /* delete_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2211 "bison_parser.cpp" +#line 2210 "bison_parser.cpp" break; case YYSYMBOL_truncate_statement: /* truncate_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2217 "bison_parser.cpp" +#line 2216 "bison_parser.cpp" break; case YYSYMBOL_insert_statement: /* insert_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).insert_stmt)); } -#line 2223 "bison_parser.cpp" +#line 2222 "bison_parser.cpp" break; case YYSYMBOL_opt_column_list: /* opt_column_list */ @@ -2232,13 +2231,13 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2236 "bison_parser.cpp" +#line 2235 "bison_parser.cpp" break; case YYSYMBOL_update_statement: /* update_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).update_stmt)); } -#line 2242 "bison_parser.cpp" +#line 2241 "bison_parser.cpp" break; case YYSYMBOL_update_clause_commalist: /* update_clause_commalist */ @@ -2251,73 +2250,73 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).update_vec)); } -#line 2255 "bison_parser.cpp" +#line 2254 "bison_parser.cpp" break; case YYSYMBOL_update_clause: /* update_clause */ #line 163 "bison_parser.y" { delete (((*yyvaluep).update_t)); } -#line 2261 "bison_parser.cpp" +#line 2260 "bison_parser.cpp" break; case YYSYMBOL_select_statement: /* select_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2267 "bison_parser.cpp" +#line 2266 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation: /* select_within_set_operation */ #line 163 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2273 "bison_parser.cpp" +#line 2272 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation_no_parentheses: /* select_within_set_operation_no_parentheses */ #line 163 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2279 "bison_parser.cpp" +#line 2278 "bison_parser.cpp" break; case YYSYMBOL_select_with_paren: /* select_with_paren */ #line 163 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2285 "bison_parser.cpp" +#line 2284 "bison_parser.cpp" break; case YYSYMBOL_select_no_paren: /* select_no_paren */ #line 163 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2291 "bison_parser.cpp" +#line 2290 "bison_parser.cpp" break; case YYSYMBOL_set_operator: /* set_operator */ #line 163 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2297 "bison_parser.cpp" +#line 2296 "bison_parser.cpp" break; case YYSYMBOL_set_type: /* set_type */ #line 163 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2303 "bison_parser.cpp" +#line 2302 "bison_parser.cpp" break; case YYSYMBOL_opt_all: /* opt_all */ #line 152 "bison_parser.y" { } -#line 2309 "bison_parser.cpp" +#line 2308 "bison_parser.cpp" break; case YYSYMBOL_select_clause: /* select_clause */ #line 163 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2315 "bison_parser.cpp" +#line 2314 "bison_parser.cpp" break; case YYSYMBOL_opt_distinct: /* opt_distinct */ #line 152 "bison_parser.y" { } -#line 2321 "bison_parser.cpp" +#line 2320 "bison_parser.cpp" break; case YYSYMBOL_select_list: /* select_list */ @@ -2330,37 +2329,37 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2334 "bison_parser.cpp" +#line 2333 "bison_parser.cpp" break; case YYSYMBOL_opt_from_clause: /* opt_from_clause */ #line 163 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2340 "bison_parser.cpp" +#line 2339 "bison_parser.cpp" break; case YYSYMBOL_from_clause: /* from_clause */ #line 163 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2346 "bison_parser.cpp" +#line 2345 "bison_parser.cpp" break; case YYSYMBOL_opt_where: /* opt_where */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2352 "bison_parser.cpp" +#line 2351 "bison_parser.cpp" break; case YYSYMBOL_opt_group: /* opt_group */ #line 163 "bison_parser.y" { delete (((*yyvaluep).group_t)); } -#line 2358 "bison_parser.cpp" +#line 2357 "bison_parser.cpp" break; case YYSYMBOL_opt_having: /* opt_having */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2364 "bison_parser.cpp" +#line 2363 "bison_parser.cpp" break; case YYSYMBOL_opt_order: /* opt_order */ @@ -2373,7 +2372,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2377 "bison_parser.cpp" +#line 2376 "bison_parser.cpp" break; case YYSYMBOL_order_list: /* order_list */ @@ -2386,31 +2385,31 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2390 "bison_parser.cpp" +#line 2389 "bison_parser.cpp" break; case YYSYMBOL_order_desc: /* order_desc */ #line 163 "bison_parser.y" { delete (((*yyvaluep).order)); } -#line 2396 "bison_parser.cpp" +#line 2395 "bison_parser.cpp" break; case YYSYMBOL_opt_order_type: /* opt_order_type */ #line 152 "bison_parser.y" { } -#line 2402 "bison_parser.cpp" +#line 2401 "bison_parser.cpp" break; case YYSYMBOL_opt_top: /* opt_top */ #line 163 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2408 "bison_parser.cpp" +#line 2407 "bison_parser.cpp" break; case YYSYMBOL_opt_limit: /* opt_limit */ #line 163 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2414 "bison_parser.cpp" +#line 2413 "bison_parser.cpp" break; case YYSYMBOL_expr_list: /* expr_list */ @@ -2423,7 +2422,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2427 "bison_parser.cpp" +#line 2426 "bison_parser.cpp" break; case YYSYMBOL_opt_literal_list: /* opt_literal_list */ @@ -2436,7 +2435,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2440 "bison_parser.cpp" +#line 2439 "bison_parser.cpp" break; case YYSYMBOL_literal_list: /* literal_list */ @@ -2449,187 +2448,187 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2453 "bison_parser.cpp" +#line 2452 "bison_parser.cpp" break; case YYSYMBOL_expr_alias: /* expr_alias */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2459 "bison_parser.cpp" +#line 2458 "bison_parser.cpp" break; case YYSYMBOL_expr: /* expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2465 "bison_parser.cpp" +#line 2464 "bison_parser.cpp" break; case YYSYMBOL_operand: /* operand */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2471 "bison_parser.cpp" +#line 2470 "bison_parser.cpp" break; case YYSYMBOL_scalar_expr: /* scalar_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2477 "bison_parser.cpp" +#line 2476 "bison_parser.cpp" break; case YYSYMBOL_unary_expr: /* unary_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2483 "bison_parser.cpp" +#line 2482 "bison_parser.cpp" break; case YYSYMBOL_binary_expr: /* binary_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2489 "bison_parser.cpp" +#line 2488 "bison_parser.cpp" break; case YYSYMBOL_logic_expr: /* logic_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2495 "bison_parser.cpp" +#line 2494 "bison_parser.cpp" break; case YYSYMBOL_in_expr: /* in_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2501 "bison_parser.cpp" +#line 2500 "bison_parser.cpp" break; case YYSYMBOL_case_expr: /* case_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2507 "bison_parser.cpp" +#line 2506 "bison_parser.cpp" break; case YYSYMBOL_case_list: /* case_list */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2513 "bison_parser.cpp" +#line 2512 "bison_parser.cpp" break; case YYSYMBOL_exists_expr: /* exists_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2519 "bison_parser.cpp" +#line 2518 "bison_parser.cpp" break; case YYSYMBOL_comp_expr: /* comp_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2525 "bison_parser.cpp" +#line 2524 "bison_parser.cpp" break; case YYSYMBOL_function_expr: /* function_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2531 "bison_parser.cpp" +#line 2530 "bison_parser.cpp" break; case YYSYMBOL_extract_expr: /* extract_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2537 "bison_parser.cpp" +#line 2536 "bison_parser.cpp" break; case YYSYMBOL_cast_expr: /* cast_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2543 "bison_parser.cpp" +#line 2542 "bison_parser.cpp" break; case YYSYMBOL_datetime_field: /* datetime_field */ #line 152 "bison_parser.y" { } -#line 2549 "bison_parser.cpp" +#line 2548 "bison_parser.cpp" break; case YYSYMBOL_array_expr: /* array_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2555 "bison_parser.cpp" +#line 2554 "bison_parser.cpp" break; case YYSYMBOL_array_index: /* array_index */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2561 "bison_parser.cpp" +#line 2560 "bison_parser.cpp" break; case YYSYMBOL_between_expr: /* between_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2567 "bison_parser.cpp" +#line 2566 "bison_parser.cpp" break; case YYSYMBOL_column_name: /* column_name */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2573 "bison_parser.cpp" +#line 2572 "bison_parser.cpp" break; case YYSYMBOL_literal: /* literal */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2579 "bison_parser.cpp" +#line 2578 "bison_parser.cpp" break; case YYSYMBOL_string_literal: /* string_literal */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2585 "bison_parser.cpp" +#line 2584 "bison_parser.cpp" break; case YYSYMBOL_bool_literal: /* bool_literal */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2591 "bison_parser.cpp" +#line 2590 "bison_parser.cpp" break; case YYSYMBOL_num_literal: /* num_literal */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2597 "bison_parser.cpp" +#line 2596 "bison_parser.cpp" break; case YYSYMBOL_int_literal: /* int_literal */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2603 "bison_parser.cpp" +#line 2602 "bison_parser.cpp" break; case YYSYMBOL_null_literal: /* null_literal */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2609 "bison_parser.cpp" +#line 2608 "bison_parser.cpp" break; case YYSYMBOL_param_expr: /* param_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2615 "bison_parser.cpp" +#line 2614 "bison_parser.cpp" break; case YYSYMBOL_table_ref: /* table_ref */ #line 163 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2621 "bison_parser.cpp" +#line 2620 "bison_parser.cpp" break; case YYSYMBOL_table_ref_atomic: /* table_ref_atomic */ #line 163 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2627 "bison_parser.cpp" +#line 2626 "bison_parser.cpp" break; case YYSYMBOL_nonjoin_table_ref_atomic: /* nonjoin_table_ref_atomic */ #line 163 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2633 "bison_parser.cpp" +#line 2632 "bison_parser.cpp" break; case YYSYMBOL_table_ref_commalist: /* table_ref_commalist */ @@ -2642,103 +2641,103 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).table_vec)); } -#line 2646 "bison_parser.cpp" +#line 2645 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name: /* table_ref_name */ #line 163 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2652 "bison_parser.cpp" +#line 2651 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name_no_alias: /* table_ref_name_no_alias */ #line 163 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2658 "bison_parser.cpp" +#line 2657 "bison_parser.cpp" break; case YYSYMBOL_table_name: /* table_name */ #line 153 "bison_parser.y" { free( (((*yyvaluep).table_name).name) ); free( (((*yyvaluep).table_name).schema) ); } -#line 2664 "bison_parser.cpp" +#line 2663 "bison_parser.cpp" break; case YYSYMBOL_opt_index_name: /* opt_index_name */ #line 154 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2670 "bison_parser.cpp" +#line 2669 "bison_parser.cpp" break; case YYSYMBOL_index_name: /* index_name */ #line 154 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2676 "bison_parser.cpp" +#line 2675 "bison_parser.cpp" break; case YYSYMBOL_table_alias: /* table_alias */ #line 163 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2682 "bison_parser.cpp" +#line 2681 "bison_parser.cpp" break; case YYSYMBOL_opt_table_alias: /* opt_table_alias */ #line 163 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2688 "bison_parser.cpp" +#line 2687 "bison_parser.cpp" break; case YYSYMBOL_alias: /* alias */ #line 163 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2694 "bison_parser.cpp" +#line 2693 "bison_parser.cpp" break; case YYSYMBOL_opt_alias: /* opt_alias */ #line 163 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2700 "bison_parser.cpp" +#line 2699 "bison_parser.cpp" break; case YYSYMBOL_opt_with_clause: /* opt_with_clause */ #line 163 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2706 "bison_parser.cpp" +#line 2705 "bison_parser.cpp" break; case YYSYMBOL_with_clause: /* with_clause */ #line 163 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2712 "bison_parser.cpp" +#line 2711 "bison_parser.cpp" break; case YYSYMBOL_with_description_list: /* with_description_list */ #line 163 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2718 "bison_parser.cpp" +#line 2717 "bison_parser.cpp" break; case YYSYMBOL_with_description: /* with_description */ #line 163 "bison_parser.y" { delete (((*yyvaluep).with_description_t)); } -#line 2724 "bison_parser.cpp" +#line 2723 "bison_parser.cpp" break; case YYSYMBOL_join_clause: /* join_clause */ #line 163 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2730 "bison_parser.cpp" +#line 2729 "bison_parser.cpp" break; case YYSYMBOL_opt_join_type: /* opt_join_type */ #line 152 "bison_parser.y" { } -#line 2736 "bison_parser.cpp" +#line 2735 "bison_parser.cpp" break; case YYSYMBOL_join_condition: /* join_condition */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2742 "bison_parser.cpp" +#line 2741 "bison_parser.cpp" break; case YYSYMBOL_ident_commalist: /* ident_commalist */ @@ -2751,7 +2750,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2755 "bison_parser.cpp" +#line 2754 "bison_parser.cpp" break; default: @@ -2858,7 +2857,7 @@ YYLTYPE yylloc = yyloc_default; yylloc.string_length = 0; } -#line 2862 "bison_parser.cpp" +#line 2861 "bison_parser.cpp" yylsp[0] = yylloc; goto yysetstate; @@ -3086,7 +3085,7 @@ YYLTYPE yylloc = yyloc_default; } delete (yyvsp[-1].stmt_vec); } -#line 3090 "bison_parser.cpp" +#line 3089 "bison_parser.cpp" break; case 3: /* statement_list: statement */ @@ -3097,7 +3096,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.stmt_vec) = new std::vector(); (yyval.stmt_vec)->push_back((yyvsp[0].statement)); } -#line 3101 "bison_parser.cpp" +#line 3100 "bison_parser.cpp" break; case 4: /* statement_list: statement_list ';' statement */ @@ -3108,7 +3107,7 @@ YYLTYPE yylloc = yyloc_default; (yyvsp[-2].stmt_vec)->push_back((yyvsp[0].statement)); (yyval.stmt_vec) = (yyvsp[-2].stmt_vec); } -#line 3112 "bison_parser.cpp" +#line 3111 "bison_parser.cpp" break; case 5: /* statement: prepare_statement opt_hints */ @@ -3117,7 +3116,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3121 "bison_parser.cpp" +#line 3120 "bison_parser.cpp" break; case 6: /* statement: preparable_statement opt_hints */ @@ -3126,7 +3125,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.statement) = (yyvsp[-1].statement); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3130 "bison_parser.cpp" +#line 3129 "bison_parser.cpp" break; case 7: /* statement: show_statement */ @@ -3134,7 +3133,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.statement) = (yyvsp[0].show_stmt); } -#line 3138 "bison_parser.cpp" +#line 3137 "bison_parser.cpp" break; case 8: /* statement: import_statement */ @@ -3142,7 +3141,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.statement) = (yyvsp[0].import_stmt); } -#line 3146 "bison_parser.cpp" +#line 3145 "bison_parser.cpp" break; case 9: /* statement: export_statement */ @@ -3150,91 +3149,91 @@ YYLTYPE yylloc = yyloc_default; { (yyval.statement) = (yyvsp[0].export_stmt); } -#line 3154 "bison_parser.cpp" +#line 3153 "bison_parser.cpp" break; case 10: /* preparable_statement: select_statement */ #line 338 "bison_parser.y" { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 3160 "bison_parser.cpp" +#line 3159 "bison_parser.cpp" break; case 11: /* preparable_statement: create_statement */ #line 339 "bison_parser.y" { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 3166 "bison_parser.cpp" +#line 3165 "bison_parser.cpp" break; case 12: /* preparable_statement: insert_statement */ #line 340 "bison_parser.y" { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 3172 "bison_parser.cpp" +#line 3171 "bison_parser.cpp" break; case 13: /* preparable_statement: delete_statement */ #line 341 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3178 "bison_parser.cpp" +#line 3177 "bison_parser.cpp" break; case 14: /* preparable_statement: truncate_statement */ #line 342 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3184 "bison_parser.cpp" +#line 3183 "bison_parser.cpp" break; case 15: /* preparable_statement: update_statement */ #line 343 "bison_parser.y" { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 3190 "bison_parser.cpp" +#line 3189 "bison_parser.cpp" break; case 16: /* preparable_statement: drop_statement */ #line 344 "bison_parser.y" { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 3196 "bison_parser.cpp" +#line 3195 "bison_parser.cpp" break; case 17: /* preparable_statement: alter_statement */ #line 345 "bison_parser.y" { (yyval.statement) = (yyvsp[0].alter_stmt); } -#line 3202 "bison_parser.cpp" +#line 3201 "bison_parser.cpp" break; case 18: /* preparable_statement: execute_statement */ #line 346 "bison_parser.y" { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 3208 "bison_parser.cpp" +#line 3207 "bison_parser.cpp" break; case 19: /* preparable_statement: transaction_statement */ #line 347 "bison_parser.y" { (yyval.statement) = (yyvsp[0].transaction_stmt); } -#line 3214 "bison_parser.cpp" +#line 3213 "bison_parser.cpp" break; case 20: /* opt_hints: WITH HINT '(' hint_list ')' */ #line 356 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 3220 "bison_parser.cpp" +#line 3219 "bison_parser.cpp" break; case 21: /* opt_hints: %empty */ #line 357 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 3226 "bison_parser.cpp" +#line 3225 "bison_parser.cpp" break; case 22: /* hint_list: hint */ #line 362 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3232 "bison_parser.cpp" +#line 3231 "bison_parser.cpp" break; case 23: /* hint_list: hint_list ',' hint */ #line 363 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3238 "bison_parser.cpp" +#line 3237 "bison_parser.cpp" break; case 24: /* hint: IDENTIFIER */ @@ -3243,7 +3242,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[0].sval); } -#line 3247 "bison_parser.cpp" +#line 3246 "bison_parser.cpp" break; case 25: /* hint: IDENTIFIER '(' literal_list ')' */ @@ -3253,7 +3252,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expr)->name = (yyvsp[-3].sval); (yyval.expr)->exprList = (yyvsp[-1].expr_vec); } -#line 3257 "bison_parser.cpp" +#line 3256 "bison_parser.cpp" break; case 26: /* transaction_statement: BEGIN opt_transaction_keyword */ @@ -3261,7 +3260,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.transaction_stmt) = new TransactionStatement(kBeginTransaction); } -#line 3265 "bison_parser.cpp" +#line 3264 "bison_parser.cpp" break; case 27: /* transaction_statement: ROLLBACK opt_transaction_keyword */ @@ -3269,7 +3268,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.transaction_stmt) = new TransactionStatement(kRollbackTransaction); } -#line 3273 "bison_parser.cpp" +#line 3272 "bison_parser.cpp" break; case 28: /* transaction_statement: COMMIT opt_transaction_keyword */ @@ -3277,7 +3276,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.transaction_stmt) = new TransactionStatement(kCommitTransaction); } -#line 3281 "bison_parser.cpp" +#line 3280 "bison_parser.cpp" break; case 31: /* prepare_statement: PREPARE IDENTIFIER FROM prepare_target_query */ @@ -3287,7 +3286,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.prep_stmt)->name = (yyvsp[-2].sval); (yyval.prep_stmt)->query = (yyvsp[0].sval); } -#line 3291 "bison_parser.cpp" +#line 3290 "bison_parser.cpp" break; case 33: /* execute_statement: EXECUTE IDENTIFIER */ @@ -3296,7 +3295,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[0].sval); } -#line 3300 "bison_parser.cpp" +#line 3299 "bison_parser.cpp" break; case 34: /* execute_statement: EXECUTE IDENTIFIER '(' opt_literal_list ')' */ @@ -3306,7 +3305,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.exec_stmt)->name = (yyvsp[-3].sval); (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); } -#line 3310 "bison_parser.cpp" +#line 3309 "bison_parser.cpp" break; case 35: /* import_statement: IMPORT FROM file_type FILE file_path INTO table_name */ @@ -3317,7 +3316,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.import_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3321 "bison_parser.cpp" +#line 3320 "bison_parser.cpp" break; case 36: /* import_statement: COPY table_name FROM file_path opt_file_type */ @@ -3328,7 +3327,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.import_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3332 "bison_parser.cpp" +#line 3331 "bison_parser.cpp" break; case 37: /* file_type: IDENTIFIER */ @@ -3347,13 +3346,13 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[0].sval)); } -#line 3351 "bison_parser.cpp" +#line 3350 "bison_parser.cpp" break; case 38: /* file_path: string_literal */ #line 463 "bison_parser.y" { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 3357 "bison_parser.cpp" +#line 3356 "bison_parser.cpp" break; case 39: /* opt_file_type: WITH FORMAT file_type */ @@ -3361,13 +3360,13 @@ YYLTYPE yylloc = yyloc_default; { (yyval.import_type_t) = (yyvsp[0].import_type_t); } -#line 3365 "bison_parser.cpp" +#line 3364 "bison_parser.cpp" break; case 40: /* opt_file_type: %empty */ #line 470 "bison_parser.y" { (yyval.import_type_t) = kImportAuto; } -#line 3371 "bison_parser.cpp" +#line 3370 "bison_parser.cpp" break; case 41: /* export_statement: COPY table_name TO file_path opt_file_type */ @@ -3378,7 +3377,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.export_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.export_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3382 "bison_parser.cpp" +#line 3381 "bison_parser.cpp" break; case 42: /* show_statement: SHOW TABLES */ @@ -3386,7 +3385,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.show_stmt) = new ShowStatement(kShowTables); } -#line 3390 "bison_parser.cpp" +#line 3389 "bison_parser.cpp" break; case 43: /* show_statement: SHOW COLUMNS table_name */ @@ -3396,7 +3395,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.show_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.show_stmt)->name = (yyvsp[0].table_name).name; } -#line 3400 "bison_parser.cpp" +#line 3399 "bison_parser.cpp" break; case 44: /* show_statement: DESCRIBE table_name */ @@ -3406,7 +3405,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.show_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.show_stmt)->name = (yyvsp[0].table_name).name; } -#line 3410 "bison_parser.cpp" +#line 3409 "bison_parser.cpp" break; case 45: /* create_statement: CREATE TABLE opt_not_exists table_name FROM IDENTIFIER FILE file_path */ @@ -3424,20 +3423,20 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].sval)); (yyval.create_stmt)->filePath = (yyvsp[0].sval); } -#line 3428 "bison_parser.cpp" +#line 3427 "bison_parser.cpp" break; - case 46: /* create_statement: CREATE TABLE opt_not_exists table_name '(' column_def_commalist opt_table_key_constraints ')' */ + case 46: /* create_statement: CREATE TABLE opt_not_exists table_name '(' column_def_commalist opt_table_constraints ')' */ #line 528 "bison_parser.y" - { + { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); (yyval.create_stmt)->schema = (yyvsp[-4].table_name).schema; (yyval.create_stmt)->tableName = (yyvsp[-4].table_name).name; (yyval.create_stmt)->columns = (yyvsp[-2].column_vec); - (yyval.create_stmt)->tableKeyConstraints = (yyvsp[-1].table_key_constraint_vec); + (yyval.create_stmt)->tableConstraints = (yyvsp[-1].table_constraint_vec); } -#line 3441 "bison_parser.cpp" +#line 3440 "bison_parser.cpp" break; case 47: /* create_statement: CREATE TABLE opt_not_exists table_name AS select_statement */ @@ -3449,7 +3448,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-2].table_name).name; (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3453 "bison_parser.cpp" +#line 3452 "bison_parser.cpp" break; case 48: /* create_statement: CREATE INDEX opt_not_exists opt_index_name ON table_name '(' ident_commalist ')' */ @@ -3461,7 +3460,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->indexColumns = (yyvsp[-1].str_vec); } -#line 3465 "bison_parser.cpp" +#line 3464 "bison_parser.cpp" break; case 49: /* create_statement: CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement */ @@ -3474,31 +3473,31 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3478 "bison_parser.cpp" +#line 3477 "bison_parser.cpp" break; case 50: /* opt_not_exists: IF NOT EXISTS */ #line 561 "bison_parser.y" { (yyval.bval) = true; } -#line 3484 "bison_parser.cpp" +#line 3483 "bison_parser.cpp" break; case 51: /* opt_not_exists: %empty */ #line 562 "bison_parser.y" { (yyval.bval) = false; } -#line 3490 "bison_parser.cpp" +#line 3489 "bison_parser.cpp" break; case 52: /* column_def_commalist: column_def */ #line 566 "bison_parser.y" { (yyval.column_vec) = new std::vector(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); } -#line 3496 "bison_parser.cpp" +#line 3495 "bison_parser.cpp" break; case 53: /* column_def_commalist: column_def_commalist ',' column_def */ #line 567 "bison_parser.y" { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } -#line 3502 "bison_parser.cpp" +#line 3501 "bison_parser.cpp" break; case 54: /* column_def: IDENTIFIER column_type opt_column_nullable opt_column_constraint */ @@ -3506,175 +3505,175 @@ YYLTYPE yylloc = yyloc_default; { (yyval.column_t) = new ColumnDefinition((yyvsp[-3].sval), (yyvsp[-2].column_type_t), (yyvsp[-1].bval), (yyvsp[0].column_constraint_t)); } -#line 3510 "bison_parser.cpp" +#line 3509 "bison_parser.cpp" break; case 55: /* column_type: INT */ #line 577 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3516 "bison_parser.cpp" +#line 3515 "bison_parser.cpp" break; case 56: /* column_type: INTEGER */ #line 578 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3522 "bison_parser.cpp" +#line 3521 "bison_parser.cpp" break; case 57: /* column_type: LONG */ #line 579 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::LONG}; } -#line 3528 "bison_parser.cpp" +#line 3527 "bison_parser.cpp" break; case 58: /* column_type: FLOAT */ #line 580 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3534 "bison_parser.cpp" +#line 3533 "bison_parser.cpp" break; case 59: /* column_type: DECIMAL opt_decimal_specification */ #line 581 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DECIMAL, 0, (yyvsp[0].decimal_specification_t)}; } -#line 3540 "bison_parser.cpp" +#line 3539 "bison_parser.cpp" break; case 60: /* column_type: DOUBLE */ #line 582 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } -#line 3546 "bison_parser.cpp" +#line 3545 "bison_parser.cpp" break; case 61: /* column_type: REAL */ #line 583 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::REAL}; } -#line 3552 "bison_parser.cpp" +#line 3551 "bison_parser.cpp" break; case 62: /* column_type: VARCHAR '(' INTVAL ')' */ #line 584 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3558 "bison_parser.cpp" +#line 3557 "bison_parser.cpp" break; case 63: /* column_type: CHARACTER VARYING '(' INTVAL ')' */ #line 585 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR_VARYING, (yyvsp[-1].ival)}; } -#line 3564 "bison_parser.cpp" +#line 3563 "bison_parser.cpp" break; case 64: /* column_type: CHAR '(' INTVAL ')' */ #line 586 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } -#line 3570 "bison_parser.cpp" +#line 3569 "bison_parser.cpp" break; case 65: /* column_type: TEXT */ #line 587 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } -#line 3576 "bison_parser.cpp" +#line 3575 "bison_parser.cpp" break; case 66: /* column_type: TIME */ #line 588 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TIME}; } -#line 3582 "bison_parser.cpp" +#line 3581 "bison_parser.cpp" break; case 67: /* column_type: DATETIME */ #line 589 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } -#line 3588 "bison_parser.cpp" +#line 3587 "bison_parser.cpp" break; case 68: /* column_type: DATE */ #line 590 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATE}; } -#line 3594 "bison_parser.cpp" +#line 3593 "bison_parser.cpp" break; case 69: /* opt_decimal_specification: '(' INTVAL ',' INTVAL ')' */ #line 594 "bison_parser.y" { (yyval.decimal_specification_t) = DecimalSpecification{(yyvsp[-3].ival), (yyvsp[-1].ival)}; } -#line 3600 "bison_parser.cpp" +#line 3599 "bison_parser.cpp" break; case 70: /* opt_decimal_specification: '(' INTVAL ')' */ #line 595 "bison_parser.y" { (yyval.decimal_specification_t) = DecimalSpecification{(yyvsp[-1].ival), 0}; } -#line 3606 "bison_parser.cpp" +#line 3605 "bison_parser.cpp" break; case 71: /* opt_decimal_specification: %empty */ #line 596 "bison_parser.y" { (yyval.decimal_specification_t) = DecimalSpecification{0, 0}; } -#line 3612 "bison_parser.cpp" +#line 3611 "bison_parser.cpp" break; case 72: /* opt_column_nullable: NULL */ #line 599 "bison_parser.y" { (yyval.bval) = true; } -#line 3618 "bison_parser.cpp" +#line 3617 "bison_parser.cpp" break; case 73: /* opt_column_nullable: NOT NULL */ #line 600 "bison_parser.y" { (yyval.bval) = false; } -#line 3624 "bison_parser.cpp" +#line 3623 "bison_parser.cpp" break; case 74: /* opt_column_nullable: %empty */ #line 601 "bison_parser.y" { (yyval.bval) = false; } -#line 3630 "bison_parser.cpp" +#line 3629 "bison_parser.cpp" break; case 75: /* opt_column_constraint: PRIMARY KEY */ #line 605 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::PRIMARY_KEY; } -#line 3636 "bison_parser.cpp" +#line 3635 "bison_parser.cpp" break; case 76: /* opt_column_constraint: UNIQUE */ #line 606 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::UNIQUE; } -#line 3642 "bison_parser.cpp" +#line 3641 "bison_parser.cpp" break; case 77: /* opt_column_constraint: %empty */ #line 607 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::NOT_SET; } -#line 3648 "bison_parser.cpp" +#line 3647 "bison_parser.cpp" break; - case 78: /* opt_table_key_constraints: table_key_constraint */ + case 78: /* opt_table_constraints: table_constraint */ #line 611 "bison_parser.y" - {(yyval.table_key_constraint_vec) = new std::vector(); (yyval.table_key_constraint_vec)->push_back((yyvsp[0].table_key_constraint_t)); } -#line 3654 "bison_parser.cpp" + {(yyval.table_constraint_vec) = new std::vector(); (yyval.table_constraint_vec)->push_back((yyvsp[0].table_constraint_t)); } +#line 3653 "bison_parser.cpp" break; - case 79: /* opt_table_key_constraints: opt_table_key_constraints table_key_constraint */ + case 79: /* opt_table_constraints: opt_table_constraints table_constraint */ #line 612 "bison_parser.y" - { (yyvsp[-1].table_key_constraint_vec)->push_back((yyvsp[0].table_key_constraint_t)); (yyval.table_key_constraint_vec) = (yyvsp[-1].table_key_constraint_vec); } -#line 3660 "bison_parser.cpp" + { (yyvsp[-1].table_constraint_vec)->push_back((yyvsp[0].table_constraint_t)); (yyval.table_constraint_vec) = (yyvsp[-1].table_constraint_vec); } +#line 3659 "bison_parser.cpp" break; - case 80: /* opt_table_key_constraints: %empty */ + case 80: /* opt_table_constraints: %empty */ #line 613 "bison_parser.y" - {(yyval.table_key_constraint_vec) = new std::vector(); } -#line 3666 "bison_parser.cpp" + {(yyval.table_constraint_vec) = new std::vector(); } +#line 3665 "bison_parser.cpp" break; - case 81: /* table_key_constraint: ',' PRIMARY KEY '(' ident_commalist ')' */ + case 81: /* table_constraint: ',' PRIMARY KEY '(' ident_commalist ')' */ #line 617 "bison_parser.y" - { (yyval.table_key_constraint_t) = new TableKeyConstraint(ConstraintType::PRIMARY_KEY, (yyvsp[-1].str_vec)); } -#line 3672 "bison_parser.cpp" + { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::PRIMARY_KEY, (yyvsp[-1].str_vec)); } +#line 3671 "bison_parser.cpp" break; - case 82: /* table_key_constraint: ',' UNIQUE '(' ident_commalist ')' */ + case 82: /* table_constraint: ',' UNIQUE '(' ident_commalist ')' */ #line 618 "bison_parser.y" - { (yyval.table_key_constraint_t) = new TableKeyConstraint(ConstraintType::UNIQUE, (yyvsp[-1].str_vec)); } -#line 3678 "bison_parser.cpp" + { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::UNIQUE, (yyvsp[-1].str_vec)); } +#line 3677 "bison_parser.cpp" break; case 83: /* drop_statement: DROP TABLE opt_exists table_name */ @@ -3685,7 +3684,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.drop_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; } -#line 3689 "bison_parser.cpp" +#line 3688 "bison_parser.cpp" break; case 84: /* drop_statement: DROP VIEW opt_exists table_name */ @@ -3696,7 +3695,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.drop_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; } -#line 3700 "bison_parser.cpp" +#line 3699 "bison_parser.cpp" break; case 85: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ @@ -3706,7 +3705,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.drop_stmt)->ifExists = false; (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 3710 "bison_parser.cpp" +#line 3709 "bison_parser.cpp" break; case 86: /* drop_statement: DROP INDEX opt_exists index_name ON table_name */ @@ -3717,19 +3716,19 @@ YYLTYPE yylloc = yyloc_default; (yyval.drop_stmt)->ifExists = (yyvsp[-3].bval); (yyval.drop_stmt)->index_name = (yyvsp[-2].sval); } -#line 3721 "bison_parser.cpp" +#line 3720 "bison_parser.cpp" break; case 87: /* opt_exists: IF EXISTS */ #line 652 "bison_parser.y" { (yyval.bval) = true; } -#line 3727 "bison_parser.cpp" +#line 3726 "bison_parser.cpp" break; case 88: /* opt_exists: %empty */ #line 653 "bison_parser.y" { (yyval.bval) = false; } -#line 3733 "bison_parser.cpp" +#line 3732 "bison_parser.cpp" break; case 89: /* alter_statement: ALTER TABLE table_name DROP COLUMN opt_exists column_name */ @@ -3741,7 +3740,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.alter_stmt)->name = (yyvsp[-4].table_name).name; (yyval.alter_stmt)->column_name = (yyvsp[0].expr)->name; } -#line 3745 "bison_parser.cpp" +#line 3744 "bison_parser.cpp" break; case 90: /* delete_statement: DELETE FROM table_name opt_where */ @@ -3752,7 +3751,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.delete_stmt)->tableName = (yyvsp[-1].table_name).name; (yyval.delete_stmt)->expr = (yyvsp[0].expr); } -#line 3756 "bison_parser.cpp" +#line 3755 "bison_parser.cpp" break; case 91: /* truncate_statement: TRUNCATE table_name */ @@ -3762,7 +3761,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3766 "bison_parser.cpp" +#line 3765 "bison_parser.cpp" break; case 92: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ @@ -3774,7 +3773,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } -#line 3778 "bison_parser.cpp" +#line 3777 "bison_parser.cpp" break; case 93: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ @@ -3786,19 +3785,19 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } -#line 3790 "bison_parser.cpp" +#line 3789 "bison_parser.cpp" break; case 94: /* opt_column_list: '(' ident_commalist ')' */ #line 717 "bison_parser.y" { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 3796 "bison_parser.cpp" +#line 3795 "bison_parser.cpp" break; case 95: /* opt_column_list: %empty */ #line 718 "bison_parser.y" { (yyval.str_vec) = nullptr; } -#line 3802 "bison_parser.cpp" +#line 3801 "bison_parser.cpp" break; case 96: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ @@ -3809,19 +3808,19 @@ YYLTYPE yylloc = yyloc_default; (yyval.update_stmt)->updates = (yyvsp[-1].update_vec); (yyval.update_stmt)->where = (yyvsp[0].expr); } -#line 3813 "bison_parser.cpp" +#line 3812 "bison_parser.cpp" break; case 97: /* update_clause_commalist: update_clause */ #line 737 "bison_parser.y" { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 3819 "bison_parser.cpp" +#line 3818 "bison_parser.cpp" break; case 98: /* update_clause_commalist: update_clause_commalist ',' update_clause */ #line 738 "bison_parser.y" { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 3825 "bison_parser.cpp" +#line 3824 "bison_parser.cpp" break; case 99: /* update_clause: IDENTIFIER '=' expr */ @@ -3831,7 +3830,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 3835 "bison_parser.cpp" +#line 3834 "bison_parser.cpp" break; case 100: /* select_statement: opt_with_clause select_with_paren */ @@ -3840,7 +3839,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3844 "bison_parser.cpp" +#line 3843 "bison_parser.cpp" break; case 101: /* select_statement: opt_with_clause select_no_paren */ @@ -3849,7 +3848,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3853 "bison_parser.cpp" +#line 3852 "bison_parser.cpp" break; case 102: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ @@ -3865,13 +3864,13 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); (yyval.select_stmt)->withDescriptions = (yyvsp[-5].with_description_vec); } -#line 3869 "bison_parser.cpp" +#line 3868 "bison_parser.cpp" break; case 105: /* select_within_set_operation_no_parentheses: select_clause */ #line 780 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); } -#line 3875 "bison_parser.cpp" +#line 3874 "bison_parser.cpp" break; case 106: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ @@ -3884,19 +3883,19 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->push_back((yyvsp[-1].set_operator_t)); (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[0].select_stmt); } -#line 3888 "bison_parser.cpp" +#line 3887 "bison_parser.cpp" break; case 107: /* select_with_paren: '(' select_no_paren ')' */ #line 792 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3894 "bison_parser.cpp" +#line 3893 "bison_parser.cpp" break; case 108: /* select_with_paren: '(' select_with_paren ')' */ #line 793 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3900 "bison_parser.cpp" +#line 3899 "bison_parser.cpp" break; case 109: /* select_no_paren: select_clause opt_order opt_limit */ @@ -3911,7 +3910,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3915 "bison_parser.cpp" +#line 3914 "bison_parser.cpp" break; case 110: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ @@ -3926,7 +3925,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); } -#line 3930 "bison_parser.cpp" +#line 3929 "bison_parser.cpp" break; case 111: /* set_operator: set_type opt_all */ @@ -3935,7 +3934,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.set_operator_t) = (yyvsp[-1].set_operator_t); (yyval.set_operator_t)->isAll = (yyvsp[0].bval); } -#line 3939 "bison_parser.cpp" +#line 3938 "bison_parser.cpp" break; case 112: /* set_type: UNION */ @@ -3944,7 +3943,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetUnion; } -#line 3948 "bison_parser.cpp" +#line 3947 "bison_parser.cpp" break; case 113: /* set_type: INTERSECT */ @@ -3953,7 +3952,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetIntersect; } -#line 3957 "bison_parser.cpp" +#line 3956 "bison_parser.cpp" break; case 114: /* set_type: EXCEPT */ @@ -3962,7 +3961,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetExcept; } -#line 3966 "bison_parser.cpp" +#line 3965 "bison_parser.cpp" break; case 115: /* opt_all: ALL */ @@ -3970,7 +3969,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.bval) = true; } -#line 3974 "bison_parser.cpp" +#line 3973 "bison_parser.cpp" break; case 116: /* opt_all: %empty */ @@ -3978,7 +3977,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.bval) = false; } -#line 3982 "bison_parser.cpp" +#line 3981 "bison_parser.cpp" break; case 117: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ @@ -3992,49 +3991,49 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 3996 "bison_parser.cpp" +#line 3995 "bison_parser.cpp" break; case 118: /* opt_distinct: DISTINCT */ #line 863 "bison_parser.y" { (yyval.bval) = true; } -#line 4002 "bison_parser.cpp" +#line 4001 "bison_parser.cpp" break; case 119: /* opt_distinct: %empty */ #line 864 "bison_parser.y" { (yyval.bval) = false; } -#line 4008 "bison_parser.cpp" +#line 4007 "bison_parser.cpp" break; case 121: /* opt_from_clause: from_clause */ #line 872 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 4014 "bison_parser.cpp" +#line 4013 "bison_parser.cpp" break; case 122: /* opt_from_clause: %empty */ #line 873 "bison_parser.y" { (yyval.table) = nullptr; } -#line 4020 "bison_parser.cpp" +#line 4019 "bison_parser.cpp" break; case 123: /* from_clause: FROM table_ref */ #line 877 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 4026 "bison_parser.cpp" +#line 4025 "bison_parser.cpp" break; case 124: /* opt_where: WHERE expr */ #line 882 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 4032 "bison_parser.cpp" +#line 4031 "bison_parser.cpp" break; case 125: /* opt_where: %empty */ #line 883 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 4038 "bison_parser.cpp" +#line 4037 "bison_parser.cpp" break; case 126: /* opt_group: GROUP BY expr_list opt_having */ @@ -4044,157 +4043,157 @@ YYLTYPE yylloc = yyloc_default; (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 4048 "bison_parser.cpp" +#line 4047 "bison_parser.cpp" break; case 127: /* opt_group: %empty */ #line 892 "bison_parser.y" { (yyval.group_t) = nullptr; } -#line 4054 "bison_parser.cpp" +#line 4053 "bison_parser.cpp" break; case 128: /* opt_having: HAVING expr */ #line 896 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 4060 "bison_parser.cpp" +#line 4059 "bison_parser.cpp" break; case 129: /* opt_having: %empty */ #line 897 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 4066 "bison_parser.cpp" +#line 4065 "bison_parser.cpp" break; case 130: /* opt_order: ORDER BY order_list */ #line 901 "bison_parser.y" { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 4072 "bison_parser.cpp" +#line 4071 "bison_parser.cpp" break; case 131: /* opt_order: %empty */ #line 902 "bison_parser.y" { (yyval.order_vec) = nullptr; } -#line 4078 "bison_parser.cpp" +#line 4077 "bison_parser.cpp" break; case 132: /* order_list: order_desc */ #line 906 "bison_parser.y" { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 4084 "bison_parser.cpp" +#line 4083 "bison_parser.cpp" break; case 133: /* order_list: order_list ',' order_desc */ #line 907 "bison_parser.y" { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 4090 "bison_parser.cpp" +#line 4089 "bison_parser.cpp" break; case 134: /* order_desc: expr opt_order_type */ #line 911 "bison_parser.y" { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 4096 "bison_parser.cpp" +#line 4095 "bison_parser.cpp" break; case 135: /* opt_order_type: ASC */ #line 915 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 4102 "bison_parser.cpp" +#line 4101 "bison_parser.cpp" break; case 136: /* opt_order_type: DESC */ #line 916 "bison_parser.y" { (yyval.order_type) = kOrderDesc; } -#line 4108 "bison_parser.cpp" +#line 4107 "bison_parser.cpp" break; case 137: /* opt_order_type: %empty */ #line 917 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 4114 "bison_parser.cpp" +#line 4113 "bison_parser.cpp" break; case 138: /* opt_top: TOP int_literal */ #line 923 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 4120 "bison_parser.cpp" +#line 4119 "bison_parser.cpp" break; case 139: /* opt_top: %empty */ #line 924 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 4126 "bison_parser.cpp" +#line 4125 "bison_parser.cpp" break; case 140: /* opt_limit: LIMIT expr */ #line 928 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 4132 "bison_parser.cpp" +#line 4131 "bison_parser.cpp" break; case 141: /* opt_limit: OFFSET expr */ #line 929 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 4138 "bison_parser.cpp" +#line 4137 "bison_parser.cpp" break; case 142: /* opt_limit: LIMIT expr OFFSET expr */ #line 930 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4144 "bison_parser.cpp" +#line 4143 "bison_parser.cpp" break; case 143: /* opt_limit: LIMIT ALL */ #line 931 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, nullptr); } -#line 4150 "bison_parser.cpp" +#line 4149 "bison_parser.cpp" break; case 144: /* opt_limit: LIMIT ALL OFFSET expr */ #line 932 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 4156 "bison_parser.cpp" +#line 4155 "bison_parser.cpp" break; case 145: /* opt_limit: %empty */ #line 933 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 4162 "bison_parser.cpp" +#line 4161 "bison_parser.cpp" break; case 146: /* expr_list: expr_alias */ #line 940 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4168 "bison_parser.cpp" +#line 4167 "bison_parser.cpp" break; case 147: /* expr_list: expr_list ',' expr_alias */ #line 941 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4174 "bison_parser.cpp" +#line 4173 "bison_parser.cpp" break; case 148: /* opt_literal_list: literal_list */ #line 945 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[0].expr_vec); } -#line 4180 "bison_parser.cpp" +#line 4179 "bison_parser.cpp" break; case 149: /* opt_literal_list: %empty */ #line 946 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 4186 "bison_parser.cpp" +#line 4185 "bison_parser.cpp" break; case 150: /* literal_list: literal */ #line 950 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4192 "bison_parser.cpp" +#line 4191 "bison_parser.cpp" break; case 151: /* literal_list: literal_list ',' literal */ #line 951 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4198 "bison_parser.cpp" +#line 4197 "bison_parser.cpp" break; case 152: /* expr_alias: expr opt_alias */ @@ -4206,373 +4205,373 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].alias_t); } } -#line 4210 "bison_parser.cpp" +#line 4209 "bison_parser.cpp" break; case 158: /* operand: '(' expr ')' */ #line 973 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); } -#line 4216 "bison_parser.cpp" +#line 4215 "bison_parser.cpp" break; case 168: /* operand: '(' select_no_paren ')' */ #line 983 "bison_parser.y" { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 4222 "bison_parser.cpp" +#line 4221 "bison_parser.cpp" break; case 171: /* unary_expr: '-' operand */ #line 992 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 4228 "bison_parser.cpp" +#line 4227 "bison_parser.cpp" break; case 172: /* unary_expr: NOT operand */ #line 993 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 4234 "bison_parser.cpp" +#line 4233 "bison_parser.cpp" break; case 173: /* unary_expr: operand ISNULL */ #line 994 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 4240 "bison_parser.cpp" +#line 4239 "bison_parser.cpp" break; case 174: /* unary_expr: operand IS NULL */ #line 995 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 4246 "bison_parser.cpp" +#line 4245 "bison_parser.cpp" break; case 175: /* unary_expr: operand IS NOT NULL */ #line 996 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 4252 "bison_parser.cpp" +#line 4251 "bison_parser.cpp" break; case 177: /* binary_expr: operand '-' operand */ #line 1001 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 4258 "bison_parser.cpp" +#line 4257 "bison_parser.cpp" break; case 178: /* binary_expr: operand '+' operand */ #line 1002 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 4264 "bison_parser.cpp" +#line 4263 "bison_parser.cpp" break; case 179: /* binary_expr: operand '/' operand */ #line 1003 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 4270 "bison_parser.cpp" +#line 4269 "bison_parser.cpp" break; case 180: /* binary_expr: operand '*' operand */ #line 1004 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 4276 "bison_parser.cpp" +#line 4275 "bison_parser.cpp" break; case 181: /* binary_expr: operand '%' operand */ #line 1005 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 4282 "bison_parser.cpp" +#line 4281 "bison_parser.cpp" break; case 182: /* binary_expr: operand '^' operand */ #line 1006 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 4288 "bison_parser.cpp" +#line 4287 "bison_parser.cpp" break; case 183: /* binary_expr: operand LIKE operand */ #line 1007 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 4294 "bison_parser.cpp" +#line 4293 "bison_parser.cpp" break; case 184: /* binary_expr: operand NOT LIKE operand */ #line 1008 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 4300 "bison_parser.cpp" +#line 4299 "bison_parser.cpp" break; case 185: /* binary_expr: operand ILIKE operand */ #line 1009 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 4306 "bison_parser.cpp" +#line 4305 "bison_parser.cpp" break; case 186: /* binary_expr: operand CONCAT operand */ #line 1010 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 4312 "bison_parser.cpp" +#line 4311 "bison_parser.cpp" break; case 187: /* logic_expr: expr AND expr */ #line 1014 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 4318 "bison_parser.cpp" +#line 4317 "bison_parser.cpp" break; case 188: /* logic_expr: expr OR expr */ #line 1015 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 4324 "bison_parser.cpp" +#line 4323 "bison_parser.cpp" break; case 189: /* in_expr: operand IN '(' expr_list ')' */ #line 1019 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 4330 "bison_parser.cpp" +#line 4329 "bison_parser.cpp" break; case 190: /* in_expr: operand NOT IN '(' expr_list ')' */ #line 1020 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 4336 "bison_parser.cpp" +#line 4335 "bison_parser.cpp" break; case 191: /* in_expr: operand IN '(' select_no_paren ')' */ #line 1021 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 4342 "bison_parser.cpp" +#line 4341 "bison_parser.cpp" break; case 192: /* in_expr: operand NOT IN '(' select_no_paren ')' */ #line 1022 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 4348 "bison_parser.cpp" +#line 4347 "bison_parser.cpp" break; case 193: /* case_expr: CASE expr case_list END */ #line 1028 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } -#line 4354 "bison_parser.cpp" +#line 4353 "bison_parser.cpp" break; case 194: /* case_expr: CASE expr case_list ELSE expr END */ #line 1029 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4360 "bison_parser.cpp" +#line 4359 "bison_parser.cpp" break; case 195: /* case_expr: CASE case_list END */ #line 1030 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } -#line 4366 "bison_parser.cpp" +#line 4365 "bison_parser.cpp" break; case 196: /* case_expr: CASE case_list ELSE expr END */ #line 1031 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4372 "bison_parser.cpp" +#line 4371 "bison_parser.cpp" break; case 197: /* case_list: WHEN expr THEN expr */ #line 1035 "bison_parser.y" { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4378 "bison_parser.cpp" +#line 4377 "bison_parser.cpp" break; case 198: /* case_list: case_list WHEN expr THEN expr */ #line 1036 "bison_parser.y" { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4384 "bison_parser.cpp" +#line 4383 "bison_parser.cpp" break; case 199: /* exists_expr: EXISTS '(' select_no_paren ')' */ #line 1040 "bison_parser.y" { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 4390 "bison_parser.cpp" +#line 4389 "bison_parser.cpp" break; case 200: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ #line 1041 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 4396 "bison_parser.cpp" +#line 4395 "bison_parser.cpp" break; case 201: /* comp_expr: operand '=' operand */ #line 1045 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4402 "bison_parser.cpp" +#line 4401 "bison_parser.cpp" break; case 202: /* comp_expr: operand EQUALS operand */ #line 1046 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4408 "bison_parser.cpp" +#line 4407 "bison_parser.cpp" break; case 203: /* comp_expr: operand NOTEQUALS operand */ #line 1047 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 4414 "bison_parser.cpp" +#line 4413 "bison_parser.cpp" break; case 204: /* comp_expr: operand '<' operand */ #line 1048 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 4420 "bison_parser.cpp" +#line 4419 "bison_parser.cpp" break; case 205: /* comp_expr: operand '>' operand */ #line 1049 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 4426 "bison_parser.cpp" +#line 4425 "bison_parser.cpp" break; case 206: /* comp_expr: operand LESSEQ operand */ #line 1050 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 4432 "bison_parser.cpp" +#line 4431 "bison_parser.cpp" break; case 207: /* comp_expr: operand GREATEREQ operand */ #line 1051 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 4438 "bison_parser.cpp" +#line 4437 "bison_parser.cpp" break; case 208: /* function_expr: IDENTIFIER '(' ')' */ #line 1055 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 4444 "bison_parser.cpp" +#line 4443 "bison_parser.cpp" break; case 209: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ #line 1056 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 4450 "bison_parser.cpp" +#line 4449 "bison_parser.cpp" break; case 210: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ #line 1060 "bison_parser.y" { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } -#line 4456 "bison_parser.cpp" +#line 4455 "bison_parser.cpp" break; case 211: /* cast_expr: CAST '(' expr AS column_type ')' */ #line 1064 "bison_parser.y" { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } -#line 4462 "bison_parser.cpp" +#line 4461 "bison_parser.cpp" break; case 212: /* datetime_field: SECOND */ #line 1068 "bison_parser.y" { (yyval.datetime_field) = kDatetimeSecond; } -#line 4468 "bison_parser.cpp" +#line 4467 "bison_parser.cpp" break; case 213: /* datetime_field: MINUTE */ #line 1069 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMinute; } -#line 4474 "bison_parser.cpp" +#line 4473 "bison_parser.cpp" break; case 214: /* datetime_field: HOUR */ #line 1070 "bison_parser.y" { (yyval.datetime_field) = kDatetimeHour; } -#line 4480 "bison_parser.cpp" +#line 4479 "bison_parser.cpp" break; case 215: /* datetime_field: DAY */ #line 1071 "bison_parser.y" { (yyval.datetime_field) = kDatetimeDay; } -#line 4486 "bison_parser.cpp" +#line 4485 "bison_parser.cpp" break; case 216: /* datetime_field: MONTH */ #line 1072 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMonth; } -#line 4492 "bison_parser.cpp" +#line 4491 "bison_parser.cpp" break; case 217: /* datetime_field: YEAR */ #line 1073 "bison_parser.y" { (yyval.datetime_field) = kDatetimeYear; } -#line 4498 "bison_parser.cpp" +#line 4497 "bison_parser.cpp" break; case 218: /* array_expr: ARRAY '[' expr_list ']' */ #line 1077 "bison_parser.y" { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 4504 "bison_parser.cpp" +#line 4503 "bison_parser.cpp" break; case 219: /* array_index: operand '[' int_literal ']' */ #line 1081 "bison_parser.y" { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 4510 "bison_parser.cpp" +#line 4509 "bison_parser.cpp" break; case 220: /* between_expr: operand BETWEEN operand AND operand */ #line 1085 "bison_parser.y" { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4516 "bison_parser.cpp" +#line 4515 "bison_parser.cpp" break; case 221: /* column_name: IDENTIFIER */ #line 1089 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 4522 "bison_parser.cpp" +#line 4521 "bison_parser.cpp" break; case 222: /* column_name: IDENTIFIER '.' IDENTIFIER */ #line 1090 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 4528 "bison_parser.cpp" +#line 4527 "bison_parser.cpp" break; case 223: /* column_name: '*' */ #line 1091 "bison_parser.y" { (yyval.expr) = Expr::makeStar(); } -#line 4534 "bison_parser.cpp" +#line 4533 "bison_parser.cpp" break; case 224: /* column_name: IDENTIFIER '.' '*' */ #line 1092 "bison_parser.y" { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 4540 "bison_parser.cpp" +#line 4539 "bison_parser.cpp" break; case 230: /* string_literal: STRING */ #line 1104 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 4546 "bison_parser.cpp" +#line 4545 "bison_parser.cpp" break; case 231: /* bool_literal: TRUE */ #line 1108 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(true); } -#line 4552 "bison_parser.cpp" +#line 4551 "bison_parser.cpp" break; case 232: /* bool_literal: FALSE */ #line 1109 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(false); } -#line 4558 "bison_parser.cpp" +#line 4557 "bison_parser.cpp" break; case 233: /* num_literal: FLOATVAL */ #line 1113 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 4564 "bison_parser.cpp" +#line 4563 "bison_parser.cpp" break; case 235: /* int_literal: INTVAL */ #line 1118 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 4570 "bison_parser.cpp" +#line 4569 "bison_parser.cpp" break; case 236: /* null_literal: NULL */ #line 1122 "bison_parser.y" { (yyval.expr) = Expr::makeNullLiteral(); } -#line 4576 "bison_parser.cpp" +#line 4575 "bison_parser.cpp" break; case 237: /* param_expr: '?' */ @@ -4582,7 +4581,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 4586 "bison_parser.cpp" +#line 4585 "bison_parser.cpp" break; case 239: /* table_ref: table_ref_commalist ',' table_ref_atomic */ @@ -4593,7 +4592,7 @@ YYLTYPE yylloc = yyloc_default; tbl->list = (yyvsp[-2].table_vec); (yyval.table) = tbl; } -#line 4597 "bison_parser.cpp" +#line 4596 "bison_parser.cpp" break; case 243: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ @@ -4604,19 +4603,19 @@ YYLTYPE yylloc = yyloc_default; tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4608 "bison_parser.cpp" +#line 4607 "bison_parser.cpp" break; case 244: /* table_ref_commalist: table_ref_atomic */ #line 1164 "bison_parser.y" { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 4614 "bison_parser.cpp" +#line 4613 "bison_parser.cpp" break; case 245: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ #line 1165 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 4620 "bison_parser.cpp" +#line 4619 "bison_parser.cpp" break; case 246: /* table_ref_name: table_name opt_table_alias */ @@ -4628,7 +4627,7 @@ YYLTYPE yylloc = yyloc_default; tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4632 "bison_parser.cpp" +#line 4631 "bison_parser.cpp" break; case 247: /* table_ref_name_no_alias: table_name */ @@ -4638,79 +4637,79 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->schema = (yyvsp[0].table_name).schema; (yyval.table)->name = (yyvsp[0].table_name).name; } -#line 4642 "bison_parser.cpp" +#line 4641 "bison_parser.cpp" break; case 248: /* table_name: IDENTIFIER */ #line 1190 "bison_parser.y" { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} -#line 4648 "bison_parser.cpp" +#line 4647 "bison_parser.cpp" break; case 249: /* table_name: IDENTIFIER '.' IDENTIFIER */ #line 1191 "bison_parser.y" { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } -#line 4654 "bison_parser.cpp" +#line 4653 "bison_parser.cpp" break; case 250: /* opt_index_name: IDENTIFIER */ #line 1195 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4660 "bison_parser.cpp" +#line 4659 "bison_parser.cpp" break; case 251: /* opt_index_name: %empty */ #line 1196 "bison_parser.y" { (yyval.sval) = nullptr;} -#line 4666 "bison_parser.cpp" +#line 4665 "bison_parser.cpp" break; case 252: /* index_name: IDENTIFIER */ #line 1200 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4672 "bison_parser.cpp" +#line 4671 "bison_parser.cpp" break; case 254: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ #line 1206 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } -#line 4678 "bison_parser.cpp" +#line 4677 "bison_parser.cpp" break; case 256: /* opt_table_alias: %empty */ #line 1212 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4684 "bison_parser.cpp" +#line 4683 "bison_parser.cpp" break; case 257: /* alias: AS IDENTIFIER */ #line 1217 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4690 "bison_parser.cpp" +#line 4689 "bison_parser.cpp" break; case 258: /* alias: IDENTIFIER */ #line 1218 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4696 "bison_parser.cpp" +#line 4695 "bison_parser.cpp" break; case 260: /* opt_alias: %empty */ #line 1224 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4702 "bison_parser.cpp" +#line 4701 "bison_parser.cpp" break; case 262: /* opt_with_clause: %empty */ #line 1234 "bison_parser.y" { (yyval.with_description_vec) = nullptr; } -#line 4708 "bison_parser.cpp" +#line 4707 "bison_parser.cpp" break; case 263: /* with_clause: WITH with_description_list */ #line 1238 "bison_parser.y" { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } -#line 4714 "bison_parser.cpp" +#line 4713 "bison_parser.cpp" break; case 264: /* with_description_list: with_description */ @@ -4719,7 +4718,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.with_description_vec) = new std::vector(); (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); } -#line 4723 "bison_parser.cpp" +#line 4722 "bison_parser.cpp" break; case 265: /* with_description_list: with_description_list ',' with_description */ @@ -4728,7 +4727,7 @@ YYLTYPE yylloc = yyloc_default; (yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t)); (yyval.with_description_vec) = (yyvsp[-2].with_description_vec); } -#line 4732 "bison_parser.cpp" +#line 4731 "bison_parser.cpp" break; case 266: /* with_description: IDENTIFIER AS select_with_paren */ @@ -4738,7 +4737,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.with_description_t)->alias = (yyvsp[-2].sval); (yyval.with_description_t)->select = (yyvsp[0].select_stmt); } -#line 4742 "bison_parser.cpp" +#line 4741 "bison_parser.cpp" break; case 267: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ @@ -4750,7 +4749,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 4754 "bison_parser.cpp" +#line 4753 "bison_parser.cpp" break; case 268: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ @@ -4763,7 +4762,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 4767 "bison_parser.cpp" +#line 4766 "bison_parser.cpp" break; case 269: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ @@ -4783,83 +4782,83 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } -#line 4787 "bison_parser.cpp" +#line 4786 "bison_parser.cpp" break; case 270: /* opt_join_type: INNER */ #line 1303 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4793 "bison_parser.cpp" +#line 4792 "bison_parser.cpp" break; case 271: /* opt_join_type: LEFT OUTER */ #line 1304 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4799 "bison_parser.cpp" +#line 4798 "bison_parser.cpp" break; case 272: /* opt_join_type: LEFT */ #line 1305 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4805 "bison_parser.cpp" +#line 4804 "bison_parser.cpp" break; case 273: /* opt_join_type: RIGHT OUTER */ #line 1306 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4811 "bison_parser.cpp" +#line 4810 "bison_parser.cpp" break; case 274: /* opt_join_type: RIGHT */ #line 1307 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4817 "bison_parser.cpp" +#line 4816 "bison_parser.cpp" break; case 275: /* opt_join_type: FULL OUTER */ #line 1308 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4823 "bison_parser.cpp" +#line 4822 "bison_parser.cpp" break; case 276: /* opt_join_type: OUTER */ #line 1309 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4829 "bison_parser.cpp" +#line 4828 "bison_parser.cpp" break; case 277: /* opt_join_type: FULL */ #line 1310 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4835 "bison_parser.cpp" +#line 4834 "bison_parser.cpp" break; case 278: /* opt_join_type: CROSS */ #line 1311 "bison_parser.y" { (yyval.uval) = kJoinCross; } -#line 4841 "bison_parser.cpp" +#line 4840 "bison_parser.cpp" break; case 279: /* opt_join_type: %empty */ #line 1312 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4847 "bison_parser.cpp" +#line 4846 "bison_parser.cpp" break; case 283: /* ident_commalist: IDENTIFIER */ #line 1332 "bison_parser.y" { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 4853 "bison_parser.cpp" +#line 4852 "bison_parser.cpp" break; case 284: /* ident_commalist: ident_commalist ',' IDENTIFIER */ #line 1333 "bison_parser.y" { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 4859 "bison_parser.cpp" +#line 4858 "bison_parser.cpp" break; -#line 4863 "bison_parser.cpp" +#line 4862 "bison_parser.cpp" default: break; } diff --git a/src/parser/bison_parser.h b/src/parser/bison_parser.h index 64faef28..01297136 100644 --- a/src/parser/bison_parser.h +++ b/src/parser/bison_parser.h @@ -281,7 +281,7 @@ union HSQL_STYPE hsql::DatetimeField datetime_field; hsql::LimitDescription* limit; hsql::ColumnDefinition* column_t; - hsql::TableKeyConstraint* table_key_constraint_t; + hsql::TableConstraint* table_constraint_t; hsql::ConstraintType column_constraint_t; hsql::ColumnType column_type_t; hsql::ImportType import_type_t; @@ -300,7 +300,7 @@ union HSQL_STYPE std::vector* expr_vec; std::vector* order_vec; std::vector* with_description_vec; - std::vector* table_key_constraint_vec; + std::vector* table_constraint_vec; #line 306 "bison_parser.h" diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 1437003f..1babe64e 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -123,7 +123,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha hsql::DatetimeField datetime_field; hsql::LimitDescription* limit; hsql::ColumnDefinition* column_t; - hsql::TableKeyConstraint* table_key_constraint_t; + hsql::TableConstraint* table_constraint_t; hsql::ConstraintType column_constraint_t; hsql::ColumnType column_type_t; hsql::ImportType import_type_t; @@ -142,7 +142,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha std::vector* expr_vec; std::vector* order_vec; std::vector* with_description_vec; - std::vector* table_key_constraint_vec; + std::vector* table_constraint_vec; } @@ -227,7 +227,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha %type datetime_field %type column_def %type column_type -%type table_key_constraint +%type table_constraint %type update_clause %type opt_group %type opt_table_alias table_alias opt_alias alias @@ -245,7 +245,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha %type opt_with_clause with_clause with_description_list %type update_clause_commalist %type column_def_commalist -%type opt_table_key_constraints +%type opt_table_constraints /****************************** ** Token Precedence and Associativity @@ -525,13 +525,13 @@ create_statement: free($6); $$->filePath = $8; } - | CREATE TABLE opt_not_exists table_name '(' column_def_commalist opt_table_key_constraints ')' { + | CREATE TABLE opt_not_exists table_name '(' column_def_commalist opt_table_constraints ')' { $$ = new CreateStatement(kCreateTable); $$->ifNotExists = $3; $$->schema = $4.schema; $$->tableName = $4.name; $$->columns = $6; - $$->tableKeyConstraints = $7; + $$->tableConstraints = $7; } | CREATE TABLE opt_not_exists table_name AS select_statement { $$ = new CreateStatement(kCreateTable); @@ -607,15 +607,15 @@ opt_column_constraint: | /* empty */ { $$ = ConstraintType::NOT_SET; } ; -opt_table_key_constraints: - table_key_constraint {$$ = new std::vector(); $$->push_back($1); } - | opt_table_key_constraints table_key_constraint { $1->push_back($2); $$ = $1; } - | /* empty */ {$$ = new std::vector(); } +opt_table_constraints: + table_constraint {$$ = new std::vector(); $$->push_back($1); } + | opt_table_constraints table_constraint { $1->push_back($2); $$ = $1; } + | /* empty */ {$$ = new std::vector(); } ; -table_key_constraint: - ',' PRIMARY KEY '(' ident_commalist ')' { $$ = new TableKeyConstraint(ConstraintType::PRIMARY_KEY, $5); } - | ',' UNIQUE '(' ident_commalist ')' { $$ = new TableKeyConstraint(ConstraintType::UNIQUE, $4); } +table_constraint: + ',' PRIMARY KEY '(' ident_commalist ')' { $$ = new TableConstraint(ConstraintType::PRIMARY_KEY, $5); } + | ',' UNIQUE '(' ident_commalist ')' { $$ = new TableConstraint(ConstraintType::UNIQUE, $4); } /****************************** * Drop Statement * DROP TABLE students; diff --git a/src/sql/CreateStatement.h b/src/sql/CreateStatement.h index b82de5e8..207f2e1a 100755 --- a/src/sql/CreateStatement.h +++ b/src/sql/CreateStatement.h @@ -13,11 +13,11 @@ namespace hsql { enum struct ConstraintType {PRIMARY_KEY, UNIQUE, NOT_SET}; // Represents definition of a key constraint - struct TableKeyConstraint { + struct TableConstraint { - TableKeyConstraint(ConstraintType keyType, std::vector* columnNames); + TableConstraint(ConstraintType keyType, std::vector* columnNames); - virtual~TableKeyConstraint(); + virtual~TableConstraint(); ConstraintType type; std::vector* columnNames; @@ -55,7 +55,7 @@ namespace hsql { char* indexName; // default: nullptr std::vector* indexColumns; std::vector* columns; // default: nullptr - std::vector* tableKeyConstraints; // default: nullptr + std::vector* tableConstraints; // default: nullptr std::vector* viewColumns; SelectStatement* select; }; diff --git a/src/sql/statements.cpp b/src/sql/statements.cpp index 394c75d1..962ed908 100755 --- a/src/sql/statements.cpp +++ b/src/sql/statements.cpp @@ -3,11 +3,11 @@ namespace hsql { // KeyConstraints - TableKeyConstraint::TableKeyConstraint(ConstraintType type, std::vector* columnNames) : + TableConstraint::TableConstraint(ConstraintType type, std::vector* columnNames) : type(type), columnNames(columnNames) {}; - TableKeyConstraint::~TableKeyConstraint() { + TableConstraint::~TableConstraint() { for (char* def : *columnNames) { delete def; } @@ -103,7 +103,7 @@ namespace hsql { schema(nullptr), tableName(nullptr), columns(nullptr), - tableKeyConstraints(nullptr), + tableConstraints(nullptr), viewColumns(nullptr), select(nullptr) {}; @@ -120,11 +120,11 @@ namespace hsql { delete columns; } - if (tableKeyConstraints != nullptr) { - for (TableKeyConstraint* def : *tableKeyConstraints) { + if (tableConstraints != nullptr) { + for (TableConstraint* def : *tableConstraints) { delete def; } - delete tableKeyConstraints; + delete tableConstraints; } if (viewColumns != nullptr) { From dbaf7792f656c1ed4faa02134c043f561e5f2644 Mon Sep 17 00:00:00 2001 From: simonstadlinger Date: Tue, 24 Aug 2021 10:50:58 +0200 Subject: [PATCH 32/73] Rename snake_case variables to camelCase --- src/parser/bison_parser.cpp | 6 +++--- src/parser/bison_parser.y | 6 +++--- src/sql/AlterStatement.h | 6 +++--- src/sql/DropStatement.h | 2 +- src/sql/statements.cpp | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 0353bba7..e57a8532 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -3714,7 +3714,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.drop_stmt) = new DropStatement(kDropIndex); (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; (yyval.drop_stmt)->ifExists = (yyvsp[-3].bval); - (yyval.drop_stmt)->index_name = (yyvsp[-2].sval); + (yyval.drop_stmt)->indexName = (yyvsp[-2].sval); } #line 3720 "bison_parser.cpp" break; @@ -3735,10 +3735,10 @@ YYLTYPE yylloc = yyloc_default; #line 662 "bison_parser.y" { (yyval.alter_stmt) = new AlterStatement(kAlterDropColumn); - (yyval.alter_stmt)->if_exists = (yyvsp[-1].bval); + (yyval.alter_stmt)->ifExists = (yyvsp[-1].bval); (yyval.alter_stmt)->schema = (yyvsp[-4].table_name).schema; (yyval.alter_stmt)->name = (yyvsp[-4].table_name).name; - (yyval.alter_stmt)->column_name = (yyvsp[0].expr)->name; + (yyval.alter_stmt)->columnName = (yyvsp[0].expr)->name; } #line 3744 "bison_parser.cpp" break; diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 1babe64e..a8666fe4 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -644,7 +644,7 @@ drop_statement: $$ = new DropStatement(kDropIndex); $$->name = $6.name; $$->ifExists = $3; - $$->index_name = $4; + $$->indexName = $4; } ; @@ -661,10 +661,10 @@ opt_exists: alter_statement: ALTER TABLE table_name DROP COLUMN opt_exists column_name { $$ = new AlterStatement(kAlterDropColumn); - $$->if_exists = $6; + $$->ifExists = $6; $$->schema = $3.schema; $$->name = $3.name; - $$->column_name = $7->name; + $$->columnName = $7->name; } ; diff --git a/src/sql/AlterStatement.h b/src/sql/AlterStatement.h index b7f8940c..02b8df1d 100755 --- a/src/sql/AlterStatement.h +++ b/src/sql/AlterStatement.h @@ -19,10 +19,10 @@ namespace hsql { AlterType type; char* schema; - bool if_exists; + bool ifExists; char* name; - char* column_name; + char* columnName; }; } // namespace hsql -#endif \ No newline at end of file +#endif diff --git a/src/sql/DropStatement.h b/src/sql/DropStatement.h index dc099f01..36db7621 100755 --- a/src/sql/DropStatement.h +++ b/src/sql/DropStatement.h @@ -25,7 +25,7 @@ namespace hsql { bool ifExists; char* schema; char* name; - char* index_name; + char* indexName; }; } // namespace hsql diff --git a/src/sql/statements.cpp b/src/sql/statements.cpp index 962ed908..48313b33 100755 --- a/src/sql/statements.cpp +++ b/src/sql/statements.cpp @@ -166,12 +166,12 @@ namespace hsql { type(type), schema(nullptr), name(nullptr), - column_name(nullptr) {} + columnName(nullptr) {} AlterStatement::~AlterStatement() { free(schema); free(name); - free(column_name); + free(columnName); } // TransactionStatement From 83d45ac410bdf109e981f1a4b8bb596a409aa13c Mon Sep 17 00:00:00 2001 From: simonstadlinger Date: Tue, 24 Aug 2021 11:20:05 +0200 Subject: [PATCH 33/73] Introduce time specification for optional precision parameter parsing --- src/parser/bison_parser.cpp | 2644 ++++++++++++++++++----------------- src/parser/bison_parser.h | 2 +- src/parser/bison_parser.y | 21 +- src/sql/ColumnType.h | 16 +- src/sql/statements.cpp | 9 +- 5 files changed, 1361 insertions(+), 1331 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index e57a8532..e870a540 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -328,95 +328,96 @@ enum yysymbol_kind_t YYSYMBOL_column_def_commalist = 194, /* column_def_commalist */ YYSYMBOL_column_def = 195, /* column_def */ YYSYMBOL_column_type = 196, /* column_type */ - YYSYMBOL_opt_decimal_specification = 197, /* opt_decimal_specification */ - YYSYMBOL_opt_column_nullable = 198, /* opt_column_nullable */ - YYSYMBOL_opt_column_constraint = 199, /* opt_column_constraint */ - YYSYMBOL_opt_table_constraints = 200, /* opt_table_constraints */ - YYSYMBOL_table_constraint = 201, /* table_constraint */ - YYSYMBOL_drop_statement = 202, /* drop_statement */ - YYSYMBOL_opt_exists = 203, /* opt_exists */ - YYSYMBOL_alter_statement = 204, /* alter_statement */ - YYSYMBOL_delete_statement = 205, /* delete_statement */ - YYSYMBOL_truncate_statement = 206, /* truncate_statement */ - YYSYMBOL_insert_statement = 207, /* insert_statement */ - YYSYMBOL_opt_column_list = 208, /* opt_column_list */ - YYSYMBOL_update_statement = 209, /* update_statement */ - YYSYMBOL_update_clause_commalist = 210, /* update_clause_commalist */ - YYSYMBOL_update_clause = 211, /* update_clause */ - YYSYMBOL_select_statement = 212, /* select_statement */ - YYSYMBOL_select_within_set_operation = 213, /* select_within_set_operation */ - YYSYMBOL_select_within_set_operation_no_parentheses = 214, /* select_within_set_operation_no_parentheses */ - YYSYMBOL_select_with_paren = 215, /* select_with_paren */ - YYSYMBOL_select_no_paren = 216, /* select_no_paren */ - YYSYMBOL_set_operator = 217, /* set_operator */ - YYSYMBOL_set_type = 218, /* set_type */ - YYSYMBOL_opt_all = 219, /* opt_all */ - YYSYMBOL_select_clause = 220, /* select_clause */ - YYSYMBOL_opt_distinct = 221, /* opt_distinct */ - YYSYMBOL_select_list = 222, /* select_list */ - YYSYMBOL_opt_from_clause = 223, /* opt_from_clause */ - YYSYMBOL_from_clause = 224, /* from_clause */ - YYSYMBOL_opt_where = 225, /* opt_where */ - YYSYMBOL_opt_group = 226, /* opt_group */ - YYSYMBOL_opt_having = 227, /* opt_having */ - YYSYMBOL_opt_order = 228, /* opt_order */ - YYSYMBOL_order_list = 229, /* order_list */ - YYSYMBOL_order_desc = 230, /* order_desc */ - YYSYMBOL_opt_order_type = 231, /* opt_order_type */ - YYSYMBOL_opt_top = 232, /* opt_top */ - YYSYMBOL_opt_limit = 233, /* opt_limit */ - YYSYMBOL_expr_list = 234, /* expr_list */ - YYSYMBOL_opt_literal_list = 235, /* opt_literal_list */ - YYSYMBOL_literal_list = 236, /* literal_list */ - YYSYMBOL_expr_alias = 237, /* expr_alias */ - YYSYMBOL_expr = 238, /* expr */ - YYSYMBOL_operand = 239, /* operand */ - YYSYMBOL_scalar_expr = 240, /* scalar_expr */ - YYSYMBOL_unary_expr = 241, /* unary_expr */ - YYSYMBOL_binary_expr = 242, /* binary_expr */ - YYSYMBOL_logic_expr = 243, /* logic_expr */ - YYSYMBOL_in_expr = 244, /* in_expr */ - YYSYMBOL_case_expr = 245, /* case_expr */ - YYSYMBOL_case_list = 246, /* case_list */ - YYSYMBOL_exists_expr = 247, /* exists_expr */ - YYSYMBOL_comp_expr = 248, /* comp_expr */ - YYSYMBOL_function_expr = 249, /* function_expr */ - YYSYMBOL_extract_expr = 250, /* extract_expr */ - YYSYMBOL_cast_expr = 251, /* cast_expr */ - YYSYMBOL_datetime_field = 252, /* datetime_field */ - YYSYMBOL_array_expr = 253, /* array_expr */ - YYSYMBOL_array_index = 254, /* array_index */ - YYSYMBOL_between_expr = 255, /* between_expr */ - YYSYMBOL_column_name = 256, /* column_name */ - YYSYMBOL_literal = 257, /* literal */ - YYSYMBOL_string_literal = 258, /* string_literal */ - YYSYMBOL_bool_literal = 259, /* bool_literal */ - YYSYMBOL_num_literal = 260, /* num_literal */ - YYSYMBOL_int_literal = 261, /* int_literal */ - YYSYMBOL_null_literal = 262, /* null_literal */ - YYSYMBOL_param_expr = 263, /* param_expr */ - YYSYMBOL_table_ref = 264, /* table_ref */ - YYSYMBOL_table_ref_atomic = 265, /* table_ref_atomic */ - YYSYMBOL_nonjoin_table_ref_atomic = 266, /* nonjoin_table_ref_atomic */ - YYSYMBOL_table_ref_commalist = 267, /* table_ref_commalist */ - YYSYMBOL_table_ref_name = 268, /* table_ref_name */ - YYSYMBOL_table_ref_name_no_alias = 269, /* table_ref_name_no_alias */ - YYSYMBOL_table_name = 270, /* table_name */ - YYSYMBOL_opt_index_name = 271, /* opt_index_name */ - YYSYMBOL_index_name = 272, /* index_name */ - YYSYMBOL_table_alias = 273, /* table_alias */ - YYSYMBOL_opt_table_alias = 274, /* opt_table_alias */ - YYSYMBOL_alias = 275, /* alias */ - YYSYMBOL_opt_alias = 276, /* opt_alias */ - YYSYMBOL_opt_with_clause = 277, /* opt_with_clause */ - YYSYMBOL_with_clause = 278, /* with_clause */ - YYSYMBOL_with_description_list = 279, /* with_description_list */ - YYSYMBOL_with_description = 280, /* with_description */ - YYSYMBOL_join_clause = 281, /* join_clause */ - YYSYMBOL_opt_join_type = 282, /* opt_join_type */ - YYSYMBOL_join_condition = 283, /* join_condition */ - YYSYMBOL_opt_semicolon = 284, /* opt_semicolon */ - YYSYMBOL_ident_commalist = 285 /* ident_commalist */ + YYSYMBOL_opt_time_specification = 197, /* opt_time_specification */ + YYSYMBOL_opt_decimal_specification = 198, /* opt_decimal_specification */ + YYSYMBOL_opt_column_nullable = 199, /* opt_column_nullable */ + YYSYMBOL_opt_column_constraint = 200, /* opt_column_constraint */ + YYSYMBOL_opt_table_constraints = 201, /* opt_table_constraints */ + YYSYMBOL_table_constraint = 202, /* table_constraint */ + YYSYMBOL_drop_statement = 203, /* drop_statement */ + YYSYMBOL_opt_exists = 204, /* opt_exists */ + YYSYMBOL_alter_statement = 205, /* alter_statement */ + YYSYMBOL_delete_statement = 206, /* delete_statement */ + YYSYMBOL_truncate_statement = 207, /* truncate_statement */ + YYSYMBOL_insert_statement = 208, /* insert_statement */ + YYSYMBOL_opt_column_list = 209, /* opt_column_list */ + YYSYMBOL_update_statement = 210, /* update_statement */ + YYSYMBOL_update_clause_commalist = 211, /* update_clause_commalist */ + YYSYMBOL_update_clause = 212, /* update_clause */ + YYSYMBOL_select_statement = 213, /* select_statement */ + YYSYMBOL_select_within_set_operation = 214, /* select_within_set_operation */ + YYSYMBOL_select_within_set_operation_no_parentheses = 215, /* select_within_set_operation_no_parentheses */ + YYSYMBOL_select_with_paren = 216, /* select_with_paren */ + YYSYMBOL_select_no_paren = 217, /* select_no_paren */ + YYSYMBOL_set_operator = 218, /* set_operator */ + YYSYMBOL_set_type = 219, /* set_type */ + YYSYMBOL_opt_all = 220, /* opt_all */ + YYSYMBOL_select_clause = 221, /* select_clause */ + YYSYMBOL_opt_distinct = 222, /* opt_distinct */ + YYSYMBOL_select_list = 223, /* select_list */ + YYSYMBOL_opt_from_clause = 224, /* opt_from_clause */ + YYSYMBOL_from_clause = 225, /* from_clause */ + YYSYMBOL_opt_where = 226, /* opt_where */ + YYSYMBOL_opt_group = 227, /* opt_group */ + YYSYMBOL_opt_having = 228, /* opt_having */ + YYSYMBOL_opt_order = 229, /* opt_order */ + YYSYMBOL_order_list = 230, /* order_list */ + YYSYMBOL_order_desc = 231, /* order_desc */ + YYSYMBOL_opt_order_type = 232, /* opt_order_type */ + YYSYMBOL_opt_top = 233, /* opt_top */ + YYSYMBOL_opt_limit = 234, /* opt_limit */ + YYSYMBOL_expr_list = 235, /* expr_list */ + YYSYMBOL_opt_literal_list = 236, /* opt_literal_list */ + YYSYMBOL_literal_list = 237, /* literal_list */ + YYSYMBOL_expr_alias = 238, /* expr_alias */ + YYSYMBOL_expr = 239, /* expr */ + YYSYMBOL_operand = 240, /* operand */ + YYSYMBOL_scalar_expr = 241, /* scalar_expr */ + YYSYMBOL_unary_expr = 242, /* unary_expr */ + YYSYMBOL_binary_expr = 243, /* binary_expr */ + YYSYMBOL_logic_expr = 244, /* logic_expr */ + YYSYMBOL_in_expr = 245, /* in_expr */ + YYSYMBOL_case_expr = 246, /* case_expr */ + YYSYMBOL_case_list = 247, /* case_list */ + YYSYMBOL_exists_expr = 248, /* exists_expr */ + YYSYMBOL_comp_expr = 249, /* comp_expr */ + YYSYMBOL_function_expr = 250, /* function_expr */ + YYSYMBOL_extract_expr = 251, /* extract_expr */ + YYSYMBOL_cast_expr = 252, /* cast_expr */ + YYSYMBOL_datetime_field = 253, /* datetime_field */ + YYSYMBOL_array_expr = 254, /* array_expr */ + YYSYMBOL_array_index = 255, /* array_index */ + YYSYMBOL_between_expr = 256, /* between_expr */ + YYSYMBOL_column_name = 257, /* column_name */ + YYSYMBOL_literal = 258, /* literal */ + YYSYMBOL_string_literal = 259, /* string_literal */ + YYSYMBOL_bool_literal = 260, /* bool_literal */ + YYSYMBOL_num_literal = 261, /* num_literal */ + YYSYMBOL_int_literal = 262, /* int_literal */ + YYSYMBOL_null_literal = 263, /* null_literal */ + YYSYMBOL_param_expr = 264, /* param_expr */ + YYSYMBOL_table_ref = 265, /* table_ref */ + YYSYMBOL_table_ref_atomic = 266, /* table_ref_atomic */ + YYSYMBOL_nonjoin_table_ref_atomic = 267, /* nonjoin_table_ref_atomic */ + YYSYMBOL_table_ref_commalist = 268, /* table_ref_commalist */ + YYSYMBOL_table_ref_name = 269, /* table_ref_name */ + YYSYMBOL_table_ref_name_no_alias = 270, /* table_ref_name_no_alias */ + YYSYMBOL_table_name = 271, /* table_name */ + YYSYMBOL_opt_index_name = 272, /* opt_index_name */ + YYSYMBOL_index_name = 273, /* index_name */ + YYSYMBOL_table_alias = 274, /* table_alias */ + YYSYMBOL_opt_table_alias = 275, /* opt_table_alias */ + YYSYMBOL_alias = 276, /* alias */ + YYSYMBOL_opt_alias = 277, /* opt_alias */ + YYSYMBOL_opt_with_clause = 278, /* opt_with_clause */ + YYSYMBOL_with_clause = 279, /* with_clause */ + YYSYMBOL_with_description_list = 280, /* with_description_list */ + YYSYMBOL_with_description = 281, /* with_description */ + YYSYMBOL_join_clause = 282, /* join_clause */ + YYSYMBOL_opt_join_type = 283, /* opt_join_type */ + YYSYMBOL_join_condition = 284, /* join_condition */ + YYSYMBOL_opt_semicolon = 285, /* opt_semicolon */ + YYSYMBOL_ident_commalist = 286 /* ident_commalist */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -741,16 +742,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 67 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 890 +#define YYLAST 863 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 173 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 113 +#define YYNNTS 114 /* YYNRULES -- Number of rules. */ -#define YYNRULES 284 +#define YYNRULES 286 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 529 +#define YYNSTATES 533 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 410 @@ -815,35 +816,35 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 281, 281, 302, 308, 317, 321, 325, 328, 331, - 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, - 356, 357, 362, 363, 367, 371, 383, 386, 389, 395, - 396, 403, 410, 413, 417, 431, 437, 446, 463, 467, - 470, 479, 493, 496, 501, 515, 528, 536, 543, 550, - 561, 562, 566, 567, 571, 577, 578, 579, 580, 581, - 582, 583, 584, 585, 586, 587, 588, 589, 590, 594, - 595, 596, 599, 600, 601, 605, 606, 607, 611, 612, - 613, 617, 618, 626, 632, 638, 643, 652, 653, 662, - 677, 686, 699, 706, 717, 718, 728, 737, 738, 742, - 754, 758, 762, 776, 777, 780, 781, 792, 793, 797, - 807, 820, 827, 831, 835, 842, 845, 851, 863, 864, - 868, 872, 873, 877, 882, 883, 887, 892, 896, 897, - 901, 902, 906, 907, 911, 915, 916, 917, 923, 924, - 928, 929, 930, 931, 932, 933, 940, 941, 945, 946, - 950, 951, 955, 965, 966, 967, 968, 969, 973, 974, - 975, 976, 977, 978, 979, 980, 981, 982, 983, 987, - 988, 992, 993, 994, 995, 996, 1000, 1001, 1002, 1003, - 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1014, 1015, 1019, - 1020, 1021, 1022, 1028, 1029, 1030, 1031, 1035, 1036, 1040, - 1041, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1055, 1056, - 1060, 1064, 1068, 1069, 1070, 1071, 1072, 1073, 1077, 1081, - 1085, 1089, 1090, 1091, 1092, 1096, 1097, 1098, 1099, 1100, - 1104, 1108, 1109, 1113, 1114, 1118, 1122, 1126, 1138, 1139, - 1149, 1150, 1154, 1155, 1164, 1165, 1170, 1181, 1190, 1191, - 1195, 1196, 1200, 1205, 1206, 1211, 1212, 1217, 1218, 1223, - 1224, 1233, 1234, 1238, 1242, 1246, 1253, 1266, 1274, 1284, - 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1310, 1311, 1312, - 1317, 1326, 1327, 1332, 1333 + 0, 282, 282, 303, 309, 318, 322, 326, 329, 332, + 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, + 357, 358, 363, 364, 368, 372, 384, 387, 390, 396, + 397, 404, 411, 414, 418, 432, 438, 447, 464, 468, + 471, 480, 494, 497, 502, 516, 529, 537, 544, 551, + 562, 563, 567, 568, 572, 578, 579, 580, 581, 582, + 583, 584, 585, 586, 587, 588, 589, 590, 591, 595, + 596, 600, 601, 602, 606, 607, 608, 612, 613, 614, + 618, 619, 620, 624, 625, 633, 639, 645, 650, 659, + 660, 669, 684, 693, 706, 713, 724, 725, 735, 744, + 745, 749, 761, 765, 769, 783, 784, 787, 788, 799, + 800, 804, 814, 827, 834, 838, 842, 849, 852, 858, + 870, 871, 875, 879, 880, 884, 889, 890, 894, 899, + 903, 904, 908, 909, 913, 914, 918, 922, 923, 924, + 930, 931, 935, 936, 937, 938, 939, 940, 947, 948, + 952, 953, 957, 958, 962, 972, 973, 974, 975, 976, + 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, + 990, 994, 995, 999, 1000, 1001, 1002, 1003, 1007, 1008, + 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1021, + 1022, 1026, 1027, 1028, 1029, 1035, 1036, 1037, 1038, 1042, + 1043, 1047, 1048, 1052, 1053, 1054, 1055, 1056, 1057, 1058, + 1062, 1063, 1067, 1071, 1075, 1076, 1077, 1078, 1079, 1080, + 1084, 1088, 1092, 1096, 1097, 1098, 1099, 1103, 1104, 1105, + 1106, 1107, 1111, 1115, 1116, 1120, 1121, 1125, 1129, 1133, + 1145, 1146, 1156, 1157, 1161, 1162, 1171, 1172, 1177, 1188, + 1197, 1198, 1202, 1203, 1207, 1212, 1213, 1218, 1219, 1224, + 1225, 1230, 1231, 1240, 1241, 1245, 1249, 1253, 1260, 1273, + 1281, 1291, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, + 1318, 1319, 1324, 1333, 1334, 1339, 1340 }; #endif @@ -889,12 +890,12 @@ static const char *const yytname[] = "file_type", "file_path", "opt_file_type", "export_statement", "show_statement", "create_statement", "opt_not_exists", "column_def_commalist", "column_def", "column_type", - "opt_decimal_specification", "opt_column_nullable", - "opt_column_constraint", "opt_table_constraints", "table_constraint", - "drop_statement", "opt_exists", "alter_statement", "delete_statement", - "truncate_statement", "insert_statement", "opt_column_list", - "update_statement", "update_clause_commalist", "update_clause", - "select_statement", "select_within_set_operation", + "opt_time_specification", "opt_decimal_specification", + "opt_column_nullable", "opt_column_constraint", "opt_table_constraints", + "table_constraint", "drop_statement", "opt_exists", "alter_statement", + "delete_statement", "truncate_statement", "insert_statement", + "opt_column_list", "update_statement", "update_clause_commalist", + "update_clause", "select_statement", "select_within_set_operation", "select_within_set_operation_no_parentheses", "select_with_paren", "select_no_paren", "set_operator", "set_type", "opt_all", "select_clause", "opt_distinct", "select_list", "opt_from_clause", @@ -948,12 +949,12 @@ static const yytype_int16 yytoknum[] = }; #endif -#define YYPACT_NINF (-410) +#define YYPACT_NINF (-396) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF (-282) +#define YYTABLE_NINF (-284) #define yytable_value_is_error(Yyn) \ ((Yyn) == YYTABLE_NINF) @@ -962,59 +963,60 @@ static const yytype_int16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - 566, 33, 80, 84, 99, 80, 120, 28, 43, 95, - 80, 93, 80, 121, 13, 194, 61, 61, 61, 207, - 54, -410, 117, -410, 117, -410, -410, -410, -410, -410, - -410, -410, -410, -410, -410, -410, -410, -29, -410, 230, - 76, -410, 77, 181, -410, 142, 142, 142, 80, 272, - 80, 180, -410, 80, -57, 153, 153, 153, 80, -410, - 179, 116, -410, -410, -410, -410, -410, -410, 535, -410, - 223, -410, -410, 197, -29, 40, -410, 32, -410, 318, - 14, 321, 206, 324, 80, 80, 250, -410, 242, 171, - 344, 262, 354, 354, 315, 359, 80, 80, -410, 203, - 194, -410, 204, 370, 366, 212, 216, -410, -410, -410, - -29, 273, 264, -29, -3, -410, -410, -410, -410, -410, - -410, -410, -410, 219, 220, -410, -410, -410, -410, -410, - -410, -410, -410, -410, 348, -410, 265, -56, 171, 308, - -410, 354, 391, 138, 251, -55, -410, 360, 289, -410, - 289, -410, -410, 271, -410, -410, -410, -410, 399, -410, - -410, 308, -410, -410, 327, -410, -410, 40, -410, -410, - 308, 327, 308, 157, -410, -410, 14, -410, 80, 401, - 294, 403, 284, 82, 243, 245, 247, 163, 336, 244, - 369, -410, 304, -36, 404, -410, -410, -410, -410, -410, - -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, - -410, 322, -410, 87, 255, -410, 308, 344, -410, 153, - 375, -410, -410, 80, 258, 94, -410, 333, 256, -410, - 9, -3, -29, 259, -410, 107, -3, -36, 377, -24, - -410, 266, 337, -410, 772, 261, -410, 294, 5, 21, - 378, 228, 308, 308, 75, 102, 267, 369, 594, 308, - -31, 268, -64, 308, 308, 369, -410, 369, -54, 275, - 19, 369, 369, 369, 369, 369, 369, 369, 369, 369, - 369, 369, 369, 369, 369, 369, 370, 80, -410, 435, - 14, -36, -410, 23, 272, -410, 14, -410, 399, 12, - 250, -410, 308, -410, 437, -410, -410, -410, -410, 308, - -410, -410, -410, -410, 308, 308, 391, 354, -410, 413, - -410, 277, 278, -410, -410, 281, -410, -410, -410, -410, - -410, -410, 68, 36, 101, -410, -410, -410, 308, -410, - -410, 286, -410, -410, -410, -410, -410, -410, 356, 122, - -22, 132, 308, 308, -410, 378, 352, -131, -410, -410, - -410, 341, 541, 630, 369, 291, 304, -410, 357, 296, - 630, 630, 630, 630, 666, 666, 666, 666, -31, -31, - -37, -37, -37, -60, 293, -410, -410, 110, 297, -410, - -410, 124, -410, 294, -410, 186, -410, 299, -410, 35, - -410, 393, -410, -410, -410, -36, -36, 126, -410, 298, - 467, -410, 471, 475, -410, 379, 20, 364, 317, -410, - -410, 38, -410, 130, -410, 308, 772, 308, 308, -410, - 140, 136, 320, -410, 369, 630, 304, 323, 147, -410, - -410, -410, -410, 325, 387, -410, -410, -410, 409, 410, - 415, 396, 12, 494, -410, -410, -410, 373, -410, -410, - 493, 160, 332, 338, -410, 382, -410, -410, 340, 391, - -410, -50, 342, -36, 145, -410, 308, -410, 594, 345, - 165, -410, -410, 35, 12, -410, -410, -410, 12, 319, - 347, 308, 349, -410, 499, -410, -410, -410, 391, 175, - -410, -410, -410, -36, -410, -410, -410, -410, 449, 391, - -6, -410, 350, 177, -410, 355, 308, 188, 308, -410, - -410, -410, 23, -36, -410, -410, -36, 351, -410 + 539, 138, 171, 183, 215, 171, 9, 180, 192, 145, + 171, 213, 171, 119, 21, 291, 155, 155, 155, 304, + 139, -396, 219, -396, 219, -396, -396, -396, -396, -396, + -396, -396, -396, -396, -396, -396, -396, -37, -396, 321, + 156, -396, 164, 246, -396, 218, 218, 218, 171, 353, + 171, 235, -396, 171, -50, 236, 236, 236, 171, -396, + 237, 195, -396, -396, -396, -396, -396, -396, 508, -396, + 277, -396, -396, 252, -37, 28, -396, 27, -396, 381, + 12, 376, 267, 389, 171, 171, 311, -396, 303, 230, + 393, 309, 397, 397, 357, 400, 171, 171, -396, 239, + 291, -396, 242, 398, 399, 244, 245, -396, -396, -396, + -37, 301, 293, -37, -5, -396, -396, -396, -396, -396, + -396, -396, -396, 251, 250, -396, -396, -396, -396, -396, + -396, -396, -396, -396, 378, -396, 297, -63, 230, 200, + -396, 397, 419, 109, 280, -54, -396, 391, 320, -396, + 320, -396, -396, 305, -396, -396, -396, -396, 433, -396, + -396, 200, -396, -396, 363, -396, -396, 28, -396, -396, + 200, 363, 200, 89, -396, -396, 12, -396, 171, 437, + 330, 439, 319, 110, 279, 281, 282, 154, 331, 285, + 342, -396, 265, -68, 377, -396, -396, -396, -396, -396, + -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, + -396, 347, -396, -106, 286, -396, 200, 393, -396, 236, + 404, -396, -396, 171, 287, -42, -396, 354, 284, -396, + 38, -5, -37, 288, -396, 76, -5, -68, 402, -25, + -396, 290, 366, -396, 745, 289, -396, 330, 3, 18, + 408, 214, 200, 200, 129, 77, 294, 342, 567, 200, + 90, 298, -48, 200, 200, 342, -396, 342, 5, 300, + 91, 342, 342, 342, 342, 342, 342, 342, 342, 342, + 342, 342, 342, 342, 342, 342, 398, 171, -396, 465, + 12, -68, -396, 22, 353, -396, 12, -396, 433, 16, + 311, -396, 200, -396, 467, -396, -396, -396, -396, 200, + -396, -396, -396, -396, 200, 200, 419, 397, -396, 441, + -396, 312, 313, -396, -396, 314, -396, -396, -396, -396, + 315, -396, 120, 24, 58, -396, -396, -396, 200, -396, + -396, 308, -396, -396, -396, -396, -396, -396, 379, -3, + 81, 125, 200, 200, -396, 408, 383, 96, -396, -396, + -396, 364, 514, 603, 342, 322, 265, -396, 384, 323, + 603, 603, 603, 603, 639, 639, 639, 639, 90, 90, + -89, -89, -89, -87, 326, -396, -396, 107, 317, -396, + -396, 115, -396, 330, -396, 229, -396, 324, -396, 29, + -396, 424, -396, -396, -396, -68, -68, 130, -396, 327, + 490, -396, 493, 494, 500, -396, -396, 407, 37, 388, + 346, -396, -396, 42, -396, 137, -396, 200, 745, 200, + 200, -396, -4, 113, 348, -396, 342, 603, 265, 349, + 147, -396, -396, -396, -396, 350, 421, -396, -396, -396, + 443, 444, 445, 426, 16, 528, -396, -396, -396, 416, + -396, -396, 537, 148, 382, 385, 387, -396, 430, -396, + -396, 390, 419, -396, -46, 394, -68, 149, -396, 200, + -396, 567, 395, 161, -396, -396, 29, 16, -396, -396, + -396, 16, 292, 401, 200, 396, -396, 545, -396, -396, + -396, -396, 419, 170, -396, -396, -396, -68, -396, -396, + -396, -396, 339, 419, -15, -396, 403, 203, -396, 405, + 200, 211, 200, -396, -396, -396, 22, -68, -396, -396, + -68, 406, -396 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -1022,76 +1024,77 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_int16 yydefact[] = { - 262, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 264, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 30, 30, 0, - 282, 3, 21, 19, 21, 18, 8, 9, 7, 11, - 16, 17, 13, 14, 12, 15, 10, 0, 261, 0, - 248, 91, 33, 0, 44, 51, 51, 51, 0, 0, - 0, 0, 247, 0, 0, 88, 88, 88, 0, 42, - 0, 263, 264, 29, 26, 28, 27, 1, 262, 2, - 0, 6, 5, 139, 0, 100, 101, 131, 85, 0, - 149, 0, 0, 251, 0, 0, 125, 37, 0, 95, + 284, 3, 21, 19, 21, 18, 8, 9, 7, 11, + 16, 17, 13, 14, 12, 15, 10, 0, 263, 0, + 250, 93, 33, 0, 44, 51, 51, 51, 0, 0, + 0, 0, 249, 0, 0, 90, 90, 90, 0, 42, + 0, 265, 266, 29, 26, 28, 27, 1, 264, 2, + 0, 6, 5, 141, 0, 102, 103, 133, 87, 0, + 151, 0, 0, 253, 0, 0, 127, 37, 0, 97, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, - 0, 4, 0, 0, 119, 0, 0, 113, 114, 112, - 0, 116, 0, 0, 145, 249, 230, 233, 235, 236, - 231, 232, 237, 0, 148, 150, 225, 226, 227, 234, - 228, 229, 32, 31, 0, 250, 0, 0, 95, 0, - 90, 0, 0, 0, 0, 125, 97, 0, 40, 38, - 40, 87, 252, 0, 83, 84, 266, 265, 0, 138, - 118, 0, 108, 107, 131, 104, 103, 105, 115, 111, - 0, 131, 0, 0, 109, 34, 0, 50, 0, 0, - 262, 0, 0, 221, 0, 0, 0, 0, 0, 0, - 0, 223, 0, 124, 153, 160, 161, 162, 155, 157, - 163, 156, 176, 164, 165, 166, 167, 159, 154, 169, - 170, 0, 283, 0, 0, 93, 0, 0, 96, 88, - 0, 36, 41, 0, 24, 0, 22, 122, 120, 146, - 260, 145, 0, 130, 132, 137, 145, 141, 143, 140, - 151, 0, 0, 47, 0, 80, 52, 262, 119, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 172, 0, - 171, 0, 0, 0, 0, 0, 173, 0, 0, 0, + 0, 4, 0, 0, 121, 0, 0, 115, 116, 114, + 0, 118, 0, 0, 147, 251, 232, 235, 237, 238, + 233, 234, 239, 0, 150, 152, 227, 228, 229, 236, + 230, 231, 32, 31, 0, 252, 0, 0, 97, 0, + 92, 0, 0, 0, 0, 127, 99, 0, 40, 38, + 40, 89, 254, 0, 85, 86, 268, 267, 0, 140, + 120, 0, 110, 109, 133, 106, 105, 107, 117, 113, + 0, 133, 0, 0, 111, 34, 0, 50, 0, 0, + 264, 0, 0, 223, 0, 0, 0, 0, 0, 0, + 0, 225, 0, 126, 155, 162, 163, 164, 157, 159, + 165, 158, 178, 166, 167, 168, 169, 161, 156, 171, + 172, 0, 285, 0, 0, 95, 0, 0, 98, 90, + 0, 36, 41, 0, 24, 0, 22, 124, 122, 148, + 262, 147, 0, 132, 134, 139, 147, 143, 145, 142, + 153, 0, 0, 47, 0, 82, 52, 264, 121, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 174, 0, + 173, 0, 0, 0, 0, 0, 175, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 94, 0, - 0, 99, 98, 0, 0, 86, 0, 20, 0, 0, - 125, 121, 0, 258, 0, 259, 152, 102, 106, 0, - 136, 135, 134, 110, 0, 0, 0, 0, 56, 0, - 61, 71, 0, 60, 58, 0, 68, 67, 57, 65, - 66, 55, 74, 0, 0, 78, 49, 208, 0, 222, - 224, 0, 212, 213, 214, 215, 216, 217, 0, 0, - 0, 0, 0, 0, 195, 0, 0, 0, 168, 158, - 187, 188, 0, 183, 0, 0, 0, 174, 0, 186, - 185, 201, 202, 203, 204, 205, 206, 207, 178, 177, - 180, 179, 181, 182, 0, 35, 284, 0, 221, 89, - 39, 0, 23, 262, 123, 238, 240, 0, 242, 256, - 241, 127, 147, 257, 133, 144, 142, 0, 45, 0, - 0, 59, 0, 0, 72, 0, 77, 0, 0, 53, - 46, 0, 79, 0, 199, 0, 0, 0, 0, 193, - 0, 0, 0, 218, 0, 184, 0, 0, 0, 175, - 219, 92, 25, 0, 0, 278, 270, 276, 274, 277, - 272, 0, 0, 0, 255, 246, 253, 0, 117, 48, - 0, 0, 0, 0, 73, 0, 76, 54, 0, 0, - 209, 0, 0, 197, 0, 196, 0, 200, 220, 0, - 0, 191, 189, 256, 0, 273, 275, 271, 0, 239, - 257, 0, 0, 70, 0, 62, 64, 75, 0, 0, - 210, 211, 194, 198, 192, 190, 243, 267, 279, 0, - 129, 63, 0, 0, 82, 0, 0, 0, 0, 126, - 69, 81, 0, 280, 268, 254, 128, 0, 269 + 0, 0, 0, 0, 0, 0, 0, 0, 96, 0, + 0, 101, 100, 0, 0, 88, 0, 20, 0, 0, + 127, 123, 0, 260, 0, 261, 154, 104, 108, 0, + 138, 137, 136, 112, 0, 0, 0, 0, 56, 0, + 61, 73, 0, 60, 58, 0, 68, 67, 57, 65, + 70, 55, 76, 0, 0, 80, 49, 210, 0, 224, + 226, 0, 214, 215, 216, 217, 218, 219, 0, 0, + 0, 0, 0, 0, 197, 0, 0, 0, 170, 160, + 189, 190, 0, 185, 0, 0, 0, 176, 0, 188, + 187, 203, 204, 205, 206, 207, 208, 209, 180, 179, + 182, 181, 183, 184, 0, 35, 286, 0, 223, 91, + 39, 0, 23, 264, 125, 240, 242, 0, 244, 258, + 243, 129, 149, 259, 135, 146, 144, 0, 45, 0, + 0, 59, 0, 0, 0, 66, 74, 0, 79, 0, + 0, 53, 46, 0, 81, 0, 201, 0, 0, 0, + 0, 195, 0, 0, 0, 220, 0, 186, 0, 0, + 0, 177, 221, 94, 25, 0, 0, 280, 272, 278, + 276, 279, 274, 0, 0, 0, 257, 248, 255, 0, + 119, 48, 0, 0, 0, 0, 0, 75, 0, 78, + 54, 0, 0, 211, 0, 0, 199, 0, 198, 0, + 202, 222, 0, 0, 193, 191, 258, 0, 275, 277, + 273, 0, 241, 259, 0, 0, 72, 0, 62, 64, + 69, 77, 0, 0, 212, 213, 196, 200, 194, 192, + 245, 269, 281, 0, 131, 63, 0, 0, 84, 0, + 0, 0, 0, 128, 71, 83, 0, 282, 270, 256, + 130, 0, 271 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -410, -410, -410, 441, -410, 492, -410, 225, -410, 198, - -410, -410, -410, -410, 227, -80, 383, -410, -410, -410, - 193, -410, 192, 108, -410, -410, -410, -410, 210, -410, - -35, -410, -410, -410, -410, 402, -410, -410, 328, -176, - -58, -410, -8, -73, -52, -410, -410, -68, 301, -410, - -410, -410, -122, -410, -410, -78, -410, 237, -410, -410, - -137, -256, -410, -71, 235, -139, -130, -410, -410, -410, - -410, -410, -410, 314, -410, -410, -410, -410, -410, -410, - -410, -410, -410, -291, -70, -85, -410, -410, -92, -410, - -410, -410, -409, 63, -410, -410, -410, 4, -410, -410, - -410, 89, 346, -410, -410, -410, -410, 451, -410, -410, - -410, -410, -311 + -396, -396, -396, 477, -396, 532, -396, 254, -396, 73, + -396, -396, -396, -396, 264, -83, 427, -396, -396, -396, + 212, -396, 233, 141, -396, -396, -396, -396, -396, 247, + -396, -34, -396, -396, -396, -396, 438, -396, -396, 365, + -174, -69, -396, 1, -73, -51, -396, -396, -71, 332, + -396, -396, -396, -121, -396, -396, 46, -396, 274, -396, + -396, 45, -257, -396, -24, 283, -139, -134, -396, -396, + -396, -396, -396, -396, 333, -396, -396, -396, -396, -396, + -396, -396, -396, -396, -290, -75, -84, -396, -396, -90, + -396, -396, -396, -395, 97, -396, -396, -396, 2, -396, + -396, -396, 100, 358, -396, -396, -396, -396, 489, -396, + -396, -396, -396, -305 }; /* YYDEFGOTO[NTERM-NUM]. */ @@ -1099,16 +1102,16 @@ static const yytype_int16 yydefgoto[] = { 0, 19, 20, 21, 22, 71, 225, 226, 23, 64, 24, 133, 25, 26, 88, 148, 221, 27, 28, 29, - 83, 245, 246, 332, 411, 416, 467, 334, 335, 30, - 95, 31, 32, 33, 34, 143, 35, 145, 146, 36, - 164, 165, 166, 76, 110, 111, 169, 77, 161, 227, - 300, 301, 140, 458, 519, 114, 233, 234, 312, 104, - 174, 228, 123, 124, 229, 230, 194, 195, 196, 197, - 198, 199, 200, 255, 201, 202, 203, 204, 205, 348, - 206, 207, 208, 209, 210, 126, 127, 128, 129, 130, - 131, 394, 395, 396, 397, 398, 51, 399, 136, 153, - 454, 455, 456, 306, 37, 38, 61, 62, 400, 451, - 524, 69, 213 + 83, 245, 246, 332, 415, 411, 418, 470, 334, 335, + 30, 95, 31, 32, 33, 34, 143, 35, 145, 146, + 36, 164, 165, 166, 76, 110, 111, 169, 77, 161, + 227, 300, 301, 140, 460, 523, 114, 233, 234, 312, + 104, 174, 228, 123, 124, 229, 230, 194, 195, 196, + 197, 198, 199, 200, 255, 201, 202, 203, 204, 205, + 348, 206, 207, 208, 209, 210, 126, 127, 128, 129, + 130, 131, 394, 395, 396, 397, 398, 51, 399, 136, + 153, 456, 457, 458, 306, 37, 38, 61, 62, 400, + 453, 528, 69, 213 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1116,190 +1119,184 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 193, 106, 389, 357, 243, 407, 41, 149, 149, 44, - 125, 159, 303, 150, 52, 40, 54, 160, 116, 117, - 118, 96, 97, 218, 339, 113, 388, 139, 73, 75, - 315, 235, 58, 237, 239, 433, 92, 179, 303, 244, - 302, 107, 167, 489, 518, 167, 364, 465, 254, 107, - 263, 172, 86, 262, 89, 171, 149, 91, 258, 39, - 260, 211, 98, 417, 263, 417, 105, 264, 180, 173, - 215, 336, 59, 365, 271, 93, 108, 291, 263, 508, - 466, 264, 423, 40, 108, 427, 231, 42, 137, 138, - 263, 156, 263, 236, 307, 264, 418, 271, 418, 313, - 154, 155, 43, 271, 359, 286, 240, 264, 112, 264, - 438, 181, 109, 349, 350, 232, 217, 119, 500, 261, - 109, 48, 367, 263, 360, 361, 285, 258, 286, 282, - 283, 284, 285, 304, 286, 362, 49, 363, 74, 368, - 264, 369, 370, 371, 372, 373, 374, 375, 376, 377, - 378, 379, 380, 381, 382, 383, 120, 121, 499, 453, - 183, 116, 117, 118, 167, 302, 183, 116, 117, 118, - 235, 414, 53, 337, 308, 405, 406, 341, 401, 393, - 480, 340, 241, 191, 293, 253, 122, 513, 415, 263, - 45, 55, 50, 352, 384, 73, 310, 60, 517, 46, - 56, 214, 184, 185, 186, 63, 264, 67, 184, 185, - 186, 444, 353, 430, 431, 65, 66, 443, 354, 387, - 125, 263, 311, 428, 68, 391, 125, 295, 70, 47, - 57, 527, 149, 78, 435, 510, 263, 408, 264, 84, - 85, 187, 353, 476, 80, 79, 426, 187, 429, 248, - 263, 249, 445, 264, 263, 288, 475, 446, 289, 263, - 119, 502, 297, 447, 448, 298, 119, 264, 82, 420, - 238, 264, 421, 253, 81, 87, 264, 188, 441, 94, - 449, 176, 432, 188, -279, 450, 471, 100, 473, 474, - 189, 385, 442, 437, 459, 176, 189, 289, 470, 120, - 121, 302, 90, 99, 478, 120, 121, 183, 116, 117, - 118, 183, 116, 117, 118, 482, 190, 191, 302, 102, - 103, 115, 190, 191, 192, 132, 134, 135, 493, 122, - 192, 494, 139, 505, 141, 122, 302, 503, 142, 183, - 116, 117, 118, 514, 444, 521, 289, 144, 289, 184, - 185, 186, 147, 184, 185, 186, 525, -244, 116, 289, - 151, 73, 152, 479, 342, 343, 344, 345, 346, 347, - 74, 158, 183, 116, 117, 118, 118, 523, 160, 526, - 162, 256, 185, 186, 163, 445, 168, 175, 187, 170, - 446, 176, 187, 177, 212, 178, 447, 448, 219, 216, - 220, 223, 224, 112, 242, 15, 244, 119, 247, 259, - 250, 119, 251, 449, 252, 185, 186, -279, 450, 287, - 187, 265, 290, 294, 188, 296, 299, 302, 188, 317, - 309, 314, 333, 316, 355, 73, 358, 189, 386, 119, - 403, 189, 366, 409, 410, 412, 120, 121, 413, 425, - 120, 121, 364, 187, 424, 263, 257, 266, 436, 440, - 439, 286, 457, 190, 191, 460, 249, 190, 191, 189, - 452, 192, 119, 461, 444, 192, 122, 462, 120, 121, - 122, 463, 464, 468, 469, 484, 485, 486, 477, 257, - -245, 481, 487, 483, 488, 190, 191, 490, 491, 492, - 495, 497, 189, 192, 267, 512, 496, 498, 122, 101, - 501, 120, 121, 504, 509, 445, 72, 511, 520, 528, - 446, 390, 522, 392, 268, 419, 447, 448, 190, 191, - 515, 269, 270, 222, 472, -281, 192, 402, 271, 272, - 182, 122, 1, 449, 422, 292, 404, 507, 450, 338, - 2, 157, 273, 274, 275, 276, 277, 3, 0, 278, - 279, 4, 280, 281, 282, 283, 284, 285, 351, 286, - 0, 5, 506, 1, 6, 7, 305, 0, 0, 516, - 0, 2, 0, 0, 0, 0, 8, 9, 3, 0, - 0, 0, 4, 0, 266, 0, 0, 10, 0, 0, - 11, 0, 5, 0, 0, 6, 7, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 8, 9, 0, - 0, 12, 0, 0, 0, 13, 0, 0, 10, 0, - 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, - 14, 267, 0, 0, 0, 0, 15, 266, 0, 0, - 0, 0, 12, 0, 0, 434, 13, 0, 0, 0, - 0, 356, 0, 0, 0, 0, 0, 0, 0, 270, - 0, 14, 0, 0, 0, 271, 272, 15, 0, 0, - 16, 17, 18, 266, 0, 0, 0, 0, 0, 273, - 274, 275, 276, 277, 267, 0, 278, 279, 0, 280, - 281, 282, 283, 284, 285, 0, 286, 0, 0, 0, - 0, 16, 17, 18, 356, 0, 0, 0, 0, 266, - 0, 0, 270, 0, 0, 0, 0, 0, 271, 272, - -282, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 273, 274, 275, 276, 277, 0, 0, 278, - 279, 0, 280, 281, 282, 283, 284, 285, 270, 286, - 0, 0, 0, 0, 271, -282, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -282, -282, - -282, 276, 277, 0, 0, 278, 279, 0, 280, 281, - 282, 283, 284, 285, 270, 286, 318, 0, 0, 0, - 271, 319, 0, 320, 321, 0, 322, 0, 0, 0, - 0, 0, 0, 0, 323, 0, 0, -282, -282, 0, - 0, -282, -282, 0, 280, 281, 282, 283, 284, 285, - 0, 286, 0, 0, 0, 0, 0, 0, 0, 0, - 324, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 325, 0, 326, - 327, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 328, 0, 0, 0, 329, 0, - 330, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 331 + 193, 106, 357, 389, 41, 125, 243, 44, 149, 149, + 150, 407, 52, 159, 54, 160, 116, 117, 118, 40, + 73, 339, 96, 97, 218, 388, 113, 244, 139, 315, + 179, 235, 303, 237, 239, 522, 107, 107, 75, 167, + 58, 303, 167, 92, 171, 271, 263, 271, 254, 172, + 86, 419, 89, 262, 258, 91, 260, 149, 211, 492, + 98, 180, 288, 264, 468, 289, 263, 173, 263, 419, + 215, 108, 108, 336, 285, 105, 286, 291, 286, 45, + 59, 425, 93, 264, 420, 264, 137, 138, 46, 263, + 65, 66, 183, 116, 117, 118, 512, 469, 154, 155, + 156, 240, 420, 112, 181, 364, 264, 109, 109, 440, + 263, 263, 478, 349, 350, 119, 232, 217, 47, 261, + 359, 428, 504, 258, 360, 361, 297, 264, 264, 298, + 74, 362, 365, 363, 184, 185, 186, 369, 370, 371, + 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, + 382, 383, 263, 455, 120, 121, 302, 183, 116, 117, + 118, 167, 304, 308, 39, 310, 73, 503, 352, 264, + 235, 337, 214, 187, 40, 405, 406, 341, 340, 401, + 241, 483, 191, 393, 122, 293, 42, 353, 429, 55, + 263, 311, 119, 354, 367, 263, 384, 517, 56, 184, + 185, 186, 238, 183, 116, 117, 118, 264, 521, 188, + 231, 368, 264, 432, 433, 125, 430, 236, 43, 445, + 479, 125, 189, 416, 271, 295, 422, 263, 57, 423, + 437, 120, 121, 149, 408, 353, 531, 514, 187, 253, + 417, 431, 50, 263, 264, 184, 185, 186, 190, 191, + 282, 283, 284, 285, 446, 286, 192, 119, 84, 85, + 264, 122, 435, 263, 253, 506, 387, 302, 183, 116, + 117, 118, 391, 48, 188, 443, 307, 248, 176, 249, + 264, 313, 434, 444, 187, 49, 176, 189, 474, 385, + 476, 477, 53, 439, 60, 447, 120, 121, 461, 63, + 448, 289, 481, 119, 67, 473, 449, 450, 302, 68, + 184, 185, 186, 190, 191, 485, 496, 446, 302, 497, + 188, 192, 73, 451, 78, 79, 122, -281, 452, 509, + 70, 80, 302, 189, 183, 116, 117, 118, 518, 81, + 507, 289, 120, 121, 82, 183, 116, 117, 118, 187, + 342, 343, 344, 345, 346, 347, 87, 90, 447, 190, + 191, 99, 94, 448, 446, 482, 100, 192, 119, 449, + 450, 525, 122, 102, 289, 103, 256, 185, 186, 529, + 132, 527, 289, 530, 115, 188, 451, 134, 185, 186, + -281, 452, 135, 139, 265, 141, 144, 142, 189, 147, + -246, 116, 151, 152, 118, 447, 74, 120, 121, 158, + 448, 160, 162, 163, 168, 187, 449, 450, 170, 175, + 519, 176, 212, 177, 190, 191, 187, 178, 216, 219, + 266, 220, 192, 451, 119, 223, 224, 122, 452, 112, + 242, 15, 244, 247, 287, 119, 250, 299, 251, 252, + 259, 257, 294, 290, 296, 302, 314, 316, 317, 309, + 333, 355, 257, -247, 189, 73, 358, 366, 386, 520, + 403, 409, 427, 120, 121, 189, 426, 267, 263, 410, + 412, 413, 414, 364, 120, 121, 249, 441, 286, 438, + 190, 191, 442, 459, 462, 454, 463, 268, 192, 464, + 465, 190, 191, 122, 269, 270, 466, 471, -283, 192, + 467, 271, 272, 472, 122, 1, 480, 484, 486, 487, + 488, 489, 490, 2, 491, 273, 274, 275, 276, 277, + 3, 493, 278, 279, 4, 280, 281, 282, 283, 284, + 285, 494, 286, 495, 5, 101, 1, 6, 7, 501, + 498, 516, 392, 499, 2, 500, 72, 502, 390, 8, + 9, 3, 505, 508, 515, 4, 421, 266, 513, 475, + 10, 524, 526, 11, 532, 5, 182, 222, 6, 7, + 338, 424, 292, 404, 511, 402, 510, 351, 305, 157, + 8, 9, 0, 0, 12, 0, 0, 0, 13, 0, + 0, 10, 0, 0, 11, 0, 0, 0, 0, 0, + 0, 0, 0, 14, 267, 0, 0, 0, 0, 15, + 266, 0, 0, 0, 0, 12, 0, 0, 436, 13, + 0, 0, 0, 0, 356, 0, 0, 0, 0, 0, + 0, 0, 270, 0, 14, 0, 0, 0, 271, 272, + 15, 0, 0, 16, 17, 18, 266, 0, 0, 0, + 0, 0, 273, 274, 275, 276, 277, 267, 0, 278, + 279, 0, 280, 281, 282, 283, 284, 285, 0, 286, + 0, 0, 0, 0, 16, 17, 18, 356, 0, 0, + 0, 0, 266, 0, 0, 270, 0, 0, 0, 0, + 0, 271, 272, -284, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 273, 274, 275, 276, 277, + 0, 0, 278, 279, 0, 280, 281, 282, 283, 284, + 285, 270, 286, 0, 0, 0, 0, 271, -284, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -284, -284, -284, 276, 277, 0, 0, 278, 279, + 0, 280, 281, 282, 283, 284, 285, 270, 286, 318, + 0, 0, 0, 271, 319, 0, 320, 321, 0, 322, + 0, 0, 0, 0, 0, 0, 0, 323, 0, 0, + -284, -284, 0, 0, -284, -284, 0, 280, 281, 282, + 283, 284, 285, 0, 286, 0, 0, 0, 0, 0, + 0, 0, 0, 324, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 325, 0, 326, 327, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 328, 0, 0, + 0, 329, 0, 330, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 331 }; static const yytype_int16 yycheck[] = { - 139, 74, 293, 259, 180, 316, 2, 92, 93, 5, - 80, 103, 3, 93, 10, 3, 12, 12, 4, 5, - 6, 56, 57, 145, 3, 77, 3, 82, 57, 37, - 54, 170, 19, 172, 173, 166, 93, 93, 3, 3, - 171, 9, 110, 452, 50, 113, 100, 27, 187, 9, - 114, 54, 48, 192, 50, 113, 141, 53, 188, 26, - 190, 141, 58, 27, 114, 27, 74, 131, 124, 72, - 143, 247, 59, 127, 134, 132, 44, 216, 114, 488, - 60, 131, 338, 3, 44, 107, 164, 3, 84, 85, - 114, 99, 114, 171, 231, 131, 60, 134, 60, 236, - 96, 97, 3, 134, 168, 165, 176, 131, 76, 131, - 366, 167, 80, 252, 253, 167, 171, 103, 168, 192, - 80, 93, 103, 114, 263, 264, 163, 257, 165, 160, - 161, 162, 163, 124, 165, 265, 93, 267, 167, 120, - 131, 271, 272, 273, 274, 275, 276, 277, 278, 279, - 280, 281, 282, 283, 284, 285, 142, 143, 469, 124, - 3, 4, 5, 6, 232, 171, 3, 4, 5, 6, - 309, 103, 79, 168, 232, 314, 315, 250, 300, 167, - 436, 160, 178, 160, 219, 110, 172, 498, 120, 114, - 70, 70, 97, 91, 286, 57, 89, 3, 509, 79, - 79, 63, 45, 46, 47, 144, 131, 0, 45, 46, - 47, 25, 110, 352, 353, 17, 18, 393, 116, 290, - 290, 114, 115, 91, 170, 296, 296, 223, 111, 109, - 109, 522, 317, 3, 364, 491, 114, 317, 131, 46, - 47, 84, 110, 107, 167, 169, 124, 84, 116, 167, - 114, 169, 66, 131, 114, 168, 116, 71, 171, 114, - 103, 116, 168, 77, 78, 171, 103, 131, 126, 168, - 113, 131, 171, 110, 93, 3, 131, 120, 168, 126, - 94, 171, 355, 120, 98, 99, 425, 171, 427, 428, - 133, 287, 168, 366, 168, 171, 133, 171, 168, 142, - 143, 171, 122, 124, 434, 142, 143, 3, 4, 5, - 6, 3, 4, 5, 6, 168, 159, 160, 171, 96, - 123, 3, 159, 160, 167, 4, 120, 3, 168, 172, - 167, 171, 82, 168, 92, 172, 171, 476, 167, 3, - 4, 5, 6, 168, 25, 168, 171, 3, 171, 45, - 46, 47, 90, 45, 46, 47, 168, 171, 4, 171, - 45, 57, 3, 436, 136, 137, 138, 139, 140, 141, - 167, 167, 3, 4, 5, 6, 6, 516, 12, 518, - 168, 45, 46, 47, 168, 66, 113, 168, 84, 125, - 71, 171, 84, 45, 3, 130, 77, 78, 38, 148, - 111, 130, 3, 76, 3, 111, 3, 103, 124, 165, - 167, 103, 167, 94, 167, 46, 47, 98, 99, 97, - 84, 17, 167, 48, 120, 167, 93, 171, 120, 92, - 171, 54, 171, 167, 167, 57, 168, 133, 3, 103, - 3, 133, 167, 30, 167, 167, 142, 143, 167, 93, - 142, 143, 100, 84, 168, 114, 120, 53, 167, 166, - 103, 165, 69, 159, 160, 167, 169, 159, 160, 133, - 171, 167, 103, 6, 25, 167, 172, 6, 142, 143, - 172, 6, 103, 119, 167, 98, 77, 77, 168, 120, - 171, 168, 77, 168, 98, 159, 160, 3, 125, 6, - 168, 119, 133, 167, 100, 6, 168, 167, 172, 68, - 168, 142, 143, 168, 167, 66, 24, 168, 168, 168, - 71, 294, 167, 298, 120, 333, 77, 78, 159, 160, - 81, 127, 128, 150, 426, 0, 167, 302, 134, 135, - 138, 172, 7, 94, 334, 217, 309, 484, 99, 248, - 15, 100, 148, 149, 150, 151, 152, 22, -1, 155, - 156, 26, 158, 159, 160, 161, 162, 163, 254, 165, - -1, 36, 483, 7, 39, 40, 230, -1, -1, 130, - -1, 15, -1, -1, -1, -1, 51, 52, 22, -1, - -1, -1, 26, -1, 53, -1, -1, 62, -1, -1, - 65, -1, 36, -1, -1, 39, 40, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 51, 52, -1, - -1, 86, -1, -1, -1, 90, -1, -1, 62, -1, - -1, 65, -1, -1, -1, -1, -1, -1, -1, -1, - 105, 100, -1, -1, -1, -1, 111, 53, -1, -1, - -1, -1, 86, -1, -1, 114, 90, -1, -1, -1, - -1, 120, -1, -1, -1, -1, -1, -1, -1, 128, - -1, 105, -1, -1, -1, 134, 135, 111, -1, -1, - 145, 146, 147, 53, -1, -1, -1, -1, -1, 148, - 149, 150, 151, 152, 100, -1, 155, 156, -1, 158, - 159, 160, 161, 162, 163, -1, 165, -1, -1, -1, - -1, 145, 146, 147, 120, -1, -1, -1, -1, 53, - -1, -1, 128, -1, -1, -1, -1, -1, 134, 135, - 100, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 148, 149, 150, 151, 152, -1, -1, 155, - 156, -1, 158, 159, 160, 161, 162, 163, 128, 165, - -1, -1, -1, -1, 134, 135, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 148, 149, - 150, 151, 152, -1, -1, 155, 156, -1, 158, 159, - 160, 161, 162, 163, 128, 165, 24, -1, -1, -1, - 134, 29, -1, 31, 32, -1, 34, -1, -1, -1, - -1, -1, -1, -1, 42, -1, -1, 151, 152, -1, - -1, 155, 156, -1, 158, 159, 160, 161, 162, 163, - -1, 165, -1, -1, -1, -1, -1, -1, -1, -1, - 68, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 85, -1, 87, - 88, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 102, -1, -1, -1, 106, -1, - 108, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 118 + 139, 74, 259, 293, 2, 80, 180, 5, 92, 93, + 93, 316, 10, 103, 12, 12, 4, 5, 6, 3, + 57, 3, 56, 57, 145, 3, 77, 3, 82, 54, + 93, 170, 3, 172, 173, 50, 9, 9, 37, 110, + 19, 3, 113, 93, 113, 134, 114, 134, 187, 54, + 48, 27, 50, 192, 188, 53, 190, 141, 141, 454, + 58, 124, 168, 131, 27, 171, 114, 72, 114, 27, + 143, 44, 44, 247, 163, 74, 165, 216, 165, 70, + 59, 338, 132, 131, 60, 131, 84, 85, 79, 114, + 17, 18, 3, 4, 5, 6, 491, 60, 96, 97, + 99, 176, 60, 76, 167, 100, 131, 80, 80, 366, + 114, 114, 116, 252, 253, 103, 167, 171, 109, 192, + 168, 124, 168, 257, 263, 264, 168, 131, 131, 171, + 167, 265, 127, 267, 45, 46, 47, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 114, 124, 142, 143, 171, 3, 4, 5, + 6, 232, 124, 232, 26, 89, 57, 472, 91, 131, + 309, 168, 63, 84, 3, 314, 315, 250, 160, 300, + 178, 438, 160, 167, 172, 219, 3, 110, 107, 70, + 114, 115, 103, 116, 103, 114, 286, 502, 79, 45, + 46, 47, 113, 3, 4, 5, 6, 131, 513, 120, + 164, 120, 131, 352, 353, 290, 91, 171, 3, 393, + 107, 296, 133, 103, 134, 223, 168, 114, 109, 171, + 364, 142, 143, 317, 317, 110, 526, 494, 84, 110, + 120, 116, 97, 114, 131, 45, 46, 47, 159, 160, + 160, 161, 162, 163, 25, 165, 167, 103, 46, 47, + 131, 172, 166, 114, 110, 116, 290, 171, 3, 4, + 5, 6, 296, 93, 120, 168, 231, 167, 171, 169, + 131, 236, 355, 168, 84, 93, 171, 133, 427, 287, + 429, 430, 79, 366, 3, 66, 142, 143, 168, 144, + 71, 171, 436, 103, 0, 168, 77, 78, 171, 170, + 45, 46, 47, 159, 160, 168, 168, 25, 171, 171, + 120, 167, 57, 94, 3, 169, 172, 98, 99, 168, + 111, 167, 171, 133, 3, 4, 5, 6, 168, 93, + 479, 171, 142, 143, 126, 3, 4, 5, 6, 84, + 136, 137, 138, 139, 140, 141, 3, 122, 66, 159, + 160, 124, 126, 71, 25, 438, 171, 167, 103, 77, + 78, 168, 172, 96, 171, 123, 45, 46, 47, 168, + 4, 520, 171, 522, 3, 120, 94, 120, 46, 47, + 98, 99, 3, 82, 17, 92, 3, 167, 133, 90, + 171, 4, 45, 3, 6, 66, 167, 142, 143, 167, + 71, 12, 168, 168, 113, 84, 77, 78, 125, 168, + 81, 171, 3, 45, 159, 160, 84, 130, 148, 38, + 53, 111, 167, 94, 103, 130, 3, 172, 99, 76, + 3, 111, 3, 124, 97, 103, 167, 93, 167, 167, + 165, 120, 48, 167, 167, 171, 54, 167, 92, 171, + 171, 167, 120, 171, 133, 57, 168, 167, 3, 130, + 3, 30, 93, 142, 143, 133, 168, 100, 114, 167, + 167, 167, 167, 100, 142, 143, 169, 103, 165, 167, + 159, 160, 166, 69, 167, 171, 6, 120, 167, 6, + 6, 159, 160, 172, 127, 128, 6, 119, 0, 167, + 103, 134, 135, 167, 172, 7, 168, 168, 168, 98, + 77, 77, 77, 15, 98, 148, 149, 150, 151, 152, + 22, 3, 155, 156, 26, 158, 159, 160, 161, 162, + 163, 125, 165, 6, 36, 68, 7, 39, 40, 119, + 168, 6, 298, 168, 15, 168, 24, 167, 294, 51, + 52, 22, 168, 168, 168, 26, 333, 53, 167, 428, + 62, 168, 167, 65, 168, 36, 138, 150, 39, 40, + 248, 334, 217, 309, 487, 302, 486, 254, 230, 100, + 51, 52, -1, -1, 86, -1, -1, -1, 90, -1, + -1, 62, -1, -1, 65, -1, -1, -1, -1, -1, + -1, -1, -1, 105, 100, -1, -1, -1, -1, 111, + 53, -1, -1, -1, -1, 86, -1, -1, 114, 90, + -1, -1, -1, -1, 120, -1, -1, -1, -1, -1, + -1, -1, 128, -1, 105, -1, -1, -1, 134, 135, + 111, -1, -1, 145, 146, 147, 53, -1, -1, -1, + -1, -1, 148, 149, 150, 151, 152, 100, -1, 155, + 156, -1, 158, 159, 160, 161, 162, 163, -1, 165, + -1, -1, -1, -1, 145, 146, 147, 120, -1, -1, + -1, -1, 53, -1, -1, 128, -1, -1, -1, -1, + -1, 134, 135, 100, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 148, 149, 150, 151, 152, + -1, -1, 155, 156, -1, 158, 159, 160, 161, 162, + 163, 128, 165, -1, -1, -1, -1, 134, 135, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 148, 149, 150, 151, 152, -1, -1, 155, 156, + -1, 158, 159, 160, 161, 162, 163, 128, 165, 24, + -1, -1, -1, 134, 29, -1, 31, 32, -1, 34, + -1, -1, -1, -1, -1, -1, -1, 42, -1, -1, + 151, 152, -1, -1, 155, 156, -1, 158, 159, 160, + 161, 162, 163, -1, 165, -1, -1, -1, -1, -1, + -1, -1, -1, 68, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 85, -1, 87, 88, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 102, -1, -1, + -1, 106, -1, 108, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 118 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1309,56 +1306,57 @@ static const yytype_int16 yystos[] = 0, 7, 15, 22, 26, 36, 39, 40, 51, 52, 62, 65, 86, 90, 105, 111, 145, 146, 147, 174, 175, 176, 177, 181, 183, 185, 186, 190, 191, 192, - 202, 204, 205, 206, 207, 209, 212, 277, 278, 26, - 3, 270, 3, 3, 270, 70, 79, 109, 93, 93, - 97, 269, 270, 79, 270, 70, 79, 109, 19, 59, - 3, 279, 280, 144, 182, 182, 182, 0, 170, 284, - 111, 178, 178, 57, 167, 215, 216, 220, 3, 169, - 167, 93, 126, 193, 193, 193, 270, 3, 187, 270, - 122, 270, 93, 132, 126, 203, 203, 203, 270, 124, - 171, 176, 96, 123, 232, 215, 216, 9, 44, 80, - 217, 218, 76, 217, 228, 3, 4, 5, 6, 103, - 142, 143, 172, 235, 236, 257, 258, 259, 260, 261, - 262, 263, 4, 184, 120, 3, 271, 270, 270, 82, - 225, 92, 167, 208, 3, 210, 211, 90, 188, 258, - 188, 45, 3, 272, 270, 270, 215, 280, 167, 261, - 12, 221, 168, 168, 213, 214, 215, 220, 113, 219, - 125, 213, 54, 72, 233, 168, 171, 45, 130, 93, - 124, 167, 208, 3, 45, 46, 47, 84, 120, 133, - 159, 160, 167, 238, 239, 240, 241, 242, 243, 244, - 245, 247, 248, 249, 250, 251, 253, 254, 255, 256, - 257, 188, 3, 285, 63, 216, 148, 171, 225, 38, - 111, 189, 189, 130, 3, 179, 180, 222, 234, 237, - 238, 228, 217, 229, 230, 238, 228, 238, 113, 238, - 257, 270, 3, 212, 3, 194, 195, 124, 167, 169, - 167, 167, 167, 110, 238, 246, 45, 120, 239, 165, - 239, 216, 238, 114, 131, 17, 53, 100, 120, 127, + 203, 205, 206, 207, 208, 210, 213, 278, 279, 26, + 3, 271, 3, 3, 271, 70, 79, 109, 93, 93, + 97, 270, 271, 79, 271, 70, 79, 109, 19, 59, + 3, 280, 281, 144, 182, 182, 182, 0, 170, 285, + 111, 178, 178, 57, 167, 216, 217, 221, 3, 169, + 167, 93, 126, 193, 193, 193, 271, 3, 187, 271, + 122, 271, 93, 132, 126, 204, 204, 204, 271, 124, + 171, 176, 96, 123, 233, 216, 217, 9, 44, 80, + 218, 219, 76, 218, 229, 3, 4, 5, 6, 103, + 142, 143, 172, 236, 237, 258, 259, 260, 261, 262, + 263, 264, 4, 184, 120, 3, 272, 271, 271, 82, + 226, 92, 167, 209, 3, 211, 212, 90, 188, 259, + 188, 45, 3, 273, 271, 271, 216, 281, 167, 262, + 12, 222, 168, 168, 214, 215, 216, 221, 113, 220, + 125, 214, 54, 72, 234, 168, 171, 45, 130, 93, + 124, 167, 209, 3, 45, 46, 47, 84, 120, 133, + 159, 160, 167, 239, 240, 241, 242, 243, 244, 245, + 246, 248, 249, 250, 251, 252, 254, 255, 256, 257, + 258, 188, 3, 286, 63, 217, 148, 171, 226, 38, + 111, 189, 189, 130, 3, 179, 180, 223, 235, 238, + 239, 229, 218, 230, 231, 239, 229, 239, 113, 239, + 258, 271, 3, 213, 3, 194, 195, 124, 167, 169, + 167, 167, 167, 110, 239, 247, 45, 120, 240, 165, + 240, 217, 239, 114, 131, 17, 53, 100, 120, 127, 128, 134, 135, 148, 149, 150, 151, 152, 155, 156, 158, 159, 160, 161, 162, 163, 165, 97, 168, 171, - 167, 238, 211, 203, 48, 270, 167, 168, 171, 93, - 223, 224, 171, 3, 124, 275, 276, 233, 213, 171, - 89, 115, 231, 233, 54, 54, 167, 92, 24, 29, + 167, 239, 212, 204, 48, 271, 167, 168, 171, 93, + 224, 225, 171, 3, 124, 276, 277, 234, 214, 171, + 89, 115, 232, 234, 54, 54, 167, 92, 24, 29, 31, 32, 34, 42, 68, 85, 87, 88, 102, 106, - 108, 118, 196, 171, 200, 201, 212, 168, 221, 3, - 160, 216, 136, 137, 138, 139, 140, 141, 252, 238, - 238, 246, 91, 110, 116, 167, 120, 234, 168, 168, - 238, 238, 239, 239, 100, 127, 167, 103, 120, 239, - 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, - 239, 239, 239, 239, 261, 270, 3, 236, 3, 256, - 187, 236, 180, 167, 264, 265, 266, 267, 268, 270, - 281, 225, 237, 3, 230, 238, 238, 285, 188, 30, - 167, 197, 167, 167, 103, 120, 198, 27, 60, 195, - 168, 171, 201, 234, 168, 93, 124, 107, 91, 116, - 238, 238, 216, 166, 114, 239, 167, 216, 234, 103, - 166, 168, 168, 212, 25, 66, 71, 77, 78, 94, - 99, 282, 171, 124, 273, 274, 275, 69, 226, 168, - 167, 6, 6, 6, 103, 27, 60, 199, 119, 167, - 168, 238, 196, 238, 238, 116, 107, 168, 239, 216, - 234, 168, 168, 168, 98, 77, 77, 77, 98, 265, - 3, 125, 6, 168, 171, 168, 168, 119, 167, 285, - 168, 168, 116, 238, 168, 168, 274, 266, 265, 167, - 234, 168, 6, 285, 168, 81, 130, 285, 50, 227, - 168, 168, 167, 238, 283, 168, 238, 256, 168 + 108, 118, 196, 171, 201, 202, 213, 168, 222, 3, + 160, 217, 136, 137, 138, 139, 140, 141, 253, 239, + 239, 247, 91, 110, 116, 167, 120, 235, 168, 168, + 239, 239, 240, 240, 100, 127, 167, 103, 120, 240, + 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, + 240, 240, 240, 240, 262, 271, 3, 237, 3, 257, + 187, 237, 180, 167, 265, 266, 267, 268, 269, 271, + 282, 226, 238, 3, 231, 239, 239, 286, 188, 30, + 167, 198, 167, 167, 167, 197, 103, 120, 199, 27, + 60, 195, 168, 171, 202, 235, 168, 93, 124, 107, + 91, 116, 239, 239, 217, 166, 114, 240, 167, 217, + 235, 103, 166, 168, 168, 213, 25, 66, 71, 77, + 78, 94, 99, 283, 171, 124, 274, 275, 276, 69, + 227, 168, 167, 6, 6, 6, 6, 103, 27, 60, + 200, 119, 167, 168, 239, 196, 239, 239, 116, 107, + 168, 240, 217, 235, 168, 168, 168, 98, 77, 77, + 77, 98, 266, 3, 125, 6, 168, 171, 168, 168, + 168, 119, 167, 286, 168, 168, 116, 239, 168, 168, + 275, 267, 266, 167, 235, 168, 6, 286, 168, 81, + 130, 286, 50, 228, 168, 168, 167, 239, 284, 168, + 239, 257, 168 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ @@ -1371,28 +1369,28 @@ static const yytype_int16 yyr1[] = 189, 190, 191, 191, 191, 192, 192, 192, 192, 192, 193, 193, 194, 194, 195, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 197, - 197, 197, 198, 198, 198, 199, 199, 199, 200, 200, - 200, 201, 201, 202, 202, 202, 202, 203, 203, 204, - 205, 206, 207, 207, 208, 208, 209, 210, 210, 211, - 212, 212, 212, 213, 213, 214, 214, 215, 215, 216, - 216, 217, 218, 218, 218, 219, 219, 220, 221, 221, - 222, 223, 223, 224, 225, 225, 226, 226, 227, 227, - 228, 228, 229, 229, 230, 231, 231, 231, 232, 232, - 233, 233, 233, 233, 233, 233, 234, 234, 235, 235, - 236, 236, 237, 238, 238, 238, 238, 238, 239, 239, - 239, 239, 239, 239, 239, 239, 239, 239, 239, 240, - 240, 241, 241, 241, 241, 241, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 243, 243, 244, - 244, 244, 244, 245, 245, 245, 245, 246, 246, 247, - 247, 248, 248, 248, 248, 248, 248, 248, 249, 249, - 250, 251, 252, 252, 252, 252, 252, 252, 253, 254, - 255, 256, 256, 256, 256, 257, 257, 257, 257, 257, - 258, 259, 259, 260, 260, 261, 262, 263, 264, 264, - 265, 265, 266, 266, 267, 267, 268, 269, 270, 270, - 271, 271, 272, 273, 273, 274, 274, 275, 275, 276, - 276, 277, 277, 278, 279, 279, 280, 281, 281, 281, - 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, - 283, 284, 284, 285, 285 + 197, 198, 198, 198, 199, 199, 199, 200, 200, 200, + 201, 201, 201, 202, 202, 203, 203, 203, 203, 204, + 204, 205, 206, 207, 208, 208, 209, 209, 210, 211, + 211, 212, 213, 213, 213, 214, 214, 215, 215, 216, + 216, 217, 217, 218, 219, 219, 219, 220, 220, 221, + 222, 222, 223, 224, 224, 225, 226, 226, 227, 227, + 228, 228, 229, 229, 230, 230, 231, 232, 232, 232, + 233, 233, 234, 234, 234, 234, 234, 234, 235, 235, + 236, 236, 237, 237, 238, 239, 239, 239, 239, 239, + 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, + 240, 241, 241, 242, 242, 242, 242, 242, 243, 243, + 243, 243, 243, 243, 243, 243, 243, 243, 243, 244, + 244, 245, 245, 245, 245, 246, 246, 246, 246, 247, + 247, 248, 248, 249, 249, 249, 249, 249, 249, 249, + 250, 250, 251, 252, 253, 253, 253, 253, 253, 253, + 254, 255, 256, 257, 257, 257, 257, 258, 258, 258, + 258, 258, 259, 260, 260, 261, 261, 262, 263, 264, + 265, 265, 266, 266, 267, 267, 268, 268, 269, 270, + 271, 271, 272, 272, 273, 274, 274, 275, 275, 276, + 276, 277, 277, 278, 278, 279, 280, 280, 281, 282, + 282, 282, 283, 283, 283, 283, 283, 283, 283, 283, + 283, 283, 284, 285, 285, 286, 286 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -1404,29 +1402,29 @@ static const yytype_int8 yyr2[] = 0, 4, 1, 2, 5, 7, 5, 1, 1, 3, 0, 5, 2, 3, 2, 8, 8, 6, 9, 7, 3, 0, 1, 3, 4, 1, 1, 1, 1, 2, - 1, 1, 4, 5, 4, 1, 1, 1, 1, 5, - 3, 0, 1, 2, 0, 2, 1, 0, 1, 2, - 0, 6, 5, 4, 4, 3, 6, 2, 0, 7, - 4, 2, 8, 5, 3, 0, 5, 1, 3, 3, - 2, 2, 6, 1, 1, 1, 3, 3, 3, 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, 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, 6, 1, 1, 1, 1, 1, 1, 4, 4, - 5, 1, 3, 1, 3, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, - 1, 1, 1, 4, 1, 3, 2, 1, 1, 3, - 1, 0, 1, 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, 4, 5, 4, 1, 2, 1, 1, 3, + 0, 5, 3, 0, 1, 2, 0, 2, 1, 0, + 1, 2, 0, 6, 5, 4, 4, 3, 6, 2, + 0, 7, 4, 2, 8, 5, 3, 0, 5, 1, + 3, 3, 2, 2, 6, 1, 1, 1, 3, 3, + 3, 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, 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, 6, 1, 1, 1, 1, 1, 1, + 4, 4, 5, 1, 3, 1, 3, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 1, 1, 1, 4, 1, 3, 2, 1, + 1, 3, 1, 0, 1, 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 }; @@ -1980,25 +1978,25 @@ yydestruct (const char *yymsg, case YYSYMBOL_IDENTIFIER: /* IDENTIFIER */ #line 154 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1984 "bison_parser.cpp" +#line 1982 "bison_parser.cpp" break; case YYSYMBOL_STRING: /* STRING */ #line 154 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1990 "bison_parser.cpp" +#line 1988 "bison_parser.cpp" break; case YYSYMBOL_FLOATVAL: /* FLOATVAL */ #line 152 "bison_parser.y" { } -#line 1996 "bison_parser.cpp" +#line 1994 "bison_parser.cpp" break; case YYSYMBOL_INTVAL: /* INTVAL */ #line 152 "bison_parser.y" { } -#line 2002 "bison_parser.cpp" +#line 2000 "bison_parser.cpp" break; case YYSYMBOL_statement_list: /* statement_list */ @@ -2011,19 +2009,19 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).stmt_vec)); } -#line 2015 "bison_parser.cpp" +#line 2013 "bison_parser.cpp" break; case YYSYMBOL_statement: /* statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 2021 "bison_parser.cpp" +#line 2019 "bison_parser.cpp" break; case YYSYMBOL_preparable_statement: /* preparable_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 2027 "bison_parser.cpp" +#line 2025 "bison_parser.cpp" break; case YYSYMBOL_opt_hints: /* opt_hints */ @@ -2036,7 +2034,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2040 "bison_parser.cpp" +#line 2038 "bison_parser.cpp" break; case YYSYMBOL_hint_list: /* hint_list */ @@ -2049,85 +2047,85 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2053 "bison_parser.cpp" +#line 2051 "bison_parser.cpp" break; case YYSYMBOL_hint: /* hint */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2059 "bison_parser.cpp" +#line 2057 "bison_parser.cpp" break; case YYSYMBOL_transaction_statement: /* transaction_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).transaction_stmt)); } -#line 2065 "bison_parser.cpp" +#line 2063 "bison_parser.cpp" break; case YYSYMBOL_prepare_statement: /* prepare_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).prep_stmt)); } -#line 2071 "bison_parser.cpp" +#line 2069 "bison_parser.cpp" break; case YYSYMBOL_prepare_target_query: /* prepare_target_query */ #line 154 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2077 "bison_parser.cpp" +#line 2075 "bison_parser.cpp" break; case YYSYMBOL_execute_statement: /* execute_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).exec_stmt)); } -#line 2083 "bison_parser.cpp" +#line 2081 "bison_parser.cpp" break; case YYSYMBOL_import_statement: /* import_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).import_stmt)); } -#line 2089 "bison_parser.cpp" +#line 2087 "bison_parser.cpp" break; case YYSYMBOL_file_type: /* file_type */ #line 152 "bison_parser.y" { } -#line 2095 "bison_parser.cpp" +#line 2093 "bison_parser.cpp" break; case YYSYMBOL_file_path: /* file_path */ #line 154 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2101 "bison_parser.cpp" +#line 2099 "bison_parser.cpp" break; case YYSYMBOL_opt_file_type: /* opt_file_type */ #line 152 "bison_parser.y" { } -#line 2107 "bison_parser.cpp" +#line 2105 "bison_parser.cpp" break; case YYSYMBOL_export_statement: /* export_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).export_stmt)); } -#line 2113 "bison_parser.cpp" +#line 2111 "bison_parser.cpp" break; case YYSYMBOL_show_statement: /* show_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).show_stmt)); } -#line 2119 "bison_parser.cpp" +#line 2117 "bison_parser.cpp" break; case YYSYMBOL_create_statement: /* create_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).create_stmt)); } -#line 2125 "bison_parser.cpp" +#line 2123 "bison_parser.cpp" break; case YYSYMBOL_opt_not_exists: /* opt_not_exists */ #line 152 "bison_parser.y" { } -#line 2131 "bison_parser.cpp" +#line 2129 "bison_parser.cpp" break; case YYSYMBOL_column_def_commalist: /* column_def_commalist */ @@ -2140,85 +2138,91 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).column_vec)); } -#line 2144 "bison_parser.cpp" +#line 2142 "bison_parser.cpp" break; case YYSYMBOL_column_def: /* column_def */ #line 163 "bison_parser.y" { delete (((*yyvaluep).column_t)); } -#line 2150 "bison_parser.cpp" +#line 2148 "bison_parser.cpp" break; case YYSYMBOL_column_type: /* column_type */ #line 152 "bison_parser.y" { } -#line 2156 "bison_parser.cpp" +#line 2154 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_time_specification: /* opt_time_specification */ +#line 152 "bison_parser.y" + { } +#line 2160 "bison_parser.cpp" break; case YYSYMBOL_opt_decimal_specification: /* opt_decimal_specification */ #line 152 "bison_parser.y" { } -#line 2162 "bison_parser.cpp" +#line 2166 "bison_parser.cpp" break; case YYSYMBOL_opt_column_nullable: /* opt_column_nullable */ #line 152 "bison_parser.y" { } -#line 2168 "bison_parser.cpp" +#line 2172 "bison_parser.cpp" break; case YYSYMBOL_opt_column_constraint: /* opt_column_constraint */ #line 152 "bison_parser.y" { } -#line 2174 "bison_parser.cpp" +#line 2178 "bison_parser.cpp" break; case YYSYMBOL_opt_table_constraints: /* opt_table_constraints */ #line 163 "bison_parser.y" { delete (((*yyvaluep).table_constraint_vec)); } -#line 2180 "bison_parser.cpp" +#line 2184 "bison_parser.cpp" break; case YYSYMBOL_table_constraint: /* table_constraint */ #line 163 "bison_parser.y" { delete (((*yyvaluep).table_constraint_t)); } -#line 2186 "bison_parser.cpp" +#line 2190 "bison_parser.cpp" break; case YYSYMBOL_drop_statement: /* drop_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).drop_stmt)); } -#line 2192 "bison_parser.cpp" +#line 2196 "bison_parser.cpp" break; case YYSYMBOL_opt_exists: /* opt_exists */ #line 152 "bison_parser.y" { } -#line 2198 "bison_parser.cpp" +#line 2202 "bison_parser.cpp" break; case YYSYMBOL_alter_statement: /* alter_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).alter_stmt)); } -#line 2204 "bison_parser.cpp" +#line 2208 "bison_parser.cpp" break; case YYSYMBOL_delete_statement: /* delete_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2210 "bison_parser.cpp" +#line 2214 "bison_parser.cpp" break; case YYSYMBOL_truncate_statement: /* truncate_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2216 "bison_parser.cpp" +#line 2220 "bison_parser.cpp" break; case YYSYMBOL_insert_statement: /* insert_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).insert_stmt)); } -#line 2222 "bison_parser.cpp" +#line 2226 "bison_parser.cpp" break; case YYSYMBOL_opt_column_list: /* opt_column_list */ @@ -2231,13 +2235,13 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2235 "bison_parser.cpp" +#line 2239 "bison_parser.cpp" break; case YYSYMBOL_update_statement: /* update_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).update_stmt)); } -#line 2241 "bison_parser.cpp" +#line 2245 "bison_parser.cpp" break; case YYSYMBOL_update_clause_commalist: /* update_clause_commalist */ @@ -2250,73 +2254,73 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).update_vec)); } -#line 2254 "bison_parser.cpp" +#line 2258 "bison_parser.cpp" break; case YYSYMBOL_update_clause: /* update_clause */ #line 163 "bison_parser.y" { delete (((*yyvaluep).update_t)); } -#line 2260 "bison_parser.cpp" +#line 2264 "bison_parser.cpp" break; case YYSYMBOL_select_statement: /* select_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2266 "bison_parser.cpp" +#line 2270 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation: /* select_within_set_operation */ #line 163 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2272 "bison_parser.cpp" +#line 2276 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation_no_parentheses: /* select_within_set_operation_no_parentheses */ #line 163 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2278 "bison_parser.cpp" +#line 2282 "bison_parser.cpp" break; case YYSYMBOL_select_with_paren: /* select_with_paren */ #line 163 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2284 "bison_parser.cpp" +#line 2288 "bison_parser.cpp" break; case YYSYMBOL_select_no_paren: /* select_no_paren */ #line 163 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2290 "bison_parser.cpp" +#line 2294 "bison_parser.cpp" break; case YYSYMBOL_set_operator: /* set_operator */ #line 163 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2296 "bison_parser.cpp" +#line 2300 "bison_parser.cpp" break; case YYSYMBOL_set_type: /* set_type */ #line 163 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2302 "bison_parser.cpp" +#line 2306 "bison_parser.cpp" break; case YYSYMBOL_opt_all: /* opt_all */ #line 152 "bison_parser.y" { } -#line 2308 "bison_parser.cpp" +#line 2312 "bison_parser.cpp" break; case YYSYMBOL_select_clause: /* select_clause */ #line 163 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2314 "bison_parser.cpp" +#line 2318 "bison_parser.cpp" break; case YYSYMBOL_opt_distinct: /* opt_distinct */ #line 152 "bison_parser.y" { } -#line 2320 "bison_parser.cpp" +#line 2324 "bison_parser.cpp" break; case YYSYMBOL_select_list: /* select_list */ @@ -2329,37 +2333,37 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2333 "bison_parser.cpp" +#line 2337 "bison_parser.cpp" break; case YYSYMBOL_opt_from_clause: /* opt_from_clause */ #line 163 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2339 "bison_parser.cpp" +#line 2343 "bison_parser.cpp" break; case YYSYMBOL_from_clause: /* from_clause */ #line 163 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2345 "bison_parser.cpp" +#line 2349 "bison_parser.cpp" break; case YYSYMBOL_opt_where: /* opt_where */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2351 "bison_parser.cpp" +#line 2355 "bison_parser.cpp" break; case YYSYMBOL_opt_group: /* opt_group */ #line 163 "bison_parser.y" { delete (((*yyvaluep).group_t)); } -#line 2357 "bison_parser.cpp" +#line 2361 "bison_parser.cpp" break; case YYSYMBOL_opt_having: /* opt_having */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2363 "bison_parser.cpp" +#line 2367 "bison_parser.cpp" break; case YYSYMBOL_opt_order: /* opt_order */ @@ -2372,7 +2376,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2376 "bison_parser.cpp" +#line 2380 "bison_parser.cpp" break; case YYSYMBOL_order_list: /* order_list */ @@ -2385,31 +2389,31 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2389 "bison_parser.cpp" +#line 2393 "bison_parser.cpp" break; case YYSYMBOL_order_desc: /* order_desc */ #line 163 "bison_parser.y" { delete (((*yyvaluep).order)); } -#line 2395 "bison_parser.cpp" +#line 2399 "bison_parser.cpp" break; case YYSYMBOL_opt_order_type: /* opt_order_type */ #line 152 "bison_parser.y" { } -#line 2401 "bison_parser.cpp" +#line 2405 "bison_parser.cpp" break; case YYSYMBOL_opt_top: /* opt_top */ #line 163 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2407 "bison_parser.cpp" +#line 2411 "bison_parser.cpp" break; case YYSYMBOL_opt_limit: /* opt_limit */ #line 163 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2413 "bison_parser.cpp" +#line 2417 "bison_parser.cpp" break; case YYSYMBOL_expr_list: /* expr_list */ @@ -2422,7 +2426,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2426 "bison_parser.cpp" +#line 2430 "bison_parser.cpp" break; case YYSYMBOL_opt_literal_list: /* opt_literal_list */ @@ -2435,7 +2439,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2439 "bison_parser.cpp" +#line 2443 "bison_parser.cpp" break; case YYSYMBOL_literal_list: /* literal_list */ @@ -2448,187 +2452,187 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2452 "bison_parser.cpp" +#line 2456 "bison_parser.cpp" break; case YYSYMBOL_expr_alias: /* expr_alias */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2458 "bison_parser.cpp" +#line 2462 "bison_parser.cpp" break; case YYSYMBOL_expr: /* expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2464 "bison_parser.cpp" +#line 2468 "bison_parser.cpp" break; case YYSYMBOL_operand: /* operand */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2470 "bison_parser.cpp" +#line 2474 "bison_parser.cpp" break; case YYSYMBOL_scalar_expr: /* scalar_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2476 "bison_parser.cpp" +#line 2480 "bison_parser.cpp" break; case YYSYMBOL_unary_expr: /* unary_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2482 "bison_parser.cpp" +#line 2486 "bison_parser.cpp" break; case YYSYMBOL_binary_expr: /* binary_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2488 "bison_parser.cpp" +#line 2492 "bison_parser.cpp" break; case YYSYMBOL_logic_expr: /* logic_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2494 "bison_parser.cpp" +#line 2498 "bison_parser.cpp" break; case YYSYMBOL_in_expr: /* in_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2500 "bison_parser.cpp" +#line 2504 "bison_parser.cpp" break; case YYSYMBOL_case_expr: /* case_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2506 "bison_parser.cpp" +#line 2510 "bison_parser.cpp" break; case YYSYMBOL_case_list: /* case_list */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2512 "bison_parser.cpp" +#line 2516 "bison_parser.cpp" break; case YYSYMBOL_exists_expr: /* exists_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2518 "bison_parser.cpp" +#line 2522 "bison_parser.cpp" break; case YYSYMBOL_comp_expr: /* comp_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2524 "bison_parser.cpp" +#line 2528 "bison_parser.cpp" break; case YYSYMBOL_function_expr: /* function_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2530 "bison_parser.cpp" +#line 2534 "bison_parser.cpp" break; case YYSYMBOL_extract_expr: /* extract_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2536 "bison_parser.cpp" +#line 2540 "bison_parser.cpp" break; case YYSYMBOL_cast_expr: /* cast_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2542 "bison_parser.cpp" +#line 2546 "bison_parser.cpp" break; case YYSYMBOL_datetime_field: /* datetime_field */ #line 152 "bison_parser.y" { } -#line 2548 "bison_parser.cpp" +#line 2552 "bison_parser.cpp" break; case YYSYMBOL_array_expr: /* array_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2554 "bison_parser.cpp" +#line 2558 "bison_parser.cpp" break; case YYSYMBOL_array_index: /* array_index */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2560 "bison_parser.cpp" +#line 2564 "bison_parser.cpp" break; case YYSYMBOL_between_expr: /* between_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2566 "bison_parser.cpp" +#line 2570 "bison_parser.cpp" break; case YYSYMBOL_column_name: /* column_name */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2572 "bison_parser.cpp" +#line 2576 "bison_parser.cpp" break; case YYSYMBOL_literal: /* literal */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2578 "bison_parser.cpp" +#line 2582 "bison_parser.cpp" break; case YYSYMBOL_string_literal: /* string_literal */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2584 "bison_parser.cpp" +#line 2588 "bison_parser.cpp" break; case YYSYMBOL_bool_literal: /* bool_literal */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2590 "bison_parser.cpp" +#line 2594 "bison_parser.cpp" break; case YYSYMBOL_num_literal: /* num_literal */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2596 "bison_parser.cpp" +#line 2600 "bison_parser.cpp" break; case YYSYMBOL_int_literal: /* int_literal */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2602 "bison_parser.cpp" +#line 2606 "bison_parser.cpp" break; case YYSYMBOL_null_literal: /* null_literal */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2608 "bison_parser.cpp" +#line 2612 "bison_parser.cpp" break; case YYSYMBOL_param_expr: /* param_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2614 "bison_parser.cpp" +#line 2618 "bison_parser.cpp" break; case YYSYMBOL_table_ref: /* table_ref */ #line 163 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2620 "bison_parser.cpp" +#line 2624 "bison_parser.cpp" break; case YYSYMBOL_table_ref_atomic: /* table_ref_atomic */ #line 163 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2626 "bison_parser.cpp" +#line 2630 "bison_parser.cpp" break; case YYSYMBOL_nonjoin_table_ref_atomic: /* nonjoin_table_ref_atomic */ #line 163 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2632 "bison_parser.cpp" +#line 2636 "bison_parser.cpp" break; case YYSYMBOL_table_ref_commalist: /* table_ref_commalist */ @@ -2641,103 +2645,103 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).table_vec)); } -#line 2645 "bison_parser.cpp" +#line 2649 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name: /* table_ref_name */ #line 163 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2651 "bison_parser.cpp" +#line 2655 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name_no_alias: /* table_ref_name_no_alias */ #line 163 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2657 "bison_parser.cpp" +#line 2661 "bison_parser.cpp" break; case YYSYMBOL_table_name: /* table_name */ #line 153 "bison_parser.y" { free( (((*yyvaluep).table_name).name) ); free( (((*yyvaluep).table_name).schema) ); } -#line 2663 "bison_parser.cpp" +#line 2667 "bison_parser.cpp" break; case YYSYMBOL_opt_index_name: /* opt_index_name */ #line 154 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2669 "bison_parser.cpp" +#line 2673 "bison_parser.cpp" break; case YYSYMBOL_index_name: /* index_name */ #line 154 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2675 "bison_parser.cpp" +#line 2679 "bison_parser.cpp" break; case YYSYMBOL_table_alias: /* table_alias */ #line 163 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2681 "bison_parser.cpp" +#line 2685 "bison_parser.cpp" break; case YYSYMBOL_opt_table_alias: /* opt_table_alias */ #line 163 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2687 "bison_parser.cpp" +#line 2691 "bison_parser.cpp" break; case YYSYMBOL_alias: /* alias */ #line 163 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2693 "bison_parser.cpp" +#line 2697 "bison_parser.cpp" break; case YYSYMBOL_opt_alias: /* opt_alias */ #line 163 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2699 "bison_parser.cpp" +#line 2703 "bison_parser.cpp" break; case YYSYMBOL_opt_with_clause: /* opt_with_clause */ #line 163 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2705 "bison_parser.cpp" +#line 2709 "bison_parser.cpp" break; case YYSYMBOL_with_clause: /* with_clause */ #line 163 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2711 "bison_parser.cpp" +#line 2715 "bison_parser.cpp" break; case YYSYMBOL_with_description_list: /* with_description_list */ #line 163 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2717 "bison_parser.cpp" +#line 2721 "bison_parser.cpp" break; case YYSYMBOL_with_description: /* with_description */ #line 163 "bison_parser.y" { delete (((*yyvaluep).with_description_t)); } -#line 2723 "bison_parser.cpp" +#line 2727 "bison_parser.cpp" break; case YYSYMBOL_join_clause: /* join_clause */ #line 163 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2729 "bison_parser.cpp" +#line 2733 "bison_parser.cpp" break; case YYSYMBOL_opt_join_type: /* opt_join_type */ #line 152 "bison_parser.y" { } -#line 2735 "bison_parser.cpp" +#line 2739 "bison_parser.cpp" break; case YYSYMBOL_join_condition: /* join_condition */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2741 "bison_parser.cpp" +#line 2745 "bison_parser.cpp" break; case YYSYMBOL_ident_commalist: /* ident_commalist */ @@ -2750,7 +2754,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2754 "bison_parser.cpp" +#line 2758 "bison_parser.cpp" break; default: @@ -2857,7 +2861,7 @@ YYLTYPE yylloc = yyloc_default; yylloc.string_length = 0; } -#line 2861 "bison_parser.cpp" +#line 2865 "bison_parser.cpp" yylsp[0] = yylloc; goto yysetstate; @@ -3067,7 +3071,7 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* input: statement_list opt_semicolon */ -#line 281 "bison_parser.y" +#line 282 "bison_parser.y" { for (SQLStatement* stmt : *(yyvsp[-1].stmt_vec)) { // Transfers ownership of the statement. @@ -3085,253 +3089,253 @@ YYLTYPE yylloc = yyloc_default; } delete (yyvsp[-1].stmt_vec); } -#line 3089 "bison_parser.cpp" +#line 3093 "bison_parser.cpp" break; case 3: /* statement_list: statement */ -#line 302 "bison_parser.y" +#line 303 "bison_parser.y" { (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 3100 "bison_parser.cpp" +#line 3104 "bison_parser.cpp" break; case 4: /* statement_list: statement_list ';' statement */ -#line 308 "bison_parser.y" +#line 309 "bison_parser.y" { (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 3111 "bison_parser.cpp" +#line 3115 "bison_parser.cpp" break; case 5: /* statement: prepare_statement opt_hints */ -#line 317 "bison_parser.y" +#line 318 "bison_parser.y" { (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3120 "bison_parser.cpp" +#line 3124 "bison_parser.cpp" break; case 6: /* statement: preparable_statement opt_hints */ -#line 321 "bison_parser.y" +#line 322 "bison_parser.y" { (yyval.statement) = (yyvsp[-1].statement); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3129 "bison_parser.cpp" +#line 3133 "bison_parser.cpp" break; case 7: /* statement: show_statement */ -#line 325 "bison_parser.y" +#line 326 "bison_parser.y" { (yyval.statement) = (yyvsp[0].show_stmt); } -#line 3137 "bison_parser.cpp" +#line 3141 "bison_parser.cpp" break; case 8: /* statement: import_statement */ -#line 328 "bison_parser.y" +#line 329 "bison_parser.y" { (yyval.statement) = (yyvsp[0].import_stmt); } -#line 3145 "bison_parser.cpp" +#line 3149 "bison_parser.cpp" break; case 9: /* statement: export_statement */ -#line 331 "bison_parser.y" +#line 332 "bison_parser.y" { (yyval.statement) = (yyvsp[0].export_stmt); } -#line 3153 "bison_parser.cpp" +#line 3157 "bison_parser.cpp" break; case 10: /* preparable_statement: select_statement */ -#line 338 "bison_parser.y" +#line 339 "bison_parser.y" { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 3159 "bison_parser.cpp" +#line 3163 "bison_parser.cpp" break; case 11: /* preparable_statement: create_statement */ -#line 339 "bison_parser.y" +#line 340 "bison_parser.y" { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 3165 "bison_parser.cpp" +#line 3169 "bison_parser.cpp" break; case 12: /* preparable_statement: insert_statement */ -#line 340 "bison_parser.y" +#line 341 "bison_parser.y" { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 3171 "bison_parser.cpp" +#line 3175 "bison_parser.cpp" break; case 13: /* preparable_statement: delete_statement */ -#line 341 "bison_parser.y" +#line 342 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3177 "bison_parser.cpp" +#line 3181 "bison_parser.cpp" break; case 14: /* preparable_statement: truncate_statement */ -#line 342 "bison_parser.y" +#line 343 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3183 "bison_parser.cpp" +#line 3187 "bison_parser.cpp" break; case 15: /* preparable_statement: update_statement */ -#line 343 "bison_parser.y" +#line 344 "bison_parser.y" { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 3189 "bison_parser.cpp" +#line 3193 "bison_parser.cpp" break; case 16: /* preparable_statement: drop_statement */ -#line 344 "bison_parser.y" +#line 345 "bison_parser.y" { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 3195 "bison_parser.cpp" +#line 3199 "bison_parser.cpp" break; case 17: /* preparable_statement: alter_statement */ -#line 345 "bison_parser.y" +#line 346 "bison_parser.y" { (yyval.statement) = (yyvsp[0].alter_stmt); } -#line 3201 "bison_parser.cpp" +#line 3205 "bison_parser.cpp" break; case 18: /* preparable_statement: execute_statement */ -#line 346 "bison_parser.y" +#line 347 "bison_parser.y" { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 3207 "bison_parser.cpp" +#line 3211 "bison_parser.cpp" break; case 19: /* preparable_statement: transaction_statement */ -#line 347 "bison_parser.y" +#line 348 "bison_parser.y" { (yyval.statement) = (yyvsp[0].transaction_stmt); } -#line 3213 "bison_parser.cpp" +#line 3217 "bison_parser.cpp" break; case 20: /* opt_hints: WITH HINT '(' hint_list ')' */ -#line 356 "bison_parser.y" +#line 357 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 3219 "bison_parser.cpp" +#line 3223 "bison_parser.cpp" break; case 21: /* opt_hints: %empty */ -#line 357 "bison_parser.y" +#line 358 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 3225 "bison_parser.cpp" +#line 3229 "bison_parser.cpp" break; case 22: /* hint_list: hint */ -#line 362 "bison_parser.y" +#line 363 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3231 "bison_parser.cpp" +#line 3235 "bison_parser.cpp" break; case 23: /* hint_list: hint_list ',' hint */ -#line 363 "bison_parser.y" +#line 364 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3237 "bison_parser.cpp" +#line 3241 "bison_parser.cpp" break; case 24: /* hint: IDENTIFIER */ -#line 367 "bison_parser.y" +#line 368 "bison_parser.y" { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[0].sval); } -#line 3246 "bison_parser.cpp" +#line 3250 "bison_parser.cpp" break; case 25: /* hint: IDENTIFIER '(' literal_list ')' */ -#line 371 "bison_parser.y" +#line 372 "bison_parser.y" { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[-3].sval); (yyval.expr)->exprList = (yyvsp[-1].expr_vec); } -#line 3256 "bison_parser.cpp" +#line 3260 "bison_parser.cpp" break; case 26: /* transaction_statement: BEGIN opt_transaction_keyword */ -#line 383 "bison_parser.y" +#line 384 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kBeginTransaction); } -#line 3264 "bison_parser.cpp" +#line 3268 "bison_parser.cpp" break; case 27: /* transaction_statement: ROLLBACK opt_transaction_keyword */ -#line 386 "bison_parser.y" +#line 387 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kRollbackTransaction); } -#line 3272 "bison_parser.cpp" +#line 3276 "bison_parser.cpp" break; case 28: /* transaction_statement: COMMIT opt_transaction_keyword */ -#line 389 "bison_parser.y" +#line 390 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kCommitTransaction); } -#line 3280 "bison_parser.cpp" +#line 3284 "bison_parser.cpp" break; case 31: /* prepare_statement: PREPARE IDENTIFIER FROM prepare_target_query */ -#line 403 "bison_parser.y" +#line 404 "bison_parser.y" { (yyval.prep_stmt) = new PrepareStatement(); (yyval.prep_stmt)->name = (yyvsp[-2].sval); (yyval.prep_stmt)->query = (yyvsp[0].sval); } -#line 3290 "bison_parser.cpp" +#line 3294 "bison_parser.cpp" break; case 33: /* execute_statement: EXECUTE IDENTIFIER */ -#line 413 "bison_parser.y" +#line 414 "bison_parser.y" { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[0].sval); } -#line 3299 "bison_parser.cpp" +#line 3303 "bison_parser.cpp" break; case 34: /* execute_statement: EXECUTE IDENTIFIER '(' opt_literal_list ')' */ -#line 417 "bison_parser.y" +#line 418 "bison_parser.y" { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[-3].sval); (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); } -#line 3309 "bison_parser.cpp" +#line 3313 "bison_parser.cpp" break; case 35: /* import_statement: IMPORT FROM file_type FILE file_path INTO table_name */ -#line 431 "bison_parser.y" +#line 432 "bison_parser.y" { (yyval.import_stmt) = new ImportStatement((yyvsp[-4].import_type_t)); (yyval.import_stmt)->filePath = (yyvsp[-2].sval); (yyval.import_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3320 "bison_parser.cpp" +#line 3324 "bison_parser.cpp" break; case 36: /* import_statement: COPY table_name FROM file_path opt_file_type */ -#line 437 "bison_parser.y" +#line 438 "bison_parser.y" { (yyval.import_stmt) = new ImportStatement((yyvsp[0].import_type_t)); (yyval.import_stmt)->filePath = (yyvsp[-1].sval); (yyval.import_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3331 "bison_parser.cpp" +#line 3335 "bison_parser.cpp" break; case 37: /* file_type: IDENTIFIER */ -#line 446 "bison_parser.y" +#line 447 "bison_parser.y" { if (strcasecmp((yyvsp[0].sval), "csv") == 0) { (yyval.import_type_t) = kImportCSV; @@ -3346,70 +3350,70 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[0].sval)); } -#line 3350 "bison_parser.cpp" +#line 3354 "bison_parser.cpp" break; case 38: /* file_path: string_literal */ -#line 463 "bison_parser.y" +#line 464 "bison_parser.y" { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 3356 "bison_parser.cpp" +#line 3360 "bison_parser.cpp" break; case 39: /* opt_file_type: WITH FORMAT file_type */ -#line 467 "bison_parser.y" +#line 468 "bison_parser.y" { (yyval.import_type_t) = (yyvsp[0].import_type_t); } -#line 3364 "bison_parser.cpp" +#line 3368 "bison_parser.cpp" break; case 40: /* opt_file_type: %empty */ -#line 470 "bison_parser.y" +#line 471 "bison_parser.y" { (yyval.import_type_t) = kImportAuto; } -#line 3370 "bison_parser.cpp" +#line 3374 "bison_parser.cpp" break; case 41: /* export_statement: COPY table_name TO file_path opt_file_type */ -#line 479 "bison_parser.y" +#line 480 "bison_parser.y" { (yyval.export_stmt) = new ExportStatement((yyvsp[0].import_type_t)); (yyval.export_stmt)->filePath = (yyvsp[-1].sval); (yyval.export_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.export_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3381 "bison_parser.cpp" +#line 3385 "bison_parser.cpp" break; case 42: /* show_statement: SHOW TABLES */ -#line 493 "bison_parser.y" +#line 494 "bison_parser.y" { (yyval.show_stmt) = new ShowStatement(kShowTables); } -#line 3389 "bison_parser.cpp" +#line 3393 "bison_parser.cpp" break; case 43: /* show_statement: SHOW COLUMNS table_name */ -#line 496 "bison_parser.y" +#line 497 "bison_parser.y" { (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 3399 "bison_parser.cpp" +#line 3403 "bison_parser.cpp" break; case 44: /* show_statement: DESCRIBE table_name */ -#line 501 "bison_parser.y" +#line 502 "bison_parser.y" { (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 3409 "bison_parser.cpp" +#line 3413 "bison_parser.cpp" break; case 45: /* create_statement: CREATE TABLE opt_not_exists table_name FROM IDENTIFIER FILE file_path */ -#line 515 "bison_parser.y" +#line 516 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTableFromTbl); (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); @@ -3423,11 +3427,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].sval)); (yyval.create_stmt)->filePath = (yyvsp[0].sval); } -#line 3427 "bison_parser.cpp" +#line 3431 "bison_parser.cpp" break; case 46: /* create_statement: CREATE TABLE opt_not_exists table_name '(' column_def_commalist opt_table_constraints ')' */ -#line 528 "bison_parser.y" +#line 529 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); @@ -3436,11 +3440,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->columns = (yyvsp[-2].column_vec); (yyval.create_stmt)->tableConstraints = (yyvsp[-1].table_constraint_vec); } -#line 3440 "bison_parser.cpp" +#line 3444 "bison_parser.cpp" break; case 47: /* create_statement: CREATE TABLE opt_not_exists table_name AS select_statement */ -#line 536 "bison_parser.y" +#line 537 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-3].bval); @@ -3448,11 +3452,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-2].table_name).name; (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3452 "bison_parser.cpp" +#line 3456 "bison_parser.cpp" break; case 48: /* create_statement: CREATE INDEX opt_not_exists opt_index_name ON table_name '(' ident_commalist ')' */ -#line 543 "bison_parser.y" +#line 544 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateIndex); (yyval.create_stmt)->indexName = (yyvsp[-5].sval); @@ -3460,11 +3464,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->indexColumns = (yyvsp[-1].str_vec); } -#line 3464 "bison_parser.cpp" +#line 3468 "bison_parser.cpp" break; case 49: /* create_statement: CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement */ -#line 550 "bison_parser.y" +#line 551 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateView); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -3473,266 +3477,278 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3477 "bison_parser.cpp" +#line 3481 "bison_parser.cpp" break; case 50: /* opt_not_exists: IF NOT EXISTS */ -#line 561 "bison_parser.y" +#line 562 "bison_parser.y" { (yyval.bval) = true; } -#line 3483 "bison_parser.cpp" +#line 3487 "bison_parser.cpp" break; case 51: /* opt_not_exists: %empty */ -#line 562 "bison_parser.y" +#line 563 "bison_parser.y" { (yyval.bval) = false; } -#line 3489 "bison_parser.cpp" +#line 3493 "bison_parser.cpp" break; case 52: /* column_def_commalist: column_def */ -#line 566 "bison_parser.y" +#line 567 "bison_parser.y" { (yyval.column_vec) = new std::vector(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); } -#line 3495 "bison_parser.cpp" +#line 3499 "bison_parser.cpp" break; case 53: /* column_def_commalist: column_def_commalist ',' column_def */ -#line 567 "bison_parser.y" +#line 568 "bison_parser.y" { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } -#line 3501 "bison_parser.cpp" +#line 3505 "bison_parser.cpp" break; case 54: /* column_def: IDENTIFIER column_type opt_column_nullable opt_column_constraint */ -#line 571 "bison_parser.y" +#line 572 "bison_parser.y" { (yyval.column_t) = new ColumnDefinition((yyvsp[-3].sval), (yyvsp[-2].column_type_t), (yyvsp[-1].bval), (yyvsp[0].column_constraint_t)); } -#line 3509 "bison_parser.cpp" +#line 3513 "bison_parser.cpp" break; case 55: /* column_type: INT */ -#line 577 "bison_parser.y" +#line 578 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3515 "bison_parser.cpp" +#line 3519 "bison_parser.cpp" break; case 56: /* column_type: INTEGER */ -#line 578 "bison_parser.y" +#line 579 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3521 "bison_parser.cpp" +#line 3525 "bison_parser.cpp" break; case 57: /* column_type: LONG */ -#line 579 "bison_parser.y" +#line 580 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::LONG}; } -#line 3527 "bison_parser.cpp" +#line 3531 "bison_parser.cpp" break; case 58: /* column_type: FLOAT */ -#line 580 "bison_parser.y" +#line 581 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3533 "bison_parser.cpp" +#line 3537 "bison_parser.cpp" break; case 59: /* column_type: DECIMAL opt_decimal_specification */ -#line 581 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::DECIMAL, 0, (yyvsp[0].decimal_specification_t)}; } -#line 3539 "bison_parser.cpp" +#line 582 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::DECIMAL, 0, (yyvsp[0].column_specification_t)}; } +#line 3543 "bison_parser.cpp" break; case 60: /* column_type: DOUBLE */ -#line 582 "bison_parser.y" +#line 583 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } -#line 3545 "bison_parser.cpp" +#line 3549 "bison_parser.cpp" break; case 61: /* column_type: REAL */ -#line 583 "bison_parser.y" +#line 584 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::REAL}; } -#line 3551 "bison_parser.cpp" +#line 3555 "bison_parser.cpp" break; case 62: /* column_type: VARCHAR '(' INTVAL ')' */ -#line 584 "bison_parser.y" +#line 585 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3557 "bison_parser.cpp" +#line 3561 "bison_parser.cpp" break; case 63: /* column_type: CHARACTER VARYING '(' INTVAL ')' */ -#line 585 "bison_parser.y" +#line 586 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR_VARYING, (yyvsp[-1].ival)}; } -#line 3563 "bison_parser.cpp" +#line 3567 "bison_parser.cpp" break; case 64: /* column_type: CHAR '(' INTVAL ')' */ -#line 586 "bison_parser.y" +#line 587 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } -#line 3569 "bison_parser.cpp" +#line 3573 "bison_parser.cpp" break; case 65: /* column_type: TEXT */ -#line 587 "bison_parser.y" +#line 588 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } -#line 3575 "bison_parser.cpp" +#line 3579 "bison_parser.cpp" break; - case 66: /* column_type: TIME */ -#line 588 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::TIME}; } -#line 3581 "bison_parser.cpp" + case 66: /* column_type: TIME opt_time_specification */ +#line 589 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::TIME, 0, (yyvsp[0].column_specification_t) }; } +#line 3585 "bison_parser.cpp" break; case 67: /* column_type: DATETIME */ -#line 589 "bison_parser.y" +#line 590 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } -#line 3587 "bison_parser.cpp" +#line 3591 "bison_parser.cpp" break; case 68: /* column_type: DATE */ -#line 590 "bison_parser.y" +#line 591 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATE}; } -#line 3593 "bison_parser.cpp" - break; - - case 69: /* opt_decimal_specification: '(' INTVAL ',' INTVAL ')' */ -#line 594 "bison_parser.y" - { (yyval.decimal_specification_t) = DecimalSpecification{(yyvsp[-3].ival), (yyvsp[-1].ival)}; } -#line 3599 "bison_parser.cpp" +#line 3597 "bison_parser.cpp" break; - case 70: /* opt_decimal_specification: '(' INTVAL ')' */ + case 69: /* opt_time_specification: '(' INTVAL ')' */ #line 595 "bison_parser.y" - { (yyval.decimal_specification_t) = DecimalSpecification{(yyvsp[-1].ival), 0}; } -#line 3605 "bison_parser.cpp" + { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-1].ival)}; } +#line 3603 "bison_parser.cpp" break; - case 71: /* opt_decimal_specification: %empty */ + case 70: /* opt_time_specification: %empty */ #line 596 "bison_parser.y" - { (yyval.decimal_specification_t) = DecimalSpecification{0, 0}; } -#line 3611 "bison_parser.cpp" + { (yyval.column_specification_t) = ColumnSpecification{}; } +#line 3609 "bison_parser.cpp" break; - case 72: /* opt_column_nullable: NULL */ -#line 599 "bison_parser.y" + case 71: /* opt_decimal_specification: '(' INTVAL ',' INTVAL ')' */ +#line 600 "bison_parser.y" + { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-3].ival), (yyvsp[-1].ival)}; } +#line 3615 "bison_parser.cpp" + break; + + case 72: /* opt_decimal_specification: '(' INTVAL ')' */ +#line 601 "bison_parser.y" + { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-1].ival)}; } +#line 3621 "bison_parser.cpp" + break; + + case 73: /* opt_decimal_specification: %empty */ +#line 602 "bison_parser.y" + { (yyval.column_specification_t) = ColumnSpecification{}; } +#line 3627 "bison_parser.cpp" + break; + + case 74: /* opt_column_nullable: NULL */ +#line 606 "bison_parser.y" { (yyval.bval) = true; } -#line 3617 "bison_parser.cpp" +#line 3633 "bison_parser.cpp" break; - case 73: /* opt_column_nullable: NOT NULL */ -#line 600 "bison_parser.y" + case 75: /* opt_column_nullable: NOT NULL */ +#line 607 "bison_parser.y" { (yyval.bval) = false; } -#line 3623 "bison_parser.cpp" +#line 3639 "bison_parser.cpp" break; - case 74: /* opt_column_nullable: %empty */ -#line 601 "bison_parser.y" + case 76: /* opt_column_nullable: %empty */ +#line 608 "bison_parser.y" { (yyval.bval) = false; } -#line 3629 "bison_parser.cpp" +#line 3645 "bison_parser.cpp" break; - case 75: /* opt_column_constraint: PRIMARY KEY */ -#line 605 "bison_parser.y" + case 77: /* opt_column_constraint: PRIMARY KEY */ +#line 612 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::PRIMARY_KEY; } -#line 3635 "bison_parser.cpp" +#line 3651 "bison_parser.cpp" break; - case 76: /* opt_column_constraint: UNIQUE */ -#line 606 "bison_parser.y" + case 78: /* opt_column_constraint: UNIQUE */ +#line 613 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::UNIQUE; } -#line 3641 "bison_parser.cpp" +#line 3657 "bison_parser.cpp" break; - case 77: /* opt_column_constraint: %empty */ -#line 607 "bison_parser.y" + case 79: /* opt_column_constraint: %empty */ +#line 614 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::NOT_SET; } -#line 3647 "bison_parser.cpp" +#line 3663 "bison_parser.cpp" break; - case 78: /* opt_table_constraints: table_constraint */ -#line 611 "bison_parser.y" + case 80: /* opt_table_constraints: table_constraint */ +#line 618 "bison_parser.y" {(yyval.table_constraint_vec) = new std::vector(); (yyval.table_constraint_vec)->push_back((yyvsp[0].table_constraint_t)); } -#line 3653 "bison_parser.cpp" +#line 3669 "bison_parser.cpp" break; - case 79: /* opt_table_constraints: opt_table_constraints table_constraint */ -#line 612 "bison_parser.y" + case 81: /* opt_table_constraints: opt_table_constraints table_constraint */ +#line 619 "bison_parser.y" { (yyvsp[-1].table_constraint_vec)->push_back((yyvsp[0].table_constraint_t)); (yyval.table_constraint_vec) = (yyvsp[-1].table_constraint_vec); } -#line 3659 "bison_parser.cpp" +#line 3675 "bison_parser.cpp" break; - case 80: /* opt_table_constraints: %empty */ -#line 613 "bison_parser.y" + case 82: /* opt_table_constraints: %empty */ +#line 620 "bison_parser.y" {(yyval.table_constraint_vec) = new std::vector(); } -#line 3665 "bison_parser.cpp" +#line 3681 "bison_parser.cpp" break; - case 81: /* table_constraint: ',' PRIMARY KEY '(' ident_commalist ')' */ -#line 617 "bison_parser.y" + case 83: /* table_constraint: ',' PRIMARY KEY '(' ident_commalist ')' */ +#line 624 "bison_parser.y" { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::PRIMARY_KEY, (yyvsp[-1].str_vec)); } -#line 3671 "bison_parser.cpp" +#line 3687 "bison_parser.cpp" break; - case 82: /* table_constraint: ',' UNIQUE '(' ident_commalist ')' */ -#line 618 "bison_parser.y" + case 84: /* table_constraint: ',' UNIQUE '(' ident_commalist ')' */ +#line 625 "bison_parser.y" { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::UNIQUE, (yyvsp[-1].str_vec)); } -#line 3677 "bison_parser.cpp" +#line 3693 "bison_parser.cpp" break; - case 83: /* drop_statement: DROP TABLE opt_exists table_name */ -#line 626 "bison_parser.y" + case 85: /* drop_statement: DROP TABLE opt_exists table_name */ +#line 633 "bison_parser.y" { (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 3688 "bison_parser.cpp" +#line 3704 "bison_parser.cpp" break; - case 84: /* drop_statement: DROP VIEW opt_exists table_name */ -#line 632 "bison_parser.y" + case 86: /* drop_statement: DROP VIEW opt_exists table_name */ +#line 639 "bison_parser.y" { (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 3699 "bison_parser.cpp" +#line 3715 "bison_parser.cpp" break; - case 85: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ -#line 638 "bison_parser.y" + case 87: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ +#line 645 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); (yyval.drop_stmt)->ifExists = false; (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 3709 "bison_parser.cpp" +#line 3725 "bison_parser.cpp" break; - case 86: /* drop_statement: DROP INDEX opt_exists index_name ON table_name */ -#line 643 "bison_parser.y" + case 88: /* drop_statement: DROP INDEX opt_exists index_name ON table_name */ +#line 650 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropIndex); (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; (yyval.drop_stmt)->ifExists = (yyvsp[-3].bval); (yyval.drop_stmt)->indexName = (yyvsp[-2].sval); } -#line 3720 "bison_parser.cpp" +#line 3736 "bison_parser.cpp" break; - case 87: /* opt_exists: IF EXISTS */ -#line 652 "bison_parser.y" + case 89: /* opt_exists: IF EXISTS */ +#line 659 "bison_parser.y" { (yyval.bval) = true; } -#line 3726 "bison_parser.cpp" +#line 3742 "bison_parser.cpp" break; - case 88: /* opt_exists: %empty */ -#line 653 "bison_parser.y" + case 90: /* opt_exists: %empty */ +#line 660 "bison_parser.y" { (yyval.bval) = false; } -#line 3732 "bison_parser.cpp" +#line 3748 "bison_parser.cpp" break; - case 89: /* alter_statement: ALTER TABLE table_name DROP COLUMN opt_exists column_name */ -#line 662 "bison_parser.y" + case 91: /* alter_statement: ALTER TABLE table_name DROP COLUMN opt_exists column_name */ +#line 669 "bison_parser.y" { (yyval.alter_stmt) = new AlterStatement(kAlterDropColumn); (yyval.alter_stmt)->ifExists = (yyvsp[-1].bval); @@ -3740,32 +3756,32 @@ YYLTYPE yylloc = yyloc_default; (yyval.alter_stmt)->name = (yyvsp[-4].table_name).name; (yyval.alter_stmt)->columnName = (yyvsp[0].expr)->name; } -#line 3744 "bison_parser.cpp" +#line 3760 "bison_parser.cpp" break; - case 90: /* delete_statement: DELETE FROM table_name opt_where */ -#line 677 "bison_parser.y" + case 92: /* delete_statement: DELETE FROM table_name opt_where */ +#line 684 "bison_parser.y" { (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 3755 "bison_parser.cpp" +#line 3771 "bison_parser.cpp" break; - case 91: /* truncate_statement: TRUNCATE table_name */ -#line 686 "bison_parser.y" + case 93: /* truncate_statement: TRUNCATE table_name */ +#line 693 "bison_parser.y" { (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3765 "bison_parser.cpp" +#line 3781 "bison_parser.cpp" break; - case 92: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ -#line 699 "bison_parser.y" + case 94: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ +#line 706 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertValues); (yyval.insert_stmt)->schema = (yyvsp[-5].table_name).schema; @@ -3773,11 +3789,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } -#line 3777 "bison_parser.cpp" +#line 3793 "bison_parser.cpp" break; - case 93: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ -#line 706 "bison_parser.y" + case 95: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ +#line 713 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertSelect); (yyval.insert_stmt)->schema = (yyvsp[-2].table_name).schema; @@ -3785,74 +3801,74 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } -#line 3789 "bison_parser.cpp" +#line 3805 "bison_parser.cpp" break; - case 94: /* opt_column_list: '(' ident_commalist ')' */ -#line 717 "bison_parser.y" + case 96: /* opt_column_list: '(' ident_commalist ')' */ +#line 724 "bison_parser.y" { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 3795 "bison_parser.cpp" +#line 3811 "bison_parser.cpp" break; - case 95: /* opt_column_list: %empty */ -#line 718 "bison_parser.y" + case 97: /* opt_column_list: %empty */ +#line 725 "bison_parser.y" { (yyval.str_vec) = nullptr; } -#line 3801 "bison_parser.cpp" +#line 3817 "bison_parser.cpp" break; - case 96: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ -#line 728 "bison_parser.y" + case 98: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ +#line 735 "bison_parser.y" { (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 3812 "bison_parser.cpp" +#line 3828 "bison_parser.cpp" break; - case 97: /* update_clause_commalist: update_clause */ -#line 737 "bison_parser.y" + case 99: /* update_clause_commalist: update_clause */ +#line 744 "bison_parser.y" { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 3818 "bison_parser.cpp" +#line 3834 "bison_parser.cpp" break; - case 98: /* update_clause_commalist: update_clause_commalist ',' update_clause */ -#line 738 "bison_parser.y" + case 100: /* update_clause_commalist: update_clause_commalist ',' update_clause */ +#line 745 "bison_parser.y" { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 3824 "bison_parser.cpp" +#line 3840 "bison_parser.cpp" break; - case 99: /* update_clause: IDENTIFIER '=' expr */ -#line 742 "bison_parser.y" + case 101: /* update_clause: IDENTIFIER '=' expr */ +#line 749 "bison_parser.y" { (yyval.update_t) = new UpdateClause(); (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 3834 "bison_parser.cpp" +#line 3850 "bison_parser.cpp" break; - case 100: /* select_statement: opt_with_clause select_with_paren */ -#line 754 "bison_parser.y" + case 102: /* select_statement: opt_with_clause select_with_paren */ +#line 761 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3843 "bison_parser.cpp" +#line 3859 "bison_parser.cpp" break; - case 101: /* select_statement: opt_with_clause select_no_paren */ -#line 758 "bison_parser.y" + case 103: /* select_statement: opt_with_clause select_no_paren */ +#line 765 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3852 "bison_parser.cpp" +#line 3868 "bison_parser.cpp" break; - case 102: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ -#line 762 "bison_parser.y" + case 104: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ +#line 769 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3864,17 +3880,17 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); (yyval.select_stmt)->withDescriptions = (yyvsp[-5].with_description_vec); } -#line 3868 "bison_parser.cpp" +#line 3884 "bison_parser.cpp" break; - case 105: /* select_within_set_operation_no_parentheses: select_clause */ -#line 780 "bison_parser.y" + case 107: /* select_within_set_operation_no_parentheses: select_clause */ +#line 787 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); } -#line 3874 "bison_parser.cpp" +#line 3890 "bison_parser.cpp" break; - case 106: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ -#line 781 "bison_parser.y" + case 108: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ +#line 788 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3883,23 +3899,23 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->push_back((yyvsp[-1].set_operator_t)); (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[0].select_stmt); } -#line 3887 "bison_parser.cpp" +#line 3903 "bison_parser.cpp" break; - case 107: /* select_with_paren: '(' select_no_paren ')' */ -#line 792 "bison_parser.y" + case 109: /* select_with_paren: '(' select_no_paren ')' */ +#line 799 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3893 "bison_parser.cpp" +#line 3909 "bison_parser.cpp" break; - case 108: /* select_with_paren: '(' select_with_paren ')' */ -#line 793 "bison_parser.y" + case 110: /* select_with_paren: '(' select_with_paren ')' */ +#line 800 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3899 "bison_parser.cpp" +#line 3915 "bison_parser.cpp" break; - case 109: /* select_no_paren: select_clause opt_order opt_limit */ -#line 797 "bison_parser.y" + case 111: /* select_no_paren: select_clause opt_order opt_limit */ +#line 804 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); (yyval.select_stmt)->order = (yyvsp[-1].order_vec); @@ -3910,11 +3926,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3914 "bison_parser.cpp" +#line 3930 "bison_parser.cpp" break; - case 110: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ -#line 807 "bison_parser.y" + case 112: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ +#line 814 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3925,63 +3941,63 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); } -#line 3929 "bison_parser.cpp" +#line 3945 "bison_parser.cpp" break; - case 111: /* set_operator: set_type opt_all */ -#line 820 "bison_parser.y" + case 113: /* set_operator: set_type opt_all */ +#line 827 "bison_parser.y" { (yyval.set_operator_t) = (yyvsp[-1].set_operator_t); (yyval.set_operator_t)->isAll = (yyvsp[0].bval); } -#line 3938 "bison_parser.cpp" +#line 3954 "bison_parser.cpp" break; - case 112: /* set_type: UNION */ -#line 827 "bison_parser.y" + case 114: /* set_type: UNION */ +#line 834 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetUnion; } -#line 3947 "bison_parser.cpp" +#line 3963 "bison_parser.cpp" break; - case 113: /* set_type: INTERSECT */ -#line 831 "bison_parser.y" + case 115: /* set_type: INTERSECT */ +#line 838 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetIntersect; } -#line 3956 "bison_parser.cpp" +#line 3972 "bison_parser.cpp" break; - case 114: /* set_type: EXCEPT */ -#line 835 "bison_parser.y" + case 116: /* set_type: EXCEPT */ +#line 842 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetExcept; } -#line 3965 "bison_parser.cpp" +#line 3981 "bison_parser.cpp" break; - case 115: /* opt_all: ALL */ -#line 842 "bison_parser.y" + case 117: /* opt_all: ALL */ +#line 849 "bison_parser.y" { (yyval.bval) = true; } -#line 3973 "bison_parser.cpp" +#line 3989 "bison_parser.cpp" break; - case 116: /* opt_all: %empty */ -#line 845 "bison_parser.y" + case 118: /* opt_all: %empty */ +#line 852 "bison_parser.y" { (yyval.bval) = false; } -#line 3981 "bison_parser.cpp" +#line 3997 "bison_parser.cpp" break; - case 117: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ -#line 851 "bison_parser.y" + case 119: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ +#line 858 "bison_parser.y" { (yyval.select_stmt) = new SelectStatement(); (yyval.select_stmt)->limit = (yyvsp[-5].limit); @@ -3991,213 +4007,213 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 3995 "bison_parser.cpp" +#line 4011 "bison_parser.cpp" break; - case 118: /* opt_distinct: DISTINCT */ -#line 863 "bison_parser.y" + case 120: /* opt_distinct: DISTINCT */ +#line 870 "bison_parser.y" { (yyval.bval) = true; } -#line 4001 "bison_parser.cpp" +#line 4017 "bison_parser.cpp" break; - case 119: /* opt_distinct: %empty */ -#line 864 "bison_parser.y" + case 121: /* opt_distinct: %empty */ +#line 871 "bison_parser.y" { (yyval.bval) = false; } -#line 4007 "bison_parser.cpp" +#line 4023 "bison_parser.cpp" break; - case 121: /* opt_from_clause: from_clause */ -#line 872 "bison_parser.y" + case 123: /* opt_from_clause: from_clause */ +#line 879 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 4013 "bison_parser.cpp" +#line 4029 "bison_parser.cpp" break; - case 122: /* opt_from_clause: %empty */ -#line 873 "bison_parser.y" + case 124: /* opt_from_clause: %empty */ +#line 880 "bison_parser.y" { (yyval.table) = nullptr; } -#line 4019 "bison_parser.cpp" +#line 4035 "bison_parser.cpp" break; - case 123: /* from_clause: FROM table_ref */ -#line 877 "bison_parser.y" + case 125: /* from_clause: FROM table_ref */ +#line 884 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 4025 "bison_parser.cpp" +#line 4041 "bison_parser.cpp" break; - case 124: /* opt_where: WHERE expr */ -#line 882 "bison_parser.y" + case 126: /* opt_where: WHERE expr */ +#line 889 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 4031 "bison_parser.cpp" +#line 4047 "bison_parser.cpp" break; - case 125: /* opt_where: %empty */ -#line 883 "bison_parser.y" + case 127: /* opt_where: %empty */ +#line 890 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 4037 "bison_parser.cpp" +#line 4053 "bison_parser.cpp" break; - case 126: /* opt_group: GROUP BY expr_list opt_having */ -#line 887 "bison_parser.y" + case 128: /* opt_group: GROUP BY expr_list opt_having */ +#line 894 "bison_parser.y" { (yyval.group_t) = new GroupByDescription(); (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 4047 "bison_parser.cpp" +#line 4063 "bison_parser.cpp" break; - case 127: /* opt_group: %empty */ -#line 892 "bison_parser.y" + case 129: /* opt_group: %empty */ +#line 899 "bison_parser.y" { (yyval.group_t) = nullptr; } -#line 4053 "bison_parser.cpp" +#line 4069 "bison_parser.cpp" break; - case 128: /* opt_having: HAVING expr */ -#line 896 "bison_parser.y" + case 130: /* opt_having: HAVING expr */ +#line 903 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 4059 "bison_parser.cpp" +#line 4075 "bison_parser.cpp" break; - case 129: /* opt_having: %empty */ -#line 897 "bison_parser.y" + case 131: /* opt_having: %empty */ +#line 904 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 4065 "bison_parser.cpp" +#line 4081 "bison_parser.cpp" break; - case 130: /* opt_order: ORDER BY order_list */ -#line 901 "bison_parser.y" + case 132: /* opt_order: ORDER BY order_list */ +#line 908 "bison_parser.y" { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 4071 "bison_parser.cpp" +#line 4087 "bison_parser.cpp" break; - case 131: /* opt_order: %empty */ -#line 902 "bison_parser.y" + case 133: /* opt_order: %empty */ +#line 909 "bison_parser.y" { (yyval.order_vec) = nullptr; } -#line 4077 "bison_parser.cpp" +#line 4093 "bison_parser.cpp" break; - case 132: /* order_list: order_desc */ -#line 906 "bison_parser.y" + case 134: /* order_list: order_desc */ +#line 913 "bison_parser.y" { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 4083 "bison_parser.cpp" +#line 4099 "bison_parser.cpp" break; - case 133: /* order_list: order_list ',' order_desc */ -#line 907 "bison_parser.y" + case 135: /* order_list: order_list ',' order_desc */ +#line 914 "bison_parser.y" { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 4089 "bison_parser.cpp" +#line 4105 "bison_parser.cpp" break; - case 134: /* order_desc: expr opt_order_type */ -#line 911 "bison_parser.y" + case 136: /* order_desc: expr opt_order_type */ +#line 918 "bison_parser.y" { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 4095 "bison_parser.cpp" +#line 4111 "bison_parser.cpp" break; - case 135: /* opt_order_type: ASC */ -#line 915 "bison_parser.y" + case 137: /* opt_order_type: ASC */ +#line 922 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 4101 "bison_parser.cpp" +#line 4117 "bison_parser.cpp" break; - case 136: /* opt_order_type: DESC */ -#line 916 "bison_parser.y" + case 138: /* opt_order_type: DESC */ +#line 923 "bison_parser.y" { (yyval.order_type) = kOrderDesc; } -#line 4107 "bison_parser.cpp" +#line 4123 "bison_parser.cpp" break; - case 137: /* opt_order_type: %empty */ -#line 917 "bison_parser.y" + case 139: /* opt_order_type: %empty */ +#line 924 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 4113 "bison_parser.cpp" +#line 4129 "bison_parser.cpp" break; - case 138: /* opt_top: TOP int_literal */ -#line 923 "bison_parser.y" + case 140: /* opt_top: TOP int_literal */ +#line 930 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 4119 "bison_parser.cpp" +#line 4135 "bison_parser.cpp" break; - case 139: /* opt_top: %empty */ -#line 924 "bison_parser.y" + case 141: /* opt_top: %empty */ +#line 931 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 4125 "bison_parser.cpp" +#line 4141 "bison_parser.cpp" break; - case 140: /* opt_limit: LIMIT expr */ -#line 928 "bison_parser.y" + case 142: /* opt_limit: LIMIT expr */ +#line 935 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 4131 "bison_parser.cpp" +#line 4147 "bison_parser.cpp" break; - case 141: /* opt_limit: OFFSET expr */ -#line 929 "bison_parser.y" + case 143: /* opt_limit: OFFSET expr */ +#line 936 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 4137 "bison_parser.cpp" +#line 4153 "bison_parser.cpp" break; - case 142: /* opt_limit: LIMIT expr OFFSET expr */ -#line 930 "bison_parser.y" + case 144: /* opt_limit: LIMIT expr OFFSET expr */ +#line 937 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4143 "bison_parser.cpp" +#line 4159 "bison_parser.cpp" break; - case 143: /* opt_limit: LIMIT ALL */ -#line 931 "bison_parser.y" + case 145: /* opt_limit: LIMIT ALL */ +#line 938 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, nullptr); } -#line 4149 "bison_parser.cpp" +#line 4165 "bison_parser.cpp" break; - case 144: /* opt_limit: LIMIT ALL OFFSET expr */ -#line 932 "bison_parser.y" + case 146: /* opt_limit: LIMIT ALL OFFSET expr */ +#line 939 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 4155 "bison_parser.cpp" +#line 4171 "bison_parser.cpp" break; - case 145: /* opt_limit: %empty */ -#line 933 "bison_parser.y" + case 147: /* opt_limit: %empty */ +#line 940 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 4161 "bison_parser.cpp" +#line 4177 "bison_parser.cpp" break; - case 146: /* expr_list: expr_alias */ -#line 940 "bison_parser.y" + case 148: /* expr_list: expr_alias */ +#line 947 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4167 "bison_parser.cpp" +#line 4183 "bison_parser.cpp" break; - case 147: /* expr_list: expr_list ',' expr_alias */ -#line 941 "bison_parser.y" + case 149: /* expr_list: expr_list ',' expr_alias */ +#line 948 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4173 "bison_parser.cpp" +#line 4189 "bison_parser.cpp" break; - case 148: /* opt_literal_list: literal_list */ -#line 945 "bison_parser.y" + case 150: /* opt_literal_list: literal_list */ +#line 952 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[0].expr_vec); } -#line 4179 "bison_parser.cpp" +#line 4195 "bison_parser.cpp" break; - case 149: /* opt_literal_list: %empty */ -#line 946 "bison_parser.y" + case 151: /* opt_literal_list: %empty */ +#line 953 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 4185 "bison_parser.cpp" +#line 4201 "bison_parser.cpp" break; - case 150: /* literal_list: literal */ -#line 950 "bison_parser.y" + case 152: /* literal_list: literal */ +#line 957 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4191 "bison_parser.cpp" +#line 4207 "bison_parser.cpp" break; - case 151: /* literal_list: literal_list ',' literal */ -#line 951 "bison_parser.y" + case 153: /* literal_list: literal_list ',' literal */ +#line 958 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4197 "bison_parser.cpp" +#line 4213 "bison_parser.cpp" break; - case 152: /* expr_alias: expr opt_alias */ -#line 955 "bison_parser.y" + case 154: /* expr_alias: expr opt_alias */ +#line 962 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); if ((yyvsp[0].alias_t)) { @@ -4205,421 +4221,421 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].alias_t); } } -#line 4209 "bison_parser.cpp" +#line 4225 "bison_parser.cpp" break; - case 158: /* operand: '(' expr ')' */ -#line 973 "bison_parser.y" + case 160: /* operand: '(' expr ')' */ +#line 980 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); } -#line 4215 "bison_parser.cpp" +#line 4231 "bison_parser.cpp" break; - case 168: /* operand: '(' select_no_paren ')' */ -#line 983 "bison_parser.y" + case 170: /* operand: '(' select_no_paren ')' */ +#line 990 "bison_parser.y" { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 4221 "bison_parser.cpp" +#line 4237 "bison_parser.cpp" break; - case 171: /* unary_expr: '-' operand */ -#line 992 "bison_parser.y" + case 173: /* unary_expr: '-' operand */ +#line 999 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 4227 "bison_parser.cpp" +#line 4243 "bison_parser.cpp" break; - case 172: /* unary_expr: NOT operand */ -#line 993 "bison_parser.y" + case 174: /* unary_expr: NOT operand */ +#line 1000 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 4233 "bison_parser.cpp" +#line 4249 "bison_parser.cpp" break; - case 173: /* unary_expr: operand ISNULL */ -#line 994 "bison_parser.y" + case 175: /* unary_expr: operand ISNULL */ +#line 1001 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 4239 "bison_parser.cpp" +#line 4255 "bison_parser.cpp" break; - case 174: /* unary_expr: operand IS NULL */ -#line 995 "bison_parser.y" + case 176: /* unary_expr: operand IS NULL */ +#line 1002 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 4245 "bison_parser.cpp" +#line 4261 "bison_parser.cpp" break; - case 175: /* unary_expr: operand IS NOT NULL */ -#line 996 "bison_parser.y" + case 177: /* unary_expr: operand IS NOT NULL */ +#line 1003 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 4251 "bison_parser.cpp" +#line 4267 "bison_parser.cpp" break; - case 177: /* binary_expr: operand '-' operand */ -#line 1001 "bison_parser.y" + case 179: /* binary_expr: operand '-' operand */ +#line 1008 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 4257 "bison_parser.cpp" +#line 4273 "bison_parser.cpp" break; - case 178: /* binary_expr: operand '+' operand */ -#line 1002 "bison_parser.y" + case 180: /* binary_expr: operand '+' operand */ +#line 1009 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 4263 "bison_parser.cpp" +#line 4279 "bison_parser.cpp" break; - case 179: /* binary_expr: operand '/' operand */ -#line 1003 "bison_parser.y" + case 181: /* binary_expr: operand '/' operand */ +#line 1010 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 4269 "bison_parser.cpp" +#line 4285 "bison_parser.cpp" break; - case 180: /* binary_expr: operand '*' operand */ -#line 1004 "bison_parser.y" + case 182: /* binary_expr: operand '*' operand */ +#line 1011 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 4275 "bison_parser.cpp" +#line 4291 "bison_parser.cpp" break; - case 181: /* binary_expr: operand '%' operand */ -#line 1005 "bison_parser.y" + case 183: /* binary_expr: operand '%' operand */ +#line 1012 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 4281 "bison_parser.cpp" +#line 4297 "bison_parser.cpp" break; - case 182: /* binary_expr: operand '^' operand */ -#line 1006 "bison_parser.y" + case 184: /* binary_expr: operand '^' operand */ +#line 1013 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 4287 "bison_parser.cpp" +#line 4303 "bison_parser.cpp" break; - case 183: /* binary_expr: operand LIKE operand */ -#line 1007 "bison_parser.y" + case 185: /* binary_expr: operand LIKE operand */ +#line 1014 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 4293 "bison_parser.cpp" +#line 4309 "bison_parser.cpp" break; - case 184: /* binary_expr: operand NOT LIKE operand */ -#line 1008 "bison_parser.y" + case 186: /* binary_expr: operand NOT LIKE operand */ +#line 1015 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 4299 "bison_parser.cpp" +#line 4315 "bison_parser.cpp" break; - case 185: /* binary_expr: operand ILIKE operand */ -#line 1009 "bison_parser.y" + case 187: /* binary_expr: operand ILIKE operand */ +#line 1016 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 4305 "bison_parser.cpp" +#line 4321 "bison_parser.cpp" break; - case 186: /* binary_expr: operand CONCAT operand */ -#line 1010 "bison_parser.y" + case 188: /* binary_expr: operand CONCAT operand */ +#line 1017 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 4311 "bison_parser.cpp" +#line 4327 "bison_parser.cpp" break; - case 187: /* logic_expr: expr AND expr */ -#line 1014 "bison_parser.y" + case 189: /* logic_expr: expr AND expr */ +#line 1021 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 4317 "bison_parser.cpp" +#line 4333 "bison_parser.cpp" break; - case 188: /* logic_expr: expr OR expr */ -#line 1015 "bison_parser.y" + case 190: /* logic_expr: expr OR expr */ +#line 1022 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 4323 "bison_parser.cpp" +#line 4339 "bison_parser.cpp" break; - case 189: /* in_expr: operand IN '(' expr_list ')' */ -#line 1019 "bison_parser.y" + case 191: /* in_expr: operand IN '(' expr_list ')' */ +#line 1026 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 4329 "bison_parser.cpp" +#line 4345 "bison_parser.cpp" break; - case 190: /* in_expr: operand NOT IN '(' expr_list ')' */ -#line 1020 "bison_parser.y" + case 192: /* in_expr: operand NOT IN '(' expr_list ')' */ +#line 1027 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 4335 "bison_parser.cpp" +#line 4351 "bison_parser.cpp" break; - case 191: /* in_expr: operand IN '(' select_no_paren ')' */ -#line 1021 "bison_parser.y" + case 193: /* in_expr: operand IN '(' select_no_paren ')' */ +#line 1028 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 4341 "bison_parser.cpp" +#line 4357 "bison_parser.cpp" break; - case 192: /* in_expr: operand NOT IN '(' select_no_paren ')' */ -#line 1022 "bison_parser.y" + case 194: /* in_expr: operand NOT IN '(' select_no_paren ')' */ +#line 1029 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 4347 "bison_parser.cpp" +#line 4363 "bison_parser.cpp" break; - case 193: /* case_expr: CASE expr case_list END */ -#line 1028 "bison_parser.y" + case 195: /* case_expr: CASE expr case_list END */ +#line 1035 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } -#line 4353 "bison_parser.cpp" +#line 4369 "bison_parser.cpp" break; - case 194: /* case_expr: CASE expr case_list ELSE expr END */ -#line 1029 "bison_parser.y" + case 196: /* case_expr: CASE expr case_list ELSE expr END */ +#line 1036 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4359 "bison_parser.cpp" +#line 4375 "bison_parser.cpp" break; - case 195: /* case_expr: CASE case_list END */ -#line 1030 "bison_parser.y" + case 197: /* case_expr: CASE case_list END */ +#line 1037 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } -#line 4365 "bison_parser.cpp" +#line 4381 "bison_parser.cpp" break; - case 196: /* case_expr: CASE case_list ELSE expr END */ -#line 1031 "bison_parser.y" + case 198: /* case_expr: CASE case_list ELSE expr END */ +#line 1038 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4371 "bison_parser.cpp" +#line 4387 "bison_parser.cpp" break; - case 197: /* case_list: WHEN expr THEN expr */ -#line 1035 "bison_parser.y" + case 199: /* case_list: WHEN expr THEN expr */ +#line 1042 "bison_parser.y" { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4377 "bison_parser.cpp" +#line 4393 "bison_parser.cpp" break; - case 198: /* case_list: case_list WHEN expr THEN expr */ -#line 1036 "bison_parser.y" + case 200: /* case_list: case_list WHEN expr THEN expr */ +#line 1043 "bison_parser.y" { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4383 "bison_parser.cpp" +#line 4399 "bison_parser.cpp" break; - case 199: /* exists_expr: EXISTS '(' select_no_paren ')' */ -#line 1040 "bison_parser.y" + case 201: /* exists_expr: EXISTS '(' select_no_paren ')' */ +#line 1047 "bison_parser.y" { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 4389 "bison_parser.cpp" +#line 4405 "bison_parser.cpp" break; - case 200: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ -#line 1041 "bison_parser.y" + case 202: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ +#line 1048 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 4395 "bison_parser.cpp" +#line 4411 "bison_parser.cpp" break; - case 201: /* comp_expr: operand '=' operand */ -#line 1045 "bison_parser.y" + case 203: /* comp_expr: operand '=' operand */ +#line 1052 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4401 "bison_parser.cpp" +#line 4417 "bison_parser.cpp" break; - case 202: /* comp_expr: operand EQUALS operand */ -#line 1046 "bison_parser.y" + case 204: /* comp_expr: operand EQUALS operand */ +#line 1053 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4407 "bison_parser.cpp" +#line 4423 "bison_parser.cpp" break; - case 203: /* comp_expr: operand NOTEQUALS operand */ -#line 1047 "bison_parser.y" + case 205: /* comp_expr: operand NOTEQUALS operand */ +#line 1054 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 4413 "bison_parser.cpp" +#line 4429 "bison_parser.cpp" break; - case 204: /* comp_expr: operand '<' operand */ -#line 1048 "bison_parser.y" + case 206: /* comp_expr: operand '<' operand */ +#line 1055 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 4419 "bison_parser.cpp" +#line 4435 "bison_parser.cpp" break; - case 205: /* comp_expr: operand '>' operand */ -#line 1049 "bison_parser.y" + case 207: /* comp_expr: operand '>' operand */ +#line 1056 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 4425 "bison_parser.cpp" +#line 4441 "bison_parser.cpp" break; - case 206: /* comp_expr: operand LESSEQ operand */ -#line 1050 "bison_parser.y" + case 208: /* comp_expr: operand LESSEQ operand */ +#line 1057 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 4431 "bison_parser.cpp" +#line 4447 "bison_parser.cpp" break; - case 207: /* comp_expr: operand GREATEREQ operand */ -#line 1051 "bison_parser.y" + case 209: /* comp_expr: operand GREATEREQ operand */ +#line 1058 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 4437 "bison_parser.cpp" +#line 4453 "bison_parser.cpp" break; - case 208: /* function_expr: IDENTIFIER '(' ')' */ -#line 1055 "bison_parser.y" + case 210: /* function_expr: IDENTIFIER '(' ')' */ +#line 1062 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 4443 "bison_parser.cpp" +#line 4459 "bison_parser.cpp" break; - case 209: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ -#line 1056 "bison_parser.y" + case 211: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ +#line 1063 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 4449 "bison_parser.cpp" +#line 4465 "bison_parser.cpp" break; - case 210: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ -#line 1060 "bison_parser.y" + case 212: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ +#line 1067 "bison_parser.y" { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } -#line 4455 "bison_parser.cpp" +#line 4471 "bison_parser.cpp" break; - case 211: /* cast_expr: CAST '(' expr AS column_type ')' */ -#line 1064 "bison_parser.y" + case 213: /* cast_expr: CAST '(' expr AS column_type ')' */ +#line 1071 "bison_parser.y" { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } -#line 4461 "bison_parser.cpp" +#line 4477 "bison_parser.cpp" break; - case 212: /* datetime_field: SECOND */ -#line 1068 "bison_parser.y" + case 214: /* datetime_field: SECOND */ +#line 1075 "bison_parser.y" { (yyval.datetime_field) = kDatetimeSecond; } -#line 4467 "bison_parser.cpp" +#line 4483 "bison_parser.cpp" break; - case 213: /* datetime_field: MINUTE */ -#line 1069 "bison_parser.y" + case 215: /* datetime_field: MINUTE */ +#line 1076 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMinute; } -#line 4473 "bison_parser.cpp" +#line 4489 "bison_parser.cpp" break; - case 214: /* datetime_field: HOUR */ -#line 1070 "bison_parser.y" + case 216: /* datetime_field: HOUR */ +#line 1077 "bison_parser.y" { (yyval.datetime_field) = kDatetimeHour; } -#line 4479 "bison_parser.cpp" +#line 4495 "bison_parser.cpp" break; - case 215: /* datetime_field: DAY */ -#line 1071 "bison_parser.y" + case 217: /* datetime_field: DAY */ +#line 1078 "bison_parser.y" { (yyval.datetime_field) = kDatetimeDay; } -#line 4485 "bison_parser.cpp" +#line 4501 "bison_parser.cpp" break; - case 216: /* datetime_field: MONTH */ -#line 1072 "bison_parser.y" + case 218: /* datetime_field: MONTH */ +#line 1079 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMonth; } -#line 4491 "bison_parser.cpp" +#line 4507 "bison_parser.cpp" break; - case 217: /* datetime_field: YEAR */ -#line 1073 "bison_parser.y" + case 219: /* datetime_field: YEAR */ +#line 1080 "bison_parser.y" { (yyval.datetime_field) = kDatetimeYear; } -#line 4497 "bison_parser.cpp" +#line 4513 "bison_parser.cpp" break; - case 218: /* array_expr: ARRAY '[' expr_list ']' */ -#line 1077 "bison_parser.y" + case 220: /* array_expr: ARRAY '[' expr_list ']' */ +#line 1084 "bison_parser.y" { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 4503 "bison_parser.cpp" +#line 4519 "bison_parser.cpp" break; - case 219: /* array_index: operand '[' int_literal ']' */ -#line 1081 "bison_parser.y" + case 221: /* array_index: operand '[' int_literal ']' */ +#line 1088 "bison_parser.y" { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 4509 "bison_parser.cpp" +#line 4525 "bison_parser.cpp" break; - case 220: /* between_expr: operand BETWEEN operand AND operand */ -#line 1085 "bison_parser.y" + case 222: /* between_expr: operand BETWEEN operand AND operand */ +#line 1092 "bison_parser.y" { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4515 "bison_parser.cpp" +#line 4531 "bison_parser.cpp" break; - case 221: /* column_name: IDENTIFIER */ -#line 1089 "bison_parser.y" + case 223: /* column_name: IDENTIFIER */ +#line 1096 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 4521 "bison_parser.cpp" +#line 4537 "bison_parser.cpp" break; - case 222: /* column_name: IDENTIFIER '.' IDENTIFIER */ -#line 1090 "bison_parser.y" + case 224: /* column_name: IDENTIFIER '.' IDENTIFIER */ +#line 1097 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 4527 "bison_parser.cpp" +#line 4543 "bison_parser.cpp" break; - case 223: /* column_name: '*' */ -#line 1091 "bison_parser.y" + case 225: /* column_name: '*' */ +#line 1098 "bison_parser.y" { (yyval.expr) = Expr::makeStar(); } -#line 4533 "bison_parser.cpp" +#line 4549 "bison_parser.cpp" break; - case 224: /* column_name: IDENTIFIER '.' '*' */ -#line 1092 "bison_parser.y" + case 226: /* column_name: IDENTIFIER '.' '*' */ +#line 1099 "bison_parser.y" { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 4539 "bison_parser.cpp" +#line 4555 "bison_parser.cpp" break; - case 230: /* string_literal: STRING */ -#line 1104 "bison_parser.y" + case 232: /* string_literal: STRING */ +#line 1111 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 4545 "bison_parser.cpp" +#line 4561 "bison_parser.cpp" break; - case 231: /* bool_literal: TRUE */ -#line 1108 "bison_parser.y" + case 233: /* bool_literal: TRUE */ +#line 1115 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(true); } -#line 4551 "bison_parser.cpp" +#line 4567 "bison_parser.cpp" break; - case 232: /* bool_literal: FALSE */ -#line 1109 "bison_parser.y" + case 234: /* bool_literal: FALSE */ +#line 1116 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(false); } -#line 4557 "bison_parser.cpp" +#line 4573 "bison_parser.cpp" break; - case 233: /* num_literal: FLOATVAL */ -#line 1113 "bison_parser.y" + case 235: /* num_literal: FLOATVAL */ +#line 1120 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 4563 "bison_parser.cpp" +#line 4579 "bison_parser.cpp" break; - case 235: /* int_literal: INTVAL */ -#line 1118 "bison_parser.y" + case 237: /* int_literal: INTVAL */ +#line 1125 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 4569 "bison_parser.cpp" +#line 4585 "bison_parser.cpp" break; - case 236: /* null_literal: NULL */ -#line 1122 "bison_parser.y" + case 238: /* null_literal: NULL */ +#line 1129 "bison_parser.y" { (yyval.expr) = Expr::makeNullLiteral(); } -#line 4575 "bison_parser.cpp" +#line 4591 "bison_parser.cpp" break; - case 237: /* param_expr: '?' */ -#line 1126 "bison_parser.y" + case 239: /* param_expr: '?' */ +#line 1133 "bison_parser.y" { (yyval.expr) = Expr::makeParameter(yylloc.total_column); (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 4585 "bison_parser.cpp" +#line 4601 "bison_parser.cpp" break; - case 239: /* table_ref: table_ref_commalist ',' table_ref_atomic */ -#line 1139 "bison_parser.y" + case 241: /* table_ref: table_ref_commalist ',' table_ref_atomic */ +#line 1146 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); auto tbl = new TableRef(kTableCrossProduct); tbl->list = (yyvsp[-2].table_vec); (yyval.table) = tbl; } -#line 4596 "bison_parser.cpp" +#line 4612 "bison_parser.cpp" break; - case 243: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ -#line 1155 "bison_parser.y" + case 245: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ +#line 1162 "bison_parser.y" { auto tbl = new TableRef(kTableSelect); tbl->select = (yyvsp[-2].select_stmt); tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4607 "bison_parser.cpp" +#line 4623 "bison_parser.cpp" break; - case 244: /* table_ref_commalist: table_ref_atomic */ -#line 1164 "bison_parser.y" + case 246: /* table_ref_commalist: table_ref_atomic */ +#line 1171 "bison_parser.y" { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 4613 "bison_parser.cpp" +#line 4629 "bison_parser.cpp" break; - case 245: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ -#line 1165 "bison_parser.y" + case 247: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ +#line 1172 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 4619 "bison_parser.cpp" +#line 4635 "bison_parser.cpp" break; - case 246: /* table_ref_name: table_name opt_table_alias */ -#line 1170 "bison_parser.y" + case 248: /* table_ref_name: table_name opt_table_alias */ +#line 1177 "bison_parser.y" { auto tbl = new TableRef(kTableName); tbl->schema = (yyvsp[-1].table_name).schema; @@ -4627,121 +4643,121 @@ YYLTYPE yylloc = yyloc_default; tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4631 "bison_parser.cpp" +#line 4647 "bison_parser.cpp" break; - case 247: /* table_ref_name_no_alias: table_name */ -#line 1181 "bison_parser.y" + case 249: /* table_ref_name_no_alias: table_name */ +#line 1188 "bison_parser.y" { (yyval.table) = new TableRef(kTableName); (yyval.table)->schema = (yyvsp[0].table_name).schema; (yyval.table)->name = (yyvsp[0].table_name).name; } -#line 4641 "bison_parser.cpp" +#line 4657 "bison_parser.cpp" break; - case 248: /* table_name: IDENTIFIER */ -#line 1190 "bison_parser.y" + case 250: /* table_name: IDENTIFIER */ +#line 1197 "bison_parser.y" { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} -#line 4647 "bison_parser.cpp" +#line 4663 "bison_parser.cpp" break; - case 249: /* table_name: IDENTIFIER '.' IDENTIFIER */ -#line 1191 "bison_parser.y" + case 251: /* table_name: IDENTIFIER '.' IDENTIFIER */ +#line 1198 "bison_parser.y" { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } -#line 4653 "bison_parser.cpp" +#line 4669 "bison_parser.cpp" break; - case 250: /* opt_index_name: IDENTIFIER */ -#line 1195 "bison_parser.y" + case 252: /* opt_index_name: IDENTIFIER */ +#line 1202 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4659 "bison_parser.cpp" +#line 4675 "bison_parser.cpp" break; - case 251: /* opt_index_name: %empty */ -#line 1196 "bison_parser.y" + case 253: /* opt_index_name: %empty */ +#line 1203 "bison_parser.y" { (yyval.sval) = nullptr;} -#line 4665 "bison_parser.cpp" +#line 4681 "bison_parser.cpp" break; - case 252: /* index_name: IDENTIFIER */ -#line 1200 "bison_parser.y" + case 254: /* index_name: IDENTIFIER */ +#line 1207 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4671 "bison_parser.cpp" +#line 4687 "bison_parser.cpp" break; - case 254: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ -#line 1206 "bison_parser.y" + case 256: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ +#line 1213 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } -#line 4677 "bison_parser.cpp" +#line 4693 "bison_parser.cpp" break; - case 256: /* opt_table_alias: %empty */ -#line 1212 "bison_parser.y" + case 258: /* opt_table_alias: %empty */ +#line 1219 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4683 "bison_parser.cpp" +#line 4699 "bison_parser.cpp" break; - case 257: /* alias: AS IDENTIFIER */ -#line 1217 "bison_parser.y" + case 259: /* alias: AS IDENTIFIER */ +#line 1224 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4689 "bison_parser.cpp" +#line 4705 "bison_parser.cpp" break; - case 258: /* alias: IDENTIFIER */ -#line 1218 "bison_parser.y" + case 260: /* alias: IDENTIFIER */ +#line 1225 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4695 "bison_parser.cpp" +#line 4711 "bison_parser.cpp" break; - case 260: /* opt_alias: %empty */ -#line 1224 "bison_parser.y" + case 262: /* opt_alias: %empty */ +#line 1231 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4701 "bison_parser.cpp" +#line 4717 "bison_parser.cpp" break; - case 262: /* opt_with_clause: %empty */ -#line 1234 "bison_parser.y" + case 264: /* opt_with_clause: %empty */ +#line 1241 "bison_parser.y" { (yyval.with_description_vec) = nullptr; } -#line 4707 "bison_parser.cpp" +#line 4723 "bison_parser.cpp" break; - case 263: /* with_clause: WITH with_description_list */ -#line 1238 "bison_parser.y" + case 265: /* with_clause: WITH with_description_list */ +#line 1245 "bison_parser.y" { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } -#line 4713 "bison_parser.cpp" +#line 4729 "bison_parser.cpp" break; - case 264: /* with_description_list: with_description */ -#line 1242 "bison_parser.y" + case 266: /* with_description_list: with_description */ +#line 1249 "bison_parser.y" { (yyval.with_description_vec) = new std::vector(); (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); } -#line 4722 "bison_parser.cpp" +#line 4738 "bison_parser.cpp" break; - case 265: /* with_description_list: with_description_list ',' with_description */ -#line 1246 "bison_parser.y" + case 267: /* with_description_list: with_description_list ',' with_description */ +#line 1253 "bison_parser.y" { (yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t)); (yyval.with_description_vec) = (yyvsp[-2].with_description_vec); } -#line 4731 "bison_parser.cpp" +#line 4747 "bison_parser.cpp" break; - case 266: /* with_description: IDENTIFIER AS select_with_paren */ -#line 1253 "bison_parser.y" + case 268: /* with_description: IDENTIFIER AS select_with_paren */ +#line 1260 "bison_parser.y" { (yyval.with_description_t) = new WithDescription(); (yyval.with_description_t)->alias = (yyvsp[-2].sval); (yyval.with_description_t)->select = (yyvsp[0].select_stmt); } -#line 4741 "bison_parser.cpp" +#line 4757 "bison_parser.cpp" break; - case 267: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ -#line 1267 "bison_parser.y" + case 269: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ +#line 1274 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4749,11 +4765,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 4753 "bison_parser.cpp" +#line 4769 "bison_parser.cpp" break; - case 268: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ -#line 1275 "bison_parser.y" + case 270: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ +#line 1282 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4762,11 +4778,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 4766 "bison_parser.cpp" +#line 4782 "bison_parser.cpp" break; - case 269: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ -#line 1285 "bison_parser.y" + case 271: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ +#line 1292 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4782,83 +4798,83 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } -#line 4786 "bison_parser.cpp" +#line 4802 "bison_parser.cpp" break; - case 270: /* opt_join_type: INNER */ -#line 1303 "bison_parser.y" + case 272: /* opt_join_type: INNER */ +#line 1310 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4792 "bison_parser.cpp" +#line 4808 "bison_parser.cpp" break; - case 271: /* opt_join_type: LEFT OUTER */ -#line 1304 "bison_parser.y" + case 273: /* opt_join_type: LEFT OUTER */ +#line 1311 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4798 "bison_parser.cpp" +#line 4814 "bison_parser.cpp" break; - case 272: /* opt_join_type: LEFT */ -#line 1305 "bison_parser.y" + case 274: /* opt_join_type: LEFT */ +#line 1312 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4804 "bison_parser.cpp" +#line 4820 "bison_parser.cpp" break; - case 273: /* opt_join_type: RIGHT OUTER */ -#line 1306 "bison_parser.y" + case 275: /* opt_join_type: RIGHT OUTER */ +#line 1313 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4810 "bison_parser.cpp" +#line 4826 "bison_parser.cpp" break; - case 274: /* opt_join_type: RIGHT */ -#line 1307 "bison_parser.y" + case 276: /* opt_join_type: RIGHT */ +#line 1314 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4816 "bison_parser.cpp" +#line 4832 "bison_parser.cpp" break; - case 275: /* opt_join_type: FULL OUTER */ -#line 1308 "bison_parser.y" + case 277: /* opt_join_type: FULL OUTER */ +#line 1315 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4822 "bison_parser.cpp" +#line 4838 "bison_parser.cpp" break; - case 276: /* opt_join_type: OUTER */ -#line 1309 "bison_parser.y" + case 278: /* opt_join_type: OUTER */ +#line 1316 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4828 "bison_parser.cpp" +#line 4844 "bison_parser.cpp" break; - case 277: /* opt_join_type: FULL */ -#line 1310 "bison_parser.y" + case 279: /* opt_join_type: FULL */ +#line 1317 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4834 "bison_parser.cpp" +#line 4850 "bison_parser.cpp" break; - case 278: /* opt_join_type: CROSS */ -#line 1311 "bison_parser.y" + case 280: /* opt_join_type: CROSS */ +#line 1318 "bison_parser.y" { (yyval.uval) = kJoinCross; } -#line 4840 "bison_parser.cpp" +#line 4856 "bison_parser.cpp" break; - case 279: /* opt_join_type: %empty */ -#line 1312 "bison_parser.y" + case 281: /* opt_join_type: %empty */ +#line 1319 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4846 "bison_parser.cpp" +#line 4862 "bison_parser.cpp" break; - case 283: /* ident_commalist: IDENTIFIER */ -#line 1332 "bison_parser.y" + case 285: /* ident_commalist: IDENTIFIER */ +#line 1339 "bison_parser.y" { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 4852 "bison_parser.cpp" +#line 4868 "bison_parser.cpp" break; - case 284: /* ident_commalist: ident_commalist ',' IDENTIFIER */ -#line 1333 "bison_parser.y" + case 286: /* ident_commalist: ident_commalist ',' IDENTIFIER */ +#line 1340 "bison_parser.y" { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 4858 "bison_parser.cpp" +#line 4874 "bison_parser.cpp" break; -#line 4862 "bison_parser.cpp" +#line 4878 "bison_parser.cpp" default: break; } @@ -5088,7 +5104,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 1336 "bison_parser.y" +#line 1343 "bison_parser.y" /********************************* ** Section 4: Additional C code diff --git a/src/parser/bison_parser.h b/src/parser/bison_parser.h index 01297136..3ee352b6 100644 --- a/src/parser/bison_parser.h +++ b/src/parser/bison_parser.h @@ -289,7 +289,7 @@ union HSQL_STYPE hsql::UpdateClause* update_t; hsql::Alias* alias_t; hsql::SetOperation* set_operator_t; - hsql::DecimalSpecification decimal_specification_t; + hsql::ColumnSpecification column_specification_t; std::vector* stmt_vec; diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index a8666fe4..e2d8fa26 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -131,7 +131,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha hsql::UpdateClause* update_t; hsql::Alias* alias_t; hsql::SetOperation* set_operator_t; - hsql::DecimalSpecification decimal_specification_t; + hsql::ColumnSpecification column_specification_t; std::vector* stmt_vec; @@ -149,7 +149,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha /********************************* ** Destructor symbols *********************************/ -%destructor { } +%destructor { } %destructor { free( ($$.name) ); free( ($$.schema) ); } %destructor { free( ($$) ); } %destructor { @@ -212,7 +212,8 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha %type index_name %type file_path prepare_target_query %type opt_not_exists opt_exists opt_distinct opt_column_nullable opt_all -%type opt_decimal_specification +%type opt_decimal_specification +%type opt_time_specification %type opt_join_type %type
opt_from_clause from_clause table_ref table_ref_atomic table_ref_name nonjoin_table_ref_atomic %type
join_clause table_ref_name_no_alias @@ -585,15 +586,21 @@ column_type: | CHARACTER VARYING'(' INTVAL ')' { $$ = ColumnType{DataType::VARCHAR_VARYING, $4}; } | CHAR '(' INTVAL ')' { $$ = ColumnType{DataType::CHAR, $3}; } | TEXT { $$ = ColumnType{DataType::TEXT}; } - | TIME { $$ = ColumnType{DataType::TIME}; } + | TIME opt_time_specification { $$ = ColumnType{DataType::TIME, 0, $2 }; } | DATETIME { $$ = ColumnType{DataType::DATETIME}; } | DATE { $$ = ColumnType{DataType::DATE}; } ; +opt_time_specification: + '(' INTVAL ')' { $$ = ColumnSpecification{$2}; } + | /* empty */ { $$ = ColumnSpecification{}; } + ; + opt_decimal_specification: - '(' INTVAL ',' INTVAL ')' { $$ = DecimalSpecification{$2, $4}; } - | '(' INTVAL ')' { $$ = DecimalSpecification{$2, 0}; } - | /* empty */ { $$ = DecimalSpecification{0, 0}; } + '(' INTVAL ',' INTVAL ')' { $$ = ColumnSpecification{$2, $4}; } + | '(' INTVAL ')' { $$ = ColumnSpecification{$2}; } + | /* empty */ { $$ = ColumnSpecification{}; } + ; opt_column_nullable: NULL { $$ = true; } diff --git a/src/sql/ColumnType.h b/src/sql/ColumnType.h index 9053648d..84c30353 100755 --- a/src/sql/ColumnType.h +++ b/src/sql/ColumnType.h @@ -21,20 +21,24 @@ namespace hsql { TIME, }; - struct DecimalSpecification { - DecimalSpecification() = default; - DecimalSpecification(int64_t precision, int64_t scale); + struct ColumnSpecification { + ColumnSpecification() = default; + ColumnSpecification(int64_t precision, int64_t scale); + ColumnSpecification(int64_t precision); int64_t precision; int64_t scale; -}; + }; + + // Represents the type of a column, e.g., FLOAT or VARCHAR(10) struct ColumnType { ColumnType() = default; - ColumnType(DataType data_type, int64_t length = 0, DecimalSpecification decimal_specification = DecimalSpecification{}); + ColumnType(DataType data_type, int64_t length = 0, + ColumnSpecification column_specification = ColumnSpecification{}); DataType data_type; int64_t length; // Used for, e.g., VARCHAR(10) - DecimalSpecification decimal_specification; // used for, e.g., DECIMAL(6, 4) + ColumnSpecification decimal_specification; // used for, e.g., DECIMAL(6, 4) }; bool operator==(const ColumnType& lhs, const ColumnType& rhs); diff --git a/src/sql/statements.cpp b/src/sql/statements.cpp index 48313b33..a831f596 100755 --- a/src/sql/statements.cpp +++ b/src/sql/statements.cpp @@ -24,15 +24,18 @@ namespace hsql { free(name); } - ColumnType::ColumnType(DataType data_type, int64_t length, DecimalSpecification decimal_specification) : + ColumnType::ColumnType(DataType data_type, int64_t length, ColumnSpecification column_specification) : data_type(data_type), length(length), - decimal_specification(decimal_specification) {}; + decimal_specification(column_specification) {}; - DecimalSpecification::DecimalSpecification(int64_t precision, int64_t scale) : + ColumnSpecification::ColumnSpecification(int64_t precision, int64_t scale) : precision(precision), scale(scale) {}; + ColumnSpecification::ColumnSpecification(int64_t precision) : + precision(precision), scale(0) {}; + bool operator==(const ColumnType& lhs, const ColumnType& rhs) { if (lhs.data_type != rhs.data_type) return false; if (lhs.data_type == DataType::VARCHAR || lhs.data_type == DataType::CHAR) { From a1b8861ad04a35eef987994e7ebf9cfa3af4fd78 Mon Sep 17 00:00:00 2001 From: simonstadlinger Date: Tue, 24 Aug 2021 11:51:51 +0200 Subject: [PATCH 34/73] Change sql translator code for compliance with sql-parser changes --- src/sql/ColumnType.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sql/ColumnType.h b/src/sql/ColumnType.h index 84c30353..9e851dfc 100755 --- a/src/sql/ColumnType.h +++ b/src/sql/ColumnType.h @@ -19,6 +19,7 @@ namespace hsql { DATETIME, DATE, TIME, + SMALLINT, }; struct ColumnSpecification { From 910363a8930a9d4d919c9954e523e7a25e52ab93 Mon Sep 17 00:00:00 2001 From: simonstadlinger Date: Tue, 24 Aug 2021 12:54:03 +0200 Subject: [PATCH 35/73] Add small int --- src/sql/statements.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sql/statements.cpp b/src/sql/statements.cpp index a831f596..03c0a79f 100755 --- a/src/sql/statements.cpp +++ b/src/sql/statements.cpp @@ -92,6 +92,9 @@ namespace hsql { case DataType::TIME: stream << "TIME"; break; + case DataType::SMALLINT: + stream << "SMALLINT"; + break; } return stream; } From abc36f14c5cb69c865f6943be35af097a841b976 Mon Sep 17 00:00:00 2001 From: simonstadlinger Date: Tue, 24 Aug 2021 14:38:53 +0200 Subject: [PATCH 36/73] Introduce table element and thus refactor constraints and column definitions --- src/parser/bison_parser.cpp | 2395 +++++++++++++++++------------------ src/parser/bison_parser.h | 4 +- src/parser/bison_parser.y | 41 +- src/sql/CreateStatement.h | 32 +- src/sql/statements.cpp | 10 +- 5 files changed, 1242 insertions(+), 1240 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index e870a540..50eca6a1 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -325,14 +325,14 @@ enum yysymbol_kind_t YYSYMBOL_show_statement = 191, /* show_statement */ YYSYMBOL_create_statement = 192, /* create_statement */ YYSYMBOL_opt_not_exists = 193, /* opt_not_exists */ - YYSYMBOL_column_def_commalist = 194, /* column_def_commalist */ - YYSYMBOL_column_def = 195, /* column_def */ - YYSYMBOL_column_type = 196, /* column_type */ - YYSYMBOL_opt_time_specification = 197, /* opt_time_specification */ - YYSYMBOL_opt_decimal_specification = 198, /* opt_decimal_specification */ - YYSYMBOL_opt_column_nullable = 199, /* opt_column_nullable */ - YYSYMBOL_opt_column_constraint = 200, /* opt_column_constraint */ - YYSYMBOL_opt_table_constraints = 201, /* opt_table_constraints */ + YYSYMBOL_table_elem_commalist = 194, /* table_elem_commalist */ + YYSYMBOL_table_elem = 195, /* table_elem */ + YYSYMBOL_column_def = 196, /* column_def */ + YYSYMBOL_column_type = 197, /* column_type */ + YYSYMBOL_opt_time_specification = 198, /* opt_time_specification */ + YYSYMBOL_opt_decimal_specification = 199, /* opt_decimal_specification */ + YYSYMBOL_opt_column_nullable = 200, /* opt_column_nullable */ + YYSYMBOL_opt_column_constraint = 201, /* opt_column_constraint */ YYSYMBOL_table_constraint = 202, /* table_constraint */ YYSYMBOL_drop_statement = 203, /* drop_statement */ YYSYMBOL_opt_exists = 204, /* opt_exists */ @@ -742,16 +742,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 67 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 863 +#define YYLAST 802 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 173 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 114 /* YYNRULES -- Number of rules. */ -#define YYNRULES 286 +#define YYNRULES 285 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 533 +#define YYNSTATES 531 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 410 @@ -820,31 +820,31 @@ static const yytype_int16 yyrline[] = 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 357, 358, 363, 364, 368, 372, 384, 387, 390, 396, 397, 404, 411, 414, 418, 432, 438, 447, 464, 468, - 471, 480, 494, 497, 502, 516, 529, 537, 544, 551, - 562, 563, 567, 568, 572, 578, 579, 580, 581, 582, - 583, 584, 585, 586, 587, 588, 589, 590, 591, 595, - 596, 600, 601, 602, 606, 607, 608, 612, 613, 614, - 618, 619, 620, 624, 625, 633, 639, 645, 650, 659, - 660, 669, 684, 693, 706, 713, 724, 725, 735, 744, - 745, 749, 761, 765, 769, 783, 784, 787, 788, 799, - 800, 804, 814, 827, 834, 838, 842, 849, 852, 858, - 870, 871, 875, 879, 880, 884, 889, 890, 894, 899, - 903, 904, 908, 909, 913, 914, 918, 922, 923, 924, - 930, 931, 935, 936, 937, 938, 939, 940, 947, 948, - 952, 953, 957, 958, 962, 972, 973, 974, 975, 976, - 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, - 990, 994, 995, 999, 1000, 1001, 1002, 1003, 1007, 1008, - 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1021, - 1022, 1026, 1027, 1028, 1029, 1035, 1036, 1037, 1038, 1042, - 1043, 1047, 1048, 1052, 1053, 1054, 1055, 1056, 1057, 1058, - 1062, 1063, 1067, 1071, 1075, 1076, 1077, 1078, 1079, 1080, - 1084, 1088, 1092, 1096, 1097, 1098, 1099, 1103, 1104, 1105, - 1106, 1107, 1111, 1115, 1116, 1120, 1121, 1125, 1129, 1133, - 1145, 1146, 1156, 1157, 1161, 1162, 1171, 1172, 1177, 1188, - 1197, 1198, 1202, 1203, 1207, 1212, 1213, 1218, 1219, 1224, - 1225, 1230, 1231, 1240, 1241, 1245, 1249, 1253, 1260, 1273, - 1281, 1291, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, - 1318, 1319, 1324, 1333, 1334, 1339, 1340 + 471, 480, 494, 497, 502, 516, 529, 536, 543, 550, + 561, 562, 566, 567, 571, 572, 576, 582, 583, 584, + 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, + 595, 599, 600, 604, 605, 606, 610, 611, 612, 616, + 617, 618, 622, 623, 634, 640, 646, 651, 660, 661, + 670, 685, 694, 707, 714, 725, 726, 736, 745, 746, + 750, 762, 766, 770, 784, 785, 788, 789, 800, 801, + 805, 815, 828, 835, 839, 843, 850, 853, 859, 871, + 872, 876, 880, 881, 885, 890, 891, 895, 900, 904, + 905, 909, 910, 914, 915, 919, 923, 924, 925, 931, + 932, 936, 937, 938, 939, 940, 941, 948, 949, 953, + 954, 958, 959, 963, 973, 974, 975, 976, 977, 981, + 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, + 995, 996, 1000, 1001, 1002, 1003, 1004, 1008, 1009, 1010, + 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1022, 1023, + 1027, 1028, 1029, 1030, 1036, 1037, 1038, 1039, 1043, 1044, + 1048, 1049, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1063, + 1064, 1068, 1072, 1076, 1077, 1078, 1079, 1080, 1081, 1085, + 1089, 1093, 1097, 1098, 1099, 1100, 1104, 1105, 1106, 1107, + 1108, 1112, 1116, 1117, 1121, 1122, 1126, 1130, 1134, 1146, + 1147, 1157, 1158, 1162, 1163, 1172, 1173, 1178, 1189, 1198, + 1199, 1203, 1204, 1208, 1213, 1214, 1219, 1220, 1225, 1226, + 1231, 1232, 1241, 1242, 1246, 1250, 1254, 1261, 1274, 1282, + 1292, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, + 1320, 1325, 1334, 1335, 1340, 1341 }; #endif @@ -889,13 +889,13 @@ static const char *const yytname[] = "prepare_target_query", "execute_statement", "import_statement", "file_type", "file_path", "opt_file_type", "export_statement", "show_statement", "create_statement", "opt_not_exists", - "column_def_commalist", "column_def", "column_type", + "table_elem_commalist", "table_elem", "column_def", "column_type", "opt_time_specification", "opt_decimal_specification", - "opt_column_nullable", "opt_column_constraint", "opt_table_constraints", - "table_constraint", "drop_statement", "opt_exists", "alter_statement", - "delete_statement", "truncate_statement", "insert_statement", - "opt_column_list", "update_statement", "update_clause_commalist", - "update_clause", "select_statement", "select_within_set_operation", + "opt_column_nullable", "opt_column_constraint", "table_constraint", + "drop_statement", "opt_exists", "alter_statement", "delete_statement", + "truncate_statement", "insert_statement", "opt_column_list", + "update_statement", "update_clause_commalist", "update_clause", + "select_statement", "select_within_set_operation", "select_within_set_operation_no_parentheses", "select_with_paren", "select_no_paren", "set_operator", "set_type", "opt_all", "select_clause", "opt_distinct", "select_list", "opt_from_clause", @@ -949,12 +949,12 @@ static const yytype_int16 yytoknum[] = }; #endif -#define YYPACT_NINF (-396) +#define YYPACT_NINF (-410) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF (-284) +#define YYTABLE_NINF (-283) #define yytable_value_is_error(Yyn) \ ((Yyn) == YYTABLE_NINF) @@ -963,60 +963,60 @@ static const yytype_int16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - 539, 138, 171, 183, 215, 171, 9, 180, 192, 145, - 171, 213, 171, 119, 21, 291, 155, 155, 155, 304, - 139, -396, 219, -396, 219, -396, -396, -396, -396, -396, - -396, -396, -396, -396, -396, -396, -396, -37, -396, 321, - 156, -396, 164, 246, -396, 218, 218, 218, 171, 353, - 171, 235, -396, 171, -50, 236, 236, 236, 171, -396, - 237, 195, -396, -396, -396, -396, -396, -396, 508, -396, - 277, -396, -396, 252, -37, 28, -396, 27, -396, 381, - 12, 376, 267, 389, 171, 171, 311, -396, 303, 230, - 393, 309, 397, 397, 357, 400, 171, 171, -396, 239, - 291, -396, 242, 398, 399, 244, 245, -396, -396, -396, - -37, 301, 293, -37, -5, -396, -396, -396, -396, -396, - -396, -396, -396, 251, 250, -396, -396, -396, -396, -396, - -396, -396, -396, -396, 378, -396, 297, -63, 230, 200, - -396, 397, 419, 109, 280, -54, -396, 391, 320, -396, - 320, -396, -396, 305, -396, -396, -396, -396, 433, -396, - -396, 200, -396, -396, 363, -396, -396, 28, -396, -396, - 200, 363, 200, 89, -396, -396, 12, -396, 171, 437, - 330, 439, 319, 110, 279, 281, 282, 154, 331, 285, - 342, -396, 265, -68, 377, -396, -396, -396, -396, -396, - -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, - -396, 347, -396, -106, 286, -396, 200, 393, -396, 236, - 404, -396, -396, 171, 287, -42, -396, 354, 284, -396, - 38, -5, -37, 288, -396, 76, -5, -68, 402, -25, - -396, 290, 366, -396, 745, 289, -396, 330, 3, 18, - 408, 214, 200, 200, 129, 77, 294, 342, 567, 200, - 90, 298, -48, 200, 200, 342, -396, 342, 5, 300, - 91, 342, 342, 342, 342, 342, 342, 342, 342, 342, - 342, 342, 342, 342, 342, 342, 398, 171, -396, 465, - 12, -68, -396, 22, 353, -396, 12, -396, 433, 16, - 311, -396, 200, -396, 467, -396, -396, -396, -396, 200, - -396, -396, -396, -396, 200, 200, 419, 397, -396, 441, - -396, 312, 313, -396, -396, 314, -396, -396, -396, -396, - 315, -396, 120, 24, 58, -396, -396, -396, 200, -396, - -396, 308, -396, -396, -396, -396, -396, -396, 379, -3, - 81, 125, 200, 200, -396, 408, 383, 96, -396, -396, - -396, 364, 514, 603, 342, 322, 265, -396, 384, 323, - 603, 603, 603, 603, 639, 639, 639, 639, 90, 90, - -89, -89, -89, -87, 326, -396, -396, 107, 317, -396, - -396, 115, -396, 330, -396, 229, -396, 324, -396, 29, - -396, 424, -396, -396, -396, -68, -68, 130, -396, 327, - 490, -396, 493, 494, 500, -396, -396, 407, 37, 388, - 346, -396, -396, 42, -396, 137, -396, 200, 745, 200, - 200, -396, -4, 113, 348, -396, 342, 603, 265, 349, - 147, -396, -396, -396, -396, 350, 421, -396, -396, -396, - 443, 444, 445, 426, 16, 528, -396, -396, -396, 416, - -396, -396, 537, 148, 382, 385, 387, -396, 430, -396, - -396, 390, 419, -396, -46, 394, -68, 149, -396, 200, - -396, 567, 395, 161, -396, -396, 29, 16, -396, -396, - -396, 16, 292, 401, 200, 396, -396, 545, -396, -396, - -396, -396, 419, 170, -396, -396, -396, -68, -396, -396, - -396, -396, 339, 419, -15, -396, 403, 203, -396, 405, - 200, 211, 200, -396, -396, -396, 22, -68, -396, -396, - -68, 406, -396 + 555, 17, 90, 99, 132, 90, -33, 67, 85, 118, + 90, 108, 90, -5, 22, 199, 81, 81, 81, 237, + 79, -410, 136, -410, 136, -410, -410, -410, -410, -410, + -410, -410, -410, -410, -410, -410, -410, -34, -410, 260, + 106, -410, 109, 221, -410, 156, 156, 156, 90, 285, + 90, 193, -410, 90, -49, 194, 194, 194, 90, -410, + 165, 150, -410, -410, -410, -410, -410, -410, 550, -410, + 243, -410, -410, 218, -34, 52, -410, 54, -410, 330, + 23, 349, 239, 358, 90, 90, 284, -410, 287, 217, + 382, 296, 383, 383, 343, 389, 90, 90, -410, 226, + 199, -410, 227, 390, 385, 230, 231, -410, -410, -410, + -34, 282, 276, -34, 1, -410, -410, -410, -410, -410, + -410, -410, -410, 232, 242, -410, -410, -410, -410, -410, + -410, -410, -410, -410, 362, -410, 278, -57, 217, 344, + -410, 383, 411, 209, 267, -44, -410, 378, 306, -410, + 306, -410, -410, 288, -410, -410, -410, -410, 417, -410, + -410, 344, -410, -410, 345, -410, -410, 52, -410, -410, + 344, 345, 344, 158, -410, -410, 23, -410, 90, 419, + 312, 37, 300, -31, 258, 262, 272, 164, 359, 279, + 365, -410, 299, 103, 393, -410, -410, -410, -410, -410, + -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, + -410, 348, -410, 18, 281, -410, 344, 382, -410, 194, + 402, -410, -410, 90, 286, 112, -410, 361, 280, -410, + 76, 1, -34, 289, -410, -20, 1, 103, 398, -28, + -410, 290, 363, -410, 684, 337, 294, 128, -410, -410, + -410, 312, 20, 12, 406, 236, 344, 344, 83, 110, + 298, 365, 586, 344, 94, 301, 77, 344, 344, 365, + -410, 365, -22, 303, 126, 365, 365, 365, 365, 365, + 365, 365, 365, 365, 365, 365, 365, 365, 365, 365, + 390, 90, -410, 464, 23, 103, -410, 15, 285, -410, + 23, -410, 417, 10, 284, -410, 344, -410, 469, -410, + -410, -410, -410, 344, -410, -410, -410, -410, 344, 344, + 411, 383, -410, 443, -410, 307, 308, -410, -410, 309, + -410, -410, -410, -410, 311, -410, 140, 313, 411, -410, + 37, -410, -410, 344, -410, -410, 314, -410, -410, -410, + -410, -410, -410, 388, 138, 137, 125, 344, 344, -410, + 406, 384, 28, -410, -410, -410, 369, 529, 605, 365, + 321, 299, -410, 386, 325, 605, 605, 605, 605, 275, + 275, 275, 275, 94, 94, 58, 58, 58, -75, 328, + -410, -410, 145, 322, -410, -410, 151, -410, 312, -410, + 14, -410, 324, -410, 16, -410, 427, -410, -410, -410, + 103, 103, 161, -410, 332, 491, -410, 494, 499, 500, + -410, -410, 407, 39, 411, 166, -410, 167, -410, 344, + 684, 344, 344, -410, 195, 163, 341, -410, 365, 605, + 299, 346, 172, -410, -410, -410, -410, 347, 414, -410, + -410, -410, 440, 445, 446, 431, 10, 527, -410, -410, + -410, 408, -410, -410, 528, 183, 367, 368, 370, -410, + 420, -410, -410, 184, -410, -410, 82, 372, 103, 196, + -410, 344, -410, 586, 379, 189, -410, -410, 16, 10, + -410, -410, -410, 10, 187, 392, 344, 395, -410, 540, + -410, -410, -410, -410, -410, -410, -410, -410, 103, -410, + -410, -410, -410, 43, 411, 0, -410, 396, 394, 344, + 210, 344, -410, -410, 15, 103, -410, -410, 103, 399, + -410 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -1024,77 +1024,77 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_int16 yydefact[] = { - 264, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 263, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 30, 30, 0, - 284, 3, 21, 19, 21, 18, 8, 9, 7, 11, - 16, 17, 13, 14, 12, 15, 10, 0, 263, 0, - 250, 93, 33, 0, 44, 51, 51, 51, 0, 0, - 0, 0, 249, 0, 0, 90, 90, 90, 0, 42, - 0, 265, 266, 29, 26, 28, 27, 1, 264, 2, - 0, 6, 5, 141, 0, 102, 103, 133, 87, 0, - 151, 0, 0, 253, 0, 0, 127, 37, 0, 97, + 283, 3, 21, 19, 21, 18, 8, 9, 7, 11, + 16, 17, 13, 14, 12, 15, 10, 0, 262, 0, + 249, 92, 33, 0, 44, 51, 51, 51, 0, 0, + 0, 0, 248, 0, 0, 89, 89, 89, 0, 42, + 0, 264, 265, 29, 26, 28, 27, 1, 263, 2, + 0, 6, 5, 140, 0, 101, 102, 132, 86, 0, + 150, 0, 0, 252, 0, 0, 126, 37, 0, 96, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, - 0, 4, 0, 0, 121, 0, 0, 115, 116, 114, - 0, 118, 0, 0, 147, 251, 232, 235, 237, 238, - 233, 234, 239, 0, 150, 152, 227, 228, 229, 236, - 230, 231, 32, 31, 0, 252, 0, 0, 97, 0, - 92, 0, 0, 0, 0, 127, 99, 0, 40, 38, - 40, 89, 254, 0, 85, 86, 268, 267, 0, 140, - 120, 0, 110, 109, 133, 106, 105, 107, 117, 113, - 0, 133, 0, 0, 111, 34, 0, 50, 0, 0, - 264, 0, 0, 223, 0, 0, 0, 0, 0, 0, - 0, 225, 0, 126, 155, 162, 163, 164, 157, 159, - 165, 158, 178, 166, 167, 168, 169, 161, 156, 171, - 172, 0, 285, 0, 0, 95, 0, 0, 98, 90, - 0, 36, 41, 0, 24, 0, 22, 124, 122, 148, - 262, 147, 0, 132, 134, 139, 147, 143, 145, 142, - 153, 0, 0, 47, 0, 82, 52, 264, 121, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 174, 0, - 173, 0, 0, 0, 0, 0, 175, 0, 0, 0, + 0, 4, 0, 0, 120, 0, 0, 114, 115, 113, + 0, 117, 0, 0, 146, 250, 231, 234, 236, 237, + 232, 233, 238, 0, 149, 151, 226, 227, 228, 235, + 229, 230, 32, 31, 0, 251, 0, 0, 96, 0, + 91, 0, 0, 0, 0, 126, 98, 0, 40, 38, + 40, 88, 253, 0, 84, 85, 267, 266, 0, 139, + 119, 0, 109, 108, 132, 105, 104, 106, 116, 112, + 0, 132, 0, 0, 110, 34, 0, 50, 0, 0, + 263, 0, 0, 222, 0, 0, 0, 0, 0, 0, + 0, 224, 0, 125, 154, 161, 162, 163, 156, 158, + 164, 157, 177, 165, 166, 167, 168, 160, 155, 170, + 171, 0, 284, 0, 0, 94, 0, 0, 97, 89, + 0, 36, 41, 0, 24, 0, 22, 123, 121, 147, + 261, 146, 0, 131, 133, 138, 146, 142, 144, 141, + 152, 0, 0, 47, 0, 0, 0, 0, 52, 54, + 55, 263, 120, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 173, 0, 172, 0, 0, 0, 0, 0, + 174, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 96, 0, - 0, 101, 100, 0, 0, 88, 0, 20, 0, 0, - 127, 123, 0, 260, 0, 261, 154, 104, 108, 0, - 138, 137, 136, 112, 0, 0, 0, 0, 56, 0, - 61, 73, 0, 60, 58, 0, 68, 67, 57, 65, - 70, 55, 76, 0, 0, 80, 49, 210, 0, 224, - 226, 0, 214, 215, 216, 217, 218, 219, 0, 0, - 0, 0, 0, 0, 197, 0, 0, 0, 170, 160, - 189, 190, 0, 185, 0, 0, 0, 176, 0, 188, - 187, 203, 204, 205, 206, 207, 208, 209, 180, 179, - 182, 181, 183, 184, 0, 35, 286, 0, 223, 91, - 39, 0, 23, 264, 125, 240, 242, 0, 244, 258, - 243, 129, 149, 259, 135, 146, 144, 0, 45, 0, - 0, 59, 0, 0, 0, 66, 74, 0, 79, 0, - 0, 53, 46, 0, 81, 0, 201, 0, 0, 0, - 0, 195, 0, 0, 0, 220, 0, 186, 0, 0, - 0, 177, 221, 94, 25, 0, 0, 280, 272, 278, - 276, 279, 274, 0, 0, 0, 257, 248, 255, 0, - 119, 48, 0, 0, 0, 0, 0, 75, 0, 78, - 54, 0, 0, 211, 0, 0, 199, 0, 198, 0, - 202, 222, 0, 0, 193, 191, 258, 0, 275, 277, - 273, 0, 241, 259, 0, 0, 72, 0, 62, 64, - 69, 77, 0, 0, 212, 213, 196, 200, 194, 192, - 245, 269, 281, 0, 131, 63, 0, 0, 84, 0, - 0, 0, 0, 128, 71, 83, 0, 282, 270, 256, - 130, 0, 271 + 0, 0, 95, 0, 0, 100, 99, 0, 0, 87, + 0, 20, 0, 0, 126, 122, 0, 259, 0, 260, + 153, 103, 107, 0, 137, 136, 135, 111, 0, 0, + 0, 0, 58, 0, 63, 75, 0, 62, 60, 0, + 70, 69, 59, 67, 72, 57, 78, 0, 0, 46, + 0, 49, 209, 0, 223, 225, 0, 213, 214, 215, + 216, 217, 218, 0, 0, 0, 0, 0, 0, 196, + 0, 0, 0, 169, 159, 188, 189, 0, 184, 0, + 0, 0, 175, 0, 187, 186, 202, 203, 204, 205, + 206, 207, 208, 179, 178, 181, 180, 182, 183, 0, + 35, 285, 0, 222, 90, 39, 0, 23, 263, 124, + 239, 241, 0, 243, 257, 242, 128, 148, 258, 134, + 145, 143, 0, 45, 0, 0, 61, 0, 0, 0, + 68, 76, 0, 81, 0, 0, 53, 0, 200, 0, + 0, 0, 0, 194, 0, 0, 0, 219, 0, 185, + 0, 0, 0, 176, 220, 93, 25, 0, 0, 279, + 271, 277, 275, 278, 273, 0, 0, 0, 256, 247, + 254, 0, 118, 48, 0, 0, 0, 0, 0, 77, + 0, 80, 56, 0, 83, 210, 0, 0, 198, 0, + 197, 0, 201, 221, 0, 0, 192, 190, 257, 0, + 274, 276, 272, 0, 240, 258, 0, 0, 74, 0, + 64, 66, 71, 79, 82, 211, 212, 195, 199, 193, + 191, 244, 268, 280, 0, 130, 65, 0, 0, 0, + 0, 0, 127, 73, 0, 281, 269, 255, 129, 0, + 270 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -396, -396, -396, 477, -396, 532, -396, 254, -396, 73, - -396, -396, -396, -396, 264, -83, 427, -396, -396, -396, - 212, -396, 233, 141, -396, -396, -396, -396, -396, 247, - -396, -34, -396, -396, -396, -396, 438, -396, -396, 365, - -174, -69, -396, 1, -73, -51, -396, -396, -71, 332, - -396, -396, -396, -121, -396, -396, 46, -396, 274, -396, - -396, 45, -257, -396, -24, 283, -139, -134, -396, -396, - -396, -396, -396, -396, 333, -396, -396, -396, -396, -396, - -396, -396, -396, -396, -290, -75, -84, -396, -396, -90, - -396, -396, -396, -395, 97, -396, -396, -396, 2, -396, - -396, -396, 100, 358, -396, -396, -396, -396, 489, -396, - -396, -396, -396, -305 + -410, -410, -410, 492, -410, 542, -410, 266, -410, 105, + -410, -410, -410, -410, 271, -85, 421, -410, -410, -410, + 25, -410, 233, -410, 144, -410, -410, -410, -410, -410, + -410, -36, -410, -410, -410, -410, 437, -410, -410, 366, + -176, -89, -410, 8, -73, -42, -410, -410, -88, 326, + -410, -410, -410, -128, -410, -410, -122, -410, 274, -410, + -410, 2, -256, -410, -21, 273, -139, -130, -410, -410, + -410, -410, -410, -410, 327, -410, -410, -410, -410, -410, + -410, -410, -410, -410, -292, -70, -90, -410, -410, -92, + -410, -410, -410, -409, 91, -410, -410, -410, 4, -410, + -410, -410, 96, 373, -410, -410, -410, -410, 488, -410, + -410, -410, -410, -308 }; /* YYDEFGOTO[NTERM-NUM]. */ @@ -1102,16 +1102,16 @@ static const yytype_int16 yydefgoto[] = { 0, 19, 20, 21, 22, 71, 225, 226, 23, 64, 24, 133, 25, 26, 88, 148, 221, 27, 28, 29, - 83, 245, 246, 332, 415, 411, 418, 470, 334, 335, + 83, 247, 248, 249, 336, 420, 416, 423, 472, 250, 30, 95, 31, 32, 33, 34, 143, 35, 145, 146, 36, 164, 165, 166, 76, 110, 111, 169, 77, 161, - 227, 300, 301, 140, 460, 523, 114, 233, 234, 312, + 227, 304, 305, 140, 462, 522, 114, 233, 234, 316, 104, 174, 228, 123, 124, 229, 230, 194, 195, 196, - 197, 198, 199, 200, 255, 201, 202, 203, 204, 205, - 348, 206, 207, 208, 209, 210, 126, 127, 128, 129, - 130, 131, 394, 395, 396, 397, 398, 51, 399, 136, - 153, 456, 457, 458, 306, 37, 38, 61, 62, 400, - 453, 528, 69, 213 + 197, 198, 199, 200, 259, 201, 202, 203, 204, 205, + 353, 206, 207, 208, 209, 210, 126, 127, 128, 129, + 130, 131, 399, 400, 401, 402, 403, 51, 404, 136, + 153, 458, 459, 460, 310, 37, 38, 61, 62, 405, + 455, 526, 69, 213 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1119,184 +1119,172 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 193, 106, 357, 389, 41, 125, 243, 44, 149, 149, - 150, 407, 52, 159, 54, 160, 116, 117, 118, 40, - 73, 339, 96, 97, 218, 388, 113, 244, 139, 315, - 179, 235, 303, 237, 239, 522, 107, 107, 75, 167, - 58, 303, 167, 92, 171, 271, 263, 271, 254, 172, - 86, 419, 89, 262, 258, 91, 260, 149, 211, 492, - 98, 180, 288, 264, 468, 289, 263, 173, 263, 419, - 215, 108, 108, 336, 285, 105, 286, 291, 286, 45, - 59, 425, 93, 264, 420, 264, 137, 138, 46, 263, - 65, 66, 183, 116, 117, 118, 512, 469, 154, 155, - 156, 240, 420, 112, 181, 364, 264, 109, 109, 440, - 263, 263, 478, 349, 350, 119, 232, 217, 47, 261, - 359, 428, 504, 258, 360, 361, 297, 264, 264, 298, - 74, 362, 365, 363, 184, 185, 186, 369, 370, 371, - 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, - 382, 383, 263, 455, 120, 121, 302, 183, 116, 117, - 118, 167, 304, 308, 39, 310, 73, 503, 352, 264, - 235, 337, 214, 187, 40, 405, 406, 341, 340, 401, - 241, 483, 191, 393, 122, 293, 42, 353, 429, 55, - 263, 311, 119, 354, 367, 263, 384, 517, 56, 184, - 185, 186, 238, 183, 116, 117, 118, 264, 521, 188, - 231, 368, 264, 432, 433, 125, 430, 236, 43, 445, - 479, 125, 189, 416, 271, 295, 422, 263, 57, 423, - 437, 120, 121, 149, 408, 353, 531, 514, 187, 253, - 417, 431, 50, 263, 264, 184, 185, 186, 190, 191, - 282, 283, 284, 285, 446, 286, 192, 119, 84, 85, - 264, 122, 435, 263, 253, 506, 387, 302, 183, 116, - 117, 118, 391, 48, 188, 443, 307, 248, 176, 249, - 264, 313, 434, 444, 187, 49, 176, 189, 474, 385, - 476, 477, 53, 439, 60, 447, 120, 121, 461, 63, - 448, 289, 481, 119, 67, 473, 449, 450, 302, 68, - 184, 185, 186, 190, 191, 485, 496, 446, 302, 497, - 188, 192, 73, 451, 78, 79, 122, -281, 452, 509, - 70, 80, 302, 189, 183, 116, 117, 118, 518, 81, - 507, 289, 120, 121, 82, 183, 116, 117, 118, 187, - 342, 343, 344, 345, 346, 347, 87, 90, 447, 190, - 191, 99, 94, 448, 446, 482, 100, 192, 119, 449, - 450, 525, 122, 102, 289, 103, 256, 185, 186, 529, - 132, 527, 289, 530, 115, 188, 451, 134, 185, 186, - -281, 452, 135, 139, 265, 141, 144, 142, 189, 147, - -246, 116, 151, 152, 118, 447, 74, 120, 121, 158, - 448, 160, 162, 163, 168, 187, 449, 450, 170, 175, - 519, 176, 212, 177, 190, 191, 187, 178, 216, 219, - 266, 220, 192, 451, 119, 223, 224, 122, 452, 112, - 242, 15, 244, 247, 287, 119, 250, 299, 251, 252, - 259, 257, 294, 290, 296, 302, 314, 316, 317, 309, - 333, 355, 257, -247, 189, 73, 358, 366, 386, 520, - 403, 409, 427, 120, 121, 189, 426, 267, 263, 410, - 412, 413, 414, 364, 120, 121, 249, 441, 286, 438, - 190, 191, 442, 459, 462, 454, 463, 268, 192, 464, - 465, 190, 191, 122, 269, 270, 466, 471, -283, 192, - 467, 271, 272, 472, 122, 1, 480, 484, 486, 487, - 488, 489, 490, 2, 491, 273, 274, 275, 276, 277, - 3, 493, 278, 279, 4, 280, 281, 282, 283, 284, - 285, 494, 286, 495, 5, 101, 1, 6, 7, 501, - 498, 516, 392, 499, 2, 500, 72, 502, 390, 8, - 9, 3, 505, 508, 515, 4, 421, 266, 513, 475, - 10, 524, 526, 11, 532, 5, 182, 222, 6, 7, - 338, 424, 292, 404, 511, 402, 510, 351, 305, 157, - 8, 9, 0, 0, 12, 0, 0, 0, 13, 0, - 0, 10, 0, 0, 11, 0, 0, 0, 0, 0, - 0, 0, 0, 14, 267, 0, 0, 0, 0, 15, - 266, 0, 0, 0, 0, 12, 0, 0, 436, 13, - 0, 0, 0, 0, 356, 0, 0, 0, 0, 0, - 0, 0, 270, 0, 14, 0, 0, 0, 271, 272, - 15, 0, 0, 16, 17, 18, 266, 0, 0, 0, - 0, 0, 273, 274, 275, 276, 277, 267, 0, 278, - 279, 0, 280, 281, 282, 283, 284, 285, 0, 286, - 0, 0, 0, 0, 16, 17, 18, 356, 0, 0, - 0, 0, 266, 0, 0, 270, 0, 0, 0, 0, - 0, 271, 272, -284, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 273, 274, 275, 276, 277, - 0, 0, 278, 279, 0, 280, 281, 282, 283, 284, - 285, 270, 286, 0, 0, 0, 0, 271, -284, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, -284, -284, -284, 276, 277, 0, 0, 278, 279, - 0, 280, 281, 282, 283, 284, 285, 270, 286, 318, - 0, 0, 0, 271, 319, 0, 320, 321, 0, 322, - 0, 0, 0, 0, 0, 0, 0, 323, 0, 0, - -284, -284, 0, 0, -284, -284, 0, 280, 281, 282, - 283, 284, 285, 0, 286, 0, 0, 0, 0, 0, - 0, 0, 0, 324, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 325, 0, 326, 327, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 328, 0, 0, - 0, 329, 0, 330, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 331 + 193, 106, 149, 149, 243, 394, 41, 362, 150, 44, + 125, 159, 412, 40, 52, 344, 54, 218, 393, 307, + 96, 97, 167, 73, 171, 167, 319, 116, 117, 118, + 425, 235, 160, 237, 239, 113, 179, 45, 139, 448, + 244, 58, 231, 39, 92, 75, 46, 494, 258, 236, + 521, 149, 86, 266, 89, 172, 211, 91, 262, 275, + 264, 107, 98, 107, 245, 55, 470, 180, 448, 314, + 215, 84, 85, 173, 56, 341, 47, 295, 369, 307, + 449, 59, 105, 93, 513, 450, 267, 427, 137, 138, + 290, 451, 452, 40, 267, 315, 108, 246, 108, 471, + 154, 155, 42, 268, 57, 370, 240, 156, 453, 449, + 181, 268, -280, 454, 450, 442, 473, 354, 355, 265, + 451, 452, 65, 66, 518, 232, 119, 217, 365, 366, + 112, 262, 109, 74, 109, 43, 252, 453, 253, 367, + 457, 368, 454, 312, 167, 374, 375, 376, 377, 378, + 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, + 48, 183, 116, 117, 118, 120, 121, 183, 116, 117, + 118, 306, 345, 519, 235, 191, 406, 398, 49, 410, + 411, 346, 241, 297, 485, -245, 292, 53, 342, 293, + 267, 267, 275, 257, 437, 122, 267, 267, 389, 306, + 308, 357, 60, 184, 185, 186, 520, 268, 268, 184, + 185, 186, 448, 268, 268, 50, 432, 267, 434, 435, + 358, 289, 447, 290, 125, 63, 359, 299, 275, 372, + 125, 149, 529, 311, 268, 358, 413, 67, 317, 439, + 515, 433, 187, 421, 431, 364, 373, 70, 187, 68, + 505, 267, 267, 449, 286, 287, 288, 289, 450, 290, + 422, 119, 430, 78, 451, 452, 73, 119, 268, 268, + 481, 238, 214, 392, 257, 79, 80, 267, 188, 396, + 301, 453, 82, 302, 188, -280, 454, 436, 87, 99, + 476, 189, 478, 479, 268, 390, 339, 189, 441, 340, + 120, 121, 183, 116, 117, 118, 120, 121, 483, 267, + 267, 480, 507, 445, 81, 90, 176, 190, 191, 446, + 94, 100, 176, 190, 191, 192, 268, 268, 270, 463, + 122, 192, 293, 115, 474, 475, 122, 293, 306, 102, + 487, 103, 508, 306, 184, 185, 186, 183, 116, 117, + 118, 498, 504, 132, 499, 293, 73, 510, -246, 134, + 306, 135, 183, 116, 117, 118, 139, 484, 183, 116, + 117, 118, 347, 348, 349, 350, 351, 352, 527, 141, + 525, 293, 528, 187, 142, 144, 147, 116, 151, 184, + 185, 186, 152, 74, 158, 168, 118, 160, 162, 163, + 175, 170, 119, 274, 260, 185, 186, 177, 178, 275, + 269, 185, 186, 176, 212, 216, 219, 220, 223, 188, + 224, 112, 242, 15, 251, 254, -283, -283, 187, 255, + -283, -283, 189, 284, 285, 286, 287, 288, 289, 256, + 290, 120, 121, 187, 263, 291, 270, 119, 294, 187, + 298, 306, 318, 300, 303, 321, 337, 320, 190, 191, + 313, 338, 119, 73, 188, 360, 192, 391, 119, 363, + 371, 122, 408, 414, 415, 417, 418, 189, 419, 261, + 424, 429, 428, 267, 369, 261, 120, 121, 440, 443, + 290, 253, 189, 271, 444, 456, 461, 465, 189, 464, + 466, 120, 121, 190, 191, 467, 468, 120, 121, 482, + 469, 192, 489, 272, 486, 488, 122, 490, 190, 191, + 273, 274, 491, 492, 190, 191, 192, 275, 276, 493, + 495, 122, 192, 496, 497, 500, 501, 122, 502, 503, + 506, 277, 278, 279, 280, 281, 517, 509, 282, 283, + -282, 284, 285, 286, 287, 288, 289, 1, 290, 514, + 101, 524, 1, 516, 523, 2, 72, 530, 397, 395, + 2, 222, 3, 426, 477, 182, 4, 3, 343, 407, + 512, 4, 270, 296, 511, 356, 5, 409, 157, 6, + 7, 5, 0, 0, 6, 7, 0, 0, 0, 0, + 0, 8, 9, 309, 0, 0, 8, 9, 0, 0, + 0, 0, 10, 0, 0, 11, 0, 10, 0, 0, + 11, 0, 0, 0, 0, 0, 0, 0, 0, 271, + 0, 0, 0, 0, 0, 0, 12, 0, 0, 270, + 13, 12, 0, 438, 0, 13, 0, 0, 0, 361, + 0, 0, 0, 0, 0, 14, 0, 274, 270, 0, + 14, 15, 0, 275, 276, 0, 15, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 277, 278, 279, + 280, 281, 0, 0, 282, 283, 271, 284, 285, 286, + 287, 288, 289, 0, 290, 16, 17, 18, 0, 0, + 16, 17, 18, 0, 0, -283, 361, 0, 322, 0, + 0, 0, 0, 323, 274, 324, 325, 0, 326, 0, + 275, 276, 0, 0, 0, 0, 327, 0, 0, 0, + 0, 0, 0, 274, 277, 278, 279, 280, 281, 275, + -283, 282, 283, 0, 284, 285, 286, 287, 288, 289, + 0, 290, 328, -283, -283, -283, 280, 281, 0, 0, + 282, 283, 0, 284, 285, 286, 287, 288, 289, 329, + 290, 330, 331, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 332, 0, 0, 0, + 333, 0, 334, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 335 }; static const yytype_int16 yycheck[] = { - 139, 74, 259, 293, 2, 80, 180, 5, 92, 93, - 93, 316, 10, 103, 12, 12, 4, 5, 6, 3, - 57, 3, 56, 57, 145, 3, 77, 3, 82, 54, - 93, 170, 3, 172, 173, 50, 9, 9, 37, 110, - 19, 3, 113, 93, 113, 134, 114, 134, 187, 54, - 48, 27, 50, 192, 188, 53, 190, 141, 141, 454, - 58, 124, 168, 131, 27, 171, 114, 72, 114, 27, - 143, 44, 44, 247, 163, 74, 165, 216, 165, 70, - 59, 338, 132, 131, 60, 131, 84, 85, 79, 114, - 17, 18, 3, 4, 5, 6, 491, 60, 96, 97, - 99, 176, 60, 76, 167, 100, 131, 80, 80, 366, - 114, 114, 116, 252, 253, 103, 167, 171, 109, 192, - 168, 124, 168, 257, 263, 264, 168, 131, 131, 171, - 167, 265, 127, 267, 45, 46, 47, 271, 272, 273, - 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, - 284, 285, 114, 124, 142, 143, 171, 3, 4, 5, - 6, 232, 124, 232, 26, 89, 57, 472, 91, 131, - 309, 168, 63, 84, 3, 314, 315, 250, 160, 300, - 178, 438, 160, 167, 172, 219, 3, 110, 107, 70, - 114, 115, 103, 116, 103, 114, 286, 502, 79, 45, - 46, 47, 113, 3, 4, 5, 6, 131, 513, 120, - 164, 120, 131, 352, 353, 290, 91, 171, 3, 393, - 107, 296, 133, 103, 134, 223, 168, 114, 109, 171, - 364, 142, 143, 317, 317, 110, 526, 494, 84, 110, - 120, 116, 97, 114, 131, 45, 46, 47, 159, 160, - 160, 161, 162, 163, 25, 165, 167, 103, 46, 47, - 131, 172, 166, 114, 110, 116, 290, 171, 3, 4, - 5, 6, 296, 93, 120, 168, 231, 167, 171, 169, - 131, 236, 355, 168, 84, 93, 171, 133, 427, 287, - 429, 430, 79, 366, 3, 66, 142, 143, 168, 144, - 71, 171, 436, 103, 0, 168, 77, 78, 171, 170, - 45, 46, 47, 159, 160, 168, 168, 25, 171, 171, - 120, 167, 57, 94, 3, 169, 172, 98, 99, 168, - 111, 167, 171, 133, 3, 4, 5, 6, 168, 93, - 479, 171, 142, 143, 126, 3, 4, 5, 6, 84, - 136, 137, 138, 139, 140, 141, 3, 122, 66, 159, - 160, 124, 126, 71, 25, 438, 171, 167, 103, 77, - 78, 168, 172, 96, 171, 123, 45, 46, 47, 168, - 4, 520, 171, 522, 3, 120, 94, 120, 46, 47, - 98, 99, 3, 82, 17, 92, 3, 167, 133, 90, - 171, 4, 45, 3, 6, 66, 167, 142, 143, 167, - 71, 12, 168, 168, 113, 84, 77, 78, 125, 168, - 81, 171, 3, 45, 159, 160, 84, 130, 148, 38, - 53, 111, 167, 94, 103, 130, 3, 172, 99, 76, - 3, 111, 3, 124, 97, 103, 167, 93, 167, 167, - 165, 120, 48, 167, 167, 171, 54, 167, 92, 171, - 171, 167, 120, 171, 133, 57, 168, 167, 3, 130, - 3, 30, 93, 142, 143, 133, 168, 100, 114, 167, - 167, 167, 167, 100, 142, 143, 169, 103, 165, 167, - 159, 160, 166, 69, 167, 171, 6, 120, 167, 6, - 6, 159, 160, 172, 127, 128, 6, 119, 0, 167, - 103, 134, 135, 167, 172, 7, 168, 168, 168, 98, - 77, 77, 77, 15, 98, 148, 149, 150, 151, 152, - 22, 3, 155, 156, 26, 158, 159, 160, 161, 162, - 163, 125, 165, 6, 36, 68, 7, 39, 40, 119, - 168, 6, 298, 168, 15, 168, 24, 167, 294, 51, - 52, 22, 168, 168, 168, 26, 333, 53, 167, 428, - 62, 168, 167, 65, 168, 36, 138, 150, 39, 40, - 248, 334, 217, 309, 487, 302, 486, 254, 230, 100, - 51, 52, -1, -1, 86, -1, -1, -1, 90, -1, - -1, 62, -1, -1, 65, -1, -1, -1, -1, -1, - -1, -1, -1, 105, 100, -1, -1, -1, -1, 111, - 53, -1, -1, -1, -1, 86, -1, -1, 114, 90, - -1, -1, -1, -1, 120, -1, -1, -1, -1, -1, - -1, -1, 128, -1, 105, -1, -1, -1, 134, 135, - 111, -1, -1, 145, 146, 147, 53, -1, -1, -1, - -1, -1, 148, 149, 150, 151, 152, 100, -1, 155, - 156, -1, 158, 159, 160, 161, 162, 163, -1, 165, - -1, -1, -1, -1, 145, 146, 147, 120, -1, -1, - -1, -1, 53, -1, -1, 128, -1, -1, -1, -1, - -1, 134, 135, 100, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 148, 149, 150, 151, 152, - -1, -1, 155, 156, -1, 158, 159, 160, 161, 162, - 163, 128, 165, -1, -1, -1, -1, 134, 135, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 148, 149, 150, 151, 152, -1, -1, 155, 156, - -1, 158, 159, 160, 161, 162, 163, 128, 165, 24, - -1, -1, -1, 134, 29, -1, 31, 32, -1, 34, - -1, -1, -1, -1, -1, -1, -1, 42, -1, -1, - 151, 152, -1, -1, 155, 156, -1, 158, 159, 160, - 161, 162, 163, -1, 165, -1, -1, -1, -1, -1, - -1, -1, -1, 68, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 85, -1, 87, 88, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 102, -1, -1, - -1, 106, -1, 108, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 118 + 139, 74, 92, 93, 180, 297, 2, 263, 93, 5, + 80, 103, 320, 3, 10, 3, 12, 145, 3, 3, + 56, 57, 110, 57, 113, 113, 54, 4, 5, 6, + 338, 170, 12, 172, 173, 77, 93, 70, 82, 25, + 3, 19, 164, 26, 93, 37, 79, 456, 187, 171, + 50, 141, 48, 192, 50, 54, 141, 53, 188, 134, + 190, 9, 58, 9, 27, 70, 27, 124, 25, 89, + 143, 46, 47, 72, 79, 251, 109, 216, 100, 3, + 66, 59, 74, 132, 493, 71, 114, 343, 84, 85, + 165, 77, 78, 3, 114, 115, 44, 60, 44, 60, + 96, 97, 3, 131, 109, 127, 176, 99, 94, 66, + 167, 131, 98, 99, 71, 371, 424, 256, 257, 192, + 77, 78, 17, 18, 81, 167, 103, 171, 267, 268, + 76, 261, 80, 167, 80, 3, 167, 94, 169, 269, + 124, 271, 99, 232, 232, 275, 276, 277, 278, 279, + 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, + 93, 3, 4, 5, 6, 142, 143, 3, 4, 5, + 6, 171, 160, 130, 313, 160, 304, 167, 93, 318, + 319, 254, 178, 219, 440, 171, 168, 79, 168, 171, + 114, 114, 134, 110, 166, 172, 114, 114, 290, 171, + 124, 91, 3, 45, 46, 47, 514, 131, 131, 45, + 46, 47, 25, 131, 131, 97, 91, 114, 357, 358, + 110, 163, 398, 165, 294, 144, 116, 223, 134, 103, + 300, 321, 524, 231, 131, 110, 321, 0, 236, 369, + 496, 116, 84, 103, 107, 168, 120, 111, 84, 170, + 168, 114, 114, 66, 160, 161, 162, 163, 71, 165, + 120, 103, 124, 3, 77, 78, 57, 103, 131, 131, + 107, 113, 63, 294, 110, 169, 167, 114, 120, 300, + 168, 94, 126, 171, 120, 98, 99, 360, 3, 124, + 429, 133, 431, 432, 131, 291, 168, 133, 371, 171, + 142, 143, 3, 4, 5, 6, 142, 143, 438, 114, + 114, 116, 116, 168, 93, 122, 171, 159, 160, 168, + 126, 171, 171, 159, 160, 167, 131, 131, 53, 168, + 172, 167, 171, 3, 168, 168, 172, 171, 171, 96, + 168, 123, 481, 171, 45, 46, 47, 3, 4, 5, + 6, 168, 168, 4, 171, 171, 57, 168, 171, 120, + 171, 3, 3, 4, 5, 6, 82, 440, 3, 4, + 5, 6, 136, 137, 138, 139, 140, 141, 168, 92, + 519, 171, 521, 84, 167, 3, 90, 4, 45, 45, + 46, 47, 3, 167, 167, 113, 6, 12, 168, 168, + 168, 125, 103, 128, 45, 46, 47, 45, 130, 134, + 17, 46, 47, 171, 3, 148, 38, 111, 130, 120, + 3, 76, 3, 111, 124, 167, 151, 152, 84, 167, + 155, 156, 133, 158, 159, 160, 161, 162, 163, 167, + 165, 142, 143, 84, 165, 97, 53, 103, 167, 84, + 48, 171, 54, 167, 93, 92, 119, 167, 159, 160, + 171, 167, 103, 57, 120, 167, 167, 3, 103, 168, + 167, 172, 3, 30, 167, 167, 167, 133, 167, 120, + 167, 93, 168, 114, 100, 120, 142, 143, 167, 103, + 165, 169, 133, 100, 166, 171, 69, 6, 133, 167, + 6, 142, 143, 159, 160, 6, 6, 142, 143, 168, + 103, 167, 98, 120, 168, 168, 172, 77, 159, 160, + 127, 128, 77, 77, 159, 160, 167, 134, 135, 98, + 3, 172, 167, 125, 6, 168, 168, 172, 168, 119, + 168, 148, 149, 150, 151, 152, 6, 168, 155, 156, + 0, 158, 159, 160, 161, 162, 163, 7, 165, 167, + 68, 167, 7, 168, 168, 15, 24, 168, 302, 298, + 15, 150, 22, 340, 430, 138, 26, 22, 252, 306, + 489, 26, 53, 217, 488, 258, 36, 313, 100, 39, + 40, 36, -1, -1, 39, 40, -1, -1, -1, -1, + -1, 51, 52, 230, -1, -1, 51, 52, -1, -1, + -1, -1, 62, -1, -1, 65, -1, 62, -1, -1, + 65, -1, -1, -1, -1, -1, -1, -1, -1, 100, + -1, -1, -1, -1, -1, -1, 86, -1, -1, 53, + 90, 86, -1, 114, -1, 90, -1, -1, -1, 120, + -1, -1, -1, -1, -1, 105, -1, 128, 53, -1, + 105, 111, -1, 134, 135, -1, 111, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 148, 149, 150, + 151, 152, -1, -1, 155, 156, 100, 158, 159, 160, + 161, 162, 163, -1, 165, 145, 146, 147, -1, -1, + 145, 146, 147, -1, -1, 100, 120, -1, 24, -1, + -1, -1, -1, 29, 128, 31, 32, -1, 34, -1, + 134, 135, -1, -1, -1, -1, 42, -1, -1, -1, + -1, -1, -1, 128, 148, 149, 150, 151, 152, 134, + 135, 155, 156, -1, 158, 159, 160, 161, 162, 163, + -1, 165, 68, 148, 149, 150, 151, 152, -1, -1, + 155, 156, -1, 158, 159, 160, 161, 162, 163, 85, + 165, 87, 88, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 102, -1, -1, -1, + 106, -1, 108, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 118 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1327,36 +1315,36 @@ static const yytype_int16 yystos[] = 258, 188, 3, 286, 63, 217, 148, 171, 226, 38, 111, 189, 189, 130, 3, 179, 180, 223, 235, 238, 239, 229, 218, 230, 231, 239, 229, 239, 113, 239, - 258, 271, 3, 213, 3, 194, 195, 124, 167, 169, - 167, 167, 167, 110, 239, 247, 45, 120, 240, 165, - 240, 217, 239, 114, 131, 17, 53, 100, 120, 127, - 128, 134, 135, 148, 149, 150, 151, 152, 155, 156, - 158, 159, 160, 161, 162, 163, 165, 97, 168, 171, - 167, 239, 212, 204, 48, 271, 167, 168, 171, 93, - 224, 225, 171, 3, 124, 276, 277, 234, 214, 171, - 89, 115, 232, 234, 54, 54, 167, 92, 24, 29, - 31, 32, 34, 42, 68, 85, 87, 88, 102, 106, - 108, 118, 196, 171, 201, 202, 213, 168, 222, 3, - 160, 217, 136, 137, 138, 139, 140, 141, 253, 239, - 239, 247, 91, 110, 116, 167, 120, 235, 168, 168, - 239, 239, 240, 240, 100, 127, 167, 103, 120, 240, - 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, - 240, 240, 240, 240, 262, 271, 3, 237, 3, 257, - 187, 237, 180, 167, 265, 266, 267, 268, 269, 271, - 282, 226, 238, 3, 231, 239, 239, 286, 188, 30, - 167, 198, 167, 167, 167, 197, 103, 120, 199, 27, - 60, 195, 168, 171, 202, 235, 168, 93, 124, 107, - 91, 116, 239, 239, 217, 166, 114, 240, 167, 217, - 235, 103, 166, 168, 168, 213, 25, 66, 71, 77, - 78, 94, 99, 283, 171, 124, 274, 275, 276, 69, - 227, 168, 167, 6, 6, 6, 6, 103, 27, 60, - 200, 119, 167, 168, 239, 196, 239, 239, 116, 107, - 168, 240, 217, 235, 168, 168, 168, 98, 77, 77, - 77, 98, 266, 3, 125, 6, 168, 171, 168, 168, - 168, 119, 167, 286, 168, 168, 116, 239, 168, 168, - 275, 267, 266, 167, 235, 168, 6, 286, 168, 81, - 130, 286, 50, 228, 168, 168, 167, 239, 284, 168, - 239, 257, 168 + 258, 271, 3, 213, 3, 27, 60, 194, 195, 196, + 202, 124, 167, 169, 167, 167, 167, 110, 239, 247, + 45, 120, 240, 165, 240, 217, 239, 114, 131, 17, + 53, 100, 120, 127, 128, 134, 135, 148, 149, 150, + 151, 152, 155, 156, 158, 159, 160, 161, 162, 163, + 165, 97, 168, 171, 167, 239, 212, 204, 48, 271, + 167, 168, 171, 93, 224, 225, 171, 3, 124, 276, + 277, 234, 214, 171, 89, 115, 232, 234, 54, 54, + 167, 92, 24, 29, 31, 32, 34, 42, 68, 85, + 87, 88, 102, 106, 108, 118, 197, 119, 167, 168, + 171, 213, 168, 222, 3, 160, 217, 136, 137, 138, + 139, 140, 141, 253, 239, 239, 247, 91, 110, 116, + 167, 120, 235, 168, 168, 239, 239, 240, 240, 100, + 127, 167, 103, 120, 240, 240, 240, 240, 240, 240, + 240, 240, 240, 240, 240, 240, 240, 240, 240, 262, + 271, 3, 237, 3, 257, 187, 237, 180, 167, 265, + 266, 267, 268, 269, 271, 282, 226, 238, 3, 231, + 239, 239, 286, 188, 30, 167, 199, 167, 167, 167, + 198, 103, 120, 200, 167, 286, 195, 235, 168, 93, + 124, 107, 91, 116, 239, 239, 217, 166, 114, 240, + 167, 217, 235, 103, 166, 168, 168, 213, 25, 66, + 71, 77, 78, 94, 99, 283, 171, 124, 274, 275, + 276, 69, 227, 168, 167, 6, 6, 6, 6, 103, + 27, 60, 201, 286, 168, 168, 239, 197, 239, 239, + 116, 107, 168, 240, 217, 235, 168, 168, 168, 98, + 77, 77, 77, 98, 266, 3, 125, 6, 168, 171, + 168, 168, 168, 119, 168, 168, 168, 116, 239, 168, + 168, 275, 267, 266, 167, 235, 168, 6, 81, 130, + 286, 50, 228, 168, 167, 239, 284, 168, 239, 257, + 168 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ @@ -1367,30 +1355,30 @@ static const yytype_int16 yyr1[] = 178, 178, 179, 179, 180, 180, 181, 181, 181, 182, 182, 183, 184, 185, 185, 186, 186, 187, 188, 189, 189, 190, 191, 191, 191, 192, 192, 192, 192, 192, - 193, 193, 194, 194, 195, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 197, - 197, 198, 198, 198, 199, 199, 199, 200, 200, 200, - 201, 201, 201, 202, 202, 203, 203, 203, 203, 204, - 204, 205, 206, 207, 208, 208, 209, 209, 210, 211, - 211, 212, 213, 213, 213, 214, 214, 215, 215, 216, - 216, 217, 217, 218, 219, 219, 219, 220, 220, 221, - 222, 222, 223, 224, 224, 225, 226, 226, 227, 227, - 228, 228, 229, 229, 230, 230, 231, 232, 232, 232, - 233, 233, 234, 234, 234, 234, 234, 234, 235, 235, - 236, 236, 237, 237, 238, 239, 239, 239, 239, 239, + 193, 193, 194, 194, 195, 195, 196, 197, 197, 197, + 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, + 197, 198, 198, 199, 199, 199, 200, 200, 200, 201, + 201, 201, 202, 202, 203, 203, 203, 203, 204, 204, + 205, 206, 207, 208, 208, 209, 209, 210, 211, 211, + 212, 213, 213, 213, 214, 214, 215, 215, 216, 216, + 217, 217, 218, 219, 219, 219, 220, 220, 221, 222, + 222, 223, 224, 224, 225, 226, 226, 227, 227, 228, + 228, 229, 229, 230, 230, 231, 232, 232, 232, 233, + 233, 234, 234, 234, 234, 234, 234, 235, 235, 236, + 236, 237, 237, 238, 239, 239, 239, 239, 239, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, - 240, 241, 241, 242, 242, 242, 242, 242, 243, 243, - 243, 243, 243, 243, 243, 243, 243, 243, 243, 244, - 244, 245, 245, 245, 245, 246, 246, 246, 246, 247, - 247, 248, 248, 249, 249, 249, 249, 249, 249, 249, - 250, 250, 251, 252, 253, 253, 253, 253, 253, 253, - 254, 255, 256, 257, 257, 257, 257, 258, 258, 258, - 258, 258, 259, 260, 260, 261, 261, 262, 263, 264, - 265, 265, 266, 266, 267, 267, 268, 268, 269, 270, - 271, 271, 272, 272, 273, 274, 274, 275, 275, 276, - 276, 277, 277, 278, 278, 279, 280, 280, 281, 282, - 282, 282, 283, 283, 283, 283, 283, 283, 283, 283, - 283, 283, 284, 285, 285, 286, 286 + 241, 241, 242, 242, 242, 242, 242, 243, 243, 243, + 243, 243, 243, 243, 243, 243, 243, 243, 244, 244, + 245, 245, 245, 245, 246, 246, 246, 246, 247, 247, + 248, 248, 249, 249, 249, 249, 249, 249, 249, 250, + 250, 251, 252, 253, 253, 253, 253, 253, 253, 254, + 255, 256, 257, 257, 257, 257, 258, 258, 258, 258, + 258, 259, 260, 260, 261, 261, 262, 263, 264, 265, + 265, 266, 266, 267, 267, 268, 268, 269, 270, 271, + 271, 272, 272, 273, 274, 274, 275, 275, 276, 276, + 277, 277, 278, 278, 279, 280, 280, 281, 282, 282, + 282, 283, 283, 283, 283, 283, 283, 283, 283, 283, + 283, 284, 285, 285, 286, 286 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -1400,31 +1388,31 @@ static const yytype_int8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 0, 1, 3, 1, 4, 2, 2, 2, 1, 0, 4, 1, 2, 5, 7, 5, 1, 1, 3, - 0, 5, 2, 3, 2, 8, 8, 6, 9, 7, - 3, 0, 1, 3, 4, 1, 1, 1, 1, 2, - 1, 1, 4, 5, 4, 1, 2, 1, 1, 3, - 0, 5, 3, 0, 1, 2, 0, 2, 1, 0, - 1, 2, 0, 6, 5, 4, 4, 3, 6, 2, - 0, 7, 4, 2, 8, 5, 3, 0, 5, 1, - 3, 3, 2, 2, 6, 1, 1, 1, 3, 3, - 3, 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, 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, 6, 1, 1, 1, 1, 1, 1, - 4, 4, 5, 1, 3, 1, 3, 1, 1, 1, + 0, 5, 2, 3, 2, 8, 7, 6, 9, 7, + 3, 0, 1, 3, 1, 1, 4, 1, 1, 1, + 1, 2, 1, 1, 4, 5, 4, 1, 2, 1, + 1, 3, 0, 5, 3, 0, 1, 2, 0, 2, + 1, 0, 5, 4, 4, 4, 3, 6, 2, 0, + 7, 4, 2, 8, 5, 3, 0, 5, 1, 3, + 3, 2, 2, 6, 1, 1, 1, 3, 3, 3, + 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, 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, 6, 1, 1, 1, 1, 1, 1, 4, + 4, 5, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 3, 1, 1, 1, 4, 1, 3, 2, 1, - 1, 3, 1, 0, 1, 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 + 3, 1, 1, 1, 4, 1, 3, 2, 1, 1, + 3, 1, 0, 1, 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 }; @@ -1978,25 +1966,25 @@ yydestruct (const char *yymsg, case YYSYMBOL_IDENTIFIER: /* IDENTIFIER */ #line 154 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1982 "bison_parser.cpp" +#line 1970 "bison_parser.cpp" break; case YYSYMBOL_STRING: /* STRING */ #line 154 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1988 "bison_parser.cpp" +#line 1976 "bison_parser.cpp" break; case YYSYMBOL_FLOATVAL: /* FLOATVAL */ #line 152 "bison_parser.y" { } -#line 1994 "bison_parser.cpp" +#line 1982 "bison_parser.cpp" break; case YYSYMBOL_INTVAL: /* INTVAL */ #line 152 "bison_parser.y" { } -#line 2000 "bison_parser.cpp" +#line 1988 "bison_parser.cpp" break; case YYSYMBOL_statement_list: /* statement_list */ @@ -2009,19 +1997,19 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).stmt_vec)); } -#line 2013 "bison_parser.cpp" +#line 2001 "bison_parser.cpp" break; case YYSYMBOL_statement: /* statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 2019 "bison_parser.cpp" +#line 2007 "bison_parser.cpp" break; case YYSYMBOL_preparable_statement: /* preparable_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 2025 "bison_parser.cpp" +#line 2013 "bison_parser.cpp" break; case YYSYMBOL_opt_hints: /* opt_hints */ @@ -2034,7 +2022,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2038 "bison_parser.cpp" +#line 2026 "bison_parser.cpp" break; case YYSYMBOL_hint_list: /* hint_list */ @@ -2047,182 +2035,182 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2051 "bison_parser.cpp" +#line 2039 "bison_parser.cpp" break; case YYSYMBOL_hint: /* hint */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2057 "bison_parser.cpp" +#line 2045 "bison_parser.cpp" break; case YYSYMBOL_transaction_statement: /* transaction_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).transaction_stmt)); } -#line 2063 "bison_parser.cpp" +#line 2051 "bison_parser.cpp" break; case YYSYMBOL_prepare_statement: /* prepare_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).prep_stmt)); } -#line 2069 "bison_parser.cpp" +#line 2057 "bison_parser.cpp" break; case YYSYMBOL_prepare_target_query: /* prepare_target_query */ #line 154 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2075 "bison_parser.cpp" +#line 2063 "bison_parser.cpp" break; case YYSYMBOL_execute_statement: /* execute_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).exec_stmt)); } -#line 2081 "bison_parser.cpp" +#line 2069 "bison_parser.cpp" break; case YYSYMBOL_import_statement: /* import_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).import_stmt)); } -#line 2087 "bison_parser.cpp" +#line 2075 "bison_parser.cpp" break; case YYSYMBOL_file_type: /* file_type */ #line 152 "bison_parser.y" { } -#line 2093 "bison_parser.cpp" +#line 2081 "bison_parser.cpp" break; case YYSYMBOL_file_path: /* file_path */ #line 154 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2099 "bison_parser.cpp" +#line 2087 "bison_parser.cpp" break; case YYSYMBOL_opt_file_type: /* opt_file_type */ #line 152 "bison_parser.y" { } -#line 2105 "bison_parser.cpp" +#line 2093 "bison_parser.cpp" break; case YYSYMBOL_export_statement: /* export_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).export_stmt)); } -#line 2111 "bison_parser.cpp" +#line 2099 "bison_parser.cpp" break; case YYSYMBOL_show_statement: /* show_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).show_stmt)); } -#line 2117 "bison_parser.cpp" +#line 2105 "bison_parser.cpp" break; case YYSYMBOL_create_statement: /* create_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).create_stmt)); } -#line 2123 "bison_parser.cpp" +#line 2111 "bison_parser.cpp" break; case YYSYMBOL_opt_not_exists: /* opt_not_exists */ #line 152 "bison_parser.y" { } -#line 2129 "bison_parser.cpp" +#line 2117 "bison_parser.cpp" break; - case YYSYMBOL_column_def_commalist: /* column_def_commalist */ + case YYSYMBOL_table_elem_commalist: /* table_elem_commalist */ #line 155 "bison_parser.y" { - if ((((*yyvaluep).column_vec)) != nullptr) { - for (auto ptr : *(((*yyvaluep).column_vec))) { + if ((((*yyvaluep).table_element_vec)) != nullptr) { + for (auto ptr : *(((*yyvaluep).table_element_vec))) { delete ptr; } } - delete (((*yyvaluep).column_vec)); + delete (((*yyvaluep).table_element_vec)); } -#line 2142 "bison_parser.cpp" +#line 2130 "bison_parser.cpp" + break; + + case YYSYMBOL_table_elem: /* table_elem */ +#line 163 "bison_parser.y" + { delete (((*yyvaluep).table_element_t)); } +#line 2136 "bison_parser.cpp" break; case YYSYMBOL_column_def: /* column_def */ #line 163 "bison_parser.y" { delete (((*yyvaluep).column_t)); } -#line 2148 "bison_parser.cpp" +#line 2142 "bison_parser.cpp" break; case YYSYMBOL_column_type: /* column_type */ #line 152 "bison_parser.y" { } -#line 2154 "bison_parser.cpp" +#line 2148 "bison_parser.cpp" break; case YYSYMBOL_opt_time_specification: /* opt_time_specification */ #line 152 "bison_parser.y" { } -#line 2160 "bison_parser.cpp" +#line 2154 "bison_parser.cpp" break; case YYSYMBOL_opt_decimal_specification: /* opt_decimal_specification */ #line 152 "bison_parser.y" { } -#line 2166 "bison_parser.cpp" +#line 2160 "bison_parser.cpp" break; case YYSYMBOL_opt_column_nullable: /* opt_column_nullable */ #line 152 "bison_parser.y" { } -#line 2172 "bison_parser.cpp" +#line 2166 "bison_parser.cpp" break; case YYSYMBOL_opt_column_constraint: /* opt_column_constraint */ #line 152 "bison_parser.y" { } -#line 2178 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_table_constraints: /* opt_table_constraints */ -#line 163 "bison_parser.y" - { delete (((*yyvaluep).table_constraint_vec)); } -#line 2184 "bison_parser.cpp" +#line 2172 "bison_parser.cpp" break; case YYSYMBOL_table_constraint: /* table_constraint */ #line 163 "bison_parser.y" { delete (((*yyvaluep).table_constraint_t)); } -#line 2190 "bison_parser.cpp" +#line 2178 "bison_parser.cpp" break; case YYSYMBOL_drop_statement: /* drop_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).drop_stmt)); } -#line 2196 "bison_parser.cpp" +#line 2184 "bison_parser.cpp" break; case YYSYMBOL_opt_exists: /* opt_exists */ #line 152 "bison_parser.y" { } -#line 2202 "bison_parser.cpp" +#line 2190 "bison_parser.cpp" break; case YYSYMBOL_alter_statement: /* alter_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).alter_stmt)); } -#line 2208 "bison_parser.cpp" +#line 2196 "bison_parser.cpp" break; case YYSYMBOL_delete_statement: /* delete_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2214 "bison_parser.cpp" +#line 2202 "bison_parser.cpp" break; case YYSYMBOL_truncate_statement: /* truncate_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2220 "bison_parser.cpp" +#line 2208 "bison_parser.cpp" break; case YYSYMBOL_insert_statement: /* insert_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).insert_stmt)); } -#line 2226 "bison_parser.cpp" +#line 2214 "bison_parser.cpp" break; case YYSYMBOL_opt_column_list: /* opt_column_list */ @@ -2235,13 +2223,13 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2239 "bison_parser.cpp" +#line 2227 "bison_parser.cpp" break; case YYSYMBOL_update_statement: /* update_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).update_stmt)); } -#line 2245 "bison_parser.cpp" +#line 2233 "bison_parser.cpp" break; case YYSYMBOL_update_clause_commalist: /* update_clause_commalist */ @@ -2254,73 +2242,73 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).update_vec)); } -#line 2258 "bison_parser.cpp" +#line 2246 "bison_parser.cpp" break; case YYSYMBOL_update_clause: /* update_clause */ #line 163 "bison_parser.y" { delete (((*yyvaluep).update_t)); } -#line 2264 "bison_parser.cpp" +#line 2252 "bison_parser.cpp" break; case YYSYMBOL_select_statement: /* select_statement */ #line 163 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2270 "bison_parser.cpp" +#line 2258 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation: /* select_within_set_operation */ #line 163 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2276 "bison_parser.cpp" +#line 2264 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation_no_parentheses: /* select_within_set_operation_no_parentheses */ #line 163 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2282 "bison_parser.cpp" +#line 2270 "bison_parser.cpp" break; case YYSYMBOL_select_with_paren: /* select_with_paren */ #line 163 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2288 "bison_parser.cpp" +#line 2276 "bison_parser.cpp" break; case YYSYMBOL_select_no_paren: /* select_no_paren */ #line 163 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2294 "bison_parser.cpp" +#line 2282 "bison_parser.cpp" break; case YYSYMBOL_set_operator: /* set_operator */ #line 163 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2300 "bison_parser.cpp" +#line 2288 "bison_parser.cpp" break; case YYSYMBOL_set_type: /* set_type */ #line 163 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2306 "bison_parser.cpp" +#line 2294 "bison_parser.cpp" break; case YYSYMBOL_opt_all: /* opt_all */ #line 152 "bison_parser.y" { } -#line 2312 "bison_parser.cpp" +#line 2300 "bison_parser.cpp" break; case YYSYMBOL_select_clause: /* select_clause */ #line 163 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2318 "bison_parser.cpp" +#line 2306 "bison_parser.cpp" break; case YYSYMBOL_opt_distinct: /* opt_distinct */ #line 152 "bison_parser.y" { } -#line 2324 "bison_parser.cpp" +#line 2312 "bison_parser.cpp" break; case YYSYMBOL_select_list: /* select_list */ @@ -2333,37 +2321,37 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2337 "bison_parser.cpp" +#line 2325 "bison_parser.cpp" break; case YYSYMBOL_opt_from_clause: /* opt_from_clause */ #line 163 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2343 "bison_parser.cpp" +#line 2331 "bison_parser.cpp" break; case YYSYMBOL_from_clause: /* from_clause */ #line 163 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2349 "bison_parser.cpp" +#line 2337 "bison_parser.cpp" break; case YYSYMBOL_opt_where: /* opt_where */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2355 "bison_parser.cpp" +#line 2343 "bison_parser.cpp" break; case YYSYMBOL_opt_group: /* opt_group */ #line 163 "bison_parser.y" { delete (((*yyvaluep).group_t)); } -#line 2361 "bison_parser.cpp" +#line 2349 "bison_parser.cpp" break; case YYSYMBOL_opt_having: /* opt_having */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2367 "bison_parser.cpp" +#line 2355 "bison_parser.cpp" break; case YYSYMBOL_opt_order: /* opt_order */ @@ -2376,7 +2364,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2380 "bison_parser.cpp" +#line 2368 "bison_parser.cpp" break; case YYSYMBOL_order_list: /* order_list */ @@ -2389,31 +2377,31 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2393 "bison_parser.cpp" +#line 2381 "bison_parser.cpp" break; case YYSYMBOL_order_desc: /* order_desc */ #line 163 "bison_parser.y" { delete (((*yyvaluep).order)); } -#line 2399 "bison_parser.cpp" +#line 2387 "bison_parser.cpp" break; case YYSYMBOL_opt_order_type: /* opt_order_type */ #line 152 "bison_parser.y" { } -#line 2405 "bison_parser.cpp" +#line 2393 "bison_parser.cpp" break; case YYSYMBOL_opt_top: /* opt_top */ #line 163 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2411 "bison_parser.cpp" +#line 2399 "bison_parser.cpp" break; case YYSYMBOL_opt_limit: /* opt_limit */ #line 163 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2417 "bison_parser.cpp" +#line 2405 "bison_parser.cpp" break; case YYSYMBOL_expr_list: /* expr_list */ @@ -2426,7 +2414,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2430 "bison_parser.cpp" +#line 2418 "bison_parser.cpp" break; case YYSYMBOL_opt_literal_list: /* opt_literal_list */ @@ -2439,7 +2427,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2443 "bison_parser.cpp" +#line 2431 "bison_parser.cpp" break; case YYSYMBOL_literal_list: /* literal_list */ @@ -2452,187 +2440,187 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2456 "bison_parser.cpp" +#line 2444 "bison_parser.cpp" break; case YYSYMBOL_expr_alias: /* expr_alias */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2462 "bison_parser.cpp" +#line 2450 "bison_parser.cpp" break; case YYSYMBOL_expr: /* expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2468 "bison_parser.cpp" +#line 2456 "bison_parser.cpp" break; case YYSYMBOL_operand: /* operand */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2474 "bison_parser.cpp" +#line 2462 "bison_parser.cpp" break; case YYSYMBOL_scalar_expr: /* scalar_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2480 "bison_parser.cpp" +#line 2468 "bison_parser.cpp" break; case YYSYMBOL_unary_expr: /* unary_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2486 "bison_parser.cpp" +#line 2474 "bison_parser.cpp" break; case YYSYMBOL_binary_expr: /* binary_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2492 "bison_parser.cpp" +#line 2480 "bison_parser.cpp" break; case YYSYMBOL_logic_expr: /* logic_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2498 "bison_parser.cpp" +#line 2486 "bison_parser.cpp" break; case YYSYMBOL_in_expr: /* in_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2504 "bison_parser.cpp" +#line 2492 "bison_parser.cpp" break; case YYSYMBOL_case_expr: /* case_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2510 "bison_parser.cpp" +#line 2498 "bison_parser.cpp" break; case YYSYMBOL_case_list: /* case_list */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2516 "bison_parser.cpp" +#line 2504 "bison_parser.cpp" break; case YYSYMBOL_exists_expr: /* exists_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2522 "bison_parser.cpp" +#line 2510 "bison_parser.cpp" break; case YYSYMBOL_comp_expr: /* comp_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2528 "bison_parser.cpp" +#line 2516 "bison_parser.cpp" break; case YYSYMBOL_function_expr: /* function_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2534 "bison_parser.cpp" +#line 2522 "bison_parser.cpp" break; case YYSYMBOL_extract_expr: /* extract_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2540 "bison_parser.cpp" +#line 2528 "bison_parser.cpp" break; case YYSYMBOL_cast_expr: /* cast_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2546 "bison_parser.cpp" +#line 2534 "bison_parser.cpp" break; case YYSYMBOL_datetime_field: /* datetime_field */ #line 152 "bison_parser.y" { } -#line 2552 "bison_parser.cpp" +#line 2540 "bison_parser.cpp" break; case YYSYMBOL_array_expr: /* array_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2558 "bison_parser.cpp" +#line 2546 "bison_parser.cpp" break; case YYSYMBOL_array_index: /* array_index */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2564 "bison_parser.cpp" +#line 2552 "bison_parser.cpp" break; case YYSYMBOL_between_expr: /* between_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2570 "bison_parser.cpp" +#line 2558 "bison_parser.cpp" break; case YYSYMBOL_column_name: /* column_name */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2576 "bison_parser.cpp" +#line 2564 "bison_parser.cpp" break; case YYSYMBOL_literal: /* literal */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2582 "bison_parser.cpp" +#line 2570 "bison_parser.cpp" break; case YYSYMBOL_string_literal: /* string_literal */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2588 "bison_parser.cpp" +#line 2576 "bison_parser.cpp" break; case YYSYMBOL_bool_literal: /* bool_literal */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2594 "bison_parser.cpp" +#line 2582 "bison_parser.cpp" break; case YYSYMBOL_num_literal: /* num_literal */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2600 "bison_parser.cpp" +#line 2588 "bison_parser.cpp" break; case YYSYMBOL_int_literal: /* int_literal */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2606 "bison_parser.cpp" +#line 2594 "bison_parser.cpp" break; case YYSYMBOL_null_literal: /* null_literal */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2612 "bison_parser.cpp" +#line 2600 "bison_parser.cpp" break; case YYSYMBOL_param_expr: /* param_expr */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2618 "bison_parser.cpp" +#line 2606 "bison_parser.cpp" break; case YYSYMBOL_table_ref: /* table_ref */ #line 163 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2624 "bison_parser.cpp" +#line 2612 "bison_parser.cpp" break; case YYSYMBOL_table_ref_atomic: /* table_ref_atomic */ #line 163 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2630 "bison_parser.cpp" +#line 2618 "bison_parser.cpp" break; case YYSYMBOL_nonjoin_table_ref_atomic: /* nonjoin_table_ref_atomic */ #line 163 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2636 "bison_parser.cpp" +#line 2624 "bison_parser.cpp" break; case YYSYMBOL_table_ref_commalist: /* table_ref_commalist */ @@ -2645,103 +2633,103 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).table_vec)); } -#line 2649 "bison_parser.cpp" +#line 2637 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name: /* table_ref_name */ #line 163 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2655 "bison_parser.cpp" +#line 2643 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name_no_alias: /* table_ref_name_no_alias */ #line 163 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2661 "bison_parser.cpp" +#line 2649 "bison_parser.cpp" break; case YYSYMBOL_table_name: /* table_name */ #line 153 "bison_parser.y" { free( (((*yyvaluep).table_name).name) ); free( (((*yyvaluep).table_name).schema) ); } -#line 2667 "bison_parser.cpp" +#line 2655 "bison_parser.cpp" break; case YYSYMBOL_opt_index_name: /* opt_index_name */ #line 154 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2673 "bison_parser.cpp" +#line 2661 "bison_parser.cpp" break; case YYSYMBOL_index_name: /* index_name */ #line 154 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2679 "bison_parser.cpp" +#line 2667 "bison_parser.cpp" break; case YYSYMBOL_table_alias: /* table_alias */ #line 163 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2685 "bison_parser.cpp" +#line 2673 "bison_parser.cpp" break; case YYSYMBOL_opt_table_alias: /* opt_table_alias */ #line 163 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2691 "bison_parser.cpp" +#line 2679 "bison_parser.cpp" break; case YYSYMBOL_alias: /* alias */ #line 163 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2697 "bison_parser.cpp" +#line 2685 "bison_parser.cpp" break; case YYSYMBOL_opt_alias: /* opt_alias */ #line 163 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2703 "bison_parser.cpp" +#line 2691 "bison_parser.cpp" break; case YYSYMBOL_opt_with_clause: /* opt_with_clause */ #line 163 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2709 "bison_parser.cpp" +#line 2697 "bison_parser.cpp" break; case YYSYMBOL_with_clause: /* with_clause */ #line 163 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2715 "bison_parser.cpp" +#line 2703 "bison_parser.cpp" break; case YYSYMBOL_with_description_list: /* with_description_list */ #line 163 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2721 "bison_parser.cpp" +#line 2709 "bison_parser.cpp" break; case YYSYMBOL_with_description: /* with_description */ #line 163 "bison_parser.y" { delete (((*yyvaluep).with_description_t)); } -#line 2727 "bison_parser.cpp" +#line 2715 "bison_parser.cpp" break; case YYSYMBOL_join_clause: /* join_clause */ #line 163 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2733 "bison_parser.cpp" +#line 2721 "bison_parser.cpp" break; case YYSYMBOL_opt_join_type: /* opt_join_type */ #line 152 "bison_parser.y" { } -#line 2739 "bison_parser.cpp" +#line 2727 "bison_parser.cpp" break; case YYSYMBOL_join_condition: /* join_condition */ #line 163 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2745 "bison_parser.cpp" +#line 2733 "bison_parser.cpp" break; case YYSYMBOL_ident_commalist: /* ident_commalist */ @@ -2754,7 +2742,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2758 "bison_parser.cpp" +#line 2746 "bison_parser.cpp" break; default: @@ -2861,7 +2849,7 @@ YYLTYPE yylloc = yyloc_default; yylloc.string_length = 0; } -#line 2865 "bison_parser.cpp" +#line 2853 "bison_parser.cpp" yylsp[0] = yylloc; goto yysetstate; @@ -3089,7 +3077,7 @@ YYLTYPE yylloc = yyloc_default; } delete (yyvsp[-1].stmt_vec); } -#line 3093 "bison_parser.cpp" +#line 3081 "bison_parser.cpp" break; case 3: /* statement_list: statement */ @@ -3100,7 +3088,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.stmt_vec) = new std::vector(); (yyval.stmt_vec)->push_back((yyvsp[0].statement)); } -#line 3104 "bison_parser.cpp" +#line 3092 "bison_parser.cpp" break; case 4: /* statement_list: statement_list ';' statement */ @@ -3111,7 +3099,7 @@ YYLTYPE yylloc = yyloc_default; (yyvsp[-2].stmt_vec)->push_back((yyvsp[0].statement)); (yyval.stmt_vec) = (yyvsp[-2].stmt_vec); } -#line 3115 "bison_parser.cpp" +#line 3103 "bison_parser.cpp" break; case 5: /* statement: prepare_statement opt_hints */ @@ -3120,7 +3108,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3124 "bison_parser.cpp" +#line 3112 "bison_parser.cpp" break; case 6: /* statement: preparable_statement opt_hints */ @@ -3129,7 +3117,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.statement) = (yyvsp[-1].statement); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3133 "bison_parser.cpp" +#line 3121 "bison_parser.cpp" break; case 7: /* statement: show_statement */ @@ -3137,7 +3125,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.statement) = (yyvsp[0].show_stmt); } -#line 3141 "bison_parser.cpp" +#line 3129 "bison_parser.cpp" break; case 8: /* statement: import_statement */ @@ -3145,7 +3133,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.statement) = (yyvsp[0].import_stmt); } -#line 3149 "bison_parser.cpp" +#line 3137 "bison_parser.cpp" break; case 9: /* statement: export_statement */ @@ -3153,91 +3141,91 @@ YYLTYPE yylloc = yyloc_default; { (yyval.statement) = (yyvsp[0].export_stmt); } -#line 3157 "bison_parser.cpp" +#line 3145 "bison_parser.cpp" break; case 10: /* preparable_statement: select_statement */ #line 339 "bison_parser.y" { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 3163 "bison_parser.cpp" +#line 3151 "bison_parser.cpp" break; case 11: /* preparable_statement: create_statement */ #line 340 "bison_parser.y" { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 3169 "bison_parser.cpp" +#line 3157 "bison_parser.cpp" break; case 12: /* preparable_statement: insert_statement */ #line 341 "bison_parser.y" { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 3175 "bison_parser.cpp" +#line 3163 "bison_parser.cpp" break; case 13: /* preparable_statement: delete_statement */ #line 342 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3181 "bison_parser.cpp" +#line 3169 "bison_parser.cpp" break; case 14: /* preparable_statement: truncate_statement */ #line 343 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3187 "bison_parser.cpp" +#line 3175 "bison_parser.cpp" break; case 15: /* preparable_statement: update_statement */ #line 344 "bison_parser.y" { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 3193 "bison_parser.cpp" +#line 3181 "bison_parser.cpp" break; case 16: /* preparable_statement: drop_statement */ #line 345 "bison_parser.y" { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 3199 "bison_parser.cpp" +#line 3187 "bison_parser.cpp" break; case 17: /* preparable_statement: alter_statement */ #line 346 "bison_parser.y" { (yyval.statement) = (yyvsp[0].alter_stmt); } -#line 3205 "bison_parser.cpp" +#line 3193 "bison_parser.cpp" break; case 18: /* preparable_statement: execute_statement */ #line 347 "bison_parser.y" { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 3211 "bison_parser.cpp" +#line 3199 "bison_parser.cpp" break; case 19: /* preparable_statement: transaction_statement */ #line 348 "bison_parser.y" { (yyval.statement) = (yyvsp[0].transaction_stmt); } -#line 3217 "bison_parser.cpp" +#line 3205 "bison_parser.cpp" break; case 20: /* opt_hints: WITH HINT '(' hint_list ')' */ #line 357 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 3223 "bison_parser.cpp" +#line 3211 "bison_parser.cpp" break; case 21: /* opt_hints: %empty */ #line 358 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 3229 "bison_parser.cpp" +#line 3217 "bison_parser.cpp" break; case 22: /* hint_list: hint */ #line 363 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3235 "bison_parser.cpp" +#line 3223 "bison_parser.cpp" break; case 23: /* hint_list: hint_list ',' hint */ #line 364 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3241 "bison_parser.cpp" +#line 3229 "bison_parser.cpp" break; case 24: /* hint: IDENTIFIER */ @@ -3246,7 +3234,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[0].sval); } -#line 3250 "bison_parser.cpp" +#line 3238 "bison_parser.cpp" break; case 25: /* hint: IDENTIFIER '(' literal_list ')' */ @@ -3256,7 +3244,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expr)->name = (yyvsp[-3].sval); (yyval.expr)->exprList = (yyvsp[-1].expr_vec); } -#line 3260 "bison_parser.cpp" +#line 3248 "bison_parser.cpp" break; case 26: /* transaction_statement: BEGIN opt_transaction_keyword */ @@ -3264,7 +3252,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.transaction_stmt) = new TransactionStatement(kBeginTransaction); } -#line 3268 "bison_parser.cpp" +#line 3256 "bison_parser.cpp" break; case 27: /* transaction_statement: ROLLBACK opt_transaction_keyword */ @@ -3272,7 +3260,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.transaction_stmt) = new TransactionStatement(kRollbackTransaction); } -#line 3276 "bison_parser.cpp" +#line 3264 "bison_parser.cpp" break; case 28: /* transaction_statement: COMMIT opt_transaction_keyword */ @@ -3280,7 +3268,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.transaction_stmt) = new TransactionStatement(kCommitTransaction); } -#line 3284 "bison_parser.cpp" +#line 3272 "bison_parser.cpp" break; case 31: /* prepare_statement: PREPARE IDENTIFIER FROM prepare_target_query */ @@ -3290,7 +3278,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.prep_stmt)->name = (yyvsp[-2].sval); (yyval.prep_stmt)->query = (yyvsp[0].sval); } -#line 3294 "bison_parser.cpp" +#line 3282 "bison_parser.cpp" break; case 33: /* execute_statement: EXECUTE IDENTIFIER */ @@ -3299,7 +3287,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[0].sval); } -#line 3303 "bison_parser.cpp" +#line 3291 "bison_parser.cpp" break; case 34: /* execute_statement: EXECUTE IDENTIFIER '(' opt_literal_list ')' */ @@ -3309,7 +3297,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.exec_stmt)->name = (yyvsp[-3].sval); (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); } -#line 3313 "bison_parser.cpp" +#line 3301 "bison_parser.cpp" break; case 35: /* import_statement: IMPORT FROM file_type FILE file_path INTO table_name */ @@ -3320,7 +3308,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.import_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3324 "bison_parser.cpp" +#line 3312 "bison_parser.cpp" break; case 36: /* import_statement: COPY table_name FROM file_path opt_file_type */ @@ -3331,7 +3319,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.import_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3335 "bison_parser.cpp" +#line 3323 "bison_parser.cpp" break; case 37: /* file_type: IDENTIFIER */ @@ -3350,13 +3338,13 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[0].sval)); } -#line 3354 "bison_parser.cpp" +#line 3342 "bison_parser.cpp" break; case 38: /* file_path: string_literal */ #line 464 "bison_parser.y" { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 3360 "bison_parser.cpp" +#line 3348 "bison_parser.cpp" break; case 39: /* opt_file_type: WITH FORMAT file_type */ @@ -3364,13 +3352,13 @@ YYLTYPE yylloc = yyloc_default; { (yyval.import_type_t) = (yyvsp[0].import_type_t); } -#line 3368 "bison_parser.cpp" +#line 3356 "bison_parser.cpp" break; case 40: /* opt_file_type: %empty */ #line 471 "bison_parser.y" { (yyval.import_type_t) = kImportAuto; } -#line 3374 "bison_parser.cpp" +#line 3362 "bison_parser.cpp" break; case 41: /* export_statement: COPY table_name TO file_path opt_file_type */ @@ -3381,7 +3369,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.export_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.export_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3385 "bison_parser.cpp" +#line 3373 "bison_parser.cpp" break; case 42: /* show_statement: SHOW TABLES */ @@ -3389,7 +3377,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.show_stmt) = new ShowStatement(kShowTables); } -#line 3393 "bison_parser.cpp" +#line 3381 "bison_parser.cpp" break; case 43: /* show_statement: SHOW COLUMNS table_name */ @@ -3399,7 +3387,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.show_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.show_stmt)->name = (yyvsp[0].table_name).name; } -#line 3403 "bison_parser.cpp" +#line 3391 "bison_parser.cpp" break; case 44: /* show_statement: DESCRIBE table_name */ @@ -3409,7 +3397,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.show_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.show_stmt)->name = (yyvsp[0].table_name).name; } -#line 3413 "bison_parser.cpp" +#line 3401 "bison_parser.cpp" break; case 45: /* create_statement: CREATE TABLE opt_not_exists table_name FROM IDENTIFIER FILE file_path */ @@ -3427,24 +3415,23 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].sval)); (yyval.create_stmt)->filePath = (yyvsp[0].sval); } -#line 3431 "bison_parser.cpp" +#line 3419 "bison_parser.cpp" break; - case 46: /* create_statement: CREATE TABLE opt_not_exists table_name '(' column_def_commalist opt_table_constraints ')' */ + case 46: /* create_statement: CREATE TABLE opt_not_exists table_name '(' table_elem_commalist ')' */ #line 529 "bison_parser.y" - { + { (yyval.create_stmt) = new CreateStatement(kCreateTable); - (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); - (yyval.create_stmt)->schema = (yyvsp[-4].table_name).schema; - (yyval.create_stmt)->tableName = (yyvsp[-4].table_name).name; - (yyval.create_stmt)->columns = (yyvsp[-2].column_vec); - (yyval.create_stmt)->tableConstraints = (yyvsp[-1].table_constraint_vec); + (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); + (yyval.create_stmt)->schema = (yyvsp[-3].table_name).schema; + (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; + (yyval.create_stmt)->setColumnDefsAndConstraints((yyvsp[-1].table_element_vec)); } -#line 3444 "bison_parser.cpp" +#line 3431 "bison_parser.cpp" break; case 47: /* create_statement: CREATE TABLE opt_not_exists table_name AS select_statement */ -#line 537 "bison_parser.y" +#line 536 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-3].bval); @@ -3452,11 +3439,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-2].table_name).name; (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3456 "bison_parser.cpp" +#line 3443 "bison_parser.cpp" break; case 48: /* create_statement: CREATE INDEX opt_not_exists opt_index_name ON table_name '(' ident_commalist ')' */ -#line 544 "bison_parser.y" +#line 543 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateIndex); (yyval.create_stmt)->indexName = (yyvsp[-5].sval); @@ -3464,11 +3451,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->indexColumns = (yyvsp[-1].str_vec); } -#line 3468 "bison_parser.cpp" +#line 3455 "bison_parser.cpp" break; case 49: /* create_statement: CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement */ -#line 551 "bison_parser.y" +#line 550 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateView); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -3477,278 +3464,272 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3481 "bison_parser.cpp" +#line 3468 "bison_parser.cpp" break; case 50: /* opt_not_exists: IF NOT EXISTS */ -#line 562 "bison_parser.y" +#line 561 "bison_parser.y" { (yyval.bval) = true; } -#line 3487 "bison_parser.cpp" +#line 3474 "bison_parser.cpp" break; case 51: /* opt_not_exists: %empty */ -#line 563 "bison_parser.y" +#line 562 "bison_parser.y" { (yyval.bval) = false; } -#line 3493 "bison_parser.cpp" +#line 3480 "bison_parser.cpp" break; - case 52: /* column_def_commalist: column_def */ + case 52: /* table_elem_commalist: table_elem */ +#line 566 "bison_parser.y" + { (yyval.table_element_vec) = new std::vector(); (yyval.table_element_vec)->push_back((yyvsp[0].table_element_t)); } +#line 3486 "bison_parser.cpp" + break; + + case 53: /* table_elem_commalist: table_elem_commalist ',' table_elem */ #line 567 "bison_parser.y" - { (yyval.column_vec) = new std::vector(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); } -#line 3499 "bison_parser.cpp" + { (yyvsp[-2].table_element_vec)->push_back((yyvsp[0].table_element_t)); (yyval.table_element_vec) = (yyvsp[-2].table_element_vec); } +#line 3492 "bison_parser.cpp" break; - case 53: /* column_def_commalist: column_def_commalist ',' column_def */ -#line 568 "bison_parser.y" - { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } -#line 3505 "bison_parser.cpp" + case 54: /* table_elem: column_def */ +#line 571 "bison_parser.y" + { (yyval.table_element_t) = (yyvsp[0].column_t); } +#line 3498 "bison_parser.cpp" break; - case 54: /* column_def: IDENTIFIER column_type opt_column_nullable opt_column_constraint */ + case 55: /* table_elem: table_constraint */ #line 572 "bison_parser.y" + { (yyval.table_element_t) = (yyvsp[0].table_constraint_t); } +#line 3504 "bison_parser.cpp" + break; + + case 56: /* column_def: IDENTIFIER column_type opt_column_nullable opt_column_constraint */ +#line 576 "bison_parser.y" { (yyval.column_t) = new ColumnDefinition((yyvsp[-3].sval), (yyvsp[-2].column_type_t), (yyvsp[-1].bval), (yyvsp[0].column_constraint_t)); } -#line 3513 "bison_parser.cpp" +#line 3512 "bison_parser.cpp" break; - case 55: /* column_type: INT */ -#line 578 "bison_parser.y" + case 57: /* column_type: INT */ +#line 582 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3519 "bison_parser.cpp" +#line 3518 "bison_parser.cpp" break; - case 56: /* column_type: INTEGER */ -#line 579 "bison_parser.y" + case 58: /* column_type: INTEGER */ +#line 583 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3525 "bison_parser.cpp" +#line 3524 "bison_parser.cpp" break; - case 57: /* column_type: LONG */ -#line 580 "bison_parser.y" + case 59: /* column_type: LONG */ +#line 584 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::LONG}; } -#line 3531 "bison_parser.cpp" +#line 3530 "bison_parser.cpp" break; - case 58: /* column_type: FLOAT */ -#line 581 "bison_parser.y" + case 60: /* column_type: FLOAT */ +#line 585 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3537 "bison_parser.cpp" +#line 3536 "bison_parser.cpp" break; - case 59: /* column_type: DECIMAL opt_decimal_specification */ -#line 582 "bison_parser.y" + case 61: /* column_type: DECIMAL opt_decimal_specification */ +#line 586 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DECIMAL, 0, (yyvsp[0].column_specification_t)}; } -#line 3543 "bison_parser.cpp" +#line 3542 "bison_parser.cpp" break; - case 60: /* column_type: DOUBLE */ -#line 583 "bison_parser.y" + case 62: /* column_type: DOUBLE */ +#line 587 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } -#line 3549 "bison_parser.cpp" +#line 3548 "bison_parser.cpp" break; - case 61: /* column_type: REAL */ -#line 584 "bison_parser.y" + case 63: /* column_type: REAL */ +#line 588 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::REAL}; } -#line 3555 "bison_parser.cpp" +#line 3554 "bison_parser.cpp" break; - case 62: /* column_type: VARCHAR '(' INTVAL ')' */ -#line 585 "bison_parser.y" + case 64: /* column_type: VARCHAR '(' INTVAL ')' */ +#line 589 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3561 "bison_parser.cpp" +#line 3560 "bison_parser.cpp" break; - case 63: /* column_type: CHARACTER VARYING '(' INTVAL ')' */ -#line 586 "bison_parser.y" + case 65: /* column_type: CHARACTER VARYING '(' INTVAL ')' */ +#line 590 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR_VARYING, (yyvsp[-1].ival)}; } -#line 3567 "bison_parser.cpp" +#line 3566 "bison_parser.cpp" break; - case 64: /* column_type: CHAR '(' INTVAL ')' */ -#line 587 "bison_parser.y" + case 66: /* column_type: CHAR '(' INTVAL ')' */ +#line 591 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } -#line 3573 "bison_parser.cpp" +#line 3572 "bison_parser.cpp" break; - case 65: /* column_type: TEXT */ -#line 588 "bison_parser.y" + case 67: /* column_type: TEXT */ +#line 592 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } -#line 3579 "bison_parser.cpp" +#line 3578 "bison_parser.cpp" break; - case 66: /* column_type: TIME opt_time_specification */ -#line 589 "bison_parser.y" + case 68: /* column_type: TIME opt_time_specification */ +#line 593 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TIME, 0, (yyvsp[0].column_specification_t) }; } -#line 3585 "bison_parser.cpp" +#line 3584 "bison_parser.cpp" break; - case 67: /* column_type: DATETIME */ -#line 590 "bison_parser.y" + case 69: /* column_type: DATETIME */ +#line 594 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } -#line 3591 "bison_parser.cpp" +#line 3590 "bison_parser.cpp" break; - case 68: /* column_type: DATE */ -#line 591 "bison_parser.y" + case 70: /* column_type: DATE */ +#line 595 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATE}; } -#line 3597 "bison_parser.cpp" +#line 3596 "bison_parser.cpp" break; - case 69: /* opt_time_specification: '(' INTVAL ')' */ -#line 595 "bison_parser.y" + case 71: /* opt_time_specification: '(' INTVAL ')' */ +#line 599 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-1].ival)}; } -#line 3603 "bison_parser.cpp" +#line 3602 "bison_parser.cpp" break; - case 70: /* opt_time_specification: %empty */ -#line 596 "bison_parser.y" + case 72: /* opt_time_specification: %empty */ +#line 600 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{}; } -#line 3609 "bison_parser.cpp" +#line 3608 "bison_parser.cpp" break; - case 71: /* opt_decimal_specification: '(' INTVAL ',' INTVAL ')' */ -#line 600 "bison_parser.y" + case 73: /* opt_decimal_specification: '(' INTVAL ',' INTVAL ')' */ +#line 604 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-3].ival), (yyvsp[-1].ival)}; } -#line 3615 "bison_parser.cpp" +#line 3614 "bison_parser.cpp" break; - case 72: /* opt_decimal_specification: '(' INTVAL ')' */ -#line 601 "bison_parser.y" + case 74: /* opt_decimal_specification: '(' INTVAL ')' */ +#line 605 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-1].ival)}; } -#line 3621 "bison_parser.cpp" +#line 3620 "bison_parser.cpp" break; - case 73: /* opt_decimal_specification: %empty */ -#line 602 "bison_parser.y" + case 75: /* opt_decimal_specification: %empty */ +#line 606 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{}; } -#line 3627 "bison_parser.cpp" +#line 3626 "bison_parser.cpp" break; - case 74: /* opt_column_nullable: NULL */ -#line 606 "bison_parser.y" + case 76: /* opt_column_nullable: NULL */ +#line 610 "bison_parser.y" { (yyval.bval) = true; } -#line 3633 "bison_parser.cpp" +#line 3632 "bison_parser.cpp" break; - case 75: /* opt_column_nullable: NOT NULL */ -#line 607 "bison_parser.y" + case 77: /* opt_column_nullable: NOT NULL */ +#line 611 "bison_parser.y" { (yyval.bval) = false; } -#line 3639 "bison_parser.cpp" +#line 3638 "bison_parser.cpp" break; - case 76: /* opt_column_nullable: %empty */ -#line 608 "bison_parser.y" + case 78: /* opt_column_nullable: %empty */ +#line 612 "bison_parser.y" { (yyval.bval) = false; } -#line 3645 "bison_parser.cpp" +#line 3644 "bison_parser.cpp" break; - case 77: /* opt_column_constraint: PRIMARY KEY */ -#line 612 "bison_parser.y" + case 79: /* opt_column_constraint: PRIMARY KEY */ +#line 616 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::PRIMARY_KEY; } -#line 3651 "bison_parser.cpp" +#line 3650 "bison_parser.cpp" break; - case 78: /* opt_column_constraint: UNIQUE */ -#line 613 "bison_parser.y" + case 80: /* opt_column_constraint: UNIQUE */ +#line 617 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::UNIQUE; } -#line 3657 "bison_parser.cpp" - break; - - case 79: /* opt_column_constraint: %empty */ -#line 614 "bison_parser.y" - { (yyval.column_constraint_t) = ConstraintType::NOT_SET; } -#line 3663 "bison_parser.cpp" +#line 3656 "bison_parser.cpp" break; - case 80: /* opt_table_constraints: table_constraint */ + case 81: /* opt_column_constraint: %empty */ #line 618 "bison_parser.y" - {(yyval.table_constraint_vec) = new std::vector(); (yyval.table_constraint_vec)->push_back((yyvsp[0].table_constraint_t)); } -#line 3669 "bison_parser.cpp" - break; - - case 81: /* opt_table_constraints: opt_table_constraints table_constraint */ -#line 619 "bison_parser.y" - { (yyvsp[-1].table_constraint_vec)->push_back((yyvsp[0].table_constraint_t)); (yyval.table_constraint_vec) = (yyvsp[-1].table_constraint_vec); } -#line 3675 "bison_parser.cpp" - break; - - case 82: /* opt_table_constraints: %empty */ -#line 620 "bison_parser.y" - {(yyval.table_constraint_vec) = new std::vector(); } -#line 3681 "bison_parser.cpp" + { (yyval.column_constraint_t) = ConstraintType::NOT_SET; } +#line 3662 "bison_parser.cpp" break; - case 83: /* table_constraint: ',' PRIMARY KEY '(' ident_commalist ')' */ -#line 624 "bison_parser.y" - { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::PRIMARY_KEY, (yyvsp[-1].str_vec)); } -#line 3687 "bison_parser.cpp" + case 82: /* table_constraint: PRIMARY KEY '(' ident_commalist ')' */ +#line 622 "bison_parser.y" + { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::PRIMARY_KEY, (yyvsp[-1].str_vec)); } +#line 3668 "bison_parser.cpp" break; - case 84: /* table_constraint: ',' UNIQUE '(' ident_commalist ')' */ -#line 625 "bison_parser.y" - { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::UNIQUE, (yyvsp[-1].str_vec)); } -#line 3693 "bison_parser.cpp" + case 83: /* table_constraint: UNIQUE '(' ident_commalist ')' */ +#line 623 "bison_parser.y" + { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::UNIQUE, (yyvsp[-1].str_vec)); } +#line 3674 "bison_parser.cpp" break; - case 85: /* drop_statement: DROP TABLE opt_exists table_name */ -#line 633 "bison_parser.y" + case 84: /* drop_statement: DROP TABLE opt_exists table_name */ +#line 634 "bison_parser.y" { (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 3704 "bison_parser.cpp" +#line 3685 "bison_parser.cpp" break; - case 86: /* drop_statement: DROP VIEW opt_exists table_name */ -#line 639 "bison_parser.y" + case 85: /* drop_statement: DROP VIEW opt_exists table_name */ +#line 640 "bison_parser.y" { (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 3715 "bison_parser.cpp" +#line 3696 "bison_parser.cpp" break; - case 87: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ -#line 645 "bison_parser.y" + case 86: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ +#line 646 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); (yyval.drop_stmt)->ifExists = false; (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 3725 "bison_parser.cpp" +#line 3706 "bison_parser.cpp" break; - case 88: /* drop_statement: DROP INDEX opt_exists index_name ON table_name */ -#line 650 "bison_parser.y" + case 87: /* drop_statement: DROP INDEX opt_exists index_name ON table_name */ +#line 651 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropIndex); (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; (yyval.drop_stmt)->ifExists = (yyvsp[-3].bval); (yyval.drop_stmt)->indexName = (yyvsp[-2].sval); } -#line 3736 "bison_parser.cpp" +#line 3717 "bison_parser.cpp" break; - case 89: /* opt_exists: IF EXISTS */ -#line 659 "bison_parser.y" + case 88: /* opt_exists: IF EXISTS */ +#line 660 "bison_parser.y" { (yyval.bval) = true; } -#line 3742 "bison_parser.cpp" +#line 3723 "bison_parser.cpp" break; - case 90: /* opt_exists: %empty */ -#line 660 "bison_parser.y" + case 89: /* opt_exists: %empty */ +#line 661 "bison_parser.y" { (yyval.bval) = false; } -#line 3748 "bison_parser.cpp" +#line 3729 "bison_parser.cpp" break; - case 91: /* alter_statement: ALTER TABLE table_name DROP COLUMN opt_exists column_name */ -#line 669 "bison_parser.y" + case 90: /* alter_statement: ALTER TABLE table_name DROP COLUMN opt_exists column_name */ +#line 670 "bison_parser.y" { (yyval.alter_stmt) = new AlterStatement(kAlterDropColumn); (yyval.alter_stmt)->ifExists = (yyvsp[-1].bval); @@ -3756,32 +3737,32 @@ YYLTYPE yylloc = yyloc_default; (yyval.alter_stmt)->name = (yyvsp[-4].table_name).name; (yyval.alter_stmt)->columnName = (yyvsp[0].expr)->name; } -#line 3760 "bison_parser.cpp" +#line 3741 "bison_parser.cpp" break; - case 92: /* delete_statement: DELETE FROM table_name opt_where */ -#line 684 "bison_parser.y" + case 91: /* delete_statement: DELETE FROM table_name opt_where */ +#line 685 "bison_parser.y" { (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 3771 "bison_parser.cpp" +#line 3752 "bison_parser.cpp" break; - case 93: /* truncate_statement: TRUNCATE table_name */ -#line 693 "bison_parser.y" + case 92: /* truncate_statement: TRUNCATE table_name */ +#line 694 "bison_parser.y" { (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3781 "bison_parser.cpp" +#line 3762 "bison_parser.cpp" break; - case 94: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ -#line 706 "bison_parser.y" + case 93: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ +#line 707 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertValues); (yyval.insert_stmt)->schema = (yyvsp[-5].table_name).schema; @@ -3789,11 +3770,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } -#line 3793 "bison_parser.cpp" +#line 3774 "bison_parser.cpp" break; - case 95: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ -#line 713 "bison_parser.y" + case 94: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ +#line 714 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertSelect); (yyval.insert_stmt)->schema = (yyvsp[-2].table_name).schema; @@ -3801,74 +3782,74 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } -#line 3805 "bison_parser.cpp" +#line 3786 "bison_parser.cpp" break; - case 96: /* opt_column_list: '(' ident_commalist ')' */ -#line 724 "bison_parser.y" + case 95: /* opt_column_list: '(' ident_commalist ')' */ +#line 725 "bison_parser.y" { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 3811 "bison_parser.cpp" +#line 3792 "bison_parser.cpp" break; - case 97: /* opt_column_list: %empty */ -#line 725 "bison_parser.y" + case 96: /* opt_column_list: %empty */ +#line 726 "bison_parser.y" { (yyval.str_vec) = nullptr; } -#line 3817 "bison_parser.cpp" +#line 3798 "bison_parser.cpp" break; - case 98: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ -#line 735 "bison_parser.y" + case 97: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ +#line 736 "bison_parser.y" { (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 3828 "bison_parser.cpp" +#line 3809 "bison_parser.cpp" break; - case 99: /* update_clause_commalist: update_clause */ -#line 744 "bison_parser.y" + case 98: /* update_clause_commalist: update_clause */ +#line 745 "bison_parser.y" { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 3834 "bison_parser.cpp" +#line 3815 "bison_parser.cpp" break; - case 100: /* update_clause_commalist: update_clause_commalist ',' update_clause */ -#line 745 "bison_parser.y" + case 99: /* update_clause_commalist: update_clause_commalist ',' update_clause */ +#line 746 "bison_parser.y" { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 3840 "bison_parser.cpp" +#line 3821 "bison_parser.cpp" break; - case 101: /* update_clause: IDENTIFIER '=' expr */ -#line 749 "bison_parser.y" + case 100: /* update_clause: IDENTIFIER '=' expr */ +#line 750 "bison_parser.y" { (yyval.update_t) = new UpdateClause(); (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 3850 "bison_parser.cpp" +#line 3831 "bison_parser.cpp" break; - case 102: /* select_statement: opt_with_clause select_with_paren */ -#line 761 "bison_parser.y" + case 101: /* select_statement: opt_with_clause select_with_paren */ +#line 762 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3859 "bison_parser.cpp" +#line 3840 "bison_parser.cpp" break; - case 103: /* select_statement: opt_with_clause select_no_paren */ -#line 765 "bison_parser.y" + case 102: /* select_statement: opt_with_clause select_no_paren */ +#line 766 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3868 "bison_parser.cpp" +#line 3849 "bison_parser.cpp" break; - case 104: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ -#line 769 "bison_parser.y" + case 103: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ +#line 770 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3880,17 +3861,17 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); (yyval.select_stmt)->withDescriptions = (yyvsp[-5].with_description_vec); } -#line 3884 "bison_parser.cpp" +#line 3865 "bison_parser.cpp" break; - case 107: /* select_within_set_operation_no_parentheses: select_clause */ -#line 787 "bison_parser.y" + case 106: /* select_within_set_operation_no_parentheses: select_clause */ +#line 788 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); } -#line 3890 "bison_parser.cpp" +#line 3871 "bison_parser.cpp" break; - case 108: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ -#line 788 "bison_parser.y" + case 107: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ +#line 789 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3899,23 +3880,23 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->push_back((yyvsp[-1].set_operator_t)); (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[0].select_stmt); } -#line 3903 "bison_parser.cpp" +#line 3884 "bison_parser.cpp" break; - case 109: /* select_with_paren: '(' select_no_paren ')' */ -#line 799 "bison_parser.y" + case 108: /* select_with_paren: '(' select_no_paren ')' */ +#line 800 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3909 "bison_parser.cpp" +#line 3890 "bison_parser.cpp" break; - case 110: /* select_with_paren: '(' select_with_paren ')' */ -#line 800 "bison_parser.y" + case 109: /* select_with_paren: '(' select_with_paren ')' */ +#line 801 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3915 "bison_parser.cpp" +#line 3896 "bison_parser.cpp" break; - case 111: /* select_no_paren: select_clause opt_order opt_limit */ -#line 804 "bison_parser.y" + case 110: /* select_no_paren: select_clause opt_order opt_limit */ +#line 805 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); (yyval.select_stmt)->order = (yyvsp[-1].order_vec); @@ -3926,11 +3907,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3930 "bison_parser.cpp" +#line 3911 "bison_parser.cpp" break; - case 112: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ -#line 814 "bison_parser.y" + case 111: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ +#line 815 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3941,63 +3922,63 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); } -#line 3945 "bison_parser.cpp" +#line 3926 "bison_parser.cpp" break; - case 113: /* set_operator: set_type opt_all */ -#line 827 "bison_parser.y" + case 112: /* set_operator: set_type opt_all */ +#line 828 "bison_parser.y" { (yyval.set_operator_t) = (yyvsp[-1].set_operator_t); (yyval.set_operator_t)->isAll = (yyvsp[0].bval); } -#line 3954 "bison_parser.cpp" +#line 3935 "bison_parser.cpp" break; - case 114: /* set_type: UNION */ -#line 834 "bison_parser.y" + case 113: /* set_type: UNION */ +#line 835 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetUnion; } -#line 3963 "bison_parser.cpp" +#line 3944 "bison_parser.cpp" break; - case 115: /* set_type: INTERSECT */ -#line 838 "bison_parser.y" + case 114: /* set_type: INTERSECT */ +#line 839 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetIntersect; } -#line 3972 "bison_parser.cpp" +#line 3953 "bison_parser.cpp" break; - case 116: /* set_type: EXCEPT */ -#line 842 "bison_parser.y" + case 115: /* set_type: EXCEPT */ +#line 843 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetExcept; } -#line 3981 "bison_parser.cpp" +#line 3962 "bison_parser.cpp" break; - case 117: /* opt_all: ALL */ -#line 849 "bison_parser.y" + case 116: /* opt_all: ALL */ +#line 850 "bison_parser.y" { (yyval.bval) = true; } -#line 3989 "bison_parser.cpp" +#line 3970 "bison_parser.cpp" break; - case 118: /* opt_all: %empty */ -#line 852 "bison_parser.y" + case 117: /* opt_all: %empty */ +#line 853 "bison_parser.y" { (yyval.bval) = false; } -#line 3997 "bison_parser.cpp" +#line 3978 "bison_parser.cpp" break; - case 119: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ -#line 858 "bison_parser.y" + case 118: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ +#line 859 "bison_parser.y" { (yyval.select_stmt) = new SelectStatement(); (yyval.select_stmt)->limit = (yyvsp[-5].limit); @@ -4007,213 +3988,213 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 4011 "bison_parser.cpp" +#line 3992 "bison_parser.cpp" break; - case 120: /* opt_distinct: DISTINCT */ -#line 870 "bison_parser.y" + case 119: /* opt_distinct: DISTINCT */ +#line 871 "bison_parser.y" { (yyval.bval) = true; } -#line 4017 "bison_parser.cpp" +#line 3998 "bison_parser.cpp" break; - case 121: /* opt_distinct: %empty */ -#line 871 "bison_parser.y" + case 120: /* opt_distinct: %empty */ +#line 872 "bison_parser.y" { (yyval.bval) = false; } -#line 4023 "bison_parser.cpp" +#line 4004 "bison_parser.cpp" break; - case 123: /* opt_from_clause: from_clause */ -#line 879 "bison_parser.y" + case 122: /* opt_from_clause: from_clause */ +#line 880 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 4029 "bison_parser.cpp" +#line 4010 "bison_parser.cpp" break; - case 124: /* opt_from_clause: %empty */ -#line 880 "bison_parser.y" + case 123: /* opt_from_clause: %empty */ +#line 881 "bison_parser.y" { (yyval.table) = nullptr; } -#line 4035 "bison_parser.cpp" +#line 4016 "bison_parser.cpp" break; - case 125: /* from_clause: FROM table_ref */ -#line 884 "bison_parser.y" + case 124: /* from_clause: FROM table_ref */ +#line 885 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 4041 "bison_parser.cpp" +#line 4022 "bison_parser.cpp" break; - case 126: /* opt_where: WHERE expr */ -#line 889 "bison_parser.y" + case 125: /* opt_where: WHERE expr */ +#line 890 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 4047 "bison_parser.cpp" +#line 4028 "bison_parser.cpp" break; - case 127: /* opt_where: %empty */ -#line 890 "bison_parser.y" + case 126: /* opt_where: %empty */ +#line 891 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 4053 "bison_parser.cpp" +#line 4034 "bison_parser.cpp" break; - case 128: /* opt_group: GROUP BY expr_list opt_having */ -#line 894 "bison_parser.y" + case 127: /* opt_group: GROUP BY expr_list opt_having */ +#line 895 "bison_parser.y" { (yyval.group_t) = new GroupByDescription(); (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 4063 "bison_parser.cpp" +#line 4044 "bison_parser.cpp" break; - case 129: /* opt_group: %empty */ -#line 899 "bison_parser.y" + case 128: /* opt_group: %empty */ +#line 900 "bison_parser.y" { (yyval.group_t) = nullptr; } -#line 4069 "bison_parser.cpp" +#line 4050 "bison_parser.cpp" break; - case 130: /* opt_having: HAVING expr */ -#line 903 "bison_parser.y" + case 129: /* opt_having: HAVING expr */ +#line 904 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 4075 "bison_parser.cpp" +#line 4056 "bison_parser.cpp" break; - case 131: /* opt_having: %empty */ -#line 904 "bison_parser.y" + case 130: /* opt_having: %empty */ +#line 905 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 4081 "bison_parser.cpp" +#line 4062 "bison_parser.cpp" break; - case 132: /* opt_order: ORDER BY order_list */ -#line 908 "bison_parser.y" + case 131: /* opt_order: ORDER BY order_list */ +#line 909 "bison_parser.y" { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 4087 "bison_parser.cpp" +#line 4068 "bison_parser.cpp" break; - case 133: /* opt_order: %empty */ -#line 909 "bison_parser.y" + case 132: /* opt_order: %empty */ +#line 910 "bison_parser.y" { (yyval.order_vec) = nullptr; } -#line 4093 "bison_parser.cpp" +#line 4074 "bison_parser.cpp" break; - case 134: /* order_list: order_desc */ -#line 913 "bison_parser.y" + case 133: /* order_list: order_desc */ +#line 914 "bison_parser.y" { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 4099 "bison_parser.cpp" +#line 4080 "bison_parser.cpp" break; - case 135: /* order_list: order_list ',' order_desc */ -#line 914 "bison_parser.y" + case 134: /* order_list: order_list ',' order_desc */ +#line 915 "bison_parser.y" { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 4105 "bison_parser.cpp" +#line 4086 "bison_parser.cpp" break; - case 136: /* order_desc: expr opt_order_type */ -#line 918 "bison_parser.y" + case 135: /* order_desc: expr opt_order_type */ +#line 919 "bison_parser.y" { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 4111 "bison_parser.cpp" +#line 4092 "bison_parser.cpp" break; - case 137: /* opt_order_type: ASC */ -#line 922 "bison_parser.y" + case 136: /* opt_order_type: ASC */ +#line 923 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 4117 "bison_parser.cpp" +#line 4098 "bison_parser.cpp" break; - case 138: /* opt_order_type: DESC */ -#line 923 "bison_parser.y" + case 137: /* opt_order_type: DESC */ +#line 924 "bison_parser.y" { (yyval.order_type) = kOrderDesc; } -#line 4123 "bison_parser.cpp" +#line 4104 "bison_parser.cpp" break; - case 139: /* opt_order_type: %empty */ -#line 924 "bison_parser.y" + case 138: /* opt_order_type: %empty */ +#line 925 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 4129 "bison_parser.cpp" +#line 4110 "bison_parser.cpp" break; - case 140: /* opt_top: TOP int_literal */ -#line 930 "bison_parser.y" + case 139: /* opt_top: TOP int_literal */ +#line 931 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 4135 "bison_parser.cpp" +#line 4116 "bison_parser.cpp" break; - case 141: /* opt_top: %empty */ -#line 931 "bison_parser.y" + case 140: /* opt_top: %empty */ +#line 932 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 4141 "bison_parser.cpp" +#line 4122 "bison_parser.cpp" break; - case 142: /* opt_limit: LIMIT expr */ -#line 935 "bison_parser.y" + case 141: /* opt_limit: LIMIT expr */ +#line 936 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 4147 "bison_parser.cpp" +#line 4128 "bison_parser.cpp" break; - case 143: /* opt_limit: OFFSET expr */ -#line 936 "bison_parser.y" + case 142: /* opt_limit: OFFSET expr */ +#line 937 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 4153 "bison_parser.cpp" +#line 4134 "bison_parser.cpp" break; - case 144: /* opt_limit: LIMIT expr OFFSET expr */ -#line 937 "bison_parser.y" + case 143: /* opt_limit: LIMIT expr OFFSET expr */ +#line 938 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4159 "bison_parser.cpp" +#line 4140 "bison_parser.cpp" break; - case 145: /* opt_limit: LIMIT ALL */ -#line 938 "bison_parser.y" + case 144: /* opt_limit: LIMIT ALL */ +#line 939 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, nullptr); } -#line 4165 "bison_parser.cpp" +#line 4146 "bison_parser.cpp" break; - case 146: /* opt_limit: LIMIT ALL OFFSET expr */ -#line 939 "bison_parser.y" + case 145: /* opt_limit: LIMIT ALL OFFSET expr */ +#line 940 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 4171 "bison_parser.cpp" +#line 4152 "bison_parser.cpp" break; - case 147: /* opt_limit: %empty */ -#line 940 "bison_parser.y" + case 146: /* opt_limit: %empty */ +#line 941 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 4177 "bison_parser.cpp" +#line 4158 "bison_parser.cpp" break; - case 148: /* expr_list: expr_alias */ -#line 947 "bison_parser.y" + case 147: /* expr_list: expr_alias */ +#line 948 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4183 "bison_parser.cpp" +#line 4164 "bison_parser.cpp" break; - case 149: /* expr_list: expr_list ',' expr_alias */ -#line 948 "bison_parser.y" + case 148: /* expr_list: expr_list ',' expr_alias */ +#line 949 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4189 "bison_parser.cpp" +#line 4170 "bison_parser.cpp" break; - case 150: /* opt_literal_list: literal_list */ -#line 952 "bison_parser.y" + case 149: /* opt_literal_list: literal_list */ +#line 953 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[0].expr_vec); } -#line 4195 "bison_parser.cpp" +#line 4176 "bison_parser.cpp" break; - case 151: /* opt_literal_list: %empty */ -#line 953 "bison_parser.y" + case 150: /* opt_literal_list: %empty */ +#line 954 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 4201 "bison_parser.cpp" +#line 4182 "bison_parser.cpp" break; - case 152: /* literal_list: literal */ -#line 957 "bison_parser.y" + case 151: /* literal_list: literal */ +#line 958 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4207 "bison_parser.cpp" +#line 4188 "bison_parser.cpp" break; - case 153: /* literal_list: literal_list ',' literal */ -#line 958 "bison_parser.y" + case 152: /* literal_list: literal_list ',' literal */ +#line 959 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4213 "bison_parser.cpp" +#line 4194 "bison_parser.cpp" break; - case 154: /* expr_alias: expr opt_alias */ -#line 962 "bison_parser.y" + case 153: /* expr_alias: expr opt_alias */ +#line 963 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); if ((yyvsp[0].alias_t)) { @@ -4221,421 +4202,421 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].alias_t); } } -#line 4225 "bison_parser.cpp" +#line 4206 "bison_parser.cpp" break; - case 160: /* operand: '(' expr ')' */ -#line 980 "bison_parser.y" + case 159: /* operand: '(' expr ')' */ +#line 981 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); } -#line 4231 "bison_parser.cpp" +#line 4212 "bison_parser.cpp" break; - case 170: /* operand: '(' select_no_paren ')' */ -#line 990 "bison_parser.y" + case 169: /* operand: '(' select_no_paren ')' */ +#line 991 "bison_parser.y" { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 4237 "bison_parser.cpp" +#line 4218 "bison_parser.cpp" break; - case 173: /* unary_expr: '-' operand */ -#line 999 "bison_parser.y" + case 172: /* unary_expr: '-' operand */ +#line 1000 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 4243 "bison_parser.cpp" +#line 4224 "bison_parser.cpp" break; - case 174: /* unary_expr: NOT operand */ -#line 1000 "bison_parser.y" + case 173: /* unary_expr: NOT operand */ +#line 1001 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 4249 "bison_parser.cpp" +#line 4230 "bison_parser.cpp" break; - case 175: /* unary_expr: operand ISNULL */ -#line 1001 "bison_parser.y" + case 174: /* unary_expr: operand ISNULL */ +#line 1002 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 4255 "bison_parser.cpp" +#line 4236 "bison_parser.cpp" break; - case 176: /* unary_expr: operand IS NULL */ -#line 1002 "bison_parser.y" + case 175: /* unary_expr: operand IS NULL */ +#line 1003 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 4261 "bison_parser.cpp" +#line 4242 "bison_parser.cpp" break; - case 177: /* unary_expr: operand IS NOT NULL */ -#line 1003 "bison_parser.y" + case 176: /* unary_expr: operand IS NOT NULL */ +#line 1004 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 4267 "bison_parser.cpp" +#line 4248 "bison_parser.cpp" break; - case 179: /* binary_expr: operand '-' operand */ -#line 1008 "bison_parser.y" + case 178: /* binary_expr: operand '-' operand */ +#line 1009 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 4273 "bison_parser.cpp" +#line 4254 "bison_parser.cpp" break; - case 180: /* binary_expr: operand '+' operand */ -#line 1009 "bison_parser.y" + case 179: /* binary_expr: operand '+' operand */ +#line 1010 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 4279 "bison_parser.cpp" +#line 4260 "bison_parser.cpp" break; - case 181: /* binary_expr: operand '/' operand */ -#line 1010 "bison_parser.y" + case 180: /* binary_expr: operand '/' operand */ +#line 1011 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 4285 "bison_parser.cpp" +#line 4266 "bison_parser.cpp" break; - case 182: /* binary_expr: operand '*' operand */ -#line 1011 "bison_parser.y" + case 181: /* binary_expr: operand '*' operand */ +#line 1012 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 4291 "bison_parser.cpp" +#line 4272 "bison_parser.cpp" break; - case 183: /* binary_expr: operand '%' operand */ -#line 1012 "bison_parser.y" + case 182: /* binary_expr: operand '%' operand */ +#line 1013 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 4297 "bison_parser.cpp" +#line 4278 "bison_parser.cpp" break; - case 184: /* binary_expr: operand '^' operand */ -#line 1013 "bison_parser.y" + case 183: /* binary_expr: operand '^' operand */ +#line 1014 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 4303 "bison_parser.cpp" +#line 4284 "bison_parser.cpp" break; - case 185: /* binary_expr: operand LIKE operand */ -#line 1014 "bison_parser.y" + case 184: /* binary_expr: operand LIKE operand */ +#line 1015 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 4309 "bison_parser.cpp" +#line 4290 "bison_parser.cpp" break; - case 186: /* binary_expr: operand NOT LIKE operand */ -#line 1015 "bison_parser.y" + case 185: /* binary_expr: operand NOT LIKE operand */ +#line 1016 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 4315 "bison_parser.cpp" +#line 4296 "bison_parser.cpp" break; - case 187: /* binary_expr: operand ILIKE operand */ -#line 1016 "bison_parser.y" + case 186: /* binary_expr: operand ILIKE operand */ +#line 1017 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 4321 "bison_parser.cpp" +#line 4302 "bison_parser.cpp" break; - case 188: /* binary_expr: operand CONCAT operand */ -#line 1017 "bison_parser.y" + case 187: /* binary_expr: operand CONCAT operand */ +#line 1018 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 4327 "bison_parser.cpp" +#line 4308 "bison_parser.cpp" break; - case 189: /* logic_expr: expr AND expr */ -#line 1021 "bison_parser.y" + case 188: /* logic_expr: expr AND expr */ +#line 1022 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 4333 "bison_parser.cpp" +#line 4314 "bison_parser.cpp" break; - case 190: /* logic_expr: expr OR expr */ -#line 1022 "bison_parser.y" + case 189: /* logic_expr: expr OR expr */ +#line 1023 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 4339 "bison_parser.cpp" +#line 4320 "bison_parser.cpp" break; - case 191: /* in_expr: operand IN '(' expr_list ')' */ -#line 1026 "bison_parser.y" + case 190: /* in_expr: operand IN '(' expr_list ')' */ +#line 1027 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 4345 "bison_parser.cpp" +#line 4326 "bison_parser.cpp" break; - case 192: /* in_expr: operand NOT IN '(' expr_list ')' */ -#line 1027 "bison_parser.y" + case 191: /* in_expr: operand NOT IN '(' expr_list ')' */ +#line 1028 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 4351 "bison_parser.cpp" +#line 4332 "bison_parser.cpp" break; - case 193: /* in_expr: operand IN '(' select_no_paren ')' */ -#line 1028 "bison_parser.y" + case 192: /* in_expr: operand IN '(' select_no_paren ')' */ +#line 1029 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 4357 "bison_parser.cpp" +#line 4338 "bison_parser.cpp" break; - case 194: /* in_expr: operand NOT IN '(' select_no_paren ')' */ -#line 1029 "bison_parser.y" + case 193: /* in_expr: operand NOT IN '(' select_no_paren ')' */ +#line 1030 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 4363 "bison_parser.cpp" +#line 4344 "bison_parser.cpp" break; - case 195: /* case_expr: CASE expr case_list END */ -#line 1035 "bison_parser.y" + case 194: /* case_expr: CASE expr case_list END */ +#line 1036 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } -#line 4369 "bison_parser.cpp" +#line 4350 "bison_parser.cpp" break; - case 196: /* case_expr: CASE expr case_list ELSE expr END */ -#line 1036 "bison_parser.y" + case 195: /* case_expr: CASE expr case_list ELSE expr END */ +#line 1037 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4375 "bison_parser.cpp" +#line 4356 "bison_parser.cpp" break; - case 197: /* case_expr: CASE case_list END */ -#line 1037 "bison_parser.y" + case 196: /* case_expr: CASE case_list END */ +#line 1038 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } -#line 4381 "bison_parser.cpp" +#line 4362 "bison_parser.cpp" break; - case 198: /* case_expr: CASE case_list ELSE expr END */ -#line 1038 "bison_parser.y" + case 197: /* case_expr: CASE case_list ELSE expr END */ +#line 1039 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4387 "bison_parser.cpp" +#line 4368 "bison_parser.cpp" break; - case 199: /* case_list: WHEN expr THEN expr */ -#line 1042 "bison_parser.y" + case 198: /* case_list: WHEN expr THEN expr */ +#line 1043 "bison_parser.y" { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4393 "bison_parser.cpp" +#line 4374 "bison_parser.cpp" break; - case 200: /* case_list: case_list WHEN expr THEN expr */ -#line 1043 "bison_parser.y" + case 199: /* case_list: case_list WHEN expr THEN expr */ +#line 1044 "bison_parser.y" { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4399 "bison_parser.cpp" +#line 4380 "bison_parser.cpp" break; - case 201: /* exists_expr: EXISTS '(' select_no_paren ')' */ -#line 1047 "bison_parser.y" + case 200: /* exists_expr: EXISTS '(' select_no_paren ')' */ +#line 1048 "bison_parser.y" { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 4405 "bison_parser.cpp" +#line 4386 "bison_parser.cpp" break; - case 202: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ -#line 1048 "bison_parser.y" + case 201: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ +#line 1049 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 4411 "bison_parser.cpp" +#line 4392 "bison_parser.cpp" break; - case 203: /* comp_expr: operand '=' operand */ -#line 1052 "bison_parser.y" + case 202: /* comp_expr: operand '=' operand */ +#line 1053 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4417 "bison_parser.cpp" +#line 4398 "bison_parser.cpp" break; - case 204: /* comp_expr: operand EQUALS operand */ -#line 1053 "bison_parser.y" + case 203: /* comp_expr: operand EQUALS operand */ +#line 1054 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4423 "bison_parser.cpp" +#line 4404 "bison_parser.cpp" break; - case 205: /* comp_expr: operand NOTEQUALS operand */ -#line 1054 "bison_parser.y" + case 204: /* comp_expr: operand NOTEQUALS operand */ +#line 1055 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 4429 "bison_parser.cpp" +#line 4410 "bison_parser.cpp" break; - case 206: /* comp_expr: operand '<' operand */ -#line 1055 "bison_parser.y" + case 205: /* comp_expr: operand '<' operand */ +#line 1056 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 4435 "bison_parser.cpp" +#line 4416 "bison_parser.cpp" break; - case 207: /* comp_expr: operand '>' operand */ -#line 1056 "bison_parser.y" + case 206: /* comp_expr: operand '>' operand */ +#line 1057 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 4441 "bison_parser.cpp" +#line 4422 "bison_parser.cpp" break; - case 208: /* comp_expr: operand LESSEQ operand */ -#line 1057 "bison_parser.y" + case 207: /* comp_expr: operand LESSEQ operand */ +#line 1058 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 4447 "bison_parser.cpp" +#line 4428 "bison_parser.cpp" break; - case 209: /* comp_expr: operand GREATEREQ operand */ -#line 1058 "bison_parser.y" + case 208: /* comp_expr: operand GREATEREQ operand */ +#line 1059 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 4453 "bison_parser.cpp" +#line 4434 "bison_parser.cpp" break; - case 210: /* function_expr: IDENTIFIER '(' ')' */ -#line 1062 "bison_parser.y" + case 209: /* function_expr: IDENTIFIER '(' ')' */ +#line 1063 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 4459 "bison_parser.cpp" +#line 4440 "bison_parser.cpp" break; - case 211: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ -#line 1063 "bison_parser.y" + case 210: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ +#line 1064 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 4465 "bison_parser.cpp" +#line 4446 "bison_parser.cpp" break; - case 212: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ -#line 1067 "bison_parser.y" + case 211: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ +#line 1068 "bison_parser.y" { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } -#line 4471 "bison_parser.cpp" +#line 4452 "bison_parser.cpp" break; - case 213: /* cast_expr: CAST '(' expr AS column_type ')' */ -#line 1071 "bison_parser.y" + case 212: /* cast_expr: CAST '(' expr AS column_type ')' */ +#line 1072 "bison_parser.y" { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } -#line 4477 "bison_parser.cpp" +#line 4458 "bison_parser.cpp" break; - case 214: /* datetime_field: SECOND */ -#line 1075 "bison_parser.y" + case 213: /* datetime_field: SECOND */ +#line 1076 "bison_parser.y" { (yyval.datetime_field) = kDatetimeSecond; } -#line 4483 "bison_parser.cpp" +#line 4464 "bison_parser.cpp" break; - case 215: /* datetime_field: MINUTE */ -#line 1076 "bison_parser.y" + case 214: /* datetime_field: MINUTE */ +#line 1077 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMinute; } -#line 4489 "bison_parser.cpp" +#line 4470 "bison_parser.cpp" break; - case 216: /* datetime_field: HOUR */ -#line 1077 "bison_parser.y" + case 215: /* datetime_field: HOUR */ +#line 1078 "bison_parser.y" { (yyval.datetime_field) = kDatetimeHour; } -#line 4495 "bison_parser.cpp" +#line 4476 "bison_parser.cpp" break; - case 217: /* datetime_field: DAY */ -#line 1078 "bison_parser.y" + case 216: /* datetime_field: DAY */ +#line 1079 "bison_parser.y" { (yyval.datetime_field) = kDatetimeDay; } -#line 4501 "bison_parser.cpp" +#line 4482 "bison_parser.cpp" break; - case 218: /* datetime_field: MONTH */ -#line 1079 "bison_parser.y" + case 217: /* datetime_field: MONTH */ +#line 1080 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMonth; } -#line 4507 "bison_parser.cpp" +#line 4488 "bison_parser.cpp" break; - case 219: /* datetime_field: YEAR */ -#line 1080 "bison_parser.y" + case 218: /* datetime_field: YEAR */ +#line 1081 "bison_parser.y" { (yyval.datetime_field) = kDatetimeYear; } -#line 4513 "bison_parser.cpp" +#line 4494 "bison_parser.cpp" break; - case 220: /* array_expr: ARRAY '[' expr_list ']' */ -#line 1084 "bison_parser.y" + case 219: /* array_expr: ARRAY '[' expr_list ']' */ +#line 1085 "bison_parser.y" { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 4519 "bison_parser.cpp" +#line 4500 "bison_parser.cpp" break; - case 221: /* array_index: operand '[' int_literal ']' */ -#line 1088 "bison_parser.y" + case 220: /* array_index: operand '[' int_literal ']' */ +#line 1089 "bison_parser.y" { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 4525 "bison_parser.cpp" +#line 4506 "bison_parser.cpp" break; - case 222: /* between_expr: operand BETWEEN operand AND operand */ -#line 1092 "bison_parser.y" + case 221: /* between_expr: operand BETWEEN operand AND operand */ +#line 1093 "bison_parser.y" { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4531 "bison_parser.cpp" +#line 4512 "bison_parser.cpp" break; - case 223: /* column_name: IDENTIFIER */ -#line 1096 "bison_parser.y" + case 222: /* column_name: IDENTIFIER */ +#line 1097 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 4537 "bison_parser.cpp" +#line 4518 "bison_parser.cpp" break; - case 224: /* column_name: IDENTIFIER '.' IDENTIFIER */ -#line 1097 "bison_parser.y" + case 223: /* column_name: IDENTIFIER '.' IDENTIFIER */ +#line 1098 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 4543 "bison_parser.cpp" +#line 4524 "bison_parser.cpp" break; - case 225: /* column_name: '*' */ -#line 1098 "bison_parser.y" + case 224: /* column_name: '*' */ +#line 1099 "bison_parser.y" { (yyval.expr) = Expr::makeStar(); } -#line 4549 "bison_parser.cpp" +#line 4530 "bison_parser.cpp" break; - case 226: /* column_name: IDENTIFIER '.' '*' */ -#line 1099 "bison_parser.y" + case 225: /* column_name: IDENTIFIER '.' '*' */ +#line 1100 "bison_parser.y" { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 4555 "bison_parser.cpp" +#line 4536 "bison_parser.cpp" break; - case 232: /* string_literal: STRING */ -#line 1111 "bison_parser.y" + case 231: /* string_literal: STRING */ +#line 1112 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 4561 "bison_parser.cpp" +#line 4542 "bison_parser.cpp" break; - case 233: /* bool_literal: TRUE */ -#line 1115 "bison_parser.y" + case 232: /* bool_literal: TRUE */ +#line 1116 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(true); } -#line 4567 "bison_parser.cpp" +#line 4548 "bison_parser.cpp" break; - case 234: /* bool_literal: FALSE */ -#line 1116 "bison_parser.y" + case 233: /* bool_literal: FALSE */ +#line 1117 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(false); } -#line 4573 "bison_parser.cpp" +#line 4554 "bison_parser.cpp" break; - case 235: /* num_literal: FLOATVAL */ -#line 1120 "bison_parser.y" + case 234: /* num_literal: FLOATVAL */ +#line 1121 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 4579 "bison_parser.cpp" +#line 4560 "bison_parser.cpp" break; - case 237: /* int_literal: INTVAL */ -#line 1125 "bison_parser.y" + case 236: /* int_literal: INTVAL */ +#line 1126 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 4585 "bison_parser.cpp" +#line 4566 "bison_parser.cpp" break; - case 238: /* null_literal: NULL */ -#line 1129 "bison_parser.y" + case 237: /* null_literal: NULL */ +#line 1130 "bison_parser.y" { (yyval.expr) = Expr::makeNullLiteral(); } -#line 4591 "bison_parser.cpp" +#line 4572 "bison_parser.cpp" break; - case 239: /* param_expr: '?' */ -#line 1133 "bison_parser.y" + case 238: /* param_expr: '?' */ +#line 1134 "bison_parser.y" { (yyval.expr) = Expr::makeParameter(yylloc.total_column); (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 4601 "bison_parser.cpp" +#line 4582 "bison_parser.cpp" break; - case 241: /* table_ref: table_ref_commalist ',' table_ref_atomic */ -#line 1146 "bison_parser.y" + case 240: /* table_ref: table_ref_commalist ',' table_ref_atomic */ +#line 1147 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); auto tbl = new TableRef(kTableCrossProduct); tbl->list = (yyvsp[-2].table_vec); (yyval.table) = tbl; } -#line 4612 "bison_parser.cpp" +#line 4593 "bison_parser.cpp" break; - case 245: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ -#line 1162 "bison_parser.y" + case 244: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ +#line 1163 "bison_parser.y" { auto tbl = new TableRef(kTableSelect); tbl->select = (yyvsp[-2].select_stmt); tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4623 "bison_parser.cpp" +#line 4604 "bison_parser.cpp" break; - case 246: /* table_ref_commalist: table_ref_atomic */ -#line 1171 "bison_parser.y" + case 245: /* table_ref_commalist: table_ref_atomic */ +#line 1172 "bison_parser.y" { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 4629 "bison_parser.cpp" +#line 4610 "bison_parser.cpp" break; - case 247: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ -#line 1172 "bison_parser.y" + case 246: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ +#line 1173 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 4635 "bison_parser.cpp" +#line 4616 "bison_parser.cpp" break; - case 248: /* table_ref_name: table_name opt_table_alias */ -#line 1177 "bison_parser.y" + case 247: /* table_ref_name: table_name opt_table_alias */ +#line 1178 "bison_parser.y" { auto tbl = new TableRef(kTableName); tbl->schema = (yyvsp[-1].table_name).schema; @@ -4643,121 +4624,121 @@ YYLTYPE yylloc = yyloc_default; tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4647 "bison_parser.cpp" +#line 4628 "bison_parser.cpp" break; - case 249: /* table_ref_name_no_alias: table_name */ -#line 1188 "bison_parser.y" + case 248: /* table_ref_name_no_alias: table_name */ +#line 1189 "bison_parser.y" { (yyval.table) = new TableRef(kTableName); (yyval.table)->schema = (yyvsp[0].table_name).schema; (yyval.table)->name = (yyvsp[0].table_name).name; } -#line 4657 "bison_parser.cpp" +#line 4638 "bison_parser.cpp" break; - case 250: /* table_name: IDENTIFIER */ -#line 1197 "bison_parser.y" + case 249: /* table_name: IDENTIFIER */ +#line 1198 "bison_parser.y" { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} -#line 4663 "bison_parser.cpp" +#line 4644 "bison_parser.cpp" break; - case 251: /* table_name: IDENTIFIER '.' IDENTIFIER */ -#line 1198 "bison_parser.y" + case 250: /* table_name: IDENTIFIER '.' IDENTIFIER */ +#line 1199 "bison_parser.y" { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } -#line 4669 "bison_parser.cpp" +#line 4650 "bison_parser.cpp" break; - case 252: /* opt_index_name: IDENTIFIER */ -#line 1202 "bison_parser.y" + case 251: /* opt_index_name: IDENTIFIER */ +#line 1203 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4675 "bison_parser.cpp" +#line 4656 "bison_parser.cpp" break; - case 253: /* opt_index_name: %empty */ -#line 1203 "bison_parser.y" + case 252: /* opt_index_name: %empty */ +#line 1204 "bison_parser.y" { (yyval.sval) = nullptr;} -#line 4681 "bison_parser.cpp" +#line 4662 "bison_parser.cpp" break; - case 254: /* index_name: IDENTIFIER */ -#line 1207 "bison_parser.y" + case 253: /* index_name: IDENTIFIER */ +#line 1208 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4687 "bison_parser.cpp" +#line 4668 "bison_parser.cpp" break; - case 256: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ -#line 1213 "bison_parser.y" + case 255: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ +#line 1214 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } -#line 4693 "bison_parser.cpp" +#line 4674 "bison_parser.cpp" break; - case 258: /* opt_table_alias: %empty */ -#line 1219 "bison_parser.y" + case 257: /* opt_table_alias: %empty */ +#line 1220 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4699 "bison_parser.cpp" +#line 4680 "bison_parser.cpp" break; - case 259: /* alias: AS IDENTIFIER */ -#line 1224 "bison_parser.y" + case 258: /* alias: AS IDENTIFIER */ +#line 1225 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4705 "bison_parser.cpp" +#line 4686 "bison_parser.cpp" break; - case 260: /* alias: IDENTIFIER */ -#line 1225 "bison_parser.y" + case 259: /* alias: IDENTIFIER */ +#line 1226 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4711 "bison_parser.cpp" +#line 4692 "bison_parser.cpp" break; - case 262: /* opt_alias: %empty */ -#line 1231 "bison_parser.y" + case 261: /* opt_alias: %empty */ +#line 1232 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4717 "bison_parser.cpp" +#line 4698 "bison_parser.cpp" break; - case 264: /* opt_with_clause: %empty */ -#line 1241 "bison_parser.y" + case 263: /* opt_with_clause: %empty */ +#line 1242 "bison_parser.y" { (yyval.with_description_vec) = nullptr; } -#line 4723 "bison_parser.cpp" +#line 4704 "bison_parser.cpp" break; - case 265: /* with_clause: WITH with_description_list */ -#line 1245 "bison_parser.y" + case 264: /* with_clause: WITH with_description_list */ +#line 1246 "bison_parser.y" { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } -#line 4729 "bison_parser.cpp" +#line 4710 "bison_parser.cpp" break; - case 266: /* with_description_list: with_description */ -#line 1249 "bison_parser.y" + case 265: /* with_description_list: with_description */ +#line 1250 "bison_parser.y" { (yyval.with_description_vec) = new std::vector(); (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); } -#line 4738 "bison_parser.cpp" +#line 4719 "bison_parser.cpp" break; - case 267: /* with_description_list: with_description_list ',' with_description */ -#line 1253 "bison_parser.y" + case 266: /* with_description_list: with_description_list ',' with_description */ +#line 1254 "bison_parser.y" { (yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t)); (yyval.with_description_vec) = (yyvsp[-2].with_description_vec); } -#line 4747 "bison_parser.cpp" +#line 4728 "bison_parser.cpp" break; - case 268: /* with_description: IDENTIFIER AS select_with_paren */ -#line 1260 "bison_parser.y" + case 267: /* with_description: IDENTIFIER AS select_with_paren */ +#line 1261 "bison_parser.y" { (yyval.with_description_t) = new WithDescription(); (yyval.with_description_t)->alias = (yyvsp[-2].sval); (yyval.with_description_t)->select = (yyvsp[0].select_stmt); } -#line 4757 "bison_parser.cpp" +#line 4738 "bison_parser.cpp" break; - case 269: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ -#line 1274 "bison_parser.y" + case 268: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ +#line 1275 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4765,11 +4746,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 4769 "bison_parser.cpp" +#line 4750 "bison_parser.cpp" break; - case 270: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ -#line 1282 "bison_parser.y" + case 269: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ +#line 1283 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4778,11 +4759,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 4782 "bison_parser.cpp" +#line 4763 "bison_parser.cpp" break; - case 271: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ -#line 1292 "bison_parser.y" + case 270: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ +#line 1293 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4798,83 +4779,83 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } -#line 4802 "bison_parser.cpp" - break; - - case 272: /* opt_join_type: INNER */ -#line 1310 "bison_parser.y" - { (yyval.uval) = kJoinInner; } -#line 4808 "bison_parser.cpp" +#line 4783 "bison_parser.cpp" break; - case 273: /* opt_join_type: LEFT OUTER */ + case 271: /* opt_join_type: INNER */ #line 1311 "bison_parser.y" - { (yyval.uval) = kJoinLeft; } -#line 4814 "bison_parser.cpp" + { (yyval.uval) = kJoinInner; } +#line 4789 "bison_parser.cpp" break; - case 274: /* opt_join_type: LEFT */ + case 272: /* opt_join_type: LEFT OUTER */ #line 1312 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4820 "bison_parser.cpp" +#line 4795 "bison_parser.cpp" break; - case 275: /* opt_join_type: RIGHT OUTER */ + case 273: /* opt_join_type: LEFT */ #line 1313 "bison_parser.y" - { (yyval.uval) = kJoinRight; } -#line 4826 "bison_parser.cpp" + { (yyval.uval) = kJoinLeft; } +#line 4801 "bison_parser.cpp" break; - case 276: /* opt_join_type: RIGHT */ + case 274: /* opt_join_type: RIGHT OUTER */ #line 1314 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4832 "bison_parser.cpp" +#line 4807 "bison_parser.cpp" break; - case 277: /* opt_join_type: FULL OUTER */ + case 275: /* opt_join_type: RIGHT */ #line 1315 "bison_parser.y" - { (yyval.uval) = kJoinFull; } -#line 4838 "bison_parser.cpp" + { (yyval.uval) = kJoinRight; } +#line 4813 "bison_parser.cpp" break; - case 278: /* opt_join_type: OUTER */ + case 276: /* opt_join_type: FULL OUTER */ #line 1316 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4844 "bison_parser.cpp" +#line 4819 "bison_parser.cpp" break; - case 279: /* opt_join_type: FULL */ + case 277: /* opt_join_type: OUTER */ #line 1317 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4850 "bison_parser.cpp" +#line 4825 "bison_parser.cpp" break; - case 280: /* opt_join_type: CROSS */ + case 278: /* opt_join_type: FULL */ #line 1318 "bison_parser.y" - { (yyval.uval) = kJoinCross; } -#line 4856 "bison_parser.cpp" + { (yyval.uval) = kJoinFull; } +#line 4831 "bison_parser.cpp" break; - case 281: /* opt_join_type: %empty */ + case 279: /* opt_join_type: CROSS */ #line 1319 "bison_parser.y" + { (yyval.uval) = kJoinCross; } +#line 4837 "bison_parser.cpp" + break; + + case 280: /* opt_join_type: %empty */ +#line 1320 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4862 "bison_parser.cpp" +#line 4843 "bison_parser.cpp" break; - case 285: /* ident_commalist: IDENTIFIER */ -#line 1339 "bison_parser.y" + case 284: /* ident_commalist: IDENTIFIER */ +#line 1340 "bison_parser.y" { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 4868 "bison_parser.cpp" +#line 4849 "bison_parser.cpp" break; - case 286: /* ident_commalist: ident_commalist ',' IDENTIFIER */ -#line 1340 "bison_parser.y" + case 285: /* ident_commalist: ident_commalist ',' IDENTIFIER */ +#line 1341 "bison_parser.y" { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 4874 "bison_parser.cpp" +#line 4855 "bison_parser.cpp" break; -#line 4878 "bison_parser.cpp" +#line 4859 "bison_parser.cpp" default: break; } @@ -5104,7 +5085,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 1343 "bison_parser.y" +#line 1344 "bison_parser.y" /********************************* ** Section 4: Additional C code diff --git a/src/parser/bison_parser.h b/src/parser/bison_parser.h index 3ee352b6..8ab9e4aa 100644 --- a/src/parser/bison_parser.h +++ b/src/parser/bison_parser.h @@ -282,6 +282,7 @@ union HSQL_STYPE hsql::LimitDescription* limit; hsql::ColumnDefinition* column_t; hsql::TableConstraint* table_constraint_t; + hsql::TableElement* table_element_t; hsql::ConstraintType column_constraint_t; hsql::ColumnType column_type_t; hsql::ImportType import_type_t; @@ -295,12 +296,11 @@ union HSQL_STYPE std::vector* str_vec; std::vector* table_vec; - std::vector* column_vec; std::vector* update_vec; std::vector* expr_vec; std::vector* order_vec; std::vector* with_description_vec; - std::vector* table_constraint_vec; + std::vector* table_element_vec; #line 306 "bison_parser.h" diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index e2d8fa26..0acf5c22 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -124,6 +124,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha hsql::LimitDescription* limit; hsql::ColumnDefinition* column_t; hsql::TableConstraint* table_constraint_t; + hsql::TableElement* table_element_t; hsql::ConstraintType column_constraint_t; hsql::ColumnType column_type_t; hsql::ImportType import_type_t; @@ -137,12 +138,11 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha std::vector* str_vec; std::vector* table_vec; - std::vector* column_vec; std::vector* update_vec; std::vector* expr_vec; std::vector* order_vec; std::vector* with_description_vec; - std::vector* table_constraint_vec; + std::vector* table_element_vec; } @@ -159,7 +159,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha } } delete ($$); -} +} %destructor { delete ($$); } <*> @@ -227,6 +227,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha %type opt_order_type %type datetime_field %type column_def +%type table_elem %type column_type %type table_constraint %type update_clause @@ -245,8 +246,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha %type opt_order order_list %type opt_with_clause with_clause with_description_list %type update_clause_commalist -%type column_def_commalist -%type opt_table_constraints +%type table_elem_commalist /****************************** ** Token Precedence and Associativity @@ -526,13 +526,12 @@ create_statement: free($6); $$->filePath = $8; } - | CREATE TABLE opt_not_exists table_name '(' column_def_commalist opt_table_constraints ')' { + | CREATE TABLE opt_not_exists table_name '(' table_elem_commalist ')' { $$ = new CreateStatement(kCreateTable); $$->ifNotExists = $3; $$->schema = $4.schema; $$->tableName = $4.name; - $$->columns = $6; - $$->tableConstraints = $7; + $$->setColumnDefsAndConstraints($6); } | CREATE TABLE opt_not_exists table_name AS select_statement { $$ = new CreateStatement(kCreateTable); @@ -563,10 +562,15 @@ opt_not_exists: | /* empty */ { $$ = false; } ; -column_def_commalist: - column_def { $$ = new std::vector(); $$->push_back($1); } - | column_def_commalist ',' column_def { $1->push_back($3); $$ = $1; } - ; +table_elem_commalist: + table_elem { $$ = new std::vector(); $$->push_back($1); } + | table_elem_commalist ',' table_elem { $1->push_back($3); $$ = $1; } + ; + +table_elem: + column_def { $$ = $1; } + | table_constraint { $$ = $1; } + ; column_def: IDENTIFIER column_type opt_column_nullable opt_column_constraint{ @@ -614,15 +618,12 @@ opt_column_constraint: | /* empty */ { $$ = ConstraintType::NOT_SET; } ; -opt_table_constraints: - table_constraint {$$ = new std::vector(); $$->push_back($1); } - | opt_table_constraints table_constraint { $1->push_back($2); $$ = $1; } - | /* empty */ {$$ = new std::vector(); } - ; - table_constraint: - ',' PRIMARY KEY '(' ident_commalist ')' { $$ = new TableConstraint(ConstraintType::PRIMARY_KEY, $5); } - | ',' UNIQUE '(' ident_commalist ')' { $$ = new TableConstraint(ConstraintType::UNIQUE, $4); } + PRIMARY KEY '(' ident_commalist ')' { $$ = new TableConstraint(ConstraintType::PRIMARY_KEY, $4); } + | UNIQUE '(' ident_commalist ')' { $$ = new TableConstraint(ConstraintType::UNIQUE, $3); } + ; + + /****************************** * Drop Statement * DROP TABLE students; diff --git a/src/sql/CreateStatement.h b/src/sql/CreateStatement.h index 207f2e1a..723b66b0 100755 --- a/src/sql/CreateStatement.h +++ b/src/sql/CreateStatement.h @@ -12,21 +12,33 @@ namespace hsql { enum struct ConstraintType {PRIMARY_KEY, UNIQUE, NOT_SET}; - // Represents definition of a key constraint - struct TableConstraint { + // Superclass for both TableConstraint and Column Definition + struct TableElement { + enum { + TABLECONSTRAINT, + COLUMNDEF + } elemType; + + virtual ~TableElement(){} + }; + // Represents definition of a key constraint + struct TableConstraint : TableElement { + struct TableElement; TableConstraint(ConstraintType keyType, std::vector* columnNames); - virtual~TableConstraint(); + ~TableConstraint() override; ConstraintType type; std::vector* columnNames; }; // Represents definition of a table column - struct ColumnDefinition { + struct ColumnDefinition: TableElement { + struct TableElement; ColumnDefinition(char* name, ColumnType type, bool nullable, ConstraintType constraintType); - virtual~ColumnDefinition(); + + ColumnDefinition() ; char* name; ColumnType type; @@ -47,6 +59,16 @@ namespace hsql { CreateStatement(CreateType type); ~CreateStatement() override; + void setColumnDefsAndConstraints(std::vector* tableElements) { + for(auto tableElem: *tableElements) { + if(auto *colDef = dynamic_cast(tableElem)) { + columns->emplace_back(colDef); + } else if(auto *tableConstraint = dynamic_cast(tableElem)) { + tableConstraints->emplace_back(tableConstraint); + } + } + } + CreateType type; bool ifNotExists; // default: false char* filePath; // default: nullptr diff --git a/src/sql/statements.cpp b/src/sql/statements.cpp index 03c0a79f..2279fc16 100755 --- a/src/sql/statements.cpp +++ b/src/sql/statements.cpp @@ -5,7 +5,8 @@ namespace hsql { // KeyConstraints TableConstraint::TableConstraint(ConstraintType type, std::vector* columnNames) : type(type), - columnNames(columnNames) {}; + columnNames(columnNames) { + elemType = TABLECONSTRAINT; }; TableConstraint::~TableConstraint() { for (char* def : *columnNames) { @@ -18,11 +19,8 @@ namespace hsql { name(name), type(type), nullable(nullable), - constraintType(constraintType) {}; - - ColumnDefinition::~ColumnDefinition() { - free(name); - } + constraintType(constraintType) { + elemType = COLUMNDEF; }; ColumnType::ColumnType(DataType data_type, int64_t length, ColumnSpecification column_specification) : data_type(data_type), From ba5d54437fac4523296620deaabc32316d828fc9 Mon Sep 17 00:00:00 2001 From: Moritz Spranger Date: Tue, 24 Aug 2021 14:59:13 +0200 Subject: [PATCH 37/73] Add support for smallint --- src/parser/bison_parser.y | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 1437003f..0c6ae603 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -640,9 +640,8 @@ drop_statement: $$->ifExists = false; $$->name = $3; } - | DROP INDEX opt_exists index_name ON table_name { + | DROP INDEX opt_exists index_name { $$ = new DropStatement(kDropIndex); - $$->name = $6.name; $$->ifExists = $3; $$->index_name = $4; } From b730d77fb8b7d70c55524224b94cff6b507b81ad Mon Sep 17 00:00:00 2001 From: simonstadlinger Date: Tue, 24 Aug 2021 15:18:28 +0200 Subject: [PATCH 38/73] Fix seg fault --- src/sql/CreateStatement.h | 10 +++------- src/sql/statements.cpp | 6 ++---- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/sql/CreateStatement.h b/src/sql/CreateStatement.h index 723b66b0..fb05c5b5 100755 --- a/src/sql/CreateStatement.h +++ b/src/sql/CreateStatement.h @@ -14,17 +14,11 @@ namespace hsql { // Superclass for both TableConstraint and Column Definition struct TableElement { - enum { - TABLECONSTRAINT, - COLUMNDEF - } elemType; - virtual ~TableElement(){} }; // Represents definition of a key constraint struct TableConstraint : TableElement { - struct TableElement; TableConstraint(ConstraintType keyType, std::vector* columnNames); ~TableConstraint() override; @@ -35,7 +29,6 @@ namespace hsql { // Represents definition of a table column struct ColumnDefinition: TableElement { - struct TableElement; ColumnDefinition(char* name, ColumnType type, bool nullable, ConstraintType constraintType); ColumnDefinition() ; @@ -60,6 +53,9 @@ namespace hsql { ~CreateStatement() override; void setColumnDefsAndConstraints(std::vector* tableElements) { + columns = new std::vector(); + tableConstraints = new std::vector(); + for(auto tableElem: *tableElements) { if(auto *colDef = dynamic_cast(tableElem)) { columns->emplace_back(colDef); diff --git a/src/sql/statements.cpp b/src/sql/statements.cpp index 2279fc16..0ee7d986 100755 --- a/src/sql/statements.cpp +++ b/src/sql/statements.cpp @@ -5,8 +5,7 @@ namespace hsql { // KeyConstraints TableConstraint::TableConstraint(ConstraintType type, std::vector* columnNames) : type(type), - columnNames(columnNames) { - elemType = TABLECONSTRAINT; }; + columnNames(columnNames) {}; TableConstraint::~TableConstraint() { for (char* def : *columnNames) { @@ -19,8 +18,7 @@ namespace hsql { name(name), type(type), nullable(nullable), - constraintType(constraintType) { - elemType = COLUMNDEF; }; + constraintType(constraintType) {}; ColumnType::ColumnType(DataType data_type, int64_t length, ColumnSpecification column_specification) : data_type(data_type), From fdb7f7d2e0c6f8a2f4e03af456cf4c6390bd0507 Mon Sep 17 00:00:00 2001 From: simonstadlinger Date: Wed, 25 Aug 2021 15:58:41 +0200 Subject: [PATCH 39/73] Fix column constraints to support multiple column constraints and include nullable into column constraints --- src/parser/bison_parser.cpp | 2549 ++++++++++++++++++----------------- src/parser/bison_parser.h | 29 +- src/parser/bison_parser.y | 54 +- src/sql/ColumnType.h | 2 +- src/sql/CreateStatement.h | 24 +- src/sql/statements.cpp | 15 +- 6 files changed, 1351 insertions(+), 1322 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 50eca6a1..81f89ba2 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -331,8 +331,8 @@ enum yysymbol_kind_t YYSYMBOL_column_type = 197, /* column_type */ YYSYMBOL_opt_time_specification = 198, /* opt_time_specification */ YYSYMBOL_opt_decimal_specification = 199, /* opt_decimal_specification */ - YYSYMBOL_opt_column_nullable = 200, /* opt_column_nullable */ - YYSYMBOL_opt_column_constraint = 201, /* opt_column_constraint */ + YYSYMBOL_opt_column_constraints = 200, /* opt_column_constraints */ + YYSYMBOL_column_constraint = 201, /* column_constraint */ YYSYMBOL_table_constraint = 202, /* table_constraint */ YYSYMBOL_drop_statement = 203, /* drop_statement */ YYSYMBOL_opt_exists = 204, /* opt_exists */ @@ -742,16 +742,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 67 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 802 +#define YYLAST 814 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 173 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 114 /* YYNRULES -- Number of rules. */ -#define YYNRULES 285 +#define YYNRULES 286 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 531 +#define YYNSTATES 532 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 410 @@ -816,35 +816,35 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 282, 282, 303, 309, 318, 322, 326, 329, 332, - 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, - 357, 358, 363, 364, 368, 372, 384, 387, 390, 396, - 397, 404, 411, 414, 418, 432, 438, 447, 464, 468, - 471, 480, 494, 497, 502, 516, 529, 536, 543, 550, - 561, 562, 566, 567, 571, 572, 576, 582, 583, 584, - 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, - 595, 599, 600, 604, 605, 606, 610, 611, 612, 616, - 617, 618, 622, 623, 634, 640, 646, 651, 660, 661, - 670, 685, 694, 707, 714, 725, 726, 736, 745, 746, - 750, 762, 766, 770, 784, 785, 788, 789, 800, 801, - 805, 815, 828, 835, 839, 843, 850, 853, 859, 871, - 872, 876, 880, 881, 885, 890, 891, 895, 900, 904, - 905, 909, 910, 914, 915, 919, 923, 924, 925, 931, - 932, 936, 937, 938, 939, 940, 941, 948, 949, 953, - 954, 958, 959, 963, 973, 974, 975, 976, 977, 981, - 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, - 995, 996, 1000, 1001, 1002, 1003, 1004, 1008, 1009, 1010, - 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1022, 1023, - 1027, 1028, 1029, 1030, 1036, 1037, 1038, 1039, 1043, 1044, - 1048, 1049, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1063, - 1064, 1068, 1072, 1076, 1077, 1078, 1079, 1080, 1081, 1085, - 1089, 1093, 1097, 1098, 1099, 1100, 1104, 1105, 1106, 1107, - 1108, 1112, 1116, 1117, 1121, 1122, 1126, 1130, 1134, 1146, - 1147, 1157, 1158, 1162, 1163, 1172, 1173, 1178, 1189, 1198, - 1199, 1203, 1204, 1208, 1213, 1214, 1219, 1220, 1225, 1226, - 1231, 1232, 1241, 1242, 1246, 1250, 1254, 1261, 1274, 1282, - 1292, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, - 1320, 1325, 1334, 1335, 1340, 1341 + 0, 284, 284, 305, 311, 320, 324, 328, 331, 334, + 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, + 359, 360, 365, 366, 370, 374, 386, 389, 392, 398, + 399, 406, 413, 416, 420, 434, 440, 449, 466, 470, + 473, 482, 496, 499, 504, 518, 531, 538, 545, 552, + 563, 564, 568, 569, 573, 574, 578, 585, 586, 587, + 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, + 598, 602, 603, 607, 608, 609, 613, 614, 615, 619, + 620, 621, 622, 626, 627, 638, 644, 650, 655, 664, + 665, 674, 689, 698, 711, 718, 729, 730, 740, 749, + 750, 754, 766, 770, 774, 788, 789, 792, 793, 804, + 805, 809, 819, 832, 839, 843, 847, 854, 857, 863, + 875, 876, 880, 884, 885, 889, 894, 895, 899, 904, + 908, 909, 913, 914, 918, 919, 923, 927, 928, 929, + 935, 936, 940, 941, 942, 943, 944, 945, 952, 953, + 957, 958, 962, 963, 967, 977, 978, 979, 980, 981, + 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, + 995, 999, 1000, 1004, 1005, 1006, 1007, 1008, 1012, 1013, + 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1026, + 1027, 1031, 1032, 1033, 1034, 1040, 1041, 1042, 1043, 1047, + 1048, 1052, 1053, 1057, 1058, 1059, 1060, 1061, 1062, 1063, + 1067, 1068, 1072, 1076, 1080, 1081, 1082, 1083, 1084, 1085, + 1089, 1093, 1097, 1101, 1102, 1103, 1104, 1108, 1109, 1110, + 1111, 1112, 1116, 1120, 1121, 1125, 1126, 1130, 1134, 1138, + 1150, 1151, 1161, 1162, 1166, 1167, 1176, 1177, 1182, 1193, + 1202, 1203, 1207, 1208, 1212, 1217, 1218, 1223, 1224, 1229, + 1230, 1235, 1236, 1245, 1246, 1250, 1254, 1258, 1265, 1278, + 1286, 1296, 1315, 1316, 1317, 1318, 1319, 1320, 1321, 1322, + 1323, 1324, 1329, 1338, 1339, 1344, 1345 }; #endif @@ -891,7 +891,7 @@ static const char *const yytname[] = "show_statement", "create_statement", "opt_not_exists", "table_elem_commalist", "table_elem", "column_def", "column_type", "opt_time_specification", "opt_decimal_specification", - "opt_column_nullable", "opt_column_constraint", "table_constraint", + "opt_column_constraints", "column_constraint", "table_constraint", "drop_statement", "opt_exists", "alter_statement", "delete_statement", "truncate_statement", "insert_statement", "opt_column_list", "update_statement", "update_clause_commalist", "update_clause", @@ -949,12 +949,12 @@ static const yytype_int16 yytoknum[] = }; #endif -#define YYPACT_NINF (-410) +#define YYPACT_NINF (-409) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF (-283) +#define YYTABLE_NINF (-284) #define yytable_value_is_error(Yyn) \ ((Yyn) == YYTABLE_NINF) @@ -963,60 +963,60 @@ static const yytype_int16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - 555, 17, 90, 99, 132, 90, -33, 67, 85, 118, - 90, 108, 90, -5, 22, 199, 81, 81, 81, 237, - 79, -410, 136, -410, 136, -410, -410, -410, -410, -410, - -410, -410, -410, -410, -410, -410, -410, -34, -410, 260, - 106, -410, 109, 221, -410, 156, 156, 156, 90, 285, - 90, 193, -410, 90, -49, 194, 194, 194, 90, -410, - 165, 150, -410, -410, -410, -410, -410, -410, 550, -410, - 243, -410, -410, 218, -34, 52, -410, 54, -410, 330, - 23, 349, 239, 358, 90, 90, 284, -410, 287, 217, - 382, 296, 383, 383, 343, 389, 90, 90, -410, 226, - 199, -410, 227, 390, 385, 230, 231, -410, -410, -410, - -34, 282, 276, -34, 1, -410, -410, -410, -410, -410, - -410, -410, -410, 232, 242, -410, -410, -410, -410, -410, - -410, -410, -410, -410, 362, -410, 278, -57, 217, 344, - -410, 383, 411, 209, 267, -44, -410, 378, 306, -410, - 306, -410, -410, 288, -410, -410, -410, -410, 417, -410, - -410, 344, -410, -410, 345, -410, -410, 52, -410, -410, - 344, 345, 344, 158, -410, -410, 23, -410, 90, 419, - 312, 37, 300, -31, 258, 262, 272, 164, 359, 279, - 365, -410, 299, 103, 393, -410, -410, -410, -410, -410, - -410, -410, -410, -410, -410, -410, -410, -410, -410, -410, - -410, 348, -410, 18, 281, -410, 344, 382, -410, 194, - 402, -410, -410, 90, 286, 112, -410, 361, 280, -410, - 76, 1, -34, 289, -410, -20, 1, 103, 398, -28, - -410, 290, 363, -410, 684, 337, 294, 128, -410, -410, - -410, 312, 20, 12, 406, 236, 344, 344, 83, 110, - 298, 365, 586, 344, 94, 301, 77, 344, 344, 365, - -410, 365, -22, 303, 126, 365, 365, 365, 365, 365, - 365, 365, 365, 365, 365, 365, 365, 365, 365, 365, - 390, 90, -410, 464, 23, 103, -410, 15, 285, -410, - 23, -410, 417, 10, 284, -410, 344, -410, 469, -410, - -410, -410, -410, 344, -410, -410, -410, -410, 344, 344, - 411, 383, -410, 443, -410, 307, 308, -410, -410, 309, - -410, -410, -410, -410, 311, -410, 140, 313, 411, -410, - 37, -410, -410, 344, -410, -410, 314, -410, -410, -410, - -410, -410, -410, 388, 138, 137, 125, 344, 344, -410, - 406, 384, 28, -410, -410, -410, 369, 529, 605, 365, - 321, 299, -410, 386, 325, 605, 605, 605, 605, 275, - 275, 275, 275, 94, 94, 58, 58, 58, -75, 328, - -410, -410, 145, 322, -410, -410, 151, -410, 312, -410, - 14, -410, 324, -410, 16, -410, 427, -410, -410, -410, - 103, 103, 161, -410, 332, 491, -410, 494, 499, 500, - -410, -410, 407, 39, 411, 166, -410, 167, -410, 344, - 684, 344, 344, -410, 195, 163, 341, -410, 365, 605, - 299, 346, 172, -410, -410, -410, -410, 347, 414, -410, - -410, -410, 440, 445, 446, 431, 10, 527, -410, -410, - -410, 408, -410, -410, 528, 183, 367, 368, 370, -410, - 420, -410, -410, 184, -410, -410, 82, 372, 103, 196, - -410, 344, -410, 586, 379, 189, -410, -410, 16, 10, - -410, -410, -410, 10, 187, 392, 344, 395, -410, 540, - -410, -410, -410, -410, -410, -410, -410, -410, 103, -410, - -410, -410, -410, 43, 411, 0, -410, 396, 394, 344, - 210, 344, -410, -410, 15, 103, -410, -410, 103, 399, - -410 + 585, -2, 65, 72, 104, 65, -13, 22, 34, 38, + 65, 77, 65, 119, 30, 199, 59, 59, 59, 166, + 42, -409, 114, -409, 114, -409, -409, -409, -409, -409, + -409, -409, -409, -409, -409, -409, -409, -35, -409, 231, + 97, -409, 109, 190, -409, 164, 164, 164, 65, 291, + 65, 193, -409, 65, -49, 178, 178, 178, 65, -409, + 189, 155, -409, -409, -409, -409, -409, -409, 554, -409, + 233, -409, -409, 235, -35, 28, -409, 54, -409, 351, + 21, 362, 247, 365, 65, 65, 290, -409, 281, 217, + 382, 303, 390, 390, 350, 401, 65, 65, -409, 238, + 199, -409, 239, 404, 399, 248, 250, -409, -409, -409, + -35, 309, 300, -35, 182, -409, -409, -409, -409, -409, + -409, -409, -409, 260, 259, -409, -409, -409, -409, -409, + -409, -409, -409, -409, 386, -409, 302, 2, 217, 314, + -409, 390, 430, 31, 287, -46, -409, 398, 326, -409, + 326, -409, -409, 308, -409, -409, -409, -409, 436, -409, + -409, 314, -409, -409, 368, -409, -409, 28, -409, -409, + 314, 368, 314, 149, -409, -409, 21, -409, 65, 438, + 334, 40, 322, 86, 283, 284, 285, 204, 345, 288, + 396, -409, 254, 134, 423, -409, -409, -409, -409, -409, + -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, + -409, 358, -409, 43, 292, -409, 314, 382, -409, 178, + 410, -409, -409, 65, 295, 163, -409, 370, 304, -409, + 44, 182, -35, 312, -409, 191, 182, 134, 418, 57, + -409, 317, 387, -409, 301, 366, 324, 168, -409, -409, + -409, 334, 17, 12, 432, 330, 314, 314, 171, -45, + 325, 396, 613, 314, 82, 327, -52, 314, 314, 396, + -409, 396, -58, 329, 158, 396, 396, 396, 396, 396, + 396, 396, 396, 396, 396, 396, 396, 396, 396, 396, + 404, 65, -409, 487, 21, 134, -409, 16, 291, -409, + 21, -409, 436, 10, 290, -409, 314, -409, 490, -409, + -409, -409, -409, 314, -409, -409, -409, -409, 314, 314, + 430, 390, -409, 464, -409, 331, 333, -409, -409, 335, + -409, -409, -409, -409, 336, -409, 1, 339, 430, -409, + 40, -409, -409, 314, -409, -409, 340, -409, -409, -409, + -409, -409, -409, 408, 91, 90, 110, 314, 314, -409, + 432, 397, 118, -409, -409, -409, 393, 560, 649, 396, + 342, 254, -409, 407, 346, 649, 649, 649, 649, 112, + 112, 112, 112, 82, 82, -89, -89, -89, 25, 348, + -409, -409, 174, 349, -409, -409, 184, -409, 334, -409, + 7, -409, 344, -409, 36, -409, 450, -409, -409, -409, + 134, 134, 185, -409, 353, 515, -409, 516, 518, 519, + -409, 409, -409, -409, 424, 1, -409, 430, 194, -409, + 207, -409, 314, 301, 314, 314, -409, 125, 99, 363, + -409, 396, 649, 254, 364, 209, -409, -409, -409, -409, + 367, 428, -409, -409, -409, 453, 456, 457, 439, 10, + 533, -409, -409, -409, 415, -409, -409, 535, 211, 374, + 376, 377, -409, -409, -409, 244, -409, -409, 56, 378, + 134, 196, -409, 314, -409, 613, 379, 252, -409, -409, + 36, 10, -409, -409, -409, 10, 15, 381, 314, 384, + -409, 543, -409, -409, -409, -409, -409, -409, -409, 134, + -409, -409, -409, -409, 383, 430, -9, -409, 385, 392, + 314, 256, 314, -409, -409, 16, 134, -409, -409, 134, + 394, -409 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -1024,77 +1024,77 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_int16 yydefact[] = { - 263, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 264, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 30, 30, 0, - 283, 3, 21, 19, 21, 18, 8, 9, 7, 11, - 16, 17, 13, 14, 12, 15, 10, 0, 262, 0, - 249, 92, 33, 0, 44, 51, 51, 51, 0, 0, - 0, 0, 248, 0, 0, 89, 89, 89, 0, 42, - 0, 264, 265, 29, 26, 28, 27, 1, 263, 2, - 0, 6, 5, 140, 0, 101, 102, 132, 86, 0, - 150, 0, 0, 252, 0, 0, 126, 37, 0, 96, + 284, 3, 21, 19, 21, 18, 8, 9, 7, 11, + 16, 17, 13, 14, 12, 15, 10, 0, 263, 0, + 250, 93, 33, 0, 44, 51, 51, 51, 0, 0, + 0, 0, 249, 0, 0, 90, 90, 90, 0, 42, + 0, 265, 266, 29, 26, 28, 27, 1, 264, 2, + 0, 6, 5, 141, 0, 102, 103, 133, 87, 0, + 151, 0, 0, 253, 0, 0, 127, 37, 0, 97, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, - 0, 4, 0, 0, 120, 0, 0, 114, 115, 113, - 0, 117, 0, 0, 146, 250, 231, 234, 236, 237, - 232, 233, 238, 0, 149, 151, 226, 227, 228, 235, - 229, 230, 32, 31, 0, 251, 0, 0, 96, 0, - 91, 0, 0, 0, 0, 126, 98, 0, 40, 38, - 40, 88, 253, 0, 84, 85, 267, 266, 0, 139, - 119, 0, 109, 108, 132, 105, 104, 106, 116, 112, - 0, 132, 0, 0, 110, 34, 0, 50, 0, 0, - 263, 0, 0, 222, 0, 0, 0, 0, 0, 0, - 0, 224, 0, 125, 154, 161, 162, 163, 156, 158, - 164, 157, 177, 165, 166, 167, 168, 160, 155, 170, - 171, 0, 284, 0, 0, 94, 0, 0, 97, 89, - 0, 36, 41, 0, 24, 0, 22, 123, 121, 147, - 261, 146, 0, 131, 133, 138, 146, 142, 144, 141, - 152, 0, 0, 47, 0, 0, 0, 0, 52, 54, - 55, 263, 120, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 173, 0, 172, 0, 0, 0, 0, 0, - 174, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 0, 0, 121, 0, 0, 115, 116, 114, + 0, 118, 0, 0, 147, 251, 232, 235, 237, 238, + 233, 234, 239, 0, 150, 152, 227, 228, 229, 236, + 230, 231, 32, 31, 0, 252, 0, 0, 97, 0, + 92, 0, 0, 0, 0, 127, 99, 0, 40, 38, + 40, 89, 254, 0, 85, 86, 268, 267, 0, 140, + 120, 0, 110, 109, 133, 106, 105, 107, 117, 113, + 0, 133, 0, 0, 111, 34, 0, 50, 0, 0, + 264, 0, 0, 223, 0, 0, 0, 0, 0, 0, + 0, 225, 0, 126, 155, 162, 163, 164, 157, 159, + 165, 158, 178, 166, 167, 168, 169, 161, 156, 171, + 172, 0, 285, 0, 0, 95, 0, 0, 98, 90, + 0, 36, 41, 0, 24, 0, 22, 124, 122, 148, + 262, 147, 0, 132, 134, 139, 147, 143, 145, 142, + 153, 0, 0, 47, 0, 0, 0, 0, 52, 54, + 55, 264, 121, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 174, 0, 173, 0, 0, 0, 0, 0, + 175, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 95, 0, 0, 100, 99, 0, 0, 87, - 0, 20, 0, 0, 126, 122, 0, 259, 0, 260, - 153, 103, 107, 0, 137, 136, 135, 111, 0, 0, + 0, 0, 96, 0, 0, 101, 100, 0, 0, 88, + 0, 20, 0, 0, 127, 123, 0, 260, 0, 261, + 154, 104, 108, 0, 138, 137, 136, 112, 0, 0, 0, 0, 58, 0, 63, 75, 0, 62, 60, 0, 70, 69, 59, 67, 72, 57, 78, 0, 0, 46, - 0, 49, 209, 0, 223, 225, 0, 213, 214, 215, - 216, 217, 218, 0, 0, 0, 0, 0, 0, 196, - 0, 0, 0, 169, 159, 188, 189, 0, 184, 0, - 0, 0, 175, 0, 187, 186, 202, 203, 204, 205, - 206, 207, 208, 179, 178, 181, 180, 182, 183, 0, - 35, 285, 0, 222, 90, 39, 0, 23, 263, 124, - 239, 241, 0, 243, 257, 242, 128, 148, 258, 134, - 145, 143, 0, 45, 0, 0, 61, 0, 0, 0, - 68, 76, 0, 81, 0, 0, 53, 0, 200, 0, - 0, 0, 0, 194, 0, 0, 0, 219, 0, 185, - 0, 0, 0, 176, 220, 93, 25, 0, 0, 279, - 271, 277, 275, 278, 273, 0, 0, 0, 256, 247, - 254, 0, 118, 48, 0, 0, 0, 0, 0, 77, - 0, 80, 56, 0, 83, 210, 0, 0, 198, 0, - 197, 0, 201, 221, 0, 0, 192, 190, 257, 0, - 274, 276, 272, 0, 240, 258, 0, 0, 74, 0, - 64, 66, 71, 79, 82, 211, 212, 195, 199, 193, - 191, 244, 268, 280, 0, 130, 65, 0, 0, 0, - 0, 0, 127, 73, 0, 281, 269, 255, 129, 0, - 270 + 0, 49, 210, 0, 224, 226, 0, 214, 215, 216, + 217, 218, 219, 0, 0, 0, 0, 0, 0, 197, + 0, 0, 0, 170, 160, 189, 190, 0, 185, 0, + 0, 0, 176, 0, 188, 187, 203, 204, 205, 206, + 207, 208, 209, 180, 179, 182, 181, 183, 184, 0, + 35, 286, 0, 223, 91, 39, 0, 23, 264, 125, + 240, 242, 0, 244, 258, 243, 129, 149, 259, 135, + 146, 144, 0, 45, 0, 0, 61, 0, 0, 0, + 68, 0, 80, 81, 0, 56, 76, 0, 0, 53, + 0, 201, 0, 0, 0, 0, 195, 0, 0, 0, + 220, 0, 186, 0, 0, 0, 177, 221, 94, 25, + 0, 0, 280, 272, 278, 276, 279, 274, 0, 0, + 0, 257, 248, 255, 0, 119, 48, 0, 0, 0, + 0, 0, 79, 82, 77, 0, 84, 211, 0, 0, + 199, 0, 198, 0, 202, 222, 0, 0, 193, 191, + 258, 0, 275, 277, 273, 0, 241, 259, 0, 0, + 74, 0, 64, 66, 71, 83, 212, 213, 196, 200, + 194, 192, 245, 269, 281, 0, 131, 65, 0, 0, + 0, 0, 0, 128, 73, 0, 282, 270, 256, 130, + 0, 271 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -410, -410, -410, 492, -410, 542, -410, 266, -410, 105, - -410, -410, -410, -410, 271, -85, 421, -410, -410, -410, - 25, -410, 233, -410, 144, -410, -410, -410, -410, -410, - -410, -36, -410, -410, -410, -410, 437, -410, -410, 366, - -176, -89, -410, 8, -73, -42, -410, -410, -88, 326, - -410, -410, -410, -128, -410, -410, -122, -410, 274, -410, - -410, 2, -256, -410, -21, 273, -139, -130, -410, -410, - -410, -410, -410, -410, 327, -410, -410, -410, -410, -410, - -410, -410, -410, -410, -292, -70, -90, -410, -410, -92, - -410, -410, -410, -409, 91, -410, -410, -410, 4, -410, - -410, -410, 96, 373, -410, -410, -410, -410, 488, -410, - -410, -410, -410, -308 + -409, -409, -409, 492, -409, 540, -409, 263, -409, 323, + -409, -409, -409, -409, 268, -83, 417, -409, -409, -409, + 145, -409, 230, -409, 144, -409, -409, -409, 162, -409, + -409, -36, -409, -409, -409, -409, 451, -409, -409, 380, + -171, -96, -409, 23, -73, -47, -409, -409, -75, 343, + -409, -409, -409, -131, -409, -409, 115, -409, 278, -409, + -409, 92, -261, -409, -133, 293, -139, -138, -409, -409, + -409, -409, -409, -409, 338, -409, -409, -409, -409, -409, + -409, -409, -409, -409, -293, -77, -86, -409, -409, -91, + -409, -409, -409, -408, 107, -409, -409, -409, 6, -409, + -409, -409, 111, 372, -409, -409, -409, -409, 503, -409, + -409, -409, -409, -315 }; /* YYDEFGOTO[NTERM-NUM]. */ @@ -1102,16 +1102,16 @@ static const yytype_int16 yydefgoto[] = { 0, 19, 20, 21, 22, 71, 225, 226, 23, 64, 24, 133, 25, 26, 88, 148, 221, 27, 28, 29, - 83, 247, 248, 249, 336, 420, 416, 423, 472, 250, + 83, 247, 248, 249, 336, 420, 416, 425, 426, 250, 30, 95, 31, 32, 33, 34, 143, 35, 145, 146, 36, 164, 165, 166, 76, 110, 111, 169, 77, 161, - 227, 304, 305, 140, 462, 522, 114, 233, 234, 316, + 227, 304, 305, 140, 465, 523, 114, 233, 234, 316, 104, 174, 228, 123, 124, 229, 230, 194, 195, 196, 197, 198, 199, 200, 259, 201, 202, 203, 204, 205, 353, 206, 207, 208, 209, 210, 126, 127, 128, 129, 130, 131, 399, 400, 401, 402, 403, 51, 404, 136, - 153, 458, 459, 460, 310, 37, 38, 61, 62, 405, - 455, 526, 69, 213 + 153, 461, 462, 463, 310, 37, 38, 61, 62, 405, + 458, 527, 69, 213 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1119,172 +1119,174 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 193, 106, 149, 149, 243, 394, 41, 362, 150, 44, - 125, 159, 412, 40, 52, 344, 54, 218, 393, 307, - 96, 97, 167, 73, 171, 167, 319, 116, 117, 118, - 425, 235, 160, 237, 239, 113, 179, 45, 139, 448, - 244, 58, 231, 39, 92, 75, 46, 494, 258, 236, - 521, 149, 86, 266, 89, 172, 211, 91, 262, 275, - 264, 107, 98, 107, 245, 55, 470, 180, 448, 314, - 215, 84, 85, 173, 56, 341, 47, 295, 369, 307, - 449, 59, 105, 93, 513, 450, 267, 427, 137, 138, - 290, 451, 452, 40, 267, 315, 108, 246, 108, 471, - 154, 155, 42, 268, 57, 370, 240, 156, 453, 449, - 181, 268, -280, 454, 450, 442, 473, 354, 355, 265, - 451, 452, 65, 66, 518, 232, 119, 217, 365, 366, - 112, 262, 109, 74, 109, 43, 252, 453, 253, 367, - 457, 368, 454, 312, 167, 374, 375, 376, 377, 378, - 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, - 48, 183, 116, 117, 118, 120, 121, 183, 116, 117, - 118, 306, 345, 519, 235, 191, 406, 398, 49, 410, - 411, 346, 241, 297, 485, -245, 292, 53, 342, 293, - 267, 267, 275, 257, 437, 122, 267, 267, 389, 306, - 308, 357, 60, 184, 185, 186, 520, 268, 268, 184, - 185, 186, 448, 268, 268, 50, 432, 267, 434, 435, - 358, 289, 447, 290, 125, 63, 359, 299, 275, 372, - 125, 149, 529, 311, 268, 358, 413, 67, 317, 439, - 515, 433, 187, 421, 431, 364, 373, 70, 187, 68, - 505, 267, 267, 449, 286, 287, 288, 289, 450, 290, - 422, 119, 430, 78, 451, 452, 73, 119, 268, 268, - 481, 238, 214, 392, 257, 79, 80, 267, 188, 396, - 301, 453, 82, 302, 188, -280, 454, 436, 87, 99, - 476, 189, 478, 479, 268, 390, 339, 189, 441, 340, - 120, 121, 183, 116, 117, 118, 120, 121, 483, 267, - 267, 480, 507, 445, 81, 90, 176, 190, 191, 446, - 94, 100, 176, 190, 191, 192, 268, 268, 270, 463, - 122, 192, 293, 115, 474, 475, 122, 293, 306, 102, - 487, 103, 508, 306, 184, 185, 186, 183, 116, 117, - 118, 498, 504, 132, 499, 293, 73, 510, -246, 134, - 306, 135, 183, 116, 117, 118, 139, 484, 183, 116, - 117, 118, 347, 348, 349, 350, 351, 352, 527, 141, - 525, 293, 528, 187, 142, 144, 147, 116, 151, 184, - 185, 186, 152, 74, 158, 168, 118, 160, 162, 163, - 175, 170, 119, 274, 260, 185, 186, 177, 178, 275, - 269, 185, 186, 176, 212, 216, 219, 220, 223, 188, - 224, 112, 242, 15, 251, 254, -283, -283, 187, 255, - -283, -283, 189, 284, 285, 286, 287, 288, 289, 256, - 290, 120, 121, 187, 263, 291, 270, 119, 294, 187, - 298, 306, 318, 300, 303, 321, 337, 320, 190, 191, - 313, 338, 119, 73, 188, 360, 192, 391, 119, 363, - 371, 122, 408, 414, 415, 417, 418, 189, 419, 261, - 424, 429, 428, 267, 369, 261, 120, 121, 440, 443, - 290, 253, 189, 271, 444, 456, 461, 465, 189, 464, - 466, 120, 121, 190, 191, 467, 468, 120, 121, 482, - 469, 192, 489, 272, 486, 488, 122, 490, 190, 191, - 273, 274, 491, 492, 190, 191, 192, 275, 276, 493, - 495, 122, 192, 496, 497, 500, 501, 122, 502, 503, - 506, 277, 278, 279, 280, 281, 517, 509, 282, 283, - -282, 284, 285, 286, 287, 288, 289, 1, 290, 514, - 101, 524, 1, 516, 523, 2, 72, 530, 397, 395, - 2, 222, 3, 426, 477, 182, 4, 3, 343, 407, - 512, 4, 270, 296, 511, 356, 5, 409, 157, 6, - 7, 5, 0, 0, 6, 7, 0, 0, 0, 0, - 0, 8, 9, 309, 0, 0, 8, 9, 0, 0, - 0, 0, 10, 0, 0, 11, 0, 10, 0, 0, - 11, 0, 0, 0, 0, 0, 0, 0, 0, 271, - 0, 0, 0, 0, 0, 0, 12, 0, 0, 270, - 13, 12, 0, 438, 0, 13, 0, 0, 0, 361, - 0, 0, 0, 0, 0, 14, 0, 274, 270, 0, - 14, 15, 0, 275, 276, 0, 15, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 277, 278, 279, - 280, 281, 0, 0, 282, 283, 271, 284, 285, 286, - 287, 288, 289, 0, 290, 16, 17, 18, 0, 0, - 16, 17, 18, 0, 0, -283, 361, 0, 322, 0, - 0, 0, 0, 323, 274, 324, 325, 0, 326, 0, - 275, 276, 0, 0, 0, 0, 327, 0, 0, 0, - 0, 0, 0, 274, 277, 278, 279, 280, 281, 275, - -283, 282, 283, 0, 284, 285, 286, 287, 288, 289, - 0, 290, 328, -283, -283, -283, 280, 281, 0, 0, - 282, 283, 0, 284, 285, 286, 287, 288, 289, 329, - 290, 330, 331, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 332, 0, 0, 0, - 333, 0, 334, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 335 + 193, 106, 362, 125, 394, 412, 149, 149, 41, 243, + 150, 44, 159, 40, 218, 344, 52, 171, 54, 393, + 96, 97, 73, 428, 39, 116, 117, 118, 421, 160, + 113, 235, 451, 237, 239, 167, 139, 107, 167, 307, + 451, 522, 369, 244, 92, 275, 357, 307, 258, 58, + 262, 496, 264, 266, 86, 149, 89, 45, 211, 91, + 75, 422, 267, 107, 98, 358, 46, 245, 40, 370, + 215, 359, 108, 452, 289, 42, 290, 295, 453, 268, + 341, 452, 430, 93, 454, 455, 453, 514, 73, 59, + 137, 138, 454, 455, 214, 179, 47, 105, 108, 240, + 246, 456, 154, 155, 423, -281, 457, 43, 109, 456, + 445, 319, 475, -281, 457, 48, 364, 354, 355, 265, + 232, 424, 156, 262, 119, 217, 180, 49, 365, 366, + 112, 367, 74, 368, 109, 50, 312, 374, 375, 376, + 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, + 387, 388, 183, 116, 117, 118, 53, 167, 267, 275, + 460, 392, 306, 120, 121, 270, 67, 396, 308, 181, + 267, 267, 345, 406, 235, 268, 191, 398, -246, 410, + 411, 346, 487, 297, 241, 342, -247, 268, 268, 55, + 290, 84, 85, 122, 184, 185, 186, 434, 56, 389, + 521, 435, 60, 63, 267, 267, 483, 183, 116, 117, + 118, 292, 68, 267, 293, 433, 275, 125, 437, 438, + 358, 268, 268, 125, 506, 70, 436, 450, 57, 299, + 268, 442, 530, 187, 78, 149, 172, 516, 413, 267, + 274, 482, 286, 287, 288, 289, 275, 290, 267, 184, + 185, 186, 119, 252, 173, 253, 268, 183, 116, 117, + 118, 372, 238, -284, -284, 268, 79, -284, -284, 188, + 284, 285, 286, 287, 288, 289, 80, 290, 373, 231, + 314, 257, 189, 81, 440, 267, 236, 439, 187, 306, + 82, 120, 121, 478, 87, 480, 481, 390, 444, 184, + 185, 186, 268, 485, 94, 267, 315, 119, 190, 191, + 267, 73, 508, 99, 257, 90, 192, 183, 116, 117, + 118, 122, 268, 311, 188, 322, 100, 268, 317, 102, + 323, 301, 324, 325, 302, 326, 339, 189, 187, 340, + 65, 66, 448, 327, 509, 176, 120, 121, 183, 116, + 117, 118, 449, 466, 115, 176, 293, 119, 103, 184, + 185, 186, 476, 190, 191, 293, 132, 134, 135, 328, + 486, 192, 139, 141, 188, 477, 122, 489, 306, 500, + 306, 526, 501, 529, 142, 144, 329, 189, 330, 331, + 260, 185, 186, 147, 116, 151, 120, 121, 187, 183, + 116, 117, 118, 332, 152, 74, 158, 333, 451, 334, + 118, 160, 505, 190, 191, 293, 162, 119, 163, 335, + 511, 192, 168, 306, 528, 170, 122, 293, 175, 187, + 176, 177, 178, 212, 188, 216, 219, 220, 223, 224, + 269, 242, 185, 186, 112, 15, 251, 189, 119, 452, + 254, 255, 256, 263, 453, 291, 120, 121, 298, 294, + 454, 455, 300, 303, 519, 261, 347, 348, 349, 350, + 351, 352, 318, 190, 191, 306, 270, 456, 189, 321, + 187, 192, 457, 313, 320, 337, 122, 120, 121, 73, + 391, 338, 360, 408, 414, 363, 371, 369, 415, 119, + 417, 432, 418, 419, 190, 191, 427, 267, 431, 443, + 446, 290, 192, 520, 447, 459, 261, 122, 253, 464, + 467, 468, 469, 271, 470, 471, 491, 473, 472, 189, + 492, 484, 488, 493, 494, 490, 497, 495, 120, 121, + 498, 499, 502, 272, 503, 504, 507, 510, 515, 518, + 273, 274, 517, 524, -283, 190, 191, 275, 276, 525, + 101, 1, 531, 192, 72, 397, 395, 222, 122, 2, + 429, 277, 278, 279, 280, 281, 3, 479, 282, 283, + 4, 284, 285, 286, 287, 288, 289, 474, 290, 182, + 5, 409, 1, 6, 7, 343, 356, 296, 513, 407, + 2, 512, 309, 157, 0, 8, 9, 3, 0, 0, + 0, 4, 0, 270, 0, 0, 10, 0, 0, 11, + 0, 5, 0, 0, 6, 7, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 8, 9, 0, 0, + 12, 0, 0, 0, 13, 0, 0, 10, 0, 0, + 11, 0, 0, 0, 0, 0, 0, 0, 0, 14, + 271, 0, 0, 0, 0, 15, 270, 0, 0, 0, + 0, 12, 0, 0, 441, 13, 0, 0, 0, 0, + 361, 0, 0, 0, 0, 0, 0, 0, 274, 0, + 14, 0, 0, 0, 275, 276, 15, 0, 0, 16, + 17, 18, 270, 0, 0, 0, 0, 0, 277, 278, + 279, 280, 281, 271, 0, 282, 283, 0, 284, 285, + 286, 287, 288, 289, 0, 290, 0, 0, 0, 0, + 16, 17, 18, 361, 0, 0, 0, 0, 0, 0, + 0, 274, 0, 0, 0, 0, 0, 275, 276, -284, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 277, 278, 279, 280, 281, 0, 0, 282, 283, + 0, 284, 285, 286, 287, 288, 289, 274, 290, 0, + 0, 0, 0, 275, -284, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -284, -284, -284, + 280, 281, 0, 0, 282, 283, 0, 284, 285, 286, + 287, 288, 289, 0, 290 }; static const yytype_int16 yycheck[] = { - 139, 74, 92, 93, 180, 297, 2, 263, 93, 5, - 80, 103, 320, 3, 10, 3, 12, 145, 3, 3, - 56, 57, 110, 57, 113, 113, 54, 4, 5, 6, - 338, 170, 12, 172, 173, 77, 93, 70, 82, 25, - 3, 19, 164, 26, 93, 37, 79, 456, 187, 171, - 50, 141, 48, 192, 50, 54, 141, 53, 188, 134, - 190, 9, 58, 9, 27, 70, 27, 124, 25, 89, - 143, 46, 47, 72, 79, 251, 109, 216, 100, 3, - 66, 59, 74, 132, 493, 71, 114, 343, 84, 85, - 165, 77, 78, 3, 114, 115, 44, 60, 44, 60, - 96, 97, 3, 131, 109, 127, 176, 99, 94, 66, - 167, 131, 98, 99, 71, 371, 424, 256, 257, 192, - 77, 78, 17, 18, 81, 167, 103, 171, 267, 268, - 76, 261, 80, 167, 80, 3, 167, 94, 169, 269, - 124, 271, 99, 232, 232, 275, 276, 277, 278, 279, - 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, - 93, 3, 4, 5, 6, 142, 143, 3, 4, 5, - 6, 171, 160, 130, 313, 160, 304, 167, 93, 318, - 319, 254, 178, 219, 440, 171, 168, 79, 168, 171, - 114, 114, 134, 110, 166, 172, 114, 114, 290, 171, - 124, 91, 3, 45, 46, 47, 514, 131, 131, 45, - 46, 47, 25, 131, 131, 97, 91, 114, 357, 358, - 110, 163, 398, 165, 294, 144, 116, 223, 134, 103, - 300, 321, 524, 231, 131, 110, 321, 0, 236, 369, - 496, 116, 84, 103, 107, 168, 120, 111, 84, 170, - 168, 114, 114, 66, 160, 161, 162, 163, 71, 165, - 120, 103, 124, 3, 77, 78, 57, 103, 131, 131, - 107, 113, 63, 294, 110, 169, 167, 114, 120, 300, - 168, 94, 126, 171, 120, 98, 99, 360, 3, 124, - 429, 133, 431, 432, 131, 291, 168, 133, 371, 171, - 142, 143, 3, 4, 5, 6, 142, 143, 438, 114, - 114, 116, 116, 168, 93, 122, 171, 159, 160, 168, - 126, 171, 171, 159, 160, 167, 131, 131, 53, 168, - 172, 167, 171, 3, 168, 168, 172, 171, 171, 96, - 168, 123, 481, 171, 45, 46, 47, 3, 4, 5, - 6, 168, 168, 4, 171, 171, 57, 168, 171, 120, - 171, 3, 3, 4, 5, 6, 82, 440, 3, 4, - 5, 6, 136, 137, 138, 139, 140, 141, 168, 92, - 519, 171, 521, 84, 167, 3, 90, 4, 45, 45, - 46, 47, 3, 167, 167, 113, 6, 12, 168, 168, - 168, 125, 103, 128, 45, 46, 47, 45, 130, 134, - 17, 46, 47, 171, 3, 148, 38, 111, 130, 120, - 3, 76, 3, 111, 124, 167, 151, 152, 84, 167, - 155, 156, 133, 158, 159, 160, 161, 162, 163, 167, - 165, 142, 143, 84, 165, 97, 53, 103, 167, 84, - 48, 171, 54, 167, 93, 92, 119, 167, 159, 160, - 171, 167, 103, 57, 120, 167, 167, 3, 103, 168, - 167, 172, 3, 30, 167, 167, 167, 133, 167, 120, - 167, 93, 168, 114, 100, 120, 142, 143, 167, 103, - 165, 169, 133, 100, 166, 171, 69, 6, 133, 167, - 6, 142, 143, 159, 160, 6, 6, 142, 143, 168, - 103, 167, 98, 120, 168, 168, 172, 77, 159, 160, - 127, 128, 77, 77, 159, 160, 167, 134, 135, 98, - 3, 172, 167, 125, 6, 168, 168, 172, 168, 119, - 168, 148, 149, 150, 151, 152, 6, 168, 155, 156, - 0, 158, 159, 160, 161, 162, 163, 7, 165, 167, - 68, 167, 7, 168, 168, 15, 24, 168, 302, 298, - 15, 150, 22, 340, 430, 138, 26, 22, 252, 306, - 489, 26, 53, 217, 488, 258, 36, 313, 100, 39, - 40, 36, -1, -1, 39, 40, -1, -1, -1, -1, - -1, 51, 52, 230, -1, -1, 51, 52, -1, -1, - -1, -1, 62, -1, -1, 65, -1, 62, -1, -1, - 65, -1, -1, -1, -1, -1, -1, -1, -1, 100, - -1, -1, -1, -1, -1, -1, 86, -1, -1, 53, - 90, 86, -1, 114, -1, 90, -1, -1, -1, 120, - -1, -1, -1, -1, -1, 105, -1, 128, 53, -1, - 105, 111, -1, 134, 135, -1, 111, -1, -1, -1, + 139, 74, 263, 80, 297, 320, 92, 93, 2, 180, + 93, 5, 103, 3, 145, 3, 10, 113, 12, 3, + 56, 57, 57, 338, 26, 4, 5, 6, 27, 12, + 77, 170, 25, 172, 173, 110, 82, 9, 113, 3, + 25, 50, 100, 3, 93, 134, 91, 3, 187, 19, + 188, 459, 190, 192, 48, 141, 50, 70, 141, 53, + 37, 60, 114, 9, 58, 110, 79, 27, 3, 127, + 143, 116, 44, 66, 163, 3, 165, 216, 71, 131, + 251, 66, 343, 132, 77, 78, 71, 495, 57, 59, + 84, 85, 77, 78, 63, 93, 109, 74, 44, 176, + 60, 94, 96, 97, 103, 98, 99, 3, 80, 94, + 371, 54, 427, 98, 99, 93, 168, 256, 257, 192, + 167, 120, 99, 261, 103, 171, 124, 93, 267, 268, + 76, 269, 167, 271, 80, 97, 232, 275, 276, 277, + 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 3, 4, 5, 6, 79, 232, 114, 134, + 124, 294, 171, 142, 143, 53, 0, 300, 124, 167, + 114, 114, 160, 304, 313, 131, 160, 167, 171, 318, + 319, 254, 443, 219, 178, 168, 171, 131, 131, 70, + 165, 46, 47, 172, 45, 46, 47, 107, 79, 290, + 515, 91, 3, 144, 114, 114, 107, 3, 4, 5, + 6, 168, 170, 114, 171, 124, 134, 294, 357, 358, + 110, 131, 131, 300, 168, 111, 116, 398, 109, 223, + 131, 369, 525, 84, 3, 321, 54, 498, 321, 114, + 128, 116, 160, 161, 162, 163, 134, 165, 114, 45, + 46, 47, 103, 167, 72, 169, 131, 3, 4, 5, + 6, 103, 113, 151, 152, 131, 169, 155, 156, 120, + 158, 159, 160, 161, 162, 163, 167, 165, 120, 164, + 89, 110, 133, 93, 166, 114, 171, 360, 84, 171, + 126, 142, 143, 432, 3, 434, 435, 291, 371, 45, + 46, 47, 131, 441, 126, 114, 115, 103, 159, 160, + 114, 57, 116, 124, 110, 122, 167, 3, 4, 5, + 6, 172, 131, 231, 120, 24, 171, 131, 236, 96, + 29, 168, 31, 32, 171, 34, 168, 133, 84, 171, + 17, 18, 168, 42, 483, 171, 142, 143, 3, 4, + 5, 6, 168, 168, 3, 171, 171, 103, 123, 45, + 46, 47, 168, 159, 160, 171, 4, 120, 3, 68, + 443, 167, 82, 92, 120, 168, 172, 168, 171, 168, + 171, 520, 171, 522, 167, 3, 85, 133, 87, 88, + 45, 46, 47, 90, 4, 45, 142, 143, 84, 3, + 4, 5, 6, 102, 3, 167, 167, 106, 25, 108, + 6, 12, 168, 159, 160, 171, 168, 103, 168, 118, + 168, 167, 113, 171, 168, 125, 172, 171, 168, 84, + 171, 45, 130, 3, 120, 148, 38, 111, 130, 3, + 17, 3, 46, 47, 76, 111, 124, 133, 103, 66, + 167, 167, 167, 165, 71, 97, 142, 143, 48, 167, + 77, 78, 167, 93, 81, 120, 136, 137, 138, 139, + 140, 141, 54, 159, 160, 171, 53, 94, 133, 92, + 84, 167, 99, 171, 167, 119, 172, 142, 143, 57, + 3, 167, 167, 3, 30, 168, 167, 100, 167, 103, + 167, 93, 167, 167, 159, 160, 167, 114, 168, 167, + 103, 165, 167, 130, 166, 171, 120, 172, 169, 69, + 167, 6, 6, 100, 6, 6, 98, 103, 119, 133, + 77, 168, 168, 77, 77, 168, 3, 98, 142, 143, + 125, 6, 168, 120, 168, 168, 168, 168, 167, 6, + 127, 128, 168, 168, 0, 159, 160, 134, 135, 167, + 68, 7, 168, 167, 24, 302, 298, 150, 172, 15, + 340, 148, 149, 150, 151, 152, 22, 433, 155, 156, + 26, 158, 159, 160, 161, 162, 163, 425, 165, 138, + 36, 313, 7, 39, 40, 252, 258, 217, 491, 306, + 15, 490, 230, 100, -1, 51, 52, 22, -1, -1, + -1, 26, -1, 53, -1, -1, 62, -1, -1, 65, + -1, 36, -1, -1, 39, 40, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 51, 52, -1, -1, + 86, -1, -1, -1, 90, -1, -1, 62, -1, -1, + 65, -1, -1, -1, -1, -1, -1, -1, -1, 105, + 100, -1, -1, -1, -1, 111, 53, -1, -1, -1, + -1, 86, -1, -1, 114, 90, -1, -1, -1, -1, + 120, -1, -1, -1, -1, -1, -1, -1, 128, -1, + 105, -1, -1, -1, 134, 135, 111, -1, -1, 145, + 146, 147, 53, -1, -1, -1, -1, -1, 148, 149, + 150, 151, 152, 100, -1, 155, 156, -1, 158, 159, + 160, 161, 162, 163, -1, 165, -1, -1, -1, -1, + 145, 146, 147, 120, -1, -1, -1, -1, -1, -1, + -1, 128, -1, -1, -1, -1, -1, 134, 135, 100, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 148, 149, 150, 151, 152, -1, -1, 155, 156, + -1, 158, 159, 160, 161, 162, 163, 128, 165, -1, + -1, -1, -1, 134, 135, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 148, 149, 150, - 151, 152, -1, -1, 155, 156, 100, 158, 159, 160, - 161, 162, 163, -1, 165, 145, 146, 147, -1, -1, - 145, 146, 147, -1, -1, 100, 120, -1, 24, -1, - -1, -1, -1, 29, 128, 31, 32, -1, 34, -1, - 134, 135, -1, -1, -1, -1, 42, -1, -1, -1, - -1, -1, -1, 128, 148, 149, 150, 151, 152, 134, - 135, 155, 156, -1, 158, 159, 160, 161, 162, 163, - -1, 165, 68, 148, 149, 150, 151, 152, -1, -1, - 155, 156, -1, 158, 159, 160, 161, 162, 163, 85, - 165, 87, 88, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 102, -1, -1, -1, - 106, -1, 108, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 118 + 151, 152, -1, -1, 155, 156, -1, 158, 159, 160, + 161, 162, 163, -1, 165 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1333,18 +1335,18 @@ static const yytype_int16 yystos[] = 271, 3, 237, 3, 257, 187, 237, 180, 167, 265, 266, 267, 268, 269, 271, 282, 226, 238, 3, 231, 239, 239, 286, 188, 30, 167, 199, 167, 167, 167, - 198, 103, 120, 200, 167, 286, 195, 235, 168, 93, - 124, 107, 91, 116, 239, 239, 217, 166, 114, 240, - 167, 217, 235, 103, 166, 168, 168, 213, 25, 66, - 71, 77, 78, 94, 99, 283, 171, 124, 274, 275, - 276, 69, 227, 168, 167, 6, 6, 6, 6, 103, - 27, 60, 201, 286, 168, 168, 239, 197, 239, 239, - 116, 107, 168, 240, 217, 235, 168, 168, 168, 98, - 77, 77, 77, 98, 266, 3, 125, 6, 168, 171, - 168, 168, 168, 119, 168, 168, 168, 116, 239, 168, - 168, 275, 267, 266, 167, 235, 168, 6, 81, 130, - 286, 50, 228, 168, 167, 239, 284, 168, 239, 257, - 168 + 198, 27, 60, 103, 120, 200, 201, 167, 286, 195, + 235, 168, 93, 124, 107, 91, 116, 239, 239, 217, + 166, 114, 240, 167, 217, 235, 103, 166, 168, 168, + 213, 25, 66, 71, 77, 78, 94, 99, 283, 171, + 124, 274, 275, 276, 69, 227, 168, 167, 6, 6, + 6, 6, 119, 103, 201, 286, 168, 168, 239, 197, + 239, 239, 116, 107, 168, 240, 217, 235, 168, 168, + 168, 98, 77, 77, 77, 98, 266, 3, 125, 6, + 168, 171, 168, 168, 168, 168, 168, 168, 116, 239, + 168, 168, 275, 267, 266, 167, 235, 168, 6, 81, + 130, 286, 50, 228, 168, 167, 239, 284, 168, 239, + 257, 168 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ @@ -1358,27 +1360,27 @@ static const yytype_int16 yyr1[] = 193, 193, 194, 194, 195, 195, 196, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 198, 198, 199, 199, 199, 200, 200, 200, 201, - 201, 201, 202, 202, 203, 203, 203, 203, 204, 204, - 205, 206, 207, 208, 208, 209, 209, 210, 211, 211, - 212, 213, 213, 213, 214, 214, 215, 215, 216, 216, - 217, 217, 218, 219, 219, 219, 220, 220, 221, 222, - 222, 223, 224, 224, 225, 226, 226, 227, 227, 228, - 228, 229, 229, 230, 230, 231, 232, 232, 232, 233, - 233, 234, 234, 234, 234, 234, 234, 235, 235, 236, - 236, 237, 237, 238, 239, 239, 239, 239, 239, 240, + 201, 201, 201, 202, 202, 203, 203, 203, 203, 204, + 204, 205, 206, 207, 208, 208, 209, 209, 210, 211, + 211, 212, 213, 213, 213, 214, 214, 215, 215, 216, + 216, 217, 217, 218, 219, 219, 219, 220, 220, 221, + 222, 222, 223, 224, 224, 225, 226, 226, 227, 227, + 228, 228, 229, 229, 230, 230, 231, 232, 232, 232, + 233, 233, 234, 234, 234, 234, 234, 234, 235, 235, + 236, 236, 237, 237, 238, 239, 239, 239, 239, 239, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, - 241, 241, 242, 242, 242, 242, 242, 243, 243, 243, - 243, 243, 243, 243, 243, 243, 243, 243, 244, 244, - 245, 245, 245, 245, 246, 246, 246, 246, 247, 247, - 248, 248, 249, 249, 249, 249, 249, 249, 249, 250, - 250, 251, 252, 253, 253, 253, 253, 253, 253, 254, - 255, 256, 257, 257, 257, 257, 258, 258, 258, 258, - 258, 259, 260, 260, 261, 261, 262, 263, 264, 265, - 265, 266, 266, 267, 267, 268, 268, 269, 270, 271, - 271, 272, 272, 273, 274, 274, 275, 275, 276, 276, - 277, 277, 278, 278, 279, 280, 280, 281, 282, 282, - 282, 283, 283, 283, 283, 283, 283, 283, 283, 283, - 283, 284, 285, 285, 286, 286 + 240, 241, 241, 242, 242, 242, 242, 242, 243, 243, + 243, 243, 243, 243, 243, 243, 243, 243, 243, 244, + 244, 245, 245, 245, 245, 246, 246, 246, 246, 247, + 247, 248, 248, 249, 249, 249, 249, 249, 249, 249, + 250, 250, 251, 252, 253, 253, 253, 253, 253, 253, + 254, 255, 256, 257, 257, 257, 257, 258, 258, 258, + 258, 258, 259, 260, 260, 261, 261, 262, 263, 264, + 265, 265, 266, 266, 267, 267, 268, 268, 269, 270, + 271, 271, 272, 272, 273, 274, 274, 275, 275, 276, + 276, 277, 277, 278, 278, 279, 280, 280, 281, 282, + 282, 282, 283, 283, 283, 283, 283, 283, 283, 283, + 283, 283, 284, 285, 285, 286, 286 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -1389,30 +1391,30 @@ static const yytype_int8 yyr2[] = 5, 0, 1, 3, 1, 4, 2, 2, 2, 1, 0, 4, 1, 2, 5, 7, 5, 1, 1, 3, 0, 5, 2, 3, 2, 8, 7, 6, 9, 7, - 3, 0, 1, 3, 1, 1, 4, 1, 1, 1, + 3, 0, 1, 3, 1, 1, 3, 1, 1, 1, 1, 2, 1, 1, 4, 5, 4, 1, 2, 1, 1, 3, 0, 5, 3, 0, 1, 2, 0, 2, - 1, 0, 5, 4, 4, 4, 3, 6, 2, 0, - 7, 4, 2, 8, 5, 3, 0, 5, 1, 3, - 3, 2, 2, 6, 1, 1, 1, 3, 3, 3, - 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, 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, 6, 1, 1, 1, 1, 1, 1, 4, - 4, 5, 1, 3, 1, 3, 1, 1, 1, 1, + 1, 1, 2, 5, 4, 4, 4, 3, 6, 2, + 0, 7, 4, 2, 8, 5, 3, 0, 5, 1, + 3, 3, 2, 2, 6, 1, 1, 1, 3, 3, + 3, 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, 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, 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, 0, 1, 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, 3, 1, 1, 1, 4, 1, 3, 2, 1, + 1, 3, 1, 0, 1, 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 }; @@ -1964,31 +1966,31 @@ yydestruct (const char *yymsg, switch (yykind) { case YYSYMBOL_IDENTIFIER: /* IDENTIFIER */ -#line 154 "bison_parser.y" +#line 155 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1970 "bison_parser.cpp" +#line 1972 "bison_parser.cpp" break; case YYSYMBOL_STRING: /* STRING */ -#line 154 "bison_parser.y" +#line 155 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1976 "bison_parser.cpp" +#line 1978 "bison_parser.cpp" break; case YYSYMBOL_FLOATVAL: /* FLOATVAL */ -#line 152 "bison_parser.y" +#line 153 "bison_parser.y" { } -#line 1982 "bison_parser.cpp" +#line 1984 "bison_parser.cpp" break; case YYSYMBOL_INTVAL: /* INTVAL */ -#line 152 "bison_parser.y" +#line 153 "bison_parser.y" { } -#line 1988 "bison_parser.cpp" +#line 1990 "bison_parser.cpp" break; case YYSYMBOL_statement_list: /* statement_list */ -#line 155 "bison_parser.y" +#line 156 "bison_parser.y" { if ((((*yyvaluep).stmt_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).stmt_vec))) { @@ -1997,23 +1999,23 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).stmt_vec)); } -#line 2001 "bison_parser.cpp" +#line 2003 "bison_parser.cpp" break; case YYSYMBOL_statement: /* statement */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 2007 "bison_parser.cpp" +#line 2009 "bison_parser.cpp" break; case YYSYMBOL_preparable_statement: /* preparable_statement */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 2013 "bison_parser.cpp" +#line 2015 "bison_parser.cpp" break; case YYSYMBOL_opt_hints: /* opt_hints */ -#line 155 "bison_parser.y" +#line 156 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2022,11 +2024,11 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2026 "bison_parser.cpp" +#line 2028 "bison_parser.cpp" break; case YYSYMBOL_hint_list: /* hint_list */ -#line 155 "bison_parser.y" +#line 156 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2035,89 +2037,89 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2039 "bison_parser.cpp" +#line 2041 "bison_parser.cpp" break; case YYSYMBOL_hint: /* hint */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2045 "bison_parser.cpp" +#line 2047 "bison_parser.cpp" break; case YYSYMBOL_transaction_statement: /* transaction_statement */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).transaction_stmt)); } -#line 2051 "bison_parser.cpp" +#line 2053 "bison_parser.cpp" break; case YYSYMBOL_prepare_statement: /* prepare_statement */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).prep_stmt)); } -#line 2057 "bison_parser.cpp" +#line 2059 "bison_parser.cpp" break; case YYSYMBOL_prepare_target_query: /* prepare_target_query */ -#line 154 "bison_parser.y" +#line 155 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2063 "bison_parser.cpp" +#line 2065 "bison_parser.cpp" break; case YYSYMBOL_execute_statement: /* execute_statement */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).exec_stmt)); } -#line 2069 "bison_parser.cpp" +#line 2071 "bison_parser.cpp" break; case YYSYMBOL_import_statement: /* import_statement */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).import_stmt)); } -#line 2075 "bison_parser.cpp" +#line 2077 "bison_parser.cpp" break; case YYSYMBOL_file_type: /* file_type */ -#line 152 "bison_parser.y" +#line 153 "bison_parser.y" { } -#line 2081 "bison_parser.cpp" +#line 2083 "bison_parser.cpp" break; case YYSYMBOL_file_path: /* file_path */ -#line 154 "bison_parser.y" +#line 155 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2087 "bison_parser.cpp" +#line 2089 "bison_parser.cpp" break; case YYSYMBOL_opt_file_type: /* opt_file_type */ -#line 152 "bison_parser.y" +#line 153 "bison_parser.y" { } -#line 2093 "bison_parser.cpp" +#line 2095 "bison_parser.cpp" break; case YYSYMBOL_export_statement: /* export_statement */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).export_stmt)); } -#line 2099 "bison_parser.cpp" +#line 2101 "bison_parser.cpp" break; case YYSYMBOL_show_statement: /* show_statement */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).show_stmt)); } -#line 2105 "bison_parser.cpp" +#line 2107 "bison_parser.cpp" break; case YYSYMBOL_create_statement: /* create_statement */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).create_stmt)); } -#line 2111 "bison_parser.cpp" +#line 2113 "bison_parser.cpp" break; case YYSYMBOL_opt_not_exists: /* opt_not_exists */ -#line 152 "bison_parser.y" +#line 153 "bison_parser.y" { } -#line 2117 "bison_parser.cpp" +#line 2119 "bison_parser.cpp" break; case YYSYMBOL_table_elem_commalist: /* table_elem_commalist */ -#line 155 "bison_parser.y" +#line 156 "bison_parser.y" { if ((((*yyvaluep).table_element_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).table_element_vec))) { @@ -2126,95 +2128,95 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).table_element_vec)); } -#line 2130 "bison_parser.cpp" +#line 2132 "bison_parser.cpp" break; case YYSYMBOL_table_elem: /* table_elem */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).table_element_t)); } -#line 2136 "bison_parser.cpp" +#line 2138 "bison_parser.cpp" break; case YYSYMBOL_column_def: /* column_def */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).column_t)); } -#line 2142 "bison_parser.cpp" +#line 2144 "bison_parser.cpp" break; case YYSYMBOL_column_type: /* column_type */ -#line 152 "bison_parser.y" +#line 153 "bison_parser.y" { } -#line 2148 "bison_parser.cpp" +#line 2150 "bison_parser.cpp" break; case YYSYMBOL_opt_time_specification: /* opt_time_specification */ -#line 152 "bison_parser.y" +#line 153 "bison_parser.y" { } -#line 2154 "bison_parser.cpp" +#line 2156 "bison_parser.cpp" break; case YYSYMBOL_opt_decimal_specification: /* opt_decimal_specification */ -#line 152 "bison_parser.y" +#line 153 "bison_parser.y" { } -#line 2160 "bison_parser.cpp" +#line 2162 "bison_parser.cpp" break; - case YYSYMBOL_opt_column_nullable: /* opt_column_nullable */ -#line 152 "bison_parser.y" + case YYSYMBOL_opt_column_constraints: /* opt_column_constraints */ +#line 153 "bison_parser.y" { } -#line 2166 "bison_parser.cpp" +#line 2168 "bison_parser.cpp" break; - case YYSYMBOL_opt_column_constraint: /* opt_column_constraint */ -#line 152 "bison_parser.y" + case YYSYMBOL_column_constraint: /* column_constraint */ +#line 153 "bison_parser.y" { } -#line 2172 "bison_parser.cpp" +#line 2174 "bison_parser.cpp" break; case YYSYMBOL_table_constraint: /* table_constraint */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).table_constraint_t)); } -#line 2178 "bison_parser.cpp" +#line 2180 "bison_parser.cpp" break; case YYSYMBOL_drop_statement: /* drop_statement */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).drop_stmt)); } -#line 2184 "bison_parser.cpp" +#line 2186 "bison_parser.cpp" break; case YYSYMBOL_opt_exists: /* opt_exists */ -#line 152 "bison_parser.y" +#line 153 "bison_parser.y" { } -#line 2190 "bison_parser.cpp" +#line 2192 "bison_parser.cpp" break; case YYSYMBOL_alter_statement: /* alter_statement */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).alter_stmt)); } -#line 2196 "bison_parser.cpp" +#line 2198 "bison_parser.cpp" break; case YYSYMBOL_delete_statement: /* delete_statement */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2202 "bison_parser.cpp" +#line 2204 "bison_parser.cpp" break; case YYSYMBOL_truncate_statement: /* truncate_statement */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2208 "bison_parser.cpp" +#line 2210 "bison_parser.cpp" break; case YYSYMBOL_insert_statement: /* insert_statement */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).insert_stmt)); } -#line 2214 "bison_parser.cpp" +#line 2216 "bison_parser.cpp" break; case YYSYMBOL_opt_column_list: /* opt_column_list */ -#line 155 "bison_parser.y" +#line 156 "bison_parser.y" { if ((((*yyvaluep).str_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).str_vec))) { @@ -2223,17 +2225,17 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2227 "bison_parser.cpp" +#line 2229 "bison_parser.cpp" break; case YYSYMBOL_update_statement: /* update_statement */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).update_stmt)); } -#line 2233 "bison_parser.cpp" +#line 2235 "bison_parser.cpp" break; case YYSYMBOL_update_clause_commalist: /* update_clause_commalist */ -#line 155 "bison_parser.y" +#line 156 "bison_parser.y" { if ((((*yyvaluep).update_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).update_vec))) { @@ -2242,77 +2244,77 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).update_vec)); } -#line 2246 "bison_parser.cpp" +#line 2248 "bison_parser.cpp" break; case YYSYMBOL_update_clause: /* update_clause */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).update_t)); } -#line 2252 "bison_parser.cpp" +#line 2254 "bison_parser.cpp" break; case YYSYMBOL_select_statement: /* select_statement */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2258 "bison_parser.cpp" +#line 2260 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation: /* select_within_set_operation */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2264 "bison_parser.cpp" +#line 2266 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation_no_parentheses: /* select_within_set_operation_no_parentheses */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2270 "bison_parser.cpp" +#line 2272 "bison_parser.cpp" break; case YYSYMBOL_select_with_paren: /* select_with_paren */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2276 "bison_parser.cpp" +#line 2278 "bison_parser.cpp" break; case YYSYMBOL_select_no_paren: /* select_no_paren */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2282 "bison_parser.cpp" +#line 2284 "bison_parser.cpp" break; case YYSYMBOL_set_operator: /* set_operator */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2288 "bison_parser.cpp" +#line 2290 "bison_parser.cpp" break; case YYSYMBOL_set_type: /* set_type */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2294 "bison_parser.cpp" +#line 2296 "bison_parser.cpp" break; case YYSYMBOL_opt_all: /* opt_all */ -#line 152 "bison_parser.y" +#line 153 "bison_parser.y" { } -#line 2300 "bison_parser.cpp" +#line 2302 "bison_parser.cpp" break; case YYSYMBOL_select_clause: /* select_clause */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2306 "bison_parser.cpp" +#line 2308 "bison_parser.cpp" break; case YYSYMBOL_opt_distinct: /* opt_distinct */ -#line 152 "bison_parser.y" +#line 153 "bison_parser.y" { } -#line 2312 "bison_parser.cpp" +#line 2314 "bison_parser.cpp" break; case YYSYMBOL_select_list: /* select_list */ -#line 155 "bison_parser.y" +#line 156 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2321,41 +2323,41 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2325 "bison_parser.cpp" +#line 2327 "bison_parser.cpp" break; case YYSYMBOL_opt_from_clause: /* opt_from_clause */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2331 "bison_parser.cpp" +#line 2333 "bison_parser.cpp" break; case YYSYMBOL_from_clause: /* from_clause */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2337 "bison_parser.cpp" +#line 2339 "bison_parser.cpp" break; case YYSYMBOL_opt_where: /* opt_where */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2343 "bison_parser.cpp" +#line 2345 "bison_parser.cpp" break; case YYSYMBOL_opt_group: /* opt_group */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).group_t)); } -#line 2349 "bison_parser.cpp" +#line 2351 "bison_parser.cpp" break; case YYSYMBOL_opt_having: /* opt_having */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2355 "bison_parser.cpp" +#line 2357 "bison_parser.cpp" break; case YYSYMBOL_opt_order: /* opt_order */ -#line 155 "bison_parser.y" +#line 156 "bison_parser.y" { if ((((*yyvaluep).order_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).order_vec))) { @@ -2364,11 +2366,11 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2368 "bison_parser.cpp" +#line 2370 "bison_parser.cpp" break; case YYSYMBOL_order_list: /* order_list */ -#line 155 "bison_parser.y" +#line 156 "bison_parser.y" { if ((((*yyvaluep).order_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).order_vec))) { @@ -2377,35 +2379,35 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2381 "bison_parser.cpp" +#line 2383 "bison_parser.cpp" break; case YYSYMBOL_order_desc: /* order_desc */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).order)); } -#line 2387 "bison_parser.cpp" +#line 2389 "bison_parser.cpp" break; case YYSYMBOL_opt_order_type: /* opt_order_type */ -#line 152 "bison_parser.y" +#line 153 "bison_parser.y" { } -#line 2393 "bison_parser.cpp" +#line 2395 "bison_parser.cpp" break; case YYSYMBOL_opt_top: /* opt_top */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2399 "bison_parser.cpp" +#line 2401 "bison_parser.cpp" break; case YYSYMBOL_opt_limit: /* opt_limit */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2405 "bison_parser.cpp" +#line 2407 "bison_parser.cpp" break; case YYSYMBOL_expr_list: /* expr_list */ -#line 155 "bison_parser.y" +#line 156 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2414,11 +2416,11 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2418 "bison_parser.cpp" +#line 2420 "bison_parser.cpp" break; case YYSYMBOL_opt_literal_list: /* opt_literal_list */ -#line 155 "bison_parser.y" +#line 156 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2427,11 +2429,11 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2431 "bison_parser.cpp" +#line 2433 "bison_parser.cpp" break; case YYSYMBOL_literal_list: /* literal_list */ -#line 155 "bison_parser.y" +#line 156 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2440,191 +2442,191 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2444 "bison_parser.cpp" +#line 2446 "bison_parser.cpp" break; case YYSYMBOL_expr_alias: /* expr_alias */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2450 "bison_parser.cpp" +#line 2452 "bison_parser.cpp" break; case YYSYMBOL_expr: /* expr */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2456 "bison_parser.cpp" +#line 2458 "bison_parser.cpp" break; case YYSYMBOL_operand: /* operand */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2462 "bison_parser.cpp" +#line 2464 "bison_parser.cpp" break; case YYSYMBOL_scalar_expr: /* scalar_expr */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2468 "bison_parser.cpp" +#line 2470 "bison_parser.cpp" break; case YYSYMBOL_unary_expr: /* unary_expr */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2474 "bison_parser.cpp" +#line 2476 "bison_parser.cpp" break; case YYSYMBOL_binary_expr: /* binary_expr */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2480 "bison_parser.cpp" +#line 2482 "bison_parser.cpp" break; case YYSYMBOL_logic_expr: /* logic_expr */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2486 "bison_parser.cpp" +#line 2488 "bison_parser.cpp" break; case YYSYMBOL_in_expr: /* in_expr */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2492 "bison_parser.cpp" +#line 2494 "bison_parser.cpp" break; case YYSYMBOL_case_expr: /* case_expr */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2498 "bison_parser.cpp" +#line 2500 "bison_parser.cpp" break; case YYSYMBOL_case_list: /* case_list */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2504 "bison_parser.cpp" +#line 2506 "bison_parser.cpp" break; case YYSYMBOL_exists_expr: /* exists_expr */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2510 "bison_parser.cpp" +#line 2512 "bison_parser.cpp" break; case YYSYMBOL_comp_expr: /* comp_expr */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2516 "bison_parser.cpp" +#line 2518 "bison_parser.cpp" break; case YYSYMBOL_function_expr: /* function_expr */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2522 "bison_parser.cpp" +#line 2524 "bison_parser.cpp" break; case YYSYMBOL_extract_expr: /* extract_expr */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2528 "bison_parser.cpp" +#line 2530 "bison_parser.cpp" break; case YYSYMBOL_cast_expr: /* cast_expr */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2534 "bison_parser.cpp" +#line 2536 "bison_parser.cpp" break; case YYSYMBOL_datetime_field: /* datetime_field */ -#line 152 "bison_parser.y" +#line 153 "bison_parser.y" { } -#line 2540 "bison_parser.cpp" +#line 2542 "bison_parser.cpp" break; case YYSYMBOL_array_expr: /* array_expr */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2546 "bison_parser.cpp" +#line 2548 "bison_parser.cpp" break; case YYSYMBOL_array_index: /* array_index */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2552 "bison_parser.cpp" +#line 2554 "bison_parser.cpp" break; case YYSYMBOL_between_expr: /* between_expr */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2558 "bison_parser.cpp" +#line 2560 "bison_parser.cpp" break; case YYSYMBOL_column_name: /* column_name */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2564 "bison_parser.cpp" +#line 2566 "bison_parser.cpp" break; case YYSYMBOL_literal: /* literal */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2570 "bison_parser.cpp" +#line 2572 "bison_parser.cpp" break; case YYSYMBOL_string_literal: /* string_literal */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2576 "bison_parser.cpp" +#line 2578 "bison_parser.cpp" break; case YYSYMBOL_bool_literal: /* bool_literal */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2582 "bison_parser.cpp" +#line 2584 "bison_parser.cpp" break; case YYSYMBOL_num_literal: /* num_literal */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2588 "bison_parser.cpp" +#line 2590 "bison_parser.cpp" break; case YYSYMBOL_int_literal: /* int_literal */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2594 "bison_parser.cpp" +#line 2596 "bison_parser.cpp" break; case YYSYMBOL_null_literal: /* null_literal */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2600 "bison_parser.cpp" +#line 2602 "bison_parser.cpp" break; case YYSYMBOL_param_expr: /* param_expr */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2606 "bison_parser.cpp" +#line 2608 "bison_parser.cpp" break; case YYSYMBOL_table_ref: /* table_ref */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2612 "bison_parser.cpp" +#line 2614 "bison_parser.cpp" break; case YYSYMBOL_table_ref_atomic: /* table_ref_atomic */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2618 "bison_parser.cpp" +#line 2620 "bison_parser.cpp" break; case YYSYMBOL_nonjoin_table_ref_atomic: /* nonjoin_table_ref_atomic */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2624 "bison_parser.cpp" +#line 2626 "bison_parser.cpp" break; case YYSYMBOL_table_ref_commalist: /* table_ref_commalist */ -#line 155 "bison_parser.y" +#line 156 "bison_parser.y" { if ((((*yyvaluep).table_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).table_vec))) { @@ -2633,107 +2635,107 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).table_vec)); } -#line 2637 "bison_parser.cpp" +#line 2639 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name: /* table_ref_name */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2643 "bison_parser.cpp" +#line 2645 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name_no_alias: /* table_ref_name_no_alias */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2649 "bison_parser.cpp" +#line 2651 "bison_parser.cpp" break; case YYSYMBOL_table_name: /* table_name */ -#line 153 "bison_parser.y" +#line 154 "bison_parser.y" { free( (((*yyvaluep).table_name).name) ); free( (((*yyvaluep).table_name).schema) ); } -#line 2655 "bison_parser.cpp" +#line 2657 "bison_parser.cpp" break; case YYSYMBOL_opt_index_name: /* opt_index_name */ -#line 154 "bison_parser.y" +#line 155 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2661 "bison_parser.cpp" +#line 2663 "bison_parser.cpp" break; case YYSYMBOL_index_name: /* index_name */ -#line 154 "bison_parser.y" +#line 155 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2667 "bison_parser.cpp" +#line 2669 "bison_parser.cpp" break; case YYSYMBOL_table_alias: /* table_alias */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2673 "bison_parser.cpp" +#line 2675 "bison_parser.cpp" break; case YYSYMBOL_opt_table_alias: /* opt_table_alias */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2679 "bison_parser.cpp" +#line 2681 "bison_parser.cpp" break; case YYSYMBOL_alias: /* alias */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2685 "bison_parser.cpp" +#line 2687 "bison_parser.cpp" break; case YYSYMBOL_opt_alias: /* opt_alias */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2691 "bison_parser.cpp" +#line 2693 "bison_parser.cpp" break; case YYSYMBOL_opt_with_clause: /* opt_with_clause */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2697 "bison_parser.cpp" +#line 2699 "bison_parser.cpp" break; case YYSYMBOL_with_clause: /* with_clause */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2703 "bison_parser.cpp" +#line 2705 "bison_parser.cpp" break; case YYSYMBOL_with_description_list: /* with_description_list */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2709 "bison_parser.cpp" +#line 2711 "bison_parser.cpp" break; case YYSYMBOL_with_description: /* with_description */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).with_description_t)); } -#line 2715 "bison_parser.cpp" +#line 2717 "bison_parser.cpp" break; case YYSYMBOL_join_clause: /* join_clause */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2721 "bison_parser.cpp" +#line 2723 "bison_parser.cpp" break; case YYSYMBOL_opt_join_type: /* opt_join_type */ -#line 152 "bison_parser.y" +#line 153 "bison_parser.y" { } -#line 2727 "bison_parser.cpp" +#line 2729 "bison_parser.cpp" break; case YYSYMBOL_join_condition: /* join_condition */ -#line 163 "bison_parser.y" +#line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2733 "bison_parser.cpp" +#line 2735 "bison_parser.cpp" break; case YYSYMBOL_ident_commalist: /* ident_commalist */ -#line 155 "bison_parser.y" +#line 156 "bison_parser.y" { if ((((*yyvaluep).str_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).str_vec))) { @@ -2742,7 +2744,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2746 "bison_parser.cpp" +#line 2748 "bison_parser.cpp" break; default: @@ -2849,7 +2851,7 @@ YYLTYPE yylloc = yyloc_default; yylloc.string_length = 0; } -#line 2853 "bison_parser.cpp" +#line 2855 "bison_parser.cpp" yylsp[0] = yylloc; goto yysetstate; @@ -3059,7 +3061,7 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* input: statement_list opt_semicolon */ -#line 282 "bison_parser.y" +#line 284 "bison_parser.y" { for (SQLStatement* stmt : *(yyvsp[-1].stmt_vec)) { // Transfers ownership of the statement. @@ -3077,253 +3079,253 @@ YYLTYPE yylloc = yyloc_default; } delete (yyvsp[-1].stmt_vec); } -#line 3081 "bison_parser.cpp" +#line 3083 "bison_parser.cpp" break; case 3: /* statement_list: statement */ -#line 303 "bison_parser.y" +#line 305 "bison_parser.y" { (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 3092 "bison_parser.cpp" +#line 3094 "bison_parser.cpp" break; case 4: /* statement_list: statement_list ';' statement */ -#line 309 "bison_parser.y" +#line 311 "bison_parser.y" { (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 3103 "bison_parser.cpp" +#line 3105 "bison_parser.cpp" break; case 5: /* statement: prepare_statement opt_hints */ -#line 318 "bison_parser.y" +#line 320 "bison_parser.y" { (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3112 "bison_parser.cpp" +#line 3114 "bison_parser.cpp" break; case 6: /* statement: preparable_statement opt_hints */ -#line 322 "bison_parser.y" +#line 324 "bison_parser.y" { (yyval.statement) = (yyvsp[-1].statement); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3121 "bison_parser.cpp" +#line 3123 "bison_parser.cpp" break; case 7: /* statement: show_statement */ -#line 326 "bison_parser.y" +#line 328 "bison_parser.y" { (yyval.statement) = (yyvsp[0].show_stmt); } -#line 3129 "bison_parser.cpp" +#line 3131 "bison_parser.cpp" break; case 8: /* statement: import_statement */ -#line 329 "bison_parser.y" +#line 331 "bison_parser.y" { (yyval.statement) = (yyvsp[0].import_stmt); } -#line 3137 "bison_parser.cpp" +#line 3139 "bison_parser.cpp" break; case 9: /* statement: export_statement */ -#line 332 "bison_parser.y" +#line 334 "bison_parser.y" { (yyval.statement) = (yyvsp[0].export_stmt); } -#line 3145 "bison_parser.cpp" +#line 3147 "bison_parser.cpp" break; case 10: /* preparable_statement: select_statement */ -#line 339 "bison_parser.y" +#line 341 "bison_parser.y" { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 3151 "bison_parser.cpp" +#line 3153 "bison_parser.cpp" break; case 11: /* preparable_statement: create_statement */ -#line 340 "bison_parser.y" +#line 342 "bison_parser.y" { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 3157 "bison_parser.cpp" +#line 3159 "bison_parser.cpp" break; case 12: /* preparable_statement: insert_statement */ -#line 341 "bison_parser.y" +#line 343 "bison_parser.y" { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 3163 "bison_parser.cpp" +#line 3165 "bison_parser.cpp" break; case 13: /* preparable_statement: delete_statement */ -#line 342 "bison_parser.y" +#line 344 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3169 "bison_parser.cpp" +#line 3171 "bison_parser.cpp" break; case 14: /* preparable_statement: truncate_statement */ -#line 343 "bison_parser.y" +#line 345 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3175 "bison_parser.cpp" +#line 3177 "bison_parser.cpp" break; case 15: /* preparable_statement: update_statement */ -#line 344 "bison_parser.y" +#line 346 "bison_parser.y" { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 3181 "bison_parser.cpp" +#line 3183 "bison_parser.cpp" break; case 16: /* preparable_statement: drop_statement */ -#line 345 "bison_parser.y" +#line 347 "bison_parser.y" { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 3187 "bison_parser.cpp" +#line 3189 "bison_parser.cpp" break; case 17: /* preparable_statement: alter_statement */ -#line 346 "bison_parser.y" +#line 348 "bison_parser.y" { (yyval.statement) = (yyvsp[0].alter_stmt); } -#line 3193 "bison_parser.cpp" +#line 3195 "bison_parser.cpp" break; case 18: /* preparable_statement: execute_statement */ -#line 347 "bison_parser.y" +#line 349 "bison_parser.y" { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 3199 "bison_parser.cpp" +#line 3201 "bison_parser.cpp" break; case 19: /* preparable_statement: transaction_statement */ -#line 348 "bison_parser.y" +#line 350 "bison_parser.y" { (yyval.statement) = (yyvsp[0].transaction_stmt); } -#line 3205 "bison_parser.cpp" +#line 3207 "bison_parser.cpp" break; case 20: /* opt_hints: WITH HINT '(' hint_list ')' */ -#line 357 "bison_parser.y" +#line 359 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 3211 "bison_parser.cpp" +#line 3213 "bison_parser.cpp" break; case 21: /* opt_hints: %empty */ -#line 358 "bison_parser.y" +#line 360 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 3217 "bison_parser.cpp" +#line 3219 "bison_parser.cpp" break; case 22: /* hint_list: hint */ -#line 363 "bison_parser.y" +#line 365 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3223 "bison_parser.cpp" +#line 3225 "bison_parser.cpp" break; case 23: /* hint_list: hint_list ',' hint */ -#line 364 "bison_parser.y" +#line 366 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3229 "bison_parser.cpp" +#line 3231 "bison_parser.cpp" break; case 24: /* hint: IDENTIFIER */ -#line 368 "bison_parser.y" +#line 370 "bison_parser.y" { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[0].sval); } -#line 3238 "bison_parser.cpp" +#line 3240 "bison_parser.cpp" break; case 25: /* hint: IDENTIFIER '(' literal_list ')' */ -#line 372 "bison_parser.y" +#line 374 "bison_parser.y" { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[-3].sval); (yyval.expr)->exprList = (yyvsp[-1].expr_vec); } -#line 3248 "bison_parser.cpp" +#line 3250 "bison_parser.cpp" break; case 26: /* transaction_statement: BEGIN opt_transaction_keyword */ -#line 384 "bison_parser.y" +#line 386 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kBeginTransaction); } -#line 3256 "bison_parser.cpp" +#line 3258 "bison_parser.cpp" break; case 27: /* transaction_statement: ROLLBACK opt_transaction_keyword */ -#line 387 "bison_parser.y" +#line 389 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kRollbackTransaction); } -#line 3264 "bison_parser.cpp" +#line 3266 "bison_parser.cpp" break; case 28: /* transaction_statement: COMMIT opt_transaction_keyword */ -#line 390 "bison_parser.y" +#line 392 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kCommitTransaction); } -#line 3272 "bison_parser.cpp" +#line 3274 "bison_parser.cpp" break; case 31: /* prepare_statement: PREPARE IDENTIFIER FROM prepare_target_query */ -#line 404 "bison_parser.y" +#line 406 "bison_parser.y" { (yyval.prep_stmt) = new PrepareStatement(); (yyval.prep_stmt)->name = (yyvsp[-2].sval); (yyval.prep_stmt)->query = (yyvsp[0].sval); } -#line 3282 "bison_parser.cpp" +#line 3284 "bison_parser.cpp" break; case 33: /* execute_statement: EXECUTE IDENTIFIER */ -#line 414 "bison_parser.y" +#line 416 "bison_parser.y" { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[0].sval); } -#line 3291 "bison_parser.cpp" +#line 3293 "bison_parser.cpp" break; case 34: /* execute_statement: EXECUTE IDENTIFIER '(' opt_literal_list ')' */ -#line 418 "bison_parser.y" +#line 420 "bison_parser.y" { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[-3].sval); (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); } -#line 3301 "bison_parser.cpp" +#line 3303 "bison_parser.cpp" break; case 35: /* import_statement: IMPORT FROM file_type FILE file_path INTO table_name */ -#line 432 "bison_parser.y" +#line 434 "bison_parser.y" { (yyval.import_stmt) = new ImportStatement((yyvsp[-4].import_type_t)); (yyval.import_stmt)->filePath = (yyvsp[-2].sval); (yyval.import_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3312 "bison_parser.cpp" +#line 3314 "bison_parser.cpp" break; case 36: /* import_statement: COPY table_name FROM file_path opt_file_type */ -#line 438 "bison_parser.y" +#line 440 "bison_parser.y" { (yyval.import_stmt) = new ImportStatement((yyvsp[0].import_type_t)); (yyval.import_stmt)->filePath = (yyvsp[-1].sval); (yyval.import_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3323 "bison_parser.cpp" +#line 3325 "bison_parser.cpp" break; case 37: /* file_type: IDENTIFIER */ -#line 447 "bison_parser.y" +#line 449 "bison_parser.y" { if (strcasecmp((yyvsp[0].sval), "csv") == 0) { (yyval.import_type_t) = kImportCSV; @@ -3338,70 +3340,70 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[0].sval)); } -#line 3342 "bison_parser.cpp" +#line 3344 "bison_parser.cpp" break; case 38: /* file_path: string_literal */ -#line 464 "bison_parser.y" +#line 466 "bison_parser.y" { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 3348 "bison_parser.cpp" +#line 3350 "bison_parser.cpp" break; case 39: /* opt_file_type: WITH FORMAT file_type */ -#line 468 "bison_parser.y" +#line 470 "bison_parser.y" { (yyval.import_type_t) = (yyvsp[0].import_type_t); } -#line 3356 "bison_parser.cpp" +#line 3358 "bison_parser.cpp" break; case 40: /* opt_file_type: %empty */ -#line 471 "bison_parser.y" +#line 473 "bison_parser.y" { (yyval.import_type_t) = kImportAuto; } -#line 3362 "bison_parser.cpp" +#line 3364 "bison_parser.cpp" break; case 41: /* export_statement: COPY table_name TO file_path opt_file_type */ -#line 480 "bison_parser.y" +#line 482 "bison_parser.y" { (yyval.export_stmt) = new ExportStatement((yyvsp[0].import_type_t)); (yyval.export_stmt)->filePath = (yyvsp[-1].sval); (yyval.export_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.export_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3373 "bison_parser.cpp" +#line 3375 "bison_parser.cpp" break; case 42: /* show_statement: SHOW TABLES */ -#line 494 "bison_parser.y" +#line 496 "bison_parser.y" { (yyval.show_stmt) = new ShowStatement(kShowTables); } -#line 3381 "bison_parser.cpp" +#line 3383 "bison_parser.cpp" break; case 43: /* show_statement: SHOW COLUMNS table_name */ -#line 497 "bison_parser.y" +#line 499 "bison_parser.y" { (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 3391 "bison_parser.cpp" +#line 3393 "bison_parser.cpp" break; case 44: /* show_statement: DESCRIBE table_name */ -#line 502 "bison_parser.y" +#line 504 "bison_parser.y" { (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 3401 "bison_parser.cpp" +#line 3403 "bison_parser.cpp" break; case 45: /* create_statement: CREATE TABLE opt_not_exists table_name FROM IDENTIFIER FILE file_path */ -#line 516 "bison_parser.y" +#line 518 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTableFromTbl); (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); @@ -3415,11 +3417,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].sval)); (yyval.create_stmt)->filePath = (yyvsp[0].sval); } -#line 3419 "bison_parser.cpp" +#line 3421 "bison_parser.cpp" break; case 46: /* create_statement: CREATE TABLE opt_not_exists table_name '(' table_elem_commalist ')' */ -#line 529 "bison_parser.y" +#line 531 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -3427,11 +3429,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->setColumnDefsAndConstraints((yyvsp[-1].table_element_vec)); } -#line 3431 "bison_parser.cpp" +#line 3433 "bison_parser.cpp" break; case 47: /* create_statement: CREATE TABLE opt_not_exists table_name AS select_statement */ -#line 536 "bison_parser.y" +#line 538 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-3].bval); @@ -3439,11 +3441,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-2].table_name).name; (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3443 "bison_parser.cpp" +#line 3445 "bison_parser.cpp" break; case 48: /* create_statement: CREATE INDEX opt_not_exists opt_index_name ON table_name '(' ident_commalist ')' */ -#line 543 "bison_parser.y" +#line 545 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateIndex); (yyval.create_stmt)->indexName = (yyvsp[-5].sval); @@ -3451,11 +3453,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->indexColumns = (yyvsp[-1].str_vec); } -#line 3455 "bison_parser.cpp" +#line 3457 "bison_parser.cpp" break; case 49: /* create_statement: CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement */ -#line 550 "bison_parser.y" +#line 552 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateView); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -3464,272 +3466,279 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3468 "bison_parser.cpp" +#line 3470 "bison_parser.cpp" break; case 50: /* opt_not_exists: IF NOT EXISTS */ -#line 561 "bison_parser.y" +#line 563 "bison_parser.y" { (yyval.bval) = true; } -#line 3474 "bison_parser.cpp" +#line 3476 "bison_parser.cpp" break; case 51: /* opt_not_exists: %empty */ -#line 562 "bison_parser.y" +#line 564 "bison_parser.y" { (yyval.bval) = false; } -#line 3480 "bison_parser.cpp" +#line 3482 "bison_parser.cpp" break; case 52: /* table_elem_commalist: table_elem */ -#line 566 "bison_parser.y" +#line 568 "bison_parser.y" { (yyval.table_element_vec) = new std::vector(); (yyval.table_element_vec)->push_back((yyvsp[0].table_element_t)); } -#line 3486 "bison_parser.cpp" +#line 3488 "bison_parser.cpp" break; case 53: /* table_elem_commalist: table_elem_commalist ',' table_elem */ -#line 567 "bison_parser.y" +#line 569 "bison_parser.y" { (yyvsp[-2].table_element_vec)->push_back((yyvsp[0].table_element_t)); (yyval.table_element_vec) = (yyvsp[-2].table_element_vec); } -#line 3492 "bison_parser.cpp" +#line 3494 "bison_parser.cpp" break; case 54: /* table_elem: column_def */ -#line 571 "bison_parser.y" +#line 573 "bison_parser.y" { (yyval.table_element_t) = (yyvsp[0].column_t); } -#line 3498 "bison_parser.cpp" +#line 3500 "bison_parser.cpp" break; case 55: /* table_elem: table_constraint */ -#line 572 "bison_parser.y" +#line 574 "bison_parser.y" { (yyval.table_element_t) = (yyvsp[0].table_constraint_t); } -#line 3504 "bison_parser.cpp" +#line 3506 "bison_parser.cpp" break; - case 56: /* column_def: IDENTIFIER column_type opt_column_nullable opt_column_constraint */ -#line 576 "bison_parser.y" - { - (yyval.column_t) = new ColumnDefinition((yyvsp[-3].sval), (yyvsp[-2].column_type_t), (yyvsp[-1].bval), (yyvsp[0].column_constraint_t)); + case 56: /* column_def: IDENTIFIER column_type opt_column_constraints */ +#line 578 "bison_parser.y" + { + (yyval.column_t) = new ColumnDefinition((yyvsp[-2].sval), (yyvsp[-1].column_type_t), (yyvsp[0].column_constraint_vec)); + (yyval.column_t)->setNullableExplicit(); } -#line 3512 "bison_parser.cpp" +#line 3515 "bison_parser.cpp" break; case 57: /* column_type: INT */ -#line 582 "bison_parser.y" +#line 585 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3518 "bison_parser.cpp" +#line 3521 "bison_parser.cpp" break; case 58: /* column_type: INTEGER */ -#line 583 "bison_parser.y" +#line 586 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3524 "bison_parser.cpp" +#line 3527 "bison_parser.cpp" break; case 59: /* column_type: LONG */ -#line 584 "bison_parser.y" +#line 587 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::LONG}; } -#line 3530 "bison_parser.cpp" +#line 3533 "bison_parser.cpp" break; case 60: /* column_type: FLOAT */ -#line 585 "bison_parser.y" +#line 588 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3536 "bison_parser.cpp" +#line 3539 "bison_parser.cpp" break; case 61: /* column_type: DECIMAL opt_decimal_specification */ -#line 586 "bison_parser.y" +#line 589 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DECIMAL, 0, (yyvsp[0].column_specification_t)}; } -#line 3542 "bison_parser.cpp" +#line 3545 "bison_parser.cpp" break; case 62: /* column_type: DOUBLE */ -#line 587 "bison_parser.y" +#line 590 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } -#line 3548 "bison_parser.cpp" +#line 3551 "bison_parser.cpp" break; case 63: /* column_type: REAL */ -#line 588 "bison_parser.y" +#line 591 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::REAL}; } -#line 3554 "bison_parser.cpp" +#line 3557 "bison_parser.cpp" break; case 64: /* column_type: VARCHAR '(' INTVAL ')' */ -#line 589 "bison_parser.y" +#line 592 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3560 "bison_parser.cpp" +#line 3563 "bison_parser.cpp" break; case 65: /* column_type: CHARACTER VARYING '(' INTVAL ')' */ -#line 590 "bison_parser.y" +#line 593 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR_VARYING, (yyvsp[-1].ival)}; } -#line 3566 "bison_parser.cpp" +#line 3569 "bison_parser.cpp" break; case 66: /* column_type: CHAR '(' INTVAL ')' */ -#line 591 "bison_parser.y" +#line 594 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } -#line 3572 "bison_parser.cpp" +#line 3575 "bison_parser.cpp" break; case 67: /* column_type: TEXT */ -#line 592 "bison_parser.y" +#line 595 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } -#line 3578 "bison_parser.cpp" +#line 3581 "bison_parser.cpp" break; case 68: /* column_type: TIME opt_time_specification */ -#line 593 "bison_parser.y" +#line 596 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TIME, 0, (yyvsp[0].column_specification_t) }; } -#line 3584 "bison_parser.cpp" +#line 3587 "bison_parser.cpp" break; case 69: /* column_type: DATETIME */ -#line 594 "bison_parser.y" +#line 597 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } -#line 3590 "bison_parser.cpp" +#line 3593 "bison_parser.cpp" break; case 70: /* column_type: DATE */ -#line 595 "bison_parser.y" +#line 598 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATE}; } -#line 3596 "bison_parser.cpp" +#line 3599 "bison_parser.cpp" break; case 71: /* opt_time_specification: '(' INTVAL ')' */ -#line 599 "bison_parser.y" +#line 602 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-1].ival)}; } -#line 3602 "bison_parser.cpp" +#line 3605 "bison_parser.cpp" break; case 72: /* opt_time_specification: %empty */ -#line 600 "bison_parser.y" +#line 603 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{}; } -#line 3608 "bison_parser.cpp" +#line 3611 "bison_parser.cpp" break; case 73: /* opt_decimal_specification: '(' INTVAL ',' INTVAL ')' */ -#line 604 "bison_parser.y" +#line 607 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-3].ival), (yyvsp[-1].ival)}; } -#line 3614 "bison_parser.cpp" +#line 3617 "bison_parser.cpp" break; case 74: /* opt_decimal_specification: '(' INTVAL ')' */ -#line 605 "bison_parser.y" +#line 608 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-1].ival)}; } -#line 3620 "bison_parser.cpp" +#line 3623 "bison_parser.cpp" break; case 75: /* opt_decimal_specification: %empty */ -#line 606 "bison_parser.y" +#line 609 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{}; } -#line 3626 "bison_parser.cpp" +#line 3629 "bison_parser.cpp" break; - case 76: /* opt_column_nullable: NULL */ -#line 610 "bison_parser.y" - { (yyval.bval) = true; } -#line 3632 "bison_parser.cpp" + case 76: /* opt_column_constraints: column_constraint */ +#line 613 "bison_parser.y" + { (yyval.column_constraint_vec) = new std::vector(); (yyval.column_constraint_vec)->push_back((yyvsp[0].column_constraint_t)); } +#line 3635 "bison_parser.cpp" break; - case 77: /* opt_column_nullable: NOT NULL */ -#line 611 "bison_parser.y" - { (yyval.bval) = false; } -#line 3638 "bison_parser.cpp" + case 77: /* opt_column_constraints: opt_column_constraints column_constraint */ +#line 614 "bison_parser.y" + { (yyvsp[-1].column_constraint_vec)->push_back((yyvsp[0].column_constraint_t)); (yyval.column_constraint_vec) = (yyvsp[-1].column_constraint_vec); } +#line 3641 "bison_parser.cpp" break; - case 78: /* opt_column_nullable: %empty */ -#line 612 "bison_parser.y" - { (yyval.bval) = false; } -#line 3644 "bison_parser.cpp" + case 78: /* opt_column_constraints: %empty */ +#line 615 "bison_parser.y" + { (yyval.column_constraint_vec) = new std::vector(); } +#line 3647 "bison_parser.cpp" break; - case 79: /* opt_column_constraint: PRIMARY KEY */ -#line 616 "bison_parser.y" + case 79: /* column_constraint: PRIMARY KEY */ +#line 619 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::PRIMARY_KEY; } -#line 3650 "bison_parser.cpp" +#line 3653 "bison_parser.cpp" break; - case 80: /* opt_column_constraint: UNIQUE */ -#line 617 "bison_parser.y" + case 80: /* column_constraint: UNIQUE */ +#line 620 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::UNIQUE; } -#line 3656 "bison_parser.cpp" +#line 3659 "bison_parser.cpp" break; - case 81: /* opt_column_constraint: %empty */ -#line 618 "bison_parser.y" - { (yyval.column_constraint_t) = ConstraintType::NOT_SET; } -#line 3662 "bison_parser.cpp" + case 81: /* column_constraint: NULL */ +#line 621 "bison_parser.y" + { (yyval.column_constraint_t) = ConstraintType::_NULL; } +#line 3665 "bison_parser.cpp" break; - case 82: /* table_constraint: PRIMARY KEY '(' ident_commalist ')' */ + case 82: /* column_constraint: NOT NULL */ #line 622 "bison_parser.y" + { (yyval.column_constraint_t) = ConstraintType::NOTNULL; } +#line 3671 "bison_parser.cpp" + break; + + case 83: /* table_constraint: PRIMARY KEY '(' ident_commalist ')' */ +#line 626 "bison_parser.y" { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::PRIMARY_KEY, (yyvsp[-1].str_vec)); } -#line 3668 "bison_parser.cpp" +#line 3677 "bison_parser.cpp" break; - case 83: /* table_constraint: UNIQUE '(' ident_commalist ')' */ -#line 623 "bison_parser.y" + case 84: /* table_constraint: UNIQUE '(' ident_commalist ')' */ +#line 627 "bison_parser.y" { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::UNIQUE, (yyvsp[-1].str_vec)); } -#line 3674 "bison_parser.cpp" +#line 3683 "bison_parser.cpp" break; - case 84: /* drop_statement: DROP TABLE opt_exists table_name */ -#line 634 "bison_parser.y" + case 85: /* drop_statement: DROP TABLE opt_exists table_name */ +#line 638 "bison_parser.y" { (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 3685 "bison_parser.cpp" +#line 3694 "bison_parser.cpp" break; - case 85: /* drop_statement: DROP VIEW opt_exists table_name */ -#line 640 "bison_parser.y" + case 86: /* drop_statement: DROP VIEW opt_exists table_name */ +#line 644 "bison_parser.y" { (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 3696 "bison_parser.cpp" +#line 3705 "bison_parser.cpp" break; - case 86: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ -#line 646 "bison_parser.y" + case 87: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ +#line 650 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); (yyval.drop_stmt)->ifExists = false; (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 3706 "bison_parser.cpp" +#line 3715 "bison_parser.cpp" break; - case 87: /* drop_statement: DROP INDEX opt_exists index_name ON table_name */ -#line 651 "bison_parser.y" + case 88: /* drop_statement: DROP INDEX opt_exists index_name ON table_name */ +#line 655 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropIndex); (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; (yyval.drop_stmt)->ifExists = (yyvsp[-3].bval); (yyval.drop_stmt)->indexName = (yyvsp[-2].sval); } -#line 3717 "bison_parser.cpp" +#line 3726 "bison_parser.cpp" break; - case 88: /* opt_exists: IF EXISTS */ -#line 660 "bison_parser.y" + case 89: /* opt_exists: IF EXISTS */ +#line 664 "bison_parser.y" { (yyval.bval) = true; } -#line 3723 "bison_parser.cpp" +#line 3732 "bison_parser.cpp" break; - case 89: /* opt_exists: %empty */ -#line 661 "bison_parser.y" + case 90: /* opt_exists: %empty */ +#line 665 "bison_parser.y" { (yyval.bval) = false; } -#line 3729 "bison_parser.cpp" +#line 3738 "bison_parser.cpp" break; - case 90: /* alter_statement: ALTER TABLE table_name DROP COLUMN opt_exists column_name */ -#line 670 "bison_parser.y" + case 91: /* alter_statement: ALTER TABLE table_name DROP COLUMN opt_exists column_name */ +#line 674 "bison_parser.y" { (yyval.alter_stmt) = new AlterStatement(kAlterDropColumn); (yyval.alter_stmt)->ifExists = (yyvsp[-1].bval); @@ -3737,32 +3746,32 @@ YYLTYPE yylloc = yyloc_default; (yyval.alter_stmt)->name = (yyvsp[-4].table_name).name; (yyval.alter_stmt)->columnName = (yyvsp[0].expr)->name; } -#line 3741 "bison_parser.cpp" +#line 3750 "bison_parser.cpp" break; - case 91: /* delete_statement: DELETE FROM table_name opt_where */ -#line 685 "bison_parser.y" + case 92: /* delete_statement: DELETE FROM table_name opt_where */ +#line 689 "bison_parser.y" { (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 3752 "bison_parser.cpp" +#line 3761 "bison_parser.cpp" break; - case 92: /* truncate_statement: TRUNCATE table_name */ -#line 694 "bison_parser.y" + case 93: /* truncate_statement: TRUNCATE table_name */ +#line 698 "bison_parser.y" { (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3762 "bison_parser.cpp" +#line 3771 "bison_parser.cpp" break; - case 93: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ -#line 707 "bison_parser.y" + case 94: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ +#line 711 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertValues); (yyval.insert_stmt)->schema = (yyvsp[-5].table_name).schema; @@ -3770,11 +3779,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } -#line 3774 "bison_parser.cpp" +#line 3783 "bison_parser.cpp" break; - case 94: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ -#line 714 "bison_parser.y" + case 95: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ +#line 718 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertSelect); (yyval.insert_stmt)->schema = (yyvsp[-2].table_name).schema; @@ -3782,74 +3791,74 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } -#line 3786 "bison_parser.cpp" +#line 3795 "bison_parser.cpp" break; - case 95: /* opt_column_list: '(' ident_commalist ')' */ -#line 725 "bison_parser.y" + case 96: /* opt_column_list: '(' ident_commalist ')' */ +#line 729 "bison_parser.y" { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 3792 "bison_parser.cpp" +#line 3801 "bison_parser.cpp" break; - case 96: /* opt_column_list: %empty */ -#line 726 "bison_parser.y" + case 97: /* opt_column_list: %empty */ +#line 730 "bison_parser.y" { (yyval.str_vec) = nullptr; } -#line 3798 "bison_parser.cpp" +#line 3807 "bison_parser.cpp" break; - case 97: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ -#line 736 "bison_parser.y" + case 98: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ +#line 740 "bison_parser.y" { (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 3809 "bison_parser.cpp" +#line 3818 "bison_parser.cpp" break; - case 98: /* update_clause_commalist: update_clause */ -#line 745 "bison_parser.y" + case 99: /* update_clause_commalist: update_clause */ +#line 749 "bison_parser.y" { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 3815 "bison_parser.cpp" +#line 3824 "bison_parser.cpp" break; - case 99: /* update_clause_commalist: update_clause_commalist ',' update_clause */ -#line 746 "bison_parser.y" + case 100: /* update_clause_commalist: update_clause_commalist ',' update_clause */ +#line 750 "bison_parser.y" { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 3821 "bison_parser.cpp" +#line 3830 "bison_parser.cpp" break; - case 100: /* update_clause: IDENTIFIER '=' expr */ -#line 750 "bison_parser.y" + case 101: /* update_clause: IDENTIFIER '=' expr */ +#line 754 "bison_parser.y" { (yyval.update_t) = new UpdateClause(); (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 3831 "bison_parser.cpp" +#line 3840 "bison_parser.cpp" break; - case 101: /* select_statement: opt_with_clause select_with_paren */ -#line 762 "bison_parser.y" + case 102: /* select_statement: opt_with_clause select_with_paren */ +#line 766 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3840 "bison_parser.cpp" +#line 3849 "bison_parser.cpp" break; - case 102: /* select_statement: opt_with_clause select_no_paren */ -#line 766 "bison_parser.y" + case 103: /* select_statement: opt_with_clause select_no_paren */ +#line 770 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3849 "bison_parser.cpp" +#line 3858 "bison_parser.cpp" break; - case 103: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ -#line 770 "bison_parser.y" + case 104: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ +#line 774 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3861,17 +3870,17 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); (yyval.select_stmt)->withDescriptions = (yyvsp[-5].with_description_vec); } -#line 3865 "bison_parser.cpp" +#line 3874 "bison_parser.cpp" break; - case 106: /* select_within_set_operation_no_parentheses: select_clause */ -#line 788 "bison_parser.y" + case 107: /* select_within_set_operation_no_parentheses: select_clause */ +#line 792 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); } -#line 3871 "bison_parser.cpp" +#line 3880 "bison_parser.cpp" break; - case 107: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ -#line 789 "bison_parser.y" + case 108: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ +#line 793 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3880,23 +3889,23 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->push_back((yyvsp[-1].set_operator_t)); (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[0].select_stmt); } -#line 3884 "bison_parser.cpp" +#line 3893 "bison_parser.cpp" break; - case 108: /* select_with_paren: '(' select_no_paren ')' */ -#line 800 "bison_parser.y" + case 109: /* select_with_paren: '(' select_no_paren ')' */ +#line 804 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3890 "bison_parser.cpp" +#line 3899 "bison_parser.cpp" break; - case 109: /* select_with_paren: '(' select_with_paren ')' */ -#line 801 "bison_parser.y" + case 110: /* select_with_paren: '(' select_with_paren ')' */ +#line 805 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3896 "bison_parser.cpp" +#line 3905 "bison_parser.cpp" break; - case 110: /* select_no_paren: select_clause opt_order opt_limit */ -#line 805 "bison_parser.y" + case 111: /* select_no_paren: select_clause opt_order opt_limit */ +#line 809 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); (yyval.select_stmt)->order = (yyvsp[-1].order_vec); @@ -3907,11 +3916,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3911 "bison_parser.cpp" +#line 3920 "bison_parser.cpp" break; - case 111: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ -#line 815 "bison_parser.y" + case 112: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ +#line 819 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3922,63 +3931,63 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); } -#line 3926 "bison_parser.cpp" +#line 3935 "bison_parser.cpp" break; - case 112: /* set_operator: set_type opt_all */ -#line 828 "bison_parser.y" + case 113: /* set_operator: set_type opt_all */ +#line 832 "bison_parser.y" { (yyval.set_operator_t) = (yyvsp[-1].set_operator_t); (yyval.set_operator_t)->isAll = (yyvsp[0].bval); } -#line 3935 "bison_parser.cpp" +#line 3944 "bison_parser.cpp" break; - case 113: /* set_type: UNION */ -#line 835 "bison_parser.y" + case 114: /* set_type: UNION */ +#line 839 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetUnion; } -#line 3944 "bison_parser.cpp" +#line 3953 "bison_parser.cpp" break; - case 114: /* set_type: INTERSECT */ -#line 839 "bison_parser.y" + case 115: /* set_type: INTERSECT */ +#line 843 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetIntersect; } -#line 3953 "bison_parser.cpp" +#line 3962 "bison_parser.cpp" break; - case 115: /* set_type: EXCEPT */ -#line 843 "bison_parser.y" + case 116: /* set_type: EXCEPT */ +#line 847 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetExcept; } -#line 3962 "bison_parser.cpp" +#line 3971 "bison_parser.cpp" break; - case 116: /* opt_all: ALL */ -#line 850 "bison_parser.y" + case 117: /* opt_all: ALL */ +#line 854 "bison_parser.y" { (yyval.bval) = true; } -#line 3970 "bison_parser.cpp" +#line 3979 "bison_parser.cpp" break; - case 117: /* opt_all: %empty */ -#line 853 "bison_parser.y" + case 118: /* opt_all: %empty */ +#line 857 "bison_parser.y" { (yyval.bval) = false; } -#line 3978 "bison_parser.cpp" +#line 3987 "bison_parser.cpp" break; - case 118: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ -#line 859 "bison_parser.y" + case 119: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ +#line 863 "bison_parser.y" { (yyval.select_stmt) = new SelectStatement(); (yyval.select_stmt)->limit = (yyvsp[-5].limit); @@ -3988,213 +3997,213 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 3992 "bison_parser.cpp" +#line 4001 "bison_parser.cpp" break; - case 119: /* opt_distinct: DISTINCT */ -#line 871 "bison_parser.y" + case 120: /* opt_distinct: DISTINCT */ +#line 875 "bison_parser.y" { (yyval.bval) = true; } -#line 3998 "bison_parser.cpp" +#line 4007 "bison_parser.cpp" break; - case 120: /* opt_distinct: %empty */ -#line 872 "bison_parser.y" + case 121: /* opt_distinct: %empty */ +#line 876 "bison_parser.y" { (yyval.bval) = false; } -#line 4004 "bison_parser.cpp" +#line 4013 "bison_parser.cpp" break; - case 122: /* opt_from_clause: from_clause */ -#line 880 "bison_parser.y" + case 123: /* opt_from_clause: from_clause */ +#line 884 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 4010 "bison_parser.cpp" +#line 4019 "bison_parser.cpp" break; - case 123: /* opt_from_clause: %empty */ -#line 881 "bison_parser.y" + case 124: /* opt_from_clause: %empty */ +#line 885 "bison_parser.y" { (yyval.table) = nullptr; } -#line 4016 "bison_parser.cpp" +#line 4025 "bison_parser.cpp" break; - case 124: /* from_clause: FROM table_ref */ -#line 885 "bison_parser.y" + case 125: /* from_clause: FROM table_ref */ +#line 889 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 4022 "bison_parser.cpp" +#line 4031 "bison_parser.cpp" break; - case 125: /* opt_where: WHERE expr */ -#line 890 "bison_parser.y" + case 126: /* opt_where: WHERE expr */ +#line 894 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 4028 "bison_parser.cpp" +#line 4037 "bison_parser.cpp" break; - case 126: /* opt_where: %empty */ -#line 891 "bison_parser.y" + case 127: /* opt_where: %empty */ +#line 895 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 4034 "bison_parser.cpp" +#line 4043 "bison_parser.cpp" break; - case 127: /* opt_group: GROUP BY expr_list opt_having */ -#line 895 "bison_parser.y" + case 128: /* opt_group: GROUP BY expr_list opt_having */ +#line 899 "bison_parser.y" { (yyval.group_t) = new GroupByDescription(); (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 4044 "bison_parser.cpp" +#line 4053 "bison_parser.cpp" break; - case 128: /* opt_group: %empty */ -#line 900 "bison_parser.y" + case 129: /* opt_group: %empty */ +#line 904 "bison_parser.y" { (yyval.group_t) = nullptr; } -#line 4050 "bison_parser.cpp" +#line 4059 "bison_parser.cpp" break; - case 129: /* opt_having: HAVING expr */ -#line 904 "bison_parser.y" + case 130: /* opt_having: HAVING expr */ +#line 908 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 4056 "bison_parser.cpp" +#line 4065 "bison_parser.cpp" break; - case 130: /* opt_having: %empty */ -#line 905 "bison_parser.y" + case 131: /* opt_having: %empty */ +#line 909 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 4062 "bison_parser.cpp" +#line 4071 "bison_parser.cpp" break; - case 131: /* opt_order: ORDER BY order_list */ -#line 909 "bison_parser.y" + case 132: /* opt_order: ORDER BY order_list */ +#line 913 "bison_parser.y" { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 4068 "bison_parser.cpp" +#line 4077 "bison_parser.cpp" break; - case 132: /* opt_order: %empty */ -#line 910 "bison_parser.y" + case 133: /* opt_order: %empty */ +#line 914 "bison_parser.y" { (yyval.order_vec) = nullptr; } -#line 4074 "bison_parser.cpp" +#line 4083 "bison_parser.cpp" break; - case 133: /* order_list: order_desc */ -#line 914 "bison_parser.y" + case 134: /* order_list: order_desc */ +#line 918 "bison_parser.y" { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 4080 "bison_parser.cpp" +#line 4089 "bison_parser.cpp" break; - case 134: /* order_list: order_list ',' order_desc */ -#line 915 "bison_parser.y" + case 135: /* order_list: order_list ',' order_desc */ +#line 919 "bison_parser.y" { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 4086 "bison_parser.cpp" +#line 4095 "bison_parser.cpp" break; - case 135: /* order_desc: expr opt_order_type */ -#line 919 "bison_parser.y" + case 136: /* order_desc: expr opt_order_type */ +#line 923 "bison_parser.y" { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 4092 "bison_parser.cpp" +#line 4101 "bison_parser.cpp" break; - case 136: /* opt_order_type: ASC */ -#line 923 "bison_parser.y" + case 137: /* opt_order_type: ASC */ +#line 927 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 4098 "bison_parser.cpp" +#line 4107 "bison_parser.cpp" break; - case 137: /* opt_order_type: DESC */ -#line 924 "bison_parser.y" + case 138: /* opt_order_type: DESC */ +#line 928 "bison_parser.y" { (yyval.order_type) = kOrderDesc; } -#line 4104 "bison_parser.cpp" +#line 4113 "bison_parser.cpp" break; - case 138: /* opt_order_type: %empty */ -#line 925 "bison_parser.y" + case 139: /* opt_order_type: %empty */ +#line 929 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 4110 "bison_parser.cpp" +#line 4119 "bison_parser.cpp" break; - case 139: /* opt_top: TOP int_literal */ -#line 931 "bison_parser.y" + case 140: /* opt_top: TOP int_literal */ +#line 935 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 4116 "bison_parser.cpp" +#line 4125 "bison_parser.cpp" break; - case 140: /* opt_top: %empty */ -#line 932 "bison_parser.y" + case 141: /* opt_top: %empty */ +#line 936 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 4122 "bison_parser.cpp" +#line 4131 "bison_parser.cpp" break; - case 141: /* opt_limit: LIMIT expr */ -#line 936 "bison_parser.y" + case 142: /* opt_limit: LIMIT expr */ +#line 940 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 4128 "bison_parser.cpp" +#line 4137 "bison_parser.cpp" break; - case 142: /* opt_limit: OFFSET expr */ -#line 937 "bison_parser.y" + case 143: /* opt_limit: OFFSET expr */ +#line 941 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 4134 "bison_parser.cpp" +#line 4143 "bison_parser.cpp" break; - case 143: /* opt_limit: LIMIT expr OFFSET expr */ -#line 938 "bison_parser.y" + case 144: /* opt_limit: LIMIT expr OFFSET expr */ +#line 942 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4140 "bison_parser.cpp" +#line 4149 "bison_parser.cpp" break; - case 144: /* opt_limit: LIMIT ALL */ -#line 939 "bison_parser.y" + case 145: /* opt_limit: LIMIT ALL */ +#line 943 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, nullptr); } -#line 4146 "bison_parser.cpp" +#line 4155 "bison_parser.cpp" break; - case 145: /* opt_limit: LIMIT ALL OFFSET expr */ -#line 940 "bison_parser.y" + case 146: /* opt_limit: LIMIT ALL OFFSET expr */ +#line 944 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 4152 "bison_parser.cpp" +#line 4161 "bison_parser.cpp" break; - case 146: /* opt_limit: %empty */ -#line 941 "bison_parser.y" + case 147: /* opt_limit: %empty */ +#line 945 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 4158 "bison_parser.cpp" +#line 4167 "bison_parser.cpp" break; - case 147: /* expr_list: expr_alias */ -#line 948 "bison_parser.y" + case 148: /* expr_list: expr_alias */ +#line 952 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4164 "bison_parser.cpp" +#line 4173 "bison_parser.cpp" break; - case 148: /* expr_list: expr_list ',' expr_alias */ -#line 949 "bison_parser.y" + case 149: /* expr_list: expr_list ',' expr_alias */ +#line 953 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4170 "bison_parser.cpp" +#line 4179 "bison_parser.cpp" break; - case 149: /* opt_literal_list: literal_list */ -#line 953 "bison_parser.y" + case 150: /* opt_literal_list: literal_list */ +#line 957 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[0].expr_vec); } -#line 4176 "bison_parser.cpp" +#line 4185 "bison_parser.cpp" break; - case 150: /* opt_literal_list: %empty */ -#line 954 "bison_parser.y" + case 151: /* opt_literal_list: %empty */ +#line 958 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 4182 "bison_parser.cpp" +#line 4191 "bison_parser.cpp" break; - case 151: /* literal_list: literal */ -#line 958 "bison_parser.y" + case 152: /* literal_list: literal */ +#line 962 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4188 "bison_parser.cpp" +#line 4197 "bison_parser.cpp" break; - case 152: /* literal_list: literal_list ',' literal */ -#line 959 "bison_parser.y" + case 153: /* literal_list: literal_list ',' literal */ +#line 963 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4194 "bison_parser.cpp" +#line 4203 "bison_parser.cpp" break; - case 153: /* expr_alias: expr opt_alias */ -#line 963 "bison_parser.y" + case 154: /* expr_alias: expr opt_alias */ +#line 967 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); if ((yyvsp[0].alias_t)) { @@ -4202,421 +4211,421 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].alias_t); } } -#line 4206 "bison_parser.cpp" +#line 4215 "bison_parser.cpp" break; - case 159: /* operand: '(' expr ')' */ -#line 981 "bison_parser.y" + case 160: /* operand: '(' expr ')' */ +#line 985 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); } -#line 4212 "bison_parser.cpp" +#line 4221 "bison_parser.cpp" break; - case 169: /* operand: '(' select_no_paren ')' */ -#line 991 "bison_parser.y" + case 170: /* operand: '(' select_no_paren ')' */ +#line 995 "bison_parser.y" { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 4218 "bison_parser.cpp" +#line 4227 "bison_parser.cpp" break; - case 172: /* unary_expr: '-' operand */ -#line 1000 "bison_parser.y" + case 173: /* unary_expr: '-' operand */ +#line 1004 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 4224 "bison_parser.cpp" +#line 4233 "bison_parser.cpp" break; - case 173: /* unary_expr: NOT operand */ -#line 1001 "bison_parser.y" + case 174: /* unary_expr: NOT operand */ +#line 1005 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 4230 "bison_parser.cpp" +#line 4239 "bison_parser.cpp" break; - case 174: /* unary_expr: operand ISNULL */ -#line 1002 "bison_parser.y" + case 175: /* unary_expr: operand ISNULL */ +#line 1006 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 4236 "bison_parser.cpp" +#line 4245 "bison_parser.cpp" break; - case 175: /* unary_expr: operand IS NULL */ -#line 1003 "bison_parser.y" + case 176: /* unary_expr: operand IS NULL */ +#line 1007 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 4242 "bison_parser.cpp" +#line 4251 "bison_parser.cpp" break; - case 176: /* unary_expr: operand IS NOT NULL */ -#line 1004 "bison_parser.y" + case 177: /* unary_expr: operand IS NOT NULL */ +#line 1008 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 4248 "bison_parser.cpp" +#line 4257 "bison_parser.cpp" break; - case 178: /* binary_expr: operand '-' operand */ -#line 1009 "bison_parser.y" + case 179: /* binary_expr: operand '-' operand */ +#line 1013 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 4254 "bison_parser.cpp" +#line 4263 "bison_parser.cpp" break; - case 179: /* binary_expr: operand '+' operand */ -#line 1010 "bison_parser.y" + case 180: /* binary_expr: operand '+' operand */ +#line 1014 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 4260 "bison_parser.cpp" +#line 4269 "bison_parser.cpp" break; - case 180: /* binary_expr: operand '/' operand */ -#line 1011 "bison_parser.y" + case 181: /* binary_expr: operand '/' operand */ +#line 1015 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 4266 "bison_parser.cpp" +#line 4275 "bison_parser.cpp" break; - case 181: /* binary_expr: operand '*' operand */ -#line 1012 "bison_parser.y" + case 182: /* binary_expr: operand '*' operand */ +#line 1016 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 4272 "bison_parser.cpp" +#line 4281 "bison_parser.cpp" break; - case 182: /* binary_expr: operand '%' operand */ -#line 1013 "bison_parser.y" + case 183: /* binary_expr: operand '%' operand */ +#line 1017 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 4278 "bison_parser.cpp" +#line 4287 "bison_parser.cpp" break; - case 183: /* binary_expr: operand '^' operand */ -#line 1014 "bison_parser.y" + case 184: /* binary_expr: operand '^' operand */ +#line 1018 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 4284 "bison_parser.cpp" +#line 4293 "bison_parser.cpp" break; - case 184: /* binary_expr: operand LIKE operand */ -#line 1015 "bison_parser.y" + case 185: /* binary_expr: operand LIKE operand */ +#line 1019 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 4290 "bison_parser.cpp" +#line 4299 "bison_parser.cpp" break; - case 185: /* binary_expr: operand NOT LIKE operand */ -#line 1016 "bison_parser.y" + case 186: /* binary_expr: operand NOT LIKE operand */ +#line 1020 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 4296 "bison_parser.cpp" +#line 4305 "bison_parser.cpp" break; - case 186: /* binary_expr: operand ILIKE operand */ -#line 1017 "bison_parser.y" + case 187: /* binary_expr: operand ILIKE operand */ +#line 1021 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 4302 "bison_parser.cpp" +#line 4311 "bison_parser.cpp" break; - case 187: /* binary_expr: operand CONCAT operand */ -#line 1018 "bison_parser.y" + case 188: /* binary_expr: operand CONCAT operand */ +#line 1022 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 4308 "bison_parser.cpp" +#line 4317 "bison_parser.cpp" break; - case 188: /* logic_expr: expr AND expr */ -#line 1022 "bison_parser.y" + case 189: /* logic_expr: expr AND expr */ +#line 1026 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 4314 "bison_parser.cpp" +#line 4323 "bison_parser.cpp" break; - case 189: /* logic_expr: expr OR expr */ -#line 1023 "bison_parser.y" + case 190: /* logic_expr: expr OR expr */ +#line 1027 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 4320 "bison_parser.cpp" +#line 4329 "bison_parser.cpp" break; - case 190: /* in_expr: operand IN '(' expr_list ')' */ -#line 1027 "bison_parser.y" + case 191: /* in_expr: operand IN '(' expr_list ')' */ +#line 1031 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 4326 "bison_parser.cpp" +#line 4335 "bison_parser.cpp" break; - case 191: /* in_expr: operand NOT IN '(' expr_list ')' */ -#line 1028 "bison_parser.y" + case 192: /* in_expr: operand NOT IN '(' expr_list ')' */ +#line 1032 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 4332 "bison_parser.cpp" +#line 4341 "bison_parser.cpp" break; - case 192: /* in_expr: operand IN '(' select_no_paren ')' */ -#line 1029 "bison_parser.y" + case 193: /* in_expr: operand IN '(' select_no_paren ')' */ +#line 1033 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 4338 "bison_parser.cpp" +#line 4347 "bison_parser.cpp" break; - case 193: /* in_expr: operand NOT IN '(' select_no_paren ')' */ -#line 1030 "bison_parser.y" + case 194: /* in_expr: operand NOT IN '(' select_no_paren ')' */ +#line 1034 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 4344 "bison_parser.cpp" +#line 4353 "bison_parser.cpp" break; - case 194: /* case_expr: CASE expr case_list END */ -#line 1036 "bison_parser.y" + case 195: /* case_expr: CASE expr case_list END */ +#line 1040 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } -#line 4350 "bison_parser.cpp" +#line 4359 "bison_parser.cpp" break; - case 195: /* case_expr: CASE expr case_list ELSE expr END */ -#line 1037 "bison_parser.y" + case 196: /* case_expr: CASE expr case_list ELSE expr END */ +#line 1041 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4356 "bison_parser.cpp" +#line 4365 "bison_parser.cpp" break; - case 196: /* case_expr: CASE case_list END */ -#line 1038 "bison_parser.y" + case 197: /* case_expr: CASE case_list END */ +#line 1042 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } -#line 4362 "bison_parser.cpp" +#line 4371 "bison_parser.cpp" break; - case 197: /* case_expr: CASE case_list ELSE expr END */ -#line 1039 "bison_parser.y" + case 198: /* case_expr: CASE case_list ELSE expr END */ +#line 1043 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4368 "bison_parser.cpp" +#line 4377 "bison_parser.cpp" break; - case 198: /* case_list: WHEN expr THEN expr */ -#line 1043 "bison_parser.y" + case 199: /* case_list: WHEN expr THEN expr */ +#line 1047 "bison_parser.y" { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4374 "bison_parser.cpp" +#line 4383 "bison_parser.cpp" break; - case 199: /* case_list: case_list WHEN expr THEN expr */ -#line 1044 "bison_parser.y" + case 200: /* case_list: case_list WHEN expr THEN expr */ +#line 1048 "bison_parser.y" { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4380 "bison_parser.cpp" +#line 4389 "bison_parser.cpp" break; - case 200: /* exists_expr: EXISTS '(' select_no_paren ')' */ -#line 1048 "bison_parser.y" + case 201: /* exists_expr: EXISTS '(' select_no_paren ')' */ +#line 1052 "bison_parser.y" { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 4386 "bison_parser.cpp" +#line 4395 "bison_parser.cpp" break; - case 201: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ -#line 1049 "bison_parser.y" + case 202: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ +#line 1053 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 4392 "bison_parser.cpp" +#line 4401 "bison_parser.cpp" break; - case 202: /* comp_expr: operand '=' operand */ -#line 1053 "bison_parser.y" + case 203: /* comp_expr: operand '=' operand */ +#line 1057 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4398 "bison_parser.cpp" +#line 4407 "bison_parser.cpp" break; - case 203: /* comp_expr: operand EQUALS operand */ -#line 1054 "bison_parser.y" + case 204: /* comp_expr: operand EQUALS operand */ +#line 1058 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4404 "bison_parser.cpp" +#line 4413 "bison_parser.cpp" break; - case 204: /* comp_expr: operand NOTEQUALS operand */ -#line 1055 "bison_parser.y" + case 205: /* comp_expr: operand NOTEQUALS operand */ +#line 1059 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 4410 "bison_parser.cpp" +#line 4419 "bison_parser.cpp" break; - case 205: /* comp_expr: operand '<' operand */ -#line 1056 "bison_parser.y" + case 206: /* comp_expr: operand '<' operand */ +#line 1060 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 4416 "bison_parser.cpp" +#line 4425 "bison_parser.cpp" break; - case 206: /* comp_expr: operand '>' operand */ -#line 1057 "bison_parser.y" + case 207: /* comp_expr: operand '>' operand */ +#line 1061 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 4422 "bison_parser.cpp" +#line 4431 "bison_parser.cpp" break; - case 207: /* comp_expr: operand LESSEQ operand */ -#line 1058 "bison_parser.y" + case 208: /* comp_expr: operand LESSEQ operand */ +#line 1062 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 4428 "bison_parser.cpp" +#line 4437 "bison_parser.cpp" break; - case 208: /* comp_expr: operand GREATEREQ operand */ -#line 1059 "bison_parser.y" + case 209: /* comp_expr: operand GREATEREQ operand */ +#line 1063 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 4434 "bison_parser.cpp" +#line 4443 "bison_parser.cpp" break; - case 209: /* function_expr: IDENTIFIER '(' ')' */ -#line 1063 "bison_parser.y" + case 210: /* function_expr: IDENTIFIER '(' ')' */ +#line 1067 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 4440 "bison_parser.cpp" +#line 4449 "bison_parser.cpp" break; - case 210: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ -#line 1064 "bison_parser.y" + case 211: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ +#line 1068 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 4446 "bison_parser.cpp" +#line 4455 "bison_parser.cpp" break; - case 211: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ -#line 1068 "bison_parser.y" + case 212: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ +#line 1072 "bison_parser.y" { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } -#line 4452 "bison_parser.cpp" +#line 4461 "bison_parser.cpp" break; - case 212: /* cast_expr: CAST '(' expr AS column_type ')' */ -#line 1072 "bison_parser.y" + case 213: /* cast_expr: CAST '(' expr AS column_type ')' */ +#line 1076 "bison_parser.y" { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } -#line 4458 "bison_parser.cpp" +#line 4467 "bison_parser.cpp" break; - case 213: /* datetime_field: SECOND */ -#line 1076 "bison_parser.y" + case 214: /* datetime_field: SECOND */ +#line 1080 "bison_parser.y" { (yyval.datetime_field) = kDatetimeSecond; } -#line 4464 "bison_parser.cpp" +#line 4473 "bison_parser.cpp" break; - case 214: /* datetime_field: MINUTE */ -#line 1077 "bison_parser.y" + case 215: /* datetime_field: MINUTE */ +#line 1081 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMinute; } -#line 4470 "bison_parser.cpp" +#line 4479 "bison_parser.cpp" break; - case 215: /* datetime_field: HOUR */ -#line 1078 "bison_parser.y" + case 216: /* datetime_field: HOUR */ +#line 1082 "bison_parser.y" { (yyval.datetime_field) = kDatetimeHour; } -#line 4476 "bison_parser.cpp" +#line 4485 "bison_parser.cpp" break; - case 216: /* datetime_field: DAY */ -#line 1079 "bison_parser.y" + case 217: /* datetime_field: DAY */ +#line 1083 "bison_parser.y" { (yyval.datetime_field) = kDatetimeDay; } -#line 4482 "bison_parser.cpp" +#line 4491 "bison_parser.cpp" break; - case 217: /* datetime_field: MONTH */ -#line 1080 "bison_parser.y" + case 218: /* datetime_field: MONTH */ +#line 1084 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMonth; } -#line 4488 "bison_parser.cpp" +#line 4497 "bison_parser.cpp" break; - case 218: /* datetime_field: YEAR */ -#line 1081 "bison_parser.y" + case 219: /* datetime_field: YEAR */ +#line 1085 "bison_parser.y" { (yyval.datetime_field) = kDatetimeYear; } -#line 4494 "bison_parser.cpp" +#line 4503 "bison_parser.cpp" break; - case 219: /* array_expr: ARRAY '[' expr_list ']' */ -#line 1085 "bison_parser.y" + case 220: /* array_expr: ARRAY '[' expr_list ']' */ +#line 1089 "bison_parser.y" { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 4500 "bison_parser.cpp" +#line 4509 "bison_parser.cpp" break; - case 220: /* array_index: operand '[' int_literal ']' */ -#line 1089 "bison_parser.y" + case 221: /* array_index: operand '[' int_literal ']' */ +#line 1093 "bison_parser.y" { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 4506 "bison_parser.cpp" +#line 4515 "bison_parser.cpp" break; - case 221: /* between_expr: operand BETWEEN operand AND operand */ -#line 1093 "bison_parser.y" + case 222: /* between_expr: operand BETWEEN operand AND operand */ +#line 1097 "bison_parser.y" { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4512 "bison_parser.cpp" +#line 4521 "bison_parser.cpp" break; - case 222: /* column_name: IDENTIFIER */ -#line 1097 "bison_parser.y" + case 223: /* column_name: IDENTIFIER */ +#line 1101 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 4518 "bison_parser.cpp" +#line 4527 "bison_parser.cpp" break; - case 223: /* column_name: IDENTIFIER '.' IDENTIFIER */ -#line 1098 "bison_parser.y" + case 224: /* column_name: IDENTIFIER '.' IDENTIFIER */ +#line 1102 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 4524 "bison_parser.cpp" +#line 4533 "bison_parser.cpp" break; - case 224: /* column_name: '*' */ -#line 1099 "bison_parser.y" + case 225: /* column_name: '*' */ +#line 1103 "bison_parser.y" { (yyval.expr) = Expr::makeStar(); } -#line 4530 "bison_parser.cpp" +#line 4539 "bison_parser.cpp" break; - case 225: /* column_name: IDENTIFIER '.' '*' */ -#line 1100 "bison_parser.y" + case 226: /* column_name: IDENTIFIER '.' '*' */ +#line 1104 "bison_parser.y" { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 4536 "bison_parser.cpp" +#line 4545 "bison_parser.cpp" break; - case 231: /* string_literal: STRING */ -#line 1112 "bison_parser.y" + case 232: /* string_literal: STRING */ +#line 1116 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 4542 "bison_parser.cpp" +#line 4551 "bison_parser.cpp" break; - case 232: /* bool_literal: TRUE */ -#line 1116 "bison_parser.y" + case 233: /* bool_literal: TRUE */ +#line 1120 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(true); } -#line 4548 "bison_parser.cpp" +#line 4557 "bison_parser.cpp" break; - case 233: /* bool_literal: FALSE */ -#line 1117 "bison_parser.y" + case 234: /* bool_literal: FALSE */ +#line 1121 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(false); } -#line 4554 "bison_parser.cpp" +#line 4563 "bison_parser.cpp" break; - case 234: /* num_literal: FLOATVAL */ -#line 1121 "bison_parser.y" + case 235: /* num_literal: FLOATVAL */ +#line 1125 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 4560 "bison_parser.cpp" +#line 4569 "bison_parser.cpp" break; - case 236: /* int_literal: INTVAL */ -#line 1126 "bison_parser.y" + case 237: /* int_literal: INTVAL */ +#line 1130 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 4566 "bison_parser.cpp" +#line 4575 "bison_parser.cpp" break; - case 237: /* null_literal: NULL */ -#line 1130 "bison_parser.y" + case 238: /* null_literal: NULL */ +#line 1134 "bison_parser.y" { (yyval.expr) = Expr::makeNullLiteral(); } -#line 4572 "bison_parser.cpp" +#line 4581 "bison_parser.cpp" break; - case 238: /* param_expr: '?' */ -#line 1134 "bison_parser.y" + case 239: /* param_expr: '?' */ +#line 1138 "bison_parser.y" { (yyval.expr) = Expr::makeParameter(yylloc.total_column); (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 4582 "bison_parser.cpp" +#line 4591 "bison_parser.cpp" break; - case 240: /* table_ref: table_ref_commalist ',' table_ref_atomic */ -#line 1147 "bison_parser.y" + case 241: /* table_ref: table_ref_commalist ',' table_ref_atomic */ +#line 1151 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); auto tbl = new TableRef(kTableCrossProduct); tbl->list = (yyvsp[-2].table_vec); (yyval.table) = tbl; } -#line 4593 "bison_parser.cpp" +#line 4602 "bison_parser.cpp" break; - case 244: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ -#line 1163 "bison_parser.y" + case 245: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ +#line 1167 "bison_parser.y" { auto tbl = new TableRef(kTableSelect); tbl->select = (yyvsp[-2].select_stmt); tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4604 "bison_parser.cpp" +#line 4613 "bison_parser.cpp" break; - case 245: /* table_ref_commalist: table_ref_atomic */ -#line 1172 "bison_parser.y" + case 246: /* table_ref_commalist: table_ref_atomic */ +#line 1176 "bison_parser.y" { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 4610 "bison_parser.cpp" +#line 4619 "bison_parser.cpp" break; - case 246: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ -#line 1173 "bison_parser.y" + case 247: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ +#line 1177 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 4616 "bison_parser.cpp" +#line 4625 "bison_parser.cpp" break; - case 247: /* table_ref_name: table_name opt_table_alias */ -#line 1178 "bison_parser.y" + case 248: /* table_ref_name: table_name opt_table_alias */ +#line 1182 "bison_parser.y" { auto tbl = new TableRef(kTableName); tbl->schema = (yyvsp[-1].table_name).schema; @@ -4624,121 +4633,121 @@ YYLTYPE yylloc = yyloc_default; tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4628 "bison_parser.cpp" +#line 4637 "bison_parser.cpp" break; - case 248: /* table_ref_name_no_alias: table_name */ -#line 1189 "bison_parser.y" + case 249: /* table_ref_name_no_alias: table_name */ +#line 1193 "bison_parser.y" { (yyval.table) = new TableRef(kTableName); (yyval.table)->schema = (yyvsp[0].table_name).schema; (yyval.table)->name = (yyvsp[0].table_name).name; } -#line 4638 "bison_parser.cpp" +#line 4647 "bison_parser.cpp" break; - case 249: /* table_name: IDENTIFIER */ -#line 1198 "bison_parser.y" + case 250: /* table_name: IDENTIFIER */ +#line 1202 "bison_parser.y" { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} -#line 4644 "bison_parser.cpp" +#line 4653 "bison_parser.cpp" break; - case 250: /* table_name: IDENTIFIER '.' IDENTIFIER */ -#line 1199 "bison_parser.y" + case 251: /* table_name: IDENTIFIER '.' IDENTIFIER */ +#line 1203 "bison_parser.y" { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } -#line 4650 "bison_parser.cpp" +#line 4659 "bison_parser.cpp" break; - case 251: /* opt_index_name: IDENTIFIER */ -#line 1203 "bison_parser.y" + case 252: /* opt_index_name: IDENTIFIER */ +#line 1207 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4656 "bison_parser.cpp" +#line 4665 "bison_parser.cpp" break; - case 252: /* opt_index_name: %empty */ -#line 1204 "bison_parser.y" + case 253: /* opt_index_name: %empty */ +#line 1208 "bison_parser.y" { (yyval.sval) = nullptr;} -#line 4662 "bison_parser.cpp" +#line 4671 "bison_parser.cpp" break; - case 253: /* index_name: IDENTIFIER */ -#line 1208 "bison_parser.y" + case 254: /* index_name: IDENTIFIER */ +#line 1212 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4668 "bison_parser.cpp" +#line 4677 "bison_parser.cpp" break; - case 255: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ -#line 1214 "bison_parser.y" + case 256: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ +#line 1218 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } -#line 4674 "bison_parser.cpp" +#line 4683 "bison_parser.cpp" break; - case 257: /* opt_table_alias: %empty */ -#line 1220 "bison_parser.y" + case 258: /* opt_table_alias: %empty */ +#line 1224 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4680 "bison_parser.cpp" +#line 4689 "bison_parser.cpp" break; - case 258: /* alias: AS IDENTIFIER */ -#line 1225 "bison_parser.y" + case 259: /* alias: AS IDENTIFIER */ +#line 1229 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4686 "bison_parser.cpp" +#line 4695 "bison_parser.cpp" break; - case 259: /* alias: IDENTIFIER */ -#line 1226 "bison_parser.y" + case 260: /* alias: IDENTIFIER */ +#line 1230 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4692 "bison_parser.cpp" +#line 4701 "bison_parser.cpp" break; - case 261: /* opt_alias: %empty */ -#line 1232 "bison_parser.y" + case 262: /* opt_alias: %empty */ +#line 1236 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4698 "bison_parser.cpp" +#line 4707 "bison_parser.cpp" break; - case 263: /* opt_with_clause: %empty */ -#line 1242 "bison_parser.y" + case 264: /* opt_with_clause: %empty */ +#line 1246 "bison_parser.y" { (yyval.with_description_vec) = nullptr; } -#line 4704 "bison_parser.cpp" +#line 4713 "bison_parser.cpp" break; - case 264: /* with_clause: WITH with_description_list */ -#line 1246 "bison_parser.y" + case 265: /* with_clause: WITH with_description_list */ +#line 1250 "bison_parser.y" { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } -#line 4710 "bison_parser.cpp" +#line 4719 "bison_parser.cpp" break; - case 265: /* with_description_list: with_description */ -#line 1250 "bison_parser.y" + case 266: /* with_description_list: with_description */ +#line 1254 "bison_parser.y" { (yyval.with_description_vec) = new std::vector(); (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); } -#line 4719 "bison_parser.cpp" +#line 4728 "bison_parser.cpp" break; - case 266: /* with_description_list: with_description_list ',' with_description */ -#line 1254 "bison_parser.y" + case 267: /* with_description_list: with_description_list ',' with_description */ +#line 1258 "bison_parser.y" { (yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t)); (yyval.with_description_vec) = (yyvsp[-2].with_description_vec); } -#line 4728 "bison_parser.cpp" +#line 4737 "bison_parser.cpp" break; - case 267: /* with_description: IDENTIFIER AS select_with_paren */ -#line 1261 "bison_parser.y" + case 268: /* with_description: IDENTIFIER AS select_with_paren */ +#line 1265 "bison_parser.y" { (yyval.with_description_t) = new WithDescription(); (yyval.with_description_t)->alias = (yyvsp[-2].sval); (yyval.with_description_t)->select = (yyvsp[0].select_stmt); } -#line 4738 "bison_parser.cpp" +#line 4747 "bison_parser.cpp" break; - case 268: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ -#line 1275 "bison_parser.y" + case 269: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ +#line 1279 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4746,11 +4755,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 4750 "bison_parser.cpp" +#line 4759 "bison_parser.cpp" break; - case 269: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ -#line 1283 "bison_parser.y" + case 270: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ +#line 1287 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4759,11 +4768,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 4763 "bison_parser.cpp" +#line 4772 "bison_parser.cpp" break; - case 270: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ -#line 1293 "bison_parser.y" + case 271: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ +#line 1297 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4779,83 +4788,83 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } -#line 4783 "bison_parser.cpp" +#line 4792 "bison_parser.cpp" break; - case 271: /* opt_join_type: INNER */ -#line 1311 "bison_parser.y" + case 272: /* opt_join_type: INNER */ +#line 1315 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4789 "bison_parser.cpp" +#line 4798 "bison_parser.cpp" break; - case 272: /* opt_join_type: LEFT OUTER */ -#line 1312 "bison_parser.y" + case 273: /* opt_join_type: LEFT OUTER */ +#line 1316 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4795 "bison_parser.cpp" +#line 4804 "bison_parser.cpp" break; - case 273: /* opt_join_type: LEFT */ -#line 1313 "bison_parser.y" + case 274: /* opt_join_type: LEFT */ +#line 1317 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4801 "bison_parser.cpp" +#line 4810 "bison_parser.cpp" break; - case 274: /* opt_join_type: RIGHT OUTER */ -#line 1314 "bison_parser.y" + case 275: /* opt_join_type: RIGHT OUTER */ +#line 1318 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4807 "bison_parser.cpp" +#line 4816 "bison_parser.cpp" break; - case 275: /* opt_join_type: RIGHT */ -#line 1315 "bison_parser.y" + case 276: /* opt_join_type: RIGHT */ +#line 1319 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4813 "bison_parser.cpp" +#line 4822 "bison_parser.cpp" break; - case 276: /* opt_join_type: FULL OUTER */ -#line 1316 "bison_parser.y" + case 277: /* opt_join_type: FULL OUTER */ +#line 1320 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4819 "bison_parser.cpp" +#line 4828 "bison_parser.cpp" break; - case 277: /* opt_join_type: OUTER */ -#line 1317 "bison_parser.y" + case 278: /* opt_join_type: OUTER */ +#line 1321 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4825 "bison_parser.cpp" +#line 4834 "bison_parser.cpp" break; - case 278: /* opt_join_type: FULL */ -#line 1318 "bison_parser.y" + case 279: /* opt_join_type: FULL */ +#line 1322 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4831 "bison_parser.cpp" +#line 4840 "bison_parser.cpp" break; - case 279: /* opt_join_type: CROSS */ -#line 1319 "bison_parser.y" + case 280: /* opt_join_type: CROSS */ +#line 1323 "bison_parser.y" { (yyval.uval) = kJoinCross; } -#line 4837 "bison_parser.cpp" +#line 4846 "bison_parser.cpp" break; - case 280: /* opt_join_type: %empty */ -#line 1320 "bison_parser.y" + case 281: /* opt_join_type: %empty */ +#line 1324 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4843 "bison_parser.cpp" +#line 4852 "bison_parser.cpp" break; - case 284: /* ident_commalist: IDENTIFIER */ -#line 1340 "bison_parser.y" + case 285: /* ident_commalist: IDENTIFIER */ +#line 1344 "bison_parser.y" { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 4849 "bison_parser.cpp" +#line 4858 "bison_parser.cpp" break; - case 285: /* ident_commalist: ident_commalist ',' IDENTIFIER */ -#line 1341 "bison_parser.y" + case 286: /* ident_commalist: ident_commalist ',' IDENTIFIER */ +#line 1345 "bison_parser.y" { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 4855 "bison_parser.cpp" +#line 4864 "bison_parser.cpp" break; -#line 4859 "bison_parser.cpp" +#line 4868 "bison_parser.cpp" default: break; } @@ -5085,7 +5094,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 1344 "bison_parser.y" +#line 1348 "bison_parser.y" /********************************* ** Section 4: Additional C code diff --git a/src/parser/bison_parser.h b/src/parser/bison_parser.h index 8ab9e4aa..ced56f10 100644 --- a/src/parser/bison_parser.h +++ b/src/parser/bison_parser.h @@ -257,19 +257,19 @@ union HSQL_STYPE uintmax_t uval; bool bval; - hsql::SQLStatement* statement; - hsql::SelectStatement* select_stmt; - hsql::ImportStatement* import_stmt; - hsql::ExportStatement* export_stmt; - hsql::CreateStatement* create_stmt; - hsql::InsertStatement* insert_stmt; - hsql::DeleteStatement* delete_stmt; - hsql::UpdateStatement* update_stmt; - hsql::DropStatement* drop_stmt; - hsql::AlterStatement* alter_stmt; - hsql::PrepareStatement* prep_stmt; - hsql::ExecuteStatement* exec_stmt; - hsql::ShowStatement* show_stmt; + hsql::SQLStatement* statement; + hsql::SelectStatement* select_stmt; + hsql::ImportStatement* import_stmt; + hsql::ExportStatement* export_stmt; + hsql::CreateStatement* create_stmt; + hsql::InsertStatement* insert_stmt; + hsql::DeleteStatement* delete_stmt; + hsql::UpdateStatement* update_stmt; + hsql::DropStatement* drop_stmt; + hsql::AlterStatement* alter_stmt; + hsql::PrepareStatement* prep_stmt; + hsql::ExecuteStatement* exec_stmt; + hsql::ShowStatement* show_stmt; hsql::TransactionStatement* transaction_stmt; hsql::TableName table_name; @@ -301,8 +301,9 @@ union HSQL_STYPE std::vector* order_vec; std::vector* with_description_vec; std::vector* table_element_vec; + std::vector* column_constraint_vec; -#line 306 "bison_parser.h" +#line 307 "bison_parser.h" }; typedef union HSQL_STYPE HSQL_STYPE; diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 0acf5c22..f1278f02 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -99,19 +99,19 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha uintmax_t uval; bool bval; - hsql::SQLStatement* statement; - hsql::SelectStatement* select_stmt; - hsql::ImportStatement* import_stmt; - hsql::ExportStatement* export_stmt; - hsql::CreateStatement* create_stmt; - hsql::InsertStatement* insert_stmt; - hsql::DeleteStatement* delete_stmt; - hsql::UpdateStatement* update_stmt; - hsql::DropStatement* drop_stmt; - hsql::AlterStatement* alter_stmt; - hsql::PrepareStatement* prep_stmt; - hsql::ExecuteStatement* exec_stmt; - hsql::ShowStatement* show_stmt; + hsql::SQLStatement* statement; + hsql::SelectStatement* select_stmt; + hsql::ImportStatement* import_stmt; + hsql::ExportStatement* export_stmt; + hsql::CreateStatement* create_stmt; + hsql::InsertStatement* insert_stmt; + hsql::DeleteStatement* delete_stmt; + hsql::UpdateStatement* update_stmt; + hsql::DropStatement* drop_stmt; + hsql::AlterStatement* alter_stmt; + hsql::PrepareStatement* prep_stmt; + hsql::ExecuteStatement* exec_stmt; + hsql::ShowStatement* show_stmt; hsql::TransactionStatement* transaction_stmt; hsql::TableName table_name; @@ -143,13 +143,14 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha std::vector* order_vec; std::vector* with_description_vec; std::vector* table_element_vec; + std::vector* column_constraint_vec; } /********************************* ** Destructor symbols *********************************/ -%destructor { } +%destructor { } %destructor { free( ($$.name) ); free( ($$.schema) ); } %destructor { free( ($$) ); } %destructor { @@ -211,7 +212,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha %type opt_index_name %type index_name %type file_path prepare_target_query -%type opt_not_exists opt_exists opt_distinct opt_column_nullable opt_all +%type opt_not_exists opt_exists opt_distinct opt_all %type opt_decimal_specification %type opt_time_specification %type opt_join_type @@ -235,7 +236,8 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha %type opt_table_alias table_alias opt_alias alias %type with_description %type set_operator set_type -%type opt_column_constraint +%type column_constraint +%type opt_column_constraints // ImportType is used for compatibility reasons %type opt_file_type file_type @@ -573,8 +575,9 @@ table_elem: ; column_def: - IDENTIFIER column_type opt_column_nullable opt_column_constraint{ - $$ = new ColumnDefinition($1, $2, $3, $4); + IDENTIFIER column_type opt_column_constraints{ + $$ = new ColumnDefinition($1, $2, $3); + $$->setNullableExplicit(); } ; @@ -606,16 +609,17 @@ opt_decimal_specification: | /* empty */ { $$ = ColumnSpecification{}; } ; -opt_column_nullable: - NULL { $$ = true; } - | NOT NULL { $$ = false; } - | /* empty */ { $$ = false; } - ; +opt_column_constraints: + column_constraint { $$ = new std::vector(); $$->push_back($1); } + | opt_column_constraints column_constraint { $1->push_back($2); $$ = $1; } + | /* empty */ { $$ = new std::vector(); } + ; -opt_column_constraint: +column_constraint: PRIMARY KEY { $$ = ConstraintType::PRIMARY_KEY; } | UNIQUE { $$ = ConstraintType::UNIQUE; } - | /* empty */ { $$ = ConstraintType::NOT_SET; } + | NULL { $$ = ConstraintType::_NULL; } + | NOT NULL { $$ = ConstraintType::NOTNULL; } ; table_constraint: diff --git a/src/sql/ColumnType.h b/src/sql/ColumnType.h index 9e851dfc..308060c5 100755 --- a/src/sql/ColumnType.h +++ b/src/sql/ColumnType.h @@ -39,7 +39,7 @@ namespace hsql { ColumnSpecification column_specification = ColumnSpecification{}); DataType data_type; int64_t length; // Used for, e.g., VARCHAR(10) - ColumnSpecification decimal_specification; // used for, e.g., DECIMAL(6, 4) + ColumnSpecification columnSpecification; // used for, e.g. DECIMAL (6, 4) or TIME (5) }; bool operator==(const ColumnType& lhs, const ColumnType& rhs); diff --git a/src/sql/CreateStatement.h b/src/sql/CreateStatement.h index fb05c5b5..acddee8e 100755 --- a/src/sql/CreateStatement.h +++ b/src/sql/CreateStatement.h @@ -10,14 +10,14 @@ namespace hsql { struct SelectStatement; - enum struct ConstraintType {PRIMARY_KEY, UNIQUE, NOT_SET}; + enum struct ConstraintType {PRIMARY_KEY, UNIQUE, NOTNULL, NOT_SET, _NULL}; // Superclass for both TableConstraint and Column Definition struct TableElement { virtual ~TableElement(){} }; - // Represents definition of a key constraint + // Represents definition of a table constraint struct TableConstraint : TableElement { TableConstraint(ConstraintType keyType, std::vector* columnNames); @@ -29,14 +29,28 @@ namespace hsql { // Represents definition of a table column struct ColumnDefinition: TableElement { - ColumnDefinition(char* name, ColumnType type, bool nullable, ConstraintType constraintType); + ColumnDefinition(char* name, ColumnType type, std::vector* column_constraints); - ColumnDefinition() ; + void setNullableExplicit() { + nullable = false; + auto length = column_constraints->size(); + for(unsigned long constraint_index = 0; constraint_index < length; constraint_index++) { + if(column_constraints->at(constraint_index) == ConstraintType::_NULL) { + nullable = true; + column_constraints->erase(column_constraints->cbegin() + constraint_index); + } + + if(column_constraints->at(constraint_index) == ConstraintType::NOTNULL) { + column_constraints->erase(column_constraints->cbegin() + constraint_index); + } + } + } + + std::vector* column_constraints; char* name; ColumnType type; bool nullable; - ConstraintType constraintType; }; enum CreateType { diff --git a/src/sql/statements.cpp b/src/sql/statements.cpp index 0ee7d986..1bc36105 100755 --- a/src/sql/statements.cpp +++ b/src/sql/statements.cpp @@ -13,17 +13,18 @@ namespace hsql { } delete columnNames; } + // ColumnDefinition - ColumnDefinition::ColumnDefinition(char* name, ColumnType type, bool nullable, ConstraintType constraintType) : - name(name), - type(type), - nullable(nullable), - constraintType(constraintType) {}; + ColumnDefinition::ColumnDefinition(char* name, ColumnType type, std::vector* column_constraints) : + column_constraints(column_constraints), + name(name), + type(type), + nullable(false) + {}; ColumnType::ColumnType(DataType data_type, int64_t length, ColumnSpecification column_specification) : data_type(data_type), - length(length), - decimal_specification(column_specification) {}; + length(length), columnSpecification(column_specification) {}; ColumnSpecification::ColumnSpecification(int64_t precision, int64_t scale) : precision(precision), From 3fe37ec388f707db6e35df0195f2f7643dd281f0 Mon Sep 17 00:00:00 2001 From: simonstadlinger Date: Wed, 25 Aug 2021 17:51:45 +0200 Subject: [PATCH 40/73] Refactor alter table to lay groundwork for more and different action types --- src/parser/bison_parser.cpp | 2812 ++++++++++++++++++----------------- src/parser/bison_parser.h | 4 +- src/parser/bison_parser.y | 24 +- src/sql/AlterStatement.h | 24 +- src/sql/statements.cpp | 21 +- 5 files changed, 1478 insertions(+), 1407 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 81f89ba2..7be77a4c 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -337,87 +337,89 @@ enum yysymbol_kind_t YYSYMBOL_drop_statement = 203, /* drop_statement */ YYSYMBOL_opt_exists = 204, /* opt_exists */ YYSYMBOL_alter_statement = 205, /* alter_statement */ - YYSYMBOL_delete_statement = 206, /* delete_statement */ - YYSYMBOL_truncate_statement = 207, /* truncate_statement */ - YYSYMBOL_insert_statement = 208, /* insert_statement */ - YYSYMBOL_opt_column_list = 209, /* opt_column_list */ - YYSYMBOL_update_statement = 210, /* update_statement */ - YYSYMBOL_update_clause_commalist = 211, /* update_clause_commalist */ - YYSYMBOL_update_clause = 212, /* update_clause */ - YYSYMBOL_select_statement = 213, /* select_statement */ - YYSYMBOL_select_within_set_operation = 214, /* select_within_set_operation */ - YYSYMBOL_select_within_set_operation_no_parentheses = 215, /* select_within_set_operation_no_parentheses */ - YYSYMBOL_select_with_paren = 216, /* select_with_paren */ - YYSYMBOL_select_no_paren = 217, /* select_no_paren */ - YYSYMBOL_set_operator = 218, /* set_operator */ - YYSYMBOL_set_type = 219, /* set_type */ - YYSYMBOL_opt_all = 220, /* opt_all */ - YYSYMBOL_select_clause = 221, /* select_clause */ - YYSYMBOL_opt_distinct = 222, /* opt_distinct */ - YYSYMBOL_select_list = 223, /* select_list */ - YYSYMBOL_opt_from_clause = 224, /* opt_from_clause */ - YYSYMBOL_from_clause = 225, /* from_clause */ - YYSYMBOL_opt_where = 226, /* opt_where */ - YYSYMBOL_opt_group = 227, /* opt_group */ - YYSYMBOL_opt_having = 228, /* opt_having */ - YYSYMBOL_opt_order = 229, /* opt_order */ - YYSYMBOL_order_list = 230, /* order_list */ - YYSYMBOL_order_desc = 231, /* order_desc */ - YYSYMBOL_opt_order_type = 232, /* opt_order_type */ - YYSYMBOL_opt_top = 233, /* opt_top */ - YYSYMBOL_opt_limit = 234, /* opt_limit */ - YYSYMBOL_expr_list = 235, /* expr_list */ - YYSYMBOL_opt_literal_list = 236, /* opt_literal_list */ - YYSYMBOL_literal_list = 237, /* literal_list */ - YYSYMBOL_expr_alias = 238, /* expr_alias */ - YYSYMBOL_expr = 239, /* expr */ - YYSYMBOL_operand = 240, /* operand */ - YYSYMBOL_scalar_expr = 241, /* scalar_expr */ - YYSYMBOL_unary_expr = 242, /* unary_expr */ - YYSYMBOL_binary_expr = 243, /* binary_expr */ - YYSYMBOL_logic_expr = 244, /* logic_expr */ - YYSYMBOL_in_expr = 245, /* in_expr */ - YYSYMBOL_case_expr = 246, /* case_expr */ - YYSYMBOL_case_list = 247, /* case_list */ - YYSYMBOL_exists_expr = 248, /* exists_expr */ - YYSYMBOL_comp_expr = 249, /* comp_expr */ - YYSYMBOL_function_expr = 250, /* function_expr */ - YYSYMBOL_extract_expr = 251, /* extract_expr */ - YYSYMBOL_cast_expr = 252, /* cast_expr */ - YYSYMBOL_datetime_field = 253, /* datetime_field */ - YYSYMBOL_array_expr = 254, /* array_expr */ - YYSYMBOL_array_index = 255, /* array_index */ - YYSYMBOL_between_expr = 256, /* between_expr */ - YYSYMBOL_column_name = 257, /* column_name */ - YYSYMBOL_literal = 258, /* literal */ - YYSYMBOL_string_literal = 259, /* string_literal */ - YYSYMBOL_bool_literal = 260, /* bool_literal */ - YYSYMBOL_num_literal = 261, /* num_literal */ - YYSYMBOL_int_literal = 262, /* int_literal */ - YYSYMBOL_null_literal = 263, /* null_literal */ - YYSYMBOL_param_expr = 264, /* param_expr */ - YYSYMBOL_table_ref = 265, /* table_ref */ - YYSYMBOL_table_ref_atomic = 266, /* table_ref_atomic */ - YYSYMBOL_nonjoin_table_ref_atomic = 267, /* nonjoin_table_ref_atomic */ - YYSYMBOL_table_ref_commalist = 268, /* table_ref_commalist */ - YYSYMBOL_table_ref_name = 269, /* table_ref_name */ - YYSYMBOL_table_ref_name_no_alias = 270, /* table_ref_name_no_alias */ - YYSYMBOL_table_name = 271, /* table_name */ - YYSYMBOL_opt_index_name = 272, /* opt_index_name */ - YYSYMBOL_index_name = 273, /* index_name */ - YYSYMBOL_table_alias = 274, /* table_alias */ - YYSYMBOL_opt_table_alias = 275, /* opt_table_alias */ - YYSYMBOL_alias = 276, /* alias */ - YYSYMBOL_opt_alias = 277, /* opt_alias */ - YYSYMBOL_opt_with_clause = 278, /* opt_with_clause */ - YYSYMBOL_with_clause = 279, /* with_clause */ - YYSYMBOL_with_description_list = 280, /* with_description_list */ - YYSYMBOL_with_description = 281, /* with_description */ - YYSYMBOL_join_clause = 282, /* join_clause */ - YYSYMBOL_opt_join_type = 283, /* opt_join_type */ - YYSYMBOL_join_condition = 284, /* join_condition */ - YYSYMBOL_opt_semicolon = 285, /* opt_semicolon */ - YYSYMBOL_ident_commalist = 286 /* ident_commalist */ + YYSYMBOL_alter_action = 206, /* alter_action */ + YYSYMBOL_drop_action = 207, /* drop_action */ + YYSYMBOL_delete_statement = 208, /* delete_statement */ + YYSYMBOL_truncate_statement = 209, /* truncate_statement */ + YYSYMBOL_insert_statement = 210, /* insert_statement */ + YYSYMBOL_opt_column_list = 211, /* opt_column_list */ + YYSYMBOL_update_statement = 212, /* update_statement */ + YYSYMBOL_update_clause_commalist = 213, /* update_clause_commalist */ + YYSYMBOL_update_clause = 214, /* update_clause */ + YYSYMBOL_select_statement = 215, /* select_statement */ + YYSYMBOL_select_within_set_operation = 216, /* select_within_set_operation */ + YYSYMBOL_select_within_set_operation_no_parentheses = 217, /* select_within_set_operation_no_parentheses */ + YYSYMBOL_select_with_paren = 218, /* select_with_paren */ + YYSYMBOL_select_no_paren = 219, /* select_no_paren */ + YYSYMBOL_set_operator = 220, /* set_operator */ + YYSYMBOL_set_type = 221, /* set_type */ + YYSYMBOL_opt_all = 222, /* opt_all */ + YYSYMBOL_select_clause = 223, /* select_clause */ + YYSYMBOL_opt_distinct = 224, /* opt_distinct */ + YYSYMBOL_select_list = 225, /* select_list */ + YYSYMBOL_opt_from_clause = 226, /* opt_from_clause */ + YYSYMBOL_from_clause = 227, /* from_clause */ + YYSYMBOL_opt_where = 228, /* opt_where */ + YYSYMBOL_opt_group = 229, /* opt_group */ + YYSYMBOL_opt_having = 230, /* opt_having */ + YYSYMBOL_opt_order = 231, /* opt_order */ + YYSYMBOL_order_list = 232, /* order_list */ + YYSYMBOL_order_desc = 233, /* order_desc */ + YYSYMBOL_opt_order_type = 234, /* opt_order_type */ + YYSYMBOL_opt_top = 235, /* opt_top */ + YYSYMBOL_opt_limit = 236, /* opt_limit */ + YYSYMBOL_expr_list = 237, /* expr_list */ + YYSYMBOL_opt_literal_list = 238, /* opt_literal_list */ + YYSYMBOL_literal_list = 239, /* literal_list */ + YYSYMBOL_expr_alias = 240, /* expr_alias */ + YYSYMBOL_expr = 241, /* expr */ + YYSYMBOL_operand = 242, /* operand */ + YYSYMBOL_scalar_expr = 243, /* scalar_expr */ + YYSYMBOL_unary_expr = 244, /* unary_expr */ + YYSYMBOL_binary_expr = 245, /* binary_expr */ + YYSYMBOL_logic_expr = 246, /* logic_expr */ + YYSYMBOL_in_expr = 247, /* in_expr */ + YYSYMBOL_case_expr = 248, /* case_expr */ + YYSYMBOL_case_list = 249, /* case_list */ + YYSYMBOL_exists_expr = 250, /* exists_expr */ + YYSYMBOL_comp_expr = 251, /* comp_expr */ + YYSYMBOL_function_expr = 252, /* function_expr */ + YYSYMBOL_extract_expr = 253, /* extract_expr */ + YYSYMBOL_cast_expr = 254, /* cast_expr */ + YYSYMBOL_datetime_field = 255, /* datetime_field */ + YYSYMBOL_array_expr = 256, /* array_expr */ + YYSYMBOL_array_index = 257, /* array_index */ + YYSYMBOL_between_expr = 258, /* between_expr */ + YYSYMBOL_column_name = 259, /* column_name */ + YYSYMBOL_literal = 260, /* literal */ + YYSYMBOL_string_literal = 261, /* string_literal */ + YYSYMBOL_bool_literal = 262, /* bool_literal */ + YYSYMBOL_num_literal = 263, /* num_literal */ + YYSYMBOL_int_literal = 264, /* int_literal */ + YYSYMBOL_null_literal = 265, /* null_literal */ + YYSYMBOL_param_expr = 266, /* param_expr */ + YYSYMBOL_table_ref = 267, /* table_ref */ + YYSYMBOL_table_ref_atomic = 268, /* table_ref_atomic */ + YYSYMBOL_nonjoin_table_ref_atomic = 269, /* nonjoin_table_ref_atomic */ + YYSYMBOL_table_ref_commalist = 270, /* table_ref_commalist */ + YYSYMBOL_table_ref_name = 271, /* table_ref_name */ + YYSYMBOL_table_ref_name_no_alias = 272, /* table_ref_name_no_alias */ + YYSYMBOL_table_name = 273, /* table_name */ + YYSYMBOL_opt_index_name = 274, /* opt_index_name */ + YYSYMBOL_index_name = 275, /* index_name */ + YYSYMBOL_table_alias = 276, /* table_alias */ + YYSYMBOL_opt_table_alias = 277, /* opt_table_alias */ + YYSYMBOL_alias = 278, /* alias */ + YYSYMBOL_opt_alias = 279, /* opt_alias */ + YYSYMBOL_opt_with_clause = 280, /* opt_with_clause */ + YYSYMBOL_with_clause = 281, /* with_clause */ + YYSYMBOL_with_description_list = 282, /* with_description_list */ + YYSYMBOL_with_description = 283, /* with_description */ + YYSYMBOL_join_clause = 284, /* join_clause */ + YYSYMBOL_opt_join_type = 285, /* opt_join_type */ + YYSYMBOL_join_condition = 286, /* join_condition */ + YYSYMBOL_opt_semicolon = 287, /* opt_semicolon */ + YYSYMBOL_ident_commalist = 288 /* ident_commalist */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -742,16 +744,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 67 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 814 +#define YYLAST 867 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 173 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 114 +#define YYNNTS 116 /* YYNRULES -- Number of rules. */ -#define YYNRULES 286 +#define YYNRULES 288 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 532 +#define YYNSTATES 535 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 410 @@ -816,35 +818,35 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 284, 284, 305, 311, 320, 324, 328, 331, 334, - 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, - 359, 360, 365, 366, 370, 374, 386, 389, 392, 398, - 399, 406, 413, 416, 420, 434, 440, 449, 466, 470, - 473, 482, 496, 499, 504, 518, 531, 538, 545, 552, - 563, 564, 568, 569, 573, 574, 578, 585, 586, 587, - 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, - 598, 602, 603, 607, 608, 609, 613, 614, 615, 619, - 620, 621, 622, 626, 627, 638, 644, 650, 655, 664, - 665, 674, 689, 698, 711, 718, 729, 730, 740, 749, - 750, 754, 766, 770, 774, 788, 789, 792, 793, 804, - 805, 809, 819, 832, 839, 843, 847, 854, 857, 863, - 875, 876, 880, 884, 885, 889, 894, 895, 899, 904, - 908, 909, 913, 914, 918, 919, 923, 927, 928, 929, - 935, 936, 940, 941, 942, 943, 944, 945, 952, 953, - 957, 958, 962, 963, 967, 977, 978, 979, 980, 981, - 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, - 995, 999, 1000, 1004, 1005, 1006, 1007, 1008, 1012, 1013, - 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1026, - 1027, 1031, 1032, 1033, 1034, 1040, 1041, 1042, 1043, 1047, - 1048, 1052, 1053, 1057, 1058, 1059, 1060, 1061, 1062, 1063, - 1067, 1068, 1072, 1076, 1080, 1081, 1082, 1083, 1084, 1085, - 1089, 1093, 1097, 1101, 1102, 1103, 1104, 1108, 1109, 1110, - 1111, 1112, 1116, 1120, 1121, 1125, 1126, 1130, 1134, 1138, - 1150, 1151, 1161, 1162, 1166, 1167, 1176, 1177, 1182, 1193, - 1202, 1203, 1207, 1208, 1212, 1217, 1218, 1223, 1224, 1229, - 1230, 1235, 1236, 1245, 1246, 1250, 1254, 1258, 1265, 1278, - 1286, 1296, 1315, 1316, 1317, 1318, 1319, 1320, 1321, 1322, - 1323, 1324, 1329, 1338, 1339, 1344, 1345 + 0, 288, 288, 309, 315, 324, 328, 332, 335, 338, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 363, 364, 369, 370, 374, 378, 390, 393, 396, 402, + 403, 410, 417, 420, 424, 438, 444, 453, 470, 474, + 477, 486, 500, 503, 508, 522, 535, 542, 549, 556, + 567, 568, 572, 573, 577, 578, 582, 589, 590, 591, + 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 606, 607, 611, 612, 613, 617, 618, 619, 623, + 624, 625, 626, 630, 631, 642, 648, 654, 659, 668, + 669, 678, 686, 689, 701, 710, 723, 730, 741, 742, + 752, 761, 762, 766, 778, 782, 786, 800, 801, 804, + 805, 816, 817, 821, 831, 844, 851, 855, 859, 866, + 869, 875, 887, 888, 892, 896, 897, 901, 906, 907, + 911, 916, 920, 921, 925, 926, 930, 931, 935, 939, + 940, 941, 947, 948, 952, 953, 954, 955, 956, 957, + 964, 965, 969, 970, 974, 975, 979, 989, 990, 991, + 992, 993, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, + 1005, 1006, 1007, 1011, 1012, 1016, 1017, 1018, 1019, 1020, + 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, + 1034, 1038, 1039, 1043, 1044, 1045, 1046, 1052, 1053, 1054, + 1055, 1059, 1060, 1064, 1065, 1069, 1070, 1071, 1072, 1073, + 1074, 1075, 1079, 1080, 1084, 1088, 1092, 1093, 1094, 1095, + 1096, 1097, 1101, 1105, 1109, 1113, 1114, 1115, 1116, 1120, + 1121, 1122, 1123, 1124, 1128, 1132, 1133, 1137, 1138, 1142, + 1146, 1150, 1162, 1163, 1173, 1174, 1178, 1179, 1188, 1189, + 1194, 1205, 1214, 1215, 1219, 1220, 1224, 1229, 1230, 1235, + 1236, 1241, 1242, 1247, 1248, 1257, 1258, 1262, 1266, 1270, + 1277, 1290, 1298, 1308, 1327, 1328, 1329, 1330, 1331, 1332, + 1333, 1334, 1335, 1336, 1341, 1350, 1351, 1356, 1357 }; #endif @@ -892,10 +894,11 @@ static const char *const yytname[] = "table_elem_commalist", "table_elem", "column_def", "column_type", "opt_time_specification", "opt_decimal_specification", "opt_column_constraints", "column_constraint", "table_constraint", - "drop_statement", "opt_exists", "alter_statement", "delete_statement", - "truncate_statement", "insert_statement", "opt_column_list", - "update_statement", "update_clause_commalist", "update_clause", - "select_statement", "select_within_set_operation", + "drop_statement", "opt_exists", "alter_statement", "alter_action", + "drop_action", "delete_statement", "truncate_statement", + "insert_statement", "opt_column_list", "update_statement", + "update_clause_commalist", "update_clause", "select_statement", + "select_within_set_operation", "select_within_set_operation_no_parentheses", "select_with_paren", "select_no_paren", "set_operator", "set_type", "opt_all", "select_clause", "opt_distinct", "select_list", "opt_from_clause", @@ -949,12 +952,12 @@ static const yytype_int16 yytoknum[] = }; #endif -#define YYPACT_NINF (-409) +#define YYPACT_NINF (-413) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF (-284) +#define YYTABLE_NINF (-286) #define yytable_value_is_error(Yyn) \ ((Yyn) == YYTABLE_NINF) @@ -963,60 +966,60 @@ static const yytype_int16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - 585, -2, 65, 72, 104, 65, -13, 22, 34, 38, - 65, 77, 65, 119, 30, 199, 59, 59, 59, 166, - 42, -409, 114, -409, 114, -409, -409, -409, -409, -409, - -409, -409, -409, -409, -409, -409, -409, -35, -409, 231, - 97, -409, 109, 190, -409, 164, 164, 164, 65, 291, - 65, 193, -409, 65, -49, 178, 178, 178, 65, -409, - 189, 155, -409, -409, -409, -409, -409, -409, 554, -409, - 233, -409, -409, 235, -35, 28, -409, 54, -409, 351, - 21, 362, 247, 365, 65, 65, 290, -409, 281, 217, - 382, 303, 390, 390, 350, 401, 65, 65, -409, 238, - 199, -409, 239, 404, 399, 248, 250, -409, -409, -409, - -35, 309, 300, -35, 182, -409, -409, -409, -409, -409, - -409, -409, -409, 260, 259, -409, -409, -409, -409, -409, - -409, -409, -409, -409, 386, -409, 302, 2, 217, 314, - -409, 390, 430, 31, 287, -46, -409, 398, 326, -409, - 326, -409, -409, 308, -409, -409, -409, -409, 436, -409, - -409, 314, -409, -409, 368, -409, -409, 28, -409, -409, - 314, 368, 314, 149, -409, -409, 21, -409, 65, 438, - 334, 40, 322, 86, 283, 284, 285, 204, 345, 288, - 396, -409, 254, 134, 423, -409, -409, -409, -409, -409, - -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, - -409, 358, -409, 43, 292, -409, 314, 382, -409, 178, - 410, -409, -409, 65, 295, 163, -409, 370, 304, -409, - 44, 182, -35, 312, -409, 191, 182, 134, 418, 57, - -409, 317, 387, -409, 301, 366, 324, 168, -409, -409, - -409, 334, 17, 12, 432, 330, 314, 314, 171, -45, - 325, 396, 613, 314, 82, 327, -52, 314, 314, 396, - -409, 396, -58, 329, 158, 396, 396, 396, 396, 396, - 396, 396, 396, 396, 396, 396, 396, 396, 396, 396, - 404, 65, -409, 487, 21, 134, -409, 16, 291, -409, - 21, -409, 436, 10, 290, -409, 314, -409, 490, -409, - -409, -409, -409, 314, -409, -409, -409, -409, 314, 314, - 430, 390, -409, 464, -409, 331, 333, -409, -409, 335, - -409, -409, -409, -409, 336, -409, 1, 339, 430, -409, - 40, -409, -409, 314, -409, -409, 340, -409, -409, -409, - -409, -409, -409, 408, 91, 90, 110, 314, 314, -409, - 432, 397, 118, -409, -409, -409, 393, 560, 649, 396, - 342, 254, -409, 407, 346, 649, 649, 649, 649, 112, - 112, 112, 112, 82, 82, -89, -89, -89, 25, 348, - -409, -409, 174, 349, -409, -409, 184, -409, 334, -409, - 7, -409, 344, -409, 36, -409, 450, -409, -409, -409, - 134, 134, 185, -409, 353, 515, -409, 516, 518, 519, - -409, 409, -409, -409, 424, 1, -409, 430, 194, -409, - 207, -409, 314, 301, 314, 314, -409, 125, 99, 363, - -409, 396, 649, 254, 364, 209, -409, -409, -409, -409, - 367, 428, -409, -409, -409, 453, 456, 457, 439, 10, - 533, -409, -409, -409, 415, -409, -409, 535, 211, 374, - 376, 377, -409, -409, -409, 244, -409, -409, 56, 378, - 134, 196, -409, 314, -409, 613, 379, 252, -409, -409, - 36, 10, -409, -409, -409, 10, 15, 381, 314, 384, - -409, 543, -409, -409, -409, -409, -409, -409, -409, 134, - -409, -409, -409, -409, 383, 430, -9, -409, 385, 392, - 314, 256, 314, -409, -409, 16, 134, -409, -409, 134, - 394, -409 + 543, 36, 55, 63, 146, 55, -27, 119, 125, 96, + 55, 81, 55, -16, 21, 224, 91, 91, 91, 241, + 77, -413, 156, -413, 156, -413, -413, -413, -413, -413, + -413, -413, -413, -413, -413, -413, -413, -33, -413, 276, + 124, -413, 131, 213, -413, 210, 210, 210, 55, 334, + 55, 217, -413, 214, -32, 214, 214, 214, 55, -413, + 219, 170, -413, -413, -413, -413, -413, -413, 512, -413, + 248, -413, -413, 222, -33, 92, -413, 143, -413, 343, + 32, 344, 232, 353, 55, 55, 277, -413, 266, 193, + 359, 318, 55, 363, 363, 365, 55, 55, -413, 202, + 224, -413, 203, 366, 364, 207, 209, -413, -413, -413, + -33, 267, 246, -33, 2, -413, -413, -413, -413, -413, + -413, -413, -413, 211, 212, -413, -413, -413, -413, -413, + -413, -413, -413, -413, 336, -413, 252, -26, 193, 304, + -413, 363, 382, 100, 242, -31, -413, -413, 299, 282, + -413, 282, -413, 264, -413, -413, -413, -413, 392, -413, + -413, 304, -413, -413, 323, -413, -413, 92, -413, -413, + 304, 323, 304, 123, -413, -413, 32, -413, 55, 399, + 293, 140, 281, 39, 239, 243, 245, 254, 308, 244, + 319, -413, 258, -55, 381, -413, -413, -413, -413, -413, + -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, + -413, 311, -413, 46, 249, -413, 304, 359, -413, 377, + -413, -413, 371, -413, -413, 55, 253, 80, -413, 330, + 256, -413, 23, 2, -33, 260, -413, -44, 2, -55, + 375, 11, -413, 265, 341, -413, 749, 316, 269, 109, + -413, -413, -413, 293, 27, 18, 383, 135, 304, 304, + 84, 93, 271, 319, 571, 304, 68, 274, 42, 304, + 304, 319, -413, 319, -59, 278, -39, 319, 319, 319, + 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, + 319, 319, 366, 55, -413, 440, 32, -55, -413, 214, + 334, -413, 32, -413, 392, 16, 277, -413, 304, -413, + 445, -413, -413, -413, -413, 304, -413, -413, -413, -413, + 304, 304, 382, 363, -413, 423, -413, 289, 290, -413, + -413, 291, -413, -413, -413, -413, 292, -413, 19, 298, + 382, -413, 140, -413, -413, 304, -413, -413, 287, -413, + -413, -413, -413, -413, -413, 356, 108, -29, 95, 304, + 304, -413, 383, 360, 30, -413, -413, -413, 352, 518, + 607, 319, 302, 258, -413, 367, 307, 607, 607, 607, + 607, 643, 643, 643, 643, 68, 68, -90, -90, -90, + 25, 317, -413, -413, 110, 20, -413, 116, -413, 293, + -413, 67, -413, 303, -413, 24, -413, 404, -413, -413, + -413, -55, -55, 117, -413, 310, 476, -413, 478, 481, + 482, -413, 370, -413, -413, 389, 19, -413, 382, 118, + -413, 148, -413, 304, 749, 304, 304, -413, 138, 85, + 325, -413, 319, 607, 258, 326, 149, -413, -413, -413, + 329, -413, -413, 331, 405, -413, -413, -413, 425, 427, + 428, 413, 16, 511, -413, -413, -413, 395, -413, -413, + 515, 150, 354, 357, 358, -413, -413, -413, 158, -413, + -413, 57, 379, -55, 139, -413, 304, -413, 571, 385, + 159, -413, -413, 24, 16, -413, -413, -413, 16, 419, + 368, 304, 386, -413, 539, -413, -413, -413, -413, -413, + -413, -413, -55, -413, -413, -413, -413, 429, 382, -21, + -413, 387, 390, 304, 160, 304, -413, -413, 20, -55, + -413, -413, -55, 388, -413 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -1024,94 +1027,94 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_int16 yydefact[] = { - 264, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 266, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 30, 30, 0, - 284, 3, 21, 19, 21, 18, 8, 9, 7, 11, - 16, 17, 13, 14, 12, 15, 10, 0, 263, 0, - 250, 93, 33, 0, 44, 51, 51, 51, 0, 0, - 0, 0, 249, 0, 0, 90, 90, 90, 0, 42, - 0, 265, 266, 29, 26, 28, 27, 1, 264, 2, - 0, 6, 5, 141, 0, 102, 103, 133, 87, 0, - 151, 0, 0, 253, 0, 0, 127, 37, 0, 97, + 286, 3, 21, 19, 21, 18, 8, 9, 7, 11, + 16, 17, 13, 14, 12, 15, 10, 0, 265, 0, + 252, 95, 33, 0, 44, 51, 51, 51, 0, 0, + 0, 0, 251, 90, 0, 90, 90, 90, 0, 42, + 0, 267, 268, 29, 26, 28, 27, 1, 266, 2, + 0, 6, 5, 143, 0, 104, 105, 135, 87, 0, + 153, 0, 0, 255, 0, 0, 129, 37, 0, 99, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, - 0, 4, 0, 0, 121, 0, 0, 115, 116, 114, - 0, 118, 0, 0, 147, 251, 232, 235, 237, 238, - 233, 234, 239, 0, 150, 152, 227, 228, 229, 236, - 230, 231, 32, 31, 0, 252, 0, 0, 97, 0, - 92, 0, 0, 0, 0, 127, 99, 0, 40, 38, - 40, 89, 254, 0, 85, 86, 268, 267, 0, 140, - 120, 0, 110, 109, 133, 106, 105, 107, 117, 113, - 0, 133, 0, 0, 111, 34, 0, 50, 0, 0, - 264, 0, 0, 223, 0, 0, 0, 0, 0, 0, - 0, 225, 0, 126, 155, 162, 163, 164, 157, 159, - 165, 158, 178, 166, 167, 168, 169, 161, 156, 171, - 172, 0, 285, 0, 0, 95, 0, 0, 98, 90, - 0, 36, 41, 0, 24, 0, 22, 124, 122, 148, - 262, 147, 0, 132, 134, 139, 147, 143, 145, 142, - 153, 0, 0, 47, 0, 0, 0, 0, 52, 54, - 55, 264, 121, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 174, 0, 173, 0, 0, 0, 0, 0, - 175, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 0, 0, 123, 0, 0, 117, 118, 116, + 0, 120, 0, 0, 149, 253, 234, 237, 239, 240, + 235, 236, 241, 0, 152, 154, 229, 230, 231, 238, + 232, 233, 32, 31, 0, 254, 0, 0, 99, 0, + 94, 0, 0, 0, 0, 129, 101, 89, 0, 40, + 38, 40, 256, 0, 85, 86, 270, 269, 0, 142, + 122, 0, 112, 111, 135, 108, 107, 109, 119, 115, + 0, 135, 0, 0, 113, 34, 0, 50, 0, 0, + 266, 0, 0, 225, 0, 0, 0, 0, 0, 0, + 0, 227, 0, 128, 157, 164, 165, 166, 159, 161, + 167, 160, 180, 168, 169, 170, 171, 163, 158, 173, + 174, 0, 287, 0, 0, 97, 0, 0, 100, 0, + 91, 92, 0, 36, 41, 0, 24, 0, 22, 126, + 124, 150, 264, 149, 0, 134, 136, 141, 149, 145, + 147, 144, 155, 0, 0, 47, 0, 0, 0, 0, + 52, 54, 55, 266, 123, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 176, 0, 175, 0, 0, 0, + 0, 0, 177, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 96, 0, 0, 101, 100, 0, 0, 88, - 0, 20, 0, 0, 127, 123, 0, 260, 0, 261, - 154, 104, 108, 0, 138, 137, 136, 112, 0, 0, - 0, 0, 58, 0, 63, 75, 0, 62, 60, 0, - 70, 69, 59, 67, 72, 57, 78, 0, 0, 46, - 0, 49, 210, 0, 224, 226, 0, 214, 215, 216, - 217, 218, 219, 0, 0, 0, 0, 0, 0, 197, - 0, 0, 0, 170, 160, 189, 190, 0, 185, 0, - 0, 0, 176, 0, 188, 187, 203, 204, 205, 206, - 207, 208, 209, 180, 179, 182, 181, 183, 184, 0, - 35, 286, 0, 223, 91, 39, 0, 23, 264, 125, - 240, 242, 0, 244, 258, 243, 129, 149, 259, 135, - 146, 144, 0, 45, 0, 0, 61, 0, 0, 0, - 68, 0, 80, 81, 0, 56, 76, 0, 0, 53, - 0, 201, 0, 0, 0, 0, 195, 0, 0, 0, - 220, 0, 186, 0, 0, 0, 177, 221, 94, 25, - 0, 0, 280, 272, 278, 276, 279, 274, 0, 0, - 0, 257, 248, 255, 0, 119, 48, 0, 0, 0, - 0, 0, 79, 82, 77, 0, 84, 211, 0, 0, - 199, 0, 198, 0, 202, 222, 0, 0, 193, 191, - 258, 0, 275, 277, 273, 0, 241, 259, 0, 0, - 74, 0, 64, 66, 71, 83, 212, 213, 196, 200, - 194, 192, 245, 269, 281, 0, 131, 65, 0, 0, - 0, 0, 0, 128, 73, 0, 282, 270, 256, 130, - 0, 271 + 0, 0, 0, 0, 98, 0, 0, 103, 102, 90, + 0, 88, 0, 20, 0, 0, 129, 125, 0, 262, + 0, 263, 156, 106, 110, 0, 140, 139, 138, 114, + 0, 0, 0, 0, 58, 0, 63, 75, 0, 62, + 60, 0, 70, 69, 59, 67, 72, 57, 78, 0, + 0, 46, 0, 49, 212, 0, 226, 228, 0, 216, + 217, 218, 219, 220, 221, 0, 0, 0, 0, 0, + 0, 199, 0, 0, 0, 172, 162, 191, 192, 0, + 187, 0, 0, 0, 178, 0, 190, 189, 205, 206, + 207, 208, 209, 210, 211, 182, 181, 184, 183, 185, + 186, 0, 35, 288, 0, 0, 39, 0, 23, 266, + 127, 242, 244, 0, 246, 260, 245, 131, 151, 261, + 137, 148, 146, 0, 45, 0, 0, 61, 0, 0, + 0, 68, 0, 80, 81, 0, 56, 76, 0, 0, + 53, 0, 203, 0, 0, 0, 0, 197, 0, 0, + 0, 222, 0, 188, 0, 0, 0, 179, 223, 96, + 225, 93, 25, 0, 0, 282, 274, 280, 278, 281, + 276, 0, 0, 0, 259, 250, 257, 0, 121, 48, + 0, 0, 0, 0, 0, 79, 82, 77, 0, 84, + 213, 0, 0, 201, 0, 200, 0, 204, 224, 0, + 0, 195, 193, 260, 0, 277, 279, 275, 0, 243, + 261, 0, 0, 74, 0, 64, 66, 71, 83, 214, + 215, 198, 202, 196, 194, 247, 271, 283, 0, 133, + 65, 0, 0, 0, 0, 0, 130, 73, 0, 284, + 272, 258, 132, 0, 273 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -409, -409, -409, 492, -409, 540, -409, 263, -409, 323, - -409, -409, -409, -409, 268, -83, 417, -409, -409, -409, - 145, -409, 230, -409, 144, -409, -409, -409, 162, -409, - -409, -36, -409, -409, -409, -409, 451, -409, -409, 380, - -171, -96, -409, 23, -73, -47, -409, -409, -75, 343, - -409, -409, -409, -131, -409, -409, 115, -409, 278, -409, - -409, 92, -261, -409, -133, 293, -139, -138, -409, -409, - -409, -409, -409, -409, 338, -409, -409, -409, -409, -409, - -409, -409, -409, -409, -293, -77, -86, -409, -409, -91, - -409, -409, -409, -408, 107, -409, -409, -409, 6, -409, - -409, -409, 111, 372, -409, -409, -409, -409, 503, -409, - -409, -409, -409, -315 + -413, -413, -413, 456, -413, 525, -413, 257, -413, 315, + -413, -413, -413, -413, 262, -86, 409, -413, -413, -413, + 288, -413, 225, -413, 132, -413, -413, -413, 142, -413, + -413, -50, -413, -413, -413, -413, -413, -413, 432, -413, + -413, 355, -165, -83, -413, -5, -71, -35, -413, -413, + -88, 321, -413, -413, -413, -127, -413, -413, -9, -413, + 261, -413, -413, 7, -255, -413, -138, 270, -139, -174, + -413, -413, -413, -413, -413, -413, 313, -413, -413, -413, + -413, -413, -413, -413, -413, -413, -375, -52, -81, -413, + -413, -101, -413, -413, -413, -412, 86, -413, -413, -413, + -1, -413, -413, -413, 88, 361, -413, -413, -413, -413, + 484, -413, -413, -413, -413, -305 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - 0, 19, 20, 21, 22, 71, 225, 226, 23, 64, - 24, 133, 25, 26, 88, 148, 221, 27, 28, 29, - 83, 247, 248, 249, 336, 420, 416, 425, 426, 250, - 30, 95, 31, 32, 33, 34, 143, 35, 145, 146, - 36, 164, 165, 166, 76, 110, 111, 169, 77, 161, - 227, 304, 305, 140, 465, 523, 114, 233, 234, 316, - 104, 174, 228, 123, 124, 229, 230, 194, 195, 196, - 197, 198, 199, 200, 259, 201, 202, 203, 204, 205, - 353, 206, 207, 208, 209, 210, 126, 127, 128, 129, - 130, 131, 399, 400, 401, 402, 403, 51, 404, 136, - 153, 461, 462, 463, 310, 37, 38, 61, 62, 405, - 458, 527, 69, 213 + 0, 19, 20, 21, 22, 71, 227, 228, 23, 64, + 24, 133, 25, 26, 88, 149, 223, 27, 28, 29, + 83, 249, 250, 251, 338, 421, 417, 426, 427, 252, + 30, 92, 31, 220, 221, 32, 33, 34, 143, 35, + 145, 146, 36, 164, 165, 166, 76, 110, 111, 169, + 77, 161, 229, 306, 307, 140, 468, 526, 114, 235, + 236, 318, 104, 174, 230, 123, 124, 231, 232, 194, + 195, 196, 197, 198, 199, 200, 261, 201, 202, 203, + 204, 205, 355, 206, 207, 208, 209, 210, 126, 127, + 128, 129, 130, 131, 400, 401, 402, 403, 404, 51, + 405, 136, 153, 464, 465, 466, 312, 37, 38, 61, + 62, 406, 461, 530, 69, 213 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1119,174 +1122,184 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 193, 106, 362, 125, 394, 412, 149, 149, 41, 243, - 150, 44, 159, 40, 218, 344, 52, 171, 54, 393, - 96, 97, 73, 428, 39, 116, 117, 118, 421, 160, - 113, 235, 451, 237, 239, 167, 139, 107, 167, 307, - 451, 522, 369, 244, 92, 275, 357, 307, 258, 58, - 262, 496, 264, 266, 86, 149, 89, 45, 211, 91, - 75, 422, 267, 107, 98, 358, 46, 245, 40, 370, - 215, 359, 108, 452, 289, 42, 290, 295, 453, 268, - 341, 452, 430, 93, 454, 455, 453, 514, 73, 59, - 137, 138, 454, 455, 214, 179, 47, 105, 108, 240, - 246, 456, 154, 155, 423, -281, 457, 43, 109, 456, - 445, 319, 475, -281, 457, 48, 364, 354, 355, 265, - 232, 424, 156, 262, 119, 217, 180, 49, 365, 366, - 112, 367, 74, 368, 109, 50, 312, 374, 375, 376, - 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, - 387, 388, 183, 116, 117, 118, 53, 167, 267, 275, - 460, 392, 306, 120, 121, 270, 67, 396, 308, 181, - 267, 267, 345, 406, 235, 268, 191, 398, -246, 410, - 411, 346, 487, 297, 241, 342, -247, 268, 268, 55, - 290, 84, 85, 122, 184, 185, 186, 434, 56, 389, - 521, 435, 60, 63, 267, 267, 483, 183, 116, 117, - 118, 292, 68, 267, 293, 433, 275, 125, 437, 438, - 358, 268, 268, 125, 506, 70, 436, 450, 57, 299, - 268, 442, 530, 187, 78, 149, 172, 516, 413, 267, - 274, 482, 286, 287, 288, 289, 275, 290, 267, 184, - 185, 186, 119, 252, 173, 253, 268, 183, 116, 117, - 118, 372, 238, -284, -284, 268, 79, -284, -284, 188, - 284, 285, 286, 287, 288, 289, 80, 290, 373, 231, - 314, 257, 189, 81, 440, 267, 236, 439, 187, 306, - 82, 120, 121, 478, 87, 480, 481, 390, 444, 184, - 185, 186, 268, 485, 94, 267, 315, 119, 190, 191, - 267, 73, 508, 99, 257, 90, 192, 183, 116, 117, - 118, 122, 268, 311, 188, 322, 100, 268, 317, 102, - 323, 301, 324, 325, 302, 326, 339, 189, 187, 340, - 65, 66, 448, 327, 509, 176, 120, 121, 183, 116, - 117, 118, 449, 466, 115, 176, 293, 119, 103, 184, - 185, 186, 476, 190, 191, 293, 132, 134, 135, 328, - 486, 192, 139, 141, 188, 477, 122, 489, 306, 500, - 306, 526, 501, 529, 142, 144, 329, 189, 330, 331, - 260, 185, 186, 147, 116, 151, 120, 121, 187, 183, - 116, 117, 118, 332, 152, 74, 158, 333, 451, 334, - 118, 160, 505, 190, 191, 293, 162, 119, 163, 335, - 511, 192, 168, 306, 528, 170, 122, 293, 175, 187, - 176, 177, 178, 212, 188, 216, 219, 220, 223, 224, - 269, 242, 185, 186, 112, 15, 251, 189, 119, 452, - 254, 255, 256, 263, 453, 291, 120, 121, 298, 294, - 454, 455, 300, 303, 519, 261, 347, 348, 349, 350, - 351, 352, 318, 190, 191, 306, 270, 456, 189, 321, - 187, 192, 457, 313, 320, 337, 122, 120, 121, 73, - 391, 338, 360, 408, 414, 363, 371, 369, 415, 119, - 417, 432, 418, 419, 190, 191, 427, 267, 431, 443, - 446, 290, 192, 520, 447, 459, 261, 122, 253, 464, - 467, 468, 469, 271, 470, 471, 491, 473, 472, 189, - 492, 484, 488, 493, 494, 490, 497, 495, 120, 121, - 498, 499, 502, 272, 503, 504, 507, 510, 515, 518, - 273, 274, 517, 524, -283, 190, 191, 275, 276, 525, - 101, 1, 531, 192, 72, 397, 395, 222, 122, 2, - 429, 277, 278, 279, 280, 281, 3, 479, 282, 283, - 4, 284, 285, 286, 287, 288, 289, 474, 290, 182, - 5, 409, 1, 6, 7, 343, 356, 296, 513, 407, - 2, 512, 309, 157, 0, 8, 9, 3, 0, 0, - 0, 4, 0, 270, 0, 0, 10, 0, 0, 11, - 0, 5, 0, 0, 6, 7, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 8, 9, 0, 0, - 12, 0, 0, 0, 13, 0, 0, 10, 0, 0, - 11, 0, 0, 0, 0, 0, 0, 0, 0, 14, - 271, 0, 0, 0, 0, 15, 270, 0, 0, 0, - 0, 12, 0, 0, 441, 13, 0, 0, 0, 0, - 361, 0, 0, 0, 0, 0, 0, 0, 274, 0, - 14, 0, 0, 0, 275, 276, 15, 0, 0, 16, - 17, 18, 270, 0, 0, 0, 0, 0, 277, 278, - 279, 280, 281, 271, 0, 282, 283, 0, 284, 285, - 286, 287, 288, 289, 0, 290, 0, 0, 0, 0, - 16, 17, 18, 361, 0, 0, 0, 0, 0, 0, - 0, 274, 0, 0, 0, 0, 0, 275, 276, -284, + 193, 41, 159, 106, 44, 95, 96, 97, 151, 52, + 364, 54, 150, 150, 264, 245, 266, 413, 218, 40, + 451, 346, 167, 450, 73, 167, 309, 309, 125, 525, + 171, 237, 75, 239, 241, 429, 116, 117, 118, 160, + 58, 371, 113, 45, 277, 316, 422, 86, 260, 89, + 499, 139, 46, 268, 55, 211, 172, 98, 40, 269, + 150, 93, 39, 56, 374, 321, 42, 179, 372, 105, + 269, 317, 215, 291, 173, 292, 270, 297, 435, 423, + 59, 375, 47, 137, 138, 269, 517, 270, 343, 264, + 431, 148, 454, 57, 156, 154, 155, 369, 180, 370, + 94, 107, 270, 376, 377, 378, 379, 380, 381, 382, + 383, 384, 385, 386, 387, 388, 389, 390, 446, 356, + 357, 267, 424, 478, 242, 269, 183, 116, 117, 118, + 367, 368, 234, 455, 74, 119, 108, 269, 456, 425, + 217, 181, 270, 246, 457, 458, 167, 310, 463, 43, + 308, 314, 107, 533, 270, 233, 269, 73, 394, 277, + 53, 459, 238, 214, 397, -283, 460, 247, 184, 185, + 186, 269, 109, 270, 120, 121, 237, 243, 347, 407, + 191, 411, 412, 399, 359, 348, 436, 108, 270, 490, + 292, 391, 486, 50, 259, 344, 441, 443, 269, 269, + 248, 308, 277, 360, 122, 360, 254, 187, 255, 361, + 366, 437, 48, 524, 294, 270, 270, 295, 49, 112, + 438, 439, 269, 109, 301, 509, 119, 60, 288, 289, + 290, 291, 434, 292, 453, 63, 240, 414, -248, 270, + 313, 67, 150, 188, 125, 319, 519, 68, 303, 395, + 125, 304, 269, 269, 485, 511, 189, 183, 116, 117, + 118, 183, 116, 117, 118, 120, 121, 70, 488, 270, + 270, 349, 350, 351, 352, 353, 354, 341, 449, 78, + 342, 176, 190, 191, 452, 469, 479, 176, 295, 295, + 192, 440, 392, 79, 481, 122, 483, 484, 80, 184, + 185, 186, 445, 184, 185, 186, 81, 183, 116, 117, + 118, 183, 116, 117, 118, 73, 480, 492, 503, 308, + 308, 504, 183, 116, 117, 118, 508, 514, 531, 295, + 308, 295, 65, 66, 84, 85, 82, 87, 187, 90, + 91, 100, 187, 99, 102, 103, 115, 512, 132, 184, + 185, 186, 134, 262, 185, 186, 135, 119, 141, 139, + 142, 119, 144, 147, 259, 185, 186, 116, 152, 74, + 158, 170, 118, 489, 188, 162, 160, 163, 188, 175, + 168, 177, 178, 176, 529, 212, 532, 189, 187, 219, + 216, 189, 187, 222, 225, 226, 120, 121, 271, 112, + 120, 121, 244, 187, 15, 253, 256, 119, 293, 265, + 257, 119, 258, 190, 191, 299, 296, 190, 191, 300, + 302, 192, 119, 305, 188, 192, 122, 308, 263, 320, + 122, 315, 322, 323, 272, 339, 340, 189, 362, 263, + 73, 189, 365, 393, 454, 373, 120, 121, 409, 433, + 120, 121, 189, 415, 454, 432, 416, 418, 419, 420, + 371, 120, 121, 190, 191, 428, 269, 190, 191, 444, + 447, 192, 292, 467, 462, 192, 122, 470, 190, 191, + 122, 273, 471, 448, 472, 455, 192, 473, 474, 475, + 456, 122, 476, 487, 491, 455, 457, 458, 255, 493, + 456, 274, 495, 494, 496, 497, 457, 458, 275, 276, + 522, 498, -285, 459, 500, 277, 278, -283, 460, 1, + 501, 502, 505, 459, 101, 506, 507, 2, 460, 279, + 280, 281, 282, 283, 3, 518, 284, 285, 4, 286, + 287, 288, 289, 290, 291, 521, 292, 510, 5, 72, + 1, 6, 7, 513, 520, 527, 534, 528, 2, 523, + 224, 398, 396, 8, 9, 3, 482, 430, 477, 4, + 182, 272, 298, 358, 10, 345, 410, 11, 408, 5, + 516, 515, 6, 7, 157, 0, 0, 0, 0, 0, + -249, 0, 0, 311, 8, 9, 0, 0, 12, 0, + 0, 0, 13, 0, 0, 10, 0, 0, 11, 0, + 0, 0, 0, 0, 0, 0, 0, 14, 273, 0, + 0, 0, 0, 15, 272, 0, 0, 0, 0, 12, + 0, 0, 442, 13, 0, 0, 0, 0, 363, 0, + 0, 0, 0, 0, 0, 0, 276, 0, 14, 0, + 0, 0, 277, 278, 15, 0, 0, 16, 17, 18, + 272, 0, 0, 0, 0, 0, 279, 280, 281, 282, + 283, 273, 0, 284, 285, 0, 286, 287, 288, 289, + 290, 291, 0, 292, 0, 0, 0, 0, 16, 17, + 18, 363, 0, 0, 0, 0, 272, 0, 0, 276, + 0, 0, 0, 0, 0, 277, 278, -286, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 279, + 280, 281, 282, 283, 0, 0, 284, 285, 0, 286, + 287, 288, 289, 290, 291, 276, 292, 0, 0, 0, + 0, 277, -286, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -286, -286, -286, 282, 283, + 0, 0, 284, 285, 0, 286, 287, 288, 289, 290, + 291, 276, 292, 324, 0, 0, 0, 277, 325, 0, + 326, 327, 0, 328, 0, 0, 0, 0, 0, 0, + 0, 329, 0, 0, -286, -286, 0, 0, -286, -286, + 0, 286, 287, 288, 289, 290, 291, 0, 292, 0, + 0, 0, 0, 0, 0, 0, 0, 330, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 331, 0, 332, 333, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 277, 278, 279, 280, 281, 0, 0, 282, 283, - 0, 284, 285, 286, 287, 288, 289, 274, 290, 0, - 0, 0, 0, 275, -284, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, -284, -284, -284, - 280, 281, 0, 0, 282, 283, 0, 284, 285, 286, - 287, 288, 289, 0, 290 + 0, 334, 0, 0, 0, 335, 0, 336, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 337 }; static const yytype_int16 yycheck[] = { - 139, 74, 263, 80, 297, 320, 92, 93, 2, 180, - 93, 5, 103, 3, 145, 3, 10, 113, 12, 3, - 56, 57, 57, 338, 26, 4, 5, 6, 27, 12, - 77, 170, 25, 172, 173, 110, 82, 9, 113, 3, - 25, 50, 100, 3, 93, 134, 91, 3, 187, 19, - 188, 459, 190, 192, 48, 141, 50, 70, 141, 53, - 37, 60, 114, 9, 58, 110, 79, 27, 3, 127, - 143, 116, 44, 66, 163, 3, 165, 216, 71, 131, - 251, 66, 343, 132, 77, 78, 71, 495, 57, 59, - 84, 85, 77, 78, 63, 93, 109, 74, 44, 176, - 60, 94, 96, 97, 103, 98, 99, 3, 80, 94, - 371, 54, 427, 98, 99, 93, 168, 256, 257, 192, - 167, 120, 99, 261, 103, 171, 124, 93, 267, 268, - 76, 269, 167, 271, 80, 97, 232, 275, 276, 277, - 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, - 288, 289, 3, 4, 5, 6, 79, 232, 114, 134, - 124, 294, 171, 142, 143, 53, 0, 300, 124, 167, - 114, 114, 160, 304, 313, 131, 160, 167, 171, 318, - 319, 254, 443, 219, 178, 168, 171, 131, 131, 70, - 165, 46, 47, 172, 45, 46, 47, 107, 79, 290, - 515, 91, 3, 144, 114, 114, 107, 3, 4, 5, - 6, 168, 170, 114, 171, 124, 134, 294, 357, 358, - 110, 131, 131, 300, 168, 111, 116, 398, 109, 223, - 131, 369, 525, 84, 3, 321, 54, 498, 321, 114, - 128, 116, 160, 161, 162, 163, 134, 165, 114, 45, - 46, 47, 103, 167, 72, 169, 131, 3, 4, 5, - 6, 103, 113, 151, 152, 131, 169, 155, 156, 120, - 158, 159, 160, 161, 162, 163, 167, 165, 120, 164, - 89, 110, 133, 93, 166, 114, 171, 360, 84, 171, - 126, 142, 143, 432, 3, 434, 435, 291, 371, 45, - 46, 47, 131, 441, 126, 114, 115, 103, 159, 160, - 114, 57, 116, 124, 110, 122, 167, 3, 4, 5, - 6, 172, 131, 231, 120, 24, 171, 131, 236, 96, - 29, 168, 31, 32, 171, 34, 168, 133, 84, 171, - 17, 18, 168, 42, 483, 171, 142, 143, 3, 4, - 5, 6, 168, 168, 3, 171, 171, 103, 123, 45, - 46, 47, 168, 159, 160, 171, 4, 120, 3, 68, - 443, 167, 82, 92, 120, 168, 172, 168, 171, 168, - 171, 520, 171, 522, 167, 3, 85, 133, 87, 88, - 45, 46, 47, 90, 4, 45, 142, 143, 84, 3, - 4, 5, 6, 102, 3, 167, 167, 106, 25, 108, - 6, 12, 168, 159, 160, 171, 168, 103, 168, 118, - 168, 167, 113, 171, 168, 125, 172, 171, 168, 84, - 171, 45, 130, 3, 120, 148, 38, 111, 130, 3, - 17, 3, 46, 47, 76, 111, 124, 133, 103, 66, - 167, 167, 167, 165, 71, 97, 142, 143, 48, 167, - 77, 78, 167, 93, 81, 120, 136, 137, 138, 139, - 140, 141, 54, 159, 160, 171, 53, 94, 133, 92, - 84, 167, 99, 171, 167, 119, 172, 142, 143, 57, - 3, 167, 167, 3, 30, 168, 167, 100, 167, 103, - 167, 93, 167, 167, 159, 160, 167, 114, 168, 167, - 103, 165, 167, 130, 166, 171, 120, 172, 169, 69, - 167, 6, 6, 100, 6, 6, 98, 103, 119, 133, - 77, 168, 168, 77, 77, 168, 3, 98, 142, 143, - 125, 6, 168, 120, 168, 168, 168, 168, 167, 6, - 127, 128, 168, 168, 0, 159, 160, 134, 135, 167, - 68, 7, 168, 167, 24, 302, 298, 150, 172, 15, - 340, 148, 149, 150, 151, 152, 22, 433, 155, 156, - 26, 158, 159, 160, 161, 162, 163, 425, 165, 138, - 36, 313, 7, 39, 40, 252, 258, 217, 491, 306, - 15, 490, 230, 100, -1, 51, 52, 22, -1, -1, - -1, 26, -1, 53, -1, -1, 62, -1, -1, 65, - -1, 36, -1, -1, 39, 40, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 51, 52, -1, -1, - 86, -1, -1, -1, 90, -1, -1, 62, -1, -1, - 65, -1, -1, -1, -1, -1, -1, -1, -1, 105, - 100, -1, -1, -1, -1, 111, 53, -1, -1, -1, - -1, 86, -1, -1, 114, 90, -1, -1, -1, -1, - 120, -1, -1, -1, -1, -1, -1, -1, 128, -1, - 105, -1, -1, -1, 134, 135, 111, -1, -1, 145, - 146, 147, 53, -1, -1, -1, -1, -1, 148, 149, - 150, 151, 152, 100, -1, 155, 156, -1, 158, 159, - 160, 161, 162, 163, -1, 165, -1, -1, -1, -1, - 145, 146, 147, 120, -1, -1, -1, -1, -1, -1, - -1, 128, -1, -1, -1, -1, -1, 134, 135, 100, + 139, 2, 103, 74, 5, 55, 56, 57, 94, 10, + 265, 12, 93, 94, 188, 180, 190, 322, 145, 3, + 395, 3, 110, 3, 57, 113, 3, 3, 80, 50, + 113, 170, 37, 172, 173, 340, 4, 5, 6, 12, + 19, 100, 77, 70, 134, 89, 27, 48, 187, 50, + 462, 82, 79, 192, 70, 141, 54, 58, 3, 114, + 141, 93, 26, 79, 103, 54, 3, 93, 127, 74, + 114, 115, 143, 163, 72, 165, 131, 216, 107, 60, + 59, 120, 109, 84, 85, 114, 498, 131, 253, 263, + 345, 92, 25, 109, 99, 96, 97, 271, 124, 273, + 132, 9, 131, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, 287, 288, 289, 290, 291, 373, 258, + 259, 192, 103, 428, 176, 114, 3, 4, 5, 6, + 269, 270, 167, 66, 167, 103, 44, 114, 71, 120, + 171, 167, 131, 3, 77, 78, 234, 124, 124, 3, + 171, 234, 9, 528, 131, 164, 114, 57, 296, 134, + 79, 94, 171, 63, 302, 98, 99, 27, 45, 46, + 47, 114, 80, 131, 142, 143, 315, 178, 160, 306, + 160, 320, 321, 167, 91, 256, 91, 44, 131, 444, + 165, 292, 107, 97, 110, 168, 166, 371, 114, 114, + 60, 171, 134, 110, 172, 110, 167, 84, 169, 116, + 168, 116, 93, 518, 168, 131, 131, 171, 93, 76, + 359, 360, 114, 80, 225, 168, 103, 3, 160, 161, + 162, 163, 124, 165, 399, 144, 113, 323, 171, 131, + 233, 0, 323, 120, 296, 238, 501, 170, 168, 299, + 302, 171, 114, 114, 116, 116, 133, 3, 4, 5, + 6, 3, 4, 5, 6, 142, 143, 111, 442, 131, + 131, 136, 137, 138, 139, 140, 141, 168, 168, 3, + 171, 171, 159, 160, 168, 168, 168, 171, 171, 171, + 167, 362, 293, 169, 433, 172, 435, 436, 167, 45, + 46, 47, 373, 45, 46, 47, 93, 3, 4, 5, + 6, 3, 4, 5, 6, 57, 168, 168, 168, 171, + 171, 171, 3, 4, 5, 6, 168, 168, 168, 171, + 171, 171, 17, 18, 46, 47, 126, 3, 84, 122, + 126, 171, 84, 124, 96, 123, 3, 486, 4, 45, + 46, 47, 120, 45, 46, 47, 3, 103, 92, 82, + 167, 103, 3, 45, 110, 46, 47, 4, 3, 167, + 167, 125, 6, 444, 120, 168, 12, 168, 120, 168, + 113, 45, 130, 171, 523, 3, 525, 133, 84, 90, + 148, 133, 84, 111, 130, 3, 142, 143, 17, 76, + 142, 143, 3, 84, 111, 124, 167, 103, 97, 165, + 167, 103, 167, 159, 160, 38, 167, 159, 160, 48, + 167, 167, 103, 93, 120, 167, 172, 171, 120, 54, + 172, 171, 167, 92, 53, 119, 167, 133, 167, 120, + 57, 133, 168, 3, 25, 167, 142, 143, 3, 93, + 142, 143, 133, 30, 25, 168, 167, 167, 167, 167, + 100, 142, 143, 159, 160, 167, 114, 159, 160, 167, + 103, 167, 165, 69, 171, 167, 172, 167, 159, 160, + 172, 100, 6, 166, 6, 66, 167, 6, 6, 119, + 71, 172, 103, 168, 168, 66, 77, 78, 169, 168, + 71, 120, 77, 98, 77, 77, 77, 78, 127, 128, + 81, 98, 0, 94, 3, 134, 135, 98, 99, 7, + 125, 6, 168, 94, 68, 168, 168, 15, 99, 148, + 149, 150, 151, 152, 22, 167, 155, 156, 26, 158, + 159, 160, 161, 162, 163, 6, 165, 168, 36, 24, + 7, 39, 40, 168, 168, 168, 168, 167, 15, 130, + 151, 304, 300, 51, 52, 22, 434, 342, 426, 26, + 138, 53, 217, 260, 62, 254, 315, 65, 308, 36, + 494, 493, 39, 40, 100, -1, -1, -1, -1, -1, + 171, -1, -1, 232, 51, 52, -1, -1, 86, -1, + -1, -1, 90, -1, -1, 62, -1, -1, 65, -1, + -1, -1, -1, -1, -1, -1, -1, 105, 100, -1, + -1, -1, -1, 111, 53, -1, -1, -1, -1, 86, + -1, -1, 114, 90, -1, -1, -1, -1, 120, -1, + -1, -1, -1, -1, -1, -1, 128, -1, 105, -1, + -1, -1, 134, 135, 111, -1, -1, 145, 146, 147, + 53, -1, -1, -1, -1, -1, 148, 149, 150, 151, + 152, 100, -1, 155, 156, -1, 158, 159, 160, 161, + 162, 163, -1, 165, -1, -1, -1, -1, 145, 146, + 147, 120, -1, -1, -1, -1, 53, -1, -1, 128, + -1, -1, -1, -1, -1, 134, 135, 100, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 148, + 149, 150, 151, 152, -1, -1, 155, 156, -1, 158, + 159, 160, 161, 162, 163, 128, 165, -1, -1, -1, + -1, 134, 135, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 148, 149, 150, 151, 152, + -1, -1, 155, 156, -1, 158, 159, 160, 161, 162, + 163, 128, 165, 24, -1, -1, -1, 134, 29, -1, + 31, 32, -1, 34, -1, -1, -1, -1, -1, -1, + -1, 42, -1, -1, 151, 152, -1, -1, 155, 156, + -1, 158, 159, 160, 161, 162, 163, -1, 165, -1, + -1, -1, -1, -1, -1, -1, -1, 68, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 148, 149, 150, 151, 152, -1, -1, 155, 156, - -1, 158, 159, 160, 161, 162, 163, 128, 165, -1, - -1, -1, -1, 134, 135, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 148, 149, 150, - 151, 152, -1, -1, 155, 156, -1, 158, 159, 160, - 161, 162, 163, -1, 165 + -1, -1, -1, -1, 85, -1, 87, 88, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 102, -1, -1, -1, 106, -1, 108, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 118 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1296,57 +1309,57 @@ static const yytype_int16 yystos[] = 0, 7, 15, 22, 26, 36, 39, 40, 51, 52, 62, 65, 86, 90, 105, 111, 145, 146, 147, 174, 175, 176, 177, 181, 183, 185, 186, 190, 191, 192, - 203, 205, 206, 207, 208, 210, 213, 278, 279, 26, - 3, 271, 3, 3, 271, 70, 79, 109, 93, 93, - 97, 270, 271, 79, 271, 70, 79, 109, 19, 59, - 3, 280, 281, 144, 182, 182, 182, 0, 170, 285, - 111, 178, 178, 57, 167, 216, 217, 221, 3, 169, - 167, 93, 126, 193, 193, 193, 271, 3, 187, 271, - 122, 271, 93, 132, 126, 204, 204, 204, 271, 124, - 171, 176, 96, 123, 233, 216, 217, 9, 44, 80, - 218, 219, 76, 218, 229, 3, 4, 5, 6, 103, - 142, 143, 172, 236, 237, 258, 259, 260, 261, 262, - 263, 264, 4, 184, 120, 3, 272, 271, 271, 82, - 226, 92, 167, 209, 3, 211, 212, 90, 188, 259, - 188, 45, 3, 273, 271, 271, 216, 281, 167, 262, - 12, 222, 168, 168, 214, 215, 216, 221, 113, 220, - 125, 214, 54, 72, 234, 168, 171, 45, 130, 93, - 124, 167, 209, 3, 45, 46, 47, 84, 120, 133, - 159, 160, 167, 239, 240, 241, 242, 243, 244, 245, - 246, 248, 249, 250, 251, 252, 254, 255, 256, 257, - 258, 188, 3, 286, 63, 217, 148, 171, 226, 38, - 111, 189, 189, 130, 3, 179, 180, 223, 235, 238, - 239, 229, 218, 230, 231, 239, 229, 239, 113, 239, - 258, 271, 3, 213, 3, 27, 60, 194, 195, 196, - 202, 124, 167, 169, 167, 167, 167, 110, 239, 247, - 45, 120, 240, 165, 240, 217, 239, 114, 131, 17, - 53, 100, 120, 127, 128, 134, 135, 148, 149, 150, - 151, 152, 155, 156, 158, 159, 160, 161, 162, 163, - 165, 97, 168, 171, 167, 239, 212, 204, 48, 271, - 167, 168, 171, 93, 224, 225, 171, 3, 124, 276, - 277, 234, 214, 171, 89, 115, 232, 234, 54, 54, - 167, 92, 24, 29, 31, 32, 34, 42, 68, 85, - 87, 88, 102, 106, 108, 118, 197, 119, 167, 168, - 171, 213, 168, 222, 3, 160, 217, 136, 137, 138, - 139, 140, 141, 253, 239, 239, 247, 91, 110, 116, - 167, 120, 235, 168, 168, 239, 239, 240, 240, 100, - 127, 167, 103, 120, 240, 240, 240, 240, 240, 240, - 240, 240, 240, 240, 240, 240, 240, 240, 240, 262, - 271, 3, 237, 3, 257, 187, 237, 180, 167, 265, - 266, 267, 268, 269, 271, 282, 226, 238, 3, 231, - 239, 239, 286, 188, 30, 167, 199, 167, 167, 167, - 198, 27, 60, 103, 120, 200, 201, 167, 286, 195, - 235, 168, 93, 124, 107, 91, 116, 239, 239, 217, - 166, 114, 240, 167, 217, 235, 103, 166, 168, 168, - 213, 25, 66, 71, 77, 78, 94, 99, 283, 171, - 124, 274, 275, 276, 69, 227, 168, 167, 6, 6, - 6, 6, 119, 103, 201, 286, 168, 168, 239, 197, - 239, 239, 116, 107, 168, 240, 217, 235, 168, 168, - 168, 98, 77, 77, 77, 98, 266, 3, 125, 6, - 168, 171, 168, 168, 168, 168, 168, 168, 116, 239, - 168, 168, 275, 267, 266, 167, 235, 168, 6, 81, - 130, 286, 50, 228, 168, 167, 239, 284, 168, 239, - 257, 168 + 203, 205, 208, 209, 210, 212, 215, 280, 281, 26, + 3, 273, 3, 3, 273, 70, 79, 109, 93, 93, + 97, 272, 273, 79, 273, 70, 79, 109, 19, 59, + 3, 282, 283, 144, 182, 182, 182, 0, 170, 287, + 111, 178, 178, 57, 167, 218, 219, 223, 3, 169, + 167, 93, 126, 193, 193, 193, 273, 3, 187, 273, + 122, 126, 204, 93, 132, 204, 204, 204, 273, 124, + 171, 176, 96, 123, 235, 218, 219, 9, 44, 80, + 220, 221, 76, 220, 231, 3, 4, 5, 6, 103, + 142, 143, 172, 238, 239, 260, 261, 262, 263, 264, + 265, 266, 4, 184, 120, 3, 274, 273, 273, 82, + 228, 92, 167, 211, 3, 213, 214, 45, 273, 188, + 261, 188, 3, 275, 273, 273, 218, 283, 167, 264, + 12, 224, 168, 168, 216, 217, 218, 223, 113, 222, + 125, 216, 54, 72, 236, 168, 171, 45, 130, 93, + 124, 167, 211, 3, 45, 46, 47, 84, 120, 133, + 159, 160, 167, 241, 242, 243, 244, 245, 246, 247, + 248, 250, 251, 252, 253, 254, 256, 257, 258, 259, + 260, 188, 3, 288, 63, 219, 148, 171, 228, 90, + 206, 207, 111, 189, 189, 130, 3, 179, 180, 225, + 237, 240, 241, 231, 220, 232, 233, 241, 231, 241, + 113, 241, 260, 273, 3, 215, 3, 27, 60, 194, + 195, 196, 202, 124, 167, 169, 167, 167, 167, 110, + 241, 249, 45, 120, 242, 165, 242, 219, 241, 114, + 131, 17, 53, 100, 120, 127, 128, 134, 135, 148, + 149, 150, 151, 152, 155, 156, 158, 159, 160, 161, + 162, 163, 165, 97, 168, 171, 167, 241, 214, 38, + 48, 273, 167, 168, 171, 93, 226, 227, 171, 3, + 124, 278, 279, 236, 216, 171, 89, 115, 234, 236, + 54, 54, 167, 92, 24, 29, 31, 32, 34, 42, + 68, 85, 87, 88, 102, 106, 108, 118, 197, 119, + 167, 168, 171, 215, 168, 224, 3, 160, 219, 136, + 137, 138, 139, 140, 141, 255, 241, 241, 249, 91, + 110, 116, 167, 120, 237, 168, 168, 241, 241, 242, + 242, 100, 127, 167, 103, 120, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, + 242, 264, 273, 3, 239, 204, 187, 239, 180, 167, + 267, 268, 269, 270, 271, 273, 284, 228, 240, 3, + 233, 241, 241, 288, 188, 30, 167, 199, 167, 167, + 167, 198, 27, 60, 103, 120, 200, 201, 167, 288, + 195, 237, 168, 93, 124, 107, 91, 116, 241, 241, + 219, 166, 114, 242, 167, 219, 237, 103, 166, 168, + 3, 259, 168, 215, 25, 66, 71, 77, 78, 94, + 99, 285, 171, 124, 276, 277, 278, 69, 229, 168, + 167, 6, 6, 6, 6, 119, 103, 201, 288, 168, + 168, 241, 197, 241, 241, 116, 107, 168, 242, 219, + 237, 168, 168, 168, 98, 77, 77, 77, 98, 268, + 3, 125, 6, 168, 171, 168, 168, 168, 168, 168, + 168, 116, 241, 168, 168, 277, 269, 268, 167, 237, + 168, 6, 81, 130, 288, 50, 230, 168, 167, 241, + 286, 168, 241, 259, 168 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ @@ -1361,26 +1374,26 @@ static const yytype_int16 yyr1[] = 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 198, 198, 199, 199, 199, 200, 200, 200, 201, 201, 201, 201, 202, 202, 203, 203, 203, 203, 204, - 204, 205, 206, 207, 208, 208, 209, 209, 210, 211, - 211, 212, 213, 213, 213, 214, 214, 215, 215, 216, - 216, 217, 217, 218, 219, 219, 219, 220, 220, 221, - 222, 222, 223, 224, 224, 225, 226, 226, 227, 227, - 228, 228, 229, 229, 230, 230, 231, 232, 232, 232, - 233, 233, 234, 234, 234, 234, 234, 234, 235, 235, - 236, 236, 237, 237, 238, 239, 239, 239, 239, 239, - 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, - 240, 241, 241, 242, 242, 242, 242, 242, 243, 243, - 243, 243, 243, 243, 243, 243, 243, 243, 243, 244, - 244, 245, 245, 245, 245, 246, 246, 246, 246, 247, - 247, 248, 248, 249, 249, 249, 249, 249, 249, 249, - 250, 250, 251, 252, 253, 253, 253, 253, 253, 253, - 254, 255, 256, 257, 257, 257, 257, 258, 258, 258, - 258, 258, 259, 260, 260, 261, 261, 262, 263, 264, - 265, 265, 266, 266, 267, 267, 268, 268, 269, 270, - 271, 271, 272, 272, 273, 274, 274, 275, 275, 276, - 276, 277, 277, 278, 278, 279, 280, 280, 281, 282, - 282, 282, 283, 283, 283, 283, 283, 283, 283, 283, - 283, 283, 284, 285, 285, 286, 286 + 204, 205, 206, 207, 208, 209, 210, 210, 211, 211, + 212, 213, 213, 214, 215, 215, 215, 216, 216, 217, + 217, 218, 218, 219, 219, 220, 221, 221, 221, 222, + 222, 223, 224, 224, 225, 226, 226, 227, 228, 228, + 229, 229, 230, 230, 231, 231, 232, 232, 233, 234, + 234, 234, 235, 235, 236, 236, 236, 236, 236, 236, + 237, 237, 238, 238, 239, 239, 240, 241, 241, 241, + 241, 241, 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 243, 243, 244, 244, 244, 244, 244, + 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, + 245, 246, 246, 247, 247, 247, 247, 248, 248, 248, + 248, 249, 249, 250, 250, 251, 251, 251, 251, 251, + 251, 251, 252, 252, 253, 254, 255, 255, 255, 255, + 255, 255, 256, 257, 258, 259, 259, 259, 259, 260, + 260, 260, 260, 260, 261, 262, 262, 263, 263, 264, + 265, 266, 267, 267, 268, 268, 269, 269, 270, 270, + 271, 272, 273, 273, 274, 274, 275, 276, 276, 277, + 277, 278, 278, 279, 279, 280, 280, 281, 282, 282, + 283, 284, 284, 284, 285, 285, 285, 285, 285, 285, + 285, 285, 285, 285, 286, 287, 287, 288, 288 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -1395,26 +1408,26 @@ static const yytype_int8 yyr2[] = 1, 2, 1, 1, 4, 5, 4, 1, 2, 1, 1, 3, 0, 5, 3, 0, 1, 2, 0, 2, 1, 1, 2, 5, 4, 4, 4, 3, 6, 2, - 0, 7, 4, 2, 8, 5, 3, 0, 5, 1, - 3, 3, 2, 2, 6, 1, 1, 1, 3, 3, - 3, 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, 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, 6, 1, 1, 1, 1, 1, 1, - 4, 4, 5, 1, 3, 1, 3, 1, 1, 1, + 0, 5, 1, 4, 4, 2, 8, 5, 3, 0, + 5, 1, 3, 3, 2, 2, 6, 1, 1, 1, + 3, 3, 3, 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, 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, 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, 3, 1, 1, 1, 4, 1, 3, 2, 1, - 1, 3, 1, 0, 1, 1, 5, 1, 0, 2, - 1, 1, 0, 1, 0, 2, 1, 3, 3, 4, - 6, 8, 1, 2, 1, 2, 1, 2, 1, 1, - 1, 0, 1, 1, 0, 1, 3 + 1, 1, 1, 3, 1, 1, 1, 4, 1, 3, + 2, 1, 1, 3, 1, 0, 1, 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 }; @@ -1966,31 +1979,31 @@ yydestruct (const char *yymsg, switch (yykind) { case YYSYMBOL_IDENTIFIER: /* IDENTIFIER */ -#line 155 "bison_parser.y" +#line 157 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1972 "bison_parser.cpp" +#line 1985 "bison_parser.cpp" break; case YYSYMBOL_STRING: /* STRING */ -#line 155 "bison_parser.y" +#line 157 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1978 "bison_parser.cpp" +#line 1991 "bison_parser.cpp" break; case YYSYMBOL_FLOATVAL: /* FLOATVAL */ -#line 153 "bison_parser.y" +#line 155 "bison_parser.y" { } -#line 1984 "bison_parser.cpp" +#line 1997 "bison_parser.cpp" break; case YYSYMBOL_INTVAL: /* INTVAL */ -#line 153 "bison_parser.y" +#line 155 "bison_parser.y" { } -#line 1990 "bison_parser.cpp" +#line 2003 "bison_parser.cpp" break; case YYSYMBOL_statement_list: /* statement_list */ -#line 156 "bison_parser.y" +#line 158 "bison_parser.y" { if ((((*yyvaluep).stmt_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).stmt_vec))) { @@ -1999,23 +2012,23 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).stmt_vec)); } -#line 2003 "bison_parser.cpp" +#line 2016 "bison_parser.cpp" break; case YYSYMBOL_statement: /* statement */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 2009 "bison_parser.cpp" +#line 2022 "bison_parser.cpp" break; case YYSYMBOL_preparable_statement: /* preparable_statement */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 2015 "bison_parser.cpp" +#line 2028 "bison_parser.cpp" break; case YYSYMBOL_opt_hints: /* opt_hints */ -#line 156 "bison_parser.y" +#line 158 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2024,11 +2037,11 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2028 "bison_parser.cpp" +#line 2041 "bison_parser.cpp" break; case YYSYMBOL_hint_list: /* hint_list */ -#line 156 "bison_parser.y" +#line 158 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2037,89 +2050,89 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2041 "bison_parser.cpp" +#line 2054 "bison_parser.cpp" break; case YYSYMBOL_hint: /* hint */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2047 "bison_parser.cpp" +#line 2060 "bison_parser.cpp" break; case YYSYMBOL_transaction_statement: /* transaction_statement */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).transaction_stmt)); } -#line 2053 "bison_parser.cpp" +#line 2066 "bison_parser.cpp" break; case YYSYMBOL_prepare_statement: /* prepare_statement */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).prep_stmt)); } -#line 2059 "bison_parser.cpp" +#line 2072 "bison_parser.cpp" break; case YYSYMBOL_prepare_target_query: /* prepare_target_query */ -#line 155 "bison_parser.y" +#line 157 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2065 "bison_parser.cpp" +#line 2078 "bison_parser.cpp" break; case YYSYMBOL_execute_statement: /* execute_statement */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).exec_stmt)); } -#line 2071 "bison_parser.cpp" +#line 2084 "bison_parser.cpp" break; case YYSYMBOL_import_statement: /* import_statement */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).import_stmt)); } -#line 2077 "bison_parser.cpp" +#line 2090 "bison_parser.cpp" break; case YYSYMBOL_file_type: /* file_type */ -#line 153 "bison_parser.y" +#line 155 "bison_parser.y" { } -#line 2083 "bison_parser.cpp" +#line 2096 "bison_parser.cpp" break; case YYSYMBOL_file_path: /* file_path */ -#line 155 "bison_parser.y" +#line 157 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2089 "bison_parser.cpp" +#line 2102 "bison_parser.cpp" break; case YYSYMBOL_opt_file_type: /* opt_file_type */ -#line 153 "bison_parser.y" +#line 155 "bison_parser.y" { } -#line 2095 "bison_parser.cpp" +#line 2108 "bison_parser.cpp" break; case YYSYMBOL_export_statement: /* export_statement */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).export_stmt)); } -#line 2101 "bison_parser.cpp" +#line 2114 "bison_parser.cpp" break; case YYSYMBOL_show_statement: /* show_statement */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).show_stmt)); } -#line 2107 "bison_parser.cpp" +#line 2120 "bison_parser.cpp" break; case YYSYMBOL_create_statement: /* create_statement */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).create_stmt)); } -#line 2113 "bison_parser.cpp" +#line 2126 "bison_parser.cpp" break; case YYSYMBOL_opt_not_exists: /* opt_not_exists */ -#line 153 "bison_parser.y" +#line 155 "bison_parser.y" { } -#line 2119 "bison_parser.cpp" +#line 2132 "bison_parser.cpp" break; case YYSYMBOL_table_elem_commalist: /* table_elem_commalist */ -#line 156 "bison_parser.y" +#line 158 "bison_parser.y" { if ((((*yyvaluep).table_element_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).table_element_vec))) { @@ -2128,95 +2141,107 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).table_element_vec)); } -#line 2132 "bison_parser.cpp" +#line 2145 "bison_parser.cpp" break; case YYSYMBOL_table_elem: /* table_elem */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).table_element_t)); } -#line 2138 "bison_parser.cpp" +#line 2151 "bison_parser.cpp" break; case YYSYMBOL_column_def: /* column_def */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).column_t)); } -#line 2144 "bison_parser.cpp" +#line 2157 "bison_parser.cpp" break; case YYSYMBOL_column_type: /* column_type */ -#line 153 "bison_parser.y" +#line 155 "bison_parser.y" { } -#line 2150 "bison_parser.cpp" +#line 2163 "bison_parser.cpp" break; case YYSYMBOL_opt_time_specification: /* opt_time_specification */ -#line 153 "bison_parser.y" +#line 155 "bison_parser.y" { } -#line 2156 "bison_parser.cpp" +#line 2169 "bison_parser.cpp" break; case YYSYMBOL_opt_decimal_specification: /* opt_decimal_specification */ -#line 153 "bison_parser.y" +#line 155 "bison_parser.y" { } -#line 2162 "bison_parser.cpp" +#line 2175 "bison_parser.cpp" break; case YYSYMBOL_opt_column_constraints: /* opt_column_constraints */ -#line 153 "bison_parser.y" +#line 155 "bison_parser.y" { } -#line 2168 "bison_parser.cpp" +#line 2181 "bison_parser.cpp" break; case YYSYMBOL_column_constraint: /* column_constraint */ -#line 153 "bison_parser.y" +#line 155 "bison_parser.y" { } -#line 2174 "bison_parser.cpp" +#line 2187 "bison_parser.cpp" break; case YYSYMBOL_table_constraint: /* table_constraint */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).table_constraint_t)); } -#line 2180 "bison_parser.cpp" +#line 2193 "bison_parser.cpp" break; case YYSYMBOL_drop_statement: /* drop_statement */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).drop_stmt)); } -#line 2186 "bison_parser.cpp" +#line 2199 "bison_parser.cpp" break; case YYSYMBOL_opt_exists: /* opt_exists */ -#line 153 "bison_parser.y" +#line 155 "bison_parser.y" { } -#line 2192 "bison_parser.cpp" +#line 2205 "bison_parser.cpp" break; case YYSYMBOL_alter_statement: /* alter_statement */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).alter_stmt)); } -#line 2198 "bison_parser.cpp" +#line 2211 "bison_parser.cpp" + break; + + case YYSYMBOL_alter_action: /* alter_action */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).alter_action_t)); } +#line 2217 "bison_parser.cpp" + break; + + case YYSYMBOL_drop_action: /* drop_action */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).drop_action_t)); } +#line 2223 "bison_parser.cpp" break; case YYSYMBOL_delete_statement: /* delete_statement */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2204 "bison_parser.cpp" +#line 2229 "bison_parser.cpp" break; case YYSYMBOL_truncate_statement: /* truncate_statement */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2210 "bison_parser.cpp" +#line 2235 "bison_parser.cpp" break; case YYSYMBOL_insert_statement: /* insert_statement */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).insert_stmt)); } -#line 2216 "bison_parser.cpp" +#line 2241 "bison_parser.cpp" break; case YYSYMBOL_opt_column_list: /* opt_column_list */ -#line 156 "bison_parser.y" +#line 158 "bison_parser.y" { if ((((*yyvaluep).str_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).str_vec))) { @@ -2225,17 +2250,17 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2229 "bison_parser.cpp" +#line 2254 "bison_parser.cpp" break; case YYSYMBOL_update_statement: /* update_statement */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).update_stmt)); } -#line 2235 "bison_parser.cpp" +#line 2260 "bison_parser.cpp" break; case YYSYMBOL_update_clause_commalist: /* update_clause_commalist */ -#line 156 "bison_parser.y" +#line 158 "bison_parser.y" { if ((((*yyvaluep).update_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).update_vec))) { @@ -2244,77 +2269,77 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).update_vec)); } -#line 2248 "bison_parser.cpp" +#line 2273 "bison_parser.cpp" break; case YYSYMBOL_update_clause: /* update_clause */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).update_t)); } -#line 2254 "bison_parser.cpp" +#line 2279 "bison_parser.cpp" break; case YYSYMBOL_select_statement: /* select_statement */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2260 "bison_parser.cpp" +#line 2285 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation: /* select_within_set_operation */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2266 "bison_parser.cpp" +#line 2291 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation_no_parentheses: /* select_within_set_operation_no_parentheses */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2272 "bison_parser.cpp" +#line 2297 "bison_parser.cpp" break; case YYSYMBOL_select_with_paren: /* select_with_paren */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2278 "bison_parser.cpp" +#line 2303 "bison_parser.cpp" break; case YYSYMBOL_select_no_paren: /* select_no_paren */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2284 "bison_parser.cpp" +#line 2309 "bison_parser.cpp" break; case YYSYMBOL_set_operator: /* set_operator */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2290 "bison_parser.cpp" +#line 2315 "bison_parser.cpp" break; case YYSYMBOL_set_type: /* set_type */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2296 "bison_parser.cpp" +#line 2321 "bison_parser.cpp" break; case YYSYMBOL_opt_all: /* opt_all */ -#line 153 "bison_parser.y" +#line 155 "bison_parser.y" { } -#line 2302 "bison_parser.cpp" +#line 2327 "bison_parser.cpp" break; case YYSYMBOL_select_clause: /* select_clause */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2308 "bison_parser.cpp" +#line 2333 "bison_parser.cpp" break; case YYSYMBOL_opt_distinct: /* opt_distinct */ -#line 153 "bison_parser.y" +#line 155 "bison_parser.y" { } -#line 2314 "bison_parser.cpp" +#line 2339 "bison_parser.cpp" break; case YYSYMBOL_select_list: /* select_list */ -#line 156 "bison_parser.y" +#line 158 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2323,41 +2348,41 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2327 "bison_parser.cpp" +#line 2352 "bison_parser.cpp" break; case YYSYMBOL_opt_from_clause: /* opt_from_clause */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2333 "bison_parser.cpp" +#line 2358 "bison_parser.cpp" break; case YYSYMBOL_from_clause: /* from_clause */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2339 "bison_parser.cpp" +#line 2364 "bison_parser.cpp" break; case YYSYMBOL_opt_where: /* opt_where */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2345 "bison_parser.cpp" +#line 2370 "bison_parser.cpp" break; case YYSYMBOL_opt_group: /* opt_group */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).group_t)); } -#line 2351 "bison_parser.cpp" +#line 2376 "bison_parser.cpp" break; case YYSYMBOL_opt_having: /* opt_having */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2357 "bison_parser.cpp" +#line 2382 "bison_parser.cpp" break; case YYSYMBOL_opt_order: /* opt_order */ -#line 156 "bison_parser.y" +#line 158 "bison_parser.y" { if ((((*yyvaluep).order_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).order_vec))) { @@ -2366,11 +2391,11 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2370 "bison_parser.cpp" +#line 2395 "bison_parser.cpp" break; case YYSYMBOL_order_list: /* order_list */ -#line 156 "bison_parser.y" +#line 158 "bison_parser.y" { if ((((*yyvaluep).order_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).order_vec))) { @@ -2379,35 +2404,35 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2383 "bison_parser.cpp" +#line 2408 "bison_parser.cpp" break; case YYSYMBOL_order_desc: /* order_desc */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).order)); } -#line 2389 "bison_parser.cpp" +#line 2414 "bison_parser.cpp" break; case YYSYMBOL_opt_order_type: /* opt_order_type */ -#line 153 "bison_parser.y" +#line 155 "bison_parser.y" { } -#line 2395 "bison_parser.cpp" +#line 2420 "bison_parser.cpp" break; case YYSYMBOL_opt_top: /* opt_top */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2401 "bison_parser.cpp" +#line 2426 "bison_parser.cpp" break; case YYSYMBOL_opt_limit: /* opt_limit */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2407 "bison_parser.cpp" +#line 2432 "bison_parser.cpp" break; case YYSYMBOL_expr_list: /* expr_list */ -#line 156 "bison_parser.y" +#line 158 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2416,11 +2441,11 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2420 "bison_parser.cpp" +#line 2445 "bison_parser.cpp" break; case YYSYMBOL_opt_literal_list: /* opt_literal_list */ -#line 156 "bison_parser.y" +#line 158 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2429,11 +2454,11 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2433 "bison_parser.cpp" +#line 2458 "bison_parser.cpp" break; case YYSYMBOL_literal_list: /* literal_list */ -#line 156 "bison_parser.y" +#line 158 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2442,191 +2467,191 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2446 "bison_parser.cpp" +#line 2471 "bison_parser.cpp" break; case YYSYMBOL_expr_alias: /* expr_alias */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2452 "bison_parser.cpp" +#line 2477 "bison_parser.cpp" break; case YYSYMBOL_expr: /* expr */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2458 "bison_parser.cpp" +#line 2483 "bison_parser.cpp" break; case YYSYMBOL_operand: /* operand */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2464 "bison_parser.cpp" +#line 2489 "bison_parser.cpp" break; case YYSYMBOL_scalar_expr: /* scalar_expr */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2470 "bison_parser.cpp" +#line 2495 "bison_parser.cpp" break; case YYSYMBOL_unary_expr: /* unary_expr */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2476 "bison_parser.cpp" +#line 2501 "bison_parser.cpp" break; case YYSYMBOL_binary_expr: /* binary_expr */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2482 "bison_parser.cpp" +#line 2507 "bison_parser.cpp" break; case YYSYMBOL_logic_expr: /* logic_expr */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2488 "bison_parser.cpp" +#line 2513 "bison_parser.cpp" break; case YYSYMBOL_in_expr: /* in_expr */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2494 "bison_parser.cpp" +#line 2519 "bison_parser.cpp" break; case YYSYMBOL_case_expr: /* case_expr */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2500 "bison_parser.cpp" +#line 2525 "bison_parser.cpp" break; case YYSYMBOL_case_list: /* case_list */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2506 "bison_parser.cpp" +#line 2531 "bison_parser.cpp" break; case YYSYMBOL_exists_expr: /* exists_expr */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2512 "bison_parser.cpp" +#line 2537 "bison_parser.cpp" break; case YYSYMBOL_comp_expr: /* comp_expr */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2518 "bison_parser.cpp" +#line 2543 "bison_parser.cpp" break; case YYSYMBOL_function_expr: /* function_expr */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2524 "bison_parser.cpp" +#line 2549 "bison_parser.cpp" break; case YYSYMBOL_extract_expr: /* extract_expr */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2530 "bison_parser.cpp" +#line 2555 "bison_parser.cpp" break; case YYSYMBOL_cast_expr: /* cast_expr */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2536 "bison_parser.cpp" +#line 2561 "bison_parser.cpp" break; case YYSYMBOL_datetime_field: /* datetime_field */ -#line 153 "bison_parser.y" +#line 155 "bison_parser.y" { } -#line 2542 "bison_parser.cpp" +#line 2567 "bison_parser.cpp" break; case YYSYMBOL_array_expr: /* array_expr */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2548 "bison_parser.cpp" +#line 2573 "bison_parser.cpp" break; case YYSYMBOL_array_index: /* array_index */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2554 "bison_parser.cpp" +#line 2579 "bison_parser.cpp" break; case YYSYMBOL_between_expr: /* between_expr */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2560 "bison_parser.cpp" +#line 2585 "bison_parser.cpp" break; case YYSYMBOL_column_name: /* column_name */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2566 "bison_parser.cpp" +#line 2591 "bison_parser.cpp" break; case YYSYMBOL_literal: /* literal */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2572 "bison_parser.cpp" +#line 2597 "bison_parser.cpp" break; case YYSYMBOL_string_literal: /* string_literal */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2578 "bison_parser.cpp" +#line 2603 "bison_parser.cpp" break; case YYSYMBOL_bool_literal: /* bool_literal */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2584 "bison_parser.cpp" +#line 2609 "bison_parser.cpp" break; case YYSYMBOL_num_literal: /* num_literal */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2590 "bison_parser.cpp" +#line 2615 "bison_parser.cpp" break; case YYSYMBOL_int_literal: /* int_literal */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2596 "bison_parser.cpp" +#line 2621 "bison_parser.cpp" break; case YYSYMBOL_null_literal: /* null_literal */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2602 "bison_parser.cpp" +#line 2627 "bison_parser.cpp" break; case YYSYMBOL_param_expr: /* param_expr */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2608 "bison_parser.cpp" +#line 2633 "bison_parser.cpp" break; case YYSYMBOL_table_ref: /* table_ref */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2614 "bison_parser.cpp" +#line 2639 "bison_parser.cpp" break; case YYSYMBOL_table_ref_atomic: /* table_ref_atomic */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2620 "bison_parser.cpp" +#line 2645 "bison_parser.cpp" break; case YYSYMBOL_nonjoin_table_ref_atomic: /* nonjoin_table_ref_atomic */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2626 "bison_parser.cpp" +#line 2651 "bison_parser.cpp" break; case YYSYMBOL_table_ref_commalist: /* table_ref_commalist */ -#line 156 "bison_parser.y" +#line 158 "bison_parser.y" { if ((((*yyvaluep).table_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).table_vec))) { @@ -2635,107 +2660,107 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).table_vec)); } -#line 2639 "bison_parser.cpp" +#line 2664 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name: /* table_ref_name */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2645 "bison_parser.cpp" +#line 2670 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name_no_alias: /* table_ref_name_no_alias */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2651 "bison_parser.cpp" +#line 2676 "bison_parser.cpp" break; case YYSYMBOL_table_name: /* table_name */ -#line 154 "bison_parser.y" +#line 156 "bison_parser.y" { free( (((*yyvaluep).table_name).name) ); free( (((*yyvaluep).table_name).schema) ); } -#line 2657 "bison_parser.cpp" +#line 2682 "bison_parser.cpp" break; case YYSYMBOL_opt_index_name: /* opt_index_name */ -#line 155 "bison_parser.y" +#line 157 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2663 "bison_parser.cpp" +#line 2688 "bison_parser.cpp" break; case YYSYMBOL_index_name: /* index_name */ -#line 155 "bison_parser.y" +#line 157 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2669 "bison_parser.cpp" +#line 2694 "bison_parser.cpp" break; case YYSYMBOL_table_alias: /* table_alias */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2675 "bison_parser.cpp" +#line 2700 "bison_parser.cpp" break; case YYSYMBOL_opt_table_alias: /* opt_table_alias */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2681 "bison_parser.cpp" +#line 2706 "bison_parser.cpp" break; case YYSYMBOL_alias: /* alias */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2687 "bison_parser.cpp" +#line 2712 "bison_parser.cpp" break; case YYSYMBOL_opt_alias: /* opt_alias */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2693 "bison_parser.cpp" +#line 2718 "bison_parser.cpp" break; case YYSYMBOL_opt_with_clause: /* opt_with_clause */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2699 "bison_parser.cpp" +#line 2724 "bison_parser.cpp" break; case YYSYMBOL_with_clause: /* with_clause */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2705 "bison_parser.cpp" +#line 2730 "bison_parser.cpp" break; case YYSYMBOL_with_description_list: /* with_description_list */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2711 "bison_parser.cpp" +#line 2736 "bison_parser.cpp" break; case YYSYMBOL_with_description: /* with_description */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).with_description_t)); } -#line 2717 "bison_parser.cpp" +#line 2742 "bison_parser.cpp" break; case YYSYMBOL_join_clause: /* join_clause */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2723 "bison_parser.cpp" +#line 2748 "bison_parser.cpp" break; case YYSYMBOL_opt_join_type: /* opt_join_type */ -#line 153 "bison_parser.y" +#line 155 "bison_parser.y" { } -#line 2729 "bison_parser.cpp" +#line 2754 "bison_parser.cpp" break; case YYSYMBOL_join_condition: /* join_condition */ -#line 164 "bison_parser.y" +#line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2735 "bison_parser.cpp" +#line 2760 "bison_parser.cpp" break; case YYSYMBOL_ident_commalist: /* ident_commalist */ -#line 156 "bison_parser.y" +#line 158 "bison_parser.y" { if ((((*yyvaluep).str_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).str_vec))) { @@ -2744,7 +2769,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2748 "bison_parser.cpp" +#line 2773 "bison_parser.cpp" break; default: @@ -2851,7 +2876,7 @@ YYLTYPE yylloc = yyloc_default; yylloc.string_length = 0; } -#line 2855 "bison_parser.cpp" +#line 2880 "bison_parser.cpp" yylsp[0] = yylloc; goto yysetstate; @@ -3061,7 +3086,7 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* input: statement_list opt_semicolon */ -#line 284 "bison_parser.y" +#line 288 "bison_parser.y" { for (SQLStatement* stmt : *(yyvsp[-1].stmt_vec)) { // Transfers ownership of the statement. @@ -3079,253 +3104,253 @@ YYLTYPE yylloc = yyloc_default; } delete (yyvsp[-1].stmt_vec); } -#line 3083 "bison_parser.cpp" +#line 3108 "bison_parser.cpp" break; case 3: /* statement_list: statement */ -#line 305 "bison_parser.y" +#line 309 "bison_parser.y" { (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 3094 "bison_parser.cpp" +#line 3119 "bison_parser.cpp" break; case 4: /* statement_list: statement_list ';' statement */ -#line 311 "bison_parser.y" +#line 315 "bison_parser.y" { (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 3105 "bison_parser.cpp" +#line 3130 "bison_parser.cpp" break; case 5: /* statement: prepare_statement opt_hints */ -#line 320 "bison_parser.y" +#line 324 "bison_parser.y" { (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3114 "bison_parser.cpp" +#line 3139 "bison_parser.cpp" break; case 6: /* statement: preparable_statement opt_hints */ -#line 324 "bison_parser.y" +#line 328 "bison_parser.y" { (yyval.statement) = (yyvsp[-1].statement); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3123 "bison_parser.cpp" +#line 3148 "bison_parser.cpp" break; case 7: /* statement: show_statement */ -#line 328 "bison_parser.y" +#line 332 "bison_parser.y" { (yyval.statement) = (yyvsp[0].show_stmt); } -#line 3131 "bison_parser.cpp" +#line 3156 "bison_parser.cpp" break; case 8: /* statement: import_statement */ -#line 331 "bison_parser.y" +#line 335 "bison_parser.y" { (yyval.statement) = (yyvsp[0].import_stmt); } -#line 3139 "bison_parser.cpp" +#line 3164 "bison_parser.cpp" break; case 9: /* statement: export_statement */ -#line 334 "bison_parser.y" +#line 338 "bison_parser.y" { (yyval.statement) = (yyvsp[0].export_stmt); } -#line 3147 "bison_parser.cpp" +#line 3172 "bison_parser.cpp" break; case 10: /* preparable_statement: select_statement */ -#line 341 "bison_parser.y" +#line 345 "bison_parser.y" { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 3153 "bison_parser.cpp" +#line 3178 "bison_parser.cpp" break; case 11: /* preparable_statement: create_statement */ -#line 342 "bison_parser.y" +#line 346 "bison_parser.y" { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 3159 "bison_parser.cpp" +#line 3184 "bison_parser.cpp" break; case 12: /* preparable_statement: insert_statement */ -#line 343 "bison_parser.y" +#line 347 "bison_parser.y" { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 3165 "bison_parser.cpp" +#line 3190 "bison_parser.cpp" break; case 13: /* preparable_statement: delete_statement */ -#line 344 "bison_parser.y" +#line 348 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3171 "bison_parser.cpp" +#line 3196 "bison_parser.cpp" break; case 14: /* preparable_statement: truncate_statement */ -#line 345 "bison_parser.y" +#line 349 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3177 "bison_parser.cpp" +#line 3202 "bison_parser.cpp" break; case 15: /* preparable_statement: update_statement */ -#line 346 "bison_parser.y" +#line 350 "bison_parser.y" { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 3183 "bison_parser.cpp" +#line 3208 "bison_parser.cpp" break; case 16: /* preparable_statement: drop_statement */ -#line 347 "bison_parser.y" +#line 351 "bison_parser.y" { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 3189 "bison_parser.cpp" +#line 3214 "bison_parser.cpp" break; case 17: /* preparable_statement: alter_statement */ -#line 348 "bison_parser.y" +#line 352 "bison_parser.y" { (yyval.statement) = (yyvsp[0].alter_stmt); } -#line 3195 "bison_parser.cpp" +#line 3220 "bison_parser.cpp" break; case 18: /* preparable_statement: execute_statement */ -#line 349 "bison_parser.y" +#line 353 "bison_parser.y" { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 3201 "bison_parser.cpp" +#line 3226 "bison_parser.cpp" break; case 19: /* preparable_statement: transaction_statement */ -#line 350 "bison_parser.y" +#line 354 "bison_parser.y" { (yyval.statement) = (yyvsp[0].transaction_stmt); } -#line 3207 "bison_parser.cpp" +#line 3232 "bison_parser.cpp" break; case 20: /* opt_hints: WITH HINT '(' hint_list ')' */ -#line 359 "bison_parser.y" +#line 363 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 3213 "bison_parser.cpp" +#line 3238 "bison_parser.cpp" break; case 21: /* opt_hints: %empty */ -#line 360 "bison_parser.y" +#line 364 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 3219 "bison_parser.cpp" +#line 3244 "bison_parser.cpp" break; case 22: /* hint_list: hint */ -#line 365 "bison_parser.y" +#line 369 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3225 "bison_parser.cpp" +#line 3250 "bison_parser.cpp" break; case 23: /* hint_list: hint_list ',' hint */ -#line 366 "bison_parser.y" +#line 370 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3231 "bison_parser.cpp" +#line 3256 "bison_parser.cpp" break; case 24: /* hint: IDENTIFIER */ -#line 370 "bison_parser.y" +#line 374 "bison_parser.y" { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[0].sval); } -#line 3240 "bison_parser.cpp" +#line 3265 "bison_parser.cpp" break; case 25: /* hint: IDENTIFIER '(' literal_list ')' */ -#line 374 "bison_parser.y" +#line 378 "bison_parser.y" { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[-3].sval); (yyval.expr)->exprList = (yyvsp[-1].expr_vec); } -#line 3250 "bison_parser.cpp" +#line 3275 "bison_parser.cpp" break; case 26: /* transaction_statement: BEGIN opt_transaction_keyword */ -#line 386 "bison_parser.y" +#line 390 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kBeginTransaction); } -#line 3258 "bison_parser.cpp" +#line 3283 "bison_parser.cpp" break; case 27: /* transaction_statement: ROLLBACK opt_transaction_keyword */ -#line 389 "bison_parser.y" +#line 393 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kRollbackTransaction); } -#line 3266 "bison_parser.cpp" +#line 3291 "bison_parser.cpp" break; case 28: /* transaction_statement: COMMIT opt_transaction_keyword */ -#line 392 "bison_parser.y" +#line 396 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kCommitTransaction); } -#line 3274 "bison_parser.cpp" +#line 3299 "bison_parser.cpp" break; case 31: /* prepare_statement: PREPARE IDENTIFIER FROM prepare_target_query */ -#line 406 "bison_parser.y" +#line 410 "bison_parser.y" { (yyval.prep_stmt) = new PrepareStatement(); (yyval.prep_stmt)->name = (yyvsp[-2].sval); (yyval.prep_stmt)->query = (yyvsp[0].sval); } -#line 3284 "bison_parser.cpp" +#line 3309 "bison_parser.cpp" break; case 33: /* execute_statement: EXECUTE IDENTIFIER */ -#line 416 "bison_parser.y" +#line 420 "bison_parser.y" { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[0].sval); } -#line 3293 "bison_parser.cpp" +#line 3318 "bison_parser.cpp" break; case 34: /* execute_statement: EXECUTE IDENTIFIER '(' opt_literal_list ')' */ -#line 420 "bison_parser.y" +#line 424 "bison_parser.y" { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[-3].sval); (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); } -#line 3303 "bison_parser.cpp" +#line 3328 "bison_parser.cpp" break; case 35: /* import_statement: IMPORT FROM file_type FILE file_path INTO table_name */ -#line 434 "bison_parser.y" +#line 438 "bison_parser.y" { (yyval.import_stmt) = new ImportStatement((yyvsp[-4].import_type_t)); (yyval.import_stmt)->filePath = (yyvsp[-2].sval); (yyval.import_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3314 "bison_parser.cpp" +#line 3339 "bison_parser.cpp" break; case 36: /* import_statement: COPY table_name FROM file_path opt_file_type */ -#line 440 "bison_parser.y" +#line 444 "bison_parser.y" { (yyval.import_stmt) = new ImportStatement((yyvsp[0].import_type_t)); (yyval.import_stmt)->filePath = (yyvsp[-1].sval); (yyval.import_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3325 "bison_parser.cpp" +#line 3350 "bison_parser.cpp" break; case 37: /* file_type: IDENTIFIER */ -#line 449 "bison_parser.y" +#line 453 "bison_parser.y" { if (strcasecmp((yyvsp[0].sval), "csv") == 0) { (yyval.import_type_t) = kImportCSV; @@ -3340,70 +3365,70 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[0].sval)); } -#line 3344 "bison_parser.cpp" +#line 3369 "bison_parser.cpp" break; case 38: /* file_path: string_literal */ -#line 466 "bison_parser.y" +#line 470 "bison_parser.y" { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 3350 "bison_parser.cpp" +#line 3375 "bison_parser.cpp" break; case 39: /* opt_file_type: WITH FORMAT file_type */ -#line 470 "bison_parser.y" +#line 474 "bison_parser.y" { (yyval.import_type_t) = (yyvsp[0].import_type_t); } -#line 3358 "bison_parser.cpp" +#line 3383 "bison_parser.cpp" break; case 40: /* opt_file_type: %empty */ -#line 473 "bison_parser.y" +#line 477 "bison_parser.y" { (yyval.import_type_t) = kImportAuto; } -#line 3364 "bison_parser.cpp" +#line 3389 "bison_parser.cpp" break; case 41: /* export_statement: COPY table_name TO file_path opt_file_type */ -#line 482 "bison_parser.y" +#line 486 "bison_parser.y" { (yyval.export_stmt) = new ExportStatement((yyvsp[0].import_type_t)); (yyval.export_stmt)->filePath = (yyvsp[-1].sval); (yyval.export_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.export_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3375 "bison_parser.cpp" +#line 3400 "bison_parser.cpp" break; case 42: /* show_statement: SHOW TABLES */ -#line 496 "bison_parser.y" +#line 500 "bison_parser.y" { (yyval.show_stmt) = new ShowStatement(kShowTables); } -#line 3383 "bison_parser.cpp" +#line 3408 "bison_parser.cpp" break; case 43: /* show_statement: SHOW COLUMNS table_name */ -#line 499 "bison_parser.y" +#line 503 "bison_parser.y" { (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 3393 "bison_parser.cpp" +#line 3418 "bison_parser.cpp" break; case 44: /* show_statement: DESCRIBE table_name */ -#line 504 "bison_parser.y" +#line 508 "bison_parser.y" { (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 3403 "bison_parser.cpp" +#line 3428 "bison_parser.cpp" break; case 45: /* create_statement: CREATE TABLE opt_not_exists table_name FROM IDENTIFIER FILE file_path */ -#line 518 "bison_parser.y" +#line 522 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTableFromTbl); (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); @@ -3417,11 +3442,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].sval)); (yyval.create_stmt)->filePath = (yyvsp[0].sval); } -#line 3421 "bison_parser.cpp" +#line 3446 "bison_parser.cpp" break; case 46: /* create_statement: CREATE TABLE opt_not_exists table_name '(' table_elem_commalist ')' */ -#line 531 "bison_parser.y" +#line 535 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -3429,11 +3454,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->setColumnDefsAndConstraints((yyvsp[-1].table_element_vec)); } -#line 3433 "bison_parser.cpp" +#line 3458 "bison_parser.cpp" break; case 47: /* create_statement: CREATE TABLE opt_not_exists table_name AS select_statement */ -#line 538 "bison_parser.y" +#line 542 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-3].bval); @@ -3441,11 +3466,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-2].table_name).name; (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3445 "bison_parser.cpp" +#line 3470 "bison_parser.cpp" break; case 48: /* create_statement: CREATE INDEX opt_not_exists opt_index_name ON table_name '(' ident_commalist ')' */ -#line 545 "bison_parser.y" +#line 549 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateIndex); (yyval.create_stmt)->indexName = (yyvsp[-5].sval); @@ -3453,11 +3478,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->indexColumns = (yyvsp[-1].str_vec); } -#line 3457 "bison_parser.cpp" +#line 3482 "bison_parser.cpp" break; case 49: /* create_statement: CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement */ -#line 552 "bison_parser.y" +#line 556 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateView); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -3466,312 +3491,325 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3470 "bison_parser.cpp" +#line 3495 "bison_parser.cpp" break; case 50: /* opt_not_exists: IF NOT EXISTS */ -#line 563 "bison_parser.y" +#line 567 "bison_parser.y" { (yyval.bval) = true; } -#line 3476 "bison_parser.cpp" +#line 3501 "bison_parser.cpp" break; case 51: /* opt_not_exists: %empty */ -#line 564 "bison_parser.y" +#line 568 "bison_parser.y" { (yyval.bval) = false; } -#line 3482 "bison_parser.cpp" +#line 3507 "bison_parser.cpp" break; case 52: /* table_elem_commalist: table_elem */ -#line 568 "bison_parser.y" +#line 572 "bison_parser.y" { (yyval.table_element_vec) = new std::vector(); (yyval.table_element_vec)->push_back((yyvsp[0].table_element_t)); } -#line 3488 "bison_parser.cpp" +#line 3513 "bison_parser.cpp" break; case 53: /* table_elem_commalist: table_elem_commalist ',' table_elem */ -#line 569 "bison_parser.y" +#line 573 "bison_parser.y" { (yyvsp[-2].table_element_vec)->push_back((yyvsp[0].table_element_t)); (yyval.table_element_vec) = (yyvsp[-2].table_element_vec); } -#line 3494 "bison_parser.cpp" +#line 3519 "bison_parser.cpp" break; case 54: /* table_elem: column_def */ -#line 573 "bison_parser.y" +#line 577 "bison_parser.y" { (yyval.table_element_t) = (yyvsp[0].column_t); } -#line 3500 "bison_parser.cpp" +#line 3525 "bison_parser.cpp" break; case 55: /* table_elem: table_constraint */ -#line 574 "bison_parser.y" +#line 578 "bison_parser.y" { (yyval.table_element_t) = (yyvsp[0].table_constraint_t); } -#line 3506 "bison_parser.cpp" +#line 3531 "bison_parser.cpp" break; case 56: /* column_def: IDENTIFIER column_type opt_column_constraints */ -#line 578 "bison_parser.y" +#line 582 "bison_parser.y" { (yyval.column_t) = new ColumnDefinition((yyvsp[-2].sval), (yyvsp[-1].column_type_t), (yyvsp[0].column_constraint_vec)); - (yyval.column_t)->setNullableExplicit(); + (yyval.column_t)->setNullableExplicit(); } -#line 3515 "bison_parser.cpp" +#line 3540 "bison_parser.cpp" break; case 57: /* column_type: INT */ -#line 585 "bison_parser.y" +#line 589 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3521 "bison_parser.cpp" +#line 3546 "bison_parser.cpp" break; case 58: /* column_type: INTEGER */ -#line 586 "bison_parser.y" +#line 590 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3527 "bison_parser.cpp" +#line 3552 "bison_parser.cpp" break; case 59: /* column_type: LONG */ -#line 587 "bison_parser.y" +#line 591 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::LONG}; } -#line 3533 "bison_parser.cpp" +#line 3558 "bison_parser.cpp" break; case 60: /* column_type: FLOAT */ -#line 588 "bison_parser.y" +#line 592 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3539 "bison_parser.cpp" +#line 3564 "bison_parser.cpp" break; case 61: /* column_type: DECIMAL opt_decimal_specification */ -#line 589 "bison_parser.y" +#line 593 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DECIMAL, 0, (yyvsp[0].column_specification_t)}; } -#line 3545 "bison_parser.cpp" +#line 3570 "bison_parser.cpp" break; case 62: /* column_type: DOUBLE */ -#line 590 "bison_parser.y" +#line 594 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } -#line 3551 "bison_parser.cpp" +#line 3576 "bison_parser.cpp" break; case 63: /* column_type: REAL */ -#line 591 "bison_parser.y" +#line 595 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::REAL}; } -#line 3557 "bison_parser.cpp" +#line 3582 "bison_parser.cpp" break; case 64: /* column_type: VARCHAR '(' INTVAL ')' */ -#line 592 "bison_parser.y" +#line 596 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3563 "bison_parser.cpp" +#line 3588 "bison_parser.cpp" break; case 65: /* column_type: CHARACTER VARYING '(' INTVAL ')' */ -#line 593 "bison_parser.y" +#line 597 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR_VARYING, (yyvsp[-1].ival)}; } -#line 3569 "bison_parser.cpp" +#line 3594 "bison_parser.cpp" break; case 66: /* column_type: CHAR '(' INTVAL ')' */ -#line 594 "bison_parser.y" +#line 598 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } -#line 3575 "bison_parser.cpp" +#line 3600 "bison_parser.cpp" break; case 67: /* column_type: TEXT */ -#line 595 "bison_parser.y" +#line 599 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } -#line 3581 "bison_parser.cpp" +#line 3606 "bison_parser.cpp" break; case 68: /* column_type: TIME opt_time_specification */ -#line 596 "bison_parser.y" +#line 600 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TIME, 0, (yyvsp[0].column_specification_t) }; } -#line 3587 "bison_parser.cpp" +#line 3612 "bison_parser.cpp" break; case 69: /* column_type: DATETIME */ -#line 597 "bison_parser.y" +#line 601 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } -#line 3593 "bison_parser.cpp" +#line 3618 "bison_parser.cpp" break; case 70: /* column_type: DATE */ -#line 598 "bison_parser.y" +#line 602 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATE}; } -#line 3599 "bison_parser.cpp" +#line 3624 "bison_parser.cpp" break; case 71: /* opt_time_specification: '(' INTVAL ')' */ -#line 602 "bison_parser.y" +#line 606 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-1].ival)}; } -#line 3605 "bison_parser.cpp" +#line 3630 "bison_parser.cpp" break; case 72: /* opt_time_specification: %empty */ -#line 603 "bison_parser.y" +#line 607 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{}; } -#line 3611 "bison_parser.cpp" +#line 3636 "bison_parser.cpp" break; case 73: /* opt_decimal_specification: '(' INTVAL ',' INTVAL ')' */ -#line 607 "bison_parser.y" +#line 611 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-3].ival), (yyvsp[-1].ival)}; } -#line 3617 "bison_parser.cpp" +#line 3642 "bison_parser.cpp" break; case 74: /* opt_decimal_specification: '(' INTVAL ')' */ -#line 608 "bison_parser.y" +#line 612 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-1].ival)}; } -#line 3623 "bison_parser.cpp" +#line 3648 "bison_parser.cpp" break; case 75: /* opt_decimal_specification: %empty */ -#line 609 "bison_parser.y" +#line 613 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{}; } -#line 3629 "bison_parser.cpp" +#line 3654 "bison_parser.cpp" break; case 76: /* opt_column_constraints: column_constraint */ -#line 613 "bison_parser.y" +#line 617 "bison_parser.y" { (yyval.column_constraint_vec) = new std::vector(); (yyval.column_constraint_vec)->push_back((yyvsp[0].column_constraint_t)); } -#line 3635 "bison_parser.cpp" +#line 3660 "bison_parser.cpp" break; case 77: /* opt_column_constraints: opt_column_constraints column_constraint */ -#line 614 "bison_parser.y" +#line 618 "bison_parser.y" { (yyvsp[-1].column_constraint_vec)->push_back((yyvsp[0].column_constraint_t)); (yyval.column_constraint_vec) = (yyvsp[-1].column_constraint_vec); } -#line 3641 "bison_parser.cpp" +#line 3666 "bison_parser.cpp" break; case 78: /* opt_column_constraints: %empty */ -#line 615 "bison_parser.y" +#line 619 "bison_parser.y" { (yyval.column_constraint_vec) = new std::vector(); } -#line 3647 "bison_parser.cpp" +#line 3672 "bison_parser.cpp" break; case 79: /* column_constraint: PRIMARY KEY */ -#line 619 "bison_parser.y" +#line 623 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::PRIMARY_KEY; } -#line 3653 "bison_parser.cpp" +#line 3678 "bison_parser.cpp" break; case 80: /* column_constraint: UNIQUE */ -#line 620 "bison_parser.y" +#line 624 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::UNIQUE; } -#line 3659 "bison_parser.cpp" +#line 3684 "bison_parser.cpp" break; case 81: /* column_constraint: NULL */ -#line 621 "bison_parser.y" +#line 625 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::_NULL; } -#line 3665 "bison_parser.cpp" +#line 3690 "bison_parser.cpp" break; case 82: /* column_constraint: NOT NULL */ -#line 622 "bison_parser.y" +#line 626 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::NOTNULL; } -#line 3671 "bison_parser.cpp" +#line 3696 "bison_parser.cpp" break; case 83: /* table_constraint: PRIMARY KEY '(' ident_commalist ')' */ -#line 626 "bison_parser.y" +#line 630 "bison_parser.y" { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::PRIMARY_KEY, (yyvsp[-1].str_vec)); } -#line 3677 "bison_parser.cpp" +#line 3702 "bison_parser.cpp" break; case 84: /* table_constraint: UNIQUE '(' ident_commalist ')' */ -#line 627 "bison_parser.y" +#line 631 "bison_parser.y" { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::UNIQUE, (yyvsp[-1].str_vec)); } -#line 3683 "bison_parser.cpp" +#line 3708 "bison_parser.cpp" break; case 85: /* drop_statement: DROP TABLE opt_exists table_name */ -#line 638 "bison_parser.y" +#line 642 "bison_parser.y" { (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 3694 "bison_parser.cpp" +#line 3719 "bison_parser.cpp" break; case 86: /* drop_statement: DROP VIEW opt_exists table_name */ -#line 644 "bison_parser.y" +#line 648 "bison_parser.y" { (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 3705 "bison_parser.cpp" +#line 3730 "bison_parser.cpp" break; case 87: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ -#line 650 "bison_parser.y" +#line 654 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); (yyval.drop_stmt)->ifExists = false; (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 3715 "bison_parser.cpp" +#line 3740 "bison_parser.cpp" break; case 88: /* drop_statement: DROP INDEX opt_exists index_name ON table_name */ -#line 655 "bison_parser.y" +#line 659 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropIndex); (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; (yyval.drop_stmt)->ifExists = (yyvsp[-3].bval); (yyval.drop_stmt)->indexName = (yyvsp[-2].sval); } -#line 3726 "bison_parser.cpp" +#line 3751 "bison_parser.cpp" break; case 89: /* opt_exists: IF EXISTS */ -#line 664 "bison_parser.y" +#line 668 "bison_parser.y" { (yyval.bval) = true; } -#line 3732 "bison_parser.cpp" +#line 3757 "bison_parser.cpp" break; case 90: /* opt_exists: %empty */ -#line 665 "bison_parser.y" +#line 669 "bison_parser.y" { (yyval.bval) = false; } -#line 3738 "bison_parser.cpp" +#line 3763 "bison_parser.cpp" break; - case 91: /* alter_statement: ALTER TABLE table_name DROP COLUMN opt_exists column_name */ -#line 674 "bison_parser.y" - { - (yyval.alter_stmt) = new AlterStatement(kAlterDropColumn); - (yyval.alter_stmt)->ifExists = (yyvsp[-1].bval); - (yyval.alter_stmt)->schema = (yyvsp[-4].table_name).schema; - (yyval.alter_stmt)->name = (yyvsp[-4].table_name).name; - (yyval.alter_stmt)->columnName = (yyvsp[0].expr)->name; + case 91: /* alter_statement: ALTER TABLE opt_exists table_name alter_action */ +#line 678 "bison_parser.y" + { + (yyval.alter_stmt) = new AlterStatement((yyvsp[-1].table_name).name, (yyvsp[0].alter_action_t)); + (yyval.alter_stmt)->ifTableExists = (yyvsp[-2].bval); + (yyval.alter_stmt)->schema = (yyvsp[-1].table_name).schema; } -#line 3750 "bison_parser.cpp" +#line 3773 "bison_parser.cpp" + break; + + case 92: /* alter_action: drop_action */ +#line 686 "bison_parser.y" + {(yyval.alter_action_t) = (yyvsp[0].drop_action_t);} +#line 3779 "bison_parser.cpp" break; - case 92: /* delete_statement: DELETE FROM table_name opt_where */ + case 93: /* drop_action: DROP COLUMN opt_exists column_name */ #line 689 "bison_parser.y" + { + (yyval.drop_action_t) = new DropColumnAction((yyvsp[0].expr)->name); + (yyval.drop_action_t)->ifExists = (yyvsp[-1].bval); + } +#line 3788 "bison_parser.cpp" + break; + + case 94: /* delete_statement: DELETE FROM table_name opt_where */ +#line 701 "bison_parser.y" { (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 3761 "bison_parser.cpp" +#line 3799 "bison_parser.cpp" break; - case 93: /* truncate_statement: TRUNCATE table_name */ -#line 698 "bison_parser.y" + case 95: /* truncate_statement: TRUNCATE table_name */ +#line 710 "bison_parser.y" { (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3771 "bison_parser.cpp" +#line 3809 "bison_parser.cpp" break; - case 94: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ -#line 711 "bison_parser.y" + case 96: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ +#line 723 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertValues); (yyval.insert_stmt)->schema = (yyvsp[-5].table_name).schema; @@ -3779,11 +3817,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } -#line 3783 "bison_parser.cpp" +#line 3821 "bison_parser.cpp" break; - case 95: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ -#line 718 "bison_parser.y" + case 97: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ +#line 730 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertSelect); (yyval.insert_stmt)->schema = (yyvsp[-2].table_name).schema; @@ -3791,74 +3829,74 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } -#line 3795 "bison_parser.cpp" +#line 3833 "bison_parser.cpp" break; - case 96: /* opt_column_list: '(' ident_commalist ')' */ -#line 729 "bison_parser.y" + case 98: /* opt_column_list: '(' ident_commalist ')' */ +#line 741 "bison_parser.y" { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 3801 "bison_parser.cpp" +#line 3839 "bison_parser.cpp" break; - case 97: /* opt_column_list: %empty */ -#line 730 "bison_parser.y" + case 99: /* opt_column_list: %empty */ +#line 742 "bison_parser.y" { (yyval.str_vec) = nullptr; } -#line 3807 "bison_parser.cpp" +#line 3845 "bison_parser.cpp" break; - case 98: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ -#line 740 "bison_parser.y" + case 100: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ +#line 752 "bison_parser.y" { (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 3818 "bison_parser.cpp" +#line 3856 "bison_parser.cpp" break; - case 99: /* update_clause_commalist: update_clause */ -#line 749 "bison_parser.y" + case 101: /* update_clause_commalist: update_clause */ +#line 761 "bison_parser.y" { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 3824 "bison_parser.cpp" +#line 3862 "bison_parser.cpp" break; - case 100: /* update_clause_commalist: update_clause_commalist ',' update_clause */ -#line 750 "bison_parser.y" + case 102: /* update_clause_commalist: update_clause_commalist ',' update_clause */ +#line 762 "bison_parser.y" { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 3830 "bison_parser.cpp" +#line 3868 "bison_parser.cpp" break; - case 101: /* update_clause: IDENTIFIER '=' expr */ -#line 754 "bison_parser.y" + case 103: /* update_clause: IDENTIFIER '=' expr */ +#line 766 "bison_parser.y" { (yyval.update_t) = new UpdateClause(); (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 3840 "bison_parser.cpp" +#line 3878 "bison_parser.cpp" break; - case 102: /* select_statement: opt_with_clause select_with_paren */ -#line 766 "bison_parser.y" + case 104: /* select_statement: opt_with_clause select_with_paren */ +#line 778 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3849 "bison_parser.cpp" +#line 3887 "bison_parser.cpp" break; - case 103: /* select_statement: opt_with_clause select_no_paren */ -#line 770 "bison_parser.y" + case 105: /* select_statement: opt_with_clause select_no_paren */ +#line 782 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3858 "bison_parser.cpp" +#line 3896 "bison_parser.cpp" break; - case 104: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ -#line 774 "bison_parser.y" + case 106: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ +#line 786 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3870,17 +3908,17 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); (yyval.select_stmt)->withDescriptions = (yyvsp[-5].with_description_vec); } -#line 3874 "bison_parser.cpp" +#line 3912 "bison_parser.cpp" break; - case 107: /* select_within_set_operation_no_parentheses: select_clause */ -#line 792 "bison_parser.y" + case 109: /* select_within_set_operation_no_parentheses: select_clause */ +#line 804 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); } -#line 3880 "bison_parser.cpp" +#line 3918 "bison_parser.cpp" break; - case 108: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ -#line 793 "bison_parser.y" + case 110: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ +#line 805 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3889,23 +3927,23 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->push_back((yyvsp[-1].set_operator_t)); (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[0].select_stmt); } -#line 3893 "bison_parser.cpp" +#line 3931 "bison_parser.cpp" break; - case 109: /* select_with_paren: '(' select_no_paren ')' */ -#line 804 "bison_parser.y" + case 111: /* select_with_paren: '(' select_no_paren ')' */ +#line 816 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3899 "bison_parser.cpp" +#line 3937 "bison_parser.cpp" break; - case 110: /* select_with_paren: '(' select_with_paren ')' */ -#line 805 "bison_parser.y" + case 112: /* select_with_paren: '(' select_with_paren ')' */ +#line 817 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3905 "bison_parser.cpp" +#line 3943 "bison_parser.cpp" break; - case 111: /* select_no_paren: select_clause opt_order opt_limit */ -#line 809 "bison_parser.y" + case 113: /* select_no_paren: select_clause opt_order opt_limit */ +#line 821 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); (yyval.select_stmt)->order = (yyvsp[-1].order_vec); @@ -3916,11 +3954,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3920 "bison_parser.cpp" +#line 3958 "bison_parser.cpp" break; - case 112: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ -#line 819 "bison_parser.y" + case 114: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ +#line 831 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3931,63 +3969,63 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); } -#line 3935 "bison_parser.cpp" +#line 3973 "bison_parser.cpp" break; - case 113: /* set_operator: set_type opt_all */ -#line 832 "bison_parser.y" + case 115: /* set_operator: set_type opt_all */ +#line 844 "bison_parser.y" { (yyval.set_operator_t) = (yyvsp[-1].set_operator_t); (yyval.set_operator_t)->isAll = (yyvsp[0].bval); } -#line 3944 "bison_parser.cpp" +#line 3982 "bison_parser.cpp" break; - case 114: /* set_type: UNION */ -#line 839 "bison_parser.y" + case 116: /* set_type: UNION */ +#line 851 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetUnion; } -#line 3953 "bison_parser.cpp" +#line 3991 "bison_parser.cpp" break; - case 115: /* set_type: INTERSECT */ -#line 843 "bison_parser.y" + case 117: /* set_type: INTERSECT */ +#line 855 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetIntersect; } -#line 3962 "bison_parser.cpp" +#line 4000 "bison_parser.cpp" break; - case 116: /* set_type: EXCEPT */ -#line 847 "bison_parser.y" + case 118: /* set_type: EXCEPT */ +#line 859 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetExcept; } -#line 3971 "bison_parser.cpp" +#line 4009 "bison_parser.cpp" break; - case 117: /* opt_all: ALL */ -#line 854 "bison_parser.y" + case 119: /* opt_all: ALL */ +#line 866 "bison_parser.y" { (yyval.bval) = true; } -#line 3979 "bison_parser.cpp" +#line 4017 "bison_parser.cpp" break; - case 118: /* opt_all: %empty */ -#line 857 "bison_parser.y" + case 120: /* opt_all: %empty */ +#line 869 "bison_parser.y" { (yyval.bval) = false; } -#line 3987 "bison_parser.cpp" +#line 4025 "bison_parser.cpp" break; - case 119: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ -#line 863 "bison_parser.y" + case 121: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ +#line 875 "bison_parser.y" { (yyval.select_stmt) = new SelectStatement(); (yyval.select_stmt)->limit = (yyvsp[-5].limit); @@ -3997,213 +4035,213 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 4001 "bison_parser.cpp" +#line 4039 "bison_parser.cpp" break; - case 120: /* opt_distinct: DISTINCT */ -#line 875 "bison_parser.y" + case 122: /* opt_distinct: DISTINCT */ +#line 887 "bison_parser.y" { (yyval.bval) = true; } -#line 4007 "bison_parser.cpp" +#line 4045 "bison_parser.cpp" break; - case 121: /* opt_distinct: %empty */ -#line 876 "bison_parser.y" + case 123: /* opt_distinct: %empty */ +#line 888 "bison_parser.y" { (yyval.bval) = false; } -#line 4013 "bison_parser.cpp" +#line 4051 "bison_parser.cpp" break; - case 123: /* opt_from_clause: from_clause */ -#line 884 "bison_parser.y" + case 125: /* opt_from_clause: from_clause */ +#line 896 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 4019 "bison_parser.cpp" +#line 4057 "bison_parser.cpp" break; - case 124: /* opt_from_clause: %empty */ -#line 885 "bison_parser.y" + case 126: /* opt_from_clause: %empty */ +#line 897 "bison_parser.y" { (yyval.table) = nullptr; } -#line 4025 "bison_parser.cpp" +#line 4063 "bison_parser.cpp" break; - case 125: /* from_clause: FROM table_ref */ -#line 889 "bison_parser.y" + case 127: /* from_clause: FROM table_ref */ +#line 901 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 4031 "bison_parser.cpp" +#line 4069 "bison_parser.cpp" break; - case 126: /* opt_where: WHERE expr */ -#line 894 "bison_parser.y" + case 128: /* opt_where: WHERE expr */ +#line 906 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 4037 "bison_parser.cpp" +#line 4075 "bison_parser.cpp" break; - case 127: /* opt_where: %empty */ -#line 895 "bison_parser.y" + case 129: /* opt_where: %empty */ +#line 907 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 4043 "bison_parser.cpp" +#line 4081 "bison_parser.cpp" break; - case 128: /* opt_group: GROUP BY expr_list opt_having */ -#line 899 "bison_parser.y" + case 130: /* opt_group: GROUP BY expr_list opt_having */ +#line 911 "bison_parser.y" { (yyval.group_t) = new GroupByDescription(); (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 4053 "bison_parser.cpp" +#line 4091 "bison_parser.cpp" break; - case 129: /* opt_group: %empty */ -#line 904 "bison_parser.y" + case 131: /* opt_group: %empty */ +#line 916 "bison_parser.y" { (yyval.group_t) = nullptr; } -#line 4059 "bison_parser.cpp" +#line 4097 "bison_parser.cpp" break; - case 130: /* opt_having: HAVING expr */ -#line 908 "bison_parser.y" + case 132: /* opt_having: HAVING expr */ +#line 920 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 4065 "bison_parser.cpp" +#line 4103 "bison_parser.cpp" break; - case 131: /* opt_having: %empty */ -#line 909 "bison_parser.y" + case 133: /* opt_having: %empty */ +#line 921 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 4071 "bison_parser.cpp" +#line 4109 "bison_parser.cpp" break; - case 132: /* opt_order: ORDER BY order_list */ -#line 913 "bison_parser.y" + case 134: /* opt_order: ORDER BY order_list */ +#line 925 "bison_parser.y" { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 4077 "bison_parser.cpp" +#line 4115 "bison_parser.cpp" break; - case 133: /* opt_order: %empty */ -#line 914 "bison_parser.y" + case 135: /* opt_order: %empty */ +#line 926 "bison_parser.y" { (yyval.order_vec) = nullptr; } -#line 4083 "bison_parser.cpp" +#line 4121 "bison_parser.cpp" break; - case 134: /* order_list: order_desc */ -#line 918 "bison_parser.y" + case 136: /* order_list: order_desc */ +#line 930 "bison_parser.y" { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 4089 "bison_parser.cpp" +#line 4127 "bison_parser.cpp" break; - case 135: /* order_list: order_list ',' order_desc */ -#line 919 "bison_parser.y" + case 137: /* order_list: order_list ',' order_desc */ +#line 931 "bison_parser.y" { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 4095 "bison_parser.cpp" +#line 4133 "bison_parser.cpp" break; - case 136: /* order_desc: expr opt_order_type */ -#line 923 "bison_parser.y" + case 138: /* order_desc: expr opt_order_type */ +#line 935 "bison_parser.y" { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 4101 "bison_parser.cpp" +#line 4139 "bison_parser.cpp" break; - case 137: /* opt_order_type: ASC */ -#line 927 "bison_parser.y" + case 139: /* opt_order_type: ASC */ +#line 939 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 4107 "bison_parser.cpp" +#line 4145 "bison_parser.cpp" break; - case 138: /* opt_order_type: DESC */ -#line 928 "bison_parser.y" + case 140: /* opt_order_type: DESC */ +#line 940 "bison_parser.y" { (yyval.order_type) = kOrderDesc; } -#line 4113 "bison_parser.cpp" +#line 4151 "bison_parser.cpp" break; - case 139: /* opt_order_type: %empty */ -#line 929 "bison_parser.y" + case 141: /* opt_order_type: %empty */ +#line 941 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 4119 "bison_parser.cpp" +#line 4157 "bison_parser.cpp" break; - case 140: /* opt_top: TOP int_literal */ -#line 935 "bison_parser.y" + case 142: /* opt_top: TOP int_literal */ +#line 947 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 4125 "bison_parser.cpp" +#line 4163 "bison_parser.cpp" break; - case 141: /* opt_top: %empty */ -#line 936 "bison_parser.y" + case 143: /* opt_top: %empty */ +#line 948 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 4131 "bison_parser.cpp" +#line 4169 "bison_parser.cpp" break; - case 142: /* opt_limit: LIMIT expr */ -#line 940 "bison_parser.y" + case 144: /* opt_limit: LIMIT expr */ +#line 952 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 4137 "bison_parser.cpp" +#line 4175 "bison_parser.cpp" break; - case 143: /* opt_limit: OFFSET expr */ -#line 941 "bison_parser.y" + case 145: /* opt_limit: OFFSET expr */ +#line 953 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 4143 "bison_parser.cpp" +#line 4181 "bison_parser.cpp" break; - case 144: /* opt_limit: LIMIT expr OFFSET expr */ -#line 942 "bison_parser.y" + case 146: /* opt_limit: LIMIT expr OFFSET expr */ +#line 954 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4149 "bison_parser.cpp" +#line 4187 "bison_parser.cpp" break; - case 145: /* opt_limit: LIMIT ALL */ -#line 943 "bison_parser.y" + case 147: /* opt_limit: LIMIT ALL */ +#line 955 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, nullptr); } -#line 4155 "bison_parser.cpp" +#line 4193 "bison_parser.cpp" break; - case 146: /* opt_limit: LIMIT ALL OFFSET expr */ -#line 944 "bison_parser.y" + case 148: /* opt_limit: LIMIT ALL OFFSET expr */ +#line 956 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 4161 "bison_parser.cpp" +#line 4199 "bison_parser.cpp" break; - case 147: /* opt_limit: %empty */ -#line 945 "bison_parser.y" + case 149: /* opt_limit: %empty */ +#line 957 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 4167 "bison_parser.cpp" +#line 4205 "bison_parser.cpp" break; - case 148: /* expr_list: expr_alias */ -#line 952 "bison_parser.y" + case 150: /* expr_list: expr_alias */ +#line 964 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4173 "bison_parser.cpp" +#line 4211 "bison_parser.cpp" break; - case 149: /* expr_list: expr_list ',' expr_alias */ -#line 953 "bison_parser.y" + case 151: /* expr_list: expr_list ',' expr_alias */ +#line 965 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4179 "bison_parser.cpp" +#line 4217 "bison_parser.cpp" break; - case 150: /* opt_literal_list: literal_list */ -#line 957 "bison_parser.y" + case 152: /* opt_literal_list: literal_list */ +#line 969 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[0].expr_vec); } -#line 4185 "bison_parser.cpp" +#line 4223 "bison_parser.cpp" break; - case 151: /* opt_literal_list: %empty */ -#line 958 "bison_parser.y" + case 153: /* opt_literal_list: %empty */ +#line 970 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 4191 "bison_parser.cpp" +#line 4229 "bison_parser.cpp" break; - case 152: /* literal_list: literal */ -#line 962 "bison_parser.y" + case 154: /* literal_list: literal */ +#line 974 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4197 "bison_parser.cpp" +#line 4235 "bison_parser.cpp" break; - case 153: /* literal_list: literal_list ',' literal */ -#line 963 "bison_parser.y" + case 155: /* literal_list: literal_list ',' literal */ +#line 975 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4203 "bison_parser.cpp" +#line 4241 "bison_parser.cpp" break; - case 154: /* expr_alias: expr opt_alias */ -#line 967 "bison_parser.y" + case 156: /* expr_alias: expr opt_alias */ +#line 979 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); if ((yyvsp[0].alias_t)) { @@ -4211,421 +4249,421 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].alias_t); } } -#line 4215 "bison_parser.cpp" +#line 4253 "bison_parser.cpp" break; - case 160: /* operand: '(' expr ')' */ -#line 985 "bison_parser.y" + case 162: /* operand: '(' expr ')' */ +#line 997 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); } -#line 4221 "bison_parser.cpp" +#line 4259 "bison_parser.cpp" break; - case 170: /* operand: '(' select_no_paren ')' */ -#line 995 "bison_parser.y" + case 172: /* operand: '(' select_no_paren ')' */ +#line 1007 "bison_parser.y" { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 4227 "bison_parser.cpp" +#line 4265 "bison_parser.cpp" break; - case 173: /* unary_expr: '-' operand */ -#line 1004 "bison_parser.y" + case 175: /* unary_expr: '-' operand */ +#line 1016 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 4233 "bison_parser.cpp" +#line 4271 "bison_parser.cpp" break; - case 174: /* unary_expr: NOT operand */ -#line 1005 "bison_parser.y" + case 176: /* unary_expr: NOT operand */ +#line 1017 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 4239 "bison_parser.cpp" +#line 4277 "bison_parser.cpp" break; - case 175: /* unary_expr: operand ISNULL */ -#line 1006 "bison_parser.y" + case 177: /* unary_expr: operand ISNULL */ +#line 1018 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 4245 "bison_parser.cpp" +#line 4283 "bison_parser.cpp" break; - case 176: /* unary_expr: operand IS NULL */ -#line 1007 "bison_parser.y" + case 178: /* unary_expr: operand IS NULL */ +#line 1019 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 4251 "bison_parser.cpp" +#line 4289 "bison_parser.cpp" break; - case 177: /* unary_expr: operand IS NOT NULL */ -#line 1008 "bison_parser.y" + case 179: /* unary_expr: operand IS NOT NULL */ +#line 1020 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 4257 "bison_parser.cpp" +#line 4295 "bison_parser.cpp" break; - case 179: /* binary_expr: operand '-' operand */ -#line 1013 "bison_parser.y" + case 181: /* binary_expr: operand '-' operand */ +#line 1025 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 4263 "bison_parser.cpp" +#line 4301 "bison_parser.cpp" break; - case 180: /* binary_expr: operand '+' operand */ -#line 1014 "bison_parser.y" + case 182: /* binary_expr: operand '+' operand */ +#line 1026 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 4269 "bison_parser.cpp" +#line 4307 "bison_parser.cpp" break; - case 181: /* binary_expr: operand '/' operand */ -#line 1015 "bison_parser.y" + case 183: /* binary_expr: operand '/' operand */ +#line 1027 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 4275 "bison_parser.cpp" +#line 4313 "bison_parser.cpp" break; - case 182: /* binary_expr: operand '*' operand */ -#line 1016 "bison_parser.y" + case 184: /* binary_expr: operand '*' operand */ +#line 1028 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 4281 "bison_parser.cpp" +#line 4319 "bison_parser.cpp" break; - case 183: /* binary_expr: operand '%' operand */ -#line 1017 "bison_parser.y" + case 185: /* binary_expr: operand '%' operand */ +#line 1029 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 4287 "bison_parser.cpp" +#line 4325 "bison_parser.cpp" break; - case 184: /* binary_expr: operand '^' operand */ -#line 1018 "bison_parser.y" + case 186: /* binary_expr: operand '^' operand */ +#line 1030 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 4293 "bison_parser.cpp" +#line 4331 "bison_parser.cpp" break; - case 185: /* binary_expr: operand LIKE operand */ -#line 1019 "bison_parser.y" + case 187: /* binary_expr: operand LIKE operand */ +#line 1031 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 4299 "bison_parser.cpp" +#line 4337 "bison_parser.cpp" break; - case 186: /* binary_expr: operand NOT LIKE operand */ -#line 1020 "bison_parser.y" + case 188: /* binary_expr: operand NOT LIKE operand */ +#line 1032 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 4305 "bison_parser.cpp" +#line 4343 "bison_parser.cpp" break; - case 187: /* binary_expr: operand ILIKE operand */ -#line 1021 "bison_parser.y" + case 189: /* binary_expr: operand ILIKE operand */ +#line 1033 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 4311 "bison_parser.cpp" +#line 4349 "bison_parser.cpp" break; - case 188: /* binary_expr: operand CONCAT operand */ -#line 1022 "bison_parser.y" + case 190: /* binary_expr: operand CONCAT operand */ +#line 1034 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 4317 "bison_parser.cpp" +#line 4355 "bison_parser.cpp" break; - case 189: /* logic_expr: expr AND expr */ -#line 1026 "bison_parser.y" + case 191: /* logic_expr: expr AND expr */ +#line 1038 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 4323 "bison_parser.cpp" +#line 4361 "bison_parser.cpp" break; - case 190: /* logic_expr: expr OR expr */ -#line 1027 "bison_parser.y" + case 192: /* logic_expr: expr OR expr */ +#line 1039 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 4329 "bison_parser.cpp" +#line 4367 "bison_parser.cpp" break; - case 191: /* in_expr: operand IN '(' expr_list ')' */ -#line 1031 "bison_parser.y" + case 193: /* in_expr: operand IN '(' expr_list ')' */ +#line 1043 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 4335 "bison_parser.cpp" +#line 4373 "bison_parser.cpp" break; - case 192: /* in_expr: operand NOT IN '(' expr_list ')' */ -#line 1032 "bison_parser.y" + case 194: /* in_expr: operand NOT IN '(' expr_list ')' */ +#line 1044 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 4341 "bison_parser.cpp" +#line 4379 "bison_parser.cpp" break; - case 193: /* in_expr: operand IN '(' select_no_paren ')' */ -#line 1033 "bison_parser.y" + case 195: /* in_expr: operand IN '(' select_no_paren ')' */ +#line 1045 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 4347 "bison_parser.cpp" +#line 4385 "bison_parser.cpp" break; - case 194: /* in_expr: operand NOT IN '(' select_no_paren ')' */ -#line 1034 "bison_parser.y" + case 196: /* in_expr: operand NOT IN '(' select_no_paren ')' */ +#line 1046 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 4353 "bison_parser.cpp" +#line 4391 "bison_parser.cpp" break; - case 195: /* case_expr: CASE expr case_list END */ -#line 1040 "bison_parser.y" + case 197: /* case_expr: CASE expr case_list END */ +#line 1052 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } -#line 4359 "bison_parser.cpp" +#line 4397 "bison_parser.cpp" break; - case 196: /* case_expr: CASE expr case_list ELSE expr END */ -#line 1041 "bison_parser.y" + case 198: /* case_expr: CASE expr case_list ELSE expr END */ +#line 1053 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4365 "bison_parser.cpp" +#line 4403 "bison_parser.cpp" break; - case 197: /* case_expr: CASE case_list END */ -#line 1042 "bison_parser.y" + case 199: /* case_expr: CASE case_list END */ +#line 1054 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } -#line 4371 "bison_parser.cpp" +#line 4409 "bison_parser.cpp" break; - case 198: /* case_expr: CASE case_list ELSE expr END */ -#line 1043 "bison_parser.y" + case 200: /* case_expr: CASE case_list ELSE expr END */ +#line 1055 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4377 "bison_parser.cpp" +#line 4415 "bison_parser.cpp" break; - case 199: /* case_list: WHEN expr THEN expr */ -#line 1047 "bison_parser.y" + case 201: /* case_list: WHEN expr THEN expr */ +#line 1059 "bison_parser.y" { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4383 "bison_parser.cpp" +#line 4421 "bison_parser.cpp" break; - case 200: /* case_list: case_list WHEN expr THEN expr */ -#line 1048 "bison_parser.y" + case 202: /* case_list: case_list WHEN expr THEN expr */ +#line 1060 "bison_parser.y" { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4389 "bison_parser.cpp" +#line 4427 "bison_parser.cpp" break; - case 201: /* exists_expr: EXISTS '(' select_no_paren ')' */ -#line 1052 "bison_parser.y" + case 203: /* exists_expr: EXISTS '(' select_no_paren ')' */ +#line 1064 "bison_parser.y" { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 4395 "bison_parser.cpp" +#line 4433 "bison_parser.cpp" break; - case 202: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ -#line 1053 "bison_parser.y" + case 204: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ +#line 1065 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 4401 "bison_parser.cpp" +#line 4439 "bison_parser.cpp" break; - case 203: /* comp_expr: operand '=' operand */ -#line 1057 "bison_parser.y" + case 205: /* comp_expr: operand '=' operand */ +#line 1069 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4407 "bison_parser.cpp" +#line 4445 "bison_parser.cpp" break; - case 204: /* comp_expr: operand EQUALS operand */ -#line 1058 "bison_parser.y" + case 206: /* comp_expr: operand EQUALS operand */ +#line 1070 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4413 "bison_parser.cpp" +#line 4451 "bison_parser.cpp" break; - case 205: /* comp_expr: operand NOTEQUALS operand */ -#line 1059 "bison_parser.y" + case 207: /* comp_expr: operand NOTEQUALS operand */ +#line 1071 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 4419 "bison_parser.cpp" +#line 4457 "bison_parser.cpp" break; - case 206: /* comp_expr: operand '<' operand */ -#line 1060 "bison_parser.y" + case 208: /* comp_expr: operand '<' operand */ +#line 1072 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 4425 "bison_parser.cpp" +#line 4463 "bison_parser.cpp" break; - case 207: /* comp_expr: operand '>' operand */ -#line 1061 "bison_parser.y" + case 209: /* comp_expr: operand '>' operand */ +#line 1073 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 4431 "bison_parser.cpp" +#line 4469 "bison_parser.cpp" break; - case 208: /* comp_expr: operand LESSEQ operand */ -#line 1062 "bison_parser.y" + case 210: /* comp_expr: operand LESSEQ operand */ +#line 1074 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 4437 "bison_parser.cpp" +#line 4475 "bison_parser.cpp" break; - case 209: /* comp_expr: operand GREATEREQ operand */ -#line 1063 "bison_parser.y" + case 211: /* comp_expr: operand GREATEREQ operand */ +#line 1075 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 4443 "bison_parser.cpp" +#line 4481 "bison_parser.cpp" break; - case 210: /* function_expr: IDENTIFIER '(' ')' */ -#line 1067 "bison_parser.y" + case 212: /* function_expr: IDENTIFIER '(' ')' */ +#line 1079 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 4449 "bison_parser.cpp" +#line 4487 "bison_parser.cpp" break; - case 211: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ -#line 1068 "bison_parser.y" + case 213: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ +#line 1080 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 4455 "bison_parser.cpp" +#line 4493 "bison_parser.cpp" break; - case 212: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ -#line 1072 "bison_parser.y" + case 214: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ +#line 1084 "bison_parser.y" { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } -#line 4461 "bison_parser.cpp" +#line 4499 "bison_parser.cpp" break; - case 213: /* cast_expr: CAST '(' expr AS column_type ')' */ -#line 1076 "bison_parser.y" + case 215: /* cast_expr: CAST '(' expr AS column_type ')' */ +#line 1088 "bison_parser.y" { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } -#line 4467 "bison_parser.cpp" +#line 4505 "bison_parser.cpp" break; - case 214: /* datetime_field: SECOND */ -#line 1080 "bison_parser.y" + case 216: /* datetime_field: SECOND */ +#line 1092 "bison_parser.y" { (yyval.datetime_field) = kDatetimeSecond; } -#line 4473 "bison_parser.cpp" +#line 4511 "bison_parser.cpp" break; - case 215: /* datetime_field: MINUTE */ -#line 1081 "bison_parser.y" + case 217: /* datetime_field: MINUTE */ +#line 1093 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMinute; } -#line 4479 "bison_parser.cpp" +#line 4517 "bison_parser.cpp" break; - case 216: /* datetime_field: HOUR */ -#line 1082 "bison_parser.y" + case 218: /* datetime_field: HOUR */ +#line 1094 "bison_parser.y" { (yyval.datetime_field) = kDatetimeHour; } -#line 4485 "bison_parser.cpp" +#line 4523 "bison_parser.cpp" break; - case 217: /* datetime_field: DAY */ -#line 1083 "bison_parser.y" + case 219: /* datetime_field: DAY */ +#line 1095 "bison_parser.y" { (yyval.datetime_field) = kDatetimeDay; } -#line 4491 "bison_parser.cpp" +#line 4529 "bison_parser.cpp" break; - case 218: /* datetime_field: MONTH */ -#line 1084 "bison_parser.y" + case 220: /* datetime_field: MONTH */ +#line 1096 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMonth; } -#line 4497 "bison_parser.cpp" +#line 4535 "bison_parser.cpp" break; - case 219: /* datetime_field: YEAR */ -#line 1085 "bison_parser.y" + case 221: /* datetime_field: YEAR */ +#line 1097 "bison_parser.y" { (yyval.datetime_field) = kDatetimeYear; } -#line 4503 "bison_parser.cpp" +#line 4541 "bison_parser.cpp" break; - case 220: /* array_expr: ARRAY '[' expr_list ']' */ -#line 1089 "bison_parser.y" + case 222: /* array_expr: ARRAY '[' expr_list ']' */ +#line 1101 "bison_parser.y" { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 4509 "bison_parser.cpp" +#line 4547 "bison_parser.cpp" break; - case 221: /* array_index: operand '[' int_literal ']' */ -#line 1093 "bison_parser.y" + case 223: /* array_index: operand '[' int_literal ']' */ +#line 1105 "bison_parser.y" { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 4515 "bison_parser.cpp" +#line 4553 "bison_parser.cpp" break; - case 222: /* between_expr: operand BETWEEN operand AND operand */ -#line 1097 "bison_parser.y" + case 224: /* between_expr: operand BETWEEN operand AND operand */ +#line 1109 "bison_parser.y" { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4521 "bison_parser.cpp" +#line 4559 "bison_parser.cpp" break; - case 223: /* column_name: IDENTIFIER */ -#line 1101 "bison_parser.y" + case 225: /* column_name: IDENTIFIER */ +#line 1113 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 4527 "bison_parser.cpp" +#line 4565 "bison_parser.cpp" break; - case 224: /* column_name: IDENTIFIER '.' IDENTIFIER */ -#line 1102 "bison_parser.y" + case 226: /* column_name: IDENTIFIER '.' IDENTIFIER */ +#line 1114 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 4533 "bison_parser.cpp" +#line 4571 "bison_parser.cpp" break; - case 225: /* column_name: '*' */ -#line 1103 "bison_parser.y" + case 227: /* column_name: '*' */ +#line 1115 "bison_parser.y" { (yyval.expr) = Expr::makeStar(); } -#line 4539 "bison_parser.cpp" +#line 4577 "bison_parser.cpp" break; - case 226: /* column_name: IDENTIFIER '.' '*' */ -#line 1104 "bison_parser.y" + case 228: /* column_name: IDENTIFIER '.' '*' */ +#line 1116 "bison_parser.y" { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 4545 "bison_parser.cpp" +#line 4583 "bison_parser.cpp" break; - case 232: /* string_literal: STRING */ -#line 1116 "bison_parser.y" + case 234: /* string_literal: STRING */ +#line 1128 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 4551 "bison_parser.cpp" +#line 4589 "bison_parser.cpp" break; - case 233: /* bool_literal: TRUE */ -#line 1120 "bison_parser.y" + case 235: /* bool_literal: TRUE */ +#line 1132 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(true); } -#line 4557 "bison_parser.cpp" +#line 4595 "bison_parser.cpp" break; - case 234: /* bool_literal: FALSE */ -#line 1121 "bison_parser.y" + case 236: /* bool_literal: FALSE */ +#line 1133 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(false); } -#line 4563 "bison_parser.cpp" +#line 4601 "bison_parser.cpp" break; - case 235: /* num_literal: FLOATVAL */ -#line 1125 "bison_parser.y" + case 237: /* num_literal: FLOATVAL */ +#line 1137 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 4569 "bison_parser.cpp" +#line 4607 "bison_parser.cpp" break; - case 237: /* int_literal: INTVAL */ -#line 1130 "bison_parser.y" + case 239: /* int_literal: INTVAL */ +#line 1142 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 4575 "bison_parser.cpp" +#line 4613 "bison_parser.cpp" break; - case 238: /* null_literal: NULL */ -#line 1134 "bison_parser.y" + case 240: /* null_literal: NULL */ +#line 1146 "bison_parser.y" { (yyval.expr) = Expr::makeNullLiteral(); } -#line 4581 "bison_parser.cpp" +#line 4619 "bison_parser.cpp" break; - case 239: /* param_expr: '?' */ -#line 1138 "bison_parser.y" + case 241: /* param_expr: '?' */ +#line 1150 "bison_parser.y" { (yyval.expr) = Expr::makeParameter(yylloc.total_column); (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 4591 "bison_parser.cpp" +#line 4629 "bison_parser.cpp" break; - case 241: /* table_ref: table_ref_commalist ',' table_ref_atomic */ -#line 1151 "bison_parser.y" + case 243: /* table_ref: table_ref_commalist ',' table_ref_atomic */ +#line 1163 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); auto tbl = new TableRef(kTableCrossProduct); tbl->list = (yyvsp[-2].table_vec); (yyval.table) = tbl; } -#line 4602 "bison_parser.cpp" +#line 4640 "bison_parser.cpp" break; - case 245: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ -#line 1167 "bison_parser.y" + case 247: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ +#line 1179 "bison_parser.y" { auto tbl = new TableRef(kTableSelect); tbl->select = (yyvsp[-2].select_stmt); tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4613 "bison_parser.cpp" +#line 4651 "bison_parser.cpp" break; - case 246: /* table_ref_commalist: table_ref_atomic */ -#line 1176 "bison_parser.y" + case 248: /* table_ref_commalist: table_ref_atomic */ +#line 1188 "bison_parser.y" { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 4619 "bison_parser.cpp" +#line 4657 "bison_parser.cpp" break; - case 247: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ -#line 1177 "bison_parser.y" + case 249: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ +#line 1189 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 4625 "bison_parser.cpp" +#line 4663 "bison_parser.cpp" break; - case 248: /* table_ref_name: table_name opt_table_alias */ -#line 1182 "bison_parser.y" + case 250: /* table_ref_name: table_name opt_table_alias */ +#line 1194 "bison_parser.y" { auto tbl = new TableRef(kTableName); tbl->schema = (yyvsp[-1].table_name).schema; @@ -4633,121 +4671,121 @@ YYLTYPE yylloc = yyloc_default; tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4637 "bison_parser.cpp" +#line 4675 "bison_parser.cpp" break; - case 249: /* table_ref_name_no_alias: table_name */ -#line 1193 "bison_parser.y" + case 251: /* table_ref_name_no_alias: table_name */ +#line 1205 "bison_parser.y" { (yyval.table) = new TableRef(kTableName); (yyval.table)->schema = (yyvsp[0].table_name).schema; (yyval.table)->name = (yyvsp[0].table_name).name; } -#line 4647 "bison_parser.cpp" +#line 4685 "bison_parser.cpp" break; - case 250: /* table_name: IDENTIFIER */ -#line 1202 "bison_parser.y" + case 252: /* table_name: IDENTIFIER */ +#line 1214 "bison_parser.y" { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} -#line 4653 "bison_parser.cpp" +#line 4691 "bison_parser.cpp" break; - case 251: /* table_name: IDENTIFIER '.' IDENTIFIER */ -#line 1203 "bison_parser.y" + case 253: /* table_name: IDENTIFIER '.' IDENTIFIER */ +#line 1215 "bison_parser.y" { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } -#line 4659 "bison_parser.cpp" +#line 4697 "bison_parser.cpp" break; - case 252: /* opt_index_name: IDENTIFIER */ -#line 1207 "bison_parser.y" + case 254: /* opt_index_name: IDENTIFIER */ +#line 1219 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4665 "bison_parser.cpp" +#line 4703 "bison_parser.cpp" break; - case 253: /* opt_index_name: %empty */ -#line 1208 "bison_parser.y" + case 255: /* opt_index_name: %empty */ +#line 1220 "bison_parser.y" { (yyval.sval) = nullptr;} -#line 4671 "bison_parser.cpp" +#line 4709 "bison_parser.cpp" break; - case 254: /* index_name: IDENTIFIER */ -#line 1212 "bison_parser.y" + case 256: /* index_name: IDENTIFIER */ +#line 1224 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4677 "bison_parser.cpp" +#line 4715 "bison_parser.cpp" break; - case 256: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ -#line 1218 "bison_parser.y" + case 258: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ +#line 1230 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } -#line 4683 "bison_parser.cpp" +#line 4721 "bison_parser.cpp" break; - case 258: /* opt_table_alias: %empty */ -#line 1224 "bison_parser.y" + case 260: /* opt_table_alias: %empty */ +#line 1236 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4689 "bison_parser.cpp" +#line 4727 "bison_parser.cpp" break; - case 259: /* alias: AS IDENTIFIER */ -#line 1229 "bison_parser.y" + case 261: /* alias: AS IDENTIFIER */ +#line 1241 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4695 "bison_parser.cpp" +#line 4733 "bison_parser.cpp" break; - case 260: /* alias: IDENTIFIER */ -#line 1230 "bison_parser.y" + case 262: /* alias: IDENTIFIER */ +#line 1242 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4701 "bison_parser.cpp" +#line 4739 "bison_parser.cpp" break; - case 262: /* opt_alias: %empty */ -#line 1236 "bison_parser.y" + case 264: /* opt_alias: %empty */ +#line 1248 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4707 "bison_parser.cpp" +#line 4745 "bison_parser.cpp" break; - case 264: /* opt_with_clause: %empty */ -#line 1246 "bison_parser.y" + case 266: /* opt_with_clause: %empty */ +#line 1258 "bison_parser.y" { (yyval.with_description_vec) = nullptr; } -#line 4713 "bison_parser.cpp" +#line 4751 "bison_parser.cpp" break; - case 265: /* with_clause: WITH with_description_list */ -#line 1250 "bison_parser.y" + case 267: /* with_clause: WITH with_description_list */ +#line 1262 "bison_parser.y" { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } -#line 4719 "bison_parser.cpp" +#line 4757 "bison_parser.cpp" break; - case 266: /* with_description_list: with_description */ -#line 1254 "bison_parser.y" + case 268: /* with_description_list: with_description */ +#line 1266 "bison_parser.y" { (yyval.with_description_vec) = new std::vector(); (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); } -#line 4728 "bison_parser.cpp" +#line 4766 "bison_parser.cpp" break; - case 267: /* with_description_list: with_description_list ',' with_description */ -#line 1258 "bison_parser.y" + case 269: /* with_description_list: with_description_list ',' with_description */ +#line 1270 "bison_parser.y" { (yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t)); (yyval.with_description_vec) = (yyvsp[-2].with_description_vec); } -#line 4737 "bison_parser.cpp" +#line 4775 "bison_parser.cpp" break; - case 268: /* with_description: IDENTIFIER AS select_with_paren */ -#line 1265 "bison_parser.y" + case 270: /* with_description: IDENTIFIER AS select_with_paren */ +#line 1277 "bison_parser.y" { (yyval.with_description_t) = new WithDescription(); (yyval.with_description_t)->alias = (yyvsp[-2].sval); (yyval.with_description_t)->select = (yyvsp[0].select_stmt); } -#line 4747 "bison_parser.cpp" +#line 4785 "bison_parser.cpp" break; - case 269: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ -#line 1279 "bison_parser.y" + case 271: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ +#line 1291 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4755,11 +4793,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 4759 "bison_parser.cpp" +#line 4797 "bison_parser.cpp" break; - case 270: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ -#line 1287 "bison_parser.y" + case 272: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ +#line 1299 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4768,11 +4806,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 4772 "bison_parser.cpp" +#line 4810 "bison_parser.cpp" break; - case 271: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ -#line 1297 "bison_parser.y" + case 273: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ +#line 1309 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4788,83 +4826,83 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } -#line 4792 "bison_parser.cpp" +#line 4830 "bison_parser.cpp" break; - case 272: /* opt_join_type: INNER */ -#line 1315 "bison_parser.y" + case 274: /* opt_join_type: INNER */ +#line 1327 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4798 "bison_parser.cpp" +#line 4836 "bison_parser.cpp" break; - case 273: /* opt_join_type: LEFT OUTER */ -#line 1316 "bison_parser.y" + case 275: /* opt_join_type: LEFT OUTER */ +#line 1328 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4804 "bison_parser.cpp" +#line 4842 "bison_parser.cpp" break; - case 274: /* opt_join_type: LEFT */ -#line 1317 "bison_parser.y" + case 276: /* opt_join_type: LEFT */ +#line 1329 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4810 "bison_parser.cpp" +#line 4848 "bison_parser.cpp" break; - case 275: /* opt_join_type: RIGHT OUTER */ -#line 1318 "bison_parser.y" + case 277: /* opt_join_type: RIGHT OUTER */ +#line 1330 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4816 "bison_parser.cpp" +#line 4854 "bison_parser.cpp" break; - case 276: /* opt_join_type: RIGHT */ -#line 1319 "bison_parser.y" + case 278: /* opt_join_type: RIGHT */ +#line 1331 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4822 "bison_parser.cpp" +#line 4860 "bison_parser.cpp" break; - case 277: /* opt_join_type: FULL OUTER */ -#line 1320 "bison_parser.y" + case 279: /* opt_join_type: FULL OUTER */ +#line 1332 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4828 "bison_parser.cpp" +#line 4866 "bison_parser.cpp" break; - case 278: /* opt_join_type: OUTER */ -#line 1321 "bison_parser.y" + case 280: /* opt_join_type: OUTER */ +#line 1333 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4834 "bison_parser.cpp" +#line 4872 "bison_parser.cpp" break; - case 279: /* opt_join_type: FULL */ -#line 1322 "bison_parser.y" + case 281: /* opt_join_type: FULL */ +#line 1334 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4840 "bison_parser.cpp" +#line 4878 "bison_parser.cpp" break; - case 280: /* opt_join_type: CROSS */ -#line 1323 "bison_parser.y" + case 282: /* opt_join_type: CROSS */ +#line 1335 "bison_parser.y" { (yyval.uval) = kJoinCross; } -#line 4846 "bison_parser.cpp" +#line 4884 "bison_parser.cpp" break; - case 281: /* opt_join_type: %empty */ -#line 1324 "bison_parser.y" + case 283: /* opt_join_type: %empty */ +#line 1336 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4852 "bison_parser.cpp" +#line 4890 "bison_parser.cpp" break; - case 285: /* ident_commalist: IDENTIFIER */ -#line 1344 "bison_parser.y" + case 287: /* ident_commalist: IDENTIFIER */ +#line 1356 "bison_parser.y" { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 4858 "bison_parser.cpp" +#line 4896 "bison_parser.cpp" break; - case 286: /* ident_commalist: ident_commalist ',' IDENTIFIER */ -#line 1345 "bison_parser.y" + case 288: /* ident_commalist: ident_commalist ',' IDENTIFIER */ +#line 1357 "bison_parser.y" { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 4864 "bison_parser.cpp" +#line 4902 "bison_parser.cpp" break; -#line 4868 "bison_parser.cpp" +#line 4906 "bison_parser.cpp" default: break; } @@ -5094,7 +5132,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 1348 "bison_parser.y" +#line 1360 "bison_parser.y" /********************************* ** Section 4: Additional C code diff --git a/src/parser/bison_parser.h b/src/parser/bison_parser.h index ced56f10..d307947d 100644 --- a/src/parser/bison_parser.h +++ b/src/parser/bison_parser.h @@ -291,6 +291,8 @@ union HSQL_STYPE hsql::Alias* alias_t; hsql::SetOperation* set_operator_t; hsql::ColumnSpecification column_specification_t; + hsql::AlterAction* alter_action_t; + hsql::DropColumnAction* drop_action_t; std::vector* stmt_vec; @@ -303,7 +305,7 @@ union HSQL_STYPE std::vector* table_element_vec; std::vector* column_constraint_vec; -#line 307 "bison_parser.h" +#line 309 "bison_parser.h" }; typedef union HSQL_STYPE HSQL_STYPE; diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index f1278f02..8a6bfa80 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -133,6 +133,8 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha hsql::Alias* alias_t; hsql::SetOperation* set_operator_t; hsql::ColumnSpecification column_specification_t; + hsql::AlterAction* alter_action_t; + hsql::DropColumnAction* drop_action_t; std::vector* stmt_vec; @@ -238,6 +240,8 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha %type set_operator set_type %type column_constraint %type opt_column_constraints +%type alter_action +%type drop_action // ImportType is used for compatibility reasons %type opt_file_type file_type @@ -671,15 +675,23 @@ opt_exists: ******************************/ alter_statement: - ALTER TABLE table_name DROP COLUMN opt_exists column_name { - $$ = new AlterStatement(kAlterDropColumn); - $$->ifExists = $6; - $$->schema = $3.schema; - $$->name = $3.name; - $$->columnName = $7->name; + ALTER TABLE opt_exists table_name alter_action { + $$ = new AlterStatement($4.name, $5); + $$->ifTableExists = $3; + $$->schema = $4.schema; } ; +alter_action: + drop_action {$$ = $1;} + +drop_action: + DROP COLUMN opt_exists column_name { + $$ = new DropColumnAction($4->name); + $$->ifExists = $3; + } + ; + /****************************** * Delete Statement / Truncate statement * DELETE FROM students WHERE grade > 3.0 diff --git a/src/sql/AlterStatement.h b/src/sql/AlterStatement.h index 02b8df1d..73ab708b 100755 --- a/src/sql/AlterStatement.h +++ b/src/sql/AlterStatement.h @@ -6,23 +6,33 @@ // Note: Implementations of constructors and destructors can be found in statements.cpp. namespace hsql { - enum AlterType { - kAlterDropColumn, + enum ActionType { + DROPCOLUMN, }; + struct AlterAction { + AlterAction(ActionType type); + ActionType type; + }; + + struct DropColumnAction : AlterAction { + DropColumnAction(char* column_name); + char* columnName; + bool ifExists; + }; + + // Represents SQL Alter Table statements. // Example "ALTER TABLE students DROP COLUMN name;" struct AlterStatement : SQLStatement { - AlterStatement(AlterType type); + AlterStatement(char* name, AlterAction* action); ~AlterStatement() override; - AlterType type; char* schema; - bool ifExists; + bool ifTableExists; char* name; - char* columnName; + AlterAction* action; }; - } // namespace hsql #endif diff --git a/src/sql/statements.cpp b/src/sql/statements.cpp index 1bc36105..6fd0629c 100755 --- a/src/sql/statements.cpp +++ b/src/sql/statements.cpp @@ -163,18 +163,27 @@ namespace hsql { free(name); } - // AlterStatement - AlterStatement::AlterStatement(AlterType type) : + // AlterStatement and supportive classes + + AlterAction::AlterAction(ActionType type) : type(type){}; + + DropColumnAction::DropColumnAction(char* column_name) : + AlterAction(DROPCOLUMN), + columnName(column_name), + ifExists(false) + {}; + + AlterStatement::AlterStatement(char* name, AlterAction* action) : SQLStatement(kStmtAlter), - type(type), schema(nullptr), - name(nullptr), - columnName(nullptr) {} + ifTableExists(false), + name(name), + action(action){} AlterStatement::~AlterStatement() { free(schema); free(name); - free(columnName); + free(action); } // TransactionStatement From ff2c1b8172786910815e29e926d48f69d719d4d7 Mon Sep 17 00:00:00 2001 From: simonstadlinger Date: Wed, 25 Aug 2021 18:01:00 +0200 Subject: [PATCH 41/73] Refactor sql_translator to cope with new alter tble sql statement parsing --- src/sql/AlterStatement.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sql/AlterStatement.h b/src/sql/AlterStatement.h index 73ab708b..a143357a 100755 --- a/src/sql/AlterStatement.h +++ b/src/sql/AlterStatement.h @@ -11,8 +11,9 @@ namespace hsql { }; struct AlterAction { - AlterAction(ActionType type); - ActionType type; + AlterAction(ActionType type); + ActionType type; + virtual ~AlterAction() = default; }; struct DropColumnAction : AlterAction { From 23cd7f447b2f01a493c239256254abb7a129f91e Mon Sep 17 00:00:00 2001 From: Moritz Spranger Date: Wed, 25 Aug 2021 18:06:11 +0200 Subject: [PATCH 42/73] Implement requested changes --- src/parser/bison_parser.cpp | 1700 +++++++++++++++++------------------ 1 file changed, 847 insertions(+), 853 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 81f89ba2..5593d971 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -742,7 +742,7 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 67 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 814 +#define YYLAST 806 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 173 @@ -751,7 +751,7 @@ union yyalloc /* YYNRULES -- Number of rules. */ #define YYNRULES 286 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 532 +#define YYNSTATES 530 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 410 @@ -824,27 +824,27 @@ static const yytype_int16 yyrline[] = 563, 564, 568, 569, 573, 574, 578, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 602, 603, 607, 608, 609, 613, 614, 615, 619, - 620, 621, 622, 626, 627, 638, 644, 650, 655, 664, - 665, 674, 689, 698, 711, 718, 729, 730, 740, 749, - 750, 754, 766, 770, 774, 788, 789, 792, 793, 804, - 805, 809, 819, 832, 839, 843, 847, 854, 857, 863, - 875, 876, 880, 884, 885, 889, 894, 895, 899, 904, - 908, 909, 913, 914, 918, 919, 923, 927, 928, 929, - 935, 936, 940, 941, 942, 943, 944, 945, 952, 953, - 957, 958, 962, 963, 967, 977, 978, 979, 980, 981, - 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, - 995, 999, 1000, 1004, 1005, 1006, 1007, 1008, 1012, 1013, - 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1026, - 1027, 1031, 1032, 1033, 1034, 1040, 1041, 1042, 1043, 1047, - 1048, 1052, 1053, 1057, 1058, 1059, 1060, 1061, 1062, 1063, - 1067, 1068, 1072, 1076, 1080, 1081, 1082, 1083, 1084, 1085, - 1089, 1093, 1097, 1101, 1102, 1103, 1104, 1108, 1109, 1110, - 1111, 1112, 1116, 1120, 1121, 1125, 1126, 1130, 1134, 1138, - 1150, 1151, 1161, 1162, 1166, 1167, 1176, 1177, 1182, 1193, - 1202, 1203, 1207, 1208, 1212, 1217, 1218, 1223, 1224, 1229, - 1230, 1235, 1236, 1245, 1246, 1250, 1254, 1258, 1265, 1278, - 1286, 1296, 1315, 1316, 1317, 1318, 1319, 1320, 1321, 1322, - 1323, 1324, 1329, 1338, 1339, 1344, 1345 + 620, 621, 622, 626, 627, 638, 644, 650, 655, 663, + 664, 673, 688, 697, 710, 717, 728, 729, 739, 748, + 749, 753, 765, 769, 773, 787, 788, 791, 792, 803, + 804, 808, 818, 831, 838, 842, 846, 853, 856, 862, + 874, 875, 879, 883, 884, 888, 893, 894, 898, 903, + 907, 908, 912, 913, 917, 918, 922, 926, 927, 928, + 934, 935, 939, 940, 941, 942, 943, 944, 951, 952, + 956, 957, 961, 962, 966, 976, 977, 978, 979, 980, + 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, + 994, 998, 999, 1003, 1004, 1005, 1006, 1007, 1011, 1012, + 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1025, + 1026, 1030, 1031, 1032, 1033, 1039, 1040, 1041, 1042, 1046, + 1047, 1051, 1052, 1056, 1057, 1058, 1059, 1060, 1061, 1062, + 1066, 1067, 1071, 1075, 1079, 1080, 1081, 1082, 1083, 1084, + 1088, 1092, 1096, 1100, 1101, 1102, 1103, 1107, 1108, 1109, + 1110, 1111, 1115, 1119, 1120, 1124, 1125, 1129, 1133, 1137, + 1149, 1150, 1160, 1161, 1165, 1166, 1175, 1176, 1181, 1192, + 1201, 1202, 1206, 1207, 1211, 1216, 1217, 1222, 1223, 1228, + 1229, 1234, 1235, 1244, 1245, 1249, 1253, 1257, 1264, 1277, + 1285, 1295, 1314, 1315, 1316, 1317, 1318, 1319, 1320, 1321, + 1322, 1323, 1328, 1337, 1338, 1343, 1344 }; #endif @@ -949,7 +949,7 @@ static const yytype_int16 yytoknum[] = }; #endif -#define YYPACT_NINF (-409) +#define YYPACT_NINF (-415) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -963,60 +963,59 @@ static const yytype_int16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - 585, -2, 65, 72, 104, 65, -13, 22, 34, 38, - 65, 77, 65, 119, 30, 199, 59, 59, 59, 166, - 42, -409, 114, -409, 114, -409, -409, -409, -409, -409, - -409, -409, -409, -409, -409, -409, -409, -35, -409, 231, - 97, -409, 109, 190, -409, 164, 164, 164, 65, 291, - 65, 193, -409, 65, -49, 178, 178, 178, 65, -409, - 189, 155, -409, -409, -409, -409, -409, -409, 554, -409, - 233, -409, -409, 235, -35, 28, -409, 54, -409, 351, - 21, 362, 247, 365, 65, 65, 290, -409, 281, 217, - 382, 303, 390, 390, 350, 401, 65, 65, -409, 238, - 199, -409, 239, 404, 399, 248, 250, -409, -409, -409, - -35, 309, 300, -35, 182, -409, -409, -409, -409, -409, - -409, -409, -409, 260, 259, -409, -409, -409, -409, -409, - -409, -409, -409, -409, 386, -409, 302, 2, 217, 314, - -409, 390, 430, 31, 287, -46, -409, 398, 326, -409, - 326, -409, -409, 308, -409, -409, -409, -409, 436, -409, - -409, 314, -409, -409, 368, -409, -409, 28, -409, -409, - 314, 368, 314, 149, -409, -409, 21, -409, 65, 438, - 334, 40, 322, 86, 283, 284, 285, 204, 345, 288, - 396, -409, 254, 134, 423, -409, -409, -409, -409, -409, - -409, -409, -409, -409, -409, -409, -409, -409, -409, -409, - -409, 358, -409, 43, 292, -409, 314, 382, -409, 178, - 410, -409, -409, 65, 295, 163, -409, 370, 304, -409, - 44, 182, -35, 312, -409, 191, 182, 134, 418, 57, - -409, 317, 387, -409, 301, 366, 324, 168, -409, -409, - -409, 334, 17, 12, 432, 330, 314, 314, 171, -45, - 325, 396, 613, 314, 82, 327, -52, 314, 314, 396, - -409, 396, -58, 329, 158, 396, 396, 396, 396, 396, - 396, 396, 396, 396, 396, 396, 396, 396, 396, 396, - 404, 65, -409, 487, 21, 134, -409, 16, 291, -409, - 21, -409, 436, 10, 290, -409, 314, -409, 490, -409, - -409, -409, -409, 314, -409, -409, -409, -409, 314, 314, - 430, 390, -409, 464, -409, 331, 333, -409, -409, 335, - -409, -409, -409, -409, 336, -409, 1, 339, 430, -409, - 40, -409, -409, 314, -409, -409, 340, -409, -409, -409, - -409, -409, -409, 408, 91, 90, 110, 314, 314, -409, - 432, 397, 118, -409, -409, -409, 393, 560, 649, 396, - 342, 254, -409, 407, 346, 649, 649, 649, 649, 112, - 112, 112, 112, 82, 82, -89, -89, -89, 25, 348, - -409, -409, 174, 349, -409, -409, 184, -409, 334, -409, - 7, -409, 344, -409, 36, -409, 450, -409, -409, -409, - 134, 134, 185, -409, 353, 515, -409, 516, 518, 519, - -409, 409, -409, -409, 424, 1, -409, 430, 194, -409, - 207, -409, 314, 301, 314, 314, -409, 125, 99, 363, - -409, 396, 649, 254, 364, 209, -409, -409, -409, -409, - 367, 428, -409, -409, -409, 453, 456, 457, 439, 10, - 533, -409, -409, -409, 415, -409, -409, 535, 211, 374, - 376, 377, -409, -409, -409, 244, -409, -409, 56, 378, - 134, 196, -409, 314, -409, 613, 379, 252, -409, -409, - 36, 10, -409, -409, -409, 10, 15, 381, 314, 384, - -409, 543, -409, -409, -409, -409, -409, -409, -409, 134, - -409, -409, -409, -409, 383, 430, -9, -409, 385, 392, - 314, 256, 314, -409, -409, 16, 134, -409, -409, 134, - 394, -409 + 509, 61, 39, 55, 130, 39, 131, 72, 103, 10, + 39, 201, 39, 134, 8, 230, 144, 144, 144, 295, + 141, -415, 208, -415, 208, -415, -415, -415, -415, -415, + -415, -415, -415, -415, -415, -415, -415, -33, -415, 329, + 165, -415, 192, 260, -415, 239, 239, 239, 39, 367, + 39, 250, -415, 39, -63, 249, 249, 249, 39, -415, + 252, 207, -415, -415, -415, -415, -415, -415, 461, -415, + 284, -415, -415, 259, -33, 32, -415, 20, -415, 381, + 17, 385, 265, 388, 39, 39, 310, -415, 301, 231, + 391, 307, 398, 398, 358, 401, 39, 39, -415, 238, + 230, -415, 240, 402, 397, 246, 247, -415, -415, -415, + -33, 305, 294, -33, 43, -415, -415, -415, -415, -415, + -415, -415, -415, 254, 255, -415, -415, -415, -415, -415, + -415, -415, -415, -415, 376, -415, 302, -46, 231, 257, + -415, 398, 428, 227, 285, -36, -415, 396, 326, -415, + 326, -415, -415, -415, -415, -415, -415, -415, 435, -415, + -415, 257, -415, -415, 363, -415, -415, 32, -415, -415, + 257, 363, 257, 79, -415, -415, 17, -415, 39, 438, + 331, 159, 319, 120, 277, 280, 281, 202, 268, 286, + 303, -415, 253, -51, 330, -415, -415, -415, -415, -415, + -415, -415, -415, -415, -415, -415, -415, -415, -415, -415, + -415, 352, -415, -100, 287, -415, 257, 391, -415, 249, + 404, -415, -415, 288, -60, -415, 360, 289, -415, 37, + 43, -33, 296, -415, 80, 43, -51, 405, 56, -415, + 299, 364, -415, 688, 353, 304, -16, -415, -415, -415, + 331, 16, 13, 416, 188, 257, 257, 104, 99, 317, + 303, 529, 257, 116, 306, -69, 257, 257, 303, -415, + 303, -41, 327, 163, 303, 303, 303, 303, 303, 303, + 303, 303, 303, 303, 303, 303, 303, 303, 303, 402, + 39, -415, 474, 17, -51, -415, 15, 367, 17, -415, + 435, 12, 310, -415, 257, -415, 493, -415, -415, -415, + -415, 257, -415, -415, -415, -415, 257, 257, 428, 398, + -415, 468, -415, 332, 335, -415, -415, 336, -415, -415, + -415, -415, 337, -415, 71, 338, 428, -415, 159, -415, + -415, 257, -415, -415, 339, -415, -415, -415, -415, -415, + -415, 413, 113, 161, 154, 257, 257, -415, 416, 408, + 60, -415, -415, -415, 395, 476, 548, 303, 344, 253, + -415, 411, 354, 548, 548, 548, 548, 587, 587, 587, + 587, 116, 116, 90, 90, 90, -90, 351, -415, -415, + -4, 349, -415, -415, 149, -415, 331, -415, -5, -415, + 356, -415, 33, -415, 451, -415, -415, -415, -51, -51, + 150, -415, 361, 519, -415, 524, 526, 527, -415, 415, + -415, -415, 433, 71, -415, 428, 162, -415, 175, -415, + 257, 688, 257, 257, -415, 138, 209, 369, -415, 303, + 548, 253, 371, 180, -415, -415, -415, -415, 372, 443, + -415, -415, -415, 467, 469, 473, 454, 12, 550, -415, + -415, -415, 429, -415, -415, 549, 186, 389, 390, 394, + -415, -415, -415, 187, -415, -415, 57, 399, -51, 151, + -415, 257, -415, 529, 400, 195, -415, -415, 33, 12, + -415, -415, -415, 12, 444, 392, 257, 407, -415, 557, + -415, -415, -415, -415, -415, -415, -415, -51, -415, -415, + -415, -415, 24, 428, -13, -415, 409, 403, 257, 196, + 257, -415, -415, 15, -51, -415, -415, -51, 410, -415 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -1039,79 +1038,78 @@ static const yytype_int16 yydefact[] = 233, 234, 239, 0, 150, 152, 227, 228, 229, 236, 230, 231, 32, 31, 0, 252, 0, 0, 97, 0, 92, 0, 0, 0, 0, 127, 99, 0, 40, 38, - 40, 89, 254, 0, 85, 86, 268, 267, 0, 140, + 40, 89, 254, 88, 85, 86, 268, 267, 0, 140, 120, 0, 110, 109, 133, 106, 105, 107, 117, 113, 0, 133, 0, 0, 111, 34, 0, 50, 0, 0, 264, 0, 0, 223, 0, 0, 0, 0, 0, 0, 0, 225, 0, 126, 155, 162, 163, 164, 157, 159, 165, 158, 178, 166, 167, 168, 169, 161, 156, 171, 172, 0, 285, 0, 0, 95, 0, 0, 98, 90, - 0, 36, 41, 0, 24, 0, 22, 124, 122, 148, - 262, 147, 0, 132, 134, 139, 147, 143, 145, 142, - 153, 0, 0, 47, 0, 0, 0, 0, 52, 54, - 55, 264, 121, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 174, 0, 173, 0, 0, 0, 0, 0, - 175, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 36, 41, 24, 0, 22, 124, 122, 148, 262, + 147, 0, 132, 134, 139, 147, 143, 145, 142, 153, + 0, 0, 47, 0, 0, 0, 0, 52, 54, 55, + 264, 121, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 174, 0, 173, 0, 0, 0, 0, 0, 175, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 96, 0, 0, 101, 100, 0, 0, 88, - 0, 20, 0, 0, 127, 123, 0, 260, 0, 261, - 154, 104, 108, 0, 138, 137, 136, 112, 0, 0, - 0, 0, 58, 0, 63, 75, 0, 62, 60, 0, - 70, 69, 59, 67, 72, 57, 78, 0, 0, 46, - 0, 49, 210, 0, 224, 226, 0, 214, 215, 216, - 217, 218, 219, 0, 0, 0, 0, 0, 0, 197, - 0, 0, 0, 170, 160, 189, 190, 0, 185, 0, - 0, 0, 176, 0, 188, 187, 203, 204, 205, 206, - 207, 208, 209, 180, 179, 182, 181, 183, 184, 0, - 35, 286, 0, 223, 91, 39, 0, 23, 264, 125, - 240, 242, 0, 244, 258, 243, 129, 149, 259, 135, - 146, 144, 0, 45, 0, 0, 61, 0, 0, 0, - 68, 0, 80, 81, 0, 56, 76, 0, 0, 53, - 0, 201, 0, 0, 0, 0, 195, 0, 0, 0, - 220, 0, 186, 0, 0, 0, 177, 221, 94, 25, - 0, 0, 280, 272, 278, 276, 279, 274, 0, 0, - 0, 257, 248, 255, 0, 119, 48, 0, 0, 0, - 0, 0, 79, 82, 77, 0, 84, 211, 0, 0, - 199, 0, 198, 0, 202, 222, 0, 0, 193, 191, - 258, 0, 275, 277, 273, 0, 241, 259, 0, 0, - 74, 0, 64, 66, 71, 83, 212, 213, 196, 200, - 194, 192, 245, 269, 281, 0, 131, 65, 0, 0, - 0, 0, 0, 128, 73, 0, 282, 270, 256, 130, - 0, 271 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 96, 0, 0, 101, 100, 0, 0, 0, 20, + 0, 0, 127, 123, 0, 260, 0, 261, 154, 104, + 108, 0, 138, 137, 136, 112, 0, 0, 0, 0, + 58, 0, 63, 75, 0, 62, 60, 0, 70, 69, + 59, 67, 72, 57, 78, 0, 0, 46, 0, 49, + 210, 0, 224, 226, 0, 214, 215, 216, 217, 218, + 219, 0, 0, 0, 0, 0, 0, 197, 0, 0, + 0, 170, 160, 189, 190, 0, 185, 0, 0, 0, + 176, 0, 188, 187, 203, 204, 205, 206, 207, 208, + 209, 180, 179, 182, 181, 183, 184, 0, 35, 286, + 0, 223, 91, 39, 0, 23, 264, 125, 240, 242, + 0, 244, 258, 243, 129, 149, 259, 135, 146, 144, + 0, 45, 0, 0, 61, 0, 0, 0, 68, 0, + 80, 81, 0, 56, 76, 0, 0, 53, 0, 201, + 0, 0, 0, 0, 195, 0, 0, 0, 220, 0, + 186, 0, 0, 0, 177, 221, 94, 25, 0, 0, + 280, 272, 278, 276, 279, 274, 0, 0, 0, 257, + 248, 255, 0, 119, 48, 0, 0, 0, 0, 0, + 79, 82, 77, 0, 84, 211, 0, 0, 199, 0, + 198, 0, 202, 222, 0, 0, 193, 191, 258, 0, + 275, 277, 273, 0, 241, 259, 0, 0, 74, 0, + 64, 66, 71, 83, 212, 213, 196, 200, 194, 192, + 245, 269, 281, 0, 131, 65, 0, 0, 0, 0, + 0, 128, 73, 0, 282, 270, 256, 130, 0, 271 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -409, -409, -409, 492, -409, 540, -409, 263, -409, 323, - -409, -409, -409, -409, 268, -83, 417, -409, -409, -409, - 145, -409, 230, -409, 144, -409, -409, -409, 162, -409, - -409, -36, -409, -409, -409, -409, 451, -409, -409, 380, - -171, -96, -409, 23, -73, -47, -409, -409, -75, 343, - -409, -409, -409, -131, -409, -409, 115, -409, 278, -409, - -409, 92, -261, -409, -133, 293, -139, -138, -409, -409, - -409, -409, -409, -409, 338, -409, -409, -409, -409, -409, - -409, -409, -409, -409, -293, -77, -86, -409, -409, -91, - -409, -409, -409, -408, 107, -409, -409, -409, 6, -409, - -409, -409, 111, 372, -409, -409, -409, -409, 503, -409, - -409, -409, -409, -315 + -415, -415, -415, 488, -415, 540, -415, 269, -415, 224, + -415, -415, -415, -415, 276, -85, 430, -415, -415, -415, + 292, -415, 241, -415, 152, -415, -415, -415, 142, -415, + -415, -43, -415, -415, -415, -415, 446, -415, -415, 368, + -176, -75, -415, 14, -73, -38, -415, -415, -78, 340, + -415, -415, -415, -119, -415, -415, 29, -415, 270, -415, + -415, -32, -260, -415, 38, 282, -139, -138, -415, -415, + -415, -415, -415, -415, 341, -415, -415, -415, -415, -415, + -415, -415, -415, -415, -293, -70, -87, -415, -415, -92, + -415, -415, -415, -414, 98, -415, -415, -415, 7, -415, + -415, -415, 100, 365, -415, -415, -415, -415, 489, -415, + -415, -415, -415, -311 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - 0, 19, 20, 21, 22, 71, 225, 226, 23, 64, + 0, 19, 20, 21, 22, 71, 224, 225, 23, 64, 24, 133, 25, 26, 88, 148, 221, 27, 28, 29, - 83, 247, 248, 249, 336, 420, 416, 425, 426, 250, + 83, 246, 247, 248, 334, 418, 414, 423, 424, 249, 30, 95, 31, 32, 33, 34, 143, 35, 145, 146, 36, 164, 165, 166, 76, 110, 111, 169, 77, 161, - 227, 304, 305, 140, 465, 523, 114, 233, 234, 316, - 104, 174, 228, 123, 124, 229, 230, 194, 195, 196, - 197, 198, 199, 200, 259, 201, 202, 203, 204, 205, - 353, 206, 207, 208, 209, 210, 126, 127, 128, 129, - 130, 131, 399, 400, 401, 402, 403, 51, 404, 136, - 153, 461, 462, 463, 310, 37, 38, 61, 62, 405, - 458, 527, 69, 213 + 226, 302, 303, 140, 463, 521, 114, 232, 233, 314, + 104, 174, 227, 123, 124, 228, 229, 194, 195, 196, + 197, 198, 199, 200, 258, 201, 202, 203, 204, 205, + 351, 206, 207, 208, 209, 210, 126, 127, 128, 129, + 130, 131, 397, 398, 399, 400, 401, 51, 402, 136, + 153, 459, 460, 461, 308, 37, 38, 61, 62, 403, + 456, 525, 69, 213 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1119,174 +1117,172 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 193, 106, 362, 125, 394, 412, 149, 149, 41, 243, - 150, 44, 159, 40, 218, 344, 52, 171, 54, 393, - 96, 97, 73, 428, 39, 116, 117, 118, 421, 160, - 113, 235, 451, 237, 239, 167, 139, 107, 167, 307, - 451, 522, 369, 244, 92, 275, 357, 307, 258, 58, - 262, 496, 264, 266, 86, 149, 89, 45, 211, 91, - 75, 422, 267, 107, 98, 358, 46, 245, 40, 370, - 215, 359, 108, 452, 289, 42, 290, 295, 453, 268, - 341, 452, 430, 93, 454, 455, 453, 514, 73, 59, - 137, 138, 454, 455, 214, 179, 47, 105, 108, 240, - 246, 456, 154, 155, 423, -281, 457, 43, 109, 456, - 445, 319, 475, -281, 457, 48, 364, 354, 355, 265, - 232, 424, 156, 262, 119, 217, 180, 49, 365, 366, - 112, 367, 74, 368, 109, 50, 312, 374, 375, 376, - 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, - 387, 388, 183, 116, 117, 118, 53, 167, 267, 275, - 460, 392, 306, 120, 121, 270, 67, 396, 308, 181, - 267, 267, 345, 406, 235, 268, 191, 398, -246, 410, - 411, 346, 487, 297, 241, 342, -247, 268, 268, 55, - 290, 84, 85, 122, 184, 185, 186, 434, 56, 389, - 521, 435, 60, 63, 267, 267, 483, 183, 116, 117, - 118, 292, 68, 267, 293, 433, 275, 125, 437, 438, - 358, 268, 268, 125, 506, 70, 436, 450, 57, 299, - 268, 442, 530, 187, 78, 149, 172, 516, 413, 267, - 274, 482, 286, 287, 288, 289, 275, 290, 267, 184, - 185, 186, 119, 252, 173, 253, 268, 183, 116, 117, - 118, 372, 238, -284, -284, 268, 79, -284, -284, 188, - 284, 285, 286, 287, 288, 289, 80, 290, 373, 231, - 314, 257, 189, 81, 440, 267, 236, 439, 187, 306, - 82, 120, 121, 478, 87, 480, 481, 390, 444, 184, - 185, 186, 268, 485, 94, 267, 315, 119, 190, 191, - 267, 73, 508, 99, 257, 90, 192, 183, 116, 117, - 118, 122, 268, 311, 188, 322, 100, 268, 317, 102, - 323, 301, 324, 325, 302, 326, 339, 189, 187, 340, - 65, 66, 448, 327, 509, 176, 120, 121, 183, 116, - 117, 118, 449, 466, 115, 176, 293, 119, 103, 184, - 185, 186, 476, 190, 191, 293, 132, 134, 135, 328, - 486, 192, 139, 141, 188, 477, 122, 489, 306, 500, - 306, 526, 501, 529, 142, 144, 329, 189, 330, 331, - 260, 185, 186, 147, 116, 151, 120, 121, 187, 183, - 116, 117, 118, 332, 152, 74, 158, 333, 451, 334, - 118, 160, 505, 190, 191, 293, 162, 119, 163, 335, - 511, 192, 168, 306, 528, 170, 122, 293, 175, 187, - 176, 177, 178, 212, 188, 216, 219, 220, 223, 224, - 269, 242, 185, 186, 112, 15, 251, 189, 119, 452, - 254, 255, 256, 263, 453, 291, 120, 121, 298, 294, - 454, 455, 300, 303, 519, 261, 347, 348, 349, 350, - 351, 352, 318, 190, 191, 306, 270, 456, 189, 321, - 187, 192, 457, 313, 320, 337, 122, 120, 121, 73, - 391, 338, 360, 408, 414, 363, 371, 369, 415, 119, - 417, 432, 418, 419, 190, 191, 427, 267, 431, 443, - 446, 290, 192, 520, 447, 459, 261, 122, 253, 464, - 467, 468, 469, 271, 470, 471, 491, 473, 472, 189, - 492, 484, 488, 493, 494, 490, 497, 495, 120, 121, - 498, 499, 502, 272, 503, 504, 507, 510, 515, 518, - 273, 274, 517, 524, -283, 190, 191, 275, 276, 525, - 101, 1, 531, 192, 72, 397, 395, 222, 122, 2, - 429, 277, 278, 279, 280, 281, 3, 479, 282, 283, - 4, 284, 285, 286, 287, 288, 289, 474, 290, 182, - 5, 409, 1, 6, 7, 343, 356, 296, 513, 407, - 2, 512, 309, 157, 0, 8, 9, 3, 0, 0, - 0, 4, 0, 270, 0, 0, 10, 0, 0, 11, - 0, 5, 0, 0, 6, 7, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 8, 9, 0, 0, - 12, 0, 0, 0, 13, 0, 0, 10, 0, 0, - 11, 0, 0, 0, 0, 0, 0, 0, 0, 14, - 271, 0, 0, 0, 0, 15, 270, 0, 0, 0, - 0, 12, 0, 0, 441, 13, 0, 0, 0, 0, - 361, 0, 0, 0, 0, 0, 0, 0, 274, 0, - 14, 0, 0, 0, 275, 276, 15, 0, 0, 16, - 17, 18, 270, 0, 0, 0, 0, 0, 277, 278, - 279, 280, 281, 271, 0, 282, 283, 0, 284, 285, - 286, 287, 288, 289, 0, 290, 0, 0, 0, 0, - 16, 17, 18, 361, 0, 0, 0, 0, 0, 0, - 0, 274, 0, 0, 0, 0, 0, 275, 276, -284, + 193, 106, 360, 392, 242, 149, 149, 410, 150, 41, + 125, 159, 44, 96, 97, 40, 342, 52, 391, 54, + 449, 116, 117, 118, 73, 426, 218, 58, 160, 107, + 92, 234, 167, 236, 238, 167, 305, 520, 171, 113, + 305, 107, 40, 494, 274, 266, 139, 179, 257, 449, + 261, 75, 263, 265, 149, 86, 211, 89, 42, 367, + 91, 450, 267, 266, 108, 98, 451, 59, 291, 93, + 215, 292, 452, 453, 339, 289, 108, 294, 180, 512, + 267, 428, 183, 116, 117, 118, 368, 39, 105, 454, + 450, 137, 138, -281, 455, 451, 112, 172, 419, 362, + 109, 452, 453, 154, 155, 517, 239, 50, 299, 443, + 317, 300, 109, 156, 473, 173, 352, 353, 454, 264, + 119, 181, 261, 455, 184, 185, 186, 363, 364, 231, + 365, 420, 366, 43, 74, 217, 372, 373, 374, 375, + 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, + 386, 266, 337, 167, 518, 338, 310, 458, 304, 120, + 121, 306, 243, 187, 446, 48, -246, 176, 267, 312, + 266, 266, 234, 343, 421, 191, 296, 408, 409, 396, + 344, 485, 119, 404, 340, 240, 244, 267, 267, 122, + 355, 422, 237, 230, 266, 313, 49, 387, 309, 188, + 235, 45, 519, 315, 55, 183, 116, 117, 118, 356, + 46, 267, 189, 56, 256, 357, 435, 436, 266, 245, + 448, 120, 121, 125, 274, 504, 438, 266, 125, 440, + 528, 304, 149, 60, 411, 267, 514, 431, 190, 191, + 47, 65, 66, 57, 267, 433, 192, 184, 185, 186, + 274, 122, 266, 288, 480, 289, 183, 116, 117, 118, + 183, 116, 117, 118, 356, 266, 370, 506, 432, 267, + 434, 183, 116, 117, 118, 266, 285, 286, 287, 288, + 53, 289, 267, 371, 73, 437, 187, 251, 63, 252, + 214, 476, 267, 478, 479, 67, 442, 388, 184, 185, + 186, 483, 184, 185, 186, 119, 183, 116, 117, 118, + 73, 68, 256, 259, 185, 186, 481, 447, 464, 70, + 176, 292, 188, 266, 345, 346, 347, 348, 349, 350, + 474, 390, 78, 292, 79, 189, 394, 187, 84, 85, + 267, 187, 507, 475, 120, 121, 304, 268, 487, 185, + 186, 304, 187, 81, 498, 503, 119, 499, 292, 80, + 119, 190, 191, 509, 526, 82, 304, 292, 484, 192, + 87, 119, 90, 188, 122, 94, 99, 188, 100, 524, + 102, 527, 103, 269, 115, 134, 189, 187, 260, 132, + 189, 135, 139, 141, 144, 120, 121, 147, 142, 120, + 121, 189, 116, 151, 152, 74, 119, 158, 118, 160, + 120, 121, 190, 191, 162, 163, 190, 191, 168, 170, + 192, 177, 175, 260, 192, 122, 176, 190, 191, 122, + 270, 212, 178, 216, 219, 192, 189, 220, 223, 112, + 122, 241, 15, 250, 253, 120, 121, 254, 255, 290, + 271, 262, 297, 301, 293, 298, 319, 272, 273, 316, + 304, -283, 190, 191, 274, 275, 318, 311, 1, 449, + 192, 336, 335, 73, 361, 122, 2, 389, 276, 277, + 278, 279, 280, 3, 358, 281, 282, 4, 283, 284, + 285, 286, 287, 288, 369, 289, 406, 5, 412, 413, + 6, 7, 415, 416, 417, 425, 430, 429, 367, 266, + 450, 441, 8, 9, 444, 451, 1, 445, 252, 289, + 462, 452, 453, 10, 2, 466, 11, 457, 465, 269, + 467, 3, 468, 469, 470, 4, 471, 482, 454, 486, + 488, 489, -281, 455, 490, 5, 491, 12, 6, 7, + 492, 13, 493, 495, 496, 497, 101, 500, 501, 513, + 8, 9, 502, 516, 72, 472, 14, 505, 508, 395, + 523, 10, 15, 393, 11, 515, 270, 522, 529, 427, + 222, 407, 269, 477, 182, 295, 405, 511, 510, 157, + 439, 341, 0, 0, 307, 12, 359, 0, 354, 13, + 0, 269, 0, 0, 273, 0, 16, 17, 18, 0, + 274, 275, 0, 0, 14, -247, 0, 0, 0, 0, + 15, 0, 0, 0, 276, 277, 278, 279, 280, 270, + 0, 281, 282, 0, 283, 284, 285, 286, 287, 288, + 269, 289, 0, 0, 0, 0, 0, 0, -284, 359, + 0, 0, 0, 0, 16, 17, 18, 273, 0, 0, + 0, 0, 0, 274, 275, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 273, 276, 277, 278, + 279, 280, 274, -284, 281, 282, 0, 283, 284, 285, + 286, 287, 288, 0, 289, 0, -284, -284, -284, 279, + 280, 0, 0, 281, 282, 0, 283, 284, 285, 286, + 287, 288, 320, 289, 0, 273, 0, 321, 0, 322, + 323, 274, 324, 0, 0, 0, 0, 0, 0, 0, + 325, 0, 0, 0, 0, 0, 0, 0, -284, -284, + 0, 0, -284, -284, 0, 283, 284, 285, 286, 287, + 288, 0, 289, 0, 0, 0, 326, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 327, 0, 328, 329, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 277, 278, 279, 280, 281, 0, 0, 282, 283, - 0, 284, 285, 286, 287, 288, 289, 274, 290, 0, - 0, 0, 0, 275, -284, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, -284, -284, -284, - 280, 281, 0, 0, 282, 283, 0, 284, 285, 286, - 287, 288, 289, 0, 290 + 330, 0, 0, 0, 331, 0, 332, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 333 }; static const yytype_int16 yycheck[] = { - 139, 74, 263, 80, 297, 320, 92, 93, 2, 180, - 93, 5, 103, 3, 145, 3, 10, 113, 12, 3, - 56, 57, 57, 338, 26, 4, 5, 6, 27, 12, - 77, 170, 25, 172, 173, 110, 82, 9, 113, 3, - 25, 50, 100, 3, 93, 134, 91, 3, 187, 19, - 188, 459, 190, 192, 48, 141, 50, 70, 141, 53, - 37, 60, 114, 9, 58, 110, 79, 27, 3, 127, - 143, 116, 44, 66, 163, 3, 165, 216, 71, 131, - 251, 66, 343, 132, 77, 78, 71, 495, 57, 59, - 84, 85, 77, 78, 63, 93, 109, 74, 44, 176, - 60, 94, 96, 97, 103, 98, 99, 3, 80, 94, - 371, 54, 427, 98, 99, 93, 168, 256, 257, 192, - 167, 120, 99, 261, 103, 171, 124, 93, 267, 268, - 76, 269, 167, 271, 80, 97, 232, 275, 276, 277, + 139, 74, 262, 296, 180, 92, 93, 318, 93, 2, + 80, 103, 5, 56, 57, 3, 3, 10, 3, 12, + 25, 4, 5, 6, 57, 336, 145, 19, 12, 9, + 93, 170, 110, 172, 173, 113, 3, 50, 113, 77, + 3, 9, 3, 457, 134, 114, 82, 93, 187, 25, + 188, 37, 190, 192, 141, 48, 141, 50, 3, 100, + 53, 66, 131, 114, 44, 58, 71, 59, 168, 132, + 143, 171, 77, 78, 250, 165, 44, 216, 124, 493, + 131, 341, 3, 4, 5, 6, 127, 26, 74, 94, + 66, 84, 85, 98, 99, 71, 76, 54, 27, 168, + 80, 77, 78, 96, 97, 81, 176, 97, 168, 369, + 54, 171, 80, 99, 425, 72, 255, 256, 94, 192, + 103, 167, 260, 99, 45, 46, 47, 266, 267, 167, + 268, 60, 270, 3, 167, 171, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, - 288, 289, 3, 4, 5, 6, 79, 232, 114, 134, - 124, 294, 171, 142, 143, 53, 0, 300, 124, 167, - 114, 114, 160, 304, 313, 131, 160, 167, 171, 318, - 319, 254, 443, 219, 178, 168, 171, 131, 131, 70, - 165, 46, 47, 172, 45, 46, 47, 107, 79, 290, - 515, 91, 3, 144, 114, 114, 107, 3, 4, 5, - 6, 168, 170, 114, 171, 124, 134, 294, 357, 358, - 110, 131, 131, 300, 168, 111, 116, 398, 109, 223, - 131, 369, 525, 84, 3, 321, 54, 498, 321, 114, - 128, 116, 160, 161, 162, 163, 134, 165, 114, 45, - 46, 47, 103, 167, 72, 169, 131, 3, 4, 5, - 6, 103, 113, 151, 152, 131, 169, 155, 156, 120, - 158, 159, 160, 161, 162, 163, 167, 165, 120, 164, - 89, 110, 133, 93, 166, 114, 171, 360, 84, 171, - 126, 142, 143, 432, 3, 434, 435, 291, 371, 45, - 46, 47, 131, 441, 126, 114, 115, 103, 159, 160, - 114, 57, 116, 124, 110, 122, 167, 3, 4, 5, - 6, 172, 131, 231, 120, 24, 171, 131, 236, 96, - 29, 168, 31, 32, 171, 34, 168, 133, 84, 171, - 17, 18, 168, 42, 483, 171, 142, 143, 3, 4, - 5, 6, 168, 168, 3, 171, 171, 103, 123, 45, - 46, 47, 168, 159, 160, 171, 4, 120, 3, 68, - 443, 167, 82, 92, 120, 168, 172, 168, 171, 168, - 171, 520, 171, 522, 167, 3, 85, 133, 87, 88, - 45, 46, 47, 90, 4, 45, 142, 143, 84, 3, - 4, 5, 6, 102, 3, 167, 167, 106, 25, 108, - 6, 12, 168, 159, 160, 171, 168, 103, 168, 118, - 168, 167, 113, 171, 168, 125, 172, 171, 168, 84, - 171, 45, 130, 3, 120, 148, 38, 111, 130, 3, - 17, 3, 46, 47, 76, 111, 124, 133, 103, 66, - 167, 167, 167, 165, 71, 97, 142, 143, 48, 167, - 77, 78, 167, 93, 81, 120, 136, 137, 138, 139, - 140, 141, 54, 159, 160, 171, 53, 94, 133, 92, - 84, 167, 99, 171, 167, 119, 172, 142, 143, 57, - 3, 167, 167, 3, 30, 168, 167, 100, 167, 103, - 167, 93, 167, 167, 159, 160, 167, 114, 168, 167, - 103, 165, 167, 130, 166, 171, 120, 172, 169, 69, - 167, 6, 6, 100, 6, 6, 98, 103, 119, 133, - 77, 168, 168, 77, 77, 168, 3, 98, 142, 143, - 125, 6, 168, 120, 168, 168, 168, 168, 167, 6, - 127, 128, 168, 168, 0, 159, 160, 134, 135, 167, - 68, 7, 168, 167, 24, 302, 298, 150, 172, 15, - 340, 148, 149, 150, 151, 152, 22, 433, 155, 156, - 26, 158, 159, 160, 161, 162, 163, 425, 165, 138, - 36, 313, 7, 39, 40, 252, 258, 217, 491, 306, - 15, 490, 230, 100, -1, 51, 52, 22, -1, -1, - -1, 26, -1, 53, -1, -1, 62, -1, -1, 65, - -1, 36, -1, -1, 39, 40, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 51, 52, -1, -1, - 86, -1, -1, -1, 90, -1, -1, 62, -1, -1, - 65, -1, -1, -1, -1, -1, -1, -1, -1, 105, - 100, -1, -1, -1, -1, 111, 53, -1, -1, -1, - -1, 86, -1, -1, 114, 90, -1, -1, -1, -1, - 120, -1, -1, -1, -1, -1, -1, -1, 128, -1, - 105, -1, -1, -1, 134, 135, 111, -1, -1, 145, - 146, 147, 53, -1, -1, -1, -1, -1, 148, 149, - 150, 151, 152, 100, -1, 155, 156, -1, 158, 159, - 160, 161, 162, 163, -1, 165, -1, -1, -1, -1, - 145, 146, 147, 120, -1, -1, -1, -1, -1, -1, - -1, 128, -1, -1, -1, -1, -1, 134, 135, 100, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 148, 149, 150, 151, 152, -1, -1, 155, 156, - -1, 158, 159, 160, 161, 162, 163, 128, 165, -1, + 288, 114, 168, 231, 130, 171, 231, 124, 171, 142, + 143, 124, 3, 84, 168, 93, 171, 171, 131, 89, + 114, 114, 311, 160, 103, 160, 219, 316, 317, 167, + 253, 441, 103, 302, 168, 178, 27, 131, 131, 172, + 91, 120, 113, 164, 114, 115, 93, 289, 230, 120, + 171, 70, 513, 235, 70, 3, 4, 5, 6, 110, + 79, 131, 133, 79, 110, 116, 355, 356, 114, 60, + 396, 142, 143, 293, 134, 168, 166, 114, 298, 367, + 523, 171, 319, 3, 319, 131, 496, 124, 159, 160, + 109, 17, 18, 109, 131, 91, 167, 45, 46, 47, + 134, 172, 114, 163, 116, 165, 3, 4, 5, 6, + 3, 4, 5, 6, 110, 114, 103, 116, 107, 131, + 116, 3, 4, 5, 6, 114, 160, 161, 162, 163, + 79, 165, 131, 120, 57, 358, 84, 167, 144, 169, + 63, 430, 131, 432, 433, 0, 369, 290, 45, 46, + 47, 439, 45, 46, 47, 103, 3, 4, 5, 6, + 57, 170, 110, 45, 46, 47, 107, 168, 168, 111, + 171, 171, 120, 114, 136, 137, 138, 139, 140, 141, + 168, 293, 3, 171, 169, 133, 298, 84, 46, 47, + 131, 84, 481, 168, 142, 143, 171, 17, 168, 46, + 47, 171, 84, 93, 168, 168, 103, 171, 171, 167, + 103, 159, 160, 168, 168, 126, 171, 171, 441, 167, + 3, 103, 122, 120, 172, 126, 124, 120, 171, 518, + 96, 520, 123, 53, 3, 120, 133, 84, 120, 4, + 133, 3, 82, 92, 3, 142, 143, 90, 167, 142, + 143, 133, 4, 45, 3, 167, 103, 167, 6, 12, + 142, 143, 159, 160, 168, 168, 159, 160, 113, 125, + 167, 45, 168, 120, 167, 172, 171, 159, 160, 172, + 100, 3, 130, 148, 38, 167, 133, 111, 3, 76, + 172, 3, 111, 124, 167, 142, 143, 167, 167, 97, + 120, 165, 48, 93, 167, 167, 92, 127, 128, 54, + 171, 0, 159, 160, 134, 135, 167, 171, 7, 25, + 167, 167, 119, 57, 168, 172, 15, 3, 148, 149, + 150, 151, 152, 22, 167, 155, 156, 26, 158, 159, + 160, 161, 162, 163, 167, 165, 3, 36, 30, 167, + 39, 40, 167, 167, 167, 167, 93, 168, 100, 114, + 66, 167, 51, 52, 103, 71, 7, 166, 169, 165, + 69, 77, 78, 62, 15, 6, 65, 171, 167, 53, + 6, 22, 6, 6, 119, 26, 103, 168, 94, 168, + 168, 98, 98, 99, 77, 36, 77, 86, 39, 40, + 77, 90, 98, 3, 125, 6, 68, 168, 168, 167, + 51, 52, 168, 6, 24, 423, 105, 168, 168, 300, + 167, 62, 111, 297, 65, 168, 100, 168, 168, 338, + 150, 311, 53, 431, 138, 217, 304, 489, 488, 100, + 114, 251, -1, -1, 229, 86, 120, -1, 257, 90, + -1, 53, -1, -1, 128, -1, 145, 146, 147, -1, + 134, 135, -1, -1, 105, 171, -1, -1, -1, -1, + 111, -1, -1, -1, 148, 149, 150, 151, 152, 100, + -1, 155, 156, -1, 158, 159, 160, 161, 162, 163, + 53, 165, -1, -1, -1, -1, -1, -1, 100, 120, + -1, -1, -1, -1, 145, 146, 147, 128, -1, -1, -1, -1, -1, 134, 135, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 148, 149, 150, - 151, 152, -1, -1, 155, 156, -1, 158, 159, 160, - 161, 162, 163, -1, 165 + -1, -1, -1, -1, -1, -1, 128, 148, 149, 150, + 151, 152, 134, 135, 155, 156, -1, 158, 159, 160, + 161, 162, 163, -1, 165, -1, 148, 149, 150, 151, + 152, -1, -1, 155, 156, -1, 158, 159, 160, 161, + 162, 163, 24, 165, -1, 128, -1, 29, -1, 31, + 32, 134, 34, -1, -1, -1, -1, -1, -1, -1, + 42, -1, -1, -1, -1, -1, -1, -1, 151, 152, + -1, -1, 155, 156, -1, 158, 159, 160, 161, 162, + 163, -1, 165, -1, -1, -1, 68, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 85, -1, 87, 88, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 102, -1, -1, -1, 106, -1, 108, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 118 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1315,38 +1311,37 @@ static const yytype_int16 yystos[] = 159, 160, 167, 239, 240, 241, 242, 243, 244, 245, 246, 248, 249, 250, 251, 252, 254, 255, 256, 257, 258, 188, 3, 286, 63, 217, 148, 171, 226, 38, - 111, 189, 189, 130, 3, 179, 180, 223, 235, 238, - 239, 229, 218, 230, 231, 239, 229, 239, 113, 239, - 258, 271, 3, 213, 3, 27, 60, 194, 195, 196, - 202, 124, 167, 169, 167, 167, 167, 110, 239, 247, - 45, 120, 240, 165, 240, 217, 239, 114, 131, 17, - 53, 100, 120, 127, 128, 134, 135, 148, 149, 150, - 151, 152, 155, 156, 158, 159, 160, 161, 162, 163, - 165, 97, 168, 171, 167, 239, 212, 204, 48, 271, - 167, 168, 171, 93, 224, 225, 171, 3, 124, 276, - 277, 234, 214, 171, 89, 115, 232, 234, 54, 54, - 167, 92, 24, 29, 31, 32, 34, 42, 68, 85, - 87, 88, 102, 106, 108, 118, 197, 119, 167, 168, - 171, 213, 168, 222, 3, 160, 217, 136, 137, 138, - 139, 140, 141, 253, 239, 239, 247, 91, 110, 116, - 167, 120, 235, 168, 168, 239, 239, 240, 240, 100, - 127, 167, 103, 120, 240, 240, 240, 240, 240, 240, - 240, 240, 240, 240, 240, 240, 240, 240, 240, 262, - 271, 3, 237, 3, 257, 187, 237, 180, 167, 265, - 266, 267, 268, 269, 271, 282, 226, 238, 3, 231, - 239, 239, 286, 188, 30, 167, 199, 167, 167, 167, - 198, 27, 60, 103, 120, 200, 201, 167, 286, 195, - 235, 168, 93, 124, 107, 91, 116, 239, 239, 217, - 166, 114, 240, 167, 217, 235, 103, 166, 168, 168, - 213, 25, 66, 71, 77, 78, 94, 99, 283, 171, - 124, 274, 275, 276, 69, 227, 168, 167, 6, 6, - 6, 6, 119, 103, 201, 286, 168, 168, 239, 197, - 239, 239, 116, 107, 168, 240, 217, 235, 168, 168, - 168, 98, 77, 77, 77, 98, 266, 3, 125, 6, - 168, 171, 168, 168, 168, 168, 168, 168, 116, 239, - 168, 168, 275, 267, 266, 167, 235, 168, 6, 81, - 130, 286, 50, 228, 168, 167, 239, 284, 168, 239, - 257, 168 + 111, 189, 189, 3, 179, 180, 223, 235, 238, 239, + 229, 218, 230, 231, 239, 229, 239, 113, 239, 258, + 271, 3, 213, 3, 27, 60, 194, 195, 196, 202, + 124, 167, 169, 167, 167, 167, 110, 239, 247, 45, + 120, 240, 165, 240, 217, 239, 114, 131, 17, 53, + 100, 120, 127, 128, 134, 135, 148, 149, 150, 151, + 152, 155, 156, 158, 159, 160, 161, 162, 163, 165, + 97, 168, 171, 167, 239, 212, 204, 48, 167, 168, + 171, 93, 224, 225, 171, 3, 124, 276, 277, 234, + 214, 171, 89, 115, 232, 234, 54, 54, 167, 92, + 24, 29, 31, 32, 34, 42, 68, 85, 87, 88, + 102, 106, 108, 118, 197, 119, 167, 168, 171, 213, + 168, 222, 3, 160, 217, 136, 137, 138, 139, 140, + 141, 253, 239, 239, 247, 91, 110, 116, 167, 120, + 235, 168, 168, 239, 239, 240, 240, 100, 127, 167, + 103, 120, 240, 240, 240, 240, 240, 240, 240, 240, + 240, 240, 240, 240, 240, 240, 240, 262, 271, 3, + 237, 3, 257, 187, 237, 180, 167, 265, 266, 267, + 268, 269, 271, 282, 226, 238, 3, 231, 239, 239, + 286, 188, 30, 167, 199, 167, 167, 167, 198, 27, + 60, 103, 120, 200, 201, 167, 286, 195, 235, 168, + 93, 124, 107, 91, 116, 239, 239, 217, 166, 114, + 240, 167, 217, 235, 103, 166, 168, 168, 213, 25, + 66, 71, 77, 78, 94, 99, 283, 171, 124, 274, + 275, 276, 69, 227, 168, 167, 6, 6, 6, 6, + 119, 103, 201, 286, 168, 168, 239, 197, 239, 239, + 116, 107, 168, 240, 217, 235, 168, 168, 168, 98, + 77, 77, 77, 98, 266, 3, 125, 6, 168, 171, + 168, 168, 168, 168, 168, 168, 116, 239, 168, 168, + 275, 267, 266, 167, 235, 168, 6, 81, 130, 286, + 50, 228, 168, 167, 239, 284, 168, 239, 257, 168 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ @@ -1394,7 +1389,7 @@ static const yytype_int8 yyr2[] = 3, 0, 1, 3, 1, 1, 3, 1, 1, 1, 1, 2, 1, 1, 4, 5, 4, 1, 2, 1, 1, 3, 0, 5, 3, 0, 1, 2, 0, 2, - 1, 1, 2, 5, 4, 4, 4, 3, 6, 2, + 1, 1, 2, 5, 4, 4, 4, 3, 4, 2, 0, 7, 4, 2, 8, 5, 3, 0, 5, 1, 3, 3, 2, 2, 6, 1, 1, 1, 3, 3, 3, 3, 5, 2, 1, 1, 1, 1, 0, 7, @@ -1968,25 +1963,25 @@ yydestruct (const char *yymsg, case YYSYMBOL_IDENTIFIER: /* IDENTIFIER */ #line 155 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1972 "bison_parser.cpp" +#line 1967 "bison_parser.cpp" break; case YYSYMBOL_STRING: /* STRING */ #line 155 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1978 "bison_parser.cpp" +#line 1973 "bison_parser.cpp" break; case YYSYMBOL_FLOATVAL: /* FLOATVAL */ #line 153 "bison_parser.y" { } -#line 1984 "bison_parser.cpp" +#line 1979 "bison_parser.cpp" break; case YYSYMBOL_INTVAL: /* INTVAL */ #line 153 "bison_parser.y" { } -#line 1990 "bison_parser.cpp" +#line 1985 "bison_parser.cpp" break; case YYSYMBOL_statement_list: /* statement_list */ @@ -1999,19 +1994,19 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).stmt_vec)); } -#line 2003 "bison_parser.cpp" +#line 1998 "bison_parser.cpp" break; case YYSYMBOL_statement: /* statement */ #line 164 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 2009 "bison_parser.cpp" +#line 2004 "bison_parser.cpp" break; case YYSYMBOL_preparable_statement: /* preparable_statement */ #line 164 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 2015 "bison_parser.cpp" +#line 2010 "bison_parser.cpp" break; case YYSYMBOL_opt_hints: /* opt_hints */ @@ -2024,7 +2019,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2028 "bison_parser.cpp" +#line 2023 "bison_parser.cpp" break; case YYSYMBOL_hint_list: /* hint_list */ @@ -2037,85 +2032,85 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2041 "bison_parser.cpp" +#line 2036 "bison_parser.cpp" break; case YYSYMBOL_hint: /* hint */ #line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2047 "bison_parser.cpp" +#line 2042 "bison_parser.cpp" break; case YYSYMBOL_transaction_statement: /* transaction_statement */ #line 164 "bison_parser.y" { delete (((*yyvaluep).transaction_stmt)); } -#line 2053 "bison_parser.cpp" +#line 2048 "bison_parser.cpp" break; case YYSYMBOL_prepare_statement: /* prepare_statement */ #line 164 "bison_parser.y" { delete (((*yyvaluep).prep_stmt)); } -#line 2059 "bison_parser.cpp" +#line 2054 "bison_parser.cpp" break; case YYSYMBOL_prepare_target_query: /* prepare_target_query */ #line 155 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2065 "bison_parser.cpp" +#line 2060 "bison_parser.cpp" break; case YYSYMBOL_execute_statement: /* execute_statement */ #line 164 "bison_parser.y" { delete (((*yyvaluep).exec_stmt)); } -#line 2071 "bison_parser.cpp" +#line 2066 "bison_parser.cpp" break; case YYSYMBOL_import_statement: /* import_statement */ #line 164 "bison_parser.y" { delete (((*yyvaluep).import_stmt)); } -#line 2077 "bison_parser.cpp" +#line 2072 "bison_parser.cpp" break; case YYSYMBOL_file_type: /* file_type */ #line 153 "bison_parser.y" { } -#line 2083 "bison_parser.cpp" +#line 2078 "bison_parser.cpp" break; case YYSYMBOL_file_path: /* file_path */ #line 155 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2089 "bison_parser.cpp" +#line 2084 "bison_parser.cpp" break; case YYSYMBOL_opt_file_type: /* opt_file_type */ #line 153 "bison_parser.y" { } -#line 2095 "bison_parser.cpp" +#line 2090 "bison_parser.cpp" break; case YYSYMBOL_export_statement: /* export_statement */ #line 164 "bison_parser.y" { delete (((*yyvaluep).export_stmt)); } -#line 2101 "bison_parser.cpp" +#line 2096 "bison_parser.cpp" break; case YYSYMBOL_show_statement: /* show_statement */ #line 164 "bison_parser.y" { delete (((*yyvaluep).show_stmt)); } -#line 2107 "bison_parser.cpp" +#line 2102 "bison_parser.cpp" break; case YYSYMBOL_create_statement: /* create_statement */ #line 164 "bison_parser.y" { delete (((*yyvaluep).create_stmt)); } -#line 2113 "bison_parser.cpp" +#line 2108 "bison_parser.cpp" break; case YYSYMBOL_opt_not_exists: /* opt_not_exists */ #line 153 "bison_parser.y" { } -#line 2119 "bison_parser.cpp" +#line 2114 "bison_parser.cpp" break; case YYSYMBOL_table_elem_commalist: /* table_elem_commalist */ @@ -2128,91 +2123,91 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).table_element_vec)); } -#line 2132 "bison_parser.cpp" +#line 2127 "bison_parser.cpp" break; case YYSYMBOL_table_elem: /* table_elem */ #line 164 "bison_parser.y" { delete (((*yyvaluep).table_element_t)); } -#line 2138 "bison_parser.cpp" +#line 2133 "bison_parser.cpp" break; case YYSYMBOL_column_def: /* column_def */ #line 164 "bison_parser.y" { delete (((*yyvaluep).column_t)); } -#line 2144 "bison_parser.cpp" +#line 2139 "bison_parser.cpp" break; case YYSYMBOL_column_type: /* column_type */ #line 153 "bison_parser.y" { } -#line 2150 "bison_parser.cpp" +#line 2145 "bison_parser.cpp" break; case YYSYMBOL_opt_time_specification: /* opt_time_specification */ #line 153 "bison_parser.y" { } -#line 2156 "bison_parser.cpp" +#line 2151 "bison_parser.cpp" break; case YYSYMBOL_opt_decimal_specification: /* opt_decimal_specification */ #line 153 "bison_parser.y" { } -#line 2162 "bison_parser.cpp" +#line 2157 "bison_parser.cpp" break; case YYSYMBOL_opt_column_constraints: /* opt_column_constraints */ #line 153 "bison_parser.y" { } -#line 2168 "bison_parser.cpp" +#line 2163 "bison_parser.cpp" break; case YYSYMBOL_column_constraint: /* column_constraint */ #line 153 "bison_parser.y" { } -#line 2174 "bison_parser.cpp" +#line 2169 "bison_parser.cpp" break; case YYSYMBOL_table_constraint: /* table_constraint */ #line 164 "bison_parser.y" { delete (((*yyvaluep).table_constraint_t)); } -#line 2180 "bison_parser.cpp" +#line 2175 "bison_parser.cpp" break; case YYSYMBOL_drop_statement: /* drop_statement */ #line 164 "bison_parser.y" { delete (((*yyvaluep).drop_stmt)); } -#line 2186 "bison_parser.cpp" +#line 2181 "bison_parser.cpp" break; case YYSYMBOL_opt_exists: /* opt_exists */ #line 153 "bison_parser.y" { } -#line 2192 "bison_parser.cpp" +#line 2187 "bison_parser.cpp" break; case YYSYMBOL_alter_statement: /* alter_statement */ #line 164 "bison_parser.y" { delete (((*yyvaluep).alter_stmt)); } -#line 2198 "bison_parser.cpp" +#line 2193 "bison_parser.cpp" break; case YYSYMBOL_delete_statement: /* delete_statement */ #line 164 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2204 "bison_parser.cpp" +#line 2199 "bison_parser.cpp" break; case YYSYMBOL_truncate_statement: /* truncate_statement */ #line 164 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2210 "bison_parser.cpp" +#line 2205 "bison_parser.cpp" break; case YYSYMBOL_insert_statement: /* insert_statement */ #line 164 "bison_parser.y" { delete (((*yyvaluep).insert_stmt)); } -#line 2216 "bison_parser.cpp" +#line 2211 "bison_parser.cpp" break; case YYSYMBOL_opt_column_list: /* opt_column_list */ @@ -2225,13 +2220,13 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2229 "bison_parser.cpp" +#line 2224 "bison_parser.cpp" break; case YYSYMBOL_update_statement: /* update_statement */ #line 164 "bison_parser.y" { delete (((*yyvaluep).update_stmt)); } -#line 2235 "bison_parser.cpp" +#line 2230 "bison_parser.cpp" break; case YYSYMBOL_update_clause_commalist: /* update_clause_commalist */ @@ -2244,73 +2239,73 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).update_vec)); } -#line 2248 "bison_parser.cpp" +#line 2243 "bison_parser.cpp" break; case YYSYMBOL_update_clause: /* update_clause */ #line 164 "bison_parser.y" { delete (((*yyvaluep).update_t)); } -#line 2254 "bison_parser.cpp" +#line 2249 "bison_parser.cpp" break; case YYSYMBOL_select_statement: /* select_statement */ #line 164 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2260 "bison_parser.cpp" +#line 2255 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation: /* select_within_set_operation */ #line 164 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2266 "bison_parser.cpp" +#line 2261 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation_no_parentheses: /* select_within_set_operation_no_parentheses */ #line 164 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2272 "bison_parser.cpp" +#line 2267 "bison_parser.cpp" break; case YYSYMBOL_select_with_paren: /* select_with_paren */ #line 164 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2278 "bison_parser.cpp" +#line 2273 "bison_parser.cpp" break; case YYSYMBOL_select_no_paren: /* select_no_paren */ #line 164 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2284 "bison_parser.cpp" +#line 2279 "bison_parser.cpp" break; case YYSYMBOL_set_operator: /* set_operator */ #line 164 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2290 "bison_parser.cpp" +#line 2285 "bison_parser.cpp" break; case YYSYMBOL_set_type: /* set_type */ #line 164 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2296 "bison_parser.cpp" +#line 2291 "bison_parser.cpp" break; case YYSYMBOL_opt_all: /* opt_all */ #line 153 "bison_parser.y" { } -#line 2302 "bison_parser.cpp" +#line 2297 "bison_parser.cpp" break; case YYSYMBOL_select_clause: /* select_clause */ #line 164 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2308 "bison_parser.cpp" +#line 2303 "bison_parser.cpp" break; case YYSYMBOL_opt_distinct: /* opt_distinct */ #line 153 "bison_parser.y" { } -#line 2314 "bison_parser.cpp" +#line 2309 "bison_parser.cpp" break; case YYSYMBOL_select_list: /* select_list */ @@ -2323,37 +2318,37 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2327 "bison_parser.cpp" +#line 2322 "bison_parser.cpp" break; case YYSYMBOL_opt_from_clause: /* opt_from_clause */ #line 164 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2333 "bison_parser.cpp" +#line 2328 "bison_parser.cpp" break; case YYSYMBOL_from_clause: /* from_clause */ #line 164 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2339 "bison_parser.cpp" +#line 2334 "bison_parser.cpp" break; case YYSYMBOL_opt_where: /* opt_where */ #line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2345 "bison_parser.cpp" +#line 2340 "bison_parser.cpp" break; case YYSYMBOL_opt_group: /* opt_group */ #line 164 "bison_parser.y" { delete (((*yyvaluep).group_t)); } -#line 2351 "bison_parser.cpp" +#line 2346 "bison_parser.cpp" break; case YYSYMBOL_opt_having: /* opt_having */ #line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2357 "bison_parser.cpp" +#line 2352 "bison_parser.cpp" break; case YYSYMBOL_opt_order: /* opt_order */ @@ -2366,7 +2361,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2370 "bison_parser.cpp" +#line 2365 "bison_parser.cpp" break; case YYSYMBOL_order_list: /* order_list */ @@ -2379,31 +2374,31 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2383 "bison_parser.cpp" +#line 2378 "bison_parser.cpp" break; case YYSYMBOL_order_desc: /* order_desc */ #line 164 "bison_parser.y" { delete (((*yyvaluep).order)); } -#line 2389 "bison_parser.cpp" +#line 2384 "bison_parser.cpp" break; case YYSYMBOL_opt_order_type: /* opt_order_type */ #line 153 "bison_parser.y" { } -#line 2395 "bison_parser.cpp" +#line 2390 "bison_parser.cpp" break; case YYSYMBOL_opt_top: /* opt_top */ #line 164 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2401 "bison_parser.cpp" +#line 2396 "bison_parser.cpp" break; case YYSYMBOL_opt_limit: /* opt_limit */ #line 164 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2407 "bison_parser.cpp" +#line 2402 "bison_parser.cpp" break; case YYSYMBOL_expr_list: /* expr_list */ @@ -2416,7 +2411,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2420 "bison_parser.cpp" +#line 2415 "bison_parser.cpp" break; case YYSYMBOL_opt_literal_list: /* opt_literal_list */ @@ -2429,7 +2424,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2433 "bison_parser.cpp" +#line 2428 "bison_parser.cpp" break; case YYSYMBOL_literal_list: /* literal_list */ @@ -2442,187 +2437,187 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2446 "bison_parser.cpp" +#line 2441 "bison_parser.cpp" break; case YYSYMBOL_expr_alias: /* expr_alias */ #line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2452 "bison_parser.cpp" +#line 2447 "bison_parser.cpp" break; case YYSYMBOL_expr: /* expr */ #line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2458 "bison_parser.cpp" +#line 2453 "bison_parser.cpp" break; case YYSYMBOL_operand: /* operand */ #line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2464 "bison_parser.cpp" +#line 2459 "bison_parser.cpp" break; case YYSYMBOL_scalar_expr: /* scalar_expr */ #line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2470 "bison_parser.cpp" +#line 2465 "bison_parser.cpp" break; case YYSYMBOL_unary_expr: /* unary_expr */ #line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2476 "bison_parser.cpp" +#line 2471 "bison_parser.cpp" break; case YYSYMBOL_binary_expr: /* binary_expr */ #line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2482 "bison_parser.cpp" +#line 2477 "bison_parser.cpp" break; case YYSYMBOL_logic_expr: /* logic_expr */ #line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2488 "bison_parser.cpp" +#line 2483 "bison_parser.cpp" break; case YYSYMBOL_in_expr: /* in_expr */ #line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2494 "bison_parser.cpp" +#line 2489 "bison_parser.cpp" break; case YYSYMBOL_case_expr: /* case_expr */ #line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2500 "bison_parser.cpp" +#line 2495 "bison_parser.cpp" break; case YYSYMBOL_case_list: /* case_list */ #line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2506 "bison_parser.cpp" +#line 2501 "bison_parser.cpp" break; case YYSYMBOL_exists_expr: /* exists_expr */ #line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2512 "bison_parser.cpp" +#line 2507 "bison_parser.cpp" break; case YYSYMBOL_comp_expr: /* comp_expr */ #line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2518 "bison_parser.cpp" +#line 2513 "bison_parser.cpp" break; case YYSYMBOL_function_expr: /* function_expr */ #line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2524 "bison_parser.cpp" +#line 2519 "bison_parser.cpp" break; case YYSYMBOL_extract_expr: /* extract_expr */ #line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2530 "bison_parser.cpp" +#line 2525 "bison_parser.cpp" break; case YYSYMBOL_cast_expr: /* cast_expr */ #line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2536 "bison_parser.cpp" +#line 2531 "bison_parser.cpp" break; case YYSYMBOL_datetime_field: /* datetime_field */ #line 153 "bison_parser.y" { } -#line 2542 "bison_parser.cpp" +#line 2537 "bison_parser.cpp" break; case YYSYMBOL_array_expr: /* array_expr */ #line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2548 "bison_parser.cpp" +#line 2543 "bison_parser.cpp" break; case YYSYMBOL_array_index: /* array_index */ #line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2554 "bison_parser.cpp" +#line 2549 "bison_parser.cpp" break; case YYSYMBOL_between_expr: /* between_expr */ #line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2560 "bison_parser.cpp" +#line 2555 "bison_parser.cpp" break; case YYSYMBOL_column_name: /* column_name */ #line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2566 "bison_parser.cpp" +#line 2561 "bison_parser.cpp" break; case YYSYMBOL_literal: /* literal */ #line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2572 "bison_parser.cpp" +#line 2567 "bison_parser.cpp" break; case YYSYMBOL_string_literal: /* string_literal */ #line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2578 "bison_parser.cpp" +#line 2573 "bison_parser.cpp" break; case YYSYMBOL_bool_literal: /* bool_literal */ #line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2584 "bison_parser.cpp" +#line 2579 "bison_parser.cpp" break; case YYSYMBOL_num_literal: /* num_literal */ #line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2590 "bison_parser.cpp" +#line 2585 "bison_parser.cpp" break; case YYSYMBOL_int_literal: /* int_literal */ #line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2596 "bison_parser.cpp" +#line 2591 "bison_parser.cpp" break; case YYSYMBOL_null_literal: /* null_literal */ #line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2602 "bison_parser.cpp" +#line 2597 "bison_parser.cpp" break; case YYSYMBOL_param_expr: /* param_expr */ #line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2608 "bison_parser.cpp" +#line 2603 "bison_parser.cpp" break; case YYSYMBOL_table_ref: /* table_ref */ #line 164 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2614 "bison_parser.cpp" +#line 2609 "bison_parser.cpp" break; case YYSYMBOL_table_ref_atomic: /* table_ref_atomic */ #line 164 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2620 "bison_parser.cpp" +#line 2615 "bison_parser.cpp" break; case YYSYMBOL_nonjoin_table_ref_atomic: /* nonjoin_table_ref_atomic */ #line 164 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2626 "bison_parser.cpp" +#line 2621 "bison_parser.cpp" break; case YYSYMBOL_table_ref_commalist: /* table_ref_commalist */ @@ -2635,103 +2630,103 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).table_vec)); } -#line 2639 "bison_parser.cpp" +#line 2634 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name: /* table_ref_name */ #line 164 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2645 "bison_parser.cpp" +#line 2640 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name_no_alias: /* table_ref_name_no_alias */ #line 164 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2651 "bison_parser.cpp" +#line 2646 "bison_parser.cpp" break; case YYSYMBOL_table_name: /* table_name */ #line 154 "bison_parser.y" { free( (((*yyvaluep).table_name).name) ); free( (((*yyvaluep).table_name).schema) ); } -#line 2657 "bison_parser.cpp" +#line 2652 "bison_parser.cpp" break; case YYSYMBOL_opt_index_name: /* opt_index_name */ #line 155 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2663 "bison_parser.cpp" +#line 2658 "bison_parser.cpp" break; case YYSYMBOL_index_name: /* index_name */ #line 155 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2669 "bison_parser.cpp" +#line 2664 "bison_parser.cpp" break; case YYSYMBOL_table_alias: /* table_alias */ #line 164 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2675 "bison_parser.cpp" +#line 2670 "bison_parser.cpp" break; case YYSYMBOL_opt_table_alias: /* opt_table_alias */ #line 164 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2681 "bison_parser.cpp" +#line 2676 "bison_parser.cpp" break; case YYSYMBOL_alias: /* alias */ #line 164 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2687 "bison_parser.cpp" +#line 2682 "bison_parser.cpp" break; case YYSYMBOL_opt_alias: /* opt_alias */ #line 164 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2693 "bison_parser.cpp" +#line 2688 "bison_parser.cpp" break; case YYSYMBOL_opt_with_clause: /* opt_with_clause */ #line 164 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2699 "bison_parser.cpp" +#line 2694 "bison_parser.cpp" break; case YYSYMBOL_with_clause: /* with_clause */ #line 164 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2705 "bison_parser.cpp" +#line 2700 "bison_parser.cpp" break; case YYSYMBOL_with_description_list: /* with_description_list */ #line 164 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2711 "bison_parser.cpp" +#line 2706 "bison_parser.cpp" break; case YYSYMBOL_with_description: /* with_description */ #line 164 "bison_parser.y" { delete (((*yyvaluep).with_description_t)); } -#line 2717 "bison_parser.cpp" +#line 2712 "bison_parser.cpp" break; case YYSYMBOL_join_clause: /* join_clause */ #line 164 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2723 "bison_parser.cpp" +#line 2718 "bison_parser.cpp" break; case YYSYMBOL_opt_join_type: /* opt_join_type */ #line 153 "bison_parser.y" { } -#line 2729 "bison_parser.cpp" +#line 2724 "bison_parser.cpp" break; case YYSYMBOL_join_condition: /* join_condition */ #line 164 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2735 "bison_parser.cpp" +#line 2730 "bison_parser.cpp" break; case YYSYMBOL_ident_commalist: /* ident_commalist */ @@ -2744,7 +2739,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2748 "bison_parser.cpp" +#line 2743 "bison_parser.cpp" break; default: @@ -2851,7 +2846,7 @@ YYLTYPE yylloc = yyloc_default; yylloc.string_length = 0; } -#line 2855 "bison_parser.cpp" +#line 2850 "bison_parser.cpp" yylsp[0] = yylloc; goto yysetstate; @@ -3079,7 +3074,7 @@ YYLTYPE yylloc = yyloc_default; } delete (yyvsp[-1].stmt_vec); } -#line 3083 "bison_parser.cpp" +#line 3078 "bison_parser.cpp" break; case 3: /* statement_list: statement */ @@ -3090,7 +3085,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.stmt_vec) = new std::vector(); (yyval.stmt_vec)->push_back((yyvsp[0].statement)); } -#line 3094 "bison_parser.cpp" +#line 3089 "bison_parser.cpp" break; case 4: /* statement_list: statement_list ';' statement */ @@ -3101,7 +3096,7 @@ YYLTYPE yylloc = yyloc_default; (yyvsp[-2].stmt_vec)->push_back((yyvsp[0].statement)); (yyval.stmt_vec) = (yyvsp[-2].stmt_vec); } -#line 3105 "bison_parser.cpp" +#line 3100 "bison_parser.cpp" break; case 5: /* statement: prepare_statement opt_hints */ @@ -3110,7 +3105,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3114 "bison_parser.cpp" +#line 3109 "bison_parser.cpp" break; case 6: /* statement: preparable_statement opt_hints */ @@ -3119,7 +3114,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.statement) = (yyvsp[-1].statement); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3123 "bison_parser.cpp" +#line 3118 "bison_parser.cpp" break; case 7: /* statement: show_statement */ @@ -3127,7 +3122,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.statement) = (yyvsp[0].show_stmt); } -#line 3131 "bison_parser.cpp" +#line 3126 "bison_parser.cpp" break; case 8: /* statement: import_statement */ @@ -3135,7 +3130,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.statement) = (yyvsp[0].import_stmt); } -#line 3139 "bison_parser.cpp" +#line 3134 "bison_parser.cpp" break; case 9: /* statement: export_statement */ @@ -3143,91 +3138,91 @@ YYLTYPE yylloc = yyloc_default; { (yyval.statement) = (yyvsp[0].export_stmt); } -#line 3147 "bison_parser.cpp" +#line 3142 "bison_parser.cpp" break; case 10: /* preparable_statement: select_statement */ #line 341 "bison_parser.y" { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 3153 "bison_parser.cpp" +#line 3148 "bison_parser.cpp" break; case 11: /* preparable_statement: create_statement */ #line 342 "bison_parser.y" { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 3159 "bison_parser.cpp" +#line 3154 "bison_parser.cpp" break; case 12: /* preparable_statement: insert_statement */ #line 343 "bison_parser.y" { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 3165 "bison_parser.cpp" +#line 3160 "bison_parser.cpp" break; case 13: /* preparable_statement: delete_statement */ #line 344 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3171 "bison_parser.cpp" +#line 3166 "bison_parser.cpp" break; case 14: /* preparable_statement: truncate_statement */ #line 345 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3177 "bison_parser.cpp" +#line 3172 "bison_parser.cpp" break; case 15: /* preparable_statement: update_statement */ #line 346 "bison_parser.y" { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 3183 "bison_parser.cpp" +#line 3178 "bison_parser.cpp" break; case 16: /* preparable_statement: drop_statement */ #line 347 "bison_parser.y" { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 3189 "bison_parser.cpp" +#line 3184 "bison_parser.cpp" break; case 17: /* preparable_statement: alter_statement */ #line 348 "bison_parser.y" { (yyval.statement) = (yyvsp[0].alter_stmt); } -#line 3195 "bison_parser.cpp" +#line 3190 "bison_parser.cpp" break; case 18: /* preparable_statement: execute_statement */ #line 349 "bison_parser.y" { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 3201 "bison_parser.cpp" +#line 3196 "bison_parser.cpp" break; case 19: /* preparable_statement: transaction_statement */ #line 350 "bison_parser.y" { (yyval.statement) = (yyvsp[0].transaction_stmt); } -#line 3207 "bison_parser.cpp" +#line 3202 "bison_parser.cpp" break; case 20: /* opt_hints: WITH HINT '(' hint_list ')' */ #line 359 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 3213 "bison_parser.cpp" +#line 3208 "bison_parser.cpp" break; case 21: /* opt_hints: %empty */ #line 360 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 3219 "bison_parser.cpp" +#line 3214 "bison_parser.cpp" break; case 22: /* hint_list: hint */ #line 365 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3225 "bison_parser.cpp" +#line 3220 "bison_parser.cpp" break; case 23: /* hint_list: hint_list ',' hint */ #line 366 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3231 "bison_parser.cpp" +#line 3226 "bison_parser.cpp" break; case 24: /* hint: IDENTIFIER */ @@ -3236,7 +3231,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[0].sval); } -#line 3240 "bison_parser.cpp" +#line 3235 "bison_parser.cpp" break; case 25: /* hint: IDENTIFIER '(' literal_list ')' */ @@ -3246,7 +3241,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expr)->name = (yyvsp[-3].sval); (yyval.expr)->exprList = (yyvsp[-1].expr_vec); } -#line 3250 "bison_parser.cpp" +#line 3245 "bison_parser.cpp" break; case 26: /* transaction_statement: BEGIN opt_transaction_keyword */ @@ -3254,7 +3249,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.transaction_stmt) = new TransactionStatement(kBeginTransaction); } -#line 3258 "bison_parser.cpp" +#line 3253 "bison_parser.cpp" break; case 27: /* transaction_statement: ROLLBACK opt_transaction_keyword */ @@ -3262,7 +3257,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.transaction_stmt) = new TransactionStatement(kRollbackTransaction); } -#line 3266 "bison_parser.cpp" +#line 3261 "bison_parser.cpp" break; case 28: /* transaction_statement: COMMIT opt_transaction_keyword */ @@ -3270,7 +3265,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.transaction_stmt) = new TransactionStatement(kCommitTransaction); } -#line 3274 "bison_parser.cpp" +#line 3269 "bison_parser.cpp" break; case 31: /* prepare_statement: PREPARE IDENTIFIER FROM prepare_target_query */ @@ -3280,7 +3275,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.prep_stmt)->name = (yyvsp[-2].sval); (yyval.prep_stmt)->query = (yyvsp[0].sval); } -#line 3284 "bison_parser.cpp" +#line 3279 "bison_parser.cpp" break; case 33: /* execute_statement: EXECUTE IDENTIFIER */ @@ -3289,7 +3284,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[0].sval); } -#line 3293 "bison_parser.cpp" +#line 3288 "bison_parser.cpp" break; case 34: /* execute_statement: EXECUTE IDENTIFIER '(' opt_literal_list ')' */ @@ -3299,7 +3294,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.exec_stmt)->name = (yyvsp[-3].sval); (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); } -#line 3303 "bison_parser.cpp" +#line 3298 "bison_parser.cpp" break; case 35: /* import_statement: IMPORT FROM file_type FILE file_path INTO table_name */ @@ -3310,7 +3305,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.import_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3314 "bison_parser.cpp" +#line 3309 "bison_parser.cpp" break; case 36: /* import_statement: COPY table_name FROM file_path opt_file_type */ @@ -3321,7 +3316,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.import_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3325 "bison_parser.cpp" +#line 3320 "bison_parser.cpp" break; case 37: /* file_type: IDENTIFIER */ @@ -3340,13 +3335,13 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[0].sval)); } -#line 3344 "bison_parser.cpp" +#line 3339 "bison_parser.cpp" break; case 38: /* file_path: string_literal */ #line 466 "bison_parser.y" { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 3350 "bison_parser.cpp" +#line 3345 "bison_parser.cpp" break; case 39: /* opt_file_type: WITH FORMAT file_type */ @@ -3354,13 +3349,13 @@ YYLTYPE yylloc = yyloc_default; { (yyval.import_type_t) = (yyvsp[0].import_type_t); } -#line 3358 "bison_parser.cpp" +#line 3353 "bison_parser.cpp" break; case 40: /* opt_file_type: %empty */ #line 473 "bison_parser.y" { (yyval.import_type_t) = kImportAuto; } -#line 3364 "bison_parser.cpp" +#line 3359 "bison_parser.cpp" break; case 41: /* export_statement: COPY table_name TO file_path opt_file_type */ @@ -3371,7 +3366,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.export_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.export_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3375 "bison_parser.cpp" +#line 3370 "bison_parser.cpp" break; case 42: /* show_statement: SHOW TABLES */ @@ -3379,7 +3374,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.show_stmt) = new ShowStatement(kShowTables); } -#line 3383 "bison_parser.cpp" +#line 3378 "bison_parser.cpp" break; case 43: /* show_statement: SHOW COLUMNS table_name */ @@ -3389,7 +3384,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.show_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.show_stmt)->name = (yyvsp[0].table_name).name; } -#line 3393 "bison_parser.cpp" +#line 3388 "bison_parser.cpp" break; case 44: /* show_statement: DESCRIBE table_name */ @@ -3399,7 +3394,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.show_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.show_stmt)->name = (yyvsp[0].table_name).name; } -#line 3403 "bison_parser.cpp" +#line 3398 "bison_parser.cpp" break; case 45: /* create_statement: CREATE TABLE opt_not_exists table_name FROM IDENTIFIER FILE file_path */ @@ -3417,7 +3412,7 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].sval)); (yyval.create_stmt)->filePath = (yyvsp[0].sval); } -#line 3421 "bison_parser.cpp" +#line 3416 "bison_parser.cpp" break; case 46: /* create_statement: CREATE TABLE opt_not_exists table_name '(' table_elem_commalist ')' */ @@ -3429,7 +3424,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->setColumnDefsAndConstraints((yyvsp[-1].table_element_vec)); } -#line 3433 "bison_parser.cpp" +#line 3428 "bison_parser.cpp" break; case 47: /* create_statement: CREATE TABLE opt_not_exists table_name AS select_statement */ @@ -3441,7 +3436,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-2].table_name).name; (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3445 "bison_parser.cpp" +#line 3440 "bison_parser.cpp" break; case 48: /* create_statement: CREATE INDEX opt_not_exists opt_index_name ON table_name '(' ident_commalist ')' */ @@ -3453,7 +3448,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->indexColumns = (yyvsp[-1].str_vec); } -#line 3457 "bison_parser.cpp" +#line 3452 "bison_parser.cpp" break; case 49: /* create_statement: CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement */ @@ -3466,220 +3461,220 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3470 "bison_parser.cpp" +#line 3465 "bison_parser.cpp" break; case 50: /* opt_not_exists: IF NOT EXISTS */ #line 563 "bison_parser.y" { (yyval.bval) = true; } -#line 3476 "bison_parser.cpp" +#line 3471 "bison_parser.cpp" break; case 51: /* opt_not_exists: %empty */ #line 564 "bison_parser.y" { (yyval.bval) = false; } -#line 3482 "bison_parser.cpp" +#line 3477 "bison_parser.cpp" break; case 52: /* table_elem_commalist: table_elem */ #line 568 "bison_parser.y" { (yyval.table_element_vec) = new std::vector(); (yyval.table_element_vec)->push_back((yyvsp[0].table_element_t)); } -#line 3488 "bison_parser.cpp" +#line 3483 "bison_parser.cpp" break; case 53: /* table_elem_commalist: table_elem_commalist ',' table_elem */ #line 569 "bison_parser.y" { (yyvsp[-2].table_element_vec)->push_back((yyvsp[0].table_element_t)); (yyval.table_element_vec) = (yyvsp[-2].table_element_vec); } -#line 3494 "bison_parser.cpp" +#line 3489 "bison_parser.cpp" break; case 54: /* table_elem: column_def */ #line 573 "bison_parser.y" { (yyval.table_element_t) = (yyvsp[0].column_t); } -#line 3500 "bison_parser.cpp" +#line 3495 "bison_parser.cpp" break; case 55: /* table_elem: table_constraint */ #line 574 "bison_parser.y" { (yyval.table_element_t) = (yyvsp[0].table_constraint_t); } -#line 3506 "bison_parser.cpp" +#line 3501 "bison_parser.cpp" break; case 56: /* column_def: IDENTIFIER column_type opt_column_constraints */ #line 578 "bison_parser.y" { (yyval.column_t) = new ColumnDefinition((yyvsp[-2].sval), (yyvsp[-1].column_type_t), (yyvsp[0].column_constraint_vec)); - (yyval.column_t)->setNullableExplicit(); + (yyval.column_t)->setNullableExplicit(); } -#line 3515 "bison_parser.cpp" +#line 3510 "bison_parser.cpp" break; case 57: /* column_type: INT */ #line 585 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3521 "bison_parser.cpp" +#line 3516 "bison_parser.cpp" break; case 58: /* column_type: INTEGER */ #line 586 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3527 "bison_parser.cpp" +#line 3522 "bison_parser.cpp" break; case 59: /* column_type: LONG */ #line 587 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::LONG}; } -#line 3533 "bison_parser.cpp" +#line 3528 "bison_parser.cpp" break; case 60: /* column_type: FLOAT */ #line 588 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3539 "bison_parser.cpp" +#line 3534 "bison_parser.cpp" break; case 61: /* column_type: DECIMAL opt_decimal_specification */ #line 589 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DECIMAL, 0, (yyvsp[0].column_specification_t)}; } -#line 3545 "bison_parser.cpp" +#line 3540 "bison_parser.cpp" break; case 62: /* column_type: DOUBLE */ #line 590 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } -#line 3551 "bison_parser.cpp" +#line 3546 "bison_parser.cpp" break; case 63: /* column_type: REAL */ #line 591 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::REAL}; } -#line 3557 "bison_parser.cpp" +#line 3552 "bison_parser.cpp" break; case 64: /* column_type: VARCHAR '(' INTVAL ')' */ #line 592 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3563 "bison_parser.cpp" +#line 3558 "bison_parser.cpp" break; case 65: /* column_type: CHARACTER VARYING '(' INTVAL ')' */ #line 593 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR_VARYING, (yyvsp[-1].ival)}; } -#line 3569 "bison_parser.cpp" +#line 3564 "bison_parser.cpp" break; case 66: /* column_type: CHAR '(' INTVAL ')' */ #line 594 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } -#line 3575 "bison_parser.cpp" +#line 3570 "bison_parser.cpp" break; case 67: /* column_type: TEXT */ #line 595 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } -#line 3581 "bison_parser.cpp" +#line 3576 "bison_parser.cpp" break; case 68: /* column_type: TIME opt_time_specification */ #line 596 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TIME, 0, (yyvsp[0].column_specification_t) }; } -#line 3587 "bison_parser.cpp" +#line 3582 "bison_parser.cpp" break; case 69: /* column_type: DATETIME */ #line 597 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } -#line 3593 "bison_parser.cpp" +#line 3588 "bison_parser.cpp" break; case 70: /* column_type: DATE */ #line 598 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATE}; } -#line 3599 "bison_parser.cpp" +#line 3594 "bison_parser.cpp" break; case 71: /* opt_time_specification: '(' INTVAL ')' */ #line 602 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-1].ival)}; } -#line 3605 "bison_parser.cpp" +#line 3600 "bison_parser.cpp" break; case 72: /* opt_time_specification: %empty */ #line 603 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{}; } -#line 3611 "bison_parser.cpp" +#line 3606 "bison_parser.cpp" break; case 73: /* opt_decimal_specification: '(' INTVAL ',' INTVAL ')' */ #line 607 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-3].ival), (yyvsp[-1].ival)}; } -#line 3617 "bison_parser.cpp" +#line 3612 "bison_parser.cpp" break; case 74: /* opt_decimal_specification: '(' INTVAL ')' */ #line 608 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-1].ival)}; } -#line 3623 "bison_parser.cpp" +#line 3618 "bison_parser.cpp" break; case 75: /* opt_decimal_specification: %empty */ #line 609 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{}; } -#line 3629 "bison_parser.cpp" +#line 3624 "bison_parser.cpp" break; case 76: /* opt_column_constraints: column_constraint */ #line 613 "bison_parser.y" { (yyval.column_constraint_vec) = new std::vector(); (yyval.column_constraint_vec)->push_back((yyvsp[0].column_constraint_t)); } -#line 3635 "bison_parser.cpp" +#line 3630 "bison_parser.cpp" break; case 77: /* opt_column_constraints: opt_column_constraints column_constraint */ #line 614 "bison_parser.y" { (yyvsp[-1].column_constraint_vec)->push_back((yyvsp[0].column_constraint_t)); (yyval.column_constraint_vec) = (yyvsp[-1].column_constraint_vec); } -#line 3641 "bison_parser.cpp" +#line 3636 "bison_parser.cpp" break; case 78: /* opt_column_constraints: %empty */ #line 615 "bison_parser.y" { (yyval.column_constraint_vec) = new std::vector(); } -#line 3647 "bison_parser.cpp" +#line 3642 "bison_parser.cpp" break; case 79: /* column_constraint: PRIMARY KEY */ #line 619 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::PRIMARY_KEY; } -#line 3653 "bison_parser.cpp" +#line 3648 "bison_parser.cpp" break; case 80: /* column_constraint: UNIQUE */ #line 620 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::UNIQUE; } -#line 3659 "bison_parser.cpp" +#line 3654 "bison_parser.cpp" break; case 81: /* column_constraint: NULL */ #line 621 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::_NULL; } -#line 3665 "bison_parser.cpp" +#line 3660 "bison_parser.cpp" break; case 82: /* column_constraint: NOT NULL */ #line 622 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::NOTNULL; } -#line 3671 "bison_parser.cpp" +#line 3666 "bison_parser.cpp" break; case 83: /* table_constraint: PRIMARY KEY '(' ident_commalist ')' */ #line 626 "bison_parser.y" { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::PRIMARY_KEY, (yyvsp[-1].str_vec)); } -#line 3677 "bison_parser.cpp" +#line 3672 "bison_parser.cpp" break; case 84: /* table_constraint: UNIQUE '(' ident_commalist ')' */ #line 627 "bison_parser.y" { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::UNIQUE, (yyvsp[-1].str_vec)); } -#line 3683 "bison_parser.cpp" +#line 3678 "bison_parser.cpp" break; case 85: /* drop_statement: DROP TABLE opt_exists table_name */ @@ -3690,7 +3685,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.drop_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; } -#line 3694 "bison_parser.cpp" +#line 3689 "bison_parser.cpp" break; case 86: /* drop_statement: DROP VIEW opt_exists table_name */ @@ -3701,7 +3696,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.drop_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; } -#line 3705 "bison_parser.cpp" +#line 3700 "bison_parser.cpp" break; case 87: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ @@ -3711,34 +3706,33 @@ YYLTYPE yylloc = yyloc_default; (yyval.drop_stmt)->ifExists = false; (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 3715 "bison_parser.cpp" +#line 3710 "bison_parser.cpp" break; - case 88: /* drop_statement: DROP INDEX opt_exists index_name ON table_name */ + case 88: /* drop_statement: DROP INDEX opt_exists index_name */ #line 655 "bison_parser.y" - { + { (yyval.drop_stmt) = new DropStatement(kDropIndex); - (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; - (yyval.drop_stmt)->ifExists = (yyvsp[-3].bval); - (yyval.drop_stmt)->indexName = (yyvsp[-2].sval); + (yyval.drop_stmt)->ifExists = (yyvsp[-1].bval); + (yyval.drop_stmt)->indexName = (yyvsp[0].sval); } -#line 3726 "bison_parser.cpp" +#line 3720 "bison_parser.cpp" break; case 89: /* opt_exists: IF EXISTS */ -#line 664 "bison_parser.y" +#line 663 "bison_parser.y" { (yyval.bval) = true; } -#line 3732 "bison_parser.cpp" +#line 3726 "bison_parser.cpp" break; case 90: /* opt_exists: %empty */ -#line 665 "bison_parser.y" +#line 664 "bison_parser.y" { (yyval.bval) = false; } -#line 3738 "bison_parser.cpp" +#line 3732 "bison_parser.cpp" break; case 91: /* alter_statement: ALTER TABLE table_name DROP COLUMN opt_exists column_name */ -#line 674 "bison_parser.y" +#line 673 "bison_parser.y" { (yyval.alter_stmt) = new AlterStatement(kAlterDropColumn); (yyval.alter_stmt)->ifExists = (yyvsp[-1].bval); @@ -3746,32 +3740,32 @@ YYLTYPE yylloc = yyloc_default; (yyval.alter_stmt)->name = (yyvsp[-4].table_name).name; (yyval.alter_stmt)->columnName = (yyvsp[0].expr)->name; } -#line 3750 "bison_parser.cpp" +#line 3744 "bison_parser.cpp" break; case 92: /* delete_statement: DELETE FROM table_name opt_where */ -#line 689 "bison_parser.y" +#line 688 "bison_parser.y" { (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 3761 "bison_parser.cpp" +#line 3755 "bison_parser.cpp" break; case 93: /* truncate_statement: TRUNCATE table_name */ -#line 698 "bison_parser.y" +#line 697 "bison_parser.y" { (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3771 "bison_parser.cpp" +#line 3765 "bison_parser.cpp" break; case 94: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ -#line 711 "bison_parser.y" +#line 710 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertValues); (yyval.insert_stmt)->schema = (yyvsp[-5].table_name).schema; @@ -3779,11 +3773,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } -#line 3783 "bison_parser.cpp" +#line 3777 "bison_parser.cpp" break; case 95: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ -#line 718 "bison_parser.y" +#line 717 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertSelect); (yyval.insert_stmt)->schema = (yyvsp[-2].table_name).schema; @@ -3791,74 +3785,74 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } -#line 3795 "bison_parser.cpp" +#line 3789 "bison_parser.cpp" break; case 96: /* opt_column_list: '(' ident_commalist ')' */ -#line 729 "bison_parser.y" +#line 728 "bison_parser.y" { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 3801 "bison_parser.cpp" +#line 3795 "bison_parser.cpp" break; case 97: /* opt_column_list: %empty */ -#line 730 "bison_parser.y" +#line 729 "bison_parser.y" { (yyval.str_vec) = nullptr; } -#line 3807 "bison_parser.cpp" +#line 3801 "bison_parser.cpp" break; case 98: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ -#line 740 "bison_parser.y" +#line 739 "bison_parser.y" { (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 3818 "bison_parser.cpp" +#line 3812 "bison_parser.cpp" break; case 99: /* update_clause_commalist: update_clause */ -#line 749 "bison_parser.y" +#line 748 "bison_parser.y" { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 3824 "bison_parser.cpp" +#line 3818 "bison_parser.cpp" break; case 100: /* update_clause_commalist: update_clause_commalist ',' update_clause */ -#line 750 "bison_parser.y" +#line 749 "bison_parser.y" { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 3830 "bison_parser.cpp" +#line 3824 "bison_parser.cpp" break; case 101: /* update_clause: IDENTIFIER '=' expr */ -#line 754 "bison_parser.y" +#line 753 "bison_parser.y" { (yyval.update_t) = new UpdateClause(); (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 3840 "bison_parser.cpp" +#line 3834 "bison_parser.cpp" break; case 102: /* select_statement: opt_with_clause select_with_paren */ -#line 766 "bison_parser.y" +#line 765 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3849 "bison_parser.cpp" +#line 3843 "bison_parser.cpp" break; case 103: /* select_statement: opt_with_clause select_no_paren */ -#line 770 "bison_parser.y" +#line 769 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3858 "bison_parser.cpp" +#line 3852 "bison_parser.cpp" break; case 104: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ -#line 774 "bison_parser.y" +#line 773 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3870,17 +3864,17 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); (yyval.select_stmt)->withDescriptions = (yyvsp[-5].with_description_vec); } -#line 3874 "bison_parser.cpp" +#line 3868 "bison_parser.cpp" break; case 107: /* select_within_set_operation_no_parentheses: select_clause */ -#line 792 "bison_parser.y" +#line 791 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); } -#line 3880 "bison_parser.cpp" +#line 3874 "bison_parser.cpp" break; case 108: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ -#line 793 "bison_parser.y" +#line 792 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3889,23 +3883,23 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->push_back((yyvsp[-1].set_operator_t)); (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[0].select_stmt); } -#line 3893 "bison_parser.cpp" +#line 3887 "bison_parser.cpp" break; case 109: /* select_with_paren: '(' select_no_paren ')' */ -#line 804 "bison_parser.y" +#line 803 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3899 "bison_parser.cpp" +#line 3893 "bison_parser.cpp" break; case 110: /* select_with_paren: '(' select_with_paren ')' */ -#line 805 "bison_parser.y" +#line 804 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3905 "bison_parser.cpp" +#line 3899 "bison_parser.cpp" break; case 111: /* select_no_paren: select_clause opt_order opt_limit */ -#line 809 "bison_parser.y" +#line 808 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); (yyval.select_stmt)->order = (yyvsp[-1].order_vec); @@ -3916,11 +3910,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3920 "bison_parser.cpp" +#line 3914 "bison_parser.cpp" break; case 112: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ -#line 819 "bison_parser.y" +#line 818 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3931,63 +3925,63 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); } -#line 3935 "bison_parser.cpp" +#line 3929 "bison_parser.cpp" break; case 113: /* set_operator: set_type opt_all */ -#line 832 "bison_parser.y" +#line 831 "bison_parser.y" { (yyval.set_operator_t) = (yyvsp[-1].set_operator_t); (yyval.set_operator_t)->isAll = (yyvsp[0].bval); } -#line 3944 "bison_parser.cpp" +#line 3938 "bison_parser.cpp" break; case 114: /* set_type: UNION */ -#line 839 "bison_parser.y" +#line 838 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetUnion; } -#line 3953 "bison_parser.cpp" +#line 3947 "bison_parser.cpp" break; case 115: /* set_type: INTERSECT */ -#line 843 "bison_parser.y" +#line 842 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetIntersect; } -#line 3962 "bison_parser.cpp" +#line 3956 "bison_parser.cpp" break; case 116: /* set_type: EXCEPT */ -#line 847 "bison_parser.y" +#line 846 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetExcept; } -#line 3971 "bison_parser.cpp" +#line 3965 "bison_parser.cpp" break; case 117: /* opt_all: ALL */ -#line 854 "bison_parser.y" +#line 853 "bison_parser.y" { (yyval.bval) = true; } -#line 3979 "bison_parser.cpp" +#line 3973 "bison_parser.cpp" break; case 118: /* opt_all: %empty */ -#line 857 "bison_parser.y" +#line 856 "bison_parser.y" { (yyval.bval) = false; } -#line 3987 "bison_parser.cpp" +#line 3981 "bison_parser.cpp" break; case 119: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ -#line 863 "bison_parser.y" +#line 862 "bison_parser.y" { (yyval.select_stmt) = new SelectStatement(); (yyval.select_stmt)->limit = (yyvsp[-5].limit); @@ -3997,213 +3991,213 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 4001 "bison_parser.cpp" +#line 3995 "bison_parser.cpp" break; case 120: /* opt_distinct: DISTINCT */ -#line 875 "bison_parser.y" +#line 874 "bison_parser.y" { (yyval.bval) = true; } -#line 4007 "bison_parser.cpp" +#line 4001 "bison_parser.cpp" break; case 121: /* opt_distinct: %empty */ -#line 876 "bison_parser.y" +#line 875 "bison_parser.y" { (yyval.bval) = false; } -#line 4013 "bison_parser.cpp" +#line 4007 "bison_parser.cpp" break; case 123: /* opt_from_clause: from_clause */ -#line 884 "bison_parser.y" +#line 883 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 4019 "bison_parser.cpp" +#line 4013 "bison_parser.cpp" break; case 124: /* opt_from_clause: %empty */ -#line 885 "bison_parser.y" +#line 884 "bison_parser.y" { (yyval.table) = nullptr; } -#line 4025 "bison_parser.cpp" +#line 4019 "bison_parser.cpp" break; case 125: /* from_clause: FROM table_ref */ -#line 889 "bison_parser.y" +#line 888 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 4031 "bison_parser.cpp" +#line 4025 "bison_parser.cpp" break; case 126: /* opt_where: WHERE expr */ -#line 894 "bison_parser.y" +#line 893 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 4037 "bison_parser.cpp" +#line 4031 "bison_parser.cpp" break; case 127: /* opt_where: %empty */ -#line 895 "bison_parser.y" +#line 894 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 4043 "bison_parser.cpp" +#line 4037 "bison_parser.cpp" break; case 128: /* opt_group: GROUP BY expr_list opt_having */ -#line 899 "bison_parser.y" +#line 898 "bison_parser.y" { (yyval.group_t) = new GroupByDescription(); (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 4053 "bison_parser.cpp" +#line 4047 "bison_parser.cpp" break; case 129: /* opt_group: %empty */ -#line 904 "bison_parser.y" +#line 903 "bison_parser.y" { (yyval.group_t) = nullptr; } -#line 4059 "bison_parser.cpp" +#line 4053 "bison_parser.cpp" break; case 130: /* opt_having: HAVING expr */ -#line 908 "bison_parser.y" +#line 907 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 4065 "bison_parser.cpp" +#line 4059 "bison_parser.cpp" break; case 131: /* opt_having: %empty */ -#line 909 "bison_parser.y" +#line 908 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 4071 "bison_parser.cpp" +#line 4065 "bison_parser.cpp" break; case 132: /* opt_order: ORDER BY order_list */ -#line 913 "bison_parser.y" +#line 912 "bison_parser.y" { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 4077 "bison_parser.cpp" +#line 4071 "bison_parser.cpp" break; case 133: /* opt_order: %empty */ -#line 914 "bison_parser.y" +#line 913 "bison_parser.y" { (yyval.order_vec) = nullptr; } -#line 4083 "bison_parser.cpp" +#line 4077 "bison_parser.cpp" break; case 134: /* order_list: order_desc */ -#line 918 "bison_parser.y" +#line 917 "bison_parser.y" { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 4089 "bison_parser.cpp" +#line 4083 "bison_parser.cpp" break; case 135: /* order_list: order_list ',' order_desc */ -#line 919 "bison_parser.y" +#line 918 "bison_parser.y" { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 4095 "bison_parser.cpp" +#line 4089 "bison_parser.cpp" break; case 136: /* order_desc: expr opt_order_type */ -#line 923 "bison_parser.y" +#line 922 "bison_parser.y" { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 4101 "bison_parser.cpp" +#line 4095 "bison_parser.cpp" break; case 137: /* opt_order_type: ASC */ -#line 927 "bison_parser.y" +#line 926 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 4107 "bison_parser.cpp" +#line 4101 "bison_parser.cpp" break; case 138: /* opt_order_type: DESC */ -#line 928 "bison_parser.y" +#line 927 "bison_parser.y" { (yyval.order_type) = kOrderDesc; } -#line 4113 "bison_parser.cpp" +#line 4107 "bison_parser.cpp" break; case 139: /* opt_order_type: %empty */ -#line 929 "bison_parser.y" +#line 928 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 4119 "bison_parser.cpp" +#line 4113 "bison_parser.cpp" break; case 140: /* opt_top: TOP int_literal */ -#line 935 "bison_parser.y" +#line 934 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 4125 "bison_parser.cpp" +#line 4119 "bison_parser.cpp" break; case 141: /* opt_top: %empty */ -#line 936 "bison_parser.y" +#line 935 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 4131 "bison_parser.cpp" +#line 4125 "bison_parser.cpp" break; case 142: /* opt_limit: LIMIT expr */ -#line 940 "bison_parser.y" +#line 939 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 4137 "bison_parser.cpp" +#line 4131 "bison_parser.cpp" break; case 143: /* opt_limit: OFFSET expr */ -#line 941 "bison_parser.y" +#line 940 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 4143 "bison_parser.cpp" +#line 4137 "bison_parser.cpp" break; case 144: /* opt_limit: LIMIT expr OFFSET expr */ -#line 942 "bison_parser.y" +#line 941 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4149 "bison_parser.cpp" +#line 4143 "bison_parser.cpp" break; case 145: /* opt_limit: LIMIT ALL */ -#line 943 "bison_parser.y" +#line 942 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, nullptr); } -#line 4155 "bison_parser.cpp" +#line 4149 "bison_parser.cpp" break; case 146: /* opt_limit: LIMIT ALL OFFSET expr */ -#line 944 "bison_parser.y" +#line 943 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 4161 "bison_parser.cpp" +#line 4155 "bison_parser.cpp" break; case 147: /* opt_limit: %empty */ -#line 945 "bison_parser.y" +#line 944 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 4167 "bison_parser.cpp" +#line 4161 "bison_parser.cpp" break; case 148: /* expr_list: expr_alias */ -#line 952 "bison_parser.y" +#line 951 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4173 "bison_parser.cpp" +#line 4167 "bison_parser.cpp" break; case 149: /* expr_list: expr_list ',' expr_alias */ -#line 953 "bison_parser.y" +#line 952 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4179 "bison_parser.cpp" +#line 4173 "bison_parser.cpp" break; case 150: /* opt_literal_list: literal_list */ -#line 957 "bison_parser.y" +#line 956 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[0].expr_vec); } -#line 4185 "bison_parser.cpp" +#line 4179 "bison_parser.cpp" break; case 151: /* opt_literal_list: %empty */ -#line 958 "bison_parser.y" +#line 957 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 4191 "bison_parser.cpp" +#line 4185 "bison_parser.cpp" break; case 152: /* literal_list: literal */ -#line 962 "bison_parser.y" +#line 961 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4197 "bison_parser.cpp" +#line 4191 "bison_parser.cpp" break; case 153: /* literal_list: literal_list ',' literal */ -#line 963 "bison_parser.y" +#line 962 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4203 "bison_parser.cpp" +#line 4197 "bison_parser.cpp" break; case 154: /* expr_alias: expr opt_alias */ -#line 967 "bison_parser.y" +#line 966 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); if ((yyvsp[0].alias_t)) { @@ -4211,421 +4205,421 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].alias_t); } } -#line 4215 "bison_parser.cpp" +#line 4209 "bison_parser.cpp" break; case 160: /* operand: '(' expr ')' */ -#line 985 "bison_parser.y" +#line 984 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); } -#line 4221 "bison_parser.cpp" +#line 4215 "bison_parser.cpp" break; case 170: /* operand: '(' select_no_paren ')' */ -#line 995 "bison_parser.y" +#line 994 "bison_parser.y" { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 4227 "bison_parser.cpp" +#line 4221 "bison_parser.cpp" break; case 173: /* unary_expr: '-' operand */ -#line 1004 "bison_parser.y" +#line 1003 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 4233 "bison_parser.cpp" +#line 4227 "bison_parser.cpp" break; case 174: /* unary_expr: NOT operand */ -#line 1005 "bison_parser.y" +#line 1004 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 4239 "bison_parser.cpp" +#line 4233 "bison_parser.cpp" break; case 175: /* unary_expr: operand ISNULL */ -#line 1006 "bison_parser.y" +#line 1005 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 4245 "bison_parser.cpp" +#line 4239 "bison_parser.cpp" break; case 176: /* unary_expr: operand IS NULL */ -#line 1007 "bison_parser.y" +#line 1006 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 4251 "bison_parser.cpp" +#line 4245 "bison_parser.cpp" break; case 177: /* unary_expr: operand IS NOT NULL */ -#line 1008 "bison_parser.y" +#line 1007 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 4257 "bison_parser.cpp" +#line 4251 "bison_parser.cpp" break; case 179: /* binary_expr: operand '-' operand */ -#line 1013 "bison_parser.y" +#line 1012 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 4263 "bison_parser.cpp" +#line 4257 "bison_parser.cpp" break; case 180: /* binary_expr: operand '+' operand */ -#line 1014 "bison_parser.y" +#line 1013 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 4269 "bison_parser.cpp" +#line 4263 "bison_parser.cpp" break; case 181: /* binary_expr: operand '/' operand */ -#line 1015 "bison_parser.y" +#line 1014 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 4275 "bison_parser.cpp" +#line 4269 "bison_parser.cpp" break; case 182: /* binary_expr: operand '*' operand */ -#line 1016 "bison_parser.y" +#line 1015 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 4281 "bison_parser.cpp" +#line 4275 "bison_parser.cpp" break; case 183: /* binary_expr: operand '%' operand */ -#line 1017 "bison_parser.y" +#line 1016 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 4287 "bison_parser.cpp" +#line 4281 "bison_parser.cpp" break; case 184: /* binary_expr: operand '^' operand */ -#line 1018 "bison_parser.y" +#line 1017 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 4293 "bison_parser.cpp" +#line 4287 "bison_parser.cpp" break; case 185: /* binary_expr: operand LIKE operand */ -#line 1019 "bison_parser.y" +#line 1018 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 4299 "bison_parser.cpp" +#line 4293 "bison_parser.cpp" break; case 186: /* binary_expr: operand NOT LIKE operand */ -#line 1020 "bison_parser.y" +#line 1019 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 4305 "bison_parser.cpp" +#line 4299 "bison_parser.cpp" break; case 187: /* binary_expr: operand ILIKE operand */ -#line 1021 "bison_parser.y" +#line 1020 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 4311 "bison_parser.cpp" +#line 4305 "bison_parser.cpp" break; case 188: /* binary_expr: operand CONCAT operand */ -#line 1022 "bison_parser.y" +#line 1021 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 4317 "bison_parser.cpp" +#line 4311 "bison_parser.cpp" break; case 189: /* logic_expr: expr AND expr */ -#line 1026 "bison_parser.y" +#line 1025 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 4323 "bison_parser.cpp" +#line 4317 "bison_parser.cpp" break; case 190: /* logic_expr: expr OR expr */ -#line 1027 "bison_parser.y" +#line 1026 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 4329 "bison_parser.cpp" +#line 4323 "bison_parser.cpp" break; case 191: /* in_expr: operand IN '(' expr_list ')' */ -#line 1031 "bison_parser.y" +#line 1030 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 4335 "bison_parser.cpp" +#line 4329 "bison_parser.cpp" break; case 192: /* in_expr: operand NOT IN '(' expr_list ')' */ -#line 1032 "bison_parser.y" +#line 1031 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 4341 "bison_parser.cpp" +#line 4335 "bison_parser.cpp" break; case 193: /* in_expr: operand IN '(' select_no_paren ')' */ -#line 1033 "bison_parser.y" +#line 1032 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 4347 "bison_parser.cpp" +#line 4341 "bison_parser.cpp" break; case 194: /* in_expr: operand NOT IN '(' select_no_paren ')' */ -#line 1034 "bison_parser.y" +#line 1033 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 4353 "bison_parser.cpp" +#line 4347 "bison_parser.cpp" break; case 195: /* case_expr: CASE expr case_list END */ -#line 1040 "bison_parser.y" +#line 1039 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } -#line 4359 "bison_parser.cpp" +#line 4353 "bison_parser.cpp" break; case 196: /* case_expr: CASE expr case_list ELSE expr END */ -#line 1041 "bison_parser.y" +#line 1040 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4365 "bison_parser.cpp" +#line 4359 "bison_parser.cpp" break; case 197: /* case_expr: CASE case_list END */ -#line 1042 "bison_parser.y" +#line 1041 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } -#line 4371 "bison_parser.cpp" +#line 4365 "bison_parser.cpp" break; case 198: /* case_expr: CASE case_list ELSE expr END */ -#line 1043 "bison_parser.y" +#line 1042 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4377 "bison_parser.cpp" +#line 4371 "bison_parser.cpp" break; case 199: /* case_list: WHEN expr THEN expr */ -#line 1047 "bison_parser.y" +#line 1046 "bison_parser.y" { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4383 "bison_parser.cpp" +#line 4377 "bison_parser.cpp" break; case 200: /* case_list: case_list WHEN expr THEN expr */ -#line 1048 "bison_parser.y" +#line 1047 "bison_parser.y" { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4389 "bison_parser.cpp" +#line 4383 "bison_parser.cpp" break; case 201: /* exists_expr: EXISTS '(' select_no_paren ')' */ -#line 1052 "bison_parser.y" +#line 1051 "bison_parser.y" { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 4395 "bison_parser.cpp" +#line 4389 "bison_parser.cpp" break; case 202: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ -#line 1053 "bison_parser.y" +#line 1052 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 4401 "bison_parser.cpp" +#line 4395 "bison_parser.cpp" break; case 203: /* comp_expr: operand '=' operand */ -#line 1057 "bison_parser.y" +#line 1056 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4407 "bison_parser.cpp" +#line 4401 "bison_parser.cpp" break; case 204: /* comp_expr: operand EQUALS operand */ -#line 1058 "bison_parser.y" +#line 1057 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4413 "bison_parser.cpp" +#line 4407 "bison_parser.cpp" break; case 205: /* comp_expr: operand NOTEQUALS operand */ -#line 1059 "bison_parser.y" +#line 1058 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 4419 "bison_parser.cpp" +#line 4413 "bison_parser.cpp" break; case 206: /* comp_expr: operand '<' operand */ -#line 1060 "bison_parser.y" +#line 1059 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 4425 "bison_parser.cpp" +#line 4419 "bison_parser.cpp" break; case 207: /* comp_expr: operand '>' operand */ -#line 1061 "bison_parser.y" +#line 1060 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 4431 "bison_parser.cpp" +#line 4425 "bison_parser.cpp" break; case 208: /* comp_expr: operand LESSEQ operand */ -#line 1062 "bison_parser.y" +#line 1061 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 4437 "bison_parser.cpp" +#line 4431 "bison_parser.cpp" break; case 209: /* comp_expr: operand GREATEREQ operand */ -#line 1063 "bison_parser.y" +#line 1062 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 4443 "bison_parser.cpp" +#line 4437 "bison_parser.cpp" break; case 210: /* function_expr: IDENTIFIER '(' ')' */ -#line 1067 "bison_parser.y" +#line 1066 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 4449 "bison_parser.cpp" +#line 4443 "bison_parser.cpp" break; case 211: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ -#line 1068 "bison_parser.y" +#line 1067 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 4455 "bison_parser.cpp" +#line 4449 "bison_parser.cpp" break; case 212: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ -#line 1072 "bison_parser.y" +#line 1071 "bison_parser.y" { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } -#line 4461 "bison_parser.cpp" +#line 4455 "bison_parser.cpp" break; case 213: /* cast_expr: CAST '(' expr AS column_type ')' */ -#line 1076 "bison_parser.y" +#line 1075 "bison_parser.y" { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } -#line 4467 "bison_parser.cpp" +#line 4461 "bison_parser.cpp" break; case 214: /* datetime_field: SECOND */ -#line 1080 "bison_parser.y" +#line 1079 "bison_parser.y" { (yyval.datetime_field) = kDatetimeSecond; } -#line 4473 "bison_parser.cpp" +#line 4467 "bison_parser.cpp" break; case 215: /* datetime_field: MINUTE */ -#line 1081 "bison_parser.y" +#line 1080 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMinute; } -#line 4479 "bison_parser.cpp" +#line 4473 "bison_parser.cpp" break; case 216: /* datetime_field: HOUR */ -#line 1082 "bison_parser.y" +#line 1081 "bison_parser.y" { (yyval.datetime_field) = kDatetimeHour; } -#line 4485 "bison_parser.cpp" +#line 4479 "bison_parser.cpp" break; case 217: /* datetime_field: DAY */ -#line 1083 "bison_parser.y" +#line 1082 "bison_parser.y" { (yyval.datetime_field) = kDatetimeDay; } -#line 4491 "bison_parser.cpp" +#line 4485 "bison_parser.cpp" break; case 218: /* datetime_field: MONTH */ -#line 1084 "bison_parser.y" +#line 1083 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMonth; } -#line 4497 "bison_parser.cpp" +#line 4491 "bison_parser.cpp" break; case 219: /* datetime_field: YEAR */ -#line 1085 "bison_parser.y" +#line 1084 "bison_parser.y" { (yyval.datetime_field) = kDatetimeYear; } -#line 4503 "bison_parser.cpp" +#line 4497 "bison_parser.cpp" break; case 220: /* array_expr: ARRAY '[' expr_list ']' */ -#line 1089 "bison_parser.y" +#line 1088 "bison_parser.y" { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 4509 "bison_parser.cpp" +#line 4503 "bison_parser.cpp" break; case 221: /* array_index: operand '[' int_literal ']' */ -#line 1093 "bison_parser.y" +#line 1092 "bison_parser.y" { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 4515 "bison_parser.cpp" +#line 4509 "bison_parser.cpp" break; case 222: /* between_expr: operand BETWEEN operand AND operand */ -#line 1097 "bison_parser.y" +#line 1096 "bison_parser.y" { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4521 "bison_parser.cpp" +#line 4515 "bison_parser.cpp" break; case 223: /* column_name: IDENTIFIER */ -#line 1101 "bison_parser.y" +#line 1100 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 4527 "bison_parser.cpp" +#line 4521 "bison_parser.cpp" break; case 224: /* column_name: IDENTIFIER '.' IDENTIFIER */ -#line 1102 "bison_parser.y" +#line 1101 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 4533 "bison_parser.cpp" +#line 4527 "bison_parser.cpp" break; case 225: /* column_name: '*' */ -#line 1103 "bison_parser.y" +#line 1102 "bison_parser.y" { (yyval.expr) = Expr::makeStar(); } -#line 4539 "bison_parser.cpp" +#line 4533 "bison_parser.cpp" break; case 226: /* column_name: IDENTIFIER '.' '*' */ -#line 1104 "bison_parser.y" +#line 1103 "bison_parser.y" { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 4545 "bison_parser.cpp" +#line 4539 "bison_parser.cpp" break; case 232: /* string_literal: STRING */ -#line 1116 "bison_parser.y" +#line 1115 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 4551 "bison_parser.cpp" +#line 4545 "bison_parser.cpp" break; case 233: /* bool_literal: TRUE */ -#line 1120 "bison_parser.y" +#line 1119 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(true); } -#line 4557 "bison_parser.cpp" +#line 4551 "bison_parser.cpp" break; case 234: /* bool_literal: FALSE */ -#line 1121 "bison_parser.y" +#line 1120 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(false); } -#line 4563 "bison_parser.cpp" +#line 4557 "bison_parser.cpp" break; case 235: /* num_literal: FLOATVAL */ -#line 1125 "bison_parser.y" +#line 1124 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 4569 "bison_parser.cpp" +#line 4563 "bison_parser.cpp" break; case 237: /* int_literal: INTVAL */ -#line 1130 "bison_parser.y" +#line 1129 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 4575 "bison_parser.cpp" +#line 4569 "bison_parser.cpp" break; case 238: /* null_literal: NULL */ -#line 1134 "bison_parser.y" +#line 1133 "bison_parser.y" { (yyval.expr) = Expr::makeNullLiteral(); } -#line 4581 "bison_parser.cpp" +#line 4575 "bison_parser.cpp" break; case 239: /* param_expr: '?' */ -#line 1138 "bison_parser.y" +#line 1137 "bison_parser.y" { (yyval.expr) = Expr::makeParameter(yylloc.total_column); (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 4591 "bison_parser.cpp" +#line 4585 "bison_parser.cpp" break; case 241: /* table_ref: table_ref_commalist ',' table_ref_atomic */ -#line 1151 "bison_parser.y" +#line 1150 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); auto tbl = new TableRef(kTableCrossProduct); tbl->list = (yyvsp[-2].table_vec); (yyval.table) = tbl; } -#line 4602 "bison_parser.cpp" +#line 4596 "bison_parser.cpp" break; case 245: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ -#line 1167 "bison_parser.y" +#line 1166 "bison_parser.y" { auto tbl = new TableRef(kTableSelect); tbl->select = (yyvsp[-2].select_stmt); tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4613 "bison_parser.cpp" +#line 4607 "bison_parser.cpp" break; case 246: /* table_ref_commalist: table_ref_atomic */ -#line 1176 "bison_parser.y" +#line 1175 "bison_parser.y" { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 4619 "bison_parser.cpp" +#line 4613 "bison_parser.cpp" break; case 247: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ -#line 1177 "bison_parser.y" +#line 1176 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 4625 "bison_parser.cpp" +#line 4619 "bison_parser.cpp" break; case 248: /* table_ref_name: table_name opt_table_alias */ -#line 1182 "bison_parser.y" +#line 1181 "bison_parser.y" { auto tbl = new TableRef(kTableName); tbl->schema = (yyvsp[-1].table_name).schema; @@ -4633,121 +4627,121 @@ YYLTYPE yylloc = yyloc_default; tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4637 "bison_parser.cpp" +#line 4631 "bison_parser.cpp" break; case 249: /* table_ref_name_no_alias: table_name */ -#line 1193 "bison_parser.y" +#line 1192 "bison_parser.y" { (yyval.table) = new TableRef(kTableName); (yyval.table)->schema = (yyvsp[0].table_name).schema; (yyval.table)->name = (yyvsp[0].table_name).name; } -#line 4647 "bison_parser.cpp" +#line 4641 "bison_parser.cpp" break; case 250: /* table_name: IDENTIFIER */ -#line 1202 "bison_parser.y" +#line 1201 "bison_parser.y" { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} -#line 4653 "bison_parser.cpp" +#line 4647 "bison_parser.cpp" break; case 251: /* table_name: IDENTIFIER '.' IDENTIFIER */ -#line 1203 "bison_parser.y" +#line 1202 "bison_parser.y" { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } -#line 4659 "bison_parser.cpp" +#line 4653 "bison_parser.cpp" break; case 252: /* opt_index_name: IDENTIFIER */ -#line 1207 "bison_parser.y" +#line 1206 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4665 "bison_parser.cpp" +#line 4659 "bison_parser.cpp" break; case 253: /* opt_index_name: %empty */ -#line 1208 "bison_parser.y" +#line 1207 "bison_parser.y" { (yyval.sval) = nullptr;} -#line 4671 "bison_parser.cpp" +#line 4665 "bison_parser.cpp" break; case 254: /* index_name: IDENTIFIER */ -#line 1212 "bison_parser.y" +#line 1211 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4677 "bison_parser.cpp" +#line 4671 "bison_parser.cpp" break; case 256: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ -#line 1218 "bison_parser.y" +#line 1217 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } -#line 4683 "bison_parser.cpp" +#line 4677 "bison_parser.cpp" break; case 258: /* opt_table_alias: %empty */ -#line 1224 "bison_parser.y" +#line 1223 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4689 "bison_parser.cpp" +#line 4683 "bison_parser.cpp" break; case 259: /* alias: AS IDENTIFIER */ -#line 1229 "bison_parser.y" +#line 1228 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4695 "bison_parser.cpp" +#line 4689 "bison_parser.cpp" break; case 260: /* alias: IDENTIFIER */ -#line 1230 "bison_parser.y" +#line 1229 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4701 "bison_parser.cpp" +#line 4695 "bison_parser.cpp" break; case 262: /* opt_alias: %empty */ -#line 1236 "bison_parser.y" +#line 1235 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4707 "bison_parser.cpp" +#line 4701 "bison_parser.cpp" break; case 264: /* opt_with_clause: %empty */ -#line 1246 "bison_parser.y" +#line 1245 "bison_parser.y" { (yyval.with_description_vec) = nullptr; } -#line 4713 "bison_parser.cpp" +#line 4707 "bison_parser.cpp" break; case 265: /* with_clause: WITH with_description_list */ -#line 1250 "bison_parser.y" +#line 1249 "bison_parser.y" { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } -#line 4719 "bison_parser.cpp" +#line 4713 "bison_parser.cpp" break; case 266: /* with_description_list: with_description */ -#line 1254 "bison_parser.y" +#line 1253 "bison_parser.y" { (yyval.with_description_vec) = new std::vector(); (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); } -#line 4728 "bison_parser.cpp" +#line 4722 "bison_parser.cpp" break; case 267: /* with_description_list: with_description_list ',' with_description */ -#line 1258 "bison_parser.y" +#line 1257 "bison_parser.y" { (yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t)); (yyval.with_description_vec) = (yyvsp[-2].with_description_vec); } -#line 4737 "bison_parser.cpp" +#line 4731 "bison_parser.cpp" break; case 268: /* with_description: IDENTIFIER AS select_with_paren */ -#line 1265 "bison_parser.y" +#line 1264 "bison_parser.y" { (yyval.with_description_t) = new WithDescription(); (yyval.with_description_t)->alias = (yyvsp[-2].sval); (yyval.with_description_t)->select = (yyvsp[0].select_stmt); } -#line 4747 "bison_parser.cpp" +#line 4741 "bison_parser.cpp" break; case 269: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ -#line 1279 "bison_parser.y" +#line 1278 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4755,11 +4749,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 4759 "bison_parser.cpp" +#line 4753 "bison_parser.cpp" break; case 270: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ -#line 1287 "bison_parser.y" +#line 1286 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4768,11 +4762,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 4772 "bison_parser.cpp" +#line 4766 "bison_parser.cpp" break; case 271: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ -#line 1297 "bison_parser.y" +#line 1296 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4788,83 +4782,83 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } -#line 4792 "bison_parser.cpp" +#line 4786 "bison_parser.cpp" break; case 272: /* opt_join_type: INNER */ -#line 1315 "bison_parser.y" +#line 1314 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4798 "bison_parser.cpp" +#line 4792 "bison_parser.cpp" break; case 273: /* opt_join_type: LEFT OUTER */ +#line 1315 "bison_parser.y" + { (yyval.uval) = kJoinLeft; } +#line 4798 "bison_parser.cpp" + break; + + case 274: /* opt_join_type: LEFT */ #line 1316 "bison_parser.y" { (yyval.uval) = kJoinLeft; } #line 4804 "bison_parser.cpp" break; - case 274: /* opt_join_type: LEFT */ + case 275: /* opt_join_type: RIGHT OUTER */ #line 1317 "bison_parser.y" - { (yyval.uval) = kJoinLeft; } + { (yyval.uval) = kJoinRight; } #line 4810 "bison_parser.cpp" break; - case 275: /* opt_join_type: RIGHT OUTER */ + case 276: /* opt_join_type: RIGHT */ #line 1318 "bison_parser.y" { (yyval.uval) = kJoinRight; } #line 4816 "bison_parser.cpp" break; - case 276: /* opt_join_type: RIGHT */ + case 277: /* opt_join_type: FULL OUTER */ #line 1319 "bison_parser.y" - { (yyval.uval) = kJoinRight; } + { (yyval.uval) = kJoinFull; } #line 4822 "bison_parser.cpp" break; - case 277: /* opt_join_type: FULL OUTER */ + case 278: /* opt_join_type: OUTER */ #line 1320 "bison_parser.y" { (yyval.uval) = kJoinFull; } #line 4828 "bison_parser.cpp" break; - case 278: /* opt_join_type: OUTER */ + case 279: /* opt_join_type: FULL */ #line 1321 "bison_parser.y" { (yyval.uval) = kJoinFull; } #line 4834 "bison_parser.cpp" break; - case 279: /* opt_join_type: FULL */ -#line 1322 "bison_parser.y" - { (yyval.uval) = kJoinFull; } -#line 4840 "bison_parser.cpp" - break; - case 280: /* opt_join_type: CROSS */ -#line 1323 "bison_parser.y" +#line 1322 "bison_parser.y" { (yyval.uval) = kJoinCross; } -#line 4846 "bison_parser.cpp" +#line 4840 "bison_parser.cpp" break; case 281: /* opt_join_type: %empty */ -#line 1324 "bison_parser.y" +#line 1323 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4852 "bison_parser.cpp" +#line 4846 "bison_parser.cpp" break; case 285: /* ident_commalist: IDENTIFIER */ -#line 1344 "bison_parser.y" +#line 1343 "bison_parser.y" { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 4858 "bison_parser.cpp" +#line 4852 "bison_parser.cpp" break; case 286: /* ident_commalist: ident_commalist ',' IDENTIFIER */ -#line 1345 "bison_parser.y" +#line 1344 "bison_parser.y" { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 4864 "bison_parser.cpp" +#line 4858 "bison_parser.cpp" break; -#line 4868 "bison_parser.cpp" +#line 4862 "bison_parser.cpp" default: break; } @@ -5094,7 +5088,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 1348 "bison_parser.y" +#line 1347 "bison_parser.y" /********************************* ** Section 4: Additional C code From b2442c5e1d8f92f608c8ea1710cda0045ac00929 Mon Sep 17 00:00:00 2001 From: simonstadlinger Date: Wed, 25 Aug 2021 18:15:00 +0200 Subject: [PATCH 43/73] Try to fix shift reduce conflict; Failed --- src/parser/Makefile | 2 +- src/parser/bison_parser.cpp | 5141 ----------------------------------- 2 files changed, 1 insertion(+), 5142 deletions(-) delete mode 100644 src/parser/bison_parser.cpp diff --git a/src/parser/Makefile b/src/parser/Makefile index af0baed6..f2c5cf13 100644 --- a/src/parser/Makefile +++ b/src/parser/Makefile @@ -17,7 +17,7 @@ endif all: bison_parser.cpp flex_lexer.cpp bison_parser.cpp: bison_parser.y - $(BISON) bison_parser.y --output=bison_parser.cpp --defines=bison_parser.h --verbose + $(BISON) bison_parser.y --output=bison_parser.cpp --defines=bison_parser.h --verbose -Wcounterexamples flex_lexer.cpp: flex_lexer.l $(FLEX) flex_lexer.l diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp deleted file mode 100644 index 7be77a4c..00000000 --- a/src/parser/bison_parser.cpp +++ /dev/null @@ -1,5141 +0,0 @@ -/* A Bison parser, made by GNU Bison 3.7.6. */ - -/* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 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 - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, - especially those whose name start with YY_ or yy_. They are - private implementation details that can be changed or removed. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output, and Bison version. */ -#define YYBISON 30706 - -/* Bison version string. */ -#define YYBISON_VERSION "3.7.6" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 2 - -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - -/* Substitute the type names. */ -#define YYSTYPE HSQL_STYPE -#define YYLTYPE HSQL_LTYPE -/* Substitute the variable and function names. */ -#define yyparse hsql_parse -#define yylex hsql_lex -#define yyerror hsql_error -#define yydebug hsql_debug -#define yynerrs hsql_nerrs - -/* First part of user prologue. */ -#line 1 "bison_parser.y" - -/** - * bison_parser.y - * defines bison_parser.h - * outputs bison_parser.c - * - * Grammar File Spec: http://dinosaur.compilertools.net/bison/bison_6.html - * - */ -/********************************* - ** Section 1: C Declarations - *********************************/ - -#include "bison_parser.h" -#include "flex_lexer.h" - -#include -#include - -using namespace hsql; - -int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const char *msg) { - result->setIsValid(false); - result->setErrorDetails(strdup(msg), llocp->first_line, llocp->first_column); - return 0; -} - - -#line 107 "bison_parser.cpp" - -# ifndef YY_CAST -# ifdef __cplusplus -# define YY_CAST(Type, Val) static_cast (Val) -# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) -# else -# define YY_CAST(Type, Val) ((Type) (Val)) -# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) -# endif -# endif -# ifndef YY_NULLPTR -# if defined __cplusplus -# if 201103L <= __cplusplus -# define YY_NULLPTR nullptr -# else -# define YY_NULLPTR 0 -# endif -# else -# define YY_NULLPTR ((void*)0) -# endif -# endif - -#include "bison_parser.h" -/* Symbol kind. */ -enum yysymbol_kind_t -{ - YYSYMBOL_YYEMPTY = -2, - YYSYMBOL_YYEOF = 0, /* "end of file" */ - YYSYMBOL_YYerror = 1, /* error */ - YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ - YYSYMBOL_IDENTIFIER = 3, /* IDENTIFIER */ - YYSYMBOL_STRING = 4, /* STRING */ - YYSYMBOL_FLOATVAL = 5, /* FLOATVAL */ - YYSYMBOL_INTVAL = 6, /* INTVAL */ - YYSYMBOL_DEALLOCATE = 7, /* DEALLOCATE */ - YYSYMBOL_PARAMETERS = 8, /* PARAMETERS */ - YYSYMBOL_INTERSECT = 9, /* INTERSECT */ - YYSYMBOL_TEMPORARY = 10, /* TEMPORARY */ - YYSYMBOL_TIMESTAMP = 11, /* TIMESTAMP */ - YYSYMBOL_DISTINCT = 12, /* DISTINCT */ - YYSYMBOL_NVARCHAR = 13, /* NVARCHAR */ - YYSYMBOL_RESTRICT = 14, /* RESTRICT */ - YYSYMBOL_TRUNCATE = 15, /* TRUNCATE */ - YYSYMBOL_ANALYZE = 16, /* ANALYZE */ - YYSYMBOL_BETWEEN = 17, /* BETWEEN */ - YYSYMBOL_CASCADE = 18, /* CASCADE */ - YYSYMBOL_COLUMNS = 19, /* COLUMNS */ - YYSYMBOL_CONTROL = 20, /* CONTROL */ - YYSYMBOL_DEFAULT = 21, /* DEFAULT */ - YYSYMBOL_EXECUTE = 22, /* EXECUTE */ - YYSYMBOL_EXPLAIN = 23, /* EXPLAIN */ - YYSYMBOL_INTEGER = 24, /* INTEGER */ - YYSYMBOL_NATURAL = 25, /* NATURAL */ - YYSYMBOL_PREPARE = 26, /* PREPARE */ - YYSYMBOL_PRIMARY = 27, /* PRIMARY */ - YYSYMBOL_SCHEMAS = 28, /* SCHEMAS */ - YYSYMBOL_CHARACTER = 29, /* CHARACTER */ - YYSYMBOL_VARYING = 30, /* VARYING */ - YYSYMBOL_REAL = 31, /* REAL */ - YYSYMBOL_DECIMAL = 32, /* DECIMAL */ - YYSYMBOL_SPATIAL = 33, /* SPATIAL */ - YYSYMBOL_VARCHAR = 34, /* VARCHAR */ - YYSYMBOL_VIRTUAL = 35, /* VIRTUAL */ - YYSYMBOL_DESCRIBE = 36, /* DESCRIBE */ - YYSYMBOL_BEFORE = 37, /* BEFORE */ - YYSYMBOL_COLUMN = 38, /* COLUMN */ - YYSYMBOL_CREATE = 39, /* CREATE */ - YYSYMBOL_DELETE = 40, /* DELETE */ - YYSYMBOL_DIRECT = 41, /* DIRECT */ - YYSYMBOL_DOUBLE = 42, /* DOUBLE */ - YYSYMBOL_ESCAPE = 43, /* ESCAPE */ - YYSYMBOL_EXCEPT = 44, /* EXCEPT */ - YYSYMBOL_EXISTS = 45, /* EXISTS */ - YYSYMBOL_EXTRACT = 46, /* EXTRACT */ - YYSYMBOL_CAST = 47, /* CAST */ - YYSYMBOL_FORMAT = 48, /* FORMAT */ - YYSYMBOL_GLOBAL = 49, /* GLOBAL */ - YYSYMBOL_HAVING = 50, /* HAVING */ - YYSYMBOL_IMPORT = 51, /* IMPORT */ - YYSYMBOL_INSERT = 52, /* INSERT */ - YYSYMBOL_ISNULL = 53, /* ISNULL */ - YYSYMBOL_OFFSET = 54, /* OFFSET */ - YYSYMBOL_RENAME = 55, /* RENAME */ - YYSYMBOL_SCHEMA = 56, /* SCHEMA */ - YYSYMBOL_SELECT = 57, /* SELECT */ - YYSYMBOL_SORTED = 58, /* SORTED */ - YYSYMBOL_TABLES = 59, /* TABLES */ - YYSYMBOL_UNIQUE = 60, /* UNIQUE */ - YYSYMBOL_UNLOAD = 61, /* UNLOAD */ - YYSYMBOL_UPDATE = 62, /* UPDATE */ - YYSYMBOL_VALUES = 63, /* VALUES */ - YYSYMBOL_AFTER = 64, /* AFTER */ - YYSYMBOL_ALTER = 65, /* ALTER */ - YYSYMBOL_CROSS = 66, /* CROSS */ - YYSYMBOL_DELTA = 67, /* DELTA */ - YYSYMBOL_FLOAT = 68, /* FLOAT */ - YYSYMBOL_GROUP = 69, /* GROUP */ - YYSYMBOL_INDEX = 70, /* INDEX */ - YYSYMBOL_INNER = 71, /* INNER */ - YYSYMBOL_LIMIT = 72, /* LIMIT */ - YYSYMBOL_LOCAL = 73, /* LOCAL */ - YYSYMBOL_MERGE = 74, /* MERGE */ - YYSYMBOL_MINUS = 75, /* MINUS */ - YYSYMBOL_ORDER = 76, /* ORDER */ - YYSYMBOL_OUTER = 77, /* OUTER */ - YYSYMBOL_RIGHT = 78, /* RIGHT */ - YYSYMBOL_TABLE = 79, /* TABLE */ - YYSYMBOL_UNION = 80, /* UNION */ - YYSYMBOL_USING = 81, /* USING */ - YYSYMBOL_WHERE = 82, /* WHERE */ - YYSYMBOL_CALL = 83, /* CALL */ - YYSYMBOL_CASE = 84, /* CASE */ - YYSYMBOL_CHAR = 85, /* CHAR */ - YYSYMBOL_COPY = 86, /* COPY */ - YYSYMBOL_DATE = 87, /* DATE */ - YYSYMBOL_DATETIME = 88, /* DATETIME */ - YYSYMBOL_DESC = 89, /* DESC */ - YYSYMBOL_DROP = 90, /* DROP */ - YYSYMBOL_ELSE = 91, /* ELSE */ - YYSYMBOL_FILE = 92, /* FILE */ - YYSYMBOL_FROM = 93, /* FROM */ - YYSYMBOL_FULL = 94, /* FULL */ - YYSYMBOL_HASH = 95, /* HASH */ - YYSYMBOL_HINT = 96, /* HINT */ - YYSYMBOL_INTO = 97, /* INTO */ - YYSYMBOL_JOIN = 98, /* JOIN */ - YYSYMBOL_LEFT = 99, /* LEFT */ - YYSYMBOL_LIKE = 100, /* LIKE */ - YYSYMBOL_LOAD = 101, /* LOAD */ - YYSYMBOL_LONG = 102, /* LONG */ - YYSYMBOL_NULL = 103, /* NULL */ - YYSYMBOL_PLAN = 104, /* PLAN */ - YYSYMBOL_SHOW = 105, /* SHOW */ - YYSYMBOL_TEXT = 106, /* TEXT */ - YYSYMBOL_THEN = 107, /* THEN */ - YYSYMBOL_TIME = 108, /* TIME */ - YYSYMBOL_VIEW = 109, /* VIEW */ - YYSYMBOL_WHEN = 110, /* WHEN */ - YYSYMBOL_WITH = 111, /* WITH */ - YYSYMBOL_ADD = 112, /* ADD */ - YYSYMBOL_ALL = 113, /* ALL */ - YYSYMBOL_AND = 114, /* AND */ - YYSYMBOL_ASC = 115, /* ASC */ - YYSYMBOL_END = 116, /* END */ - YYSYMBOL_FOR = 117, /* FOR */ - YYSYMBOL_INT = 118, /* INT */ - YYSYMBOL_KEY = 119, /* KEY */ - YYSYMBOL_NOT = 120, /* NOT */ - YYSYMBOL_OFF = 121, /* OFF */ - YYSYMBOL_SET = 122, /* SET */ - YYSYMBOL_TOP = 123, /* TOP */ - YYSYMBOL_AS = 124, /* AS */ - YYSYMBOL_BY = 125, /* BY */ - YYSYMBOL_IF = 126, /* IF */ - YYSYMBOL_IN = 127, /* IN */ - YYSYMBOL_IS = 128, /* IS */ - YYSYMBOL_OF = 129, /* OF */ - YYSYMBOL_ON = 130, /* ON */ - YYSYMBOL_OR = 131, /* OR */ - YYSYMBOL_TO = 132, /* TO */ - YYSYMBOL_ARRAY = 133, /* ARRAY */ - YYSYMBOL_CONCAT = 134, /* CONCAT */ - YYSYMBOL_ILIKE = 135, /* ILIKE */ - YYSYMBOL_SECOND = 136, /* SECOND */ - YYSYMBOL_MINUTE = 137, /* MINUTE */ - YYSYMBOL_HOUR = 138, /* HOUR */ - YYSYMBOL_DAY = 139, /* DAY */ - YYSYMBOL_MONTH = 140, /* MONTH */ - YYSYMBOL_YEAR = 141, /* YEAR */ - YYSYMBOL_TRUE = 142, /* TRUE */ - YYSYMBOL_FALSE = 143, /* FALSE */ - YYSYMBOL_TRANSACTION = 144, /* TRANSACTION */ - YYSYMBOL_BEGIN = 145, /* BEGIN */ - YYSYMBOL_COMMIT = 146, /* COMMIT */ - YYSYMBOL_ROLLBACK = 147, /* ROLLBACK */ - YYSYMBOL_148_ = 148, /* '=' */ - YYSYMBOL_EQUALS = 149, /* EQUALS */ - YYSYMBOL_NOTEQUALS = 150, /* NOTEQUALS */ - YYSYMBOL_151_ = 151, /* '<' */ - YYSYMBOL_152_ = 152, /* '>' */ - YYSYMBOL_LESS = 153, /* LESS */ - YYSYMBOL_GREATER = 154, /* GREATER */ - YYSYMBOL_LESSEQ = 155, /* LESSEQ */ - YYSYMBOL_GREATEREQ = 156, /* GREATEREQ */ - YYSYMBOL_NOTNULL = 157, /* NOTNULL */ - YYSYMBOL_158_ = 158, /* '+' */ - YYSYMBOL_159_ = 159, /* '-' */ - YYSYMBOL_160_ = 160, /* '*' */ - YYSYMBOL_161_ = 161, /* '/' */ - YYSYMBOL_162_ = 162, /* '%' */ - YYSYMBOL_163_ = 163, /* '^' */ - YYSYMBOL_UMINUS = 164, /* UMINUS */ - YYSYMBOL_165_ = 165, /* '[' */ - YYSYMBOL_166_ = 166, /* ']' */ - YYSYMBOL_167_ = 167, /* '(' */ - YYSYMBOL_168_ = 168, /* ')' */ - YYSYMBOL_169_ = 169, /* '.' */ - YYSYMBOL_170_ = 170, /* ';' */ - YYSYMBOL_171_ = 171, /* ',' */ - YYSYMBOL_172_ = 172, /* '?' */ - YYSYMBOL_YYACCEPT = 173, /* $accept */ - YYSYMBOL_input = 174, /* input */ - YYSYMBOL_statement_list = 175, /* statement_list */ - YYSYMBOL_statement = 176, /* statement */ - YYSYMBOL_preparable_statement = 177, /* preparable_statement */ - YYSYMBOL_opt_hints = 178, /* opt_hints */ - YYSYMBOL_hint_list = 179, /* hint_list */ - YYSYMBOL_hint = 180, /* hint */ - YYSYMBOL_transaction_statement = 181, /* transaction_statement */ - YYSYMBOL_opt_transaction_keyword = 182, /* opt_transaction_keyword */ - YYSYMBOL_prepare_statement = 183, /* prepare_statement */ - YYSYMBOL_prepare_target_query = 184, /* prepare_target_query */ - YYSYMBOL_execute_statement = 185, /* execute_statement */ - YYSYMBOL_import_statement = 186, /* import_statement */ - YYSYMBOL_file_type = 187, /* file_type */ - YYSYMBOL_file_path = 188, /* file_path */ - YYSYMBOL_opt_file_type = 189, /* opt_file_type */ - YYSYMBOL_export_statement = 190, /* export_statement */ - YYSYMBOL_show_statement = 191, /* show_statement */ - YYSYMBOL_create_statement = 192, /* create_statement */ - YYSYMBOL_opt_not_exists = 193, /* opt_not_exists */ - YYSYMBOL_table_elem_commalist = 194, /* table_elem_commalist */ - YYSYMBOL_table_elem = 195, /* table_elem */ - YYSYMBOL_column_def = 196, /* column_def */ - YYSYMBOL_column_type = 197, /* column_type */ - YYSYMBOL_opt_time_specification = 198, /* opt_time_specification */ - YYSYMBOL_opt_decimal_specification = 199, /* opt_decimal_specification */ - YYSYMBOL_opt_column_constraints = 200, /* opt_column_constraints */ - YYSYMBOL_column_constraint = 201, /* column_constraint */ - YYSYMBOL_table_constraint = 202, /* table_constraint */ - YYSYMBOL_drop_statement = 203, /* drop_statement */ - YYSYMBOL_opt_exists = 204, /* opt_exists */ - YYSYMBOL_alter_statement = 205, /* alter_statement */ - YYSYMBOL_alter_action = 206, /* alter_action */ - YYSYMBOL_drop_action = 207, /* drop_action */ - YYSYMBOL_delete_statement = 208, /* delete_statement */ - YYSYMBOL_truncate_statement = 209, /* truncate_statement */ - YYSYMBOL_insert_statement = 210, /* insert_statement */ - YYSYMBOL_opt_column_list = 211, /* opt_column_list */ - YYSYMBOL_update_statement = 212, /* update_statement */ - YYSYMBOL_update_clause_commalist = 213, /* update_clause_commalist */ - YYSYMBOL_update_clause = 214, /* update_clause */ - YYSYMBOL_select_statement = 215, /* select_statement */ - YYSYMBOL_select_within_set_operation = 216, /* select_within_set_operation */ - YYSYMBOL_select_within_set_operation_no_parentheses = 217, /* select_within_set_operation_no_parentheses */ - YYSYMBOL_select_with_paren = 218, /* select_with_paren */ - YYSYMBOL_select_no_paren = 219, /* select_no_paren */ - YYSYMBOL_set_operator = 220, /* set_operator */ - YYSYMBOL_set_type = 221, /* set_type */ - YYSYMBOL_opt_all = 222, /* opt_all */ - YYSYMBOL_select_clause = 223, /* select_clause */ - YYSYMBOL_opt_distinct = 224, /* opt_distinct */ - YYSYMBOL_select_list = 225, /* select_list */ - YYSYMBOL_opt_from_clause = 226, /* opt_from_clause */ - YYSYMBOL_from_clause = 227, /* from_clause */ - YYSYMBOL_opt_where = 228, /* opt_where */ - YYSYMBOL_opt_group = 229, /* opt_group */ - YYSYMBOL_opt_having = 230, /* opt_having */ - YYSYMBOL_opt_order = 231, /* opt_order */ - YYSYMBOL_order_list = 232, /* order_list */ - YYSYMBOL_order_desc = 233, /* order_desc */ - YYSYMBOL_opt_order_type = 234, /* opt_order_type */ - YYSYMBOL_opt_top = 235, /* opt_top */ - YYSYMBOL_opt_limit = 236, /* opt_limit */ - YYSYMBOL_expr_list = 237, /* expr_list */ - YYSYMBOL_opt_literal_list = 238, /* opt_literal_list */ - YYSYMBOL_literal_list = 239, /* literal_list */ - YYSYMBOL_expr_alias = 240, /* expr_alias */ - YYSYMBOL_expr = 241, /* expr */ - YYSYMBOL_operand = 242, /* operand */ - YYSYMBOL_scalar_expr = 243, /* scalar_expr */ - YYSYMBOL_unary_expr = 244, /* unary_expr */ - YYSYMBOL_binary_expr = 245, /* binary_expr */ - YYSYMBOL_logic_expr = 246, /* logic_expr */ - YYSYMBOL_in_expr = 247, /* in_expr */ - YYSYMBOL_case_expr = 248, /* case_expr */ - YYSYMBOL_case_list = 249, /* case_list */ - YYSYMBOL_exists_expr = 250, /* exists_expr */ - YYSYMBOL_comp_expr = 251, /* comp_expr */ - YYSYMBOL_function_expr = 252, /* function_expr */ - YYSYMBOL_extract_expr = 253, /* extract_expr */ - YYSYMBOL_cast_expr = 254, /* cast_expr */ - YYSYMBOL_datetime_field = 255, /* datetime_field */ - YYSYMBOL_array_expr = 256, /* array_expr */ - YYSYMBOL_array_index = 257, /* array_index */ - YYSYMBOL_between_expr = 258, /* between_expr */ - YYSYMBOL_column_name = 259, /* column_name */ - YYSYMBOL_literal = 260, /* literal */ - YYSYMBOL_string_literal = 261, /* string_literal */ - YYSYMBOL_bool_literal = 262, /* bool_literal */ - YYSYMBOL_num_literal = 263, /* num_literal */ - YYSYMBOL_int_literal = 264, /* int_literal */ - YYSYMBOL_null_literal = 265, /* null_literal */ - YYSYMBOL_param_expr = 266, /* param_expr */ - YYSYMBOL_table_ref = 267, /* table_ref */ - YYSYMBOL_table_ref_atomic = 268, /* table_ref_atomic */ - YYSYMBOL_nonjoin_table_ref_atomic = 269, /* nonjoin_table_ref_atomic */ - YYSYMBOL_table_ref_commalist = 270, /* table_ref_commalist */ - YYSYMBOL_table_ref_name = 271, /* table_ref_name */ - YYSYMBOL_table_ref_name_no_alias = 272, /* table_ref_name_no_alias */ - YYSYMBOL_table_name = 273, /* table_name */ - YYSYMBOL_opt_index_name = 274, /* opt_index_name */ - YYSYMBOL_index_name = 275, /* index_name */ - YYSYMBOL_table_alias = 276, /* table_alias */ - YYSYMBOL_opt_table_alias = 277, /* opt_table_alias */ - YYSYMBOL_alias = 278, /* alias */ - YYSYMBOL_opt_alias = 279, /* opt_alias */ - YYSYMBOL_opt_with_clause = 280, /* opt_with_clause */ - YYSYMBOL_with_clause = 281, /* with_clause */ - YYSYMBOL_with_description_list = 282, /* with_description_list */ - YYSYMBOL_with_description = 283, /* with_description */ - YYSYMBOL_join_clause = 284, /* join_clause */ - YYSYMBOL_opt_join_type = 285, /* opt_join_type */ - YYSYMBOL_join_condition = 286, /* join_condition */ - YYSYMBOL_opt_semicolon = 287, /* opt_semicolon */ - YYSYMBOL_ident_commalist = 288 /* ident_commalist */ -}; -typedef enum yysymbol_kind_t yysymbol_kind_t; - - - - -#ifdef short -# undef short -#endif - -/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure - and (if available) are included - so that the code can choose integer types of a good width. */ - -#ifndef __PTRDIFF_MAX__ -# include /* INFRINGES ON USER NAME SPACE */ -# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_STDINT_H -# endif -#endif - -/* Narrow types that promote to a signed type and that can represent a - signed or unsigned integer of at least N bits. In tables they can - save space and decrease cache pressure. Promoting to a signed type - helps avoid bugs in integer arithmetic. */ - -#ifdef __INT_LEAST8_MAX__ -typedef __INT_LEAST8_TYPE__ yytype_int8; -#elif defined YY_STDINT_H -typedef int_least8_t yytype_int8; -#else -typedef signed char yytype_int8; -#endif - -#ifdef __INT_LEAST16_MAX__ -typedef __INT_LEAST16_TYPE__ yytype_int16; -#elif defined YY_STDINT_H -typedef int_least16_t yytype_int16; -#else -typedef short yytype_int16; -#endif - -/* Work around bug in HP-UX 11.23, which defines these macros - incorrectly for preprocessor constants. This workaround can likely - be removed in 2023, as HPE has promised support for HP-UX 11.23 - (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of - . */ -#ifdef __hpux -# undef UINT_LEAST8_MAX -# undef UINT_LEAST16_MAX -# define UINT_LEAST8_MAX 255 -# define UINT_LEAST16_MAX 65535 -#endif - -#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ -typedef __UINT_LEAST8_TYPE__ yytype_uint8; -#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ - && UINT_LEAST8_MAX <= INT_MAX) -typedef uint_least8_t yytype_uint8; -#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX -typedef unsigned char yytype_uint8; -#else -typedef short yytype_uint8; -#endif - -#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ -typedef __UINT_LEAST16_TYPE__ yytype_uint16; -#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ - && UINT_LEAST16_MAX <= INT_MAX) -typedef uint_least16_t yytype_uint16; -#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX -typedef unsigned short yytype_uint16; -#else -typedef int yytype_uint16; -#endif - -#ifndef YYPTRDIFF_T -# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ -# define YYPTRDIFF_T __PTRDIFF_TYPE__ -# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ -# elif defined PTRDIFF_MAX -# ifndef ptrdiff_t -# include /* INFRINGES ON USER NAME SPACE */ -# endif -# define YYPTRDIFF_T ptrdiff_t -# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX -# else -# define YYPTRDIFF_T long -# define YYPTRDIFF_MAXIMUM LONG_MAX -# endif -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned -# endif -#endif - -#define YYSIZE_MAXIMUM \ - YY_CAST (YYPTRDIFF_T, \ - (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ - ? YYPTRDIFF_MAXIMUM \ - : YY_CAST (YYSIZE_T, -1))) - -#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) - - -/* Stored state numbers (used for stacks). */ -typedef yytype_int16 yy_state_t; - -/* State numbers in computations. */ -typedef int yy_state_fast_t; - -#ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(Msgid) dgettext ("bison-runtime", Msgid) -# endif -# endif -# ifndef YY_ -# define YY_(Msgid) Msgid -# endif -#endif - - -#ifndef YY_ATTRIBUTE_PURE -# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) -# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) -# else -# define YY_ATTRIBUTE_PURE -# endif -#endif - -#ifndef YY_ATTRIBUTE_UNUSED -# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) -# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) -# else -# define YY_ATTRIBUTE_UNUSED -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YY_USE(E) ((void) (E)) -#else -# define YY_USE(E) /* empty */ -#endif - -#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") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ - _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ - _Pragma ("GCC diagnostic pop") -#else -# define YY_INITIAL_VALUE(Value) Value -#endif -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END -#endif -#ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ -#endif - -#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ -# define YY_IGNORE_USELESS_CAST_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") -# define YY_IGNORE_USELESS_CAST_END \ - _Pragma ("GCC diagnostic pop") -#endif -#ifndef YY_IGNORE_USELESS_CAST_BEGIN -# define YY_IGNORE_USELESS_CAST_BEGIN -# define YY_IGNORE_USELESS_CAST_END -#endif - - -#define YY_ASSERT(E) ((void) (0 && (E))) - -#if 1 - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS -# include /* INFRINGES ON USER NAME SPACE */ - /* Use EXIT_SUCCESS as a witness for stdlib.h. */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's 'empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* 1 */ - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined HSQL_LTYPE_IS_TRIVIAL && HSQL_LTYPE_IS_TRIVIAL \ - && defined HSQL_STYPE_IS_TRIVIAL && HSQL_STYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yy_state_t yyss_alloc; - YYSTYPE yyvs_alloc; - YYLTYPE yyls_alloc; -}; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \ - + YYSIZEOF (YYLTYPE)) \ - + 2 * YYSTACK_GAP_MAXIMUM) - -# define YYCOPY_NEEDED 1 - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYPTRDIFF_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / YYSIZEOF (*yyptr); \ - } \ - while (0) - -#endif - -#if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from SRC to DST. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) -# else -# define YYCOPY(Dst, Src, Count) \ - do \ - { \ - YYPTRDIFF_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } \ - while (0) -# endif -# endif -#endif /* !YYCOPY_NEEDED */ - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 67 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 867 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 173 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 116 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 288 -/* YYNSTATES -- Number of states. */ -#define YYNSTATES 535 - -/* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 410 - - -/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM - as returned by yylex, with out-of-bounds checking. */ -#define YYTRANSLATE(YYX) \ - (0 <= (YYX) && (YYX) <= YYMAXUTOK \ - ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ - : YYSYMBOL_YYUNDEF) - -/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM - as returned by yylex. */ -static const yytype_uint8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 162, 2, 2, - 167, 168, 160, 158, 171, 159, 169, 161, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 170, - 151, 148, 152, 172, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 165, 2, 166, 163, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 147, 149, 150, 153, 154, 155, 156, 157, - 164 -}; - -#if HSQL_DEBUG - /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_int16 yyrline[] = -{ - 0, 288, 288, 309, 315, 324, 328, 332, 335, 338, - 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 363, 364, 369, 370, 374, 378, 390, 393, 396, 402, - 403, 410, 417, 420, 424, 438, 444, 453, 470, 474, - 477, 486, 500, 503, 508, 522, 535, 542, 549, 556, - 567, 568, 572, 573, 577, 578, 582, 589, 590, 591, - 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, - 602, 606, 607, 611, 612, 613, 617, 618, 619, 623, - 624, 625, 626, 630, 631, 642, 648, 654, 659, 668, - 669, 678, 686, 689, 701, 710, 723, 730, 741, 742, - 752, 761, 762, 766, 778, 782, 786, 800, 801, 804, - 805, 816, 817, 821, 831, 844, 851, 855, 859, 866, - 869, 875, 887, 888, 892, 896, 897, 901, 906, 907, - 911, 916, 920, 921, 925, 926, 930, 931, 935, 939, - 940, 941, 947, 948, 952, 953, 954, 955, 956, 957, - 964, 965, 969, 970, 974, 975, 979, 989, 990, 991, - 992, 993, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, - 1005, 1006, 1007, 1011, 1012, 1016, 1017, 1018, 1019, 1020, - 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, - 1034, 1038, 1039, 1043, 1044, 1045, 1046, 1052, 1053, 1054, - 1055, 1059, 1060, 1064, 1065, 1069, 1070, 1071, 1072, 1073, - 1074, 1075, 1079, 1080, 1084, 1088, 1092, 1093, 1094, 1095, - 1096, 1097, 1101, 1105, 1109, 1113, 1114, 1115, 1116, 1120, - 1121, 1122, 1123, 1124, 1128, 1132, 1133, 1137, 1138, 1142, - 1146, 1150, 1162, 1163, 1173, 1174, 1178, 1179, 1188, 1189, - 1194, 1205, 1214, 1215, 1219, 1220, 1224, 1229, 1230, 1235, - 1236, 1241, 1242, 1247, 1248, 1257, 1258, 1262, 1266, 1270, - 1277, 1290, 1298, 1308, 1327, 1328, 1329, 1330, 1331, 1332, - 1333, 1334, 1335, 1336, 1341, 1350, 1351, 1356, 1357 -}; -#endif - -/** Accessing symbol of state STATE. */ -#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) - -#if 1 -/* The user-facing name of the symbol whose (internal) number is - YYSYMBOL. No bounds checking. */ -static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; - -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "\"end of file\"", "error", "\"invalid token\"", "IDENTIFIER", "STRING", - "FLOATVAL", "INTVAL", "DEALLOCATE", "PARAMETERS", "INTERSECT", - "TEMPORARY", "TIMESTAMP", "DISTINCT", "NVARCHAR", "RESTRICT", "TRUNCATE", - "ANALYZE", "BETWEEN", "CASCADE", "COLUMNS", "CONTROL", "DEFAULT", - "EXECUTE", "EXPLAIN", "INTEGER", "NATURAL", "PREPARE", "PRIMARY", - "SCHEMAS", "CHARACTER", "VARYING", "REAL", "DECIMAL", "SPATIAL", - "VARCHAR", "VIRTUAL", "DESCRIBE", "BEFORE", "COLUMN", "CREATE", "DELETE", - "DIRECT", "DOUBLE", "ESCAPE", "EXCEPT", "EXISTS", "EXTRACT", "CAST", - "FORMAT", "GLOBAL", "HAVING", "IMPORT", "INSERT", "ISNULL", "OFFSET", - "RENAME", "SCHEMA", "SELECT", "SORTED", "TABLES", "UNIQUE", "UNLOAD", - "UPDATE", "VALUES", "AFTER", "ALTER", "CROSS", "DELTA", "FLOAT", "GROUP", - "INDEX", "INNER", "LIMIT", "LOCAL", "MERGE", "MINUS", "ORDER", "OUTER", - "RIGHT", "TABLE", "UNION", "USING", "WHERE", "CALL", "CASE", "CHAR", - "COPY", "DATE", "DATETIME", "DESC", "DROP", "ELSE", "FILE", "FROM", - "FULL", "HASH", "HINT", "INTO", "JOIN", "LEFT", "LIKE", "LOAD", "LONG", - "NULL", "PLAN", "SHOW", "TEXT", "THEN", "TIME", "VIEW", "WHEN", "WITH", - "ADD", "ALL", "AND", "ASC", "END", "FOR", "INT", "KEY", "NOT", "OFF", - "SET", "TOP", "AS", "BY", "IF", "IN", "IS", "OF", "ON", "OR", "TO", - "ARRAY", "CONCAT", "ILIKE", "SECOND", "MINUTE", "HOUR", "DAY", "MONTH", - "YEAR", "TRUE", "FALSE", "TRANSACTION", "BEGIN", "COMMIT", "ROLLBACK", - "'='", "EQUALS", "NOTEQUALS", "'<'", "'>'", "LESS", "GREATER", "LESSEQ", - "GREATEREQ", "NOTNULL", "'+'", "'-'", "'*'", "'/'", "'%'", "'^'", - "UMINUS", "'['", "']'", "'('", "')'", "'.'", "';'", "','", "'?'", - "$accept", "input", "statement_list", "statement", - "preparable_statement", "opt_hints", "hint_list", "hint", - "transaction_statement", "opt_transaction_keyword", "prepare_statement", - "prepare_target_query", "execute_statement", "import_statement", - "file_type", "file_path", "opt_file_type", "export_statement", - "show_statement", "create_statement", "opt_not_exists", - "table_elem_commalist", "table_elem", "column_def", "column_type", - "opt_time_specification", "opt_decimal_specification", - "opt_column_constraints", "column_constraint", "table_constraint", - "drop_statement", "opt_exists", "alter_statement", "alter_action", - "drop_action", "delete_statement", "truncate_statement", - "insert_statement", "opt_column_list", "update_statement", - "update_clause_commalist", "update_clause", "select_statement", - "select_within_set_operation", - "select_within_set_operation_no_parentheses", "select_with_paren", - "select_no_paren", "set_operator", "set_type", "opt_all", - "select_clause", "opt_distinct", "select_list", "opt_from_clause", - "from_clause", "opt_where", "opt_group", "opt_having", "opt_order", - "order_list", "order_desc", "opt_order_type", "opt_top", "opt_limit", - "expr_list", "opt_literal_list", "literal_list", "expr_alias", "expr", - "operand", "scalar_expr", "unary_expr", "binary_expr", "logic_expr", - "in_expr", "case_expr", "case_list", "exists_expr", "comp_expr", - "function_expr", "extract_expr", "cast_expr", "datetime_field", - "array_expr", "array_index", "between_expr", "column_name", "literal", - "string_literal", "bool_literal", "num_literal", "int_literal", - "null_literal", "param_expr", "table_ref", "table_ref_atomic", - "nonjoin_table_ref_atomic", "table_ref_commalist", "table_ref_name", - "table_ref_name_no_alias", "table_name", "opt_index_name", "index_name", - "table_alias", "opt_table_alias", "alias", "opt_alias", - "opt_with_clause", "with_clause", "with_description_list", - "with_description", "join_clause", "opt_join_type", "join_condition", - "opt_semicolon", "ident_commalist", YY_NULLPTR -}; - -static const char * -yysymbol_name (yysymbol_kind_t yysymbol) -{ - return yytname[yysymbol]; -} -#endif - -#ifdef YYPRINT -/* YYTOKNUM[NUM] -- (External) token number corresponding to the - (internal) symbol number NUM (which must be that of a token). */ -static const yytype_int16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, - 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, - 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, - 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, - 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, - 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, - 395, 396, 397, 398, 399, 400, 401, 402, 61, 403, - 404, 60, 62, 405, 406, 407, 408, 409, 43, 45, - 42, 47, 37, 94, 410, 91, 93, 40, 41, 46, - 59, 44, 63 -}; -#endif - -#define YYPACT_NINF (-413) - -#define yypact_value_is_default(Yyn) \ - ((Yyn) == YYPACT_NINF) - -#define YYTABLE_NINF (-286) - -#define yytable_value_is_error(Yyn) \ - ((Yyn) == YYTABLE_NINF) - - /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -static const yytype_int16 yypact[] = -{ - 543, 36, 55, 63, 146, 55, -27, 119, 125, 96, - 55, 81, 55, -16, 21, 224, 91, 91, 91, 241, - 77, -413, 156, -413, 156, -413, -413, -413, -413, -413, - -413, -413, -413, -413, -413, -413, -413, -33, -413, 276, - 124, -413, 131, 213, -413, 210, 210, 210, 55, 334, - 55, 217, -413, 214, -32, 214, 214, 214, 55, -413, - 219, 170, -413, -413, -413, -413, -413, -413, 512, -413, - 248, -413, -413, 222, -33, 92, -413, 143, -413, 343, - 32, 344, 232, 353, 55, 55, 277, -413, 266, 193, - 359, 318, 55, 363, 363, 365, 55, 55, -413, 202, - 224, -413, 203, 366, 364, 207, 209, -413, -413, -413, - -33, 267, 246, -33, 2, -413, -413, -413, -413, -413, - -413, -413, -413, 211, 212, -413, -413, -413, -413, -413, - -413, -413, -413, -413, 336, -413, 252, -26, 193, 304, - -413, 363, 382, 100, 242, -31, -413, -413, 299, 282, - -413, 282, -413, 264, -413, -413, -413, -413, 392, -413, - -413, 304, -413, -413, 323, -413, -413, 92, -413, -413, - 304, 323, 304, 123, -413, -413, 32, -413, 55, 399, - 293, 140, 281, 39, 239, 243, 245, 254, 308, 244, - 319, -413, 258, -55, 381, -413, -413, -413, -413, -413, - -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, - -413, 311, -413, 46, 249, -413, 304, 359, -413, 377, - -413, -413, 371, -413, -413, 55, 253, 80, -413, 330, - 256, -413, 23, 2, -33, 260, -413, -44, 2, -55, - 375, 11, -413, 265, 341, -413, 749, 316, 269, 109, - -413, -413, -413, 293, 27, 18, 383, 135, 304, 304, - 84, 93, 271, 319, 571, 304, 68, 274, 42, 304, - 304, 319, -413, 319, -59, 278, -39, 319, 319, 319, - 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, - 319, 319, 366, 55, -413, 440, 32, -55, -413, 214, - 334, -413, 32, -413, 392, 16, 277, -413, 304, -413, - 445, -413, -413, -413, -413, 304, -413, -413, -413, -413, - 304, 304, 382, 363, -413, 423, -413, 289, 290, -413, - -413, 291, -413, -413, -413, -413, 292, -413, 19, 298, - 382, -413, 140, -413, -413, 304, -413, -413, 287, -413, - -413, -413, -413, -413, -413, 356, 108, -29, 95, 304, - 304, -413, 383, 360, 30, -413, -413, -413, 352, 518, - 607, 319, 302, 258, -413, 367, 307, 607, 607, 607, - 607, 643, 643, 643, 643, 68, 68, -90, -90, -90, - 25, 317, -413, -413, 110, 20, -413, 116, -413, 293, - -413, 67, -413, 303, -413, 24, -413, 404, -413, -413, - -413, -55, -55, 117, -413, 310, 476, -413, 478, 481, - 482, -413, 370, -413, -413, 389, 19, -413, 382, 118, - -413, 148, -413, 304, 749, 304, 304, -413, 138, 85, - 325, -413, 319, 607, 258, 326, 149, -413, -413, -413, - 329, -413, -413, 331, 405, -413, -413, -413, 425, 427, - 428, 413, 16, 511, -413, -413, -413, 395, -413, -413, - 515, 150, 354, 357, 358, -413, -413, -413, 158, -413, - -413, 57, 379, -55, 139, -413, 304, -413, 571, 385, - 159, -413, -413, 24, 16, -413, -413, -413, 16, 419, - 368, 304, 386, -413, 539, -413, -413, -413, -413, -413, - -413, -413, -55, -413, -413, -413, -413, 429, 382, -21, - -413, 387, 390, 304, 160, 304, -413, -413, 20, -55, - -413, -413, -55, 388, -413 -}; - - /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE does not specify something else to do. Zero - means the default is an error. */ -static const yytype_int16 yydefact[] = -{ - 266, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 30, 30, 30, 0, - 286, 3, 21, 19, 21, 18, 8, 9, 7, 11, - 16, 17, 13, 14, 12, 15, 10, 0, 265, 0, - 252, 95, 33, 0, 44, 51, 51, 51, 0, 0, - 0, 0, 251, 90, 0, 90, 90, 90, 0, 42, - 0, 267, 268, 29, 26, 28, 27, 1, 266, 2, - 0, 6, 5, 143, 0, 104, 105, 135, 87, 0, - 153, 0, 0, 255, 0, 0, 129, 37, 0, 99, - 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, - 0, 4, 0, 0, 123, 0, 0, 117, 118, 116, - 0, 120, 0, 0, 149, 253, 234, 237, 239, 240, - 235, 236, 241, 0, 152, 154, 229, 230, 231, 238, - 232, 233, 32, 31, 0, 254, 0, 0, 99, 0, - 94, 0, 0, 0, 0, 129, 101, 89, 0, 40, - 38, 40, 256, 0, 85, 86, 270, 269, 0, 142, - 122, 0, 112, 111, 135, 108, 107, 109, 119, 115, - 0, 135, 0, 0, 113, 34, 0, 50, 0, 0, - 266, 0, 0, 225, 0, 0, 0, 0, 0, 0, - 0, 227, 0, 128, 157, 164, 165, 166, 159, 161, - 167, 160, 180, 168, 169, 170, 171, 163, 158, 173, - 174, 0, 287, 0, 0, 97, 0, 0, 100, 0, - 91, 92, 0, 36, 41, 0, 24, 0, 22, 126, - 124, 150, 264, 149, 0, 134, 136, 141, 149, 145, - 147, 144, 155, 0, 0, 47, 0, 0, 0, 0, - 52, 54, 55, 266, 123, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 176, 0, 175, 0, 0, 0, - 0, 0, 177, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 98, 0, 0, 103, 102, 90, - 0, 88, 0, 20, 0, 0, 129, 125, 0, 262, - 0, 263, 156, 106, 110, 0, 140, 139, 138, 114, - 0, 0, 0, 0, 58, 0, 63, 75, 0, 62, - 60, 0, 70, 69, 59, 67, 72, 57, 78, 0, - 0, 46, 0, 49, 212, 0, 226, 228, 0, 216, - 217, 218, 219, 220, 221, 0, 0, 0, 0, 0, - 0, 199, 0, 0, 0, 172, 162, 191, 192, 0, - 187, 0, 0, 0, 178, 0, 190, 189, 205, 206, - 207, 208, 209, 210, 211, 182, 181, 184, 183, 185, - 186, 0, 35, 288, 0, 0, 39, 0, 23, 266, - 127, 242, 244, 0, 246, 260, 245, 131, 151, 261, - 137, 148, 146, 0, 45, 0, 0, 61, 0, 0, - 0, 68, 0, 80, 81, 0, 56, 76, 0, 0, - 53, 0, 203, 0, 0, 0, 0, 197, 0, 0, - 0, 222, 0, 188, 0, 0, 0, 179, 223, 96, - 225, 93, 25, 0, 0, 282, 274, 280, 278, 281, - 276, 0, 0, 0, 259, 250, 257, 0, 121, 48, - 0, 0, 0, 0, 0, 79, 82, 77, 0, 84, - 213, 0, 0, 201, 0, 200, 0, 204, 224, 0, - 0, 195, 193, 260, 0, 277, 279, 275, 0, 243, - 261, 0, 0, 74, 0, 64, 66, 71, 83, 214, - 215, 198, 202, 196, 194, 247, 271, 283, 0, 133, - 65, 0, 0, 0, 0, 0, 130, 73, 0, 284, - 272, 258, 132, 0, 273 -}; - - /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = -{ - -413, -413, -413, 456, -413, 525, -413, 257, -413, 315, - -413, -413, -413, -413, 262, -86, 409, -413, -413, -413, - 288, -413, 225, -413, 132, -413, -413, -413, 142, -413, - -413, -50, -413, -413, -413, -413, -413, -413, 432, -413, - -413, 355, -165, -83, -413, -5, -71, -35, -413, -413, - -88, 321, -413, -413, -413, -127, -413, -413, -9, -413, - 261, -413, -413, 7, -255, -413, -138, 270, -139, -174, - -413, -413, -413, -413, -413, -413, 313, -413, -413, -413, - -413, -413, -413, -413, -413, -413, -375, -52, -81, -413, - -413, -101, -413, -413, -413, -412, 86, -413, -413, -413, - -1, -413, -413, -413, 88, 361, -413, -413, -413, -413, - 484, -413, -413, -413, -413, -305 -}; - - /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = -{ - 0, 19, 20, 21, 22, 71, 227, 228, 23, 64, - 24, 133, 25, 26, 88, 149, 223, 27, 28, 29, - 83, 249, 250, 251, 338, 421, 417, 426, 427, 252, - 30, 92, 31, 220, 221, 32, 33, 34, 143, 35, - 145, 146, 36, 164, 165, 166, 76, 110, 111, 169, - 77, 161, 229, 306, 307, 140, 468, 526, 114, 235, - 236, 318, 104, 174, 230, 123, 124, 231, 232, 194, - 195, 196, 197, 198, 199, 200, 261, 201, 202, 203, - 204, 205, 355, 206, 207, 208, 209, 210, 126, 127, - 128, 129, 130, 131, 400, 401, 402, 403, 404, 51, - 405, 136, 153, 464, 465, 466, 312, 37, 38, 61, - 62, 406, 461, 530, 69, 213 -}; - - /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule whose - number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_int16 yytable[] = -{ - 193, 41, 159, 106, 44, 95, 96, 97, 151, 52, - 364, 54, 150, 150, 264, 245, 266, 413, 218, 40, - 451, 346, 167, 450, 73, 167, 309, 309, 125, 525, - 171, 237, 75, 239, 241, 429, 116, 117, 118, 160, - 58, 371, 113, 45, 277, 316, 422, 86, 260, 89, - 499, 139, 46, 268, 55, 211, 172, 98, 40, 269, - 150, 93, 39, 56, 374, 321, 42, 179, 372, 105, - 269, 317, 215, 291, 173, 292, 270, 297, 435, 423, - 59, 375, 47, 137, 138, 269, 517, 270, 343, 264, - 431, 148, 454, 57, 156, 154, 155, 369, 180, 370, - 94, 107, 270, 376, 377, 378, 379, 380, 381, 382, - 383, 384, 385, 386, 387, 388, 389, 390, 446, 356, - 357, 267, 424, 478, 242, 269, 183, 116, 117, 118, - 367, 368, 234, 455, 74, 119, 108, 269, 456, 425, - 217, 181, 270, 246, 457, 458, 167, 310, 463, 43, - 308, 314, 107, 533, 270, 233, 269, 73, 394, 277, - 53, 459, 238, 214, 397, -283, 460, 247, 184, 185, - 186, 269, 109, 270, 120, 121, 237, 243, 347, 407, - 191, 411, 412, 399, 359, 348, 436, 108, 270, 490, - 292, 391, 486, 50, 259, 344, 441, 443, 269, 269, - 248, 308, 277, 360, 122, 360, 254, 187, 255, 361, - 366, 437, 48, 524, 294, 270, 270, 295, 49, 112, - 438, 439, 269, 109, 301, 509, 119, 60, 288, 289, - 290, 291, 434, 292, 453, 63, 240, 414, -248, 270, - 313, 67, 150, 188, 125, 319, 519, 68, 303, 395, - 125, 304, 269, 269, 485, 511, 189, 183, 116, 117, - 118, 183, 116, 117, 118, 120, 121, 70, 488, 270, - 270, 349, 350, 351, 352, 353, 354, 341, 449, 78, - 342, 176, 190, 191, 452, 469, 479, 176, 295, 295, - 192, 440, 392, 79, 481, 122, 483, 484, 80, 184, - 185, 186, 445, 184, 185, 186, 81, 183, 116, 117, - 118, 183, 116, 117, 118, 73, 480, 492, 503, 308, - 308, 504, 183, 116, 117, 118, 508, 514, 531, 295, - 308, 295, 65, 66, 84, 85, 82, 87, 187, 90, - 91, 100, 187, 99, 102, 103, 115, 512, 132, 184, - 185, 186, 134, 262, 185, 186, 135, 119, 141, 139, - 142, 119, 144, 147, 259, 185, 186, 116, 152, 74, - 158, 170, 118, 489, 188, 162, 160, 163, 188, 175, - 168, 177, 178, 176, 529, 212, 532, 189, 187, 219, - 216, 189, 187, 222, 225, 226, 120, 121, 271, 112, - 120, 121, 244, 187, 15, 253, 256, 119, 293, 265, - 257, 119, 258, 190, 191, 299, 296, 190, 191, 300, - 302, 192, 119, 305, 188, 192, 122, 308, 263, 320, - 122, 315, 322, 323, 272, 339, 340, 189, 362, 263, - 73, 189, 365, 393, 454, 373, 120, 121, 409, 433, - 120, 121, 189, 415, 454, 432, 416, 418, 419, 420, - 371, 120, 121, 190, 191, 428, 269, 190, 191, 444, - 447, 192, 292, 467, 462, 192, 122, 470, 190, 191, - 122, 273, 471, 448, 472, 455, 192, 473, 474, 475, - 456, 122, 476, 487, 491, 455, 457, 458, 255, 493, - 456, 274, 495, 494, 496, 497, 457, 458, 275, 276, - 522, 498, -285, 459, 500, 277, 278, -283, 460, 1, - 501, 502, 505, 459, 101, 506, 507, 2, 460, 279, - 280, 281, 282, 283, 3, 518, 284, 285, 4, 286, - 287, 288, 289, 290, 291, 521, 292, 510, 5, 72, - 1, 6, 7, 513, 520, 527, 534, 528, 2, 523, - 224, 398, 396, 8, 9, 3, 482, 430, 477, 4, - 182, 272, 298, 358, 10, 345, 410, 11, 408, 5, - 516, 515, 6, 7, 157, 0, 0, 0, 0, 0, - -249, 0, 0, 311, 8, 9, 0, 0, 12, 0, - 0, 0, 13, 0, 0, 10, 0, 0, 11, 0, - 0, 0, 0, 0, 0, 0, 0, 14, 273, 0, - 0, 0, 0, 15, 272, 0, 0, 0, 0, 12, - 0, 0, 442, 13, 0, 0, 0, 0, 363, 0, - 0, 0, 0, 0, 0, 0, 276, 0, 14, 0, - 0, 0, 277, 278, 15, 0, 0, 16, 17, 18, - 272, 0, 0, 0, 0, 0, 279, 280, 281, 282, - 283, 273, 0, 284, 285, 0, 286, 287, 288, 289, - 290, 291, 0, 292, 0, 0, 0, 0, 16, 17, - 18, 363, 0, 0, 0, 0, 272, 0, 0, 276, - 0, 0, 0, 0, 0, 277, 278, -286, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 279, - 280, 281, 282, 283, 0, 0, 284, 285, 0, 286, - 287, 288, 289, 290, 291, 276, 292, 0, 0, 0, - 0, 277, -286, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, -286, -286, -286, 282, 283, - 0, 0, 284, 285, 0, 286, 287, 288, 289, 290, - 291, 276, 292, 324, 0, 0, 0, 277, 325, 0, - 326, 327, 0, 328, 0, 0, 0, 0, 0, 0, - 0, 329, 0, 0, -286, -286, 0, 0, -286, -286, - 0, 286, 287, 288, 289, 290, 291, 0, 292, 0, - 0, 0, 0, 0, 0, 0, 0, 330, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 331, 0, 332, 333, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 334, 0, 0, 0, 335, 0, 336, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 337 -}; - -static const yytype_int16 yycheck[] = -{ - 139, 2, 103, 74, 5, 55, 56, 57, 94, 10, - 265, 12, 93, 94, 188, 180, 190, 322, 145, 3, - 395, 3, 110, 3, 57, 113, 3, 3, 80, 50, - 113, 170, 37, 172, 173, 340, 4, 5, 6, 12, - 19, 100, 77, 70, 134, 89, 27, 48, 187, 50, - 462, 82, 79, 192, 70, 141, 54, 58, 3, 114, - 141, 93, 26, 79, 103, 54, 3, 93, 127, 74, - 114, 115, 143, 163, 72, 165, 131, 216, 107, 60, - 59, 120, 109, 84, 85, 114, 498, 131, 253, 263, - 345, 92, 25, 109, 99, 96, 97, 271, 124, 273, - 132, 9, 131, 277, 278, 279, 280, 281, 282, 283, - 284, 285, 286, 287, 288, 289, 290, 291, 373, 258, - 259, 192, 103, 428, 176, 114, 3, 4, 5, 6, - 269, 270, 167, 66, 167, 103, 44, 114, 71, 120, - 171, 167, 131, 3, 77, 78, 234, 124, 124, 3, - 171, 234, 9, 528, 131, 164, 114, 57, 296, 134, - 79, 94, 171, 63, 302, 98, 99, 27, 45, 46, - 47, 114, 80, 131, 142, 143, 315, 178, 160, 306, - 160, 320, 321, 167, 91, 256, 91, 44, 131, 444, - 165, 292, 107, 97, 110, 168, 166, 371, 114, 114, - 60, 171, 134, 110, 172, 110, 167, 84, 169, 116, - 168, 116, 93, 518, 168, 131, 131, 171, 93, 76, - 359, 360, 114, 80, 225, 168, 103, 3, 160, 161, - 162, 163, 124, 165, 399, 144, 113, 323, 171, 131, - 233, 0, 323, 120, 296, 238, 501, 170, 168, 299, - 302, 171, 114, 114, 116, 116, 133, 3, 4, 5, - 6, 3, 4, 5, 6, 142, 143, 111, 442, 131, - 131, 136, 137, 138, 139, 140, 141, 168, 168, 3, - 171, 171, 159, 160, 168, 168, 168, 171, 171, 171, - 167, 362, 293, 169, 433, 172, 435, 436, 167, 45, - 46, 47, 373, 45, 46, 47, 93, 3, 4, 5, - 6, 3, 4, 5, 6, 57, 168, 168, 168, 171, - 171, 171, 3, 4, 5, 6, 168, 168, 168, 171, - 171, 171, 17, 18, 46, 47, 126, 3, 84, 122, - 126, 171, 84, 124, 96, 123, 3, 486, 4, 45, - 46, 47, 120, 45, 46, 47, 3, 103, 92, 82, - 167, 103, 3, 45, 110, 46, 47, 4, 3, 167, - 167, 125, 6, 444, 120, 168, 12, 168, 120, 168, - 113, 45, 130, 171, 523, 3, 525, 133, 84, 90, - 148, 133, 84, 111, 130, 3, 142, 143, 17, 76, - 142, 143, 3, 84, 111, 124, 167, 103, 97, 165, - 167, 103, 167, 159, 160, 38, 167, 159, 160, 48, - 167, 167, 103, 93, 120, 167, 172, 171, 120, 54, - 172, 171, 167, 92, 53, 119, 167, 133, 167, 120, - 57, 133, 168, 3, 25, 167, 142, 143, 3, 93, - 142, 143, 133, 30, 25, 168, 167, 167, 167, 167, - 100, 142, 143, 159, 160, 167, 114, 159, 160, 167, - 103, 167, 165, 69, 171, 167, 172, 167, 159, 160, - 172, 100, 6, 166, 6, 66, 167, 6, 6, 119, - 71, 172, 103, 168, 168, 66, 77, 78, 169, 168, - 71, 120, 77, 98, 77, 77, 77, 78, 127, 128, - 81, 98, 0, 94, 3, 134, 135, 98, 99, 7, - 125, 6, 168, 94, 68, 168, 168, 15, 99, 148, - 149, 150, 151, 152, 22, 167, 155, 156, 26, 158, - 159, 160, 161, 162, 163, 6, 165, 168, 36, 24, - 7, 39, 40, 168, 168, 168, 168, 167, 15, 130, - 151, 304, 300, 51, 52, 22, 434, 342, 426, 26, - 138, 53, 217, 260, 62, 254, 315, 65, 308, 36, - 494, 493, 39, 40, 100, -1, -1, -1, -1, -1, - 171, -1, -1, 232, 51, 52, -1, -1, 86, -1, - -1, -1, 90, -1, -1, 62, -1, -1, 65, -1, - -1, -1, -1, -1, -1, -1, -1, 105, 100, -1, - -1, -1, -1, 111, 53, -1, -1, -1, -1, 86, - -1, -1, 114, 90, -1, -1, -1, -1, 120, -1, - -1, -1, -1, -1, -1, -1, 128, -1, 105, -1, - -1, -1, 134, 135, 111, -1, -1, 145, 146, 147, - 53, -1, -1, -1, -1, -1, 148, 149, 150, 151, - 152, 100, -1, 155, 156, -1, 158, 159, 160, 161, - 162, 163, -1, 165, -1, -1, -1, -1, 145, 146, - 147, 120, -1, -1, -1, -1, 53, -1, -1, 128, - -1, -1, -1, -1, -1, 134, 135, 100, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 148, - 149, 150, 151, 152, -1, -1, 155, 156, -1, 158, - 159, 160, 161, 162, 163, 128, 165, -1, -1, -1, - -1, 134, 135, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 148, 149, 150, 151, 152, - -1, -1, 155, 156, -1, 158, 159, 160, 161, 162, - 163, 128, 165, 24, -1, -1, -1, 134, 29, -1, - 31, 32, -1, 34, -1, -1, -1, -1, -1, -1, - -1, 42, -1, -1, 151, 152, -1, -1, 155, 156, - -1, 158, 159, 160, 161, 162, 163, -1, 165, -1, - -1, -1, -1, -1, -1, -1, -1, 68, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 85, -1, 87, 88, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 102, -1, -1, -1, 106, -1, 108, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 118 -}; - - /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_int16 yystos[] = -{ - 0, 7, 15, 22, 26, 36, 39, 40, 51, 52, - 62, 65, 86, 90, 105, 111, 145, 146, 147, 174, - 175, 176, 177, 181, 183, 185, 186, 190, 191, 192, - 203, 205, 208, 209, 210, 212, 215, 280, 281, 26, - 3, 273, 3, 3, 273, 70, 79, 109, 93, 93, - 97, 272, 273, 79, 273, 70, 79, 109, 19, 59, - 3, 282, 283, 144, 182, 182, 182, 0, 170, 287, - 111, 178, 178, 57, 167, 218, 219, 223, 3, 169, - 167, 93, 126, 193, 193, 193, 273, 3, 187, 273, - 122, 126, 204, 93, 132, 204, 204, 204, 273, 124, - 171, 176, 96, 123, 235, 218, 219, 9, 44, 80, - 220, 221, 76, 220, 231, 3, 4, 5, 6, 103, - 142, 143, 172, 238, 239, 260, 261, 262, 263, 264, - 265, 266, 4, 184, 120, 3, 274, 273, 273, 82, - 228, 92, 167, 211, 3, 213, 214, 45, 273, 188, - 261, 188, 3, 275, 273, 273, 218, 283, 167, 264, - 12, 224, 168, 168, 216, 217, 218, 223, 113, 222, - 125, 216, 54, 72, 236, 168, 171, 45, 130, 93, - 124, 167, 211, 3, 45, 46, 47, 84, 120, 133, - 159, 160, 167, 241, 242, 243, 244, 245, 246, 247, - 248, 250, 251, 252, 253, 254, 256, 257, 258, 259, - 260, 188, 3, 288, 63, 219, 148, 171, 228, 90, - 206, 207, 111, 189, 189, 130, 3, 179, 180, 225, - 237, 240, 241, 231, 220, 232, 233, 241, 231, 241, - 113, 241, 260, 273, 3, 215, 3, 27, 60, 194, - 195, 196, 202, 124, 167, 169, 167, 167, 167, 110, - 241, 249, 45, 120, 242, 165, 242, 219, 241, 114, - 131, 17, 53, 100, 120, 127, 128, 134, 135, 148, - 149, 150, 151, 152, 155, 156, 158, 159, 160, 161, - 162, 163, 165, 97, 168, 171, 167, 241, 214, 38, - 48, 273, 167, 168, 171, 93, 226, 227, 171, 3, - 124, 278, 279, 236, 216, 171, 89, 115, 234, 236, - 54, 54, 167, 92, 24, 29, 31, 32, 34, 42, - 68, 85, 87, 88, 102, 106, 108, 118, 197, 119, - 167, 168, 171, 215, 168, 224, 3, 160, 219, 136, - 137, 138, 139, 140, 141, 255, 241, 241, 249, 91, - 110, 116, 167, 120, 237, 168, 168, 241, 241, 242, - 242, 100, 127, 167, 103, 120, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, - 242, 264, 273, 3, 239, 204, 187, 239, 180, 167, - 267, 268, 269, 270, 271, 273, 284, 228, 240, 3, - 233, 241, 241, 288, 188, 30, 167, 199, 167, 167, - 167, 198, 27, 60, 103, 120, 200, 201, 167, 288, - 195, 237, 168, 93, 124, 107, 91, 116, 241, 241, - 219, 166, 114, 242, 167, 219, 237, 103, 166, 168, - 3, 259, 168, 215, 25, 66, 71, 77, 78, 94, - 99, 285, 171, 124, 276, 277, 278, 69, 229, 168, - 167, 6, 6, 6, 6, 119, 103, 201, 288, 168, - 168, 241, 197, 241, 241, 116, 107, 168, 242, 219, - 237, 168, 168, 168, 98, 77, 77, 77, 98, 268, - 3, 125, 6, 168, 171, 168, 168, 168, 168, 168, - 168, 116, 241, 168, 168, 277, 269, 268, 167, 237, - 168, 6, 81, 130, 288, 50, 230, 168, 167, 241, - 286, 168, 241, 259, 168 -}; - - /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_int16 yyr1[] = -{ - 0, 173, 174, 175, 175, 176, 176, 176, 176, 176, - 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, - 178, 178, 179, 179, 180, 180, 181, 181, 181, 182, - 182, 183, 184, 185, 185, 186, 186, 187, 188, 189, - 189, 190, 191, 191, 191, 192, 192, 192, 192, 192, - 193, 193, 194, 194, 195, 195, 196, 197, 197, 197, - 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 198, 198, 199, 199, 199, 200, 200, 200, 201, - 201, 201, 201, 202, 202, 203, 203, 203, 203, 204, - 204, 205, 206, 207, 208, 209, 210, 210, 211, 211, - 212, 213, 213, 214, 215, 215, 215, 216, 216, 217, - 217, 218, 218, 219, 219, 220, 221, 221, 221, 222, - 222, 223, 224, 224, 225, 226, 226, 227, 228, 228, - 229, 229, 230, 230, 231, 231, 232, 232, 233, 234, - 234, 234, 235, 235, 236, 236, 236, 236, 236, 236, - 237, 237, 238, 238, 239, 239, 240, 241, 241, 241, - 241, 241, 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 243, 243, 244, 244, 244, 244, 244, - 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, - 245, 246, 246, 247, 247, 247, 247, 248, 248, 248, - 248, 249, 249, 250, 250, 251, 251, 251, 251, 251, - 251, 251, 252, 252, 253, 254, 255, 255, 255, 255, - 255, 255, 256, 257, 258, 259, 259, 259, 259, 260, - 260, 260, 260, 260, 261, 262, 262, 263, 263, 264, - 265, 266, 267, 267, 268, 268, 269, 269, 270, 270, - 271, 272, 273, 273, 274, 274, 275, 276, 276, 277, - 277, 278, 278, 279, 279, 280, 280, 281, 282, 282, - 283, 284, 284, 284, 285, 285, 285, 285, 285, 285, - 285, 285, 285, 285, 286, 287, 287, 288, 288 -}; - - /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ -static const yytype_int8 yyr2[] = -{ - 0, 2, 2, 1, 3, 2, 2, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 5, 0, 1, 3, 1, 4, 2, 2, 2, 1, - 0, 4, 1, 2, 5, 7, 5, 1, 1, 3, - 0, 5, 2, 3, 2, 8, 7, 6, 9, 7, - 3, 0, 1, 3, 1, 1, 3, 1, 1, 1, - 1, 2, 1, 1, 4, 5, 4, 1, 2, 1, - 1, 3, 0, 5, 3, 0, 1, 2, 0, 2, - 1, 1, 2, 5, 4, 4, 4, 3, 6, 2, - 0, 5, 1, 4, 4, 2, 8, 5, 3, 0, - 5, 1, 3, 3, 2, 2, 6, 1, 1, 1, - 3, 3, 3, 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, 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, 6, 1, 1, 1, 1, - 1, 1, 4, 4, 5, 1, 3, 1, 3, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 3, 1, 1, 1, 4, 1, 3, - 2, 1, 1, 3, 1, 0, 1, 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 -}; - - -enum { YYENOMEM = -2 }; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = SQL_HSQL_EMPTY) - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ - do \ - if (yychar == SQL_HSQL_EMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (&yylloc, result, scanner, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ - while (0) - -/* Backward compatibility with an undocumented macro. - Use SQL_HSQL_error or SQL_HSQL_UNDEF. */ -#define YYERRCODE SQL_HSQL_UNDEF - -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (N) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (0) -#endif - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) - - -/* Enable debugging if requested. */ -#if HSQL_DEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (0) - - -/* YY_LOCATION_PRINT -- Print the location on the stream. - This macro was not mandated originally: define only if we know - we won't break user code: when these are the locations we know. */ - -# ifndef YY_LOCATION_PRINT -# if defined HSQL_LTYPE_IS_TRIVIAL && HSQL_LTYPE_IS_TRIVIAL - -/* Print *YYLOCP on YYO. Private, do not rely on its existence. */ - -YY_ATTRIBUTE_UNUSED -static int -yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) -{ - int res = 0; - int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; - if (0 <= yylocp->first_line) - { - res += YYFPRINTF (yyo, "%d", yylocp->first_line); - if (0 <= yylocp->first_column) - res += YYFPRINTF (yyo, ".%d", yylocp->first_column); - } - if (0 <= yylocp->last_line) - { - if (yylocp->first_line < yylocp->last_line) - { - res += YYFPRINTF (yyo, "-%d", yylocp->last_line); - if (0 <= end_col) - res += YYFPRINTF (yyo, ".%d", end_col); - } - else if (0 <= end_col && yylocp->first_column < end_col) - res += YYFPRINTF (yyo, "-%d", end_col); - } - return res; - } - -# define YY_LOCATION_PRINT(File, Loc) \ - yy_location_print_ (File, &(Loc)) - -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif -# endif /* !defined YY_LOCATION_PRINT */ - - -# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Kind, Value, Location, result, scanner); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) - - -/*-----------------------------------. -| Print this symbol's value on YYO. | -`-----------------------------------*/ - -static void -yy_symbol_value_print (FILE *yyo, - yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, hsql::SQLParserResult* result, yyscan_t scanner) -{ - FILE *yyoutput = yyo; - YY_USE (yyoutput); - YY_USE (yylocationp); - YY_USE (result); - YY_USE (scanner); - if (!yyvaluep) - return; -# ifdef YYPRINT - if (yykind < YYNTOKENS) - YYPRINT (yyo, yytoknum[yykind], *yyvaluep); -# endif - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE (yykind); - YY_IGNORE_MAYBE_UNINITIALIZED_END -} - - -/*---------------------------. -| Print this symbol on YYO. | -`---------------------------*/ - -static void -yy_symbol_print (FILE *yyo, - yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, hsql::SQLParserResult* result, yyscan_t scanner) -{ - YYFPRINTF (yyo, "%s %s (", - yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); - - YY_LOCATION_PRINT (yyo, *yylocationp); - YYFPRINTF (yyo, ": "); - yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, result, scanner); - YYFPRINTF (yyo, ")"); -} - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -static void -yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) -{ - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (0) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -static void -yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, - int yyrule, hsql::SQLParserResult* result, yyscan_t scanner) -{ - int yylno = yyrline[yyrule]; - int yynrhs = yyr2[yyrule]; - int yyi; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, - YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), - &yyvsp[(yyi + 1) - (yynrhs)], - &(yylsp[(yyi + 1) - (yynrhs)]), result, scanner); - YYFPRINTF (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyssp, yyvsp, yylsp, Rule, result, scanner); \ -} while (0) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !HSQL_DEBUG */ -# define YYDPRINTF(Args) ((void) 0) -# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !HSQL_DEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - -/* Context of a parse error. */ -typedef struct -{ - yy_state_t *yyssp; - yysymbol_kind_t yytoken; - YYLTYPE *yylloc; -} yypcontext_t; - -/* Put in YYARG at most YYARGN of the expected tokens given the - current YYCTX, and return the number of tokens stored in YYARG. If - YYARG is null, return the number of expected tokens (guaranteed to - be less than YYNTOKENS). Return YYENOMEM on memory exhaustion. - Return 0 if there are more than YYARGN expected tokens, yet fill - YYARG up to YYARGN. */ -static int -yypcontext_expected_tokens (const yypcontext_t *yyctx, - yysymbol_kind_t yyarg[], int yyargn) -{ - /* Actual size of YYARG. */ - int yycount = 0; - int yyn = yypact[+*yyctx->yyssp]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (!yyarg) - ++yycount; - else if (yycount == yyargn) - return 0; - else - yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx); - } - } - if (yyarg && yycount == 0 && 0 < yyargn) - yyarg[0] = YYSYMBOL_YYEMPTY; - return yycount; -} - - - - -#ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) -# else -/* Return the length of YYSTR. */ -static YYPTRDIFF_T -yystrlen (const char *yystr) -{ - YYPTRDIFF_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -#endif - -#ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -static char * -yystpcpy (char *yydest, const char *yysrc) -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -#endif - -#ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYPTRDIFF_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYPTRDIFF_T yyn = 0; - char const *yyp = yystr; - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - else - goto append; - - append: - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (yyres) - return yystpcpy (yyres, yystr) - yyres; - else - return yystrlen (yystr); -} -#endif - - -static int -yy_syntax_error_arguments (const yypcontext_t *yyctx, - yysymbol_kind_t yyarg[], int yyargn) -{ - /* Actual size of YYARG. */ - int yycount = 0; - /* There are many possibilities here to consider: - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yyctx->yytoken != YYSYMBOL_YYEMPTY) - { - int yyn; - if (yyarg) - yyarg[yycount] = yyctx->yytoken; - ++yycount; - yyn = yypcontext_expected_tokens (yyctx, - yyarg ? yyarg + 1 : yyarg, yyargn - 1); - if (yyn == YYENOMEM) - return YYENOMEM; - else - yycount += yyn; - } - return yycount; -} - -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, - const yypcontext_t *yyctx) -{ - enum { YYARGS_MAX = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULLPTR; - /* Arguments of yyformat: reported tokens (one for the "unexpected", - one per "expected"). */ - yysymbol_kind_t yyarg[YYARGS_MAX]; - /* Cumulated lengths of YYARG. */ - YYPTRDIFF_T yysize = 0; - - /* Actual size of YYARG. */ - int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX); - if (yycount == YYENOMEM) - return YYENOMEM; - - switch (yycount) - { -#define YYCASE_(N, S) \ - 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")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -#undef YYCASE_ - } - - /* Compute error message size. Don't count the "%s"s, but reserve - room for the terminator. */ - yysize = yystrlen (yyformat) - 2 * yycount + 1; - { - int yyi; - for (yyi = 0; yyi < yycount; ++yyi) - { - YYPTRDIFF_T yysize1 - = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return YYENOMEM; - } - } - - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return -1; - } - - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]); - yyformat += 2; - } - else - { - ++yyp; - ++yyformat; - } - } - return 0; -} - - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -static void -yydestruct (const char *yymsg, - yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, hsql::SQLParserResult* result, yyscan_t scanner) -{ - YY_USE (yyvaluep); - YY_USE (yylocationp); - YY_USE (result); - YY_USE (scanner); - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); - - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - switch (yykind) - { - case YYSYMBOL_IDENTIFIER: /* IDENTIFIER */ -#line 157 "bison_parser.y" - { free( (((*yyvaluep).sval)) ); } -#line 1985 "bison_parser.cpp" - break; - - case YYSYMBOL_STRING: /* STRING */ -#line 157 "bison_parser.y" - { free( (((*yyvaluep).sval)) ); } -#line 1991 "bison_parser.cpp" - break; - - case YYSYMBOL_FLOATVAL: /* FLOATVAL */ -#line 155 "bison_parser.y" - { } -#line 1997 "bison_parser.cpp" - break; - - case YYSYMBOL_INTVAL: /* INTVAL */ -#line 155 "bison_parser.y" - { } -#line 2003 "bison_parser.cpp" - break; - - case YYSYMBOL_statement_list: /* statement_list */ -#line 158 "bison_parser.y" - { - if ((((*yyvaluep).stmt_vec)) != nullptr) { - for (auto ptr : *(((*yyvaluep).stmt_vec))) { - delete ptr; - } - } - delete (((*yyvaluep).stmt_vec)); -} -#line 2016 "bison_parser.cpp" - break; - - case YYSYMBOL_statement: /* statement */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).statement)); } -#line 2022 "bison_parser.cpp" - break; - - case YYSYMBOL_preparable_statement: /* preparable_statement */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).statement)); } -#line 2028 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_hints: /* opt_hints */ -#line 158 "bison_parser.y" - { - if ((((*yyvaluep).expr_vec)) != nullptr) { - for (auto ptr : *(((*yyvaluep).expr_vec))) { - delete ptr; - } - } - delete (((*yyvaluep).expr_vec)); -} -#line 2041 "bison_parser.cpp" - break; - - case YYSYMBOL_hint_list: /* hint_list */ -#line 158 "bison_parser.y" - { - if ((((*yyvaluep).expr_vec)) != nullptr) { - for (auto ptr : *(((*yyvaluep).expr_vec))) { - delete ptr; - } - } - delete (((*yyvaluep).expr_vec)); -} -#line 2054 "bison_parser.cpp" - break; - - case YYSYMBOL_hint: /* hint */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2060 "bison_parser.cpp" - break; - - case YYSYMBOL_transaction_statement: /* transaction_statement */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).transaction_stmt)); } -#line 2066 "bison_parser.cpp" - break; - - case YYSYMBOL_prepare_statement: /* prepare_statement */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).prep_stmt)); } -#line 2072 "bison_parser.cpp" - break; - - case YYSYMBOL_prepare_target_query: /* prepare_target_query */ -#line 157 "bison_parser.y" - { free( (((*yyvaluep).sval)) ); } -#line 2078 "bison_parser.cpp" - break; - - case YYSYMBOL_execute_statement: /* execute_statement */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).exec_stmt)); } -#line 2084 "bison_parser.cpp" - break; - - case YYSYMBOL_import_statement: /* import_statement */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).import_stmt)); } -#line 2090 "bison_parser.cpp" - break; - - case YYSYMBOL_file_type: /* file_type */ -#line 155 "bison_parser.y" - { } -#line 2096 "bison_parser.cpp" - break; - - case YYSYMBOL_file_path: /* file_path */ -#line 157 "bison_parser.y" - { free( (((*yyvaluep).sval)) ); } -#line 2102 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_file_type: /* opt_file_type */ -#line 155 "bison_parser.y" - { } -#line 2108 "bison_parser.cpp" - break; - - case YYSYMBOL_export_statement: /* export_statement */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).export_stmt)); } -#line 2114 "bison_parser.cpp" - break; - - case YYSYMBOL_show_statement: /* show_statement */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).show_stmt)); } -#line 2120 "bison_parser.cpp" - break; - - case YYSYMBOL_create_statement: /* create_statement */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).create_stmt)); } -#line 2126 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_not_exists: /* opt_not_exists */ -#line 155 "bison_parser.y" - { } -#line 2132 "bison_parser.cpp" - break; - - case YYSYMBOL_table_elem_commalist: /* table_elem_commalist */ -#line 158 "bison_parser.y" - { - if ((((*yyvaluep).table_element_vec)) != nullptr) { - for (auto ptr : *(((*yyvaluep).table_element_vec))) { - delete ptr; - } - } - delete (((*yyvaluep).table_element_vec)); -} -#line 2145 "bison_parser.cpp" - break; - - case YYSYMBOL_table_elem: /* table_elem */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).table_element_t)); } -#line 2151 "bison_parser.cpp" - break; - - case YYSYMBOL_column_def: /* column_def */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).column_t)); } -#line 2157 "bison_parser.cpp" - break; - - case YYSYMBOL_column_type: /* column_type */ -#line 155 "bison_parser.y" - { } -#line 2163 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_time_specification: /* opt_time_specification */ -#line 155 "bison_parser.y" - { } -#line 2169 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_decimal_specification: /* opt_decimal_specification */ -#line 155 "bison_parser.y" - { } -#line 2175 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_column_constraints: /* opt_column_constraints */ -#line 155 "bison_parser.y" - { } -#line 2181 "bison_parser.cpp" - break; - - case YYSYMBOL_column_constraint: /* column_constraint */ -#line 155 "bison_parser.y" - { } -#line 2187 "bison_parser.cpp" - break; - - case YYSYMBOL_table_constraint: /* table_constraint */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).table_constraint_t)); } -#line 2193 "bison_parser.cpp" - break; - - case YYSYMBOL_drop_statement: /* drop_statement */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).drop_stmt)); } -#line 2199 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_exists: /* opt_exists */ -#line 155 "bison_parser.y" - { } -#line 2205 "bison_parser.cpp" - break; - - case YYSYMBOL_alter_statement: /* alter_statement */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).alter_stmt)); } -#line 2211 "bison_parser.cpp" - break; - - case YYSYMBOL_alter_action: /* alter_action */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).alter_action_t)); } -#line 2217 "bison_parser.cpp" - break; - - case YYSYMBOL_drop_action: /* drop_action */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).drop_action_t)); } -#line 2223 "bison_parser.cpp" - break; - - case YYSYMBOL_delete_statement: /* delete_statement */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).delete_stmt)); } -#line 2229 "bison_parser.cpp" - break; - - case YYSYMBOL_truncate_statement: /* truncate_statement */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).delete_stmt)); } -#line 2235 "bison_parser.cpp" - break; - - case YYSYMBOL_insert_statement: /* insert_statement */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).insert_stmt)); } -#line 2241 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_column_list: /* opt_column_list */ -#line 158 "bison_parser.y" - { - if ((((*yyvaluep).str_vec)) != nullptr) { - for (auto ptr : *(((*yyvaluep).str_vec))) { - delete ptr; - } - } - delete (((*yyvaluep).str_vec)); -} -#line 2254 "bison_parser.cpp" - break; - - case YYSYMBOL_update_statement: /* update_statement */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).update_stmt)); } -#line 2260 "bison_parser.cpp" - break; - - case YYSYMBOL_update_clause_commalist: /* update_clause_commalist */ -#line 158 "bison_parser.y" - { - if ((((*yyvaluep).update_vec)) != nullptr) { - for (auto ptr : *(((*yyvaluep).update_vec))) { - delete ptr; - } - } - delete (((*yyvaluep).update_vec)); -} -#line 2273 "bison_parser.cpp" - break; - - case YYSYMBOL_update_clause: /* update_clause */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).update_t)); } -#line 2279 "bison_parser.cpp" - break; - - case YYSYMBOL_select_statement: /* select_statement */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).select_stmt)); } -#line 2285 "bison_parser.cpp" - break; - - case YYSYMBOL_select_within_set_operation: /* select_within_set_operation */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).select_stmt)); } -#line 2291 "bison_parser.cpp" - break; - - case YYSYMBOL_select_within_set_operation_no_parentheses: /* select_within_set_operation_no_parentheses */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).select_stmt)); } -#line 2297 "bison_parser.cpp" - break; - - case YYSYMBOL_select_with_paren: /* select_with_paren */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).select_stmt)); } -#line 2303 "bison_parser.cpp" - break; - - case YYSYMBOL_select_no_paren: /* select_no_paren */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).select_stmt)); } -#line 2309 "bison_parser.cpp" - break; - - case YYSYMBOL_set_operator: /* set_operator */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).set_operator_t)); } -#line 2315 "bison_parser.cpp" - break; - - case YYSYMBOL_set_type: /* set_type */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).set_operator_t)); } -#line 2321 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_all: /* opt_all */ -#line 155 "bison_parser.y" - { } -#line 2327 "bison_parser.cpp" - break; - - case YYSYMBOL_select_clause: /* select_clause */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).select_stmt)); } -#line 2333 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_distinct: /* opt_distinct */ -#line 155 "bison_parser.y" - { } -#line 2339 "bison_parser.cpp" - break; - - case YYSYMBOL_select_list: /* select_list */ -#line 158 "bison_parser.y" - { - if ((((*yyvaluep).expr_vec)) != nullptr) { - for (auto ptr : *(((*yyvaluep).expr_vec))) { - delete ptr; - } - } - delete (((*yyvaluep).expr_vec)); -} -#line 2352 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_from_clause: /* opt_from_clause */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).table)); } -#line 2358 "bison_parser.cpp" - break; - - case YYSYMBOL_from_clause: /* from_clause */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).table)); } -#line 2364 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_where: /* opt_where */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2370 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_group: /* opt_group */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).group_t)); } -#line 2376 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_having: /* opt_having */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2382 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_order: /* opt_order */ -#line 158 "bison_parser.y" - { - if ((((*yyvaluep).order_vec)) != nullptr) { - for (auto ptr : *(((*yyvaluep).order_vec))) { - delete ptr; - } - } - delete (((*yyvaluep).order_vec)); -} -#line 2395 "bison_parser.cpp" - break; - - case YYSYMBOL_order_list: /* order_list */ -#line 158 "bison_parser.y" - { - if ((((*yyvaluep).order_vec)) != nullptr) { - for (auto ptr : *(((*yyvaluep).order_vec))) { - delete ptr; - } - } - delete (((*yyvaluep).order_vec)); -} -#line 2408 "bison_parser.cpp" - break; - - case YYSYMBOL_order_desc: /* order_desc */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).order)); } -#line 2414 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_order_type: /* opt_order_type */ -#line 155 "bison_parser.y" - { } -#line 2420 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_top: /* opt_top */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).limit)); } -#line 2426 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_limit: /* opt_limit */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).limit)); } -#line 2432 "bison_parser.cpp" - break; - - case YYSYMBOL_expr_list: /* expr_list */ -#line 158 "bison_parser.y" - { - if ((((*yyvaluep).expr_vec)) != nullptr) { - for (auto ptr : *(((*yyvaluep).expr_vec))) { - delete ptr; - } - } - delete (((*yyvaluep).expr_vec)); -} -#line 2445 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_literal_list: /* opt_literal_list */ -#line 158 "bison_parser.y" - { - if ((((*yyvaluep).expr_vec)) != nullptr) { - for (auto ptr : *(((*yyvaluep).expr_vec))) { - delete ptr; - } - } - delete (((*yyvaluep).expr_vec)); -} -#line 2458 "bison_parser.cpp" - break; - - case YYSYMBOL_literal_list: /* literal_list */ -#line 158 "bison_parser.y" - { - if ((((*yyvaluep).expr_vec)) != nullptr) { - for (auto ptr : *(((*yyvaluep).expr_vec))) { - delete ptr; - } - } - delete (((*yyvaluep).expr_vec)); -} -#line 2471 "bison_parser.cpp" - break; - - case YYSYMBOL_expr_alias: /* expr_alias */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2477 "bison_parser.cpp" - break; - - case YYSYMBOL_expr: /* expr */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2483 "bison_parser.cpp" - break; - - case YYSYMBOL_operand: /* operand */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2489 "bison_parser.cpp" - break; - - case YYSYMBOL_scalar_expr: /* scalar_expr */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2495 "bison_parser.cpp" - break; - - case YYSYMBOL_unary_expr: /* unary_expr */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2501 "bison_parser.cpp" - break; - - case YYSYMBOL_binary_expr: /* binary_expr */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2507 "bison_parser.cpp" - break; - - case YYSYMBOL_logic_expr: /* logic_expr */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2513 "bison_parser.cpp" - break; - - case YYSYMBOL_in_expr: /* in_expr */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2519 "bison_parser.cpp" - break; - - case YYSYMBOL_case_expr: /* case_expr */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2525 "bison_parser.cpp" - break; - - case YYSYMBOL_case_list: /* case_list */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2531 "bison_parser.cpp" - break; - - case YYSYMBOL_exists_expr: /* exists_expr */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2537 "bison_parser.cpp" - break; - - case YYSYMBOL_comp_expr: /* comp_expr */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2543 "bison_parser.cpp" - break; - - case YYSYMBOL_function_expr: /* function_expr */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2549 "bison_parser.cpp" - break; - - case YYSYMBOL_extract_expr: /* extract_expr */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2555 "bison_parser.cpp" - break; - - case YYSYMBOL_cast_expr: /* cast_expr */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2561 "bison_parser.cpp" - break; - - case YYSYMBOL_datetime_field: /* datetime_field */ -#line 155 "bison_parser.y" - { } -#line 2567 "bison_parser.cpp" - break; - - case YYSYMBOL_array_expr: /* array_expr */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2573 "bison_parser.cpp" - break; - - case YYSYMBOL_array_index: /* array_index */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2579 "bison_parser.cpp" - break; - - case YYSYMBOL_between_expr: /* between_expr */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2585 "bison_parser.cpp" - break; - - case YYSYMBOL_column_name: /* column_name */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2591 "bison_parser.cpp" - break; - - case YYSYMBOL_literal: /* literal */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2597 "bison_parser.cpp" - break; - - case YYSYMBOL_string_literal: /* string_literal */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2603 "bison_parser.cpp" - break; - - case YYSYMBOL_bool_literal: /* bool_literal */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2609 "bison_parser.cpp" - break; - - case YYSYMBOL_num_literal: /* num_literal */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2615 "bison_parser.cpp" - break; - - case YYSYMBOL_int_literal: /* int_literal */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2621 "bison_parser.cpp" - break; - - case YYSYMBOL_null_literal: /* null_literal */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2627 "bison_parser.cpp" - break; - - case YYSYMBOL_param_expr: /* param_expr */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2633 "bison_parser.cpp" - break; - - case YYSYMBOL_table_ref: /* table_ref */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).table)); } -#line 2639 "bison_parser.cpp" - break; - - case YYSYMBOL_table_ref_atomic: /* table_ref_atomic */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).table)); } -#line 2645 "bison_parser.cpp" - break; - - case YYSYMBOL_nonjoin_table_ref_atomic: /* nonjoin_table_ref_atomic */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).table)); } -#line 2651 "bison_parser.cpp" - break; - - case YYSYMBOL_table_ref_commalist: /* table_ref_commalist */ -#line 158 "bison_parser.y" - { - if ((((*yyvaluep).table_vec)) != nullptr) { - for (auto ptr : *(((*yyvaluep).table_vec))) { - delete ptr; - } - } - delete (((*yyvaluep).table_vec)); -} -#line 2664 "bison_parser.cpp" - break; - - case YYSYMBOL_table_ref_name: /* table_ref_name */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).table)); } -#line 2670 "bison_parser.cpp" - break; - - case YYSYMBOL_table_ref_name_no_alias: /* table_ref_name_no_alias */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).table)); } -#line 2676 "bison_parser.cpp" - break; - - case YYSYMBOL_table_name: /* table_name */ -#line 156 "bison_parser.y" - { free( (((*yyvaluep).table_name).name) ); free( (((*yyvaluep).table_name).schema) ); } -#line 2682 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_index_name: /* opt_index_name */ -#line 157 "bison_parser.y" - { free( (((*yyvaluep).sval)) ); } -#line 2688 "bison_parser.cpp" - break; - - case YYSYMBOL_index_name: /* index_name */ -#line 157 "bison_parser.y" - { free( (((*yyvaluep).sval)) ); } -#line 2694 "bison_parser.cpp" - break; - - case YYSYMBOL_table_alias: /* table_alias */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).alias_t)); } -#line 2700 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_table_alias: /* opt_table_alias */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).alias_t)); } -#line 2706 "bison_parser.cpp" - break; - - case YYSYMBOL_alias: /* alias */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).alias_t)); } -#line 2712 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_alias: /* opt_alias */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).alias_t)); } -#line 2718 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_with_clause: /* opt_with_clause */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).with_description_vec)); } -#line 2724 "bison_parser.cpp" - break; - - case YYSYMBOL_with_clause: /* with_clause */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).with_description_vec)); } -#line 2730 "bison_parser.cpp" - break; - - case YYSYMBOL_with_description_list: /* with_description_list */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).with_description_vec)); } -#line 2736 "bison_parser.cpp" - break; - - case YYSYMBOL_with_description: /* with_description */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).with_description_t)); } -#line 2742 "bison_parser.cpp" - break; - - case YYSYMBOL_join_clause: /* join_clause */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).table)); } -#line 2748 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_join_type: /* opt_join_type */ -#line 155 "bison_parser.y" - { } -#line 2754 "bison_parser.cpp" - break; - - case YYSYMBOL_join_condition: /* join_condition */ -#line 166 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2760 "bison_parser.cpp" - break; - - case YYSYMBOL_ident_commalist: /* ident_commalist */ -#line 158 "bison_parser.y" - { - if ((((*yyvaluep).str_vec)) != nullptr) { - for (auto ptr : *(((*yyvaluep).str_vec))) { - delete ptr; - } - } - delete (((*yyvaluep).str_vec)); -} -#line 2773 "bison_parser.cpp" - break; - - default: - break; - } - YY_IGNORE_MAYBE_UNINITIALIZED_END -} - - - - - - -/*----------. -| yyparse. | -`----------*/ - -int -yyparse (hsql::SQLParserResult* result, yyscan_t scanner) -{ -/* Lookahead token kind. */ -int yychar; - - -/* The semantic value of the lookahead symbol. */ -/* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ -YY_INITIAL_VALUE (static YYSTYPE yyval_default;) -YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); - -/* Location data for the lookahead symbol. */ -static YYLTYPE yyloc_default -# if defined HSQL_LTYPE_IS_TRIVIAL && HSQL_LTYPE_IS_TRIVIAL - = { 1, 1, 1, 1 } -# endif -; -YYLTYPE yylloc = yyloc_default; - - /* Number of syntax errors so far. */ - int yynerrs = 0; - - yy_state_fast_t yystate = 0; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus = 0; - - /* Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* Their size. */ - YYPTRDIFF_T yystacksize = YYINITDEPTH; - - /* The state stack: array, bottom, top. */ - yy_state_t yyssa[YYINITDEPTH]; - yy_state_t *yyss = yyssa; - yy_state_t *yyssp = yyss; - - /* The semantic value stack: array, bottom, top. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp = yyvs; - - /* The location stack: array, bottom, top. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp = yyls; - - int yyn; - /* The return value of yyparse. */ - int yyresult; - /* Lookahead symbol kind. */ - yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - YYLTYPE yyloc; - - /* The locations where the error started and ended. */ - YYLTYPE yyerror_range[3]; - - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yychar = SQL_HSQL_EMPTY; /* Cause a token to be read. */ - -/* User initialization code. */ -#line 73 "bison_parser.y" -{ - // Initialize - yylloc.first_column = 0; - yylloc.last_column = 0; - yylloc.first_line = 0; - yylloc.last_line = 0; - yylloc.total_column = 0; - yylloc.string_length = 0; -} - -#line 2880 "bison_parser.cpp" - - yylsp[0] = yylloc; - goto yysetstate; - - -/*------------------------------------------------------------. -| yynewstate -- push a new state, which is found in yystate. | -`------------------------------------------------------------*/ -yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - - -/*--------------------------------------------------------------------. -| yysetstate -- set current state (the top of the stack) to yystate. | -`--------------------------------------------------------------------*/ -yysetstate: - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - YY_ASSERT (0 <= yystate && yystate < YYNSTATES); - YY_IGNORE_USELESS_CAST_BEGIN - *yyssp = YY_CAST (yy_state_t, yystate); - YY_IGNORE_USELESS_CAST_END - YY_STACK_PRINT (yyss, yyssp); - - 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. */ - YYPTRDIFF_T yysize = yyssp - yyss + 1; - -# 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 - memory. */ - yy_state_t *yyss1 = yyss; - YYSTYPE *yyvs1 = yyvs; - YYLTYPE *yyls1 = yyls; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * YYSIZEOF (*yyssp), - &yyvs1, yysize * YYSIZEOF (*yyvsp), - &yyls1, yysize * YYSIZEOF (*yylsp), - &yystacksize); - yyss = yyss1; - yyvs = yyvs1; - yyls = yyls1; - } -# else /* defined YYSTACK_RELOCATE */ - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yy_state_t *yyss1 = yyss; - union yyalloc *yyptr = - YY_CAST (union yyalloc *, - YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); - YYSTACK_RELOCATE (yyls_alloc, yyls); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - yylsp = yyls + yysize - 1; - - YY_IGNORE_USELESS_CAST_BEGIN - YYDPRINTF ((stderr, "Stack size increased to %ld\n", - YY_CAST (long, yystacksize))); - YY_IGNORE_USELESS_CAST_END - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } -#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ - - if (yystate == YYFINAL) - YYACCEPT; - - goto yybackup; - - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ - if (yychar == SQL_HSQL_EMPTY) - { - YYDPRINTF ((stderr, "Reading a token\n")); - yychar = yylex (&yylval, &yylloc, scanner); - } - - if (yychar <= SQL_YYEOF) - { - yychar = SQL_YYEOF; - yytoken = YYSYMBOL_YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else if (yychar == SQL_HSQL_error) - { - /* The scanner already issued an error message, process directly - to error recovery. But do not keep the error token as - lookahead, it is too special and may lead us to an endless - loop in error recovery. */ - yychar = SQL_HSQL_UNDEF; - yytoken = YYSYMBOL_YYerror; - yyerror_range[1] = yylloc; - goto yyerrlab1; - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yytable_value_is_error (yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - yystate = yyn; - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - *++yylsp = yylloc; - - /* Discard the shifted token. */ - yychar = SQL_HSQL_EMPTY; - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - '$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - /* Default location. */ - YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); - yyerror_range[1] = yyloc; - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 2: /* input: statement_list opt_semicolon */ -#line 288 "bison_parser.y" - { - for (SQLStatement* stmt : *(yyvsp[-1].stmt_vec)) { - // Transfers ownership of the statement. - result->addStatement(stmt); - } - - unsigned param_id = 0; - for (void* param : yyloc.param_list) { - if (param != nullptr) { - Expr* expr = (Expr*) param; - expr->ival = param_id; - result->addParameter(expr); - ++param_id; - } - } - delete (yyvsp[-1].stmt_vec); - } -#line 3108 "bison_parser.cpp" - break; - - case 3: /* statement_list: statement */ -#line 309 "bison_parser.y" - { - (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 3119 "bison_parser.cpp" - break; - - case 4: /* statement_list: statement_list ';' statement */ -#line 315 "bison_parser.y" - { - (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 3130 "bison_parser.cpp" - break; - - case 5: /* statement: prepare_statement opt_hints */ -#line 324 "bison_parser.y" - { - (yyval.statement) = (yyvsp[-1].prep_stmt); - (yyval.statement)->hints = (yyvsp[0].expr_vec); - } -#line 3139 "bison_parser.cpp" - break; - - case 6: /* statement: preparable_statement opt_hints */ -#line 328 "bison_parser.y" - { - (yyval.statement) = (yyvsp[-1].statement); - (yyval.statement)->hints = (yyvsp[0].expr_vec); - } -#line 3148 "bison_parser.cpp" - break; - - case 7: /* statement: show_statement */ -#line 332 "bison_parser.y" - { - (yyval.statement) = (yyvsp[0].show_stmt); - } -#line 3156 "bison_parser.cpp" - break; - - case 8: /* statement: import_statement */ -#line 335 "bison_parser.y" - { - (yyval.statement) = (yyvsp[0].import_stmt); - } -#line 3164 "bison_parser.cpp" - break; - - case 9: /* statement: export_statement */ -#line 338 "bison_parser.y" - { - (yyval.statement) = (yyvsp[0].export_stmt); - } -#line 3172 "bison_parser.cpp" - break; - - case 10: /* preparable_statement: select_statement */ -#line 345 "bison_parser.y" - { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 3178 "bison_parser.cpp" - break; - - case 11: /* preparable_statement: create_statement */ -#line 346 "bison_parser.y" - { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 3184 "bison_parser.cpp" - break; - - case 12: /* preparable_statement: insert_statement */ -#line 347 "bison_parser.y" - { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 3190 "bison_parser.cpp" - break; - - case 13: /* preparable_statement: delete_statement */ -#line 348 "bison_parser.y" - { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3196 "bison_parser.cpp" - break; - - case 14: /* preparable_statement: truncate_statement */ -#line 349 "bison_parser.y" - { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3202 "bison_parser.cpp" - break; - - case 15: /* preparable_statement: update_statement */ -#line 350 "bison_parser.y" - { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 3208 "bison_parser.cpp" - break; - - case 16: /* preparable_statement: drop_statement */ -#line 351 "bison_parser.y" - { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 3214 "bison_parser.cpp" - break; - - case 17: /* preparable_statement: alter_statement */ -#line 352 "bison_parser.y" - { (yyval.statement) = (yyvsp[0].alter_stmt); } -#line 3220 "bison_parser.cpp" - break; - - case 18: /* preparable_statement: execute_statement */ -#line 353 "bison_parser.y" - { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 3226 "bison_parser.cpp" - break; - - case 19: /* preparable_statement: transaction_statement */ -#line 354 "bison_parser.y" - { (yyval.statement) = (yyvsp[0].transaction_stmt); } -#line 3232 "bison_parser.cpp" - break; - - case 20: /* opt_hints: WITH HINT '(' hint_list ')' */ -#line 363 "bison_parser.y" - { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 3238 "bison_parser.cpp" - break; - - case 21: /* opt_hints: %empty */ -#line 364 "bison_parser.y" - { (yyval.expr_vec) = nullptr; } -#line 3244 "bison_parser.cpp" - break; - - case 22: /* hint_list: hint */ -#line 369 "bison_parser.y" - { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3250 "bison_parser.cpp" - break; - - case 23: /* hint_list: hint_list ',' hint */ -#line 370 "bison_parser.y" - { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3256 "bison_parser.cpp" - break; - - case 24: /* hint: IDENTIFIER */ -#line 374 "bison_parser.y" - { - (yyval.expr) = Expr::make(kExprHint); - (yyval.expr)->name = (yyvsp[0].sval); - } -#line 3265 "bison_parser.cpp" - break; - - case 25: /* hint: IDENTIFIER '(' literal_list ')' */ -#line 378 "bison_parser.y" - { - (yyval.expr) = Expr::make(kExprHint); - (yyval.expr)->name = (yyvsp[-3].sval); - (yyval.expr)->exprList = (yyvsp[-1].expr_vec); - } -#line 3275 "bison_parser.cpp" - break; - - case 26: /* transaction_statement: BEGIN opt_transaction_keyword */ -#line 390 "bison_parser.y" - { - (yyval.transaction_stmt) = new TransactionStatement(kBeginTransaction); - } -#line 3283 "bison_parser.cpp" - break; - - case 27: /* transaction_statement: ROLLBACK opt_transaction_keyword */ -#line 393 "bison_parser.y" - { - (yyval.transaction_stmt) = new TransactionStatement(kRollbackTransaction); - } -#line 3291 "bison_parser.cpp" - break; - - case 28: /* transaction_statement: COMMIT opt_transaction_keyword */ -#line 396 "bison_parser.y" - { - (yyval.transaction_stmt) = new TransactionStatement(kCommitTransaction); - } -#line 3299 "bison_parser.cpp" - break; - - case 31: /* prepare_statement: PREPARE IDENTIFIER FROM prepare_target_query */ -#line 410 "bison_parser.y" - { - (yyval.prep_stmt) = new PrepareStatement(); - (yyval.prep_stmt)->name = (yyvsp[-2].sval); - (yyval.prep_stmt)->query = (yyvsp[0].sval); - } -#line 3309 "bison_parser.cpp" - break; - - case 33: /* execute_statement: EXECUTE IDENTIFIER */ -#line 420 "bison_parser.y" - { - (yyval.exec_stmt) = new ExecuteStatement(); - (yyval.exec_stmt)->name = (yyvsp[0].sval); - } -#line 3318 "bison_parser.cpp" - break; - - case 34: /* execute_statement: EXECUTE IDENTIFIER '(' opt_literal_list ')' */ -#line 424 "bison_parser.y" - { - (yyval.exec_stmt) = new ExecuteStatement(); - (yyval.exec_stmt)->name = (yyvsp[-3].sval); - (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); - } -#line 3328 "bison_parser.cpp" - break; - - case 35: /* import_statement: IMPORT FROM file_type FILE file_path INTO table_name */ -#line 438 "bison_parser.y" - { - (yyval.import_stmt) = new ImportStatement((yyvsp[-4].import_type_t)); - (yyval.import_stmt)->filePath = (yyvsp[-2].sval); - (yyval.import_stmt)->schema = (yyvsp[0].table_name).schema; - (yyval.import_stmt)->tableName = (yyvsp[0].table_name).name; - } -#line 3339 "bison_parser.cpp" - break; - - case 36: /* import_statement: COPY table_name FROM file_path opt_file_type */ -#line 444 "bison_parser.y" - { - (yyval.import_stmt) = new ImportStatement((yyvsp[0].import_type_t)); - (yyval.import_stmt)->filePath = (yyvsp[-1].sval); - (yyval.import_stmt)->schema = (yyvsp[-3].table_name).schema; - (yyval.import_stmt)->tableName = (yyvsp[-3].table_name).name; - } -#line 3350 "bison_parser.cpp" - break; - - case 37: /* file_type: IDENTIFIER */ -#line 453 "bison_parser.y" - { - if (strcasecmp((yyvsp[0].sval), "csv") == 0) { - (yyval.import_type_t) = kImportCSV; - } else if (strcasecmp((yyvsp[0].sval), "tbl") == 0) { - (yyval.import_type_t) = kImportTbl; - } else if (strcasecmp((yyvsp[0].sval), "binary") == 0 || strcasecmp((yyvsp[0].sval), "bin") == 0) { - (yyval.import_type_t) = kImportBinary; - } else { - free((yyvsp[0].sval)); - yyerror(&yyloc, result, scanner, "File type is unknown."); - YYERROR; - } - free((yyvsp[0].sval)); - } -#line 3369 "bison_parser.cpp" - break; - - case 38: /* file_path: string_literal */ -#line 470 "bison_parser.y" - { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 3375 "bison_parser.cpp" - break; - - case 39: /* opt_file_type: WITH FORMAT file_type */ -#line 474 "bison_parser.y" - { - (yyval.import_type_t) = (yyvsp[0].import_type_t); - } -#line 3383 "bison_parser.cpp" - break; - - case 40: /* opt_file_type: %empty */ -#line 477 "bison_parser.y" - { (yyval.import_type_t) = kImportAuto; } -#line 3389 "bison_parser.cpp" - break; - - case 41: /* export_statement: COPY table_name TO file_path opt_file_type */ -#line 486 "bison_parser.y" - { - (yyval.export_stmt) = new ExportStatement((yyvsp[0].import_type_t)); - (yyval.export_stmt)->filePath = (yyvsp[-1].sval); - (yyval.export_stmt)->schema = (yyvsp[-3].table_name).schema; - (yyval.export_stmt)->tableName = (yyvsp[-3].table_name).name; - } -#line 3400 "bison_parser.cpp" - break; - - case 42: /* show_statement: SHOW TABLES */ -#line 500 "bison_parser.y" - { - (yyval.show_stmt) = new ShowStatement(kShowTables); - } -#line 3408 "bison_parser.cpp" - break; - - case 43: /* show_statement: SHOW COLUMNS table_name */ -#line 503 "bison_parser.y" - { - (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 3418 "bison_parser.cpp" - break; - - case 44: /* show_statement: DESCRIBE table_name */ -#line 508 "bison_parser.y" - { - (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 3428 "bison_parser.cpp" - break; - - case 45: /* create_statement: CREATE TABLE opt_not_exists table_name FROM IDENTIFIER FILE file_path */ -#line 522 "bison_parser.y" - { - (yyval.create_stmt) = new CreateStatement(kCreateTableFromTbl); - (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); - (yyval.create_stmt)->schema = (yyvsp[-4].table_name).schema; - (yyval.create_stmt)->tableName = (yyvsp[-4].table_name).name; - if (strcasecmp((yyvsp[-2].sval), "tbl") != 0) { - free((yyvsp[-2].sval)); - yyerror(&yyloc, result, scanner, "File type is unknown."); - YYERROR; - } - free((yyvsp[-2].sval)); - (yyval.create_stmt)->filePath = (yyvsp[0].sval); - } -#line 3446 "bison_parser.cpp" - break; - - case 46: /* create_statement: CREATE TABLE opt_not_exists table_name '(' table_elem_commalist ')' */ -#line 535 "bison_parser.y" - { - (yyval.create_stmt) = new CreateStatement(kCreateTable); - (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); - (yyval.create_stmt)->schema = (yyvsp[-3].table_name).schema; - (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; - (yyval.create_stmt)->setColumnDefsAndConstraints((yyvsp[-1].table_element_vec)); - } -#line 3458 "bison_parser.cpp" - break; - - case 47: /* create_statement: CREATE TABLE opt_not_exists table_name AS select_statement */ -#line 542 "bison_parser.y" - { - (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 3470 "bison_parser.cpp" - break; - - case 48: /* create_statement: CREATE INDEX opt_not_exists opt_index_name ON table_name '(' ident_commalist ')' */ -#line 549 "bison_parser.y" - { - (yyval.create_stmt) = new CreateStatement(kCreateIndex); - (yyval.create_stmt)->indexName = (yyvsp[-5].sval); - (yyval.create_stmt)->ifNotExists = (yyvsp[-6].bval); - (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; - (yyval.create_stmt)->indexColumns = (yyvsp[-1].str_vec); - } -#line 3482 "bison_parser.cpp" - break; - - case 49: /* create_statement: CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement */ -#line 556 "bison_parser.y" - { - (yyval.create_stmt) = new CreateStatement(kCreateView); - (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); - (yyval.create_stmt)->schema = (yyvsp[-3].table_name).schema; - (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; - (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); - (yyval.create_stmt)->select = (yyvsp[0].select_stmt); - } -#line 3495 "bison_parser.cpp" - break; - - case 50: /* opt_not_exists: IF NOT EXISTS */ -#line 567 "bison_parser.y" - { (yyval.bval) = true; } -#line 3501 "bison_parser.cpp" - break; - - case 51: /* opt_not_exists: %empty */ -#line 568 "bison_parser.y" - { (yyval.bval) = false; } -#line 3507 "bison_parser.cpp" - break; - - case 52: /* table_elem_commalist: table_elem */ -#line 572 "bison_parser.y" - { (yyval.table_element_vec) = new std::vector(); (yyval.table_element_vec)->push_back((yyvsp[0].table_element_t)); } -#line 3513 "bison_parser.cpp" - break; - - case 53: /* table_elem_commalist: table_elem_commalist ',' table_elem */ -#line 573 "bison_parser.y" - { (yyvsp[-2].table_element_vec)->push_back((yyvsp[0].table_element_t)); (yyval.table_element_vec) = (yyvsp[-2].table_element_vec); } -#line 3519 "bison_parser.cpp" - break; - - case 54: /* table_elem: column_def */ -#line 577 "bison_parser.y" - { (yyval.table_element_t) = (yyvsp[0].column_t); } -#line 3525 "bison_parser.cpp" - break; - - case 55: /* table_elem: table_constraint */ -#line 578 "bison_parser.y" - { (yyval.table_element_t) = (yyvsp[0].table_constraint_t); } -#line 3531 "bison_parser.cpp" - break; - - case 56: /* column_def: IDENTIFIER column_type opt_column_constraints */ -#line 582 "bison_parser.y" - { - (yyval.column_t) = new ColumnDefinition((yyvsp[-2].sval), (yyvsp[-1].column_type_t), (yyvsp[0].column_constraint_vec)); - (yyval.column_t)->setNullableExplicit(); - } -#line 3540 "bison_parser.cpp" - break; - - case 57: /* column_type: INT */ -#line 589 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3546 "bison_parser.cpp" - break; - - case 58: /* column_type: INTEGER */ -#line 590 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3552 "bison_parser.cpp" - break; - - case 59: /* column_type: LONG */ -#line 591 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::LONG}; } -#line 3558 "bison_parser.cpp" - break; - - case 60: /* column_type: FLOAT */ -#line 592 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3564 "bison_parser.cpp" - break; - - case 61: /* column_type: DECIMAL opt_decimal_specification */ -#line 593 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::DECIMAL, 0, (yyvsp[0].column_specification_t)}; } -#line 3570 "bison_parser.cpp" - break; - - case 62: /* column_type: DOUBLE */ -#line 594 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } -#line 3576 "bison_parser.cpp" - break; - - case 63: /* column_type: REAL */ -#line 595 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::REAL}; } -#line 3582 "bison_parser.cpp" - break; - - case 64: /* column_type: VARCHAR '(' INTVAL ')' */ -#line 596 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3588 "bison_parser.cpp" - break; - - case 65: /* column_type: CHARACTER VARYING '(' INTVAL ')' */ -#line 597 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::VARCHAR_VARYING, (yyvsp[-1].ival)}; } -#line 3594 "bison_parser.cpp" - break; - - case 66: /* column_type: CHAR '(' INTVAL ')' */ -#line 598 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } -#line 3600 "bison_parser.cpp" - break; - - case 67: /* column_type: TEXT */ -#line 599 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } -#line 3606 "bison_parser.cpp" - break; - - case 68: /* column_type: TIME opt_time_specification */ -#line 600 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::TIME, 0, (yyvsp[0].column_specification_t) }; } -#line 3612 "bison_parser.cpp" - break; - - case 69: /* column_type: DATETIME */ -#line 601 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } -#line 3618 "bison_parser.cpp" - break; - - case 70: /* column_type: DATE */ -#line 602 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::DATE}; } -#line 3624 "bison_parser.cpp" - break; - - case 71: /* opt_time_specification: '(' INTVAL ')' */ -#line 606 "bison_parser.y" - { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-1].ival)}; } -#line 3630 "bison_parser.cpp" - break; - - case 72: /* opt_time_specification: %empty */ -#line 607 "bison_parser.y" - { (yyval.column_specification_t) = ColumnSpecification{}; } -#line 3636 "bison_parser.cpp" - break; - - case 73: /* opt_decimal_specification: '(' INTVAL ',' INTVAL ')' */ -#line 611 "bison_parser.y" - { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-3].ival), (yyvsp[-1].ival)}; } -#line 3642 "bison_parser.cpp" - break; - - case 74: /* opt_decimal_specification: '(' INTVAL ')' */ -#line 612 "bison_parser.y" - { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-1].ival)}; } -#line 3648 "bison_parser.cpp" - break; - - case 75: /* opt_decimal_specification: %empty */ -#line 613 "bison_parser.y" - { (yyval.column_specification_t) = ColumnSpecification{}; } -#line 3654 "bison_parser.cpp" - break; - - case 76: /* opt_column_constraints: column_constraint */ -#line 617 "bison_parser.y" - { (yyval.column_constraint_vec) = new std::vector(); (yyval.column_constraint_vec)->push_back((yyvsp[0].column_constraint_t)); } -#line 3660 "bison_parser.cpp" - break; - - case 77: /* opt_column_constraints: opt_column_constraints column_constraint */ -#line 618 "bison_parser.y" - { (yyvsp[-1].column_constraint_vec)->push_back((yyvsp[0].column_constraint_t)); (yyval.column_constraint_vec) = (yyvsp[-1].column_constraint_vec); } -#line 3666 "bison_parser.cpp" - break; - - case 78: /* opt_column_constraints: %empty */ -#line 619 "bison_parser.y" - { (yyval.column_constraint_vec) = new std::vector(); } -#line 3672 "bison_parser.cpp" - break; - - case 79: /* column_constraint: PRIMARY KEY */ -#line 623 "bison_parser.y" - { (yyval.column_constraint_t) = ConstraintType::PRIMARY_KEY; } -#line 3678 "bison_parser.cpp" - break; - - case 80: /* column_constraint: UNIQUE */ -#line 624 "bison_parser.y" - { (yyval.column_constraint_t) = ConstraintType::UNIQUE; } -#line 3684 "bison_parser.cpp" - break; - - case 81: /* column_constraint: NULL */ -#line 625 "bison_parser.y" - { (yyval.column_constraint_t) = ConstraintType::_NULL; } -#line 3690 "bison_parser.cpp" - break; - - case 82: /* column_constraint: NOT NULL */ -#line 626 "bison_parser.y" - { (yyval.column_constraint_t) = ConstraintType::NOTNULL; } -#line 3696 "bison_parser.cpp" - break; - - case 83: /* table_constraint: PRIMARY KEY '(' ident_commalist ')' */ -#line 630 "bison_parser.y" - { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::PRIMARY_KEY, (yyvsp[-1].str_vec)); } -#line 3702 "bison_parser.cpp" - break; - - case 84: /* table_constraint: UNIQUE '(' ident_commalist ')' */ -#line 631 "bison_parser.y" - { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::UNIQUE, (yyvsp[-1].str_vec)); } -#line 3708 "bison_parser.cpp" - break; - - case 85: /* drop_statement: DROP TABLE opt_exists table_name */ -#line 642 "bison_parser.y" - { - (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 3719 "bison_parser.cpp" - break; - - case 86: /* drop_statement: DROP VIEW opt_exists table_name */ -#line 648 "bison_parser.y" - { - (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 3730 "bison_parser.cpp" - break; - - case 87: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ -#line 654 "bison_parser.y" - { - (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); - (yyval.drop_stmt)->ifExists = false; - (yyval.drop_stmt)->name = (yyvsp[0].sval); - } -#line 3740 "bison_parser.cpp" - break; - - case 88: /* drop_statement: DROP INDEX opt_exists index_name ON table_name */ -#line 659 "bison_parser.y" - { - (yyval.drop_stmt) = new DropStatement(kDropIndex); - (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; - (yyval.drop_stmt)->ifExists = (yyvsp[-3].bval); - (yyval.drop_stmt)->indexName = (yyvsp[-2].sval); - } -#line 3751 "bison_parser.cpp" - break; - - case 89: /* opt_exists: IF EXISTS */ -#line 668 "bison_parser.y" - { (yyval.bval) = true; } -#line 3757 "bison_parser.cpp" - break; - - case 90: /* opt_exists: %empty */ -#line 669 "bison_parser.y" - { (yyval.bval) = false; } -#line 3763 "bison_parser.cpp" - break; - - case 91: /* alter_statement: ALTER TABLE opt_exists table_name alter_action */ -#line 678 "bison_parser.y" - { - (yyval.alter_stmt) = new AlterStatement((yyvsp[-1].table_name).name, (yyvsp[0].alter_action_t)); - (yyval.alter_stmt)->ifTableExists = (yyvsp[-2].bval); - (yyval.alter_stmt)->schema = (yyvsp[-1].table_name).schema; - } -#line 3773 "bison_parser.cpp" - break; - - case 92: /* alter_action: drop_action */ -#line 686 "bison_parser.y" - {(yyval.alter_action_t) = (yyvsp[0].drop_action_t);} -#line 3779 "bison_parser.cpp" - break; - - case 93: /* drop_action: DROP COLUMN opt_exists column_name */ -#line 689 "bison_parser.y" - { - (yyval.drop_action_t) = new DropColumnAction((yyvsp[0].expr)->name); - (yyval.drop_action_t)->ifExists = (yyvsp[-1].bval); - } -#line 3788 "bison_parser.cpp" - break; - - case 94: /* delete_statement: DELETE FROM table_name opt_where */ -#line 701 "bison_parser.y" - { - (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 3799 "bison_parser.cpp" - break; - - case 95: /* truncate_statement: TRUNCATE table_name */ -#line 710 "bison_parser.y" - { - (yyval.delete_stmt) = new DeleteStatement(); - (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; - (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; - } -#line 3809 "bison_parser.cpp" - break; - - case 96: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ -#line 723 "bison_parser.y" - { - (yyval.insert_stmt) = new InsertStatement(kInsertValues); - (yyval.insert_stmt)->schema = (yyvsp[-5].table_name).schema; - (yyval.insert_stmt)->tableName = (yyvsp[-5].table_name).name; - (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); - (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); - } -#line 3821 "bison_parser.cpp" - break; - - case 97: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ -#line 730 "bison_parser.y" - { - (yyval.insert_stmt) = new InsertStatement(kInsertSelect); - (yyval.insert_stmt)->schema = (yyvsp[-2].table_name).schema; - (yyval.insert_stmt)->tableName = (yyvsp[-2].table_name).name; - (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); - (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); - } -#line 3833 "bison_parser.cpp" - break; - - case 98: /* opt_column_list: '(' ident_commalist ')' */ -#line 741 "bison_parser.y" - { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 3839 "bison_parser.cpp" - break; - - case 99: /* opt_column_list: %empty */ -#line 742 "bison_parser.y" - { (yyval.str_vec) = nullptr; } -#line 3845 "bison_parser.cpp" - break; - - case 100: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ -#line 752 "bison_parser.y" - { - (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 3856 "bison_parser.cpp" - break; - - case 101: /* update_clause_commalist: update_clause */ -#line 761 "bison_parser.y" - { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 3862 "bison_parser.cpp" - break; - - case 102: /* update_clause_commalist: update_clause_commalist ',' update_clause */ -#line 762 "bison_parser.y" - { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 3868 "bison_parser.cpp" - break; - - case 103: /* update_clause: IDENTIFIER '=' expr */ -#line 766 "bison_parser.y" - { - (yyval.update_t) = new UpdateClause(); - (yyval.update_t)->column = (yyvsp[-2].sval); - (yyval.update_t)->value = (yyvsp[0].expr); - } -#line 3878 "bison_parser.cpp" - break; - - case 104: /* select_statement: opt_with_clause select_with_paren */ -#line 778 "bison_parser.y" - { - (yyval.select_stmt) = (yyvsp[0].select_stmt); - (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); - } -#line 3887 "bison_parser.cpp" - break; - - case 105: /* select_statement: opt_with_clause select_no_paren */ -#line 782 "bison_parser.y" - { - (yyval.select_stmt) = (yyvsp[0].select_stmt); - (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); - } -#line 3896 "bison_parser.cpp" - break; - - case 106: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ -#line 786 "bison_parser.y" - { - (yyval.select_stmt) = (yyvsp[-4].select_stmt); - if ((yyval.select_stmt)->setOperations == nullptr) { - (yyval.select_stmt)->setOperations = new std::vector(); - } - (yyval.select_stmt)->setOperations->push_back((yyvsp[-3].set_operator_t)); - (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[-2].select_stmt); - (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); - (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); - (yyval.select_stmt)->withDescriptions = (yyvsp[-5].with_description_vec); - } -#line 3912 "bison_parser.cpp" - break; - - case 109: /* select_within_set_operation_no_parentheses: select_clause */ -#line 804 "bison_parser.y" - { (yyval.select_stmt) = (yyvsp[0].select_stmt); } -#line 3918 "bison_parser.cpp" - break; - - case 110: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ -#line 805 "bison_parser.y" - { - (yyval.select_stmt) = (yyvsp[-2].select_stmt); - if ((yyval.select_stmt)->setOperations == nullptr) { - (yyval.select_stmt)->setOperations = new std::vector(); - } - (yyval.select_stmt)->setOperations->push_back((yyvsp[-1].set_operator_t)); - (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[0].select_stmt); - } -#line 3931 "bison_parser.cpp" - break; - - case 111: /* select_with_paren: '(' select_no_paren ')' */ -#line 816 "bison_parser.y" - { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3937 "bison_parser.cpp" - break; - - case 112: /* select_with_paren: '(' select_with_paren ')' */ -#line 817 "bison_parser.y" - { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3943 "bison_parser.cpp" - break; - - case 113: /* select_no_paren: select_clause opt_order opt_limit */ -#line 821 "bison_parser.y" - { - (yyval.select_stmt) = (yyvsp[-2].select_stmt); - (yyval.select_stmt)->order = (yyvsp[-1].order_vec); - - // Limit could have been set by TOP. - if ((yyvsp[0].limit) != nullptr) { - delete (yyval.select_stmt)->limit; - (yyval.select_stmt)->limit = (yyvsp[0].limit); - } - } -#line 3958 "bison_parser.cpp" - break; - - case 114: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ -#line 831 "bison_parser.y" - { - (yyval.select_stmt) = (yyvsp[-4].select_stmt); - if ((yyval.select_stmt)->setOperations == nullptr) { - (yyval.select_stmt)->setOperations = new std::vector(); - } - (yyval.select_stmt)->setOperations->push_back((yyvsp[-3].set_operator_t)); - (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[-2].select_stmt); - (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); - (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); - } -#line 3973 "bison_parser.cpp" - break; - - case 115: /* set_operator: set_type opt_all */ -#line 844 "bison_parser.y" - { - (yyval.set_operator_t) = (yyvsp[-1].set_operator_t); - (yyval.set_operator_t)->isAll = (yyvsp[0].bval); - } -#line 3982 "bison_parser.cpp" - break; - - case 116: /* set_type: UNION */ -#line 851 "bison_parser.y" - { - (yyval.set_operator_t) = new SetOperation(); - (yyval.set_operator_t)->setType = SetType::kSetUnion; - } -#line 3991 "bison_parser.cpp" - break; - - case 117: /* set_type: INTERSECT */ -#line 855 "bison_parser.y" - { - (yyval.set_operator_t) = new SetOperation(); - (yyval.set_operator_t)->setType = SetType::kSetIntersect; - } -#line 4000 "bison_parser.cpp" - break; - - case 118: /* set_type: EXCEPT */ -#line 859 "bison_parser.y" - { - (yyval.set_operator_t) = new SetOperation(); - (yyval.set_operator_t)->setType = SetType::kSetExcept; - } -#line 4009 "bison_parser.cpp" - break; - - case 119: /* opt_all: ALL */ -#line 866 "bison_parser.y" - { - (yyval.bval) = true; - } -#line 4017 "bison_parser.cpp" - break; - - case 120: /* opt_all: %empty */ -#line 869 "bison_parser.y" - { - (yyval.bval) = false; - } -#line 4025 "bison_parser.cpp" - break; - - case 121: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ -#line 875 "bison_parser.y" - { - (yyval.select_stmt) = new SelectStatement(); - (yyval.select_stmt)->limit = (yyvsp[-5].limit); - (yyval.select_stmt)->selectDistinct = (yyvsp[-4].bval); - (yyval.select_stmt)->selectList = (yyvsp[-3].expr_vec); - (yyval.select_stmt)->fromTable = (yyvsp[-2].table); - (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); - (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); - } -#line 4039 "bison_parser.cpp" - break; - - case 122: /* opt_distinct: DISTINCT */ -#line 887 "bison_parser.y" - { (yyval.bval) = true; } -#line 4045 "bison_parser.cpp" - break; - - case 123: /* opt_distinct: %empty */ -#line 888 "bison_parser.y" - { (yyval.bval) = false; } -#line 4051 "bison_parser.cpp" - break; - - case 125: /* opt_from_clause: from_clause */ -#line 896 "bison_parser.y" - { (yyval.table) = (yyvsp[0].table); } -#line 4057 "bison_parser.cpp" - break; - - case 126: /* opt_from_clause: %empty */ -#line 897 "bison_parser.y" - { (yyval.table) = nullptr; } -#line 4063 "bison_parser.cpp" - break; - - case 127: /* from_clause: FROM table_ref */ -#line 901 "bison_parser.y" - { (yyval.table) = (yyvsp[0].table); } -#line 4069 "bison_parser.cpp" - break; - - case 128: /* opt_where: WHERE expr */ -#line 906 "bison_parser.y" - { (yyval.expr) = (yyvsp[0].expr); } -#line 4075 "bison_parser.cpp" - break; - - case 129: /* opt_where: %empty */ -#line 907 "bison_parser.y" - { (yyval.expr) = nullptr; } -#line 4081 "bison_parser.cpp" - break; - - case 130: /* opt_group: GROUP BY expr_list opt_having */ -#line 911 "bison_parser.y" - { - (yyval.group_t) = new GroupByDescription(); - (yyval.group_t)->columns = (yyvsp[-1].expr_vec); - (yyval.group_t)->having = (yyvsp[0].expr); - } -#line 4091 "bison_parser.cpp" - break; - - case 131: /* opt_group: %empty */ -#line 916 "bison_parser.y" - { (yyval.group_t) = nullptr; } -#line 4097 "bison_parser.cpp" - break; - - case 132: /* opt_having: HAVING expr */ -#line 920 "bison_parser.y" - { (yyval.expr) = (yyvsp[0].expr); } -#line 4103 "bison_parser.cpp" - break; - - case 133: /* opt_having: %empty */ -#line 921 "bison_parser.y" - { (yyval.expr) = nullptr; } -#line 4109 "bison_parser.cpp" - break; - - case 134: /* opt_order: ORDER BY order_list */ -#line 925 "bison_parser.y" - { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 4115 "bison_parser.cpp" - break; - - case 135: /* opt_order: %empty */ -#line 926 "bison_parser.y" - { (yyval.order_vec) = nullptr; } -#line 4121 "bison_parser.cpp" - break; - - case 136: /* order_list: order_desc */ -#line 930 "bison_parser.y" - { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 4127 "bison_parser.cpp" - break; - - case 137: /* order_list: order_list ',' order_desc */ -#line 931 "bison_parser.y" - { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 4133 "bison_parser.cpp" - break; - - case 138: /* order_desc: expr opt_order_type */ -#line 935 "bison_parser.y" - { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 4139 "bison_parser.cpp" - break; - - case 139: /* opt_order_type: ASC */ -#line 939 "bison_parser.y" - { (yyval.order_type) = kOrderAsc; } -#line 4145 "bison_parser.cpp" - break; - - case 140: /* opt_order_type: DESC */ -#line 940 "bison_parser.y" - { (yyval.order_type) = kOrderDesc; } -#line 4151 "bison_parser.cpp" - break; - - case 141: /* opt_order_type: %empty */ -#line 941 "bison_parser.y" - { (yyval.order_type) = kOrderAsc; } -#line 4157 "bison_parser.cpp" - break; - - case 142: /* opt_top: TOP int_literal */ -#line 947 "bison_parser.y" - { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 4163 "bison_parser.cpp" - break; - - case 143: /* opt_top: %empty */ -#line 948 "bison_parser.y" - { (yyval.limit) = nullptr; } -#line 4169 "bison_parser.cpp" - break; - - case 144: /* opt_limit: LIMIT expr */ -#line 952 "bison_parser.y" - { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 4175 "bison_parser.cpp" - break; - - case 145: /* opt_limit: OFFSET expr */ -#line 953 "bison_parser.y" - { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 4181 "bison_parser.cpp" - break; - - case 146: /* opt_limit: LIMIT expr OFFSET expr */ -#line 954 "bison_parser.y" - { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4187 "bison_parser.cpp" - break; - - case 147: /* opt_limit: LIMIT ALL */ -#line 955 "bison_parser.y" - { (yyval.limit) = new LimitDescription(nullptr, nullptr); } -#line 4193 "bison_parser.cpp" - break; - - case 148: /* opt_limit: LIMIT ALL OFFSET expr */ -#line 956 "bison_parser.y" - { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 4199 "bison_parser.cpp" - break; - - case 149: /* opt_limit: %empty */ -#line 957 "bison_parser.y" - { (yyval.limit) = nullptr; } -#line 4205 "bison_parser.cpp" - break; - - case 150: /* expr_list: expr_alias */ -#line 964 "bison_parser.y" - { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4211 "bison_parser.cpp" - break; - - case 151: /* expr_list: expr_list ',' expr_alias */ -#line 965 "bison_parser.y" - { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4217 "bison_parser.cpp" - break; - - case 152: /* opt_literal_list: literal_list */ -#line 969 "bison_parser.y" - { (yyval.expr_vec) = (yyvsp[0].expr_vec); } -#line 4223 "bison_parser.cpp" - break; - - case 153: /* opt_literal_list: %empty */ -#line 970 "bison_parser.y" - { (yyval.expr_vec) = nullptr; } -#line 4229 "bison_parser.cpp" - break; - - case 154: /* literal_list: literal */ -#line 974 "bison_parser.y" - { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4235 "bison_parser.cpp" - break; - - case 155: /* literal_list: literal_list ',' literal */ -#line 975 "bison_parser.y" - { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4241 "bison_parser.cpp" - break; - - case 156: /* expr_alias: expr opt_alias */ -#line 979 "bison_parser.y" - { - (yyval.expr) = (yyvsp[-1].expr); - if ((yyvsp[0].alias_t)) { - (yyval.expr)->alias = strdup((yyvsp[0].alias_t)->name); - delete (yyvsp[0].alias_t); - } - } -#line 4253 "bison_parser.cpp" - break; - - case 162: /* operand: '(' expr ')' */ -#line 997 "bison_parser.y" - { (yyval.expr) = (yyvsp[-1].expr); } -#line 4259 "bison_parser.cpp" - break; - - case 172: /* operand: '(' select_no_paren ')' */ -#line 1007 "bison_parser.y" - { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 4265 "bison_parser.cpp" - break; - - case 175: /* unary_expr: '-' operand */ -#line 1016 "bison_parser.y" - { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 4271 "bison_parser.cpp" - break; - - case 176: /* unary_expr: NOT operand */ -#line 1017 "bison_parser.y" - { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 4277 "bison_parser.cpp" - break; - - case 177: /* unary_expr: operand ISNULL */ -#line 1018 "bison_parser.y" - { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 4283 "bison_parser.cpp" - break; - - case 178: /* unary_expr: operand IS NULL */ -#line 1019 "bison_parser.y" - { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 4289 "bison_parser.cpp" - break; - - case 179: /* unary_expr: operand IS NOT NULL */ -#line 1020 "bison_parser.y" - { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 4295 "bison_parser.cpp" - break; - - case 181: /* binary_expr: operand '-' operand */ -#line 1025 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 4301 "bison_parser.cpp" - break; - - case 182: /* binary_expr: operand '+' operand */ -#line 1026 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 4307 "bison_parser.cpp" - break; - - case 183: /* binary_expr: operand '/' operand */ -#line 1027 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 4313 "bison_parser.cpp" - break; - - case 184: /* binary_expr: operand '*' operand */ -#line 1028 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 4319 "bison_parser.cpp" - break; - - case 185: /* binary_expr: operand '%' operand */ -#line 1029 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 4325 "bison_parser.cpp" - break; - - case 186: /* binary_expr: operand '^' operand */ -#line 1030 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 4331 "bison_parser.cpp" - break; - - case 187: /* binary_expr: operand LIKE operand */ -#line 1031 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 4337 "bison_parser.cpp" - break; - - case 188: /* binary_expr: operand NOT LIKE operand */ -#line 1032 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 4343 "bison_parser.cpp" - break; - - case 189: /* binary_expr: operand ILIKE operand */ -#line 1033 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 4349 "bison_parser.cpp" - break; - - case 190: /* binary_expr: operand CONCAT operand */ -#line 1034 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 4355 "bison_parser.cpp" - break; - - case 191: /* logic_expr: expr AND expr */ -#line 1038 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 4361 "bison_parser.cpp" - break; - - case 192: /* logic_expr: expr OR expr */ -#line 1039 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 4367 "bison_parser.cpp" - break; - - case 193: /* in_expr: operand IN '(' expr_list ')' */ -#line 1043 "bison_parser.y" - { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 4373 "bison_parser.cpp" - break; - - case 194: /* in_expr: operand NOT IN '(' expr_list ')' */ -#line 1044 "bison_parser.y" - { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 4379 "bison_parser.cpp" - break; - - case 195: /* in_expr: operand IN '(' select_no_paren ')' */ -#line 1045 "bison_parser.y" - { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 4385 "bison_parser.cpp" - break; - - case 196: /* in_expr: operand NOT IN '(' select_no_paren ')' */ -#line 1046 "bison_parser.y" - { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 4391 "bison_parser.cpp" - break; - - case 197: /* case_expr: CASE expr case_list END */ -#line 1052 "bison_parser.y" - { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } -#line 4397 "bison_parser.cpp" - break; - - case 198: /* case_expr: CASE expr case_list ELSE expr END */ -#line 1053 "bison_parser.y" - { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4403 "bison_parser.cpp" - break; - - case 199: /* case_expr: CASE case_list END */ -#line 1054 "bison_parser.y" - { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } -#line 4409 "bison_parser.cpp" - break; - - case 200: /* case_expr: CASE case_list ELSE expr END */ -#line 1055 "bison_parser.y" - { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4415 "bison_parser.cpp" - break; - - case 201: /* case_list: WHEN expr THEN expr */ -#line 1059 "bison_parser.y" - { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4421 "bison_parser.cpp" - break; - - case 202: /* case_list: case_list WHEN expr THEN expr */ -#line 1060 "bison_parser.y" - { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4427 "bison_parser.cpp" - break; - - case 203: /* exists_expr: EXISTS '(' select_no_paren ')' */ -#line 1064 "bison_parser.y" - { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 4433 "bison_parser.cpp" - break; - - case 204: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ -#line 1065 "bison_parser.y" - { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 4439 "bison_parser.cpp" - break; - - case 205: /* comp_expr: operand '=' operand */ -#line 1069 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4445 "bison_parser.cpp" - break; - - case 206: /* comp_expr: operand EQUALS operand */ -#line 1070 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4451 "bison_parser.cpp" - break; - - case 207: /* comp_expr: operand NOTEQUALS operand */ -#line 1071 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 4457 "bison_parser.cpp" - break; - - case 208: /* comp_expr: operand '<' operand */ -#line 1072 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 4463 "bison_parser.cpp" - break; - - case 209: /* comp_expr: operand '>' operand */ -#line 1073 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 4469 "bison_parser.cpp" - break; - - case 210: /* comp_expr: operand LESSEQ operand */ -#line 1074 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 4475 "bison_parser.cpp" - break; - - case 211: /* comp_expr: operand GREATEREQ operand */ -#line 1075 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 4481 "bison_parser.cpp" - break; - - case 212: /* function_expr: IDENTIFIER '(' ')' */ -#line 1079 "bison_parser.y" - { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 4487 "bison_parser.cpp" - break; - - case 213: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ -#line 1080 "bison_parser.y" - { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 4493 "bison_parser.cpp" - break; - - case 214: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ -#line 1084 "bison_parser.y" - { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } -#line 4499 "bison_parser.cpp" - break; - - case 215: /* cast_expr: CAST '(' expr AS column_type ')' */ -#line 1088 "bison_parser.y" - { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } -#line 4505 "bison_parser.cpp" - break; - - case 216: /* datetime_field: SECOND */ -#line 1092 "bison_parser.y" - { (yyval.datetime_field) = kDatetimeSecond; } -#line 4511 "bison_parser.cpp" - break; - - case 217: /* datetime_field: MINUTE */ -#line 1093 "bison_parser.y" - { (yyval.datetime_field) = kDatetimeMinute; } -#line 4517 "bison_parser.cpp" - break; - - case 218: /* datetime_field: HOUR */ -#line 1094 "bison_parser.y" - { (yyval.datetime_field) = kDatetimeHour; } -#line 4523 "bison_parser.cpp" - break; - - case 219: /* datetime_field: DAY */ -#line 1095 "bison_parser.y" - { (yyval.datetime_field) = kDatetimeDay; } -#line 4529 "bison_parser.cpp" - break; - - case 220: /* datetime_field: MONTH */ -#line 1096 "bison_parser.y" - { (yyval.datetime_field) = kDatetimeMonth; } -#line 4535 "bison_parser.cpp" - break; - - case 221: /* datetime_field: YEAR */ -#line 1097 "bison_parser.y" - { (yyval.datetime_field) = kDatetimeYear; } -#line 4541 "bison_parser.cpp" - break; - - case 222: /* array_expr: ARRAY '[' expr_list ']' */ -#line 1101 "bison_parser.y" - { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 4547 "bison_parser.cpp" - break; - - case 223: /* array_index: operand '[' int_literal ']' */ -#line 1105 "bison_parser.y" - { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 4553 "bison_parser.cpp" - break; - - case 224: /* between_expr: operand BETWEEN operand AND operand */ -#line 1109 "bison_parser.y" - { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4559 "bison_parser.cpp" - break; - - case 225: /* column_name: IDENTIFIER */ -#line 1113 "bison_parser.y" - { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 4565 "bison_parser.cpp" - break; - - case 226: /* column_name: IDENTIFIER '.' IDENTIFIER */ -#line 1114 "bison_parser.y" - { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 4571 "bison_parser.cpp" - break; - - case 227: /* column_name: '*' */ -#line 1115 "bison_parser.y" - { (yyval.expr) = Expr::makeStar(); } -#line 4577 "bison_parser.cpp" - break; - - case 228: /* column_name: IDENTIFIER '.' '*' */ -#line 1116 "bison_parser.y" - { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 4583 "bison_parser.cpp" - break; - - case 234: /* string_literal: STRING */ -#line 1128 "bison_parser.y" - { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 4589 "bison_parser.cpp" - break; - - case 235: /* bool_literal: TRUE */ -#line 1132 "bison_parser.y" - { (yyval.expr) = Expr::makeLiteral(true); } -#line 4595 "bison_parser.cpp" - break; - - case 236: /* bool_literal: FALSE */ -#line 1133 "bison_parser.y" - { (yyval.expr) = Expr::makeLiteral(false); } -#line 4601 "bison_parser.cpp" - break; - - case 237: /* num_literal: FLOATVAL */ -#line 1137 "bison_parser.y" - { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 4607 "bison_parser.cpp" - break; - - case 239: /* int_literal: INTVAL */ -#line 1142 "bison_parser.y" - { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 4613 "bison_parser.cpp" - break; - - case 240: /* null_literal: NULL */ -#line 1146 "bison_parser.y" - { (yyval.expr) = Expr::makeNullLiteral(); } -#line 4619 "bison_parser.cpp" - break; - - case 241: /* param_expr: '?' */ -#line 1150 "bison_parser.y" - { - (yyval.expr) = Expr::makeParameter(yylloc.total_column); - (yyval.expr)->ival2 = yyloc.param_list.size(); - yyloc.param_list.push_back((yyval.expr)); - } -#line 4629 "bison_parser.cpp" - break; - - case 243: /* table_ref: table_ref_commalist ',' table_ref_atomic */ -#line 1163 "bison_parser.y" - { - (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); - auto tbl = new TableRef(kTableCrossProduct); - tbl->list = (yyvsp[-2].table_vec); - (yyval.table) = tbl; - } -#line 4640 "bison_parser.cpp" - break; - - case 247: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ -#line 1179 "bison_parser.y" - { - auto tbl = new TableRef(kTableSelect); - tbl->select = (yyvsp[-2].select_stmt); - tbl->alias = (yyvsp[0].alias_t); - (yyval.table) = tbl; - } -#line 4651 "bison_parser.cpp" - break; - - case 248: /* table_ref_commalist: table_ref_atomic */ -#line 1188 "bison_parser.y" - { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 4657 "bison_parser.cpp" - break; - - case 249: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ -#line 1189 "bison_parser.y" - { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 4663 "bison_parser.cpp" - break; - - case 250: /* table_ref_name: table_name opt_table_alias */ -#line 1194 "bison_parser.y" - { - auto tbl = new TableRef(kTableName); - tbl->schema = (yyvsp[-1].table_name).schema; - tbl->name = (yyvsp[-1].table_name).name; - tbl->alias = (yyvsp[0].alias_t); - (yyval.table) = tbl; - } -#line 4675 "bison_parser.cpp" - break; - - case 251: /* table_ref_name_no_alias: table_name */ -#line 1205 "bison_parser.y" - { - (yyval.table) = new TableRef(kTableName); - (yyval.table)->schema = (yyvsp[0].table_name).schema; - (yyval.table)->name = (yyvsp[0].table_name).name; - } -#line 4685 "bison_parser.cpp" - break; - - case 252: /* table_name: IDENTIFIER */ -#line 1214 "bison_parser.y" - { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} -#line 4691 "bison_parser.cpp" - break; - - case 253: /* table_name: IDENTIFIER '.' IDENTIFIER */ -#line 1215 "bison_parser.y" - { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } -#line 4697 "bison_parser.cpp" - break; - - case 254: /* opt_index_name: IDENTIFIER */ -#line 1219 "bison_parser.y" - { (yyval.sval) = (yyvsp[0].sval);} -#line 4703 "bison_parser.cpp" - break; - - case 255: /* opt_index_name: %empty */ -#line 1220 "bison_parser.y" - { (yyval.sval) = nullptr;} -#line 4709 "bison_parser.cpp" - break; - - case 256: /* index_name: IDENTIFIER */ -#line 1224 "bison_parser.y" - { (yyval.sval) = (yyvsp[0].sval);} -#line 4715 "bison_parser.cpp" - break; - - case 258: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ -#line 1230 "bison_parser.y" - { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } -#line 4721 "bison_parser.cpp" - break; - - case 260: /* opt_table_alias: %empty */ -#line 1236 "bison_parser.y" - { (yyval.alias_t) = nullptr; } -#line 4727 "bison_parser.cpp" - break; - - case 261: /* alias: AS IDENTIFIER */ -#line 1241 "bison_parser.y" - { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4733 "bison_parser.cpp" - break; - - case 262: /* alias: IDENTIFIER */ -#line 1242 "bison_parser.y" - { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4739 "bison_parser.cpp" - break; - - case 264: /* opt_alias: %empty */ -#line 1248 "bison_parser.y" - { (yyval.alias_t) = nullptr; } -#line 4745 "bison_parser.cpp" - break; - - case 266: /* opt_with_clause: %empty */ -#line 1258 "bison_parser.y" - { (yyval.with_description_vec) = nullptr; } -#line 4751 "bison_parser.cpp" - break; - - case 267: /* with_clause: WITH with_description_list */ -#line 1262 "bison_parser.y" - { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } -#line 4757 "bison_parser.cpp" - break; - - case 268: /* with_description_list: with_description */ -#line 1266 "bison_parser.y" - { - (yyval.with_description_vec) = new std::vector(); - (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); - } -#line 4766 "bison_parser.cpp" - break; - - case 269: /* with_description_list: with_description_list ',' with_description */ -#line 1270 "bison_parser.y" - { - (yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t)); - (yyval.with_description_vec) = (yyvsp[-2].with_description_vec); - } -#line 4775 "bison_parser.cpp" - break; - - case 270: /* with_description: IDENTIFIER AS select_with_paren */ -#line 1277 "bison_parser.y" - { - (yyval.with_description_t) = new WithDescription(); - (yyval.with_description_t)->alias = (yyvsp[-2].sval); - (yyval.with_description_t)->select = (yyvsp[0].select_stmt); - } -#line 4785 "bison_parser.cpp" - break; - - case 271: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ -#line 1291 "bison_parser.y" - { - (yyval.table) = new TableRef(kTableJoin); - (yyval.table)->join = new JoinDefinition(); - (yyval.table)->join->type = kJoinNatural; - (yyval.table)->join->left = (yyvsp[-3].table); - (yyval.table)->join->right = (yyvsp[0].table); - } -#line 4797 "bison_parser.cpp" - break; - - case 272: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ -#line 1299 "bison_parser.y" - { - (yyval.table) = new TableRef(kTableJoin); - (yyval.table)->join = new JoinDefinition(); - (yyval.table)->join->type = (JoinType) (yyvsp[-4].uval); - (yyval.table)->join->left = (yyvsp[-5].table); - (yyval.table)->join->right = (yyvsp[-2].table); - (yyval.table)->join->condition = (yyvsp[0].expr); - } -#line 4810 "bison_parser.cpp" - break; - - case 273: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ -#line 1309 "bison_parser.y" - { - (yyval.table) = new TableRef(kTableJoin); - (yyval.table)->join = new JoinDefinition(); - (yyval.table)->join->type = (JoinType) (yyvsp[-6].uval); - (yyval.table)->join->left = (yyvsp[-7].table); - (yyval.table)->join->right = (yyvsp[-4].table); - auto left_col = Expr::makeColumnRef(strdup((yyvsp[-1].expr)->name)); - if ((yyvsp[-1].expr)->alias != nullptr) left_col->alias = strdup((yyvsp[-1].expr)->alias); - if ((yyvsp[-7].table)->getName() != nullptr) left_col->table = strdup((yyvsp[-7].table)->getName()); - auto right_col = Expr::makeColumnRef(strdup((yyvsp[-1].expr)->name)); - if ((yyvsp[-1].expr)->alias != nullptr) right_col->alias = strdup((yyvsp[-1].expr)->alias); - if ((yyvsp[-4].table)->getName() != nullptr) right_col->table = strdup((yyvsp[-4].table)->getName()); - (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); - delete (yyvsp[-1].expr); - } -#line 4830 "bison_parser.cpp" - break; - - case 274: /* opt_join_type: INNER */ -#line 1327 "bison_parser.y" - { (yyval.uval) = kJoinInner; } -#line 4836 "bison_parser.cpp" - break; - - case 275: /* opt_join_type: LEFT OUTER */ -#line 1328 "bison_parser.y" - { (yyval.uval) = kJoinLeft; } -#line 4842 "bison_parser.cpp" - break; - - case 276: /* opt_join_type: LEFT */ -#line 1329 "bison_parser.y" - { (yyval.uval) = kJoinLeft; } -#line 4848 "bison_parser.cpp" - break; - - case 277: /* opt_join_type: RIGHT OUTER */ -#line 1330 "bison_parser.y" - { (yyval.uval) = kJoinRight; } -#line 4854 "bison_parser.cpp" - break; - - case 278: /* opt_join_type: RIGHT */ -#line 1331 "bison_parser.y" - { (yyval.uval) = kJoinRight; } -#line 4860 "bison_parser.cpp" - break; - - case 279: /* opt_join_type: FULL OUTER */ -#line 1332 "bison_parser.y" - { (yyval.uval) = kJoinFull; } -#line 4866 "bison_parser.cpp" - break; - - case 280: /* opt_join_type: OUTER */ -#line 1333 "bison_parser.y" - { (yyval.uval) = kJoinFull; } -#line 4872 "bison_parser.cpp" - break; - - case 281: /* opt_join_type: FULL */ -#line 1334 "bison_parser.y" - { (yyval.uval) = kJoinFull; } -#line 4878 "bison_parser.cpp" - break; - - case 282: /* opt_join_type: CROSS */ -#line 1335 "bison_parser.y" - { (yyval.uval) = kJoinCross; } -#line 4884 "bison_parser.cpp" - break; - - case 283: /* opt_join_type: %empty */ -#line 1336 "bison_parser.y" - { (yyval.uval) = kJoinInner; } -#line 4890 "bison_parser.cpp" - break; - - case 287: /* ident_commalist: IDENTIFIER */ -#line 1356 "bison_parser.y" - { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 4896 "bison_parser.cpp" - break; - - case 288: /* ident_commalist: ident_commalist ',' IDENTIFIER */ -#line 1357 "bison_parser.y" - { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 4902 "bison_parser.cpp" - break; - - -#line 4906 "bison_parser.cpp" - - default: break; - } - /* User semantic actions sometimes alter yychar, and that requires - that yytoken be updated with the new translation. We take the - approach of translating immediately before every use of yytoken. - One alternative is translating here after every semantic action, - but that translation would be missed if the semantic action invokes - YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or - if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an - incorrect destructor might then be invoked immediately. In the - case of YYERROR or YYBACKUP, subsequent parser actions might lead - to an incorrect destructor call or verbose syntax error message - before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - - *++yyvsp = yyval; - *++yylsp = yyloc; - - /* Now 'shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - { - 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; - - -/*--------------------------------------. -| yyerrlab -- here on detecting error. | -`--------------------------------------*/ -yyerrlab: - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = yychar == SQL_HSQL_EMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; - { - yypcontext_t yyctx - = {yyssp, yytoken, &yylloc}; - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == -1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = YY_CAST (char *, - YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); - if (yymsg) - { - yysyntax_error_status - = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); - yymsgp = yymsg; - } - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = YYENOMEM; - } - } - yyerror (&yylloc, result, scanner, yymsgp); - if (yysyntax_error_status == YYENOMEM) - goto yyexhaustedlab; - } - } - - yyerror_range[1] = yylloc; - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - if (yychar <= SQL_YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == SQL_YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval, &yylloc, result, scanner); - yychar = SQL_HSQL_EMPTY; - } - } - - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| 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; - - /* Do not reclaim the symbols of the rule whose action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - /* Pop stack until we find a state that shifts the error token. */ - for (;;) - { - yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) - { - yyn += YYSYMBOL_YYerror; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - yyerror_range[1] = *yylsp; - yydestruct ("Error: popping", - YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, result, scanner); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - - yyerror_range[2] = yylloc; - ++yylsp; - YYLLOC_DEFAULT (*yylsp, yyerror_range, 2); - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - - -#if 1 -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (&yylloc, result, scanner, YY_("memory exhausted")); - yyresult = 2; - goto yyreturn; -#endif - - -/*-------------------------------------------------------. -| yyreturn -- parsing is finished, clean up and return. | -`-------------------------------------------------------*/ -yyreturn: - if (yychar != SQL_HSQL_EMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, &yylloc, result, scanner); - } - /* Do not reclaim the symbols of the rule whose action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, result, scanner); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - return yyresult; -} - -#line 1360 "bison_parser.y" - -/********************************* - ** Section 4: Additional C code - *********************************/ - -/* empty */ From 6d831d658ec57a94859196aaf0501bfd5784d482 Mon Sep 17 00:00:00 2001 From: simonstadlinger Date: Wed, 25 Aug 2021 18:21:50 +0200 Subject: [PATCH 44/73] Remove flex lexer.cpp to resolve conflict --- src/parser/flex_lexer.cpp | 4457 ------------------------------------- 1 file changed, 4457 deletions(-) delete mode 100644 src/parser/flex_lexer.cpp diff --git a/src/parser/flex_lexer.cpp b/src/parser/flex_lexer.cpp deleted file mode 100644 index 47fd636a..00000000 --- a/src/parser/flex_lexer.cpp +++ /dev/null @@ -1,4457 +0,0 @@ -#line 1 "flex_lexer.cpp" - -#line 3 "flex_lexer.cpp" - -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 6 -#define YY_FLEX_SUBMINOR_VERSION 4 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -#ifdef yy_create_buffer -#define hsql__create_buffer_ALREADY_DEFINED -#else -#define yy_create_buffer hsql__create_buffer -#endif - -#ifdef yy_delete_buffer -#define hsql__delete_buffer_ALREADY_DEFINED -#else -#define yy_delete_buffer hsql__delete_buffer -#endif - -#ifdef yy_scan_buffer -#define hsql__scan_buffer_ALREADY_DEFINED -#else -#define yy_scan_buffer hsql__scan_buffer -#endif - -#ifdef yy_scan_string -#define hsql__scan_string_ALREADY_DEFINED -#else -#define yy_scan_string hsql__scan_string -#endif - -#ifdef yy_scan_bytes -#define hsql__scan_bytes_ALREADY_DEFINED -#else -#define yy_scan_bytes hsql__scan_bytes -#endif - -#ifdef yy_init_buffer -#define hsql__init_buffer_ALREADY_DEFINED -#else -#define yy_init_buffer hsql__init_buffer -#endif - -#ifdef yy_flush_buffer -#define hsql__flush_buffer_ALREADY_DEFINED -#else -#define yy_flush_buffer hsql__flush_buffer -#endif - -#ifdef yy_load_buffer_state -#define hsql__load_buffer_state_ALREADY_DEFINED -#else -#define yy_load_buffer_state hsql__load_buffer_state -#endif - -#ifdef yy_switch_to_buffer -#define hsql__switch_to_buffer_ALREADY_DEFINED -#else -#define yy_switch_to_buffer hsql__switch_to_buffer -#endif - -#ifdef yypush_buffer_state -#define hsql_push_buffer_state_ALREADY_DEFINED -#else -#define yypush_buffer_state hsql_push_buffer_state -#endif - -#ifdef yypop_buffer_state -#define hsql_pop_buffer_state_ALREADY_DEFINED -#else -#define yypop_buffer_state hsql_pop_buffer_state -#endif - -#ifdef yyensure_buffer_stack -#define hsql_ensure_buffer_stack_ALREADY_DEFINED -#else -#define yyensure_buffer_stack hsql_ensure_buffer_stack -#endif - -#ifdef yylex -#define hsql_lex_ALREADY_DEFINED -#else -#define yylex hsql_lex -#endif - -#ifdef yyrestart -#define hsql_restart_ALREADY_DEFINED -#else -#define yyrestart hsql_restart -#endif - -#ifdef yylex_init -#define hsql_lex_init_ALREADY_DEFINED -#else -#define yylex_init hsql_lex_init -#endif - -#ifdef yylex_init_extra -#define hsql_lex_init_extra_ALREADY_DEFINED -#else -#define yylex_init_extra hsql_lex_init_extra -#endif - -#ifdef yylex_destroy -#define hsql_lex_destroy_ALREADY_DEFINED -#else -#define yylex_destroy hsql_lex_destroy -#endif - -#ifdef yyget_debug -#define hsql_get_debug_ALREADY_DEFINED -#else -#define yyget_debug hsql_get_debug -#endif - -#ifdef yyset_debug -#define hsql_set_debug_ALREADY_DEFINED -#else -#define yyset_debug hsql_set_debug -#endif - -#ifdef yyget_extra -#define hsql_get_extra_ALREADY_DEFINED -#else -#define yyget_extra hsql_get_extra -#endif - -#ifdef yyset_extra -#define hsql_set_extra_ALREADY_DEFINED -#else -#define yyset_extra hsql_set_extra -#endif - -#ifdef yyget_in -#define hsql_get_in_ALREADY_DEFINED -#else -#define yyget_in hsql_get_in -#endif - -#ifdef yyset_in -#define hsql_set_in_ALREADY_DEFINED -#else -#define yyset_in hsql_set_in -#endif - -#ifdef yyget_out -#define hsql_get_out_ALREADY_DEFINED -#else -#define yyget_out hsql_get_out -#endif - -#ifdef yyset_out -#define hsql_set_out_ALREADY_DEFINED -#else -#define yyset_out hsql_set_out -#endif - -#ifdef yyget_leng -#define hsql_get_leng_ALREADY_DEFINED -#else -#define yyget_leng hsql_get_leng -#endif - -#ifdef yyget_text -#define hsql_get_text_ALREADY_DEFINED -#else -#define yyget_text hsql_get_text -#endif - -#ifdef yyget_lineno -#define hsql_get_lineno_ALREADY_DEFINED -#else -#define yyget_lineno hsql_get_lineno -#endif - -#ifdef yyset_lineno -#define hsql_set_lineno_ALREADY_DEFINED -#else -#define yyset_lineno hsql_set_lineno -#endif - -#ifdef yyget_column -#define hsql_get_column_ALREADY_DEFINED -#else -#define yyget_column hsql_get_column -#endif - -#ifdef yyset_column -#define hsql_set_column_ALREADY_DEFINED -#else -#define yyset_column hsql_set_column -#endif - -#ifdef yywrap -#define hsql_wrap_ALREADY_DEFINED -#else -#define yywrap hsql_wrap -#endif - -#ifdef yyget_lval -#define hsql_get_lval_ALREADY_DEFINED -#else -#define yyget_lval hsql_get_lval -#endif - -#ifdef yyset_lval -#define hsql_set_lval_ALREADY_DEFINED -#else -#define yyset_lval hsql_set_lval -#endif - -#ifdef yyget_lloc -#define hsql_get_lloc_ALREADY_DEFINED -#else -#define yyget_lloc hsql_get_lloc -#endif - -#ifdef yyset_lloc -#define hsql_set_lloc_ALREADY_DEFINED -#else -#define yyset_lloc hsql_set_lloc -#endif - -#ifdef yyalloc -#define hsql_alloc_ALREADY_DEFINED -#else -#define yyalloc hsql_alloc -#endif - -#ifdef yyrealloc -#define hsql_realloc_ALREADY_DEFINED -#else -#define yyrealloc hsql_realloc -#endif - -#ifdef yyfree -#define hsql_free_ALREADY_DEFINED -#else -#define yyfree hsql_free -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) -#endif - -#endif /* ! C99 */ - -#endif /* ! FLEXINT_H */ - -/* begin standard C++ headers. */ - -/* TODO: this is always defined, so inline it */ -#define yyconst const - -#if defined(__GNUC__) && __GNUC__ >= 3 -#define yynoreturn __attribute__((__noreturn__)) -#else -#define yynoreturn -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an - * integer in range [0..255] for use as an array index. - */ -#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) - -/* An opaque pointer. */ -#ifndef YY_TYPEDEF_YY_SCANNER_T -#define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; -#endif - -/* For convenience, these vars (plus the bison vars far below) - are macros in the reentrant scanner. */ -#define yyin yyg->yyin_r -#define yyout yyg->yyout_r -#define yyextra yyg->yyextra_r -#define yyleng yyg->yyleng_r -#define yytext yyg->yytext_r -#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) -#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) -#define yy_flex_debug yyg->yy_flex_debug_r - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN yyg->yy_start = 1 + 2 * -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START ((yyg->yy_start - 1) / 2) -#define YYSTATE YY_START -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart( yyin , yyscanner ) -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else -#define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ -#endif - -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - #define YY_LINENO_REWIND_TO(ptr) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) -#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ - ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ - : NULL) -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] - -void yyrestart ( FILE *input_file , yyscan_t yyscanner ); -void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); -void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -void yypop_buffer_state ( yyscan_t yyscanner ); - -static void yyensure_buffer_stack ( yyscan_t yyscanner ); -static void yy_load_buffer_state ( yyscan_t yyscanner ); -static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); -#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) - -YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); - -void *yyalloc ( yy_size_t , yyscan_t yyscanner ); -void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); -void yyfree ( void * , yyscan_t yyscanner ); - -#define yy_new_buffer yy_create_buffer -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* Begin user sect3 */ - -#define hsql_wrap(yyscanner) (/*CONSTCOND*/1) -#define YY_SKIP_YYWRAP -typedef flex_uint8_t YY_CHAR; - -typedef int yy_state_type; - -#define yytext_ptr yytext_r - -static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); -static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); -static int yy_get_next_buffer ( yyscan_t yyscanner ); -static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 164 -#define YY_END_OF_BUFFER 165 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static const flex_int16_t yy_accept[1152] = - { 0, - 0, 0, 161, 161, 2, 2, 165, 163, 4, 4, - 163, 163, 152, 159, 152, 152, 156, 152, 152, 152, - 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, - 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, - 158, 158, 158, 158, 152, 161, 162, 2, 2, 3, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 4, 147, 0, 1, 0, - 154, 153, 156, 149, 148, 146, 150, 158, 158, 158, - - 158, 158, 158, 125, 158, 126, 158, 158, 158, 158, - 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, - 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, - 127, 158, 158, 128, 129, 158, 158, 158, 158, 158, - 158, 158, 158, 158, 158, 158, 158, 130, 131, 132, - 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, - 158, 158, 158, 158, 158, 158, 133, 158, 158, 158, - 158, 158, 158, 158, 158, 158, 151, 161, 160, 2, - 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 157, 0, 153, 113, 158, 114, 158, 158, - 115, 158, 116, 158, 158, 158, 158, 158, 158, 158, - 158, 158, 158, 158, 158, 158, 137, 158, 158, 158, - - 158, 158, 158, 158, 158, 158, 158, 117, 158, 158, - 158, 158, 158, 158, 158, 158, 158, 118, 158, 158, - 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, - 158, 119, 158, 158, 120, 158, 158, 158, 158, 158, - 158, 158, 158, 158, 158, 121, 158, 158, 122, 158, - 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, - 158, 158, 158, 123, 158, 158, 158, 158, 158, 158, - 158, 158, 124, 158, 158, 158, 158, 158, 158, 158, - 158, 158, 158, 158, 158, 158, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - - 0, 158, 158, 158, 158, 158, 158, 158, 83, 158, - 84, 46, 85, 158, 158, 158, 86, 158, 158, 87, - 158, 158, 158, 158, 158, 89, 158, 158, 158, 90, - 91, 158, 158, 158, 158, 158, 158, 158, 92, 158, - 158, 93, 94, 158, 158, 95, 158, 96, 136, 158, - 158, 158, 158, 158, 158, 97, 158, 98, 99, 100, - 158, 102, 158, 103, 158, 158, 158, 158, 104, 158, - 158, 158, 158, 158, 105, 158, 158, 34, 158, 158, - 158, 158, 158, 158, 158, 106, 158, 158, 158, 158, - 107, 108, 32, 158, 140, 158, 158, 158, 158, 158, - - 158, 158, 158, 158, 110, 158, 111, 158, 112, 139, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 0, 63, 64, 158, 65, 158, 143, 158, 158, 158, - 158, 158, 158, 158, 66, 158, 158, 158, 158, 158, - 67, 158, 158, 158, 158, 158, 158, 158, 158, 158, - 158, 141, 68, 158, 158, 69, 158, 101, 158, 70, - 71, 158, 158, 158, 158, 72, 73, 74, 75, 158, - 138, 158, 158, 158, 76, 77, 158, 158, 158, 158, - 158, 78, 158, 158, 158, 158, 158, 158, 79, 158, - 158, 158, 158, 80, 158, 158, 158, 81, 158, 158, - - 158, 158, 82, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 0, 158, 36, 158, - 158, 158, 37, 145, 158, 38, 158, 158, 158, 158, - - 39, 158, 40, 158, 41, 42, 43, 158, 44, 158, - 158, 47, 48, 49, 50, 51, 158, 158, 52, 135, - 158, 158, 53, 158, 158, 158, 54, 158, 158, 55, - 134, 56, 57, 158, 58, 158, 158, 158, 158, 59, - 60, 61, 62, 158, 158, 158, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - - 2, 2, 2, 2, 2, 2, 0, 15, 16, 17, - 158, 18, 19, 158, 158, 33, 20, 158, 158, 21, - 22, 45, 23, 158, 24, 158, 158, 25, 26, 158, - 158, 27, 28, 158, 158, 158, 158, 29, 31, 35, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 0, 158, 88, 158, 10, 11, - 158, 12, 158, 13, 144, 158, 158, 158, 14, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - - 2, 2, 2, 2, 0, 30, 158, 7, 158, 8, - 9, 158, 2, 2, 2, 2, 2, 2, 2, 2, - 0, 5, 6, 158, 2, 2, 2, 2, 0, 142, - 2, 2, 0, 2, 0, 2, 0, 2, 0, 2, - 0, 2, 0, 2, 0, 2, 0, 2, 155, 2, - 0 - } ; - -static const YY_CHAR yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 4, 5, 1, 1, 6, 1, 7, 6, - 6, 6, 6, 6, 8, 9, 6, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 6, 6, 20, - 21, 22, 6, 1, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 6, 1, 6, 6, 49, 1, 50, 51, 52, 53, - - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 6, 76, 6, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static const YY_CHAR yy_meta[77] = - { 0, - 1, 1, 2, 1, 3, 1, 4, 1, 1, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, - 1, 1, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 1 - } ; - -static const flex_int16_t yy_base[1159] = - { 0, - 0, 0, 720, 709, 76, 0, 688, 4601, 151, 153, - 647, 0, 4601, 4601, 149, 148, 160, 159, 643, 625, - 156, 156, 164, 162, 172, 223, 198, 211, 215, 151, - 168, 210, 255, 257, 263, 262, 0, 277, 307, 350, - 284, 221, 258, 171, 564, 0, 609, 0, 295, 308, - 586, 576, 0, 0, 331, 408, 419, 321, 542, 512, - 438, 514, 568, 620, 668, 720, 328, 426, 768, 329, - 311, 434, 500, 820, 868, 505, 421, 513, 918, 970, - 515, 570, 455, 423, 450, 351, 4601, 520, 4601, 512, - 1035, 1045, 1056, 4601, 4601, 4601, 4601, 0, 174, 282, - - 336, 520, 296, 315, 557, 0, 345, 334, 568, 511, - 327, 611, 570, 345, 419, 421, 441, 444, 631, 469, - 515, 520, 542, 555, 560, 559, 563, 609, 578, 605, - 0, 618, 616, 665, 619, 628, 618, 643, 664, 685, - 650, 657, 667, 663, 669, 678, 690, 691, 0, 697, - 683, 704, 722, 722, 750, 726, 722, 728, 764, 724, - 725, 743, 773, 764, 774, 770, 769, 796, 777, 788, - 786, 787, 818, 822, 808, 828, 4601, 0, 4601, 0, - 389, 0, 512, 0, 499, 1066, 1076, 1087, 0, 0, - 0, 0, 826, 835, 856, 859, 913, 887, 872, 922, - - 905, 961, 962, 1080, 957, 1081, 1133, 1085, 1119, 1083, - 1097, 1122, 1143, 1193, 1145, 1175, 1178, 959, 1196, 1187, - 1217, 1219, 1228, 1232, 1183, 1137, 1247, 1238, 1296, 1253, - 1257, 1270, 1281, 1306, 1331, 1335, 1298, 1350, 1346, 1349, - 1365, 1383, 1380, 1374, 1405, 1402, 1413, 1415, 1414, 1450, - 1454, 1448, 1469, 1478, 1480, 1502, 1508, 1513, 1524, 1389, - 1518, 1519, 1552, 1554, 1563, 1573, 1596, 1567, 1467, 1591, - 1602, 0, 4601, 498, 1667, 0, 825, 0, 833, 831, - 0, 852, 0, 880, 916, 908, 937, 1619, 963, 962, - 979, 1067, 1066, 1154, 1140, 1159, 0, 1166, 1181, 1240, - - 1315, 1262, 1286, 1277, 1296, 1325, 1344, 0, 1364, 1368, - 1422, 1410, 1432, 1444, 1451, 1479, 1513, 1515, 1570, 1579, - 1600, 1592, 1609, 1611, 1606, 1624, 1634, 1631, 1645, 1647, - 1660, 1663, 1646, 1656, 0, 1651, 1669, 1666, 1672, 1679, - 1674, 1675, 1662, 1664, 1664, 0, 1674, 1669, 1669, 1684, - 1685, 1690, 1679, 1680, 1686, 1688, 1703, 1686, 1711, 1709, - 1717, 1709, 1720, 0, 1705, 1709, 1710, 1720, 1718, 1715, - 1722, 1732, 0, 1724, 1736, 1725, 1724, 1742, 1730, 1724, - 1750, 1724, 1734, 1764, 1750, 1742, 0, 495, 1800, 1774, - 1778, 1779, 1793, 1795, 1796, 1807, 1808, 1831, 1832, 1819, - - 1849, 1847, 1857, 1865, 1853, 1871, 1875, 1903, 1887, 1890, - 1905, 1909, 1911, 1924, 1933, 1941, 1935, 1949, 1957, 1959, - 1945, 1963, 1978, 1967, 1995, 1989, 2011, 1999, 2007, 2008, - 2017, 2033, 2043, 2049, 2062, 2057, 2071, 2061, 2052, 2093, - 2097, 2075, 2087, 2105, 2111, 2116, 2119, 2128, 2127, 2141, - 2145, 2167, 2150, 2173, 2179, 2182, 2185, 2195, 2203, 2204, - 2218, 2221, 2213, 2216, 2235, 2253, 2247, 2258, 2264, 2259, - 2275, 2277, 2287, 2281, 2289, 2303, 2312, 2318, 2326, 2327, - 2337, 2341, 2356, 2343, 2372, 2335, 2360, 2377, 2389, 2400, - 2391, 2406, 2414, 2415, 2432, 2445, 2440, 2464, 2448, 2456, - - 491, 1798, 1804, 1813, 1899, 1960, 1993, 2023, 0, 2119, - 0, 0, 2155, 2151, 2176, 2177, 0, 2336, 2352, 2380, - 2410, 2435, 2438, 2451, 2475, 2461, 2482, 2481, 2479, 0, - 0, 2477, 2478, 2478, 2482, 2503, 2506, 2505, 0, 2491, - 2512, 0, 0, 2513, 2499, 0, 2505, 0, 0, 2517, - 2505, 2500, 2507, 2509, 2521, 0, 2518, 0, 0, 0, - 2512, 0, 2521, 0, 2530, 2524, 2528, 2527, 0, 2544, - 2543, 2535, 2538, 2545, 0, 2560, 2563, 0, 2552, 2549, - 2548, 2567, 2560, 2562, 2574, 0, 2573, 2570, 2576, 2567, - 0, 0, 2565, 2567, 0, 2584, 2575, 2569, 2592, 2577, - - 2591, 2594, 2593, 2593, 0, 2586, 0, 2605, 0, 0, - 474, 2613, 2614, 2610, 2616, 2618, 2635, 2622, 2639, 2650, - 2647, 2648, 2656, 2664, 2681, 2680, 2678, 2689, 2710, 2702, - 2706, 2715, 2718, 2732, 2743, 2755, 2756, 2760, 2777, 2758, - 2769, 2788, 2798, 2794, 2786, 2823, 2831, 2773, 2812, 2829, - 2842, 2840, 2848, 2857, 2852, 2861, 2873, 2874, 2883, 2885, - 2898, 2896, 2906, 2914, 2935, 2897, 2929, 2931, 2939, 2940, - 2950, 2952, 2973, 2968, 2969, 2990, 2971, 3006, 2994, 3024, - 3003, 3025, 3027, 3028, 3039, 3060, 3061, 3042, 3070, 3079, - 3076, 3101, 3102, 3073, 3113, 3104, 3112, 3130, 3115, 3136, - - 3127, 3144, 3152, 3155, 3158, 3167, 3180, 3168, 3190, 3203, - 3204, 3181, 3209, 3221, 3220, 3222, 3226, 3234, 3235, 3243, - 442, 0, 0, 2666, 0, 2692, 0, 2721, 2865, 2888, - 2948, 2966, 2975, 3002, 0, 3054, 3058, 3118, 3109, 3170, - 0, 3228, 3229, 3248, 3258, 3260, 3249, 3251, 3258, 3270, - 3277, 0, 0, 3261, 3270, 0, 3276, 0, 3264, 0, - 0, 3265, 3283, 3272, 3281, 0, 0, 0, 0, 3289, - 0, 3296, 3291, 3280, 0, 0, 3296, 3284, 3285, 3300, - 3304, 0, 3313, 3315, 3313, 3299, 3318, 3322, 3306, 3313, - 3313, 3333, 3334, 0, 3331, 3333, 3333, 0, 3320, 3341, - - 3331, 3346, 0, 441, 3343, 3346, 3351, 3348, 3354, 3362, - 3365, 3377, 3386, 3387, 3400, 3408, 3402, 3405, 3417, 3416, - 3450, 3431, 3439, 3440, 3468, 3454, 3462, 3456, 3480, 3490, - 3491, 3494, 3516, 3504, 3492, 3522, 3525, 3546, 3528, 3554, - 3530, 3544, 3558, 3562, 3579, 3568, 3570, 3596, 3587, 3592, - 3598, 3600, 3602, 3604, 3632, 3633, 3641, 3637, 3638, 3642, - 3654, 3673, 3650, 3671, 3672, 3707, 3708, 3696, 3690, 3725, - 3733, 3744, 3746, 3721, 3742, 3761, 3747, 3750, 3776, 3778, - 3779, 3787, 3804, 3809, 3815, 3790, 435, 3352, 0, 3374, - 3430, 3519, 3594, 0, 3606, 0, 3674, 3689, 3705, 3777, - - 0, 3798, 0, 3814, 0, 0, 0, 3813, 0, 3807, - 3805, 0, 0, 0, 0, 0, 3808, 3830, 0, 0, - 3825, 3837, 0, 3826, 3844, 3826, 0, 3851, 3852, 3838, - 0, 0, 0, 3846, 0, 3858, 3859, 3860, 3846, 0, - 0, 0, 0, 3850, 3862, 3858, 434, 3866, 3867, 3869, - 3875, 3883, 3897, 3899, 3900, 3901, 3915, 3931, 3932, 3940, - 3937, 3968, 3943, 3971, 3953, 3954, 3977, 3983, 3985, 3993, - 3994, 3999, 4007, 4008, 4011, 4017, 4039, 4022, 4023, 4033, - 4056, 4051, 4045, 4062, 4048, 4061, 4067, 4093, 4099, 4096, - 4085, 4101, 4102, 4127, 4111, 4139, 4145, 4144, 4136, 4130, - - 4133, 4155, 4167, 4176, 4179, 4190, 429, 0, 0, 0, - 3906, 0, 0, 3909, 3922, 0, 0, 3949, 3974, 0, - 0, 0, 0, 4059, 0, 4060, 4125, 0, 0, 4158, - 4178, 0, 0, 4172, 4180, 4178, 4195, 0, 0, 0, - 404, 4198, 4201, 4207, 4209, 4213, 4219, 4230, 4235, 4232, - 4241, 4243, 4249, 4247, 4251, 4253, 4265, 4283, 4275, 4284, - 4286, 4287, 4289, 4305, 4315, 4299, 4317, 4338, 4341, 4339, - 4323, 4340, 4353, 4355, 402, 4288, 0, 4303, 0, 0, - 4314, 0, 4344, 0, 0, 4343, 4358, 4367, 0, 401, - 4379, 4374, 4389, 4383, 4391, 4393, 4395, 4412, 4397, 4407, - - 4423, 4437, 4429, 4441, 397, 0, 4428, 0, 4431, 0, - 0, 4436, 396, 4447, 4451, 4462, 4463, 4465, 4466, 4481, - 383, 0, 0, 4444, 382, 4479, 4487, 4496, 376, 0, - 342, 4495, 333, 331, 303, 291, 278, 255, 250, 245, - 243, 240, 235, 221, 226, 197, 187, 173, 4601, 0, - 4601, 4570, 4575, 181, 4580, 4585, 4590, 4595 - } ; - -static const flex_int16_t yy_def[1159] = - { 0, - 1151, 1, 1152, 1152, 1151, 5, 1151, 1151, 1151, 1151, - 1151, 1153, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1151, 1155, 1151, 1156, 1156, 1151, - 1156, 1157, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, - 1158, 1158, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 1156, 1151, 1151, 1153, 1151, 1151, - 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1154, 1154, 1154, - - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1151, 1155, 1151, 1156, - 1156, 1156, 1157, 1156, 1156, 1156, 1156, 1156, 1156, 1156, - 1156, 1156, 62, 62, 62, 62, 62, 62, 62, 62, - - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 1156, 1151, 1151, 1151, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1156, 1156, 1156, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - - 1151, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1156, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 1151, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - - 1154, 1154, 1154, 1156, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 1151, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1156, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - - 62, 62, 62, 62, 62, 62, 1151, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1156, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 1151, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1156, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - - 62, 62, 62, 62, 1151, 1154, 1154, 1154, 1154, 1154, - 1154, 1154, 1156, 62, 62, 62, 62, 62, 62, 62, - 1151, 1154, 1154, 1154, 1156, 62, 62, 62, 1151, 1154, - 1156, 62, 1151, 1156, 1151, 1156, 1151, 1156, 1151, 1156, - 1151, 1156, 1151, 1156, 1151, 1156, 1151, 1156, 1151, 1156, - 0, 1151, 1151, 1151, 1151, 1151, 1151, 1151 - } ; - -static const flex_int16_t yy_nxt[4678] = - { 0, - 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 37, 44, 37, 8, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 37, 44, 37, 45, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 58, 59, 60, 61, 62, - - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 77, 84, 77, 48, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, 83, 77, 84, - 77, 85, 86, 86, 86, 86, 89, 91, 91, 91, - 91, 91, 91, 91, 91, 91, 91, 90, 92, 93, - 93, 93, 93, 93, 93, 93, 93, 93, 93, 94, - 95, 99, 105, 100, 111, 98, 107, 136, 112, 101, - 1150, 102, 113, 108, 137, 103, 104, 176, 114, 276, - - 109, 115, 106, 110, 1149, 116, 1148, 117, 99, 105, - 100, 111, 118, 107, 136, 112, 101, 119, 102, 113, - 108, 137, 103, 104, 176, 114, 276, 109, 115, 106, - 110, 126, 116, 128, 117, 1147, 138, 127, 1146, 118, - 139, 129, 131, 172, 119, 120, 140, 130, 132, 133, - 134, 173, 1145, 121, 1144, 135, 122, 1143, 126, 123, - 128, 1142, 124, 138, 127, 125, 1141, 139, 129, 131, - 172, 1140, 120, 140, 130, 132, 133, 134, 173, 144, - 121, 141, 135, 122, 152, 142, 123, 174, 175, 124, - 148, 143, 125, 145, 1139, 153, 181, 86, 149, 146, - - 147, 154, 150, 155, 1138, 151, 144, 156, 141, 86, - 86, 152, 142, 157, 174, 175, 1137, 148, 143, 169, - 145, 170, 153, 277, 171, 149, 146, 147, 154, 150, - 155, 158, 151, 159, 156, 282, 160, 232, 184, 283, - 157, 189, 190, 161, 162, 1136, 169, 1135, 170, 185, - 277, 171, 86, 86, 193, 193, 289, 193, 158, 1134, - 159, 221, 282, 160, 232, 231, 283, 222, 296, 278, - 161, 162, 163, 297, 193, 193, 164, 279, 287, 165, - 166, 193, 193, 289, 193, 288, 167, 305, 221, 168, - 181, 86, 231, 1133, 222, 296, 278, 1131, 1129, 163, - - 297, 193, 193, 164, 279, 287, 165, 166, 1125, 1121, - 1113, 1105, 288, 167, 305, 1090, 168, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 187, 188, 188, - 188, 188, 188, 188, 188, 188, 188, 188, 180, 180, - 1075, 180, 180, 180, 180, 180, 180, 193, 223, 271, - 1041, 1007, 193, 947, 887, 306, 224, 180, 180, 180, - 233, 307, 225, 194, 234, 195, 308, 193, 309, 193, - 235, 196, 193, 197, 193, 223, 271, 198, 199, 193, - 193, 193, 306, 224, 269, 270, 804, 233, 307, 225, - 194, 234, 195, 308, 193, 309, 193, 235, 196, 193, - - 197, 193, 315, 721, 198, 199, 611, 193, 193, 501, - 388, 269, 270, 180, 180, 180, 387, 180, 180, 180, - 180, 180, 180, 274, 273, 272, 236, 247, 193, 315, - 237, 193, 192, 180, 180, 180, 238, 294, 248, 250, - 200, 193, 280, 251, 249, 281, 193, 295, 316, 252, - 264, 193, 265, 236, 247, 266, 317, 237, 193, 193, - 201, 193, 191, 238, 294, 248, 250, 200, 193, 280, - 251, 249, 281, 193, 295, 316, 252, 264, 193, 265, - 180, 318, 266, 317, 284, 285, 193, 201, 193, 180, - 202, 319, 267, 320, 193, 321, 193, 203, 286, 322, - - 268, 290, 291, 292, 204, 293, 182, 205, 318, 303, - 304, 284, 285, 325, 193, 179, 193, 202, 319, 267, - 320, 193, 321, 193, 203, 286, 322, 268, 290, 291, - 292, 204, 293, 298, 205, 299, 303, 304, 300, 177, - 325, 193, 206, 193, 301, 97, 207, 326, 327, 323, - 208, 302, 324, 328, 333, 310, 209, 311, 334, 210, - 298, 312, 299, 96, 335, 300, 193, 87, 313, 206, - 336, 301, 314, 207, 326, 327, 323, 208, 302, 324, - 328, 333, 310, 209, 311, 334, 210, 1151, 312, 342, - 329, 335, 343, 193, 193, 313, 337, 336, 338, 314, - - 330, 211, 344, 212, 345, 331, 332, 339, 213, 340, - 346, 347, 348, 214, 193, 47, 342, 329, 349, 343, - 341, 193, 350, 337, 351, 338, 47, 330, 211, 344, - 212, 345, 331, 332, 339, 213, 340, 346, 347, 348, - 214, 193, 215, 352, 353, 349, 193, 341, 354, 350, - 216, 351, 355, 217, 359, 360, 218, 361, 1151, 219, - 365, 1151, 220, 1151, 366, 367, 193, 1151, 1151, 215, - 352, 353, 356, 193, 1151, 354, 1151, 216, 1151, 355, - 217, 359, 360, 218, 361, 357, 219, 365, 362, 220, - 358, 366, 367, 193, 193, 226, 368, 363, 369, 356, - - 371, 227, 228, 229, 372, 364, 373, 376, 230, 370, - 377, 1151, 357, 378, 193, 362, 379, 358, 374, 1151, - 380, 193, 226, 368, 363, 369, 381, 371, 227, 228, - 229, 372, 364, 373, 376, 230, 370, 377, 375, 1151, - 378, 193, 239, 379, 382, 374, 193, 380, 384, 385, - 386, 502, 193, 381, 1151, 1151, 240, 383, 1151, 503, - 390, 193, 241, 242, 504, 375, 193, 1151, 1151, 239, - 1151, 382, 193, 193, 505, 384, 385, 386, 502, 193, - 1151, 193, 193, 240, 383, 193, 503, 390, 193, 241, - 242, 504, 392, 193, 193, 243, 397, 391, 193, 193, - - 393, 505, 193, 244, 1151, 193, 1151, 245, 193, 193, - 246, 1151, 193, 193, 193, 1151, 506, 1151, 193, 392, - 1151, 193, 243, 397, 391, 193, 396, 393, 1151, 193, - 244, 193, 193, 193, 245, 394, 1151, 246, 395, 193, - 193, 193, 253, 506, 254, 193, 507, 255, 193, 398, - 399, 193, 508, 396, 256, 257, 1151, 1151, 193, 193, - 193, 1151, 394, 400, 193, 395, 193, 1151, 193, 253, - 509, 254, 1151, 507, 255, 193, 398, 399, 193, 508, - 1151, 256, 257, 408, 403, 193, 193, 193, 193, 1151, - 400, 193, 258, 409, 401, 193, 259, 509, 432, 260, - - 261, 402, 513, 193, 514, 193, 262, 193, 193, 263, - 408, 403, 193, 515, 193, 193, 193, 1151, 1151, 258, - 409, 401, 1151, 259, 1151, 432, 260, 261, 402, 513, - 193, 514, 193, 262, 193, 193, 263, 1151, 1151, 1151, - 515, 1151, 1151, 193, 91, 91, 91, 91, 91, 91, - 91, 91, 91, 91, 275, 275, 275, 275, 275, 275, - 275, 275, 275, 275, 92, 93, 93, 93, 93, 93, - 93, 93, 93, 93, 93, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 389, 389, 389, 389, 389, - 389, 389, 389, 389, 389, 187, 188, 188, 188, 188, - - 188, 188, 188, 188, 188, 188, 193, 193, 516, 193, - 1151, 193, 517, 404, 405, 406, 1151, 407, 1151, 420, - 1151, 1151, 410, 193, 417, 418, 193, 411, 1151, 193, - 1151, 193, 1151, 193, 193, 516, 193, 421, 193, 517, - 404, 405, 406, 193, 407, 193, 420, 422, 193, 410, - 193, 417, 418, 193, 411, 412, 193, 413, 193, 193, - 414, 419, 1151, 193, 421, 193, 415, 423, 193, 193, - 193, 193, 193, 416, 422, 193, 518, 1151, 429, 193, - 519, 1151, 412, 193, 413, 520, 193, 414, 419, 193, - 193, 193, 193, 415, 423, 193, 193, 1151, 193, 521, - - 416, 193, 1151, 518, 193, 429, 193, 519, 430, 193, - 193, 522, 520, 193, 431, 1151, 193, 424, 193, 425, - 434, 193, 193, 426, 193, 440, 521, 1151, 193, 193, - 427, 193, 433, 193, 428, 430, 193, 1151, 522, 193, - 193, 431, 193, 193, 424, 193, 425, 434, 193, 193, - 426, 193, 440, 435, 193, 436, 193, 427, 193, 433, - 193, 428, 523, 193, 193, 193, 193, 439, 437, 193, - 193, 438, 193, 193, 193, 442, 1151, 441, 193, 193, - 435, 193, 436, 193, 193, 193, 526, 448, 447, 523, - 193, 193, 193, 193, 439, 437, 193, 1151, 438, 193, - - 193, 193, 442, 193, 441, 193, 193, 193, 450, 1151, - 193, 193, 527, 526, 448, 447, 449, 1151, 528, 529, - 193, 443, 193, 193, 193, 1151, 193, 193, 1151, 1151, - 193, 444, 193, 457, 193, 450, 445, 446, 451, 527, - 452, 524, 193, 449, 193, 528, 529, 1151, 443, 193, - 1151, 193, 193, 453, 193, 454, 525, 193, 444, 193, - 457, 193, 530, 445, 446, 451, 455, 452, 524, 193, - 531, 193, 193, 1151, 456, 193, 193, 193, 1151, 193, - 453, 193, 454, 525, 193, 458, 532, 459, 193, 530, - 460, 193, 193, 455, 533, 193, 193, 531, 461, 193, - - 193, 456, 193, 193, 193, 462, 193, 463, 193, 193, - 1151, 193, 458, 532, 459, 485, 1151, 460, 193, 193, - 193, 533, 193, 193, 1151, 461, 193, 193, 193, 193, - 464, 193, 462, 193, 463, 193, 193, 467, 193, 193, - 468, 193, 485, 465, 469, 1151, 534, 193, 193, 1151, - 535, 193, 466, 193, 1151, 193, 193, 464, 193, 193, - 193, 193, 193, 1151, 467, 536, 193, 468, 193, 1151, - 465, 469, 470, 534, 193, 193, 193, 535, 193, 466, - 193, 474, 473, 537, 1151, 471, 193, 193, 193, 1151, - 472, 538, 536, 498, 193, 193, 193, 1151, 475, 470, - - 193, 193, 476, 193, 193, 539, 193, 193, 474, 473, - 537, 477, 471, 193, 1151, 193, 479, 472, 538, 478, - 498, 193, 193, 193, 193, 475, 193, 193, 193, 476, - 481, 193, 539, 193, 193, 540, 482, 1151, 477, 193, - 193, 480, 193, 479, 193, 193, 478, 1151, 193, 541, - 193, 193, 486, 193, 193, 193, 487, 481, 483, 193, - 1151, 193, 540, 482, 193, 193, 193, 1151, 480, 484, - 193, 193, 193, 1151, 488, 193, 541, 193, 193, 486, - 193, 193, 1151, 487, 490, 483, 193, 491, 492, 193, - 1151, 193, 193, 496, 489, 1151, 484, 193, 193, 193, - - 193, 488, 1151, 493, 542, 193, 497, 193, 1151, 193, - 1151, 490, 543, 193, 491, 492, 193, 193, 1151, 193, - 496, 489, 193, 544, 500, 193, 193, 193, 193, 494, - 493, 542, 499, 497, 545, 495, 193, 193, 546, 543, - 193, 547, 193, 510, 193, 511, 193, 548, 193, 193, - 544, 500, 1151, 1151, 1151, 193, 494, 1151, 1151, 499, - 512, 545, 495, 549, 193, 546, 550, 551, 547, 193, - 510, 552, 511, 553, 548, 193, 275, 275, 275, 275, - 275, 275, 275, 275, 275, 275, 554, 512, 557, 555, - 549, 558, 559, 550, 551, 560, 561, 562, 552, 556, - - 553, 563, 564, 565, 566, 567, 568, 569, 570, 571, - 572, 573, 574, 554, 575, 557, 555, 576, 558, 559, - 577, 578, 560, 561, 562, 579, 556, 580, 563, 564, - 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, - 581, 575, 582, 583, 576, 584, 585, 577, 578, 586, - 587, 588, 579, 589, 580, 590, 591, 592, 593, 594, - 599, 597, 595, 598, 600, 601, 602, 581, 605, 582, - 583, 596, 584, 585, 603, 606, 586, 587, 588, 609, - 589, 610, 590, 591, 592, 593, 594, 599, 597, 595, - 598, 600, 601, 602, 1151, 605, 604, 1151, 596, 607, - - 193, 603, 606, 608, 612, 193, 609, 1151, 610, 389, - 389, 389, 389, 389, 389, 389, 389, 389, 389, 613, - 193, 193, 193, 604, 193, 193, 607, 193, 614, 615, - 608, 612, 193, 193, 193, 1151, 1151, 722, 1151, 193, - 1151, 193, 193, 723, 1151, 193, 613, 193, 193, 193, - 1151, 193, 193, 193, 193, 614, 615, 193, 193, 724, - 193, 193, 617, 618, 722, 193, 193, 616, 193, 193, - 723, 620, 193, 621, 1151, 193, 1151, 193, 193, 193, - 193, 193, 619, 193, 193, 193, 724, 625, 622, 617, - 618, 193, 193, 193, 616, 193, 623, 193, 620, 193, - - 621, 193, 193, 193, 193, 193, 193, 624, 1151, 619, - 193, 193, 626, 193, 625, 622, 630, 193, 193, 1151, - 193, 627, 193, 623, 193, 628, 193, 629, 193, 193, - 193, 193, 1151, 193, 624, 193, 193, 193, 193, 626, - 193, 632, 631, 630, 193, 725, 633, 1151, 627, 193, - 193, 193, 628, 1151, 629, 193, 193, 193, 193, 634, - 193, 637, 193, 193, 193, 636, 1151, 193, 632, 631, - 193, 641, 725, 633, 635, 193, 193, 193, 193, 193, - 639, 193, 193, 193, 193, 193, 634, 193, 637, 193, - 638, 193, 636, 643, 193, 193, 640, 193, 641, 726, - - 642, 635, 193, 193, 193, 193, 193, 639, 193, 193, - 193, 1151, 193, 193, 193, 193, 193, 638, 193, 644, - 643, 193, 193, 640, 193, 193, 726, 642, 727, 645, - 193, 193, 193, 193, 649, 193, 193, 193, 647, 650, - 193, 193, 193, 193, 646, 193, 644, 648, 193, 728, - 1151, 193, 193, 193, 193, 727, 645, 193, 1151, 193, - 193, 649, 193, 193, 193, 647, 650, 651, 193, 193, - 193, 646, 193, 1151, 648, 193, 728, 652, 193, 193, - 193, 193, 653, 193, 193, 654, 193, 193, 193, 193, - 193, 657, 1151, 658, 651, 193, 193, 193, 193, 655, - - 656, 193, 193, 193, 652, 193, 193, 193, 193, 653, - 193, 661, 654, 662, 193, 193, 193, 193, 657, 193, - 658, 193, 193, 193, 193, 193, 655, 656, 193, 660, - 193, 663, 659, 193, 193, 193, 1151, 664, 661, 193, - 662, 729, 665, 193, 193, 193, 193, 1151, 193, 1151, - 193, 193, 666, 193, 193, 1151, 660, 193, 663, 659, - 193, 667, 193, 668, 664, 193, 193, 193, 729, 665, - 193, 670, 193, 193, 193, 672, 193, 730, 193, 666, - 193, 193, 669, 1151, 193, 731, 1151, 193, 667, 193, - 668, 193, 193, 193, 193, 673, 193, 671, 670, 193, - - 193, 193, 672, 193, 730, 193, 732, 674, 193, 669, - 675, 193, 731, 193, 193, 1151, 733, 1151, 193, 193, - 193, 193, 673, 193, 671, 193, 193, 676, 193, 193, - 193, 193, 193, 732, 674, 193, 677, 675, 193, 193, - 193, 193, 682, 733, 193, 678, 193, 193, 193, 193, - 193, 679, 193, 681, 676, 193, 193, 193, 193, 193, - 680, 683, 193, 677, 193, 1151, 193, 193, 193, 682, - 1151, 193, 678, 193, 193, 684, 193, 193, 679, 193, - 681, 193, 685, 1151, 193, 193, 193, 680, 683, 193, - 193, 193, 688, 193, 193, 686, 1151, 689, 687, 193, - - 193, 193, 684, 193, 193, 193, 193, 193, 193, 685, - 193, 193, 193, 193, 692, 693, 691, 193, 690, 688, - 193, 193, 686, 193, 689, 687, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 1151, 193, 695, 694, - 193, 692, 693, 691, 193, 690, 1151, 1151, 193, 193, - 193, 1151, 193, 193, 193, 1151, 193, 1151, 193, 1151, - 193, 703, 193, 193, 193, 695, 694, 193, 697, 193, - 696, 193, 193, 193, 699, 1151, 193, 734, 698, 193, - 193, 193, 193, 193, 701, 193, 193, 193, 703, 193, - 193, 193, 735, 700, 193, 697, 193, 696, 193, 193, - - 193, 699, 193, 193, 734, 698, 193, 702, 193, 193, - 193, 701, 704, 193, 193, 705, 193, 193, 193, 735, - 700, 736, 1151, 193, 706, 193, 193, 709, 710, 193, - 193, 1151, 193, 193, 702, 193, 707, 193, 708, 704, - 193, 193, 705, 737, 193, 193, 193, 1151, 736, 711, - 193, 706, 193, 193, 709, 710, 713, 712, 193, 193, - 193, 193, 193, 707, 193, 708, 193, 193, 193, 738, - 737, 193, 1151, 193, 193, 1151, 711, 719, 714, 193, - 739, 716, 193, 713, 712, 193, 193, 193, 193, 715, - 193, 193, 740, 193, 193, 720, 738, 741, 193, 717, - - 742, 193, 193, 718, 719, 714, 743, 739, 716, 193, - 193, 744, 745, 193, 746, 747, 715, 193, 193, 740, - 748, 193, 720, 749, 741, 750, 717, 742, 751, 193, - 718, 752, 753, 743, 754, 755, 756, 193, 744, 745, - 757, 746, 747, 758, 759, 760, 761, 748, 762, 763, - 749, 765, 750, 766, 767, 751, 768, 771, 752, 753, - 764, 754, 755, 756, 769, 770, 772, 757, 773, 774, - 758, 759, 760, 761, 775, 762, 763, 776, 765, 777, - 766, 767, 778, 768, 771, 779, 780, 764, 781, 782, - 783, 769, 770, 772, 784, 773, 774, 785, 786, 787, - - 788, 775, 789, 790, 776, 791, 777, 792, 793, 778, - 794, 795, 779, 780, 796, 781, 782, 783, 797, 798, - 799, 784, 800, 801, 785, 786, 787, 788, 802, 789, - 790, 803, 791, 1151, 792, 793, 193, 794, 795, 193, - 193, 796, 193, 1151, 193, 797, 798, 799, 811, 800, - 801, 1151, 805, 806, 1151, 802, 807, 809, 803, 193, - 193, 193, 808, 193, 193, 193, 193, 193, 193, 193, - 810, 193, 812, 193, 193, 811, 193, 1151, 813, 805, - 806, 193, 193, 807, 809, 193, 193, 193, 193, 808, - 193, 193, 193, 193, 193, 193, 193, 810, 814, 812, - - 193, 193, 193, 193, 193, 813, 193, 193, 193, 193, - 193, 815, 193, 888, 1151, 193, 1151, 193, 889, 816, - 193, 193, 1151, 193, 193, 814, 193, 193, 193, 193, - 817, 193, 193, 193, 193, 193, 193, 193, 815, 820, - 888, 193, 193, 819, 193, 889, 816, 890, 193, 821, - 818, 193, 193, 193, 193, 193, 193, 817, 193, 193, - 822, 193, 193, 193, 193, 824, 820, 1151, 193, 193, - 819, 193, 1151, 823, 890, 193, 821, 818, 193, 193, - 826, 193, 193, 193, 193, 193, 193, 822, 193, 193, - 827, 193, 824, 1151, 825, 193, 193, 1151, 1151, 835, - - 823, 193, 193, 193, 193, 193, 193, 826, 193, 193, - 828, 193, 193, 193, 193, 193, 193, 827, 1151, 193, - 193, 825, 193, 193, 193, 829, 835, 832, 193, 193, - 193, 193, 193, 193, 193, 830, 831, 828, 193, 193, - 193, 193, 193, 1151, 193, 833, 193, 193, 1151, 193, - 193, 193, 829, 834, 832, 193, 1151, 193, 193, 193, - 1151, 193, 830, 831, 837, 193, 193, 193, 193, 193, - 836, 193, 833, 1151, 193, 193, 193, 193, 193, 838, - 834, 1151, 193, 193, 193, 193, 193, 193, 193, 839, - 891, 837, 1151, 193, 193, 193, 193, 836, 193, 193, - - 193, 193, 193, 193, 193, 193, 838, 193, 840, 193, - 193, 841, 892, 193, 193, 193, 839, 891, 1151, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 1151, 193, - 193, 193, 193, 1151, 193, 840, 193, 842, 841, 892, - 193, 843, 193, 193, 193, 844, 193, 193, 1151, 193, - 193, 193, 193, 845, 1151, 193, 193, 193, 193, 193, - 193, 193, 848, 846, 842, 193, 193, 193, 843, 193, - 193, 193, 844, 1151, 847, 193, 193, 193, 193, 193, - 845, 193, 193, 893, 193, 193, 193, 193, 193, 848, - 846, 849, 193, 193, 193, 851, 193, 193, 193, 193, - - 854, 847, 193, 193, 193, 193, 850, 894, 193, 1151, - 893, 895, 193, 193, 193, 193, 193, 193, 849, 193, - 193, 193, 851, 193, 193, 193, 193, 854, 896, 857, - 852, 853, 193, 850, 894, 1151, 193, 1151, 895, 1151, - 193, 193, 193, 193, 193, 855, 193, 193, 856, 193, - 193, 193, 193, 193, 193, 896, 857, 852, 853, 193, - 1151, 1151, 860, 193, 858, 193, 859, 193, 193, 1151, - 193, 193, 855, 193, 193, 856, 193, 193, 193, 193, - 193, 193, 861, 862, 897, 193, 193, 193, 193, 860, - 1151, 858, 193, 859, 898, 193, 193, 193, 193, 193, - - 193, 193, 193, 1151, 863, 193, 193, 193, 868, 861, - 862, 897, 193, 193, 193, 193, 193, 865, 864, 193, - 1151, 898, 193, 193, 866, 193, 193, 193, 193, 193, - 193, 863, 193, 193, 193, 868, 867, 869, 870, 193, - 899, 872, 900, 193, 865, 864, 193, 193, 193, 193, - 193, 866, 193, 193, 193, 193, 193, 193, 193, 193, - 871, 193, 193, 867, 869, 870, 193, 899, 872, 900, - 193, 1151, 873, 193, 193, 193, 193, 193, 193, 1151, - 193, 193, 193, 193, 193, 193, 193, 871, 193, 193, - 193, 876, 874, 193, 193, 875, 901, 193, 193, 873, - - 193, 193, 1151, 193, 193, 193, 193, 882, 193, 193, - 878, 193, 879, 193, 193, 877, 193, 193, 876, 874, - 193, 193, 875, 901, 1151, 193, 193, 193, 193, 193, - 193, 193, 881, 193, 882, 193, 193, 878, 883, 879, - 193, 193, 877, 193, 880, 1151, 193, 193, 193, 193, - 193, 884, 193, 193, 193, 193, 193, 193, 902, 881, - 886, 193, 193, 193, 885, 883, 193, 193, 193, 193, - 903, 880, 193, 193, 193, 193, 193, 193, 884, 193, - 193, 193, 193, 904, 905, 902, 906, 886, 193, 193, - 907, 885, 908, 193, 193, 193, 193, 903, 909, 193, - - 910, 911, 912, 913, 914, 915, 916, 193, 193, 917, - 904, 905, 918, 906, 919, 920, 193, 907, 921, 908, - 922, 923, 924, 925, 926, 909, 927, 910, 911, 912, - 913, 914, 915, 916, 928, 929, 917, 930, 931, 918, - 932, 919, 920, 933, 934, 921, 935, 922, 923, 924, - 925, 926, 936, 927, 937, 938, 939, 940, 941, 942, - 943, 928, 929, 944, 930, 931, 945, 932, 946, 193, - 933, 934, 193, 935, 193, 1151, 1151, 193, 1008, 936, - 949, 937, 938, 939, 940, 941, 942, 943, 193, 193, - 944, 950, 193, 945, 193, 946, 193, 193, 948, 193, - - 193, 193, 951, 193, 193, 1008, 1151, 949, 193, 1009, - 952, 193, 193, 193, 1151, 193, 193, 1151, 950, 193, - 1151, 193, 953, 193, 193, 948, 193, 193, 956, 951, - 193, 193, 193, 193, 193, 193, 1009, 952, 193, 193, - 193, 954, 193, 193, 955, 1151, 193, 957, 193, 953, - 193, 193, 958, 193, 193, 956, 1010, 193, 193, 193, - 193, 193, 193, 193, 960, 961, 193, 1151, 954, 193, - 193, 955, 959, 193, 957, 193, 193, 193, 193, 958, - 193, 193, 965, 1010, 193, 193, 193, 1151, 193, 193, - 193, 960, 961, 193, 193, 963, 193, 964, 962, 959, - - 193, 1151, 193, 193, 193, 1151, 966, 193, 193, 965, - 1151, 1151, 193, 193, 193, 193, 193, 193, 193, 1151, - 193, 193, 963, 193, 964, 962, 193, 193, 971, 193, - 193, 967, 968, 966, 969, 193, 193, 193, 193, 1151, - 193, 193, 193, 193, 193, 193, 970, 193, 193, 1151, - 193, 193, 1151, 193, 193, 971, 193, 193, 967, 968, - 1011, 969, 193, 193, 193, 193, 972, 193, 193, 193, - 193, 193, 193, 970, 193, 193, 193, 193, 193, 973, - 193, 193, 974, 193, 193, 975, 1151, 1011, 193, 193, - 193, 1151, 193, 972, 977, 193, 193, 193, 193, 193, - - 193, 193, 1151, 193, 193, 193, 973, 193, 193, 974, - 978, 193, 975, 193, 193, 193, 193, 193, 193, 193, - 976, 977, 193, 193, 193, 193, 193, 193, 980, 979, - 193, 193, 193, 193, 1012, 193, 1151, 978, 193, 1013, - 193, 193, 193, 193, 193, 193, 193, 976, 193, 193, - 193, 193, 193, 193, 981, 980, 979, 193, 193, 193, - 193, 1012, 982, 193, 193, 193, 1013, 193, 984, 193, - 1151, 193, 1151, 193, 1151, 193, 987, 193, 193, 193, - 193, 981, 983, 193, 193, 193, 193, 193, 193, 982, - 193, 193, 1151, 985, 193, 984, 193, 193, 193, 193, - - 193, 988, 1151, 987, 1151, 193, 193, 193, 1014, 983, - 193, 193, 986, 1015, 193, 193, 193, 193, 193, 193, - 985, 991, 193, 193, 193, 193, 193, 193, 988, 989, - 990, 992, 1151, 193, 193, 1014, 193, 1151, 1016, 986, - 1015, 1151, 193, 193, 193, 193, 193, 193, 991, 193, - 993, 193, 1151, 193, 193, 994, 989, 990, 992, 193, - 193, 193, 997, 193, 998, 1016, 1151, 193, 193, 193, - 193, 193, 193, 193, 193, 1151, 1000, 993, 193, 193, - 193, 193, 994, 999, 995, 996, 193, 193, 193, 997, - 193, 998, 193, 193, 193, 193, 193, 193, 193, 193, - - 193, 1001, 193, 1000, 1002, 193, 193, 193, 1151, 1151, - 999, 995, 996, 193, 193, 193, 193, 193, 1017, 193, - 193, 1018, 193, 193, 193, 193, 1004, 1003, 1001, 193, - 193, 1002, 193, 193, 193, 193, 193, 1006, 1019, 1020, - 193, 193, 1021, 193, 1005, 1017, 1022, 1023, 1018, 193, - 193, 193, 193, 1004, 1003, 193, 1024, 193, 1025, 1026, - 193, 193, 193, 193, 1006, 1019, 1020, 1027, 193, 1021, - 1028, 1005, 1029, 1022, 1023, 1030, 1031, 193, 1032, 1033, - 1034, 1035, 193, 1024, 1036, 1025, 1026, 1037, 193, 1038, - 1039, 1040, 1042, 193, 1027, 193, 1151, 1028, 1151, 1029, - - 1151, 1044, 1030, 1031, 1043, 1032, 1033, 1034, 1035, 193, - 1151, 1036, 193, 193, 1037, 193, 1038, 1039, 1040, 1042, - 193, 193, 193, 193, 1045, 193, 193, 193, 1044, 193, - 1151, 1043, 1076, 1047, 1151, 1077, 193, 1046, 1151, 193, - 193, 193, 193, 193, 1078, 193, 193, 193, 193, 1048, - 193, 1045, 193, 193, 193, 1049, 193, 193, 193, 1076, - 1047, 193, 1077, 193, 1046, 1050, 193, 1151, 193, 193, - 193, 1078, 193, 193, 193, 1079, 1048, 193, 193, 193, - 193, 1051, 1049, 193, 193, 193, 193, 1151, 193, 193, - 193, 1052, 1050, 193, 193, 1053, 193, 193, 1151, 193, - - 193, 1151, 1079, 193, 193, 193, 193, 193, 1051, 1054, - 193, 193, 1151, 193, 193, 1080, 193, 193, 1052, 193, - 193, 193, 1053, 193, 193, 193, 193, 193, 1055, 193, - 193, 193, 1151, 193, 193, 1056, 1054, 193, 193, 193, - 193, 193, 1080, 193, 193, 193, 193, 193, 1058, 193, - 193, 1151, 193, 193, 193, 1055, 193, 193, 193, 193, - 193, 193, 1056, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 1060, 1062, 1058, 193, 193, 1057, 193, - 193, 193, 193, 1081, 193, 193, 193, 193, 193, 1059, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 1082, - - 1060, 1062, 193, 1061, 193, 1057, 193, 1063, 193, 193, - 1081, 193, 193, 193, 193, 193, 1059, 1064, 193, 193, - 193, 193, 193, 1065, 193, 193, 1082, 193, 193, 193, - 1061, 193, 1151, 1151, 1063, 193, 1066, 193, 193, 193, - 193, 1151, 193, 1151, 1064, 193, 193, 193, 193, 193, - 1065, 1083, 193, 193, 193, 193, 193, 193, 193, 193, - 1067, 1068, 193, 1066, 193, 193, 193, 1069, 1070, 193, - 193, 193, 193, 193, 193, 193, 193, 1071, 1083, 193, - 193, 193, 193, 193, 193, 193, 193, 1067, 1068, 193, - 193, 193, 193, 193, 1069, 1070, 1151, 193, 193, 1084, - - 193, 193, 193, 193, 1071, 193, 193, 1073, 193, 193, - 1085, 1086, 193, 193, 1087, 1072, 193, 193, 193, 1088, - 193, 1089, 193, 1074, 193, 193, 1084, 193, 193, 193, - 1151, 1151, 193, 193, 1073, 1091, 193, 1085, 1086, 193, - 193, 1087, 1072, 193, 193, 193, 1088, 193, 1089, 193, - 1074, 193, 193, 193, 193, 193, 1092, 1093, 193, 193, - 193, 193, 1091, 193, 1151, 193, 193, 193, 1151, 1094, - 1151, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 1092, 1093, 193, 193, 193, 193, 193, - 1095, 193, 193, 193, 193, 193, 1094, 193, 1151, 193, - - 193, 193, 193, 193, 193, 193, 193, 1096, 193, 193, - 193, 193, 1098, 193, 193, 193, 193, 1095, 193, 1151, - 193, 193, 193, 1097, 193, 193, 193, 1106, 193, 193, - 193, 193, 193, 193, 1096, 193, 193, 193, 193, 1098, - 193, 193, 193, 193, 1107, 193, 1099, 1100, 193, 1104, - 1097, 193, 193, 1151, 1106, 1108, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 1107, 193, 1099, 1100, 1102, 1104, 1101, 193, 193, - 1103, 193, 1108, 1109, 193, 193, 193, 193, 193, 1110, - 193, 193, 193, 193, 193, 1111, 193, 1112, 1151, 193, - - 193, 193, 1102, 1151, 1101, 193, 193, 1103, 193, 193, - 1109, 193, 193, 193, 193, 193, 1110, 193, 1114, 193, - 193, 193, 1111, 193, 1112, 193, 193, 193, 193, 193, - 1115, 1151, 193, 193, 1116, 193, 193, 193, 193, 193, - 1151, 193, 193, 193, 193, 1114, 193, 193, 193, 193, - 193, 1117, 193, 193, 1122, 193, 193, 1115, 193, 1120, - 193, 1116, 193, 193, 193, 193, 193, 193, 193, 1118, - 193, 1123, 1124, 193, 1119, 193, 193, 1126, 1117, 1130, - 193, 1122, 193, 193, 1151, 193, 1120, 193, 193, 193, - 193, 193, 193, 193, 193, 1151, 1118, 193, 1123, 1124, - - 193, 1119, 193, 1127, 1126, 193, 1130, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 1128, 193, 193, - 193, 193, 193, 1151, 193, 193, 1151, 193, 1151, 1151, - 1127, 1132, 193, 193, 193, 193, 193, 1151, 193, 193, - 193, 193, 193, 1151, 1128, 1151, 1151, 1151, 193, 193, - 1151, 1151, 193, 1151, 193, 1151, 1151, 1151, 1132, 1151, - 193, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 193, 193, - 46, 46, 46, 46, 46, 88, 1151, 1151, 88, 88, - 178, 178, 178, 1151, 178, 180, 1151, 180, 180, 180, - 183, 1151, 183, 183, 183, 193, 1151, 193, 193, 193, - - 7, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, - 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, - 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, - 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, - 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, - 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, - 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, - 1151, 1151, 1151, 1151, 1151, 1151, 1151 - } ; - -static const flex_int16_t yy_chk[4678] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 9, 9, 10, 10, 15, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 15, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, - 18, 21, 22, 21, 24, 1154, 23, 30, 24, 21, - 1148, 21, 24, 23, 31, 21, 21, 44, 24, 99, - - 23, 24, 22, 23, 1147, 25, 1146, 25, 21, 22, - 21, 24, 25, 23, 30, 24, 21, 25, 21, 24, - 23, 31, 21, 21, 44, 24, 99, 23, 24, 22, - 23, 27, 25, 28, 25, 1145, 32, 27, 1144, 25, - 32, 28, 29, 42, 25, 26, 32, 28, 29, 29, - 29, 42, 1143, 26, 1142, 29, 26, 1141, 27, 26, - 28, 1140, 26, 32, 27, 26, 1139, 32, 28, 29, - 42, 1138, 26, 32, 28, 29, 29, 29, 42, 34, - 26, 33, 29, 26, 36, 33, 26, 43, 43, 26, - 35, 33, 26, 34, 1137, 36, 49, 49, 35, 34, - - 34, 36, 35, 38, 1136, 35, 34, 38, 33, 50, - 50, 36, 33, 38, 43, 43, 1135, 35, 33, 41, - 34, 41, 36, 100, 41, 35, 34, 34, 36, 35, - 38, 39, 35, 39, 38, 103, 39, 71, 55, 104, - 38, 58, 58, 39, 39, 1134, 41, 1133, 41, 55, - 100, 41, 86, 86, 67, 70, 108, 71, 39, 1131, - 39, 67, 103, 39, 71, 70, 104, 67, 111, 101, - 39, 39, 40, 111, 67, 70, 40, 101, 107, 40, - 40, 67, 70, 108, 71, 107, 40, 114, 67, 40, - 181, 181, 70, 1129, 67, 111, 101, 1125, 1121, 40, - - 111, 67, 70, 40, 101, 107, 40, 40, 1113, 1105, - 1090, 1075, 107, 40, 114, 1041, 40, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, 61, 61, - 1007, 61, 61, 61, 61, 61, 61, 77, 68, 84, - 947, 887, 68, 804, 721, 115, 68, 61, 61, 61, - 72, 116, 68, 61, 72, 61, 117, 77, 118, 84, - 72, 61, 68, 61, 77, 68, 84, 61, 61, 68, - 72, 83, 115, 68, 83, 83, 611, 72, 116, 68, - 61, 72, 61, 117, 77, 118, 84, 72, 61, 68, - - 61, 83, 120, 501, 61, 61, 388, 72, 83, 274, - 185, 83, 83, 61, 62, 62, 183, 62, 62, 62, - 62, 62, 62, 90, 88, 85, 73, 76, 83, 120, - 73, 76, 60, 62, 62, 62, 73, 110, 76, 78, - 62, 81, 102, 78, 76, 102, 73, 110, 121, 78, - 81, 76, 81, 73, 76, 81, 122, 73, 76, 78, - 62, 81, 59, 73, 110, 76, 78, 62, 81, 102, - 78, 76, 102, 73, 110, 121, 78, 81, 76, 81, - 52, 123, 81, 122, 105, 105, 78, 62, 81, 62, - 63, 124, 82, 125, 63, 126, 82, 63, 105, 127, - - 82, 109, 109, 109, 63, 109, 51, 63, 123, 113, - 113, 105, 105, 129, 63, 47, 82, 63, 124, 82, - 125, 63, 126, 82, 63, 105, 127, 82, 109, 109, - 109, 63, 109, 112, 63, 112, 113, 113, 112, 45, - 129, 63, 64, 82, 112, 20, 64, 130, 132, 128, - 64, 112, 128, 133, 135, 119, 64, 119, 136, 64, - 112, 119, 112, 19, 137, 112, 64, 11, 119, 64, - 138, 112, 119, 64, 130, 132, 128, 64, 112, 128, - 133, 135, 119, 64, 119, 136, 64, 7, 119, 141, - 134, 137, 142, 64, 65, 119, 139, 138, 139, 119, - - 134, 65, 143, 65, 144, 134, 134, 140, 65, 140, - 145, 146, 147, 65, 65, 4, 141, 134, 148, 142, - 140, 65, 150, 139, 151, 139, 3, 134, 65, 143, - 65, 144, 134, 134, 140, 65, 140, 145, 146, 147, - 65, 65, 66, 152, 153, 148, 66, 140, 154, 150, - 66, 151, 154, 66, 156, 157, 66, 158, 0, 66, - 160, 0, 66, 0, 161, 162, 66, 0, 0, 66, - 152, 153, 155, 66, 0, 154, 0, 66, 0, 154, - 66, 156, 157, 66, 158, 155, 66, 160, 159, 66, - 155, 161, 162, 66, 69, 69, 163, 159, 164, 155, - - 165, 69, 69, 69, 166, 159, 167, 169, 69, 164, - 169, 0, 155, 170, 69, 159, 171, 155, 168, 0, - 172, 69, 69, 163, 159, 164, 172, 165, 69, 69, - 69, 166, 159, 167, 169, 69, 164, 169, 168, 0, - 170, 69, 74, 171, 173, 168, 74, 172, 174, 175, - 176, 277, 193, 172, 0, 0, 74, 173, 0, 279, - 194, 194, 74, 74, 280, 168, 74, 0, 0, 74, - 0, 173, 193, 74, 282, 174, 175, 176, 277, 193, - 0, 194, 195, 74, 173, 196, 279, 194, 194, 74, - 74, 280, 196, 74, 75, 75, 199, 195, 199, 193, - - 196, 282, 195, 75, 0, 196, 0, 75, 194, 195, - 75, 0, 196, 198, 75, 0, 284, 0, 199, 196, - 0, 75, 75, 199, 195, 199, 198, 196, 0, 195, - 75, 201, 196, 198, 75, 197, 0, 75, 197, 197, - 198, 75, 79, 284, 79, 199, 285, 79, 200, 200, - 200, 201, 286, 198, 79, 79, 0, 0, 201, 197, - 198, 0, 197, 200, 79, 197, 197, 0, 200, 79, - 287, 79, 0, 285, 79, 200, 200, 200, 201, 286, - 0, 79, 79, 205, 203, 218, 197, 202, 203, 0, - 200, 79, 80, 205, 202, 200, 80, 287, 218, 80, - - 80, 202, 289, 205, 290, 218, 80, 202, 203, 80, - 205, 203, 218, 291, 202, 203, 80, 0, 0, 80, - 205, 202, 0, 80, 0, 218, 80, 80, 202, 289, - 205, 290, 218, 80, 202, 203, 80, 0, 0, 0, - 291, 0, 0, 80, 91, 91, 91, 91, 91, 91, - 91, 91, 91, 91, 92, 92, 92, 92, 92, 92, - 92, 92, 92, 92, 93, 93, 93, 93, 93, 93, - 93, 93, 93, 93, 93, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 187, 187, 187, 187, 187, - 187, 187, 187, 187, 187, 188, 188, 188, 188, 188, - - 188, 188, 188, 188, 188, 188, 204, 206, 292, 210, - 0, 208, 293, 204, 204, 204, 0, 204, 0, 210, - 0, 0, 206, 211, 208, 208, 204, 206, 0, 210, - 0, 208, 0, 204, 206, 292, 210, 211, 208, 293, - 204, 204, 204, 211, 204, 209, 210, 212, 212, 206, - 211, 208, 208, 204, 206, 207, 210, 207, 208, 207, - 207, 209, 0, 226, 211, 209, 207, 213, 212, 213, - 211, 215, 209, 207, 212, 212, 294, 0, 215, 207, - 295, 0, 207, 226, 207, 296, 207, 207, 209, 213, - 226, 215, 209, 207, 213, 212, 213, 0, 215, 298, - - 207, 216, 0, 294, 217, 215, 207, 295, 216, 225, - 226, 299, 296, 220, 217, 0, 213, 214, 215, 214, - 220, 216, 219, 214, 217, 225, 298, 0, 216, 225, - 214, 217, 219, 220, 214, 216, 225, 0, 299, 214, - 220, 217, 219, 221, 214, 222, 214, 220, 216, 219, - 214, 217, 225, 221, 223, 222, 225, 214, 224, 219, - 220, 214, 300, 221, 228, 222, 214, 224, 223, 219, - 221, 223, 222, 227, 223, 228, 0, 227, 224, 230, - 221, 223, 222, 231, 228, 224, 302, 231, 230, 300, - 221, 228, 222, 227, 224, 223, 232, 0, 223, 230, - - 227, 223, 228, 231, 227, 224, 230, 233, 233, 0, - 231, 228, 303, 302, 231, 230, 232, 0, 304, 305, - 227, 229, 229, 232, 237, 0, 230, 233, 0, 0, - 231, 229, 234, 237, 233, 233, 229, 229, 234, 303, - 234, 301, 229, 232, 237, 304, 305, 0, 229, 229, - 0, 237, 234, 235, 233, 235, 301, 235, 229, 234, - 237, 236, 306, 229, 229, 234, 235, 234, 301, 229, - 307, 237, 239, 0, 236, 240, 238, 235, 0, 234, - 235, 236, 235, 301, 235, 238, 309, 239, 236, 306, - 240, 241, 239, 235, 310, 240, 238, 307, 241, 239, - - 244, 236, 240, 238, 235, 242, 243, 243, 236, 242, - 0, 241, 238, 309, 239, 260, 0, 240, 241, 239, - 244, 310, 240, 238, 0, 241, 243, 244, 246, 242, - 245, 245, 242, 243, 243, 260, 242, 248, 241, 247, - 249, 248, 260, 246, 249, 0, 311, 244, 246, 0, - 312, 245, 247, 243, 0, 246, 242, 245, 245, 247, - 249, 248, 260, 0, 248, 313, 247, 249, 248, 0, - 246, 249, 250, 311, 252, 246, 250, 312, 245, 247, - 251, 252, 251, 314, 0, 250, 247, 249, 248, 0, - 250, 315, 313, 269, 252, 253, 250, 0, 253, 250, - - 251, 252, 254, 250, 254, 316, 255, 251, 252, 251, - 314, 254, 250, 269, 0, 253, 255, 250, 315, 254, - 269, 252, 253, 250, 254, 253, 255, 251, 256, 254, - 257, 254, 316, 255, 257, 317, 258, 0, 254, 258, - 269, 256, 253, 255, 261, 262, 254, 0, 256, 318, - 259, 254, 261, 255, 257, 256, 262, 257, 259, 258, - 0, 257, 317, 258, 261, 262, 258, 0, 256, 259, - 259, 261, 262, 0, 263, 256, 318, 259, 263, 261, - 264, 257, 0, 262, 264, 259, 258, 264, 265, 265, - 0, 261, 262, 268, 263, 0, 259, 259, 263, 266, - - 264, 263, 0, 266, 319, 263, 268, 264, 0, 265, - 0, 264, 320, 268, 264, 265, 265, 270, 0, 266, - 268, 263, 267, 321, 271, 263, 266, 264, 271, 267, - 266, 319, 270, 268, 322, 267, 265, 270, 323, 320, - 268, 324, 267, 288, 270, 288, 266, 325, 271, 267, - 321, 271, 0, 0, 0, 271, 267, 0, 0, 270, - 288, 322, 267, 326, 270, 323, 327, 328, 324, 267, - 288, 329, 288, 330, 325, 271, 275, 275, 275, 275, - 275, 275, 275, 275, 275, 275, 331, 288, 333, 332, - 326, 334, 336, 327, 328, 337, 338, 339, 329, 332, - - 330, 340, 341, 342, 343, 344, 345, 347, 348, 349, - 350, 351, 352, 331, 353, 333, 332, 354, 334, 336, - 355, 356, 337, 338, 339, 357, 332, 358, 340, 341, - 342, 343, 344, 345, 347, 348, 349, 350, 351, 352, - 359, 353, 360, 361, 354, 362, 363, 355, 356, 365, - 366, 367, 357, 368, 358, 369, 370, 371, 372, 374, - 377, 376, 375, 376, 378, 379, 380, 359, 382, 360, - 361, 375, 362, 363, 381, 383, 365, 366, 367, 385, - 368, 386, 369, 370, 371, 372, 374, 377, 376, 375, - 376, 378, 379, 380, 0, 382, 381, 0, 375, 384, - - 390, 381, 383, 384, 391, 392, 385, 0, 386, 389, - 389, 389, 389, 389, 389, 389, 389, 389, 389, 393, - 390, 394, 395, 381, 391, 392, 384, 390, 394, 396, - 384, 391, 392, 396, 397, 0, 0, 502, 0, 393, - 0, 394, 395, 503, 0, 400, 393, 390, 394, 395, - 0, 391, 392, 396, 397, 394, 396, 398, 399, 504, - 396, 397, 399, 400, 502, 400, 393, 398, 394, 395, - 503, 402, 400, 402, 0, 401, 0, 398, 399, 405, - 396, 397, 401, 403, 398, 399, 504, 405, 402, 399, - 400, 404, 400, 402, 398, 401, 403, 406, 402, 405, - - 402, 407, 401, 403, 398, 399, 405, 404, 0, 401, - 403, 404, 406, 409, 405, 402, 410, 406, 404, 0, - 402, 407, 401, 403, 406, 408, 405, 409, 407, 408, - 403, 411, 0, 409, 404, 412, 410, 413, 404, 406, - 409, 413, 412, 410, 406, 505, 414, 0, 407, 408, - 414, 411, 408, 0, 409, 412, 408, 413, 411, 415, - 409, 417, 412, 410, 413, 416, 0, 416, 413, 412, - 414, 421, 505, 414, 415, 418, 408, 414, 411, 415, - 419, 417, 412, 419, 413, 420, 415, 416, 417, 422, - 418, 421, 416, 424, 416, 418, 420, 414, 421, 506, - - 423, 415, 418, 419, 423, 420, 415, 419, 417, 422, - 419, 0, 420, 424, 416, 426, 422, 418, 421, 425, - 424, 425, 418, 420, 423, 428, 506, 423, 507, 426, - 419, 423, 420, 429, 430, 426, 422, 427, 428, 431, - 424, 425, 426, 431, 427, 428, 425, 429, 425, 508, - 0, 423, 428, 429, 430, 507, 426, 427, 0, 432, - 429, 430, 426, 431, 427, 428, 431, 432, 425, 433, - 431, 427, 428, 0, 429, 434, 508, 433, 439, 432, - 429, 430, 434, 436, 427, 435, 432, 438, 435, 433, - 431, 438, 0, 439, 432, 434, 433, 437, 439, 436, - - 437, 442, 434, 436, 433, 439, 432, 438, 435, 434, - 436, 442, 435, 443, 438, 435, 433, 437, 438, 440, - 439, 442, 434, 441, 437, 439, 436, 437, 442, 441, - 436, 444, 440, 443, 438, 435, 0, 445, 442, 440, - 443, 510, 446, 441, 437, 447, 440, 0, 442, 0, - 441, 444, 446, 449, 448, 0, 441, 445, 444, 440, - 443, 447, 446, 448, 445, 447, 440, 450, 510, 446, - 441, 451, 447, 449, 448, 453, 453, 513, 444, 446, - 449, 448, 450, 0, 445, 514, 0, 450, 447, 446, - 448, 451, 447, 452, 450, 454, 453, 452, 451, 454, - - 449, 448, 453, 453, 513, 455, 515, 455, 456, 450, - 456, 457, 514, 452, 450, 0, 516, 0, 451, 454, - 452, 458, 454, 453, 452, 455, 454, 457, 456, 459, - 460, 457, 455, 515, 455, 456, 458, 456, 457, 463, - 452, 458, 464, 516, 461, 459, 454, 462, 458, 459, - 460, 461, 455, 463, 457, 456, 459, 460, 457, 463, - 462, 465, 464, 458, 461, 0, 463, 462, 458, 464, - 0, 461, 459, 467, 462, 466, 459, 460, 461, 466, - 463, 465, 467, 0, 468, 470, 463, 462, 465, 464, - 469, 461, 470, 467, 462, 468, 0, 471, 469, 466, - - 467, 471, 466, 472, 468, 470, 466, 474, 465, 467, - 469, 468, 470, 473, 474, 475, 473, 469, 472, 470, - 467, 471, 468, 472, 471, 469, 466, 474, 471, 476, - 472, 468, 470, 473, 474, 475, 0, 469, 477, 476, - 473, 474, 475, 473, 478, 472, 0, 0, 471, 476, - 472, 0, 479, 480, 474, 0, 476, 0, 477, 0, - 473, 486, 475, 481, 478, 477, 476, 482, 480, 484, - 479, 478, 479, 480, 482, 0, 476, 518, 481, 479, - 480, 486, 483, 481, 484, 477, 487, 482, 486, 484, - 481, 478, 519, 483, 482, 480, 484, 479, 485, 479, - - 480, 482, 483, 488, 518, 481, 487, 485, 486, 483, - 481, 484, 488, 487, 482, 489, 484, 491, 485, 519, - 483, 520, 0, 488, 489, 485, 490, 491, 492, 483, - 488, 0, 492, 487, 485, 489, 490, 491, 490, 488, - 493, 494, 489, 521, 491, 485, 490, 0, 520, 493, - 488, 489, 492, 490, 491, 492, 495, 494, 495, 492, - 493, 494, 489, 490, 491, 490, 497, 493, 494, 522, - 521, 496, 0, 490, 499, 0, 493, 499, 495, 492, - 523, 497, 500, 495, 494, 495, 497, 493, 494, 496, - 498, 496, 524, 497, 499, 500, 522, 525, 496, 498, - - 526, 499, 500, 498, 499, 495, 527, 523, 497, 500, - 498, 528, 529, 497, 532, 533, 496, 498, 496, 524, - 534, 499, 500, 535, 525, 536, 498, 526, 537, 500, - 498, 538, 540, 527, 541, 544, 545, 498, 528, 529, - 547, 532, 533, 550, 551, 552, 553, 534, 554, 555, - 535, 557, 536, 561, 563, 537, 565, 567, 538, 540, - 555, 541, 544, 545, 566, 566, 568, 547, 570, 571, - 550, 551, 552, 553, 572, 554, 555, 573, 557, 574, - 561, 563, 576, 565, 567, 577, 579, 555, 580, 581, - 582, 566, 566, 568, 583, 570, 571, 584, 585, 587, - - 588, 572, 589, 590, 573, 593, 574, 594, 596, 576, - 597, 598, 577, 579, 599, 580, 581, 582, 600, 601, - 602, 583, 603, 604, 584, 585, 587, 588, 606, 589, - 590, 608, 593, 0, 594, 596, 614, 597, 598, 612, - 613, 599, 615, 0, 616, 600, 601, 602, 618, 603, - 604, 0, 612, 613, 0, 606, 614, 616, 608, 612, - 613, 617, 615, 614, 616, 619, 612, 613, 618, 615, - 617, 616, 620, 621, 622, 618, 620, 0, 623, 612, - 613, 617, 623, 614, 616, 619, 612, 613, 617, 615, - 624, 616, 619, 621, 622, 618, 620, 617, 624, 620, - - 621, 622, 623, 620, 627, 623, 626, 625, 617, 623, - 624, 625, 619, 724, 0, 628, 0, 624, 726, 626, - 621, 622, 0, 620, 627, 624, 626, 625, 630, 623, - 628, 627, 631, 626, 625, 628, 629, 624, 625, 631, - 724, 632, 628, 630, 633, 726, 626, 728, 630, 632, - 629, 627, 631, 626, 625, 630, 629, 628, 634, 631, - 633, 632, 628, 629, 633, 635, 631, 0, 632, 635, - 630, 633, 0, 634, 728, 630, 632, 629, 634, 631, - 637, 636, 637, 629, 640, 634, 638, 633, 632, 635, - 638, 633, 635, 0, 636, 641, 635, 0, 0, 648, - - 634, 636, 637, 639, 640, 634, 638, 637, 636, 637, - 639, 640, 645, 638, 642, 641, 635, 638, 0, 648, - 644, 636, 641, 639, 643, 642, 648, 645, 636, 637, - 639, 640, 645, 638, 642, 643, 644, 639, 649, 645, - 644, 642, 641, 0, 643, 646, 648, 644, 0, 646, - 639, 643, 642, 647, 645, 650, 0, 647, 649, 645, - 0, 642, 643, 644, 651, 649, 652, 644, 651, 646, - 650, 643, 646, 0, 653, 650, 646, 647, 655, 654, - 647, 0, 650, 654, 647, 649, 652, 656, 651, 655, - 729, 651, 0, 652, 653, 651, 646, 650, 655, 657, - - 658, 653, 650, 654, 647, 655, 654, 656, 657, 659, - 654, 660, 730, 652, 656, 651, 655, 729, 0, 657, - 658, 653, 662, 666, 661, 655, 657, 658, 0, 659, - 654, 660, 663, 0, 656, 657, 659, 661, 660, 730, - 664, 662, 662, 666, 661, 663, 657, 658, 0, 662, - 666, 661, 663, 664, 0, 667, 659, 668, 660, 663, - 664, 665, 667, 665, 661, 669, 670, 664, 662, 662, - 666, 661, 663, 0, 665, 667, 671, 668, 672, 663, - 664, 665, 667, 731, 668, 669, 670, 664, 665, 667, - 665, 671, 669, 670, 674, 675, 671, 677, 672, 673, - - 677, 665, 667, 671, 668, 672, 673, 732, 665, 0, - 731, 733, 669, 670, 674, 675, 676, 677, 671, 673, - 679, 674, 675, 671, 677, 672, 673, 677, 734, 681, - 676, 676, 678, 673, 732, 0, 676, 0, 733, 0, - 679, 674, 675, 676, 677, 678, 673, 679, 680, 681, - 680, 682, 678, 683, 684, 734, 681, 676, 676, 678, - 0, 0, 684, 676, 682, 685, 683, 679, 688, 0, - 680, 682, 678, 683, 684, 680, 681, 680, 682, 678, - 683, 684, 686, 687, 736, 685, 686, 687, 688, 684, - 0, 682, 685, 683, 737, 688, 689, 680, 682, 694, - - 683, 684, 691, 0, 689, 690, 686, 687, 694, 686, - 687, 736, 685, 686, 687, 688, 689, 691, 690, 694, - 0, 737, 691, 689, 692, 690, 694, 692, 693, 691, - 696, 689, 690, 686, 687, 694, 693, 695, 697, 695, - 738, 699, 739, 689, 691, 690, 694, 692, 693, 691, - 696, 692, 690, 701, 692, 693, 698, 696, 697, 695, - 698, 699, 700, 693, 695, 697, 695, 738, 699, 739, - 702, 0, 700, 701, 692, 693, 698, 696, 703, 0, - 701, 704, 700, 698, 705, 697, 695, 698, 699, 700, - 702, 706, 703, 706, 708, 704, 740, 702, 703, 700, - - 701, 704, 0, 698, 705, 703, 707, 712, 704, 700, - 708, 705, 709, 706, 708, 707, 709, 702, 706, 703, - 706, 708, 704, 740, 0, 703, 707, 712, 704, 710, - 711, 705, 711, 707, 712, 713, 709, 708, 713, 709, - 706, 708, 707, 709, 710, 0, 715, 714, 716, 710, - 711, 714, 717, 707, 712, 713, 710, 711, 742, 711, - 718, 719, 713, 709, 716, 713, 715, 714, 716, 720, - 743, 710, 717, 715, 714, 716, 710, 711, 714, 717, - 718, 719, 713, 744, 745, 742, 746, 718, 719, 720, - 747, 716, 748, 715, 714, 716, 720, 743, 749, 717, - - 750, 751, 754, 755, 757, 759, 762, 718, 719, 763, - 744, 745, 764, 746, 765, 770, 720, 747, 772, 748, - 773, 774, 777, 778, 779, 749, 780, 750, 751, 754, - 755, 757, 759, 762, 781, 783, 763, 784, 785, 764, - 786, 765, 770, 787, 788, 772, 789, 773, 774, 777, - 778, 779, 790, 780, 791, 792, 793, 795, 796, 797, - 799, 781, 783, 800, 784, 785, 801, 786, 802, 805, - 787, 788, 806, 789, 808, 0, 0, 807, 888, 790, - 809, 791, 792, 793, 795, 796, 797, 799, 810, 805, - 800, 811, 806, 801, 808, 802, 805, 807, 807, 806, - - 809, 808, 812, 812, 807, 888, 0, 809, 810, 890, - 813, 811, 813, 814, 0, 810, 805, 0, 811, 806, - 0, 808, 814, 812, 807, 807, 815, 809, 817, 812, - 812, 818, 813, 814, 816, 810, 890, 813, 811, 813, - 814, 815, 820, 819, 816, 0, 815, 819, 817, 814, - 812, 818, 820, 815, 816, 817, 891, 822, 818, 813, - 814, 816, 820, 819, 822, 823, 824, 0, 815, 820, - 819, 816, 821, 815, 819, 817, 821, 822, 818, 820, - 826, 816, 828, 891, 822, 823, 824, 0, 827, 820, - 819, 822, 823, 824, 825, 826, 821, 827, 825, 821, - - 826, 0, 828, 821, 822, 0, 829, 826, 827, 828, - 0, 0, 823, 824, 825, 827, 830, 831, 835, 0, - 832, 825, 826, 821, 827, 825, 829, 826, 834, 828, - 834, 830, 831, 829, 832, 827, 830, 831, 835, 0, - 832, 825, 833, 830, 831, 835, 833, 832, 836, 0, - 834, 837, 0, 829, 839, 834, 841, 834, 830, 831, - 892, 832, 833, 830, 831, 835, 837, 832, 836, 833, - 842, 837, 838, 833, 839, 836, 841, 834, 837, 838, - 840, 839, 840, 841, 843, 842, 0, 892, 844, 833, - 842, 0, 838, 837, 846, 836, 847, 842, 837, 838, - - 840, 839, 0, 841, 843, 845, 838, 840, 844, 840, - 847, 843, 842, 849, 846, 844, 847, 842, 850, 838, - 845, 846, 848, 847, 851, 845, 852, 840, 853, 848, - 854, 843, 845, 849, 893, 844, 0, 847, 850, 895, - 849, 846, 848, 847, 851, 850, 852, 845, 853, 848, - 854, 851, 845, 852, 855, 853, 848, 854, 855, 856, - 849, 893, 856, 858, 859, 850, 895, 857, 860, 848, - 0, 851, 0, 852, 0, 853, 863, 854, 855, 856, - 861, 855, 857, 858, 859, 855, 856, 857, 860, 856, - 858, 859, 0, 861, 857, 860, 863, 864, 865, 862, - - 861, 864, 0, 863, 0, 855, 856, 861, 897, 857, - 858, 859, 862, 898, 857, 860, 869, 864, 865, 862, - 861, 868, 868, 863, 864, 865, 862, 861, 864, 866, - 867, 869, 0, 866, 867, 897, 869, 0, 899, 862, - 898, 0, 868, 869, 864, 865, 862, 874, 868, 868, - 870, 870, 0, 866, 867, 871, 866, 867, 869, 871, - 866, 867, 874, 869, 875, 899, 0, 874, 875, 868, - 872, 870, 873, 877, 874, 0, 878, 870, 870, 871, - 866, 867, 871, 876, 872, 873, 871, 876, 875, 874, - 872, 875, 873, 877, 874, 875, 878, 872, 870, 873, - - 877, 879, 879, 878, 880, 881, 871, 876, 0, 0, - 876, 872, 873, 882, 876, 875, 886, 872, 900, 873, - 877, 902, 879, 878, 880, 881, 883, 882, 879, 879, - 883, 880, 881, 882, 876, 884, 886, 885, 904, 908, - 882, 885, 910, 886, 884, 900, 911, 917, 902, 879, - 883, 880, 881, 883, 882, 884, 918, 883, 921, 922, - 882, 885, 884, 886, 885, 904, 908, 924, 885, 910, - 925, 884, 926, 911, 917, 928, 929, 883, 930, 934, - 936, 937, 884, 918, 938, 921, 922, 939, 885, 944, - 945, 946, 948, 949, 924, 950, 0, 925, 0, 926, - - 0, 951, 928, 929, 950, 930, 934, 936, 937, 952, - 0, 938, 948, 949, 939, 950, 944, 945, 946, 948, - 949, 951, 950, 953, 952, 954, 955, 956, 951, 952, - 0, 950, 1011, 955, 0, 1014, 952, 953, 0, 948, - 949, 957, 950, 953, 1015, 954, 955, 956, 951, 957, - 953, 952, 954, 955, 956, 958, 952, 958, 959, 1011, - 955, 957, 1014, 961, 953, 959, 960, 0, 957, 963, - 953, 1015, 954, 955, 956, 1018, 957, 958, 959, 965, - 966, 960, 958, 961, 958, 959, 960, 0, 957, 963, - 961, 962, 959, 960, 962, 964, 963, 964, 0, 965, - - 966, 0, 1018, 967, 958, 959, 965, 966, 960, 968, - 961, 969, 0, 960, 962, 1019, 963, 964, 962, 970, - 971, 962, 964, 967, 964, 972, 965, 966, 970, 968, - 967, 969, 0, 973, 974, 971, 968, 975, 969, 970, - 971, 962, 1019, 976, 964, 972, 970, 971, 978, 979, - 967, 0, 972, 973, 974, 970, 968, 975, 969, 980, - 973, 974, 971, 976, 975, 977, 970, 971, 978, 979, - 976, 983, 972, 982, 985, 978, 979, 982, 977, 980, - 973, 974, 981, 1024, 975, 977, 980, 986, 984, 981, - 976, 983, 977, 987, 985, 978, 979, 982, 983, 1026, - - 982, 985, 981, 984, 982, 977, 980, 986, 984, 981, - 1024, 991, 977, 987, 986, 984, 981, 988, 983, 988, - 987, 985, 990, 989, 982, 989, 1026, 992, 993, 981, - 984, 991, 0, 0, 986, 984, 990, 995, 991, 988, - 987, 0, 990, 0, 988, 989, 988, 992, 993, 990, - 989, 1027, 989, 994, 992, 993, 1000, 995, 991, 1001, - 994, 996, 999, 990, 995, 996, 988, 997, 998, 990, - 998, 997, 989, 994, 992, 993, 1000, 999, 1027, 1001, - 994, 1002, 999, 1000, 995, 996, 1001, 994, 996, 999, - 998, 997, 996, 1003, 997, 998, 0, 998, 997, 1030, - - 994, 1002, 1004, 1000, 999, 1005, 1001, 1005, 1002, 999, - 1031, 1034, 996, 1003, 1035, 1004, 1006, 998, 997, 1036, - 1003, 1037, 1004, 1006, 1042, 1005, 1030, 1043, 1002, 1004, - 0, 0, 1005, 1044, 1005, 1045, 1006, 1031, 1034, 1046, - 1003, 1035, 1004, 1006, 1042, 1047, 1036, 1043, 1037, 1004, - 1006, 1042, 1005, 1044, 1043, 1045, 1048, 1049, 1050, 1046, - 1044, 1049, 1045, 1006, 0, 1047, 1046, 1051, 0, 1052, - 0, 1042, 1047, 1054, 1043, 1053, 1048, 1055, 1050, 1056, - 1044, 1049, 1045, 1048, 1049, 1050, 1046, 1051, 1049, 1052, - 1053, 1057, 1047, 1054, 1051, 1053, 1052, 1055, 0, 1056, - - 1054, 1059, 1053, 1048, 1055, 1050, 1056, 1058, 1049, 1058, - 1060, 1057, 1061, 1062, 1051, 1063, 1052, 1053, 1057, 0, - 1054, 1059, 1053, 1060, 1055, 1066, 1056, 1076, 1059, 1058, - 1060, 1064, 1061, 1062, 1058, 1063, 1058, 1060, 1057, 1061, - 1062, 1065, 1063, 1067, 1078, 1066, 1064, 1065, 1059, 1071, - 1060, 1064, 1066, 0, 1076, 1081, 1058, 1060, 1064, 1061, - 1062, 1065, 1063, 1067, 1068, 1070, 1072, 1069, 1065, 1071, - 1067, 1078, 1066, 1064, 1065, 1069, 1071, 1068, 1064, 1073, - 1070, 1074, 1081, 1083, 1068, 1070, 1072, 1069, 1065, 1086, - 1067, 1068, 1070, 1072, 1069, 1087, 1071, 1088, 0, 1073, - - 1092, 1074, 1069, 0, 1068, 1091, 1073, 1070, 1074, 1094, - 1083, 1068, 1070, 1072, 1069, 1093, 1086, 1095, 1091, 1096, - 1092, 1097, 1087, 1099, 1088, 1091, 1073, 1092, 1074, 1094, - 1093, 0, 1091, 1100, 1096, 1093, 1094, 1095, 1098, 1096, - 0, 1097, 1093, 1099, 1095, 1091, 1096, 1092, 1097, 1101, - 1099, 1098, 1091, 1100, 1107, 1103, 1094, 1093, 1098, 1103, - 1100, 1096, 1093, 1102, 1095, 1098, 1096, 1104, 1097, 1101, - 1099, 1109, 1112, 1114, 1102, 1103, 1101, 1115, 1098, 1124, - 1100, 1107, 1103, 1102, 0, 1098, 1103, 1104, 1116, 1117, - 1102, 1118, 1119, 1114, 1104, 0, 1101, 1115, 1109, 1112, - - 1114, 1102, 1103, 1117, 1115, 1126, 1124, 1120, 1116, 1117, - 1102, 1118, 1119, 1127, 1104, 1116, 1117, 1120, 1118, 1119, - 1114, 1132, 1128, 0, 1115, 1126, 0, 1120, 0, 0, - 1117, 1128, 1126, 1127, 1120, 1116, 1117, 0, 1118, 1119, - 1127, 1132, 1128, 0, 1120, 0, 0, 0, 1132, 1128, - 0, 0, 1126, 0, 1120, 0, 0, 0, 1128, 0, - 1127, 0, 0, 0, 0, 0, 0, 0, 1132, 1128, - 1152, 1152, 1152, 1152, 1152, 1153, 0, 0, 1153, 1153, - 1155, 1155, 1155, 0, 1155, 1156, 0, 1156, 1156, 1156, - 1157, 0, 1157, 1157, 1157, 1158, 0, 1158, 1158, 1158, - - 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, - 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, - 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, - 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, - 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, - 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, - 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, - 1151, 1151, 1151, 1151, 1151, 1151, 1151 - } ; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -#line 1 "flex_lexer.l" -/** - * lexer - * - * - */ -/*************************** - ** Section 1: Definitions - ***************************/ -#line 12 "flex_lexer.l" - -#include "../sql/Expr.h" -#include "bison_parser.h" -#include -#include -#include - -#define TOKEN(name) { return SQL_##name; } - -static thread_local std::stringstream strbuf; - -#line 2086 "flex_lexer.cpp" - -/*************************** - ** Section 2: Rules - ***************************/ -/* Define the output files */ -/* Make reentrant */ -/* performance tweeks */ -/* other flags */ -/* %option nodefault */ - -/*************************** - ** Section 3: Rules - ***************************/ -#line 2100 "flex_lexer.cpp" - -#define INITIAL 0 -#define singlequotedstring 1 -#define COMMENT 2 - -#ifndef YY_NO_UNISTD_H -/* Special case for "unistd.h", since it is non-ANSI. We include it way - * down here because we want the user's section 1 to have been scanned first. - * The user has a chance to override it with an option. - */ -#include -#endif - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -/* Holds the entire state of the reentrant scanner. */ -struct yyguts_t - { - - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; - - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - int yy_n_chars; - int yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char* yy_last_accepting_cpos; - - int yylineno_r; - int yy_flex_debug_r; - - char *yytext_r; - int yy_more_flag; - int yy_more_len; - - YYSTYPE * yylval_r; - - YYLTYPE * yylloc_r; - - }; /* end struct yyguts_t */ - -static int yy_init_globals ( yyscan_t yyscanner ); - - /* This must go here because YYSTYPE and YYLTYPE are included - * from bison output in section 1.*/ - # define yylval yyg->yylval_r - - # define yylloc yyg->yylloc_r - -int yylex_init (yyscan_t* scanner); - -int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int yylex_destroy ( yyscan_t yyscanner ); - -int yyget_debug ( yyscan_t yyscanner ); - -void yyset_debug ( int debug_flag , yyscan_t yyscanner ); - -YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); - -void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); - -FILE *yyget_in ( yyscan_t yyscanner ); - -void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); - -FILE *yyget_out ( yyscan_t yyscanner ); - -void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); - - int yyget_leng ( yyscan_t yyscanner ); - -char *yyget_text ( yyscan_t yyscanner ); - -int yyget_lineno ( yyscan_t yyscanner ); - -void yyset_lineno ( int _line_number , yyscan_t yyscanner ); - -int yyget_column ( yyscan_t yyscanner ); - -void yyset_column ( int _column_no , yyscan_t yyscanner ); - -YYSTYPE * yyget_lval ( yyscan_t yyscanner ); - -void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); - - YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); - - void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int yywrap ( yyscan_t yyscanner ); -#else -extern int yywrap ( yyscan_t yyscanner ); -#endif -#endif - -#ifndef YY_NO_UNPUT - -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen ( const char * , yyscan_t yyscanner); -#endif - -#ifndef YY_NO_INPUT -#ifdef __cplusplus -static int yyinput ( yyscan_t yyscanner ); -#else -static int input ( yyscan_t yyscanner ); -#endif - -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else -#define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ -#endif - -/* Copy whatever the last rule matched to the standard output. */ -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - int n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ -\ - -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) -#endif - -/* end tables serialization structures and prototypes */ - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); - -#define YY_DECL int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after yytext and yyleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK /*LINTED*/break; -#endif - -#define YY_RULE_SETUP \ - YY_USER_ACTION - -/** The main scanner function which does all the work. - */ -YY_DECL -{ - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yylval = yylval_param; - - yylloc = yylloc_param; - - if ( !yyg->yy_init ) - { - yyg->yy_init = 1; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! yyg->yy_start ) - yyg->yy_start = 1; /* first start state */ - - if ( ! yyin ) - yyin = stdin; - - if ( ! yyout ) - yyout = stdout; - - if ( ! YY_CURRENT_BUFFER ) { - yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); - } - - yy_load_buffer_state( yyscanner ); - } - - { -#line 57 "flex_lexer.l" - - -#line 2387 "flex_lexer.cpp" - - while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yyg->yy_start; -yy_match: - do - { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 1152 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - ++yy_cp; - } - while ( yy_current_state != 1151 ); - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - -case 1: -YY_RULE_SETUP -#line 59 "flex_lexer.l" -BEGIN(COMMENT); - YY_BREAK -case 2: -YY_RULE_SETUP -#line 60 "flex_lexer.l" -/* skipping comment content until a end of line is read */; - YY_BREAK -case 3: -/* rule 3 can match eol */ -YY_RULE_SETUP -#line 61 "flex_lexer.l" -BEGIN(INITIAL); - YY_BREAK -case 4: -/* rule 4 can match eol */ -YY_RULE_SETUP -#line 63 "flex_lexer.l" -/* skip whitespace */; - YY_BREAK -case 5: -YY_RULE_SETUP -#line 65 "flex_lexer.l" -TOKEN(DEALLOCATE) - YY_BREAK -case 6: -YY_RULE_SETUP -#line 66 "flex_lexer.l" -TOKEN(PARAMETERS) - YY_BREAK -case 7: -YY_RULE_SETUP -#line 67 "flex_lexer.l" -TOKEN(INTERSECT) - YY_BREAK -case 8: -YY_RULE_SETUP -#line 68 "flex_lexer.l" -TOKEN(TEMPORARY) - YY_BREAK -case 9: -YY_RULE_SETUP -#line 69 "flex_lexer.l" -TOKEN(TIMESTAMP) - YY_BREAK -case 10: -YY_RULE_SETUP -#line 70 "flex_lexer.l" -TOKEN(DESCRIBE) - YY_BREAK -case 11: -YY_RULE_SETUP -#line 71 "flex_lexer.l" -TOKEN(DISTINCT) - YY_BREAK -case 12: -YY_RULE_SETUP -#line 72 "flex_lexer.l" -TOKEN(NVARCHAR) - YY_BREAK -case 13: -YY_RULE_SETUP -#line 73 "flex_lexer.l" -TOKEN(RESTRICT) - YY_BREAK -case 14: -YY_RULE_SETUP -#line 74 "flex_lexer.l" -TOKEN(TRUNCATE) - YY_BREAK -case 15: -YY_RULE_SETUP -#line 75 "flex_lexer.l" -TOKEN(ANALYZE) - YY_BREAK -case 16: -YY_RULE_SETUP -#line 76 "flex_lexer.l" -TOKEN(BETWEEN) - YY_BREAK -case 17: -YY_RULE_SETUP -#line 77 "flex_lexer.l" -TOKEN(CASCADE) - YY_BREAK -case 18: -YY_RULE_SETUP -#line 78 "flex_lexer.l" -TOKEN(COLUMNS) - YY_BREAK -case 19: -YY_RULE_SETUP -#line 79 "flex_lexer.l" -TOKEN(CONTROL) - YY_BREAK -case 20: -YY_RULE_SETUP -#line 80 "flex_lexer.l" -TOKEN(DEFAULT) - YY_BREAK -case 21: -YY_RULE_SETUP -#line 81 "flex_lexer.l" -TOKEN(EXECUTE) - YY_BREAK -case 22: -YY_RULE_SETUP -#line 82 "flex_lexer.l" -TOKEN(EXPLAIN) - YY_BREAK -case 23: -YY_RULE_SETUP -#line 83 "flex_lexer.l" -TOKEN(INTEGER) - YY_BREAK -case 24: -YY_RULE_SETUP -#line 84 "flex_lexer.l" -TOKEN(NATURAL) - YY_BREAK -case 25: -YY_RULE_SETUP -#line 85 "flex_lexer.l" -TOKEN(PREPARE) - YY_BREAK -case 26: -YY_RULE_SETUP -#line 86 "flex_lexer.l" -TOKEN(PRIMARY) - YY_BREAK -case 27: -YY_RULE_SETUP -#line 87 "flex_lexer.l" -TOKEN(SCHEMAS) - YY_BREAK -case 28: -YY_RULE_SETUP -#line 88 "flex_lexer.l" -TOKEN(SPATIAL) - YY_BREAK -case 29: -YY_RULE_SETUP -#line 89 "flex_lexer.l" -TOKEN(VARCHAR) - YY_BREAK -case 30: -YY_RULE_SETUP -#line 90 "flex_lexer.l" -TOKEN(CHARACTER) - YY_BREAK -case 31: -YY_RULE_SETUP -#line 91 "flex_lexer.l" -TOKEN(VARYING) - YY_BREAK -case 32: -YY_RULE_SETUP -#line 92 "flex_lexer.l" -TOKEN(TIME) - YY_BREAK -case 33: -YY_RULE_SETUP -#line 93 "flex_lexer.l" -TOKEN(DECIMAL) - YY_BREAK -case 34: -YY_RULE_SETUP -#line 94 "flex_lexer.l" -TOKEN(REAL) - YY_BREAK -case 35: -YY_RULE_SETUP -#line 95 "flex_lexer.l" -TOKEN(VIRTUAL) - YY_BREAK -case 36: -YY_RULE_SETUP -#line 96 "flex_lexer.l" -TOKEN(BEFORE) - YY_BREAK -case 37: -YY_RULE_SETUP -#line 97 "flex_lexer.l" -TOKEN(COLUMN) - YY_BREAK -case 38: -YY_RULE_SETUP -#line 98 "flex_lexer.l" -TOKEN(CREATE) - YY_BREAK -case 39: -YY_RULE_SETUP -#line 99 "flex_lexer.l" -TOKEN(DELETE) - YY_BREAK -case 40: -YY_RULE_SETUP -#line 100 "flex_lexer.l" -TOKEN(DIRECT) - YY_BREAK -case 41: -YY_RULE_SETUP -#line 101 "flex_lexer.l" -TOKEN(DOUBLE) - YY_BREAK -case 42: -YY_RULE_SETUP -#line 102 "flex_lexer.l" -TOKEN(ESCAPE) - YY_BREAK -case 43: -YY_RULE_SETUP -#line 103 "flex_lexer.l" -TOKEN(EXCEPT) - YY_BREAK -case 44: -YY_RULE_SETUP -#line 104 "flex_lexer.l" -TOKEN(EXISTS) - YY_BREAK -case 45: -YY_RULE_SETUP -#line 105 "flex_lexer.l" -TOKEN(EXTRACT) - YY_BREAK -case 46: -YY_RULE_SETUP -#line 106 "flex_lexer.l" -TOKEN(CAST) - YY_BREAK -case 47: -YY_RULE_SETUP -#line 107 "flex_lexer.l" -TOKEN(FORMAT) - YY_BREAK -case 48: -YY_RULE_SETUP -#line 108 "flex_lexer.l" -TOKEN(GLOBAL) - YY_BREAK -case 49: -YY_RULE_SETUP -#line 109 "flex_lexer.l" -TOKEN(HAVING) - YY_BREAK -case 50: -YY_RULE_SETUP -#line 110 "flex_lexer.l" -TOKEN(IMPORT) - YY_BREAK -case 51: -YY_RULE_SETUP -#line 111 "flex_lexer.l" -TOKEN(INSERT) - YY_BREAK -case 52: -YY_RULE_SETUP -#line 112 "flex_lexer.l" -TOKEN(ISNULL) - YY_BREAK -case 53: -YY_RULE_SETUP -#line 113 "flex_lexer.l" -TOKEN(OFFSET) - YY_BREAK -case 54: -YY_RULE_SETUP -#line 114 "flex_lexer.l" -TOKEN(RENAME) - YY_BREAK -case 55: -YY_RULE_SETUP -#line 115 "flex_lexer.l" -TOKEN(SCHEMA) - YY_BREAK -case 56: -YY_RULE_SETUP -#line 116 "flex_lexer.l" -TOKEN(SELECT) - YY_BREAK -case 57: -YY_RULE_SETUP -#line 117 "flex_lexer.l" -TOKEN(SORTED) - YY_BREAK -case 58: -YY_RULE_SETUP -#line 118 "flex_lexer.l" -TOKEN(TABLES) - YY_BREAK -case 59: -YY_RULE_SETUP -#line 119 "flex_lexer.l" -TOKEN(UNIQUE) - YY_BREAK -case 60: -YY_RULE_SETUP -#line 120 "flex_lexer.l" -TOKEN(UNLOAD) - YY_BREAK -case 61: -YY_RULE_SETUP -#line 121 "flex_lexer.l" -TOKEN(UPDATE) - YY_BREAK -case 62: -YY_RULE_SETUP -#line 122 "flex_lexer.l" -TOKEN(VALUES) - YY_BREAK -case 63: -YY_RULE_SETUP -#line 123 "flex_lexer.l" -TOKEN(AFTER) - YY_BREAK -case 64: -YY_RULE_SETUP -#line 124 "flex_lexer.l" -TOKEN(ALTER) - YY_BREAK -case 65: -YY_RULE_SETUP -#line 125 "flex_lexer.l" -TOKEN(ARRAY) - YY_BREAK -case 66: -YY_RULE_SETUP -#line 126 "flex_lexer.l" -TOKEN(CROSS) - YY_BREAK -case 67: -YY_RULE_SETUP -#line 127 "flex_lexer.l" -TOKEN(DELTA) - YY_BREAK -case 68: -YY_RULE_SETUP -#line 128 "flex_lexer.l" -TOKEN(FLOAT) - YY_BREAK -case 69: -YY_RULE_SETUP -#line 129 "flex_lexer.l" -TOKEN(GROUP) - YY_BREAK -case 70: -YY_RULE_SETUP -#line 130 "flex_lexer.l" -TOKEN(INDEX) - YY_BREAK -case 71: -YY_RULE_SETUP -#line 131 "flex_lexer.l" -TOKEN(INNER) - YY_BREAK -case 72: -YY_RULE_SETUP -#line 132 "flex_lexer.l" -TOKEN(LIMIT) - YY_BREAK -case 73: -YY_RULE_SETUP -#line 133 "flex_lexer.l" -TOKEN(LOCAL) - YY_BREAK -case 74: -YY_RULE_SETUP -#line 134 "flex_lexer.l" -TOKEN(MERGE) - YY_BREAK -case 75: -YY_RULE_SETUP -#line 135 "flex_lexer.l" -TOKEN(MINUS) - YY_BREAK -case 76: -YY_RULE_SETUP -#line 136 "flex_lexer.l" -TOKEN(ORDER) - YY_BREAK -case 77: -YY_RULE_SETUP -#line 137 "flex_lexer.l" -TOKEN(OUTER) - YY_BREAK -case 78: -YY_RULE_SETUP -#line 138 "flex_lexer.l" -TOKEN(RIGHT) - YY_BREAK -case 79: -YY_RULE_SETUP -#line 139 "flex_lexer.l" -TOKEN(TABLE) - YY_BREAK -case 80: -YY_RULE_SETUP -#line 140 "flex_lexer.l" -TOKEN(UNION) - YY_BREAK -case 81: -YY_RULE_SETUP -#line 141 "flex_lexer.l" -TOKEN(USING) - YY_BREAK -case 82: -YY_RULE_SETUP -#line 142 "flex_lexer.l" -TOKEN(WHERE) - YY_BREAK -case 83: -YY_RULE_SETUP -#line 143 "flex_lexer.l" -TOKEN(CALL) - YY_BREAK -case 84: -YY_RULE_SETUP -#line 144 "flex_lexer.l" -TOKEN(CASE) - YY_BREAK -case 85: -YY_RULE_SETUP -#line 145 "flex_lexer.l" -TOKEN(CHAR) - YY_BREAK -case 86: -YY_RULE_SETUP -#line 146 "flex_lexer.l" -TOKEN(COPY) - YY_BREAK -case 87: -YY_RULE_SETUP -#line 147 "flex_lexer.l" -TOKEN(DATE) - YY_BREAK -case 88: -YY_RULE_SETUP -#line 148 "flex_lexer.l" -TOKEN(DATETIME) - YY_BREAK -case 89: -YY_RULE_SETUP -#line 149 "flex_lexer.l" -TOKEN(DESC) - YY_BREAK -case 90: -YY_RULE_SETUP -#line 150 "flex_lexer.l" -TOKEN(DROP) - YY_BREAK -case 91: -YY_RULE_SETUP -#line 151 "flex_lexer.l" -TOKEN(ELSE) - YY_BREAK -case 92: -YY_RULE_SETUP -#line 152 "flex_lexer.l" -TOKEN(FILE) - YY_BREAK -case 93: -YY_RULE_SETUP -#line 153 "flex_lexer.l" -TOKEN(FROM) - YY_BREAK -case 94: -YY_RULE_SETUP -#line 154 "flex_lexer.l" -TOKEN(FULL) - YY_BREAK -case 95: -YY_RULE_SETUP -#line 155 "flex_lexer.l" -TOKEN(HASH) - YY_BREAK -case 96: -YY_RULE_SETUP -#line 156 "flex_lexer.l" -TOKEN(HINT) - YY_BREAK -case 97: -YY_RULE_SETUP -#line 157 "flex_lexer.l" -TOKEN(INTO) - YY_BREAK -case 98: -YY_RULE_SETUP -#line 158 "flex_lexer.l" -TOKEN(JOIN) - YY_BREAK -case 99: -YY_RULE_SETUP -#line 159 "flex_lexer.l" -TOKEN(LEFT) - YY_BREAK -case 100: -YY_RULE_SETUP -#line 160 "flex_lexer.l" -TOKEN(LIKE) - YY_BREAK -case 101: -YY_RULE_SETUP -#line 161 "flex_lexer.l" -TOKEN(ILIKE) - YY_BREAK -case 102: -YY_RULE_SETUP -#line 162 "flex_lexer.l" -TOKEN(LOAD) - YY_BREAK -case 103: -YY_RULE_SETUP -#line 163 "flex_lexer.l" -TOKEN(LONG) - YY_BREAK -case 104: -YY_RULE_SETUP -#line 164 "flex_lexer.l" -TOKEN(NULL) - YY_BREAK -case 105: -YY_RULE_SETUP -#line 165 "flex_lexer.l" -TOKEN(PLAN) - YY_BREAK -case 106: -YY_RULE_SETUP -#line 166 "flex_lexer.l" -TOKEN(SHOW) - YY_BREAK -case 107: -YY_RULE_SETUP -#line 167 "flex_lexer.l" -TOKEN(TEXT) - YY_BREAK -case 108: -YY_RULE_SETUP -#line 168 "flex_lexer.l" -TOKEN(THEN) - YY_BREAK -case 109: -YY_RULE_SETUP -#line 169 "flex_lexer.l" -TOKEN(TIME) - YY_BREAK -case 110: -YY_RULE_SETUP -#line 170 "flex_lexer.l" -TOKEN(VIEW) - YY_BREAK -case 111: -YY_RULE_SETUP -#line 171 "flex_lexer.l" -TOKEN(WHEN) - YY_BREAK -case 112: -YY_RULE_SETUP -#line 172 "flex_lexer.l" -TOKEN(WITH) - YY_BREAK -case 113: -YY_RULE_SETUP -#line 173 "flex_lexer.l" -TOKEN(ADD) - YY_BREAK -case 114: -YY_RULE_SETUP -#line 174 "flex_lexer.l" -TOKEN(ALL) - YY_BREAK -case 115: -YY_RULE_SETUP -#line 175 "flex_lexer.l" -TOKEN(AND) - YY_BREAK -case 116: -YY_RULE_SETUP -#line 176 "flex_lexer.l" -TOKEN(ASC) - YY_BREAK -case 117: -YY_RULE_SETUP -#line 177 "flex_lexer.l" -TOKEN(END) - YY_BREAK -case 118: -YY_RULE_SETUP -#line 178 "flex_lexer.l" -TOKEN(FOR) - YY_BREAK -case 119: -YY_RULE_SETUP -#line 179 "flex_lexer.l" -TOKEN(INT) - YY_BREAK -case 120: -YY_RULE_SETUP -#line 180 "flex_lexer.l" -TOKEN(KEY) - YY_BREAK -case 121: -YY_RULE_SETUP -#line 181 "flex_lexer.l" -TOKEN(NOT) - YY_BREAK -case 122: -YY_RULE_SETUP -#line 182 "flex_lexer.l" -TOKEN(OFF) - YY_BREAK -case 123: -YY_RULE_SETUP -#line 183 "flex_lexer.l" -TOKEN(SET) - YY_BREAK -case 124: -YY_RULE_SETUP -#line 184 "flex_lexer.l" -TOKEN(TOP) - YY_BREAK -case 125: -YY_RULE_SETUP -#line 185 "flex_lexer.l" -TOKEN(AS) - YY_BREAK -case 126: -YY_RULE_SETUP -#line 186 "flex_lexer.l" -TOKEN(BY) - YY_BREAK -case 127: -YY_RULE_SETUP -#line 187 "flex_lexer.l" -TOKEN(IF) - YY_BREAK -case 128: -YY_RULE_SETUP -#line 188 "flex_lexer.l" -TOKEN(IN) - YY_BREAK -case 129: -YY_RULE_SETUP -#line 189 "flex_lexer.l" -TOKEN(IS) - YY_BREAK -case 130: -YY_RULE_SETUP -#line 190 "flex_lexer.l" -TOKEN(OF) - YY_BREAK -case 131: -YY_RULE_SETUP -#line 191 "flex_lexer.l" -TOKEN(ON) - YY_BREAK -case 132: -YY_RULE_SETUP -#line 192 "flex_lexer.l" -TOKEN(OR) - YY_BREAK -case 133: -YY_RULE_SETUP -#line 193 "flex_lexer.l" -TOKEN(TO) - YY_BREAK -case 134: -YY_RULE_SETUP -#line 194 "flex_lexer.l" -TOKEN(SECOND) - YY_BREAK -case 135: -YY_RULE_SETUP -#line 195 "flex_lexer.l" -TOKEN(MINUTE) - YY_BREAK -case 136: -YY_RULE_SETUP -#line 196 "flex_lexer.l" -TOKEN(HOUR) - YY_BREAK -case 137: -YY_RULE_SETUP -#line 197 "flex_lexer.l" -TOKEN(DAY) - YY_BREAK -case 138: -YY_RULE_SETUP -#line 198 "flex_lexer.l" -TOKEN(MONTH) - YY_BREAK -case 139: -YY_RULE_SETUP -#line 199 "flex_lexer.l" -TOKEN(YEAR) - YY_BREAK -case 140: -YY_RULE_SETUP -#line 200 "flex_lexer.l" -TOKEN(TRUE) - YY_BREAK -case 141: -YY_RULE_SETUP -#line 201 "flex_lexer.l" -TOKEN(FALSE) - YY_BREAK -case 142: -YY_RULE_SETUP -#line 202 "flex_lexer.l" -TOKEN(TRANSACTION) - YY_BREAK -case 143: -YY_RULE_SETUP -#line 203 "flex_lexer.l" -TOKEN(BEGIN) - YY_BREAK -case 144: -YY_RULE_SETUP -#line 204 "flex_lexer.l" -TOKEN(ROLLBACK) - YY_BREAK -case 145: -YY_RULE_SETUP -#line 205 "flex_lexer.l" -TOKEN(COMMIT) - YY_BREAK -/* Allow =/== see https://sqlite.org/lang_expr.html#collateop */ -case 146: -YY_RULE_SETUP -#line 208 "flex_lexer.l" -TOKEN(EQUALS) - YY_BREAK -case 147: -YY_RULE_SETUP -#line 209 "flex_lexer.l" -TOKEN(NOTEQUALS) - YY_BREAK -case 148: -YY_RULE_SETUP -#line 210 "flex_lexer.l" -TOKEN(NOTEQUALS) - YY_BREAK -case 149: -YY_RULE_SETUP -#line 211 "flex_lexer.l" -TOKEN(LESSEQ) - YY_BREAK -case 150: -YY_RULE_SETUP -#line 212 "flex_lexer.l" -TOKEN(GREATEREQ) - YY_BREAK -case 151: -YY_RULE_SETUP -#line 213 "flex_lexer.l" -TOKEN(CONCAT) - YY_BREAK -case 152: -YY_RULE_SETUP -#line 215 "flex_lexer.l" -{ return yytext[0]; } - YY_BREAK -case 153: -#line 218 "flex_lexer.l" -case 154: -YY_RULE_SETUP -#line 218 "flex_lexer.l" -{ - yylval->fval = atof(yytext); - return SQL_FLOATVAL; -} - YY_BREAK -/* - * Regularly, negative literals are treated as . This does not work for LLONG_MIN, as it has no - * positive equivalent. We thus match for LLONG_MIN specifically. This is not an issue for floats, where - * numeric_limits::lowest() == -numeric_limits::max(); - */ -case 155: -YY_RULE_SETUP -#line 228 "flex_lexer.l" -{ - yylval->ival = LLONG_MIN; - return SQL_INTVAL; -} - YY_BREAK -case 156: -YY_RULE_SETUP -#line 233 "flex_lexer.l" -{ - errno = 0; - yylval->ival = strtoll(yytext, nullptr, 0); - if (errno) { - return fprintf(stderr, "[SQL-Lexer-Error] Integer cannot be parsed - is it out of range?"); - return 0; - } - return SQL_INTVAL; -} - YY_BREAK -case 157: -YY_RULE_SETUP -#line 243 "flex_lexer.l" -{ - // Crop the leading and trailing quote char - yylval->sval = hsql::substr(yytext, 1, strlen(yytext)-1); - return SQL_IDENTIFIER; -} - YY_BREAK -case 158: -YY_RULE_SETUP -#line 249 "flex_lexer.l" -{ - yylval->sval = strdup(yytext); - return SQL_IDENTIFIER; -} - YY_BREAK -case 159: -YY_RULE_SETUP -#line 254 "flex_lexer.l" -{ BEGIN singlequotedstring; strbuf = std::stringstream{}; } - YY_BREAK -case 160: -YY_RULE_SETUP -#line 255 "flex_lexer.l" -{ strbuf << '\''; } - YY_BREAK -case 161: -/* rule 161 can match eol */ -YY_RULE_SETUP -#line 256 "flex_lexer.l" -{ strbuf << yytext; } - YY_BREAK -case 162: -YY_RULE_SETUP -#line 257 "flex_lexer.l" -{ BEGIN 0; yylval->sval = strdup(strbuf.str().c_str()); return SQL_STRING; } - YY_BREAK -case YY_STATE_EOF(singlequotedstring): -#line 258 "flex_lexer.l" -{ fprintf(stderr, "[SQL-Lexer-Error] Unterminated string\n"); return 0; } - YY_BREAK -case 163: -YY_RULE_SETUP -#line 260 "flex_lexer.l" -{ fprintf(stderr, "[SQL-Lexer-Error] Unknown Character: %c\n", yytext[0]); return 0; } - YY_BREAK -case 164: -YY_RULE_SETUP -#line 263 "flex_lexer.l" -ECHO; - YY_BREAK -#line 3291 "flex_lexer.cpp" -case YY_STATE_EOF(INITIAL): -case YY_STATE_EOF(COMMENT): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_END_OF_FILE: - { - yyg->yy_did_buffer_switch_on_eof = 0; - - if ( yywrap( yyscanner ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = - yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ -} /* end of yylex */ - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ -static int yy_get_next_buffer (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = yyg->yytext_ptr; - int number_to_move, i; - int ret_val; - - if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else - { - int num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - - int yy_c_buf_p_offset = - (int) (yyg->yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yyrealloc( (void *) b->yy_ch_buf, - (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if ( yyg->yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart( yyin , yyscanner); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( - (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - /* "- 2" to take care of EOB's */ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; -} - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - - static yy_state_type yy_get_previous_state (yyscan_t yyscanner) -{ - yy_state_type yy_current_state; - char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_current_state = yyg->yy_start; - - for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) - { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 1152 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - } - - return yy_current_state; -} - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) -{ - int yy_is_jam; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - char *yy_cp = yyg->yy_c_buf_p; - - YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 1152 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 1151); - - (void)yyg; - return yy_is_jam ? 0 : yy_current_state; -} - -#ifndef YY_NO_UNPUT - -#endif - -#ifndef YY_NO_INPUT -#ifdef __cplusplus - static int yyinput (yyscan_t yyscanner) -#else - static int input (yyscan_t yyscanner) -#endif - -{ - int c; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else - { /* need more input */ - int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr); - ++yyg->yy_c_buf_p; - - switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart( yyin , yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( yywrap( yyscanner ) ) - return 0; - - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(yyscanner); -#else - return input(yyscanner); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + offset; - break; - } - } - } - - c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; - - return c; -} -#endif /* ifndef YY_NO_INPUT */ - -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * @param yyscanner The scanner object. - * @note This function does not reset the start condition to @c INITIAL . - */ - void yyrestart (FILE * input_file , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! YY_CURRENT_BUFFER ){ - yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); - } - - yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); - yy_load_buffer_state( yyscanner ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * @param yyscanner The scanner object. - */ - void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_buffer_stack (yyscanner); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state( yyscanner ); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; -} - -static void yy_load_buffer_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; -} - -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * @param yyscanner The scanner object. - * @return the allocated buffer state. - */ - YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_buf_size = size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - yy_init_buffer( b, file , yyscanner); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with yy_create_buffer() - * @param yyscanner The scanner object. - */ - void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! b ) - return; - - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - yyfree( (void *) b->yy_ch_buf , yyscanner ); - - yyfree( (void *) b , yyscanner ); -} - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a yyrestart() or at EOF. - */ - static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) - -{ - int oerrno = errno; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_flush_buffer( b , yyscanner); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = 0; - - errno = oerrno; -} - -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * @param yyscanner The scanner object. - */ - void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == YY_CURRENT_BUFFER ) - yy_load_buffer_state( yyscanner ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * @param yyscanner The scanner object. - */ -void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (new_buffer == NULL) - return; - - yyensure_buffer_stack(yyscanner); - - /* This block is copied from yy_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state( yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * @param yyscanner The scanner object. - */ -void yypop_buffer_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state( yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; - } -} - -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -static void yyensure_buffer_stack (yyscan_t yyscanner) -{ - yy_size_t num_to_alloc; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ - yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc - (yyg->yy_buffer_stack, - num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); - yyg->yy_buffer_stack_max = num_to_alloc; - } -} - -/** Setup the input buffer state to scan directly from a user-specified character buffer. - * @param base the character buffer - * @param size the size in bytes of the character buffer - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return NULL; - - b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - - b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer( b , yyscanner ); - - return b; -} - -/** Setup the input buffer state to scan a string. The next call to yylex() will - * scan from a @e copy of @a str. - * @param yystr a NUL-terminated string to scan - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * yy_scan_bytes() instead. - */ -YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) -{ - - return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); -} - -/** Setup the input buffer state to scan the given bytes. The next call to yylex() will - * scan from a @e copy of @a bytes. - * @param yybytes the byte buffer to scan - * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t) (_yybytes_len + 2); - buf = (char *) yyalloc( n , yyscanner ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer( buf, n , yyscanner); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/** Get the user-defined data for this scanner. - * @param yyscanner The scanner object. - */ -YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyextra; -} - -/** Get the current line number. - * @param yyscanner The scanner object. - */ -int yyget_lineno (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yylineno; -} - -/** Get the current column number. - * @param yyscanner The scanner object. - */ -int yyget_column (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yycolumn; -} - -/** Get the input stream. - * @param yyscanner The scanner object. - */ -FILE *yyget_in (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyin; -} - -/** Get the output stream. - * @param yyscanner The scanner object. - */ -FILE *yyget_out (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyout; -} - -/** Get the length of the current token. - * @param yyscanner The scanner object. - */ -int yyget_leng (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyleng; -} - -/** Get the current token. - * @param yyscanner The scanner object. - */ - -char *yyget_text (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yytext; -} - -/** Set the user-defined data. This data is never touched by the scanner. - * @param user_defined The data to be associated with this scanner. - * @param yyscanner The scanner object. - */ -void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyextra = user_defined ; -} - -/** Set the current line number. - * @param _line_number line number - * @param yyscanner The scanner object. - */ -void yyset_lineno (int _line_number , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* lineno is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); - - yylineno = _line_number; -} - -/** Set the current column. - * @param _column_no column number - * @param yyscanner The scanner object. - */ -void yyset_column (int _column_no , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* column is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "yyset_column called with no buffer" ); - - yycolumn = _column_no; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param _in_str A readable stream. - * @param yyscanner The scanner object. - * @see yy_switch_to_buffer - */ -void yyset_in (FILE * _in_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = _in_str ; -} - -void yyset_out (FILE * _out_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = _out_str ; -} - -int yyget_debug (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yy_flex_debug; -} - -void yyset_debug (int _bdebug , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = _bdebug ; -} - -/* Accessor methods for yylval and yylloc */ - -YYSTYPE * yyget_lval (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylval; -} - -void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylval = yylval_param; -} - -YYLTYPE *yyget_lloc (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylloc; -} - -void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylloc = yylloc_param; -} - -/* User-visible API */ - -/* yylex_init is special because it creates the scanner itself, so it is - * the ONLY reentrant function that doesn't take the scanner as the last argument. - * That's why we explicitly handle the declaration, instead of using our macros. - */ -int yylex_init(yyscan_t* ptr_yy_globals) -{ - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - return yy_init_globals ( *ptr_yy_globals ); -} - -/* yylex_init_extra has the same functionality as yylex_init, but follows the - * convention of taking the scanner as the last argument. Note however, that - * this is a *pointer* to a scanner, as it will be allocated by this call (and - * is the reason, too, why this function also must handle its own declaration). - * The user defined value in the first argument will be available to yyalloc in - * the yyextra field. - */ -int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) -{ - struct yyguts_t dummy_yyguts; - - yyset_extra (yy_user_defined, &dummy_yyguts); - - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - yyset_extra (yy_user_defined, *ptr_yy_globals); - - return yy_init_globals ( *ptr_yy_globals ); -} - -static int yy_init_globals (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = NULL; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = NULL; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; - -/* Defined in main.c */ -#ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; -#else - yyin = NULL; - yyout = NULL; -#endif - - /* For future reference: Set errno on error, since we are called by - * yylex_init() - */ - return 0; -} - -/* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - yyfree(yyg->yy_buffer_stack , yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - yyfree( yyg->yy_start_stack , yyscanner ); - yyg->yy_start_stack = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * yylex() is called, initialization will occur. */ - yy_init_globals( yyscanner); - - /* Destroy the main struct (reentrant only). */ - yyfree ( yyscanner , yyscanner ); - yyscanner = NULL; - return 0; -} - -/* - * Internal utility routines. - */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - - int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; -} -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (const char * s , yyscan_t yyscanner) -{ - int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; -} -#endif - -void *yyalloc (yy_size_t size , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - return malloc(size); -} - -void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return realloc(ptr, size); -} - -void yyfree (void * ptr , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ -} - -#define YYTABLES_NAME "yytables" - -#line 263 "flex_lexer.l" - -/*************************** - ** Section 3: User code - ***************************/ - -int yyerror(const char *msg) { - fprintf(stderr, "[SQL-Lexer-Error] %s\n",msg); return 0; -} - From 8cfb6898330ad646577f449fae9d3eb5f44128dd Mon Sep 17 00:00:00 2001 From: simonstadlinger Date: Wed, 25 Aug 2021 18:32:07 +0200 Subject: [PATCH 45/73] New bison parser and flex lexer after build --- src/parser/bison_parser.cpp | 4856 ----------------------------------- src/parser/flex_lexer.cpp | 4394 ------------------------------- 2 files changed, 9250 deletions(-) delete mode 100644 src/parser/bison_parser.cpp delete mode 100644 src/parser/flex_lexer.cpp diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp deleted file mode 100644 index b1d70722..00000000 --- a/src/parser/bison_parser.cpp +++ /dev/null @@ -1,4856 +0,0 @@ -/* A Bison parser, made by GNU Bison 3.7.6. */ - -/* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 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 - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, - especially those whose name start with YY_ or yy_. They are - private implementation details that can be changed or removed. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output, and Bison version. */ -#define YYBISON 30706 - -/* Bison version string. */ -#define YYBISON_VERSION "3.7.6" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 2 - -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - -/* Substitute the type names. */ -#define YYSTYPE HSQL_STYPE -#define YYLTYPE HSQL_LTYPE -/* Substitute the variable and function names. */ -#define yyparse hsql_parse -#define yylex hsql_lex -#define yyerror hsql_error -#define yydebug hsql_debug -#define yynerrs hsql_nerrs - -/* First part of user prologue. */ -#line 1 "bison_parser.y" - -/** - * bison_parser.y - * defines bison_parser.h - * outputs bison_parser.c - * - * Grammar File Spec: http://dinosaur.compilertools.net/bison/bison_6.html - * - */ -/********************************* - ** Section 1: C Declarations - *********************************/ - -#include "bison_parser.h" -#include "flex_lexer.h" - -#include -#include - -using namespace hsql; - -int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const char *msg) { - result->setIsValid(false); - result->setErrorDetails(strdup(msg), llocp->first_line, llocp->first_column); - return 0; -} - - -#line 107 "bison_parser.cpp" - -# ifndef YY_CAST -# ifdef __cplusplus -# define YY_CAST(Type, Val) static_cast (Val) -# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) -# else -# define YY_CAST(Type, Val) ((Type) (Val)) -# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) -# endif -# endif -# ifndef YY_NULLPTR -# if defined __cplusplus -# if 201103L <= __cplusplus -# define YY_NULLPTR nullptr -# else -# define YY_NULLPTR 0 -# endif -# else -# define YY_NULLPTR ((void*)0) -# endif -# endif - -#include "bison_parser.h" -/* Symbol kind. */ -enum yysymbol_kind_t -{ - YYSYMBOL_YYEMPTY = -2, - YYSYMBOL_YYEOF = 0, /* "end of file" */ - YYSYMBOL_YYerror = 1, /* error */ - YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ - YYSYMBOL_IDENTIFIER = 3, /* IDENTIFIER */ - YYSYMBOL_STRING = 4, /* STRING */ - YYSYMBOL_FLOATVAL = 5, /* FLOATVAL */ - YYSYMBOL_INTVAL = 6, /* INTVAL */ - YYSYMBOL_DEALLOCATE = 7, /* DEALLOCATE */ - YYSYMBOL_PARAMETERS = 8, /* PARAMETERS */ - YYSYMBOL_INTERSECT = 9, /* INTERSECT */ - YYSYMBOL_TEMPORARY = 10, /* TEMPORARY */ - YYSYMBOL_TIMESTAMP = 11, /* TIMESTAMP */ - YYSYMBOL_DISTINCT = 12, /* DISTINCT */ - YYSYMBOL_NVARCHAR = 13, /* NVARCHAR */ - YYSYMBOL_RESTRICT = 14, /* RESTRICT */ - YYSYMBOL_TRUNCATE = 15, /* TRUNCATE */ - YYSYMBOL_ANALYZE = 16, /* ANALYZE */ - YYSYMBOL_BETWEEN = 17, /* BETWEEN */ - YYSYMBOL_CASCADE = 18, /* CASCADE */ - YYSYMBOL_COLUMNS = 19, /* COLUMNS */ - YYSYMBOL_CONTROL = 20, /* CONTROL */ - YYSYMBOL_DEFAULT = 21, /* DEFAULT */ - YYSYMBOL_EXECUTE = 22, /* EXECUTE */ - YYSYMBOL_EXPLAIN = 23, /* EXPLAIN */ - YYSYMBOL_INTEGER = 24, /* INTEGER */ - YYSYMBOL_NATURAL = 25, /* NATURAL */ - YYSYMBOL_PREPARE = 26, /* PREPARE */ - YYSYMBOL_PRIMARY = 27, /* PRIMARY */ - YYSYMBOL_SCHEMAS = 28, /* SCHEMAS */ - YYSYMBOL_SPATIAL = 29, /* SPATIAL */ - YYSYMBOL_VARCHAR = 30, /* VARCHAR */ - YYSYMBOL_VIRTUAL = 31, /* VIRTUAL */ - YYSYMBOL_DESCRIBE = 32, /* DESCRIBE */ - YYSYMBOL_BEFORE = 33, /* BEFORE */ - YYSYMBOL_COLUMN = 34, /* COLUMN */ - YYSYMBOL_CREATE = 35, /* CREATE */ - YYSYMBOL_DELETE = 36, /* DELETE */ - YYSYMBOL_DIRECT = 37, /* DIRECT */ - YYSYMBOL_DOUBLE = 38, /* DOUBLE */ - YYSYMBOL_ESCAPE = 39, /* ESCAPE */ - YYSYMBOL_EXCEPT = 40, /* EXCEPT */ - YYSYMBOL_EXISTS = 41, /* EXISTS */ - YYSYMBOL_EXTRACT = 42, /* EXTRACT */ - YYSYMBOL_CAST = 43, /* CAST */ - YYSYMBOL_FORMAT = 44, /* FORMAT */ - YYSYMBOL_GLOBAL = 45, /* GLOBAL */ - YYSYMBOL_HAVING = 46, /* HAVING */ - YYSYMBOL_IMPORT = 47, /* IMPORT */ - YYSYMBOL_INSERT = 48, /* INSERT */ - YYSYMBOL_ISNULL = 49, /* ISNULL */ - YYSYMBOL_OFFSET = 50, /* OFFSET */ - YYSYMBOL_RENAME = 51, /* RENAME */ - YYSYMBOL_SCHEMA = 52, /* SCHEMA */ - YYSYMBOL_SELECT = 53, /* SELECT */ - YYSYMBOL_SORTED = 54, /* SORTED */ - YYSYMBOL_TABLES = 55, /* TABLES */ - YYSYMBOL_UNIQUE = 56, /* UNIQUE */ - YYSYMBOL_UNLOAD = 57, /* UNLOAD */ - YYSYMBOL_UPDATE = 58, /* UPDATE */ - YYSYMBOL_VALUES = 59, /* VALUES */ - YYSYMBOL_AFTER = 60, /* AFTER */ - YYSYMBOL_ALTER = 61, /* ALTER */ - YYSYMBOL_CROSS = 62, /* CROSS */ - YYSYMBOL_DELTA = 63, /* DELTA */ - YYSYMBOL_FLOAT = 64, /* FLOAT */ - YYSYMBOL_GROUP = 65, /* GROUP */ - YYSYMBOL_INDEX = 66, /* INDEX */ - YYSYMBOL_INNER = 67, /* INNER */ - YYSYMBOL_LIMIT = 68, /* LIMIT */ - YYSYMBOL_LOCAL = 69, /* LOCAL */ - YYSYMBOL_MERGE = 70, /* MERGE */ - YYSYMBOL_MINUS = 71, /* MINUS */ - YYSYMBOL_ORDER = 72, /* ORDER */ - YYSYMBOL_OUTER = 73, /* OUTER */ - YYSYMBOL_RIGHT = 74, /* RIGHT */ - YYSYMBOL_TABLE = 75, /* TABLE */ - YYSYMBOL_UNION = 76, /* UNION */ - YYSYMBOL_USING = 77, /* USING */ - YYSYMBOL_WHERE = 78, /* WHERE */ - YYSYMBOL_CALL = 79, /* CALL */ - YYSYMBOL_CASE = 80, /* CASE */ - YYSYMBOL_CHAR = 81, /* CHAR */ - YYSYMBOL_COPY = 82, /* COPY */ - YYSYMBOL_DATE = 83, /* DATE */ - YYSYMBOL_DATETIME = 84, /* DATETIME */ - YYSYMBOL_DESC = 85, /* DESC */ - YYSYMBOL_DROP = 86, /* DROP */ - YYSYMBOL_ELSE = 87, /* ELSE */ - YYSYMBOL_FILE = 88, /* FILE */ - YYSYMBOL_FROM = 89, /* FROM */ - YYSYMBOL_FULL = 90, /* FULL */ - YYSYMBOL_HASH = 91, /* HASH */ - YYSYMBOL_HINT = 92, /* HINT */ - YYSYMBOL_INTO = 93, /* INTO */ - YYSYMBOL_JOIN = 94, /* JOIN */ - YYSYMBOL_LEFT = 95, /* LEFT */ - YYSYMBOL_LIKE = 96, /* LIKE */ - YYSYMBOL_LOAD = 97, /* LOAD */ - YYSYMBOL_LONG = 98, /* LONG */ - YYSYMBOL_NULL = 99, /* NULL */ - YYSYMBOL_PLAN = 100, /* PLAN */ - YYSYMBOL_SHOW = 101, /* SHOW */ - YYSYMBOL_TEXT = 102, /* TEXT */ - YYSYMBOL_THEN = 103, /* THEN */ - YYSYMBOL_TIME = 104, /* TIME */ - YYSYMBOL_VIEW = 105, /* VIEW */ - YYSYMBOL_WHEN = 106, /* WHEN */ - YYSYMBOL_WITH = 107, /* WITH */ - YYSYMBOL_ADD = 108, /* ADD */ - YYSYMBOL_ALL = 109, /* ALL */ - YYSYMBOL_AND = 110, /* AND */ - YYSYMBOL_ASC = 111, /* ASC */ - YYSYMBOL_END = 112, /* END */ - YYSYMBOL_FOR = 113, /* FOR */ - YYSYMBOL_INT = 114, /* INT */ - YYSYMBOL_KEY = 115, /* KEY */ - YYSYMBOL_NOT = 116, /* NOT */ - YYSYMBOL_OFF = 117, /* OFF */ - YYSYMBOL_SET = 118, /* SET */ - YYSYMBOL_TOP = 119, /* TOP */ - YYSYMBOL_AS = 120, /* AS */ - YYSYMBOL_BY = 121, /* BY */ - YYSYMBOL_IF = 122, /* IF */ - YYSYMBOL_IN = 123, /* IN */ - YYSYMBOL_IS = 124, /* IS */ - YYSYMBOL_OF = 125, /* OF */ - YYSYMBOL_ON = 126, /* ON */ - YYSYMBOL_OR = 127, /* OR */ - YYSYMBOL_TO = 128, /* TO */ - YYSYMBOL_ARRAY = 129, /* ARRAY */ - YYSYMBOL_CONCAT = 130, /* CONCAT */ - YYSYMBOL_ILIKE = 131, /* ILIKE */ - YYSYMBOL_SECOND = 132, /* SECOND */ - YYSYMBOL_MINUTE = 133, /* MINUTE */ - YYSYMBOL_HOUR = 134, /* HOUR */ - YYSYMBOL_DAY = 135, /* DAY */ - YYSYMBOL_MONTH = 136, /* MONTH */ - YYSYMBOL_YEAR = 137, /* YEAR */ - YYSYMBOL_TRUE = 138, /* TRUE */ - YYSYMBOL_FALSE = 139, /* FALSE */ - YYSYMBOL_TRANSACTION = 140, /* TRANSACTION */ - YYSYMBOL_BEGIN = 141, /* BEGIN */ - YYSYMBOL_COMMIT = 142, /* COMMIT */ - YYSYMBOL_ROLLBACK = 143, /* ROLLBACK */ - YYSYMBOL_144_ = 144, /* '=' */ - YYSYMBOL_EQUALS = 145, /* EQUALS */ - YYSYMBOL_NOTEQUALS = 146, /* NOTEQUALS */ - YYSYMBOL_147_ = 147, /* '<' */ - YYSYMBOL_148_ = 148, /* '>' */ - YYSYMBOL_LESS = 149, /* LESS */ - YYSYMBOL_GREATER = 150, /* GREATER */ - YYSYMBOL_LESSEQ = 151, /* LESSEQ */ - YYSYMBOL_GREATEREQ = 152, /* GREATEREQ */ - YYSYMBOL_NOTNULL = 153, /* NOTNULL */ - YYSYMBOL_154_ = 154, /* '+' */ - YYSYMBOL_155_ = 155, /* '-' */ - YYSYMBOL_156_ = 156, /* '*' */ - YYSYMBOL_157_ = 157, /* '/' */ - YYSYMBOL_158_ = 158, /* '%' */ - YYSYMBOL_159_ = 159, /* '^' */ - YYSYMBOL_UMINUS = 160, /* UMINUS */ - YYSYMBOL_161_ = 161, /* '[' */ - YYSYMBOL_162_ = 162, /* ']' */ - YYSYMBOL_163_ = 163, /* '(' */ - YYSYMBOL_164_ = 164, /* ')' */ - YYSYMBOL_165_ = 165, /* '.' */ - YYSYMBOL_166_ = 166, /* ';' */ - YYSYMBOL_167_ = 167, /* ',' */ - YYSYMBOL_168_ = 168, /* '?' */ - YYSYMBOL_YYACCEPT = 169, /* $accept */ - YYSYMBOL_input = 170, /* input */ - YYSYMBOL_statement_list = 171, /* statement_list */ - YYSYMBOL_statement = 172, /* statement */ - YYSYMBOL_preparable_statement = 173, /* preparable_statement */ - YYSYMBOL_opt_hints = 174, /* opt_hints */ - YYSYMBOL_hint_list = 175, /* hint_list */ - YYSYMBOL_hint = 176, /* hint */ - YYSYMBOL_transaction_statement = 177, /* transaction_statement */ - YYSYMBOL_opt_transaction_keyword = 178, /* opt_transaction_keyword */ - YYSYMBOL_prepare_statement = 179, /* prepare_statement */ - YYSYMBOL_prepare_target_query = 180, /* prepare_target_query */ - YYSYMBOL_execute_statement = 181, /* execute_statement */ - YYSYMBOL_import_statement = 182, /* import_statement */ - YYSYMBOL_file_type = 183, /* file_type */ - YYSYMBOL_file_path = 184, /* file_path */ - YYSYMBOL_opt_file_type = 185, /* opt_file_type */ - YYSYMBOL_export_statement = 186, /* export_statement */ - YYSYMBOL_show_statement = 187, /* show_statement */ - YYSYMBOL_create_statement = 188, /* create_statement */ - YYSYMBOL_opt_not_exists = 189, /* opt_not_exists */ - YYSYMBOL_column_def_commalist = 190, /* column_def_commalist */ - YYSYMBOL_column_def = 191, /* column_def */ - YYSYMBOL_column_type = 192, /* column_type */ - YYSYMBOL_opt_column_nullable = 193, /* opt_column_nullable */ - YYSYMBOL_drop_statement = 194, /* drop_statement */ - YYSYMBOL_opt_exists = 195, /* opt_exists */ - YYSYMBOL_delete_statement = 196, /* delete_statement */ - YYSYMBOL_truncate_statement = 197, /* truncate_statement */ - YYSYMBOL_insert_statement = 198, /* insert_statement */ - YYSYMBOL_opt_column_list = 199, /* opt_column_list */ - YYSYMBOL_update_statement = 200, /* update_statement */ - YYSYMBOL_update_clause_commalist = 201, /* update_clause_commalist */ - YYSYMBOL_update_clause = 202, /* update_clause */ - YYSYMBOL_select_statement = 203, /* select_statement */ - YYSYMBOL_select_within_set_operation = 204, /* select_within_set_operation */ - YYSYMBOL_select_within_set_operation_no_parentheses = 205, /* select_within_set_operation_no_parentheses */ - YYSYMBOL_select_with_paren = 206, /* select_with_paren */ - YYSYMBOL_select_no_paren = 207, /* select_no_paren */ - YYSYMBOL_set_operator = 208, /* set_operator */ - YYSYMBOL_set_type = 209, /* set_type */ - YYSYMBOL_opt_all = 210, /* opt_all */ - YYSYMBOL_select_clause = 211, /* select_clause */ - YYSYMBOL_opt_distinct = 212, /* opt_distinct */ - YYSYMBOL_select_list = 213, /* select_list */ - YYSYMBOL_opt_from_clause = 214, /* opt_from_clause */ - YYSYMBOL_from_clause = 215, /* from_clause */ - YYSYMBOL_opt_where = 216, /* opt_where */ - YYSYMBOL_opt_group = 217, /* opt_group */ - YYSYMBOL_opt_having = 218, /* opt_having */ - YYSYMBOL_opt_order = 219, /* opt_order */ - YYSYMBOL_order_list = 220, /* order_list */ - YYSYMBOL_order_desc = 221, /* order_desc */ - YYSYMBOL_opt_order_type = 222, /* opt_order_type */ - YYSYMBOL_opt_top = 223, /* opt_top */ - YYSYMBOL_opt_limit = 224, /* opt_limit */ - YYSYMBOL_expr_list = 225, /* expr_list */ - YYSYMBOL_opt_literal_list = 226, /* opt_literal_list */ - YYSYMBOL_literal_list = 227, /* literal_list */ - YYSYMBOL_expr_alias = 228, /* expr_alias */ - YYSYMBOL_expr = 229, /* expr */ - YYSYMBOL_operand = 230, /* operand */ - YYSYMBOL_scalar_expr = 231, /* scalar_expr */ - YYSYMBOL_unary_expr = 232, /* unary_expr */ - YYSYMBOL_binary_expr = 233, /* binary_expr */ - YYSYMBOL_logic_expr = 234, /* logic_expr */ - YYSYMBOL_in_expr = 235, /* in_expr */ - YYSYMBOL_case_expr = 236, /* case_expr */ - YYSYMBOL_case_list = 237, /* case_list */ - YYSYMBOL_exists_expr = 238, /* exists_expr */ - YYSYMBOL_comp_expr = 239, /* comp_expr */ - YYSYMBOL_function_expr = 240, /* function_expr */ - YYSYMBOL_extract_expr = 241, /* extract_expr */ - YYSYMBOL_cast_expr = 242, /* cast_expr */ - YYSYMBOL_datetime_field = 243, /* datetime_field */ - YYSYMBOL_array_expr = 244, /* array_expr */ - YYSYMBOL_array_index = 245, /* array_index */ - YYSYMBOL_between_expr = 246, /* between_expr */ - YYSYMBOL_column_name = 247, /* column_name */ - YYSYMBOL_literal = 248, /* literal */ - YYSYMBOL_string_literal = 249, /* string_literal */ - YYSYMBOL_bool_literal = 250, /* bool_literal */ - YYSYMBOL_num_literal = 251, /* num_literal */ - YYSYMBOL_int_literal = 252, /* int_literal */ - YYSYMBOL_null_literal = 253, /* null_literal */ - YYSYMBOL_date_literal = 254, /* date_literal */ - YYSYMBOL_param_expr = 255, /* param_expr */ - YYSYMBOL_table_ref = 256, /* table_ref */ - YYSYMBOL_table_ref_atomic = 257, /* table_ref_atomic */ - YYSYMBOL_nonjoin_table_ref_atomic = 258, /* nonjoin_table_ref_atomic */ - YYSYMBOL_table_ref_commalist = 259, /* table_ref_commalist */ - YYSYMBOL_table_ref_name = 260, /* table_ref_name */ - YYSYMBOL_table_ref_name_no_alias = 261, /* table_ref_name_no_alias */ - YYSYMBOL_table_name = 262, /* table_name */ - YYSYMBOL_table_alias = 263, /* table_alias */ - YYSYMBOL_opt_table_alias = 264, /* opt_table_alias */ - YYSYMBOL_alias = 265, /* alias */ - YYSYMBOL_opt_alias = 266, /* opt_alias */ - YYSYMBOL_opt_with_clause = 267, /* opt_with_clause */ - YYSYMBOL_with_clause = 268, /* with_clause */ - YYSYMBOL_with_description_list = 269, /* with_description_list */ - YYSYMBOL_with_description = 270, /* with_description */ - YYSYMBOL_join_clause = 271, /* join_clause */ - YYSYMBOL_opt_join_type = 272, /* opt_join_type */ - YYSYMBOL_join_condition = 273, /* join_condition */ - YYSYMBOL_opt_semicolon = 274, /* opt_semicolon */ - YYSYMBOL_ident_commalist = 275 /* ident_commalist */ -}; -typedef enum yysymbol_kind_t yysymbol_kind_t; - - - - -#ifdef short -# undef short -#endif - -/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure - and (if available) are included - so that the code can choose integer types of a good width. */ - -#ifndef __PTRDIFF_MAX__ -# include /* INFRINGES ON USER NAME SPACE */ -# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_STDINT_H -# endif -#endif - -/* Narrow types that promote to a signed type and that can represent a - signed or unsigned integer of at least N bits. In tables they can - save space and decrease cache pressure. Promoting to a signed type - helps avoid bugs in integer arithmetic. */ - -#ifdef __INT_LEAST8_MAX__ -typedef __INT_LEAST8_TYPE__ yytype_int8; -#elif defined YY_STDINT_H -typedef int_least8_t yytype_int8; -#else -typedef signed char yytype_int8; -#endif - -#ifdef __INT_LEAST16_MAX__ -typedef __INT_LEAST16_TYPE__ yytype_int16; -#elif defined YY_STDINT_H -typedef int_least16_t yytype_int16; -#else -typedef short yytype_int16; -#endif - -/* Work around bug in HP-UX 11.23, which defines these macros - incorrectly for preprocessor constants. This workaround can likely - be removed in 2023, as HPE has promised support for HP-UX 11.23 - (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of - . */ -#ifdef __hpux -# undef UINT_LEAST8_MAX -# undef UINT_LEAST16_MAX -# define UINT_LEAST8_MAX 255 -# define UINT_LEAST16_MAX 65535 -#endif - -#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ -typedef __UINT_LEAST8_TYPE__ yytype_uint8; -#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ - && UINT_LEAST8_MAX <= INT_MAX) -typedef uint_least8_t yytype_uint8; -#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX -typedef unsigned char yytype_uint8; -#else -typedef short yytype_uint8; -#endif - -#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ -typedef __UINT_LEAST16_TYPE__ yytype_uint16; -#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ - && UINT_LEAST16_MAX <= INT_MAX) -typedef uint_least16_t yytype_uint16; -#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX -typedef unsigned short yytype_uint16; -#else -typedef int yytype_uint16; -#endif - -#ifndef YYPTRDIFF_T -# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ -# define YYPTRDIFF_T __PTRDIFF_TYPE__ -# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ -# elif defined PTRDIFF_MAX -# ifndef ptrdiff_t -# include /* INFRINGES ON USER NAME SPACE */ -# endif -# define YYPTRDIFF_T ptrdiff_t -# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX -# else -# define YYPTRDIFF_T long -# define YYPTRDIFF_MAXIMUM LONG_MAX -# endif -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned -# endif -#endif - -#define YYSIZE_MAXIMUM \ - YY_CAST (YYPTRDIFF_T, \ - (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ - ? YYPTRDIFF_MAXIMUM \ - : YY_CAST (YYSIZE_T, -1))) - -#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) - - -/* Stored state numbers (used for stacks). */ -typedef yytype_int16 yy_state_t; - -/* State numbers in computations. */ -typedef int yy_state_fast_t; - -#ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(Msgid) dgettext ("bison-runtime", Msgid) -# endif -# endif -# ifndef YY_ -# define YY_(Msgid) Msgid -# endif -#endif - - -#ifndef YY_ATTRIBUTE_PURE -# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) -# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) -# else -# define YY_ATTRIBUTE_PURE -# endif -#endif - -#ifndef YY_ATTRIBUTE_UNUSED -# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) -# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) -# else -# define YY_ATTRIBUTE_UNUSED -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YY_USE(E) ((void) (E)) -#else -# define YY_USE(E) /* empty */ -#endif - -#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") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ - _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ - _Pragma ("GCC diagnostic pop") -#else -# define YY_INITIAL_VALUE(Value) Value -#endif -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END -#endif -#ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ -#endif - -#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ -# define YY_IGNORE_USELESS_CAST_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") -# define YY_IGNORE_USELESS_CAST_END \ - _Pragma ("GCC diagnostic pop") -#endif -#ifndef YY_IGNORE_USELESS_CAST_BEGIN -# define YY_IGNORE_USELESS_CAST_BEGIN -# define YY_IGNORE_USELESS_CAST_END -#endif - - -#define YY_ASSERT(E) ((void) (0 && (E))) - -#if 1 - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS -# include /* INFRINGES ON USER NAME SPACE */ - /* Use EXIT_SUCCESS as a witness for stdlib.h. */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's 'empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* 1 */ - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined HSQL_LTYPE_IS_TRIVIAL && HSQL_LTYPE_IS_TRIVIAL \ - && defined HSQL_STYPE_IS_TRIVIAL && HSQL_STYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yy_state_t yyss_alloc; - YYSTYPE yyvs_alloc; - YYLTYPE yyls_alloc; -}; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \ - + YYSIZEOF (YYLTYPE)) \ - + 2 * YYSTACK_GAP_MAXIMUM) - -# define YYCOPY_NEEDED 1 - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYPTRDIFF_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / YYSIZEOF (*yyptr); \ - } \ - while (0) - -#endif - -#if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from SRC to DST. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) -# else -# define YYCOPY(Dst, Src, Count) \ - do \ - { \ - YYPTRDIFF_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } \ - while (0) -# endif -# endif -#endif /* !YYCOPY_NEEDED */ - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 62 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 734 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 169 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 107 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 264 -/* YYNSTATES -- Number of states. */ -#define YYNSTATES 477 - -/* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 406 - - -/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM - as returned by yylex, with out-of-bounds checking. */ -#define YYTRANSLATE(YYX) \ - (0 <= (YYX) && (YYX) <= YYMAXUTOK \ - ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ - : YYSYMBOL_YYUNDEF) - -/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM - as returned by yylex. */ -static const yytype_uint8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 158, 2, 2, - 163, 164, 156, 154, 167, 155, 165, 157, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 166, - 147, 144, 148, 168, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 161, 2, 162, 159, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 142, 143, 145, - 146, 149, 150, 151, 152, 153, 160 -}; - -#if HSQL_DEBUG - /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_int16 yyrline[] = -{ - 0, 269, 269, 290, 296, 305, 309, 313, 316, 319, - 326, 327, 328, 329, 330, 331, 332, 333, 334, 343, - 344, 349, 350, 354, 358, 370, 373, 376, 382, 383, - 390, 397, 400, 404, 418, 424, 433, 450, 454, 457, - 466, 480, 483, 488, 502, 515, 522, 529, 540, 541, - 545, 546, 550, 556, 557, 558, 559, 560, 561, 562, - 563, 564, 565, 569, 570, 571, 581, 587, 593, 601, - 602, 611, 620, 633, 640, 651, 652, 662, 671, 672, - 676, 688, 692, 696, 710, 711, 714, 715, 726, 727, - 731, 741, 754, 761, 765, 769, 776, 779, 785, 797, - 798, 802, 806, 807, 811, 816, 817, 821, 826, 830, - 831, 835, 836, 840, 841, 845, 849, 850, 851, 857, - 858, 862, 863, 864, 865, 866, 867, 874, 875, 879, - 880, 884, 885, 889, 899, 900, 901, 902, 903, 907, - 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, - 921, 922, 926, 927, 928, 929, 930, 934, 935, 936, - 937, 938, 939, 940, 941, 942, 943, 944, 948, 949, - 953, 954, 955, 956, 962, 963, 964, 965, 969, 970, - 974, 975, 979, 980, 981, 982, 983, 984, 985, 989, - 990, 994, 998, 1002, 1003, 1004, 1005, 1006, 1007, 1011, - 1015, 1019, 1023, 1024, 1025, 1026, 1030, 1031, 1032, 1033, - 1034, 1035, 1039, 1043, 1044, 1048, 1049, 1053, 1057, 1061, - 1074, 1086, 1087, 1097, 1098, 1102, 1103, 1112, 1113, 1118, - 1129, 1138, 1139, 1144, 1145, 1150, 1151, 1156, 1157, 1162, - 1163, 1172, 1173, 1177, 1181, 1185, 1192, 1205, 1213, 1223, - 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, 1250, 1251, - 1256, 1265, 1266, 1271, 1272 -}; -#endif - -/** Accessing symbol of state STATE. */ -#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) - -#if 1 -/* The user-facing name of the symbol whose (internal) number is - YYSYMBOL. No bounds checking. */ -static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; - -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "\"end of file\"", "error", "\"invalid token\"", "IDENTIFIER", "STRING", - "FLOATVAL", "INTVAL", "DEALLOCATE", "PARAMETERS", "INTERSECT", - "TEMPORARY", "TIMESTAMP", "DISTINCT", "NVARCHAR", "RESTRICT", "TRUNCATE", - "ANALYZE", "BETWEEN", "CASCADE", "COLUMNS", "CONTROL", "DEFAULT", - "EXECUTE", "EXPLAIN", "INTEGER", "NATURAL", "PREPARE", "PRIMARY", - "SCHEMAS", "SPATIAL", "VARCHAR", "VIRTUAL", "DESCRIBE", "BEFORE", - "COLUMN", "CREATE", "DELETE", "DIRECT", "DOUBLE", "ESCAPE", "EXCEPT", - "EXISTS", "EXTRACT", "CAST", "FORMAT", "GLOBAL", "HAVING", "IMPORT", - "INSERT", "ISNULL", "OFFSET", "RENAME", "SCHEMA", "SELECT", "SORTED", - "TABLES", "UNIQUE", "UNLOAD", "UPDATE", "VALUES", "AFTER", "ALTER", - "CROSS", "DELTA", "FLOAT", "GROUP", "INDEX", "INNER", "LIMIT", "LOCAL", - "MERGE", "MINUS", "ORDER", "OUTER", "RIGHT", "TABLE", "UNION", "USING", - "WHERE", "CALL", "CASE", "CHAR", "COPY", "DATE", "DATETIME", "DESC", - "DROP", "ELSE", "FILE", "FROM", "FULL", "HASH", "HINT", "INTO", "JOIN", - "LEFT", "LIKE", "LOAD", "LONG", "NULL", "PLAN", "SHOW", "TEXT", "THEN", - "TIME", "VIEW", "WHEN", "WITH", "ADD", "ALL", "AND", "ASC", "END", "FOR", - "INT", "KEY", "NOT", "OFF", "SET", "TOP", "AS", "BY", "IF", "IN", "IS", - "OF", "ON", "OR", "TO", "ARRAY", "CONCAT", "ILIKE", "SECOND", "MINUTE", - "HOUR", "DAY", "MONTH", "YEAR", "TRUE", "FALSE", "TRANSACTION", "BEGIN", - "COMMIT", "ROLLBACK", "'='", "EQUALS", "NOTEQUALS", "'<'", "'>'", "LESS", - "GREATER", "LESSEQ", "GREATEREQ", "NOTNULL", "'+'", "'-'", "'*'", "'/'", - "'%'", "'^'", "UMINUS", "'['", "']'", "'('", "')'", "'.'", "';'", "','", - "'?'", "$accept", "input", "statement_list", "statement", - "preparable_statement", "opt_hints", "hint_list", "hint", - "transaction_statement", "opt_transaction_keyword", "prepare_statement", - "prepare_target_query", "execute_statement", "import_statement", - "file_type", "file_path", "opt_file_type", "export_statement", - "show_statement", "create_statement", "opt_not_exists", - "column_def_commalist", "column_def", "column_type", - "opt_column_nullable", "drop_statement", "opt_exists", - "delete_statement", "truncate_statement", "insert_statement", - "opt_column_list", "update_statement", "update_clause_commalist", - "update_clause", "select_statement", "select_within_set_operation", - "select_within_set_operation_no_parentheses", "select_with_paren", - "select_no_paren", "set_operator", "set_type", "opt_all", - "select_clause", "opt_distinct", "select_list", "opt_from_clause", - "from_clause", "opt_where", "opt_group", "opt_having", "opt_order", - "order_list", "order_desc", "opt_order_type", "opt_top", "opt_limit", - "expr_list", "opt_literal_list", "literal_list", "expr_alias", "expr", - "operand", "scalar_expr", "unary_expr", "binary_expr", "logic_expr", - "in_expr", "case_expr", "case_list", "exists_expr", "comp_expr", - "function_expr", "extract_expr", "cast_expr", "datetime_field", - "array_expr", "array_index", "between_expr", "column_name", "literal", - "string_literal", "bool_literal", "num_literal", "int_literal", - "null_literal", "date_literal", "param_expr", "table_ref", - "table_ref_atomic", "nonjoin_table_ref_atomic", "table_ref_commalist", - "table_ref_name", "table_ref_name_no_alias", "table_name", "table_alias", - "opt_table_alias", "alias", "opt_alias", "opt_with_clause", - "with_clause", "with_description_list", "with_description", - "join_clause", "opt_join_type", "join_condition", "opt_semicolon", - "ident_commalist", YY_NULLPTR -}; - -static const char * -yysymbol_name (yysymbol_kind_t yysymbol) -{ - return yytname[yysymbol]; -} -#endif - -#ifdef YYPRINT -/* YYTOKNUM[NUM] -- (External) token number corresponding to the - (internal) symbol number NUM (which must be that of a token). */ -static const yytype_int16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, - 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, - 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, - 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, - 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, - 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, - 395, 396, 397, 398, 61, 399, 400, 60, 62, 401, - 402, 403, 404, 405, 43, 45, 42, 47, 37, 94, - 406, 91, 93, 40, 41, 46, 59, 44, 63 -}; -#endif - -#define YYPACT_NINF (-405) - -#define yypact_value_is_default(Yyn) \ - ((Yyn) == YYPACT_NINF) - -#define YYTABLE_NINF (-262) - -#define yytable_value_is_error(Yyn) \ - ((Yyn) == YYTABLE_NINF) - - /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -static const yytype_int16 yypact[] = -{ - 524, 69, 58, 103, 113, 58, -33, 94, 101, 66, - 58, 58, -19, 15, 213, 65, 65, 65, 235, 89, - -405, 129, -405, 129, -405, -405, -405, -405, -405, -405, - -405, -405, -405, -405, -405, -18, -405, 256, 105, -405, - 122, 206, -405, 180, 180, 58, 300, 58, 191, -405, - -52, 186, 186, 58, -405, 195, 143, -405, -405, -405, - -405, -405, -405, 519, -405, 219, -405, -405, 197, -18, - 50, -405, 222, -405, 322, 13, 323, 210, 58, 58, - 253, -405, 250, 176, 337, 341, 341, 317, 58, 58, - -405, 201, 213, -405, 205, 368, 364, 215, 218, -405, - -405, -405, -18, 275, 266, -18, 32, -405, -405, -405, - -405, 384, -405, -405, -405, -405, 227, 225, -405, -405, - -405, -405, -405, -405, -405, -405, -405, -405, 352, -41, - 176, 287, -405, 341, 391, 151, 251, -58, -405, 289, - -405, 289, -405, -405, -405, -405, -405, 396, -405, -405, - 287, -405, -405, 328, -405, -405, 50, -405, -405, 287, - 328, 287, 144, -405, -405, -405, 13, -405, 401, 298, - 403, 288, 121, 244, 246, 247, 150, 318, 252, 338, - -405, 234, 138, 366, -405, -405, -405, -405, -405, -405, - -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, - 319, -405, -126, 257, -405, 287, 337, -405, 370, -405, - -405, 259, -104, -405, 330, 260, -405, 68, 32, -18, - 262, -405, -46, 32, 138, 373, -17, -405, 336, -405, - 347, -50, -405, 298, 2, 18, 379, 220, 287, 287, - 96, -21, 270, 338, 554, 287, 190, 271, -70, 287, - 287, 338, -405, 338, -34, 273, 158, 338, 338, 338, - 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, - 338, 338, 368, 58, -405, 435, 13, 138, -405, 300, - 13, -405, 396, 10, 253, -405, 287, -405, 436, -405, - -405, -405, -405, 287, -405, -405, -405, -405, 287, 287, - 341, -405, 277, -405, -405, 278, -405, -405, -405, -405, - -405, 181, -405, 403, -405, -405, 287, -405, -405, 280, - -405, -405, -405, -405, -405, -405, 357, 88, 131, 70, - 287, 287, -405, 379, 355, 17, -405, -405, -405, 342, - 488, 573, 338, 285, 234, -405, 354, 297, 573, 573, - 573, 573, 438, 438, 438, 438, 190, 190, 35, 35, - 35, -94, 301, -405, -405, -6, -405, 5, -405, 298, - -405, 30, -405, 292, -405, 22, -405, 395, -405, -405, - -405, 138, 138, -405, 458, 459, -405, 367, -405, -405, - 168, -405, 287, 347, 287, 287, -405, 91, 141, 304, - -405, 338, 573, 234, 305, 198, -405, -405, -405, -405, - 306, 377, -405, -405, -405, 399, 402, 405, 385, 10, - 477, -405, -405, -405, 362, -405, 320, 321, -405, -405, - -59, 324, 138, 142, -405, 287, -405, 554, 327, 202, - -405, -405, 22, 10, -405, -405, -405, 10, 152, 329, - 287, -405, -405, -405, -405, -405, 138, -405, -405, -405, - -405, 155, 391, -23, 332, 287, 211, 287, -405, 19, - 138, -405, -405, 138, 333, 335, -405 -}; - - /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE does not specify something else to do. Zero - means the default is an error. */ -static const yytype_int16 yydefact[] = -{ - 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 29, 29, 29, 0, 262, - 3, 20, 18, 20, 17, 8, 9, 7, 11, 16, - 13, 14, 12, 15, 10, 0, 241, 0, 231, 72, - 32, 0, 43, 49, 49, 0, 0, 0, 0, 230, - 0, 70, 70, 0, 41, 0, 243, 244, 28, 25, - 27, 26, 1, 242, 2, 0, 6, 5, 120, 0, - 81, 82, 112, 68, 0, 130, 0, 0, 0, 0, - 106, 36, 0, 76, 0, 0, 0, 0, 0, 0, - 42, 0, 0, 4, 0, 0, 100, 0, 0, 94, - 95, 93, 0, 97, 0, 0, 126, 232, 212, 215, - 217, 0, 218, 213, 214, 220, 0, 129, 131, 206, - 207, 208, 216, 209, 210, 211, 31, 30, 0, 0, - 76, 0, 71, 0, 0, 0, 0, 106, 78, 39, - 37, 39, 69, 66, 67, 246, 245, 0, 119, 99, - 0, 89, 88, 112, 85, 84, 86, 96, 92, 0, - 112, 0, 0, 90, 219, 33, 0, 48, 0, 242, - 0, 0, 202, 0, 0, 0, 0, 0, 0, 0, - 204, 0, 105, 134, 141, 142, 143, 136, 138, 144, - 137, 157, 145, 146, 147, 148, 140, 135, 150, 151, - 0, 263, 0, 0, 74, 0, 0, 77, 0, 35, - 40, 23, 0, 21, 103, 101, 127, 240, 126, 0, - 111, 113, 118, 126, 122, 124, 121, 132, 0, 46, - 0, 0, 50, 242, 100, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 153, 0, 152, 0, 0, 0, - 0, 0, 154, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 75, 0, 0, 80, 79, 0, - 0, 19, 0, 0, 106, 102, 0, 238, 0, 239, - 133, 83, 87, 0, 117, 116, 115, 91, 0, 0, - 0, 54, 0, 57, 56, 0, 62, 61, 55, 60, - 53, 65, 45, 0, 47, 189, 0, 203, 205, 0, - 193, 194, 195, 196, 197, 198, 0, 0, 0, 0, - 0, 0, 176, 0, 0, 0, 149, 139, 168, 169, - 0, 164, 0, 0, 0, 155, 0, 167, 166, 182, - 183, 184, 185, 186, 187, 188, 159, 158, 161, 160, - 162, 163, 0, 34, 264, 0, 38, 0, 22, 242, - 104, 221, 223, 0, 225, 236, 224, 108, 128, 237, - 114, 125, 123, 44, 0, 0, 63, 0, 52, 51, - 0, 180, 0, 0, 0, 0, 174, 0, 0, 0, - 199, 0, 165, 0, 0, 0, 156, 200, 73, 24, - 0, 0, 258, 250, 256, 254, 257, 252, 0, 0, - 0, 235, 229, 233, 0, 98, 0, 0, 64, 190, - 0, 0, 178, 0, 177, 0, 181, 201, 0, 0, - 172, 170, 236, 0, 253, 255, 251, 0, 222, 237, - 0, 58, 59, 191, 192, 175, 179, 173, 171, 226, - 247, 259, 0, 110, 0, 0, 0, 0, 107, 0, - 260, 248, 234, 109, 202, 0, 249 -}; - - /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = -{ - -405, -405, -405, 437, -405, 479, -405, 221, -405, 67, - -405, -405, -405, -405, 226, -79, 363, -405, -405, -405, - 463, -405, 196, 115, -405, -405, 464, -405, -405, -405, - 398, -405, -405, 309, -158, -73, -405, -11, -66, -45, - -405, -405, -76, 295, -405, -405, -405, -121, -405, -405, - 11, -405, 237, -405, -405, 78, -243, -405, -178, 249, - -131, -130, -405, -405, -405, -405, -405, -405, 293, -405, - -405, -405, -405, -405, -405, -405, -405, -405, 63, -67, - -80, -405, -405, -83, -405, -405, -405, -405, -404, 93, - -405, -405, -405, -1, -405, 98, 325, -405, -405, -405, - -405, 446, -405, -405, -405, -405, 81 -}; - - /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = -{ - 0, 18, 19, 20, 21, 66, 212, 213, 22, 59, - 23, 127, 24, 25, 82, 139, 209, 26, 27, 28, - 78, 231, 232, 311, 388, 29, 88, 30, 31, 32, - 135, 33, 137, 138, 34, 153, 154, 155, 71, 102, - 103, 158, 72, 150, 214, 284, 285, 132, 425, 468, - 106, 220, 221, 296, 96, 163, 215, 116, 117, 216, - 217, 183, 184, 185, 186, 187, 188, 189, 241, 190, - 191, 192, 193, 194, 326, 195, 196, 197, 198, 199, - 119, 120, 121, 122, 123, 124, 125, 370, 371, 372, - 373, 374, 48, 375, 421, 422, 423, 290, 35, 36, - 56, 57, 376, 418, 471, 64, 202 -}; - - /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule whose - number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_int16 yytable[] = -{ - 182, 39, 335, 98, 42, 140, 140, 141, 118, 49, - 50, 229, 148, 38, 149, 448, 207, 108, 109, 110, - 131, 317, 474, 467, 70, 287, 156, 105, 222, 156, - 224, 226, 160, 299, 53, 68, 257, 85, 274, 294, - 249, 275, 43, 461, 80, 240, 83, 244, 168, 246, - 248, 249, 90, 140, 200, 411, 51, 250, 97, 99, - 281, 38, 342, 282, 249, 295, 330, 272, 250, 204, - 54, 287, 44, 390, 277, 314, 86, 129, 130, 169, - 145, 250, 161, 60, 61, 331, 52, 143, 144, 343, - 100, 332, 412, 249, 337, 37, 111, 413, 365, 227, - 162, 405, 367, 414, 415, 453, 40, 327, 328, 206, - 250, 219, 112, 244, 312, 247, 41, 313, 338, 339, - 416, 340, 170, 341, -259, 417, 101, 347, 348, 349, - 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, - 360, 361, 420, 156, 286, 69, 292, 172, 108, 109, - 110, 113, 114, 172, 108, 109, 110, 395, 408, 47, - 439, 166, 222, 377, 218, 257, 315, 381, 382, 409, - 319, 223, 166, 369, 318, 180, 331, 411, 249, 400, - 411, 115, 396, 45, 286, 173, 174, 175, 288, 362, - 46, 173, 174, 175, 271, 250, 272, -227, 249, 397, - 398, 249, 239, 434, 68, 58, 249, 463, 393, 118, - 203, 410, 402, 118, 412, 250, 55, 412, 250, 413, - 140, 383, 413, 250, 176, 414, 415, 111, 414, 415, - 176, 99, 464, 111, 394, 62, 65, 172, 108, 109, - 110, 249, 416, 112, 435, 416, -259, 417, 249, 112, - 417, 249, 249, 225, 455, 63, 239, 345, 250, 73, - 177, 430, 100, 432, 433, 250, 177, 399, 250, 250, - 74, 437, 363, 178, 346, 173, 174, 175, 404, 178, - 386, 465, 113, 114, 234, 75, 235, 68, 113, 114, - 172, 108, 109, 110, 104, 76, 291, 387, 101, 179, - 180, 297, 77, 81, 456, 179, 180, 181, 87, 84, - 92, 94, 115, 181, 176, 91, 95, 111, 115, -228, - 257, 172, 108, 109, 110, 107, 128, 126, 173, 174, - 175, 131, 429, 112, 470, 286, 473, 438, 133, 134, - 136, 172, 108, 109, 110, 108, 268, 269, 270, 271, - 177, 272, 320, 321, 322, 323, 324, 325, 142, 242, - 174, 175, 441, 178, 69, 286, 458, 176, 147, 286, - 111, 301, 113, 114, 110, 472, 149, 302, 275, 151, - 174, 175, 152, 251, 157, 303, 112, 159, 164, 179, - 180, 165, 166, 167, 201, 205, 208, 181, 176, 211, - 104, 111, 115, 177, 228, 14, 230, 236, 233, 237, - 238, 304, 273, 245, 279, 252, 178, 112, 176, 283, - 276, 111, 280, 298, 300, 113, 114, 286, 305, 293, - 306, 307, 68, 333, 243, 336, 344, 112, 364, 379, - 384, 385, 179, 180, 391, 308, 392, 178, 403, 309, - 181, 342, 249, 406, 243, 115, 113, 114, 272, 419, - 424, 310, 253, 407, 426, 427, 428, 178, 436, 440, - 442, 443, 444, 179, 180, 445, 113, 114, 446, 447, - 449, 181, 254, 450, 451, 452, 115, 252, 454, 255, - 256, 457, 462, 179, 180, 469, 257, 258, 235, 476, - 93, 181, 67, 368, 210, 366, 115, 79, 431, 389, - 259, 260, 261, 262, 263, 278, 89, 264, 265, -261, - 266, 267, 268, 269, 270, 271, 1, 272, 171, 316, - 380, 1, 475, 329, 2, 378, 460, 252, 146, 2, - 459, 3, 289, 466, 0, 4, 3, 0, 0, 0, - 4, 5, 0, 0, 6, 7, 5, 0, 0, 6, - 7, 0, 256, 0, 0, 0, 8, 9, 257, 0, - 0, 8, 9, 0, 0, 0, 0, 10, 0, 0, - 0, 0, 10, 0, 253, -262, -262, 0, 0, -262, - -262, 0, 266, 267, 268, 269, 270, 271, 401, 272, - 0, 11, 0, 252, 334, 12, 11, 0, 0, 0, - 12, 0, 256, 0, 0, 0, 0, 0, 257, 258, - 13, 0, 252, 0, 0, 13, 14, 0, 0, 0, - 0, 14, 259, 260, 261, 262, 263, 0, 0, 264, - 265, 0, 266, 267, 268, 269, 270, 271, 0, 272, - 253, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 15, 16, 17, 0, 0, 15, 16, 17, 0, -262, - 334, 0, 0, 0, 0, 0, 0, 0, 256, 0, - 0, 0, 0, 0, 257, 258, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 256, 259, 260, - 261, 262, 263, 257, -262, 264, 265, 0, 266, 267, - 268, 269, 270, 271, 0, 272, 0, -262, -262, -262, - 262, 263, 0, 0, 264, 265, 0, 266, 267, 268, - 269, 270, 271, 0, 272 -}; - -static const yytype_int16 yycheck[] = -{ - 131, 2, 245, 69, 5, 85, 86, 86, 75, 10, - 11, 169, 95, 3, 12, 419, 137, 4, 5, 6, - 78, 3, 3, 46, 35, 3, 102, 72, 159, 105, - 161, 162, 105, 50, 19, 53, 130, 89, 164, 85, - 110, 167, 75, 447, 45, 176, 47, 177, 89, 179, - 181, 110, 53, 133, 133, 25, 75, 127, 69, 9, - 164, 3, 96, 167, 110, 111, 87, 161, 127, 135, - 55, 3, 105, 316, 205, 233, 128, 78, 79, 120, - 91, 127, 50, 16, 17, 106, 105, 88, 89, 123, - 40, 112, 62, 110, 164, 26, 83, 67, 276, 166, - 68, 344, 280, 73, 74, 164, 3, 238, 239, 167, - 127, 156, 99, 243, 164, 181, 3, 167, 249, 250, - 90, 251, 163, 253, 94, 95, 76, 257, 258, 259, - 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, - 270, 271, 120, 219, 167, 163, 219, 3, 4, 5, - 6, 138, 139, 3, 4, 5, 6, 87, 164, 93, - 403, 167, 293, 284, 153, 130, 164, 298, 299, 164, - 236, 160, 167, 163, 156, 156, 106, 25, 110, 162, - 25, 168, 112, 89, 167, 41, 42, 43, 120, 272, - 89, 41, 42, 43, 159, 127, 161, 167, 110, 330, - 331, 110, 106, 112, 53, 140, 110, 450, 120, 276, - 59, 369, 342, 280, 62, 127, 3, 62, 127, 67, - 300, 300, 67, 127, 80, 73, 74, 83, 73, 74, - 80, 9, 77, 83, 103, 0, 107, 3, 4, 5, - 6, 110, 90, 99, 103, 90, 94, 95, 110, 99, - 95, 110, 110, 109, 112, 166, 106, 99, 127, 3, - 116, 392, 40, 394, 395, 127, 116, 333, 127, 127, - 165, 401, 273, 129, 116, 41, 42, 43, 344, 129, - 99, 126, 138, 139, 163, 163, 165, 53, 138, 139, - 3, 4, 5, 6, 72, 89, 218, 116, 76, 155, - 156, 223, 122, 3, 435, 155, 156, 163, 122, 118, - 167, 92, 168, 163, 80, 120, 119, 83, 168, 167, - 130, 3, 4, 5, 6, 3, 116, 4, 41, 42, - 43, 78, 164, 99, 465, 167, 467, 403, 88, 163, - 3, 3, 4, 5, 6, 4, 156, 157, 158, 159, - 116, 161, 132, 133, 134, 135, 136, 137, 41, 41, - 42, 43, 164, 129, 163, 167, 164, 80, 163, 167, - 83, 24, 138, 139, 6, 164, 12, 30, 167, 164, - 42, 43, 164, 17, 109, 38, 99, 121, 4, 155, - 156, 164, 167, 41, 3, 144, 107, 163, 80, 3, - 72, 83, 168, 116, 3, 107, 3, 163, 120, 163, - 163, 64, 93, 161, 44, 49, 129, 99, 80, 89, - 163, 83, 163, 50, 88, 138, 139, 167, 81, 167, - 83, 84, 53, 163, 116, 164, 163, 99, 3, 3, - 163, 163, 155, 156, 164, 98, 89, 129, 163, 102, - 163, 96, 110, 99, 116, 168, 138, 139, 161, 167, - 65, 114, 96, 162, 6, 6, 99, 129, 164, 164, - 164, 94, 73, 155, 156, 73, 138, 139, 73, 94, - 3, 163, 116, 121, 164, 164, 168, 49, 164, 123, - 124, 164, 163, 155, 156, 163, 130, 131, 165, 164, - 63, 163, 23, 282, 141, 279, 168, 44, 393, 313, - 144, 145, 146, 147, 148, 206, 52, 151, 152, 0, - 154, 155, 156, 157, 158, 159, 7, 161, 130, 234, - 293, 7, 469, 240, 15, 286, 443, 49, 92, 15, - 442, 22, 217, 462, -1, 26, 22, -1, -1, -1, - 26, 32, -1, -1, 35, 36, 32, -1, -1, 35, - 36, -1, 124, -1, -1, -1, 47, 48, 130, -1, - -1, 47, 48, -1, -1, -1, -1, 58, -1, -1, - -1, -1, 58, -1, 96, 147, 148, -1, -1, 151, - 152, -1, 154, 155, 156, 157, 158, 159, 110, 161, - -1, 82, -1, 49, 116, 86, 82, -1, -1, -1, - 86, -1, 124, -1, -1, -1, -1, -1, 130, 131, - 101, -1, 49, -1, -1, 101, 107, -1, -1, -1, - -1, 107, 144, 145, 146, 147, 148, -1, -1, 151, - 152, -1, 154, 155, 156, 157, 158, 159, -1, 161, - 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 141, 142, 143, -1, -1, 141, 142, 143, -1, 96, - 116, -1, -1, -1, -1, -1, -1, -1, 124, -1, - -1, -1, -1, -1, 130, 131, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 124, 144, 145, - 146, 147, 148, 130, 131, 151, 152, -1, 154, 155, - 156, 157, 158, 159, -1, 161, -1, 144, 145, 146, - 147, 148, -1, -1, 151, 152, -1, 154, 155, 156, - 157, 158, 159, -1, 161 -}; - - /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_int16 yystos[] = -{ - 0, 7, 15, 22, 26, 32, 35, 36, 47, 48, - 58, 82, 86, 101, 107, 141, 142, 143, 170, 171, - 172, 173, 177, 179, 181, 182, 186, 187, 188, 194, - 196, 197, 198, 200, 203, 267, 268, 26, 3, 262, - 3, 3, 262, 75, 105, 89, 89, 93, 261, 262, - 262, 75, 105, 19, 55, 3, 269, 270, 140, 178, - 178, 178, 0, 166, 274, 107, 174, 174, 53, 163, - 206, 207, 211, 3, 165, 163, 89, 122, 189, 189, - 262, 3, 183, 262, 118, 89, 128, 122, 195, 195, - 262, 120, 167, 172, 92, 119, 223, 206, 207, 9, - 40, 76, 208, 209, 72, 208, 219, 3, 4, 5, - 6, 83, 99, 138, 139, 168, 226, 227, 248, 249, - 250, 251, 252, 253, 254, 255, 4, 180, 116, 262, - 262, 78, 216, 88, 163, 199, 3, 201, 202, 184, - 249, 184, 41, 262, 262, 206, 270, 163, 252, 12, - 212, 164, 164, 204, 205, 206, 211, 109, 210, 121, - 204, 50, 68, 224, 4, 164, 167, 41, 89, 120, - 163, 199, 3, 41, 42, 43, 80, 116, 129, 155, - 156, 163, 229, 230, 231, 232, 233, 234, 235, 236, - 238, 239, 240, 241, 242, 244, 245, 246, 247, 248, - 184, 3, 275, 59, 207, 144, 167, 216, 107, 185, - 185, 3, 175, 176, 213, 225, 228, 229, 219, 208, - 220, 221, 229, 219, 229, 109, 229, 248, 3, 203, - 3, 190, 191, 120, 163, 165, 163, 163, 163, 106, - 229, 237, 41, 116, 230, 161, 230, 207, 229, 110, - 127, 17, 49, 96, 116, 123, 124, 130, 131, 144, - 145, 146, 147, 148, 151, 152, 154, 155, 156, 157, - 158, 159, 161, 93, 164, 167, 163, 229, 202, 44, - 163, 164, 167, 89, 214, 215, 167, 3, 120, 265, - 266, 224, 204, 167, 85, 111, 222, 224, 50, 50, - 88, 24, 30, 38, 64, 81, 83, 84, 98, 102, - 114, 192, 164, 167, 203, 164, 212, 3, 156, 207, - 132, 133, 134, 135, 136, 137, 243, 229, 229, 237, - 87, 106, 112, 163, 116, 225, 164, 164, 229, 229, - 230, 230, 96, 123, 163, 99, 116, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 252, 262, 3, 227, 183, 227, 176, 163, - 256, 257, 258, 259, 260, 262, 271, 216, 228, 3, - 221, 229, 229, 184, 163, 163, 99, 116, 193, 191, - 225, 164, 89, 120, 103, 87, 112, 229, 229, 207, - 162, 110, 230, 163, 207, 225, 99, 162, 164, 164, - 203, 25, 62, 67, 73, 74, 90, 95, 272, 167, - 120, 263, 264, 265, 65, 217, 6, 6, 99, 164, - 229, 192, 229, 229, 112, 103, 164, 230, 207, 225, - 164, 164, 164, 94, 73, 73, 73, 94, 257, 3, - 121, 164, 164, 164, 164, 112, 229, 164, 164, 264, - 258, 257, 163, 225, 77, 126, 275, 46, 218, 163, - 229, 273, 164, 229, 3, 247, 164 -}; - - /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_int16 yyr1[] = -{ - 0, 169, 170, 171, 171, 172, 172, 172, 172, 172, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 174, - 174, 175, 175, 176, 176, 177, 177, 177, 178, 178, - 179, 180, 181, 181, 182, 182, 183, 184, 185, 185, - 186, 187, 187, 187, 188, 188, 188, 188, 189, 189, - 190, 190, 191, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 193, 193, 193, 194, 194, 194, 195, - 195, 196, 197, 198, 198, 199, 199, 200, 201, 201, - 202, 203, 203, 203, 204, 204, 205, 205, 206, 206, - 207, 207, 208, 209, 209, 209, 210, 210, 211, 212, - 212, 213, 214, 214, 215, 216, 216, 217, 217, 218, - 218, 219, 219, 220, 220, 221, 222, 222, 222, 223, - 223, 224, 224, 224, 224, 224, 224, 225, 225, 226, - 226, 227, 227, 228, 229, 229, 229, 229, 229, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 231, 231, 232, 232, 232, 232, 232, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 234, 234, - 235, 235, 235, 235, 236, 236, 236, 236, 237, 237, - 238, 238, 239, 239, 239, 239, 239, 239, 239, 240, - 240, 241, 242, 243, 243, 243, 243, 243, 243, 244, - 245, 246, 247, 247, 247, 247, 248, 248, 248, 248, - 248, 248, 249, 250, 250, 251, 251, 252, 253, 254, - 255, 256, 256, 257, 257, 258, 258, 259, 259, 260, - 261, 262, 262, 263, 263, 264, 264, 265, 265, 266, - 266, 267, 267, 268, 269, 269, 270, 271, 271, 271, - 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, - 273, 274, 274, 275, 275 -}; - - /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ -static const yytype_int8 yyr2[] = -{ - 0, 2, 2, 1, 3, 2, 2, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, - 0, 1, 3, 1, 4, 2, 2, 2, 1, 0, - 4, 1, 2, 5, 7, 5, 1, 1, 3, 0, - 5, 2, 3, 2, 8, 7, 6, 7, 3, 0, - 1, 3, 3, 1, 1, 1, 1, 1, 4, 4, - 1, 1, 1, 1, 2, 0, 4, 4, 3, 2, - 0, 4, 2, 8, 5, 3, 0, 5, 1, 3, - 3, 2, 2, 6, 1, 1, 1, 3, 3, 3, - 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, 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, 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, 2, - 1, 1, 3, 1, 1, 1, 4, 1, 3, 2, - 1, 1, 3, 1, 5, 1, 0, 2, 1, 1, - 0, 1, 0, 2, 1, 3, 3, 4, 6, 8, - 1, 2, 1, 2, 1, 2, 1, 1, 1, 0, - 1, 1, 0, 1, 3 -}; - - -enum { YYENOMEM = -2 }; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = SQL_HSQL_EMPTY) - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ - do \ - if (yychar == SQL_HSQL_EMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (&yylloc, result, scanner, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ - while (0) - -/* Backward compatibility with an undocumented macro. - Use SQL_HSQL_error or SQL_HSQL_UNDEF. */ -#define YYERRCODE SQL_HSQL_UNDEF - -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (N) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (0) -#endif - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) - - -/* Enable debugging if requested. */ -#if HSQL_DEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (0) - - -/* YY_LOCATION_PRINT -- Print the location on the stream. - This macro was not mandated originally: define only if we know - we won't break user code: when these are the locations we know. */ - -# ifndef YY_LOCATION_PRINT -# if defined HSQL_LTYPE_IS_TRIVIAL && HSQL_LTYPE_IS_TRIVIAL - -/* Print *YYLOCP on YYO. Private, do not rely on its existence. */ - -YY_ATTRIBUTE_UNUSED -static int -yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) -{ - int res = 0; - int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; - if (0 <= yylocp->first_line) - { - res += YYFPRINTF (yyo, "%d", yylocp->first_line); - if (0 <= yylocp->first_column) - res += YYFPRINTF (yyo, ".%d", yylocp->first_column); - } - if (0 <= yylocp->last_line) - { - if (yylocp->first_line < yylocp->last_line) - { - res += YYFPRINTF (yyo, "-%d", yylocp->last_line); - if (0 <= end_col) - res += YYFPRINTF (yyo, ".%d", end_col); - } - else if (0 <= end_col && yylocp->first_column < end_col) - res += YYFPRINTF (yyo, "-%d", end_col); - } - return res; - } - -# define YY_LOCATION_PRINT(File, Loc) \ - yy_location_print_ (File, &(Loc)) - -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif -# endif /* !defined YY_LOCATION_PRINT */ - - -# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Kind, Value, Location, result, scanner); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) - - -/*-----------------------------------. -| Print this symbol's value on YYO. | -`-----------------------------------*/ - -static void -yy_symbol_value_print (FILE *yyo, - yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, hsql::SQLParserResult* result, yyscan_t scanner) -{ - FILE *yyoutput = yyo; - YY_USE (yyoutput); - YY_USE (yylocationp); - YY_USE (result); - YY_USE (scanner); - if (!yyvaluep) - return; -# ifdef YYPRINT - if (yykind < YYNTOKENS) - YYPRINT (yyo, yytoknum[yykind], *yyvaluep); -# endif - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE (yykind); - YY_IGNORE_MAYBE_UNINITIALIZED_END -} - - -/*---------------------------. -| Print this symbol on YYO. | -`---------------------------*/ - -static void -yy_symbol_print (FILE *yyo, - yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, hsql::SQLParserResult* result, yyscan_t scanner) -{ - YYFPRINTF (yyo, "%s %s (", - yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); - - YY_LOCATION_PRINT (yyo, *yylocationp); - YYFPRINTF (yyo, ": "); - yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, result, scanner); - YYFPRINTF (yyo, ")"); -} - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -static void -yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) -{ - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (0) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -static void -yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, - int yyrule, hsql::SQLParserResult* result, yyscan_t scanner) -{ - int yylno = yyrline[yyrule]; - int yynrhs = yyr2[yyrule]; - int yyi; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, - YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), - &yyvsp[(yyi + 1) - (yynrhs)], - &(yylsp[(yyi + 1) - (yynrhs)]), result, scanner); - YYFPRINTF (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyssp, yyvsp, yylsp, Rule, result, scanner); \ -} while (0) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !HSQL_DEBUG */ -# define YYDPRINTF(Args) ((void) 0) -# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !HSQL_DEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - -/* Context of a parse error. */ -typedef struct -{ - yy_state_t *yyssp; - yysymbol_kind_t yytoken; - YYLTYPE *yylloc; -} yypcontext_t; - -/* Put in YYARG at most YYARGN of the expected tokens given the - current YYCTX, and return the number of tokens stored in YYARG. If - YYARG is null, return the number of expected tokens (guaranteed to - be less than YYNTOKENS). Return YYENOMEM on memory exhaustion. - Return 0 if there are more than YYARGN expected tokens, yet fill - YYARG up to YYARGN. */ -static int -yypcontext_expected_tokens (const yypcontext_t *yyctx, - yysymbol_kind_t yyarg[], int yyargn) -{ - /* Actual size of YYARG. */ - int yycount = 0; - int yyn = yypact[+*yyctx->yyssp]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (!yyarg) - ++yycount; - else if (yycount == yyargn) - return 0; - else - yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx); - } - } - if (yyarg && yycount == 0 && 0 < yyargn) - yyarg[0] = YYSYMBOL_YYEMPTY; - return yycount; -} - - - - -#ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) -# else -/* Return the length of YYSTR. */ -static YYPTRDIFF_T -yystrlen (const char *yystr) -{ - YYPTRDIFF_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -#endif - -#ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -static char * -yystpcpy (char *yydest, const char *yysrc) -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -#endif - -#ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYPTRDIFF_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYPTRDIFF_T yyn = 0; - char const *yyp = yystr; - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - else - goto append; - - append: - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (yyres) - return yystpcpy (yyres, yystr) - yyres; - else - return yystrlen (yystr); -} -#endif - - -static int -yy_syntax_error_arguments (const yypcontext_t *yyctx, - yysymbol_kind_t yyarg[], int yyargn) -{ - /* Actual size of YYARG. */ - int yycount = 0; - /* There are many possibilities here to consider: - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yyctx->yytoken != YYSYMBOL_YYEMPTY) - { - int yyn; - if (yyarg) - yyarg[yycount] = yyctx->yytoken; - ++yycount; - yyn = yypcontext_expected_tokens (yyctx, - yyarg ? yyarg + 1 : yyarg, yyargn - 1); - if (yyn == YYENOMEM) - return YYENOMEM; - else - yycount += yyn; - } - return yycount; -} - -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, - const yypcontext_t *yyctx) -{ - enum { YYARGS_MAX = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULLPTR; - /* Arguments of yyformat: reported tokens (one for the "unexpected", - one per "expected"). */ - yysymbol_kind_t yyarg[YYARGS_MAX]; - /* Cumulated lengths of YYARG. */ - YYPTRDIFF_T yysize = 0; - - /* Actual size of YYARG. */ - int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX); - if (yycount == YYENOMEM) - return YYENOMEM; - - switch (yycount) - { -#define YYCASE_(N, S) \ - 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")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -#undef YYCASE_ - } - - /* Compute error message size. Don't count the "%s"s, but reserve - room for the terminator. */ - yysize = yystrlen (yyformat) - 2 * yycount + 1; - { - int yyi; - for (yyi = 0; yyi < yycount; ++yyi) - { - YYPTRDIFF_T yysize1 - = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return YYENOMEM; - } - } - - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return -1; - } - - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]); - yyformat += 2; - } - else - { - ++yyp; - ++yyformat; - } - } - return 0; -} - - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -static void -yydestruct (const char *yymsg, - yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, hsql::SQLParserResult* result, yyscan_t scanner) -{ - YY_USE (yyvaluep); - YY_USE (yylocationp); - YY_USE (result); - YY_USE (scanner); - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); - - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - switch (yykind) - { - case YYSYMBOL_IDENTIFIER: /* IDENTIFIER */ -#line 149 "bison_parser.y" - { free( (((*yyvaluep).sval)) ); } -#line 1914 "bison_parser.cpp" - break; - - case YYSYMBOL_STRING: /* STRING */ -#line 149 "bison_parser.y" - { free( (((*yyvaluep).sval)) ); } -#line 1920 "bison_parser.cpp" - break; - - case YYSYMBOL_FLOATVAL: /* FLOATVAL */ -#line 147 "bison_parser.y" - { } -#line 1926 "bison_parser.cpp" - break; - - case YYSYMBOL_INTVAL: /* INTVAL */ -#line 147 "bison_parser.y" - { } -#line 1932 "bison_parser.cpp" - break; - - case YYSYMBOL_statement_list: /* statement_list */ -#line 150 "bison_parser.y" - { - if ((((*yyvaluep).stmt_vec)) != nullptr) { - for (auto ptr : *(((*yyvaluep).stmt_vec))) { - delete ptr; - } - } - delete (((*yyvaluep).stmt_vec)); -} -#line 1945 "bison_parser.cpp" - break; - - case YYSYMBOL_statement: /* statement */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).statement)); } -#line 1951 "bison_parser.cpp" - break; - - case YYSYMBOL_preparable_statement: /* preparable_statement */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).statement)); } -#line 1957 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_hints: /* opt_hints */ -#line 150 "bison_parser.y" - { - if ((((*yyvaluep).expr_vec)) != nullptr) { - for (auto ptr : *(((*yyvaluep).expr_vec))) { - delete ptr; - } - } - delete (((*yyvaluep).expr_vec)); -} -#line 1970 "bison_parser.cpp" - break; - - case YYSYMBOL_hint_list: /* hint_list */ -#line 150 "bison_parser.y" - { - if ((((*yyvaluep).expr_vec)) != nullptr) { - for (auto ptr : *(((*yyvaluep).expr_vec))) { - delete ptr; - } - } - delete (((*yyvaluep).expr_vec)); -} -#line 1983 "bison_parser.cpp" - break; - - case YYSYMBOL_hint: /* hint */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 1989 "bison_parser.cpp" - break; - - case YYSYMBOL_transaction_statement: /* transaction_statement */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).transaction_stmt)); } -#line 1995 "bison_parser.cpp" - break; - - case YYSYMBOL_prepare_statement: /* prepare_statement */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).prep_stmt)); } -#line 2001 "bison_parser.cpp" - break; - - case YYSYMBOL_prepare_target_query: /* prepare_target_query */ -#line 149 "bison_parser.y" - { free( (((*yyvaluep).sval)) ); } -#line 2007 "bison_parser.cpp" - break; - - case YYSYMBOL_execute_statement: /* execute_statement */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).exec_stmt)); } -#line 2013 "bison_parser.cpp" - break; - - case YYSYMBOL_import_statement: /* import_statement */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).import_stmt)); } -#line 2019 "bison_parser.cpp" - break; - - case YYSYMBOL_file_type: /* file_type */ -#line 147 "bison_parser.y" - { } -#line 2025 "bison_parser.cpp" - break; - - case YYSYMBOL_file_path: /* file_path */ -#line 149 "bison_parser.y" - { free( (((*yyvaluep).sval)) ); } -#line 2031 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_file_type: /* opt_file_type */ -#line 147 "bison_parser.y" - { } -#line 2037 "bison_parser.cpp" - break; - - case YYSYMBOL_export_statement: /* export_statement */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).export_stmt)); } -#line 2043 "bison_parser.cpp" - break; - - case YYSYMBOL_show_statement: /* show_statement */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).show_stmt)); } -#line 2049 "bison_parser.cpp" - break; - - case YYSYMBOL_create_statement: /* create_statement */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).create_stmt)); } -#line 2055 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_not_exists: /* opt_not_exists */ -#line 147 "bison_parser.y" - { } -#line 2061 "bison_parser.cpp" - break; - - case YYSYMBOL_column_def_commalist: /* column_def_commalist */ -#line 150 "bison_parser.y" - { - if ((((*yyvaluep).column_vec)) != nullptr) { - for (auto ptr : *(((*yyvaluep).column_vec))) { - delete ptr; - } - } - delete (((*yyvaluep).column_vec)); -} -#line 2074 "bison_parser.cpp" - break; - - case YYSYMBOL_column_def: /* column_def */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).column_t)); } -#line 2080 "bison_parser.cpp" - break; - - case YYSYMBOL_column_type: /* column_type */ -#line 147 "bison_parser.y" - { } -#line 2086 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_column_nullable: /* opt_column_nullable */ -#line 147 "bison_parser.y" - { } -#line 2092 "bison_parser.cpp" - break; - - case YYSYMBOL_drop_statement: /* drop_statement */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).drop_stmt)); } -#line 2098 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_exists: /* opt_exists */ -#line 147 "bison_parser.y" - { } -#line 2104 "bison_parser.cpp" - break; - - case YYSYMBOL_delete_statement: /* delete_statement */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).delete_stmt)); } -#line 2110 "bison_parser.cpp" - break; - - case YYSYMBOL_truncate_statement: /* truncate_statement */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).delete_stmt)); } -#line 2116 "bison_parser.cpp" - break; - - case YYSYMBOL_insert_statement: /* insert_statement */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).insert_stmt)); } -#line 2122 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_column_list: /* opt_column_list */ -#line 150 "bison_parser.y" - { - if ((((*yyvaluep).str_vec)) != nullptr) { - for (auto ptr : *(((*yyvaluep).str_vec))) { - delete ptr; - } - } - delete (((*yyvaluep).str_vec)); -} -#line 2135 "bison_parser.cpp" - break; - - case YYSYMBOL_update_statement: /* update_statement */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).update_stmt)); } -#line 2141 "bison_parser.cpp" - break; - - case YYSYMBOL_update_clause_commalist: /* update_clause_commalist */ -#line 150 "bison_parser.y" - { - if ((((*yyvaluep).update_vec)) != nullptr) { - for (auto ptr : *(((*yyvaluep).update_vec))) { - delete ptr; - } - } - delete (((*yyvaluep).update_vec)); -} -#line 2154 "bison_parser.cpp" - break; - - case YYSYMBOL_update_clause: /* update_clause */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).update_t)); } -#line 2160 "bison_parser.cpp" - break; - - case YYSYMBOL_select_statement: /* select_statement */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).select_stmt)); } -#line 2166 "bison_parser.cpp" - break; - - case YYSYMBOL_select_within_set_operation: /* select_within_set_operation */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).select_stmt)); } -#line 2172 "bison_parser.cpp" - break; - - case YYSYMBOL_select_within_set_operation_no_parentheses: /* select_within_set_operation_no_parentheses */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).select_stmt)); } -#line 2178 "bison_parser.cpp" - break; - - case YYSYMBOL_select_with_paren: /* select_with_paren */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).select_stmt)); } -#line 2184 "bison_parser.cpp" - break; - - case YYSYMBOL_select_no_paren: /* select_no_paren */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).select_stmt)); } -#line 2190 "bison_parser.cpp" - break; - - case YYSYMBOL_set_operator: /* set_operator */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).set_operator_t)); } -#line 2196 "bison_parser.cpp" - break; - - case YYSYMBOL_set_type: /* set_type */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).set_operator_t)); } -#line 2202 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_all: /* opt_all */ -#line 147 "bison_parser.y" - { } -#line 2208 "bison_parser.cpp" - break; - - case YYSYMBOL_select_clause: /* select_clause */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).select_stmt)); } -#line 2214 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_distinct: /* opt_distinct */ -#line 147 "bison_parser.y" - { } -#line 2220 "bison_parser.cpp" - break; - - case YYSYMBOL_select_list: /* select_list */ -#line 150 "bison_parser.y" - { - if ((((*yyvaluep).expr_vec)) != nullptr) { - for (auto ptr : *(((*yyvaluep).expr_vec))) { - delete ptr; - } - } - delete (((*yyvaluep).expr_vec)); -} -#line 2233 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_from_clause: /* opt_from_clause */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).table)); } -#line 2239 "bison_parser.cpp" - break; - - case YYSYMBOL_from_clause: /* from_clause */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).table)); } -#line 2245 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_where: /* opt_where */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2251 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_group: /* opt_group */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).group_t)); } -#line 2257 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_having: /* opt_having */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2263 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_order: /* opt_order */ -#line 150 "bison_parser.y" - { - if ((((*yyvaluep).order_vec)) != nullptr) { - for (auto ptr : *(((*yyvaluep).order_vec))) { - delete ptr; - } - } - delete (((*yyvaluep).order_vec)); -} -#line 2276 "bison_parser.cpp" - break; - - case YYSYMBOL_order_list: /* order_list */ -#line 150 "bison_parser.y" - { - if ((((*yyvaluep).order_vec)) != nullptr) { - for (auto ptr : *(((*yyvaluep).order_vec))) { - delete ptr; - } - } - delete (((*yyvaluep).order_vec)); -} -#line 2289 "bison_parser.cpp" - break; - - case YYSYMBOL_order_desc: /* order_desc */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).order)); } -#line 2295 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_order_type: /* opt_order_type */ -#line 147 "bison_parser.y" - { } -#line 2301 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_top: /* opt_top */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).limit)); } -#line 2307 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_limit: /* opt_limit */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).limit)); } -#line 2313 "bison_parser.cpp" - break; - - case YYSYMBOL_expr_list: /* expr_list */ -#line 150 "bison_parser.y" - { - if ((((*yyvaluep).expr_vec)) != nullptr) { - for (auto ptr : *(((*yyvaluep).expr_vec))) { - delete ptr; - } - } - delete (((*yyvaluep).expr_vec)); -} -#line 2326 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_literal_list: /* opt_literal_list */ -#line 150 "bison_parser.y" - { - if ((((*yyvaluep).expr_vec)) != nullptr) { - for (auto ptr : *(((*yyvaluep).expr_vec))) { - delete ptr; - } - } - delete (((*yyvaluep).expr_vec)); -} -#line 2339 "bison_parser.cpp" - break; - - case YYSYMBOL_literal_list: /* literal_list */ -#line 150 "bison_parser.y" - { - if ((((*yyvaluep).expr_vec)) != nullptr) { - for (auto ptr : *(((*yyvaluep).expr_vec))) { - delete ptr; - } - } - delete (((*yyvaluep).expr_vec)); -} -#line 2352 "bison_parser.cpp" - break; - - case YYSYMBOL_expr_alias: /* expr_alias */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2358 "bison_parser.cpp" - break; - - case YYSYMBOL_expr: /* expr */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2364 "bison_parser.cpp" - break; - - case YYSYMBOL_operand: /* operand */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2370 "bison_parser.cpp" - break; - - case YYSYMBOL_scalar_expr: /* scalar_expr */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2376 "bison_parser.cpp" - break; - - case YYSYMBOL_unary_expr: /* unary_expr */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2382 "bison_parser.cpp" - break; - - case YYSYMBOL_binary_expr: /* binary_expr */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2388 "bison_parser.cpp" - break; - - case YYSYMBOL_logic_expr: /* logic_expr */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2394 "bison_parser.cpp" - break; - - case YYSYMBOL_in_expr: /* in_expr */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2400 "bison_parser.cpp" - break; - - case YYSYMBOL_case_expr: /* case_expr */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2406 "bison_parser.cpp" - break; - - case YYSYMBOL_case_list: /* case_list */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2412 "bison_parser.cpp" - break; - - case YYSYMBOL_exists_expr: /* exists_expr */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2418 "bison_parser.cpp" - break; - - case YYSYMBOL_comp_expr: /* comp_expr */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2424 "bison_parser.cpp" - break; - - case YYSYMBOL_function_expr: /* function_expr */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2430 "bison_parser.cpp" - break; - - case YYSYMBOL_extract_expr: /* extract_expr */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2436 "bison_parser.cpp" - break; - - case YYSYMBOL_cast_expr: /* cast_expr */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2442 "bison_parser.cpp" - break; - - case YYSYMBOL_datetime_field: /* datetime_field */ -#line 147 "bison_parser.y" - { } -#line 2448 "bison_parser.cpp" - break; - - case YYSYMBOL_array_expr: /* array_expr */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2454 "bison_parser.cpp" - break; - - case YYSYMBOL_array_index: /* array_index */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2460 "bison_parser.cpp" - break; - - case YYSYMBOL_between_expr: /* between_expr */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2466 "bison_parser.cpp" - break; - - case YYSYMBOL_column_name: /* column_name */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2472 "bison_parser.cpp" - break; - - case YYSYMBOL_literal: /* literal */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2478 "bison_parser.cpp" - break; - - case YYSYMBOL_string_literal: /* string_literal */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2484 "bison_parser.cpp" - break; - - case YYSYMBOL_bool_literal: /* bool_literal */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2490 "bison_parser.cpp" - break; - - case YYSYMBOL_num_literal: /* num_literal */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2496 "bison_parser.cpp" - break; - - case YYSYMBOL_int_literal: /* int_literal */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2502 "bison_parser.cpp" - break; - - case YYSYMBOL_null_literal: /* null_literal */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2508 "bison_parser.cpp" - break; - - case YYSYMBOL_date_literal: /* date_literal */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2514 "bison_parser.cpp" - break; - - case YYSYMBOL_param_expr: /* param_expr */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2520 "bison_parser.cpp" - break; - - case YYSYMBOL_table_ref: /* table_ref */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).table)); } -#line 2526 "bison_parser.cpp" - break; - - case YYSYMBOL_table_ref_atomic: /* table_ref_atomic */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).table)); } -#line 2532 "bison_parser.cpp" - break; - - case YYSYMBOL_nonjoin_table_ref_atomic: /* nonjoin_table_ref_atomic */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).table)); } -#line 2538 "bison_parser.cpp" - break; - - case YYSYMBOL_table_ref_commalist: /* table_ref_commalist */ -#line 150 "bison_parser.y" - { - if ((((*yyvaluep).table_vec)) != nullptr) { - for (auto ptr : *(((*yyvaluep).table_vec))) { - delete ptr; - } - } - delete (((*yyvaluep).table_vec)); -} -#line 2551 "bison_parser.cpp" - break; - - case YYSYMBOL_table_ref_name: /* table_ref_name */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).table)); } -#line 2557 "bison_parser.cpp" - break; - - case YYSYMBOL_table_ref_name_no_alias: /* table_ref_name_no_alias */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).table)); } -#line 2563 "bison_parser.cpp" - break; - - case YYSYMBOL_table_name: /* table_name */ -#line 148 "bison_parser.y" - { free( (((*yyvaluep).table_name).name) ); free( (((*yyvaluep).table_name).schema) ); } -#line 2569 "bison_parser.cpp" - break; - - case YYSYMBOL_table_alias: /* table_alias */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).alias_t)); } -#line 2575 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_table_alias: /* opt_table_alias */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).alias_t)); } -#line 2581 "bison_parser.cpp" - break; - - case YYSYMBOL_alias: /* alias */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).alias_t)); } -#line 2587 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_alias: /* opt_alias */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).alias_t)); } -#line 2593 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_with_clause: /* opt_with_clause */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).with_description_vec)); } -#line 2599 "bison_parser.cpp" - break; - - case YYSYMBOL_with_clause: /* with_clause */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).with_description_vec)); } -#line 2605 "bison_parser.cpp" - break; - - case YYSYMBOL_with_description_list: /* with_description_list */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).with_description_vec)); } -#line 2611 "bison_parser.cpp" - break; - - case YYSYMBOL_with_description: /* with_description */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).with_description_t)); } -#line 2617 "bison_parser.cpp" - break; - - case YYSYMBOL_join_clause: /* join_clause */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).table)); } -#line 2623 "bison_parser.cpp" - break; - - case YYSYMBOL_opt_join_type: /* opt_join_type */ -#line 147 "bison_parser.y" - { } -#line 2629 "bison_parser.cpp" - break; - - case YYSYMBOL_join_condition: /* join_condition */ -#line 158 "bison_parser.y" - { delete (((*yyvaluep).expr)); } -#line 2635 "bison_parser.cpp" - break; - - case YYSYMBOL_ident_commalist: /* ident_commalist */ -#line 150 "bison_parser.y" - { - if ((((*yyvaluep).str_vec)) != nullptr) { - for (auto ptr : *(((*yyvaluep).str_vec))) { - delete ptr; - } - } - delete (((*yyvaluep).str_vec)); -} -#line 2648 "bison_parser.cpp" - break; - - default: - break; - } - YY_IGNORE_MAYBE_UNINITIALIZED_END -} - - - - - - -/*----------. -| yyparse. | -`----------*/ - -int -yyparse (hsql::SQLParserResult* result, yyscan_t scanner) -{ -/* Lookahead token kind. */ -int yychar; - - -/* The semantic value of the lookahead symbol. */ -/* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ -YY_INITIAL_VALUE (static YYSTYPE yyval_default;) -YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); - -/* Location data for the lookahead symbol. */ -static YYLTYPE yyloc_default -# if defined HSQL_LTYPE_IS_TRIVIAL && HSQL_LTYPE_IS_TRIVIAL - = { 1, 1, 1, 1 } -# endif -; -YYLTYPE yylloc = yyloc_default; - - /* Number of syntax errors so far. */ - int yynerrs = 0; - - yy_state_fast_t yystate = 0; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus = 0; - - /* Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* Their size. */ - YYPTRDIFF_T yystacksize = YYINITDEPTH; - - /* The state stack: array, bottom, top. */ - yy_state_t yyssa[YYINITDEPTH]; - yy_state_t *yyss = yyssa; - yy_state_t *yyssp = yyss; - - /* The semantic value stack: array, bottom, top. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp = yyvs; - - /* The location stack: array, bottom, top. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp = yyls; - - int yyn; - /* The return value of yyparse. */ - int yyresult; - /* Lookahead symbol kind. */ - yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - YYLTYPE yyloc; - - /* The locations where the error started and ended. */ - YYLTYPE yyerror_range[3]; - - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yychar = SQL_HSQL_EMPTY; /* Cause a token to be read. */ - -/* User initialization code. */ -#line 73 "bison_parser.y" -{ - // Initialize - yylloc.first_column = 0; - yylloc.last_column = 0; - yylloc.first_line = 0; - yylloc.last_line = 0; - yylloc.total_column = 0; - yylloc.string_length = 0; -} - -#line 2755 "bison_parser.cpp" - - yylsp[0] = yylloc; - goto yysetstate; - - -/*------------------------------------------------------------. -| yynewstate -- push a new state, which is found in yystate. | -`------------------------------------------------------------*/ -yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - - -/*--------------------------------------------------------------------. -| yysetstate -- set current state (the top of the stack) to yystate. | -`--------------------------------------------------------------------*/ -yysetstate: - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - YY_ASSERT (0 <= yystate && yystate < YYNSTATES); - YY_IGNORE_USELESS_CAST_BEGIN - *yyssp = YY_CAST (yy_state_t, yystate); - YY_IGNORE_USELESS_CAST_END - YY_STACK_PRINT (yyss, yyssp); - - 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. */ - YYPTRDIFF_T yysize = yyssp - yyss + 1; - -# 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 - memory. */ - yy_state_t *yyss1 = yyss; - YYSTYPE *yyvs1 = yyvs; - YYLTYPE *yyls1 = yyls; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * YYSIZEOF (*yyssp), - &yyvs1, yysize * YYSIZEOF (*yyvsp), - &yyls1, yysize * YYSIZEOF (*yylsp), - &yystacksize); - yyss = yyss1; - yyvs = yyvs1; - yyls = yyls1; - } -# else /* defined YYSTACK_RELOCATE */ - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yy_state_t *yyss1 = yyss; - union yyalloc *yyptr = - YY_CAST (union yyalloc *, - YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); - YYSTACK_RELOCATE (yyls_alloc, yyls); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - yylsp = yyls + yysize - 1; - - YY_IGNORE_USELESS_CAST_BEGIN - YYDPRINTF ((stderr, "Stack size increased to %ld\n", - YY_CAST (long, yystacksize))); - YY_IGNORE_USELESS_CAST_END - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } -#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ - - if (yystate == YYFINAL) - YYACCEPT; - - goto yybackup; - - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ - if (yychar == SQL_HSQL_EMPTY) - { - YYDPRINTF ((stderr, "Reading a token\n")); - yychar = yylex (&yylval, &yylloc, scanner); - } - - if (yychar <= SQL_YYEOF) - { - yychar = SQL_YYEOF; - yytoken = YYSYMBOL_YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else if (yychar == SQL_HSQL_error) - { - /* The scanner already issued an error message, process directly - to error recovery. But do not keep the error token as - lookahead, it is too special and may lead us to an endless - loop in error recovery. */ - yychar = SQL_HSQL_UNDEF; - yytoken = YYSYMBOL_YYerror; - yyerror_range[1] = yylloc; - goto yyerrlab1; - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yytable_value_is_error (yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - yystate = yyn; - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - *++yylsp = yylloc; - - /* Discard the shifted token. */ - yychar = SQL_HSQL_EMPTY; - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - '$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - /* Default location. */ - YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); - yyerror_range[1] = yyloc; - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 2: /* input: statement_list opt_semicolon */ -#line 269 "bison_parser.y" - { - for (SQLStatement* stmt : *(yyvsp[-1].stmt_vec)) { - // Transfers ownership of the statement. - result->addStatement(stmt); - } - - unsigned param_id = 0; - for (void* param : yyloc.param_list) { - if (param != nullptr) { - Expr* expr = (Expr*) param; - expr->ival = param_id; - result->addParameter(expr); - ++param_id; - } - } - delete (yyvsp[-1].stmt_vec); - } -#line 2983 "bison_parser.cpp" - break; - - case 3: /* statement_list: statement */ -#line 290 "bison_parser.y" - { - (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 2994 "bison_parser.cpp" - break; - - case 4: /* statement_list: statement_list ';' statement */ -#line 296 "bison_parser.y" - { - (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 3005 "bison_parser.cpp" - break; - - case 5: /* statement: prepare_statement opt_hints */ -#line 305 "bison_parser.y" - { - (yyval.statement) = (yyvsp[-1].prep_stmt); - (yyval.statement)->hints = (yyvsp[0].expr_vec); - } -#line 3014 "bison_parser.cpp" - break; - - case 6: /* statement: preparable_statement opt_hints */ -#line 309 "bison_parser.y" - { - (yyval.statement) = (yyvsp[-1].statement); - (yyval.statement)->hints = (yyvsp[0].expr_vec); - } -#line 3023 "bison_parser.cpp" - break; - - case 7: /* statement: show_statement */ -#line 313 "bison_parser.y" - { - (yyval.statement) = (yyvsp[0].show_stmt); - } -#line 3031 "bison_parser.cpp" - break; - - case 8: /* statement: import_statement */ -#line 316 "bison_parser.y" - { - (yyval.statement) = (yyvsp[0].import_stmt); - } -#line 3039 "bison_parser.cpp" - break; - - case 9: /* statement: export_statement */ -#line 319 "bison_parser.y" - { - (yyval.statement) = (yyvsp[0].export_stmt); - } -#line 3047 "bison_parser.cpp" - break; - - case 10: /* preparable_statement: select_statement */ -#line 326 "bison_parser.y" - { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 3053 "bison_parser.cpp" - break; - - case 11: /* preparable_statement: create_statement */ -#line 327 "bison_parser.y" - { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 3059 "bison_parser.cpp" - break; - - case 12: /* preparable_statement: insert_statement */ -#line 328 "bison_parser.y" - { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 3065 "bison_parser.cpp" - break; - - case 13: /* preparable_statement: delete_statement */ -#line 329 "bison_parser.y" - { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3071 "bison_parser.cpp" - break; - - case 14: /* preparable_statement: truncate_statement */ -#line 330 "bison_parser.y" - { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3077 "bison_parser.cpp" - break; - - case 15: /* preparable_statement: update_statement */ -#line 331 "bison_parser.y" - { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 3083 "bison_parser.cpp" - break; - - case 16: /* preparable_statement: drop_statement */ -#line 332 "bison_parser.y" - { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 3089 "bison_parser.cpp" - break; - - case 17: /* preparable_statement: execute_statement */ -#line 333 "bison_parser.y" - { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 3095 "bison_parser.cpp" - break; - - case 18: /* preparable_statement: transaction_statement */ -#line 334 "bison_parser.y" - { (yyval.statement) = (yyvsp[0].transaction_stmt); } -#line 3101 "bison_parser.cpp" - break; - - case 19: /* opt_hints: WITH HINT '(' hint_list ')' */ -#line 343 "bison_parser.y" - { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 3107 "bison_parser.cpp" - break; - - case 20: /* opt_hints: %empty */ -#line 344 "bison_parser.y" - { (yyval.expr_vec) = nullptr; } -#line 3113 "bison_parser.cpp" - break; - - case 21: /* hint_list: hint */ -#line 349 "bison_parser.y" - { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3119 "bison_parser.cpp" - break; - - case 22: /* hint_list: hint_list ',' hint */ -#line 350 "bison_parser.y" - { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3125 "bison_parser.cpp" - break; - - case 23: /* hint: IDENTIFIER */ -#line 354 "bison_parser.y" - { - (yyval.expr) = Expr::make(kExprHint); - (yyval.expr)->name = (yyvsp[0].sval); - } -#line 3134 "bison_parser.cpp" - break; - - case 24: /* hint: IDENTIFIER '(' literal_list ')' */ -#line 358 "bison_parser.y" - { - (yyval.expr) = Expr::make(kExprHint); - (yyval.expr)->name = (yyvsp[-3].sval); - (yyval.expr)->exprList = (yyvsp[-1].expr_vec); - } -#line 3144 "bison_parser.cpp" - break; - - case 25: /* transaction_statement: BEGIN opt_transaction_keyword */ -#line 370 "bison_parser.y" - { - (yyval.transaction_stmt) = new TransactionStatement(kBeginTransaction); - } -#line 3152 "bison_parser.cpp" - break; - - case 26: /* transaction_statement: ROLLBACK opt_transaction_keyword */ -#line 373 "bison_parser.y" - { - (yyval.transaction_stmt) = new TransactionStatement(kRollbackTransaction); - } -#line 3160 "bison_parser.cpp" - break; - - case 27: /* transaction_statement: COMMIT opt_transaction_keyword */ -#line 376 "bison_parser.y" - { - (yyval.transaction_stmt) = new TransactionStatement(kCommitTransaction); - } -#line 3168 "bison_parser.cpp" - break; - - case 30: /* prepare_statement: PREPARE IDENTIFIER FROM prepare_target_query */ -#line 390 "bison_parser.y" - { - (yyval.prep_stmt) = new PrepareStatement(); - (yyval.prep_stmt)->name = (yyvsp[-2].sval); - (yyval.prep_stmt)->query = (yyvsp[0].sval); - } -#line 3178 "bison_parser.cpp" - break; - - case 32: /* execute_statement: EXECUTE IDENTIFIER */ -#line 400 "bison_parser.y" - { - (yyval.exec_stmt) = new ExecuteStatement(); - (yyval.exec_stmt)->name = (yyvsp[0].sval); - } -#line 3187 "bison_parser.cpp" - break; - - case 33: /* execute_statement: EXECUTE IDENTIFIER '(' opt_literal_list ')' */ -#line 404 "bison_parser.y" - { - (yyval.exec_stmt) = new ExecuteStatement(); - (yyval.exec_stmt)->name = (yyvsp[-3].sval); - (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); - } -#line 3197 "bison_parser.cpp" - break; - - case 34: /* import_statement: IMPORT FROM file_type FILE file_path INTO table_name */ -#line 418 "bison_parser.y" - { - (yyval.import_stmt) = new ImportStatement((yyvsp[-4].import_type_t)); - (yyval.import_stmt)->filePath = (yyvsp[-2].sval); - (yyval.import_stmt)->schema = (yyvsp[0].table_name).schema; - (yyval.import_stmt)->tableName = (yyvsp[0].table_name).name; - } -#line 3208 "bison_parser.cpp" - break; - - case 35: /* import_statement: COPY table_name FROM file_path opt_file_type */ -#line 424 "bison_parser.y" - { - (yyval.import_stmt) = new ImportStatement((yyvsp[0].import_type_t)); - (yyval.import_stmt)->filePath = (yyvsp[-1].sval); - (yyval.import_stmt)->schema = (yyvsp[-3].table_name).schema; - (yyval.import_stmt)->tableName = (yyvsp[-3].table_name).name; - } -#line 3219 "bison_parser.cpp" - break; - - case 36: /* file_type: IDENTIFIER */ -#line 433 "bison_parser.y" - { - if (strcasecmp((yyvsp[0].sval), "csv") == 0) { - (yyval.import_type_t) = kImportCSV; - } else if (strcasecmp((yyvsp[0].sval), "tbl") == 0) { - (yyval.import_type_t) = kImportTbl; - } else if (strcasecmp((yyvsp[0].sval), "binary") == 0 || strcasecmp((yyvsp[0].sval), "bin") == 0) { - (yyval.import_type_t) = kImportBinary; - } else { - free((yyvsp[0].sval)); - yyerror(&yyloc, result, scanner, "File type is unknown."); - YYERROR; - } - free((yyvsp[0].sval)); - } -#line 3238 "bison_parser.cpp" - break; - - case 37: /* file_path: string_literal */ -#line 450 "bison_parser.y" - { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 3244 "bison_parser.cpp" - break; - - case 38: /* opt_file_type: WITH FORMAT file_type */ -#line 454 "bison_parser.y" - { - (yyval.import_type_t) = (yyvsp[0].import_type_t); - } -#line 3252 "bison_parser.cpp" - break; - - case 39: /* opt_file_type: %empty */ -#line 457 "bison_parser.y" - { (yyval.import_type_t) = kImportAuto; } -#line 3258 "bison_parser.cpp" - break; - - case 40: /* export_statement: COPY table_name TO file_path opt_file_type */ -#line 466 "bison_parser.y" - { - (yyval.export_stmt) = new ExportStatement((yyvsp[0].import_type_t)); - (yyval.export_stmt)->filePath = (yyvsp[-1].sval); - (yyval.export_stmt)->schema = (yyvsp[-3].table_name).schema; - (yyval.export_stmt)->tableName = (yyvsp[-3].table_name).name; - } -#line 3269 "bison_parser.cpp" - break; - - case 41: /* show_statement: SHOW TABLES */ -#line 480 "bison_parser.y" - { - (yyval.show_stmt) = new ShowStatement(kShowTables); - } -#line 3277 "bison_parser.cpp" - break; - - case 42: /* show_statement: SHOW COLUMNS table_name */ -#line 483 "bison_parser.y" - { - (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 3287 "bison_parser.cpp" - break; - - case 43: /* show_statement: DESCRIBE table_name */ -#line 488 "bison_parser.y" - { - (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 3297 "bison_parser.cpp" - break; - - case 44: /* create_statement: CREATE TABLE opt_not_exists table_name FROM IDENTIFIER FILE file_path */ -#line 502 "bison_parser.y" - { - (yyval.create_stmt) = new CreateStatement(kCreateTableFromTbl); - (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); - (yyval.create_stmt)->schema = (yyvsp[-4].table_name).schema; - (yyval.create_stmt)->tableName = (yyvsp[-4].table_name).name; - if (strcasecmp((yyvsp[-2].sval), "tbl") != 0) { - free((yyvsp[-2].sval)); - yyerror(&yyloc, result, scanner, "File type is unknown."); - YYERROR; - } - free((yyvsp[-2].sval)); - (yyval.create_stmt)->filePath = (yyvsp[0].sval); - } -#line 3315 "bison_parser.cpp" - break; - - case 45: /* create_statement: CREATE TABLE opt_not_exists table_name '(' column_def_commalist ')' */ -#line 515 "bison_parser.y" - { - (yyval.create_stmt) = new CreateStatement(kCreateTable); - (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); - (yyval.create_stmt)->schema = (yyvsp[-3].table_name).schema; - (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; - (yyval.create_stmt)->columns = (yyvsp[-1].column_vec); - } -#line 3327 "bison_parser.cpp" - break; - - case 46: /* create_statement: CREATE TABLE opt_not_exists table_name AS select_statement */ -#line 522 "bison_parser.y" - { - (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 3339 "bison_parser.cpp" - break; - - case 47: /* create_statement: CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement */ -#line 529 "bison_parser.y" - { - (yyval.create_stmt) = new CreateStatement(kCreateView); - (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); - (yyval.create_stmt)->schema = (yyvsp[-3].table_name).schema; - (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; - (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); - (yyval.create_stmt)->select = (yyvsp[0].select_stmt); - } -#line 3352 "bison_parser.cpp" - break; - - case 48: /* opt_not_exists: IF NOT EXISTS */ -#line 540 "bison_parser.y" - { (yyval.bval) = true; } -#line 3358 "bison_parser.cpp" - break; - - case 49: /* opt_not_exists: %empty */ -#line 541 "bison_parser.y" - { (yyval.bval) = false; } -#line 3364 "bison_parser.cpp" - break; - - case 50: /* column_def_commalist: column_def */ -#line 545 "bison_parser.y" - { (yyval.column_vec) = new std::vector(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); } -#line 3370 "bison_parser.cpp" - break; - - case 51: /* column_def_commalist: column_def_commalist ',' column_def */ -#line 546 "bison_parser.y" - { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } -#line 3376 "bison_parser.cpp" - break; - - case 52: /* column_def: IDENTIFIER column_type opt_column_nullable */ -#line 550 "bison_parser.y" - { - (yyval.column_t) = new ColumnDefinition((yyvsp[-2].sval), (yyvsp[-1].column_type_t), (yyvsp[0].bval)); - } -#line 3384 "bison_parser.cpp" - break; - - case 53: /* column_type: INT */ -#line 556 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3390 "bison_parser.cpp" - break; - - case 54: /* column_type: INTEGER */ -#line 557 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3396 "bison_parser.cpp" - break; - - case 55: /* column_type: LONG */ -#line 558 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::LONG}; } -#line 3402 "bison_parser.cpp" - break; - - case 56: /* column_type: FLOAT */ -#line 559 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3408 "bison_parser.cpp" - break; - - case 57: /* column_type: DOUBLE */ -#line 560 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } -#line 3414 "bison_parser.cpp" - break; - - case 58: /* column_type: VARCHAR '(' INTVAL ')' */ -#line 561 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3420 "bison_parser.cpp" - break; - - case 59: /* column_type: CHAR '(' INTVAL ')' */ -#line 562 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } -#line 3426 "bison_parser.cpp" - break; - - case 60: /* column_type: TEXT */ -#line 563 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } -#line 3432 "bison_parser.cpp" - break; - - case 61: /* column_type: DATETIME */ -#line 564 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } -#line 3438 "bison_parser.cpp" - break; - - case 62: /* column_type: DATE */ -#line 565 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::DATE}; } -#line 3444 "bison_parser.cpp" - break; - - case 63: /* opt_column_nullable: NULL */ -#line 569 "bison_parser.y" - { (yyval.bval) = true; } -#line 3450 "bison_parser.cpp" - break; - - case 64: /* opt_column_nullable: NOT NULL */ -#line 570 "bison_parser.y" - { (yyval.bval) = false; } -#line 3456 "bison_parser.cpp" - break; - - case 65: /* opt_column_nullable: %empty */ -#line 571 "bison_parser.y" - { (yyval.bval) = false; } -#line 3462 "bison_parser.cpp" - break; - - case 66: /* drop_statement: DROP TABLE opt_exists table_name */ -#line 581 "bison_parser.y" - { - (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 3473 "bison_parser.cpp" - break; - - case 67: /* drop_statement: DROP VIEW opt_exists table_name */ -#line 587 "bison_parser.y" - { - (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 3484 "bison_parser.cpp" - break; - - case 68: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ -#line 593 "bison_parser.y" - { - (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); - (yyval.drop_stmt)->ifExists = false; - (yyval.drop_stmt)->name = (yyvsp[0].sval); - } -#line 3494 "bison_parser.cpp" - break; - - case 69: /* opt_exists: IF EXISTS */ -#line 601 "bison_parser.y" - { (yyval.bval) = true; } -#line 3500 "bison_parser.cpp" - break; - - case 70: /* opt_exists: %empty */ -#line 602 "bison_parser.y" - { (yyval.bval) = false; } -#line 3506 "bison_parser.cpp" - break; - - case 71: /* delete_statement: DELETE FROM table_name opt_where */ -#line 611 "bison_parser.y" - { - (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 3517 "bison_parser.cpp" - break; - - case 72: /* truncate_statement: TRUNCATE table_name */ -#line 620 "bison_parser.y" - { - (yyval.delete_stmt) = new DeleteStatement(); - (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; - (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; - } -#line 3527 "bison_parser.cpp" - break; - - case 73: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ -#line 633 "bison_parser.y" - { - (yyval.insert_stmt) = new InsertStatement(kInsertValues); - (yyval.insert_stmt)->schema = (yyvsp[-5].table_name).schema; - (yyval.insert_stmt)->tableName = (yyvsp[-5].table_name).name; - (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); - (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); - } -#line 3539 "bison_parser.cpp" - break; - - case 74: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ -#line 640 "bison_parser.y" - { - (yyval.insert_stmt) = new InsertStatement(kInsertSelect); - (yyval.insert_stmt)->schema = (yyvsp[-2].table_name).schema; - (yyval.insert_stmt)->tableName = (yyvsp[-2].table_name).name; - (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); - (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); - } -#line 3551 "bison_parser.cpp" - break; - - case 75: /* opt_column_list: '(' ident_commalist ')' */ -#line 651 "bison_parser.y" - { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 3557 "bison_parser.cpp" - break; - - case 76: /* opt_column_list: %empty */ -#line 652 "bison_parser.y" - { (yyval.str_vec) = nullptr; } -#line 3563 "bison_parser.cpp" - break; - - case 77: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ -#line 662 "bison_parser.y" - { - (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 3574 "bison_parser.cpp" - break; - - case 78: /* update_clause_commalist: update_clause */ -#line 671 "bison_parser.y" - { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 3580 "bison_parser.cpp" - break; - - case 79: /* update_clause_commalist: update_clause_commalist ',' update_clause */ -#line 672 "bison_parser.y" - { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 3586 "bison_parser.cpp" - break; - - case 80: /* update_clause: IDENTIFIER '=' expr */ -#line 676 "bison_parser.y" - { - (yyval.update_t) = new UpdateClause(); - (yyval.update_t)->column = (yyvsp[-2].sval); - (yyval.update_t)->value = (yyvsp[0].expr); - } -#line 3596 "bison_parser.cpp" - break; - - case 81: /* select_statement: opt_with_clause select_with_paren */ -#line 688 "bison_parser.y" - { - (yyval.select_stmt) = (yyvsp[0].select_stmt); - (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); - } -#line 3605 "bison_parser.cpp" - break; - - case 82: /* select_statement: opt_with_clause select_no_paren */ -#line 692 "bison_parser.y" - { - (yyval.select_stmt) = (yyvsp[0].select_stmt); - (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); - } -#line 3614 "bison_parser.cpp" - break; - - case 83: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ -#line 696 "bison_parser.y" - { - (yyval.select_stmt) = (yyvsp[-4].select_stmt); - if ((yyval.select_stmt)->setOperations == nullptr) { - (yyval.select_stmt)->setOperations = new std::vector(); - } - (yyval.select_stmt)->setOperations->push_back((yyvsp[-3].set_operator_t)); - (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[-2].select_stmt); - (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); - (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); - (yyval.select_stmt)->withDescriptions = (yyvsp[-5].with_description_vec); - } -#line 3630 "bison_parser.cpp" - break; - - case 86: /* select_within_set_operation_no_parentheses: select_clause */ -#line 714 "bison_parser.y" - { (yyval.select_stmt) = (yyvsp[0].select_stmt); } -#line 3636 "bison_parser.cpp" - break; - - case 87: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ -#line 715 "bison_parser.y" - { - (yyval.select_stmt) = (yyvsp[-2].select_stmt); - if ((yyval.select_stmt)->setOperations == nullptr) { - (yyval.select_stmt)->setOperations = new std::vector(); - } - (yyval.select_stmt)->setOperations->push_back((yyvsp[-1].set_operator_t)); - (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[0].select_stmt); - } -#line 3649 "bison_parser.cpp" - break; - - case 88: /* select_with_paren: '(' select_no_paren ')' */ -#line 726 "bison_parser.y" - { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3655 "bison_parser.cpp" - break; - - case 89: /* select_with_paren: '(' select_with_paren ')' */ -#line 727 "bison_parser.y" - { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3661 "bison_parser.cpp" - break; - - case 90: /* select_no_paren: select_clause opt_order opt_limit */ -#line 731 "bison_parser.y" - { - (yyval.select_stmt) = (yyvsp[-2].select_stmt); - (yyval.select_stmt)->order = (yyvsp[-1].order_vec); - - // Limit could have been set by TOP. - if ((yyvsp[0].limit) != nullptr) { - delete (yyval.select_stmt)->limit; - (yyval.select_stmt)->limit = (yyvsp[0].limit); - } - } -#line 3676 "bison_parser.cpp" - break; - - case 91: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ -#line 741 "bison_parser.y" - { - (yyval.select_stmt) = (yyvsp[-4].select_stmt); - if ((yyval.select_stmt)->setOperations == nullptr) { - (yyval.select_stmt)->setOperations = new std::vector(); - } - (yyval.select_stmt)->setOperations->push_back((yyvsp[-3].set_operator_t)); - (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[-2].select_stmt); - (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); - (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); - } -#line 3691 "bison_parser.cpp" - break; - - case 92: /* set_operator: set_type opt_all */ -#line 754 "bison_parser.y" - { - (yyval.set_operator_t) = (yyvsp[-1].set_operator_t); - (yyval.set_operator_t)->isAll = (yyvsp[0].bval); - } -#line 3700 "bison_parser.cpp" - break; - - case 93: /* set_type: UNION */ -#line 761 "bison_parser.y" - { - (yyval.set_operator_t) = new SetOperation(); - (yyval.set_operator_t)->setType = SetType::kSetUnion; - } -#line 3709 "bison_parser.cpp" - break; - - case 94: /* set_type: INTERSECT */ -#line 765 "bison_parser.y" - { - (yyval.set_operator_t) = new SetOperation(); - (yyval.set_operator_t)->setType = SetType::kSetIntersect; - } -#line 3718 "bison_parser.cpp" - break; - - case 95: /* set_type: EXCEPT */ -#line 769 "bison_parser.y" - { - (yyval.set_operator_t) = new SetOperation(); - (yyval.set_operator_t)->setType = SetType::kSetExcept; - } -#line 3727 "bison_parser.cpp" - break; - - case 96: /* opt_all: ALL */ -#line 776 "bison_parser.y" - { - (yyval.bval) = true; - } -#line 3735 "bison_parser.cpp" - break; - - case 97: /* opt_all: %empty */ -#line 779 "bison_parser.y" - { - (yyval.bval) = false; - } -#line 3743 "bison_parser.cpp" - break; - - case 98: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ -#line 785 "bison_parser.y" - { - (yyval.select_stmt) = new SelectStatement(); - (yyval.select_stmt)->limit = (yyvsp[-5].limit); - (yyval.select_stmt)->selectDistinct = (yyvsp[-4].bval); - (yyval.select_stmt)->selectList = (yyvsp[-3].expr_vec); - (yyval.select_stmt)->fromTable = (yyvsp[-2].table); - (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); - (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); - } -#line 3757 "bison_parser.cpp" - break; - - case 99: /* opt_distinct: DISTINCT */ -#line 797 "bison_parser.y" - { (yyval.bval) = true; } -#line 3763 "bison_parser.cpp" - break; - - case 100: /* opt_distinct: %empty */ -#line 798 "bison_parser.y" - { (yyval.bval) = false; } -#line 3769 "bison_parser.cpp" - break; - - case 102: /* opt_from_clause: from_clause */ -#line 806 "bison_parser.y" - { (yyval.table) = (yyvsp[0].table); } -#line 3775 "bison_parser.cpp" - break; - - case 103: /* opt_from_clause: %empty */ -#line 807 "bison_parser.y" - { (yyval.table) = nullptr; } -#line 3781 "bison_parser.cpp" - break; - - case 104: /* from_clause: FROM table_ref */ -#line 811 "bison_parser.y" - { (yyval.table) = (yyvsp[0].table); } -#line 3787 "bison_parser.cpp" - break; - - case 105: /* opt_where: WHERE expr */ -#line 816 "bison_parser.y" - { (yyval.expr) = (yyvsp[0].expr); } -#line 3793 "bison_parser.cpp" - break; - - case 106: /* opt_where: %empty */ -#line 817 "bison_parser.y" - { (yyval.expr) = nullptr; } -#line 3799 "bison_parser.cpp" - break; - - case 107: /* opt_group: GROUP BY expr_list opt_having */ -#line 821 "bison_parser.y" - { - (yyval.group_t) = new GroupByDescription(); - (yyval.group_t)->columns = (yyvsp[-1].expr_vec); - (yyval.group_t)->having = (yyvsp[0].expr); - } -#line 3809 "bison_parser.cpp" - break; - - case 108: /* opt_group: %empty */ -#line 826 "bison_parser.y" - { (yyval.group_t) = nullptr; } -#line 3815 "bison_parser.cpp" - break; - - case 109: /* opt_having: HAVING expr */ -#line 830 "bison_parser.y" - { (yyval.expr) = (yyvsp[0].expr); } -#line 3821 "bison_parser.cpp" - break; - - case 110: /* opt_having: %empty */ -#line 831 "bison_parser.y" - { (yyval.expr) = nullptr; } -#line 3827 "bison_parser.cpp" - break; - - case 111: /* opt_order: ORDER BY order_list */ -#line 835 "bison_parser.y" - { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 3833 "bison_parser.cpp" - break; - - case 112: /* opt_order: %empty */ -#line 836 "bison_parser.y" - { (yyval.order_vec) = nullptr; } -#line 3839 "bison_parser.cpp" - break; - - case 113: /* order_list: order_desc */ -#line 840 "bison_parser.y" - { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 3845 "bison_parser.cpp" - break; - - case 114: /* order_list: order_list ',' order_desc */ -#line 841 "bison_parser.y" - { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 3851 "bison_parser.cpp" - break; - - case 115: /* order_desc: expr opt_order_type */ -#line 845 "bison_parser.y" - { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 3857 "bison_parser.cpp" - break; - - case 116: /* opt_order_type: ASC */ -#line 849 "bison_parser.y" - { (yyval.order_type) = kOrderAsc; } -#line 3863 "bison_parser.cpp" - break; - - case 117: /* opt_order_type: DESC */ -#line 850 "bison_parser.y" - { (yyval.order_type) = kOrderDesc; } -#line 3869 "bison_parser.cpp" - break; - - case 118: /* opt_order_type: %empty */ -#line 851 "bison_parser.y" - { (yyval.order_type) = kOrderAsc; } -#line 3875 "bison_parser.cpp" - break; - - case 119: /* opt_top: TOP int_literal */ -#line 857 "bison_parser.y" - { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 3881 "bison_parser.cpp" - break; - - case 120: /* opt_top: %empty */ -#line 858 "bison_parser.y" - { (yyval.limit) = nullptr; } -#line 3887 "bison_parser.cpp" - break; - - case 121: /* opt_limit: LIMIT expr */ -#line 862 "bison_parser.y" - { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 3893 "bison_parser.cpp" - break; - - case 122: /* opt_limit: OFFSET expr */ -#line 863 "bison_parser.y" - { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 3899 "bison_parser.cpp" - break; - - case 123: /* opt_limit: LIMIT expr OFFSET expr */ -#line 864 "bison_parser.y" - { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 3905 "bison_parser.cpp" - break; - - case 124: /* opt_limit: LIMIT ALL */ -#line 865 "bison_parser.y" - { (yyval.limit) = new LimitDescription(nullptr, nullptr); } -#line 3911 "bison_parser.cpp" - break; - - case 125: /* opt_limit: LIMIT ALL OFFSET expr */ -#line 866 "bison_parser.y" - { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 3917 "bison_parser.cpp" - break; - - case 126: /* opt_limit: %empty */ -#line 867 "bison_parser.y" - { (yyval.limit) = nullptr; } -#line 3923 "bison_parser.cpp" - break; - - case 127: /* expr_list: expr_alias */ -#line 874 "bison_parser.y" - { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3929 "bison_parser.cpp" - break; - - case 128: /* expr_list: expr_list ',' expr_alias */ -#line 875 "bison_parser.y" - { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3935 "bison_parser.cpp" - break; - - case 129: /* opt_literal_list: literal_list */ -#line 879 "bison_parser.y" - { (yyval.expr_vec) = (yyvsp[0].expr_vec); } -#line 3941 "bison_parser.cpp" - break; - - case 130: /* opt_literal_list: %empty */ -#line 880 "bison_parser.y" - { (yyval.expr_vec) = nullptr; } -#line 3947 "bison_parser.cpp" - break; - - case 131: /* literal_list: literal */ -#line 884 "bison_parser.y" - { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3953 "bison_parser.cpp" - break; - - case 132: /* literal_list: literal_list ',' literal */ -#line 885 "bison_parser.y" - { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3959 "bison_parser.cpp" - break; - - case 133: /* expr_alias: expr opt_alias */ -#line 889 "bison_parser.y" - { - (yyval.expr) = (yyvsp[-1].expr); - if ((yyvsp[0].alias_t)) { - (yyval.expr)->alias = strdup((yyvsp[0].alias_t)->name); - delete (yyvsp[0].alias_t); - } - } -#line 3971 "bison_parser.cpp" - break; - - case 139: /* operand: '(' expr ')' */ -#line 907 "bison_parser.y" - { (yyval.expr) = (yyvsp[-1].expr); } -#line 3977 "bison_parser.cpp" - break; - - case 149: /* operand: '(' select_no_paren ')' */ -#line 917 "bison_parser.y" - { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 3983 "bison_parser.cpp" - break; - - case 152: /* unary_expr: '-' operand */ -#line 926 "bison_parser.y" - { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 3989 "bison_parser.cpp" - break; - - case 153: /* unary_expr: NOT operand */ -#line 927 "bison_parser.y" - { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 3995 "bison_parser.cpp" - break; - - case 154: /* unary_expr: operand ISNULL */ -#line 928 "bison_parser.y" - { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 4001 "bison_parser.cpp" - break; - - case 155: /* unary_expr: operand IS NULL */ -#line 929 "bison_parser.y" - { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 4007 "bison_parser.cpp" - break; - - case 156: /* unary_expr: operand IS NOT NULL */ -#line 930 "bison_parser.y" - { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 4013 "bison_parser.cpp" - break; - - case 158: /* binary_expr: operand '-' operand */ -#line 935 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 4019 "bison_parser.cpp" - break; - - case 159: /* binary_expr: operand '+' operand */ -#line 936 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 4025 "bison_parser.cpp" - break; - - case 160: /* binary_expr: operand '/' operand */ -#line 937 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 4031 "bison_parser.cpp" - break; - - case 161: /* binary_expr: operand '*' operand */ -#line 938 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 4037 "bison_parser.cpp" - break; - - case 162: /* binary_expr: operand '%' operand */ -#line 939 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 4043 "bison_parser.cpp" - break; - - case 163: /* binary_expr: operand '^' operand */ -#line 940 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 4049 "bison_parser.cpp" - break; - - case 164: /* binary_expr: operand LIKE operand */ -#line 941 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 4055 "bison_parser.cpp" - break; - - case 165: /* binary_expr: operand NOT LIKE operand */ -#line 942 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 4061 "bison_parser.cpp" - break; - - case 166: /* binary_expr: operand ILIKE operand */ -#line 943 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 4067 "bison_parser.cpp" - break; - - case 167: /* binary_expr: operand CONCAT operand */ -#line 944 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 4073 "bison_parser.cpp" - break; - - case 168: /* logic_expr: expr AND expr */ -#line 948 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 4079 "bison_parser.cpp" - break; - - case 169: /* logic_expr: expr OR expr */ -#line 949 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 4085 "bison_parser.cpp" - break; - - case 170: /* in_expr: operand IN '(' expr_list ')' */ -#line 953 "bison_parser.y" - { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 4091 "bison_parser.cpp" - break; - - case 171: /* in_expr: operand NOT IN '(' expr_list ')' */ -#line 954 "bison_parser.y" - { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 4097 "bison_parser.cpp" - break; - - case 172: /* in_expr: operand IN '(' select_no_paren ')' */ -#line 955 "bison_parser.y" - { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 4103 "bison_parser.cpp" - break; - - case 173: /* in_expr: operand NOT IN '(' select_no_paren ')' */ -#line 956 "bison_parser.y" - { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 4109 "bison_parser.cpp" - break; - - case 174: /* case_expr: CASE expr case_list END */ -#line 962 "bison_parser.y" - { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } -#line 4115 "bison_parser.cpp" - break; - - case 175: /* case_expr: CASE expr case_list ELSE expr END */ -#line 963 "bison_parser.y" - { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4121 "bison_parser.cpp" - break; - - case 176: /* case_expr: CASE case_list END */ -#line 964 "bison_parser.y" - { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } -#line 4127 "bison_parser.cpp" - break; - - case 177: /* case_expr: CASE case_list ELSE expr END */ -#line 965 "bison_parser.y" - { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4133 "bison_parser.cpp" - break; - - case 178: /* case_list: WHEN expr THEN expr */ -#line 969 "bison_parser.y" - { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4139 "bison_parser.cpp" - break; - - case 179: /* case_list: case_list WHEN expr THEN expr */ -#line 970 "bison_parser.y" - { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4145 "bison_parser.cpp" - break; - - case 180: /* exists_expr: EXISTS '(' select_no_paren ')' */ -#line 974 "bison_parser.y" - { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 4151 "bison_parser.cpp" - break; - - case 181: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ -#line 975 "bison_parser.y" - { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 4157 "bison_parser.cpp" - break; - - case 182: /* comp_expr: operand '=' operand */ -#line 979 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4163 "bison_parser.cpp" - break; - - case 183: /* comp_expr: operand EQUALS operand */ -#line 980 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4169 "bison_parser.cpp" - break; - - case 184: /* comp_expr: operand NOTEQUALS operand */ -#line 981 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 4175 "bison_parser.cpp" - break; - - case 185: /* comp_expr: operand '<' operand */ -#line 982 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 4181 "bison_parser.cpp" - break; - - case 186: /* comp_expr: operand '>' operand */ -#line 983 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 4187 "bison_parser.cpp" - break; - - case 187: /* comp_expr: operand LESSEQ operand */ -#line 984 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 4193 "bison_parser.cpp" - break; - - case 188: /* comp_expr: operand GREATEREQ operand */ -#line 985 "bison_parser.y" - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 4199 "bison_parser.cpp" - break; - - case 189: /* function_expr: IDENTIFIER '(' ')' */ -#line 989 "bison_parser.y" - { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 4205 "bison_parser.cpp" - break; - - case 190: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ -#line 990 "bison_parser.y" - { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 4211 "bison_parser.cpp" - break; - - case 191: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ -#line 994 "bison_parser.y" - { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } -#line 4217 "bison_parser.cpp" - break; - - case 192: /* cast_expr: CAST '(' expr AS column_type ')' */ -#line 998 "bison_parser.y" - { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } -#line 4223 "bison_parser.cpp" - break; - - case 193: /* datetime_field: SECOND */ -#line 1002 "bison_parser.y" - { (yyval.datetime_field) = kDatetimeSecond; } -#line 4229 "bison_parser.cpp" - break; - - case 194: /* datetime_field: MINUTE */ -#line 1003 "bison_parser.y" - { (yyval.datetime_field) = kDatetimeMinute; } -#line 4235 "bison_parser.cpp" - break; - - case 195: /* datetime_field: HOUR */ -#line 1004 "bison_parser.y" - { (yyval.datetime_field) = kDatetimeHour; } -#line 4241 "bison_parser.cpp" - break; - - case 196: /* datetime_field: DAY */ -#line 1005 "bison_parser.y" - { (yyval.datetime_field) = kDatetimeDay; } -#line 4247 "bison_parser.cpp" - break; - - case 197: /* datetime_field: MONTH */ -#line 1006 "bison_parser.y" - { (yyval.datetime_field) = kDatetimeMonth; } -#line 4253 "bison_parser.cpp" - break; - - case 198: /* datetime_field: YEAR */ -#line 1007 "bison_parser.y" - { (yyval.datetime_field) = kDatetimeYear; } -#line 4259 "bison_parser.cpp" - break; - - case 199: /* array_expr: ARRAY '[' expr_list ']' */ -#line 1011 "bison_parser.y" - { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 4265 "bison_parser.cpp" - break; - - case 200: /* array_index: operand '[' int_literal ']' */ -#line 1015 "bison_parser.y" - { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 4271 "bison_parser.cpp" - break; - - case 201: /* between_expr: operand BETWEEN operand AND operand */ -#line 1019 "bison_parser.y" - { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4277 "bison_parser.cpp" - break; - - case 202: /* column_name: IDENTIFIER */ -#line 1023 "bison_parser.y" - { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 4283 "bison_parser.cpp" - break; - - case 203: /* column_name: IDENTIFIER '.' IDENTIFIER */ -#line 1024 "bison_parser.y" - { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 4289 "bison_parser.cpp" - break; - - case 204: /* column_name: '*' */ -#line 1025 "bison_parser.y" - { (yyval.expr) = Expr::makeStar(); } -#line 4295 "bison_parser.cpp" - break; - - case 205: /* column_name: IDENTIFIER '.' '*' */ -#line 1026 "bison_parser.y" - { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 4301 "bison_parser.cpp" - break; - - case 212: /* string_literal: STRING */ -#line 1039 "bison_parser.y" - { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 4307 "bison_parser.cpp" - break; - - case 213: /* bool_literal: TRUE */ -#line 1043 "bison_parser.y" - { (yyval.expr) = Expr::makeLiteral(true); } -#line 4313 "bison_parser.cpp" - break; - - case 214: /* bool_literal: FALSE */ -#line 1044 "bison_parser.y" - { (yyval.expr) = Expr::makeLiteral(false); } -#line 4319 "bison_parser.cpp" - break; - - case 215: /* num_literal: FLOATVAL */ -#line 1048 "bison_parser.y" - { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 4325 "bison_parser.cpp" - break; - - case 217: /* int_literal: INTVAL */ -#line 1053 "bison_parser.y" - { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 4331 "bison_parser.cpp" - break; - - case 218: /* null_literal: NULL */ -#line 1057 "bison_parser.y" - { (yyval.expr) = Expr::makeNullLiteral(); } -#line 4337 "bison_parser.cpp" - break; - - case 219: /* date_literal: DATE STRING */ -#line 1061 "bison_parser.y" - { - int day{0}, month{0}, year{0}, chars_parsed{0}; - // If the whole string is parsed, chars_parsed points to the terminating null byte after the last character - if (sscanf((yyvsp[0].sval), "%4d-%2d-%2d%n", &day, &month, &year, &chars_parsed) != 3 || (yyvsp[0].sval)[chars_parsed] != 0) { - free((yyvsp[0].sval)); - yyerror(&yyloc, result, scanner, "Found incorrect date format. Expected format: YYYY-MM-DD"); - YYERROR; - } - (yyval.expr) = Expr::makeDateLiteral((yyvsp[0].sval)); - } -#line 4352 "bison_parser.cpp" - break; - - case 220: /* param_expr: '?' */ -#line 1074 "bison_parser.y" - { - (yyval.expr) = Expr::makeParameter(yylloc.total_column); - (yyval.expr)->ival2 = yyloc.param_list.size(); - yyloc.param_list.push_back((yyval.expr)); - } -#line 4362 "bison_parser.cpp" - break; - - case 222: /* table_ref: table_ref_commalist ',' table_ref_atomic */ -#line 1087 "bison_parser.y" - { - (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); - auto tbl = new TableRef(kTableCrossProduct); - tbl->list = (yyvsp[-2].table_vec); - (yyval.table) = tbl; - } -#line 4373 "bison_parser.cpp" - break; - - case 226: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ -#line 1103 "bison_parser.y" - { - auto tbl = new TableRef(kTableSelect); - tbl->select = (yyvsp[-2].select_stmt); - tbl->alias = (yyvsp[0].alias_t); - (yyval.table) = tbl; - } -#line 4384 "bison_parser.cpp" - break; - - case 227: /* table_ref_commalist: table_ref_atomic */ -#line 1112 "bison_parser.y" - { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 4390 "bison_parser.cpp" - break; - - case 228: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ -#line 1113 "bison_parser.y" - { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 4396 "bison_parser.cpp" - break; - - case 229: /* table_ref_name: table_name opt_table_alias */ -#line 1118 "bison_parser.y" - { - auto tbl = new TableRef(kTableName); - tbl->schema = (yyvsp[-1].table_name).schema; - tbl->name = (yyvsp[-1].table_name).name; - tbl->alias = (yyvsp[0].alias_t); - (yyval.table) = tbl; - } -#line 4408 "bison_parser.cpp" - break; - - case 230: /* table_ref_name_no_alias: table_name */ -#line 1129 "bison_parser.y" - { - (yyval.table) = new TableRef(kTableName); - (yyval.table)->schema = (yyvsp[0].table_name).schema; - (yyval.table)->name = (yyvsp[0].table_name).name; - } -#line 4418 "bison_parser.cpp" - break; - - case 231: /* table_name: IDENTIFIER */ -#line 1138 "bison_parser.y" - { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} -#line 4424 "bison_parser.cpp" - break; - - case 232: /* table_name: IDENTIFIER '.' IDENTIFIER */ -#line 1139 "bison_parser.y" - { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } -#line 4430 "bison_parser.cpp" - break; - - case 234: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ -#line 1145 "bison_parser.y" - { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } -#line 4436 "bison_parser.cpp" - break; - - case 236: /* opt_table_alias: %empty */ -#line 1151 "bison_parser.y" - { (yyval.alias_t) = nullptr; } -#line 4442 "bison_parser.cpp" - break; - - case 237: /* alias: AS IDENTIFIER */ -#line 1156 "bison_parser.y" - { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4448 "bison_parser.cpp" - break; - - case 238: /* alias: IDENTIFIER */ -#line 1157 "bison_parser.y" - { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4454 "bison_parser.cpp" - break; - - case 240: /* opt_alias: %empty */ -#line 1163 "bison_parser.y" - { (yyval.alias_t) = nullptr; } -#line 4460 "bison_parser.cpp" - break; - - case 242: /* opt_with_clause: %empty */ -#line 1173 "bison_parser.y" - { (yyval.with_description_vec) = nullptr; } -#line 4466 "bison_parser.cpp" - break; - - case 243: /* with_clause: WITH with_description_list */ -#line 1177 "bison_parser.y" - { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } -#line 4472 "bison_parser.cpp" - break; - - case 244: /* with_description_list: with_description */ -#line 1181 "bison_parser.y" - { - (yyval.with_description_vec) = new std::vector(); - (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); - } -#line 4481 "bison_parser.cpp" - break; - - case 245: /* with_description_list: with_description_list ',' with_description */ -#line 1185 "bison_parser.y" - { - (yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t)); - (yyval.with_description_vec) = (yyvsp[-2].with_description_vec); - } -#line 4490 "bison_parser.cpp" - break; - - case 246: /* with_description: IDENTIFIER AS select_with_paren */ -#line 1192 "bison_parser.y" - { - (yyval.with_description_t) = new WithDescription(); - (yyval.with_description_t)->alias = (yyvsp[-2].sval); - (yyval.with_description_t)->select = (yyvsp[0].select_stmt); - } -#line 4500 "bison_parser.cpp" - break; - - case 247: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ -#line 1206 "bison_parser.y" - { - (yyval.table) = new TableRef(kTableJoin); - (yyval.table)->join = new JoinDefinition(); - (yyval.table)->join->type = kJoinNatural; - (yyval.table)->join->left = (yyvsp[-3].table); - (yyval.table)->join->right = (yyvsp[0].table); - } -#line 4512 "bison_parser.cpp" - break; - - case 248: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ -#line 1214 "bison_parser.y" - { - (yyval.table) = new TableRef(kTableJoin); - (yyval.table)->join = new JoinDefinition(); - (yyval.table)->join->type = (JoinType) (yyvsp[-4].uval); - (yyval.table)->join->left = (yyvsp[-5].table); - (yyval.table)->join->right = (yyvsp[-2].table); - (yyval.table)->join->condition = (yyvsp[0].expr); - } -#line 4525 "bison_parser.cpp" - break; - - case 249: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ -#line 1224 "bison_parser.y" - { - (yyval.table) = new TableRef(kTableJoin); - (yyval.table)->join = new JoinDefinition(); - (yyval.table)->join->type = (JoinType) (yyvsp[-6].uval); - (yyval.table)->join->left = (yyvsp[-7].table); - (yyval.table)->join->right = (yyvsp[-4].table); - auto left_col = Expr::makeColumnRef(strdup((yyvsp[-1].expr)->name)); - if ((yyvsp[-1].expr)->alias != nullptr) left_col->alias = strdup((yyvsp[-1].expr)->alias); - if ((yyvsp[-7].table)->getName() != nullptr) left_col->table = strdup((yyvsp[-7].table)->getName()); - auto right_col = Expr::makeColumnRef(strdup((yyvsp[-1].expr)->name)); - if ((yyvsp[-1].expr)->alias != nullptr) right_col->alias = strdup((yyvsp[-1].expr)->alias); - if ((yyvsp[-4].table)->getName() != nullptr) right_col->table = strdup((yyvsp[-4].table)->getName()); - (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); - delete (yyvsp[-1].expr); - } -#line 4545 "bison_parser.cpp" - break; - - case 250: /* opt_join_type: INNER */ -#line 1242 "bison_parser.y" - { (yyval.uval) = kJoinInner; } -#line 4551 "bison_parser.cpp" - break; - - case 251: /* opt_join_type: LEFT OUTER */ -#line 1243 "bison_parser.y" - { (yyval.uval) = kJoinLeft; } -#line 4557 "bison_parser.cpp" - break; - - case 252: /* opt_join_type: LEFT */ -#line 1244 "bison_parser.y" - { (yyval.uval) = kJoinLeft; } -#line 4563 "bison_parser.cpp" - break; - - case 253: /* opt_join_type: RIGHT OUTER */ -#line 1245 "bison_parser.y" - { (yyval.uval) = kJoinRight; } -#line 4569 "bison_parser.cpp" - break; - - case 254: /* opt_join_type: RIGHT */ -#line 1246 "bison_parser.y" - { (yyval.uval) = kJoinRight; } -#line 4575 "bison_parser.cpp" - break; - - case 255: /* opt_join_type: FULL OUTER */ -#line 1247 "bison_parser.y" - { (yyval.uval) = kJoinFull; } -#line 4581 "bison_parser.cpp" - break; - - case 256: /* opt_join_type: OUTER */ -#line 1248 "bison_parser.y" - { (yyval.uval) = kJoinFull; } -#line 4587 "bison_parser.cpp" - break; - - case 257: /* opt_join_type: FULL */ -#line 1249 "bison_parser.y" - { (yyval.uval) = kJoinFull; } -#line 4593 "bison_parser.cpp" - break; - - case 258: /* opt_join_type: CROSS */ -#line 1250 "bison_parser.y" - { (yyval.uval) = kJoinCross; } -#line 4599 "bison_parser.cpp" - break; - - case 259: /* opt_join_type: %empty */ -#line 1251 "bison_parser.y" - { (yyval.uval) = kJoinInner; } -#line 4605 "bison_parser.cpp" - break; - - case 263: /* ident_commalist: IDENTIFIER */ -#line 1271 "bison_parser.y" - { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 4611 "bison_parser.cpp" - break; - - case 264: /* ident_commalist: ident_commalist ',' IDENTIFIER */ -#line 1272 "bison_parser.y" - { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 4617 "bison_parser.cpp" - break; - - -#line 4621 "bison_parser.cpp" - - default: break; - } - /* User semantic actions sometimes alter yychar, and that requires - that yytoken be updated with the new translation. We take the - approach of translating immediately before every use of yytoken. - One alternative is translating here after every semantic action, - but that translation would be missed if the semantic action invokes - YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or - if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an - incorrect destructor might then be invoked immediately. In the - case of YYERROR or YYBACKUP, subsequent parser actions might lead - to an incorrect destructor call or verbose syntax error message - before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - - *++yyvsp = yyval; - *++yylsp = yyloc; - - /* Now 'shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - { - 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; - - -/*--------------------------------------. -| yyerrlab -- here on detecting error. | -`--------------------------------------*/ -yyerrlab: - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = yychar == SQL_HSQL_EMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; - { - yypcontext_t yyctx - = {yyssp, yytoken, &yylloc}; - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == -1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = YY_CAST (char *, - YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); - if (yymsg) - { - yysyntax_error_status - = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); - yymsgp = yymsg; - } - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = YYENOMEM; - } - } - yyerror (&yylloc, result, scanner, yymsgp); - if (yysyntax_error_status == YYENOMEM) - goto yyexhaustedlab; - } - } - - yyerror_range[1] = yylloc; - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - if (yychar <= SQL_YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == SQL_YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval, &yylloc, result, scanner); - yychar = SQL_HSQL_EMPTY; - } - } - - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| 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; - - /* Do not reclaim the symbols of the rule whose action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - /* Pop stack until we find a state that shifts the error token. */ - for (;;) - { - yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) - { - yyn += YYSYMBOL_YYerror; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - yyerror_range[1] = *yylsp; - yydestruct ("Error: popping", - YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, result, scanner); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - - yyerror_range[2] = yylloc; - ++yylsp; - YYLLOC_DEFAULT (*yylsp, yyerror_range, 2); - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - - -#if 1 -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (&yylloc, result, scanner, YY_("memory exhausted")); - yyresult = 2; - goto yyreturn; -#endif - - -/*-------------------------------------------------------. -| yyreturn -- parsing is finished, clean up and return. | -`-------------------------------------------------------*/ -yyreturn: - if (yychar != SQL_HSQL_EMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, &yylloc, result, scanner); - } - /* Do not reclaim the symbols of the rule whose action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, result, scanner); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - return yyresult; -} - -#line 1275 "bison_parser.y" - -/********************************* - ** Section 4: Additional C code - *********************************/ - -/* empty */ diff --git a/src/parser/flex_lexer.cpp b/src/parser/flex_lexer.cpp deleted file mode 100644 index 77fa8ab9..00000000 --- a/src/parser/flex_lexer.cpp +++ /dev/null @@ -1,4394 +0,0 @@ -#line 1 "flex_lexer.cpp" - -#line 3 "flex_lexer.cpp" - -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 6 -#define YY_FLEX_SUBMINOR_VERSION 4 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -#ifdef yy_create_buffer -#define hsql__create_buffer_ALREADY_DEFINED -#else -#define yy_create_buffer hsql__create_buffer -#endif - -#ifdef yy_delete_buffer -#define hsql__delete_buffer_ALREADY_DEFINED -#else -#define yy_delete_buffer hsql__delete_buffer -#endif - -#ifdef yy_scan_buffer -#define hsql__scan_buffer_ALREADY_DEFINED -#else -#define yy_scan_buffer hsql__scan_buffer -#endif - -#ifdef yy_scan_string -#define hsql__scan_string_ALREADY_DEFINED -#else -#define yy_scan_string hsql__scan_string -#endif - -#ifdef yy_scan_bytes -#define hsql__scan_bytes_ALREADY_DEFINED -#else -#define yy_scan_bytes hsql__scan_bytes -#endif - -#ifdef yy_init_buffer -#define hsql__init_buffer_ALREADY_DEFINED -#else -#define yy_init_buffer hsql__init_buffer -#endif - -#ifdef yy_flush_buffer -#define hsql__flush_buffer_ALREADY_DEFINED -#else -#define yy_flush_buffer hsql__flush_buffer -#endif - -#ifdef yy_load_buffer_state -#define hsql__load_buffer_state_ALREADY_DEFINED -#else -#define yy_load_buffer_state hsql__load_buffer_state -#endif - -#ifdef yy_switch_to_buffer -#define hsql__switch_to_buffer_ALREADY_DEFINED -#else -#define yy_switch_to_buffer hsql__switch_to_buffer -#endif - -#ifdef yypush_buffer_state -#define hsql_push_buffer_state_ALREADY_DEFINED -#else -#define yypush_buffer_state hsql_push_buffer_state -#endif - -#ifdef yypop_buffer_state -#define hsql_pop_buffer_state_ALREADY_DEFINED -#else -#define yypop_buffer_state hsql_pop_buffer_state -#endif - -#ifdef yyensure_buffer_stack -#define hsql_ensure_buffer_stack_ALREADY_DEFINED -#else -#define yyensure_buffer_stack hsql_ensure_buffer_stack -#endif - -#ifdef yylex -#define hsql_lex_ALREADY_DEFINED -#else -#define yylex hsql_lex -#endif - -#ifdef yyrestart -#define hsql_restart_ALREADY_DEFINED -#else -#define yyrestart hsql_restart -#endif - -#ifdef yylex_init -#define hsql_lex_init_ALREADY_DEFINED -#else -#define yylex_init hsql_lex_init -#endif - -#ifdef yylex_init_extra -#define hsql_lex_init_extra_ALREADY_DEFINED -#else -#define yylex_init_extra hsql_lex_init_extra -#endif - -#ifdef yylex_destroy -#define hsql_lex_destroy_ALREADY_DEFINED -#else -#define yylex_destroy hsql_lex_destroy -#endif - -#ifdef yyget_debug -#define hsql_get_debug_ALREADY_DEFINED -#else -#define yyget_debug hsql_get_debug -#endif - -#ifdef yyset_debug -#define hsql_set_debug_ALREADY_DEFINED -#else -#define yyset_debug hsql_set_debug -#endif - -#ifdef yyget_extra -#define hsql_get_extra_ALREADY_DEFINED -#else -#define yyget_extra hsql_get_extra -#endif - -#ifdef yyset_extra -#define hsql_set_extra_ALREADY_DEFINED -#else -#define yyset_extra hsql_set_extra -#endif - -#ifdef yyget_in -#define hsql_get_in_ALREADY_DEFINED -#else -#define yyget_in hsql_get_in -#endif - -#ifdef yyset_in -#define hsql_set_in_ALREADY_DEFINED -#else -#define yyset_in hsql_set_in -#endif - -#ifdef yyget_out -#define hsql_get_out_ALREADY_DEFINED -#else -#define yyget_out hsql_get_out -#endif - -#ifdef yyset_out -#define hsql_set_out_ALREADY_DEFINED -#else -#define yyset_out hsql_set_out -#endif - -#ifdef yyget_leng -#define hsql_get_leng_ALREADY_DEFINED -#else -#define yyget_leng hsql_get_leng -#endif - -#ifdef yyget_text -#define hsql_get_text_ALREADY_DEFINED -#else -#define yyget_text hsql_get_text -#endif - -#ifdef yyget_lineno -#define hsql_get_lineno_ALREADY_DEFINED -#else -#define yyget_lineno hsql_get_lineno -#endif - -#ifdef yyset_lineno -#define hsql_set_lineno_ALREADY_DEFINED -#else -#define yyset_lineno hsql_set_lineno -#endif - -#ifdef yyget_column -#define hsql_get_column_ALREADY_DEFINED -#else -#define yyget_column hsql_get_column -#endif - -#ifdef yyset_column -#define hsql_set_column_ALREADY_DEFINED -#else -#define yyset_column hsql_set_column -#endif - -#ifdef yywrap -#define hsql_wrap_ALREADY_DEFINED -#else -#define yywrap hsql_wrap -#endif - -#ifdef yyget_lval -#define hsql_get_lval_ALREADY_DEFINED -#else -#define yyget_lval hsql_get_lval -#endif - -#ifdef yyset_lval -#define hsql_set_lval_ALREADY_DEFINED -#else -#define yyset_lval hsql_set_lval -#endif - -#ifdef yyget_lloc -#define hsql_get_lloc_ALREADY_DEFINED -#else -#define yyget_lloc hsql_get_lloc -#endif - -#ifdef yyset_lloc -#define hsql_set_lloc_ALREADY_DEFINED -#else -#define yyset_lloc hsql_set_lloc -#endif - -#ifdef yyalloc -#define hsql_alloc_ALREADY_DEFINED -#else -#define yyalloc hsql_alloc -#endif - -#ifdef yyrealloc -#define hsql_realloc_ALREADY_DEFINED -#else -#define yyrealloc hsql_realloc -#endif - -#ifdef yyfree -#define hsql_free_ALREADY_DEFINED -#else -#define yyfree hsql_free -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) -#endif - -#endif /* ! C99 */ - -#endif /* ! FLEXINT_H */ - -/* begin standard C++ headers. */ - -/* TODO: this is always defined, so inline it */ -#define yyconst const - -#if defined(__GNUC__) && __GNUC__ >= 3 -#define yynoreturn __attribute__((__noreturn__)) -#else -#define yynoreturn -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an - * integer in range [0..255] for use as an array index. - */ -#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) - -/* An opaque pointer. */ -#ifndef YY_TYPEDEF_YY_SCANNER_T -#define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; -#endif - -/* For convenience, these vars (plus the bison vars far below) - are macros in the reentrant scanner. */ -#define yyin yyg->yyin_r -#define yyout yyg->yyout_r -#define yyextra yyg->yyextra_r -#define yyleng yyg->yyleng_r -#define yytext yyg->yytext_r -#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) -#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) -#define yy_flex_debug yyg->yy_flex_debug_r - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN yyg->yy_start = 1 + 2 * -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START ((yyg->yy_start - 1) / 2) -#define YYSTATE YY_START -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart( yyin , yyscanner ) -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else -#define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ -#endif - -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - #define YY_LINENO_REWIND_TO(ptr) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) -#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ - ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ - : NULL) -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] - -void yyrestart ( FILE *input_file , yyscan_t yyscanner ); -void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); -void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -void yypop_buffer_state ( yyscan_t yyscanner ); - -static void yyensure_buffer_stack ( yyscan_t yyscanner ); -static void yy_load_buffer_state ( yyscan_t yyscanner ); -static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); -#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) - -YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); - -void *yyalloc ( yy_size_t , yyscan_t yyscanner ); -void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); -void yyfree ( void * , yyscan_t yyscanner ); - -#define yy_new_buffer yy_create_buffer -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* Begin user sect3 */ - -#define hsql_wrap(yyscanner) (/*CONSTCOND*/1) -#define YY_SKIP_YYWRAP -typedef flex_uint8_t YY_CHAR; - -typedef int yy_state_type; - -#define yytext_ptr yytext_r - -static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); -static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); -static int yy_get_next_buffer ( yyscan_t yyscanner ); -static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 159 -#define YY_END_OF_BUFFER 160 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static const flex_int16_t yy_accept[1120] = - { 0, - 0, 0, 156, 156, 2, 2, 160, 158, 4, 4, - 158, 158, 147, 154, 147, 147, 151, 147, 147, 147, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 147, 156, 157, 2, 2, 3, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 4, 142, 0, 1, 0, - 149, 148, 151, 144, 143, 141, 145, 153, 153, 153, - - 153, 153, 153, 120, 153, 121, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 122, 153, 153, 123, 124, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 125, 126, 127, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 128, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 146, 156, 155, 2, - 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 152, 0, 148, 108, 153, 109, 153, 153, - 110, 153, 111, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 132, 153, 153, 153, - - 153, 153, 153, 153, 153, 153, 112, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 113, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 114, 153, 153, 115, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 116, 153, 153, 117, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 118, 153, 153, 153, 153, 153, 153, 153, 153, - 119, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 0, 153, 153, 153, - - 153, 153, 153, 153, 78, 153, 79, 41, 80, 153, - 153, 153, 81, 153, 153, 82, 153, 153, 153, 153, - 84, 153, 153, 153, 85, 86, 153, 153, 153, 153, - 153, 153, 153, 87, 153, 153, 88, 89, 153, 153, - 90, 153, 91, 131, 153, 153, 153, 153, 153, 153, - 92, 153, 93, 94, 95, 153, 97, 153, 98, 153, - 153, 153, 153, 99, 153, 153, 153, 153, 153, 100, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 101, - 153, 153, 153, 153, 102, 103, 104, 153, 135, 153, - 153, 153, 153, 153, 153, 153, 153, 105, 153, 106, - - 153, 107, 134, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 0, 58, 59, 153, 60, 153, 138, 153, 153, 153, - 153, 153, 153, 61, 153, 153, 153, 153, 62, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 136, - 63, 153, 153, 64, 153, 96, 153, 65, 66, 153, - 153, 153, 153, 67, 68, 69, 70, 153, 133, 153, - 153, 153, 71, 72, 153, 153, 153, 153, 153, 73, - 153, 153, 153, 153, 153, 153, 74, 153, 153, 153, - 153, 75, 153, 153, 153, 76, 153, 153, 153, 77, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 0, 153, 31, 153, 153, 32, 140, 153, 33, 153, - 153, 153, 34, 153, 35, 153, 36, 37, 38, 153, - 39, 153, 153, 42, 43, 44, 45, 46, 153, 153, - - 47, 130, 153, 153, 48, 153, 153, 153, 49, 153, - 153, 50, 129, 51, 52, 153, 53, 153, 153, 153, - 153, 54, 55, 56, 57, 153, 153, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 0, 15, 16, 17, 18, 19, - 153, 153, 20, 153, 153, 21, 22, 40, 23, 153, - - 24, 153, 153, 25, 26, 153, 153, 27, 28, 153, - 153, 153, 153, 29, 30, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 0, 83, 153, 10, - 11, 153, 12, 153, 13, 139, 153, 153, 153, 14, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 0, 153, 7, 153, 8, 9, - 153, 2, 2, 2, 2, 2, 2, 2, 0, 5, - 6, 153, 2, 2, 2, 2, 0, 137, 2, 2, - - 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, - 0, 2, 0, 2, 0, 2, 150, 2, 0 - } ; - -static const YY_CHAR yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 4, 5, 1, 1, 6, 1, 7, 6, - 6, 6, 6, 6, 8, 9, 6, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 6, 6, 20, - 21, 22, 6, 1, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 6, 1, 6, 6, 49, 1, 50, 51, 52, 53, - - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 6, 76, 6, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static const YY_CHAR yy_meta[77] = - { 0, - 1, 1, 2, 1, 3, 1, 4, 1, 1, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, - 1, 1, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 1 - } ; - -static const flex_int16_t yy_base[1127] = - { 0, - 0, 0, 709, 681, 76, 0, 668, 4466, 151, 153, - 643, 0, 4466, 4466, 149, 148, 160, 159, 625, 619, - 156, 156, 164, 162, 172, 223, 198, 211, 215, 151, - 168, 210, 255, 257, 263, 262, 0, 277, 307, 350, - 284, 221, 258, 171, 540, 0, 600, 0, 295, 308, - 561, 576, 0, 0, 331, 408, 419, 321, 542, 512, - 438, 514, 568, 620, 668, 720, 328, 426, 768, 329, - 311, 434, 500, 820, 868, 505, 421, 513, 918, 970, - 515, 570, 455, 423, 450, 351, 4466, 520, 4466, 512, - 1035, 1045, 1056, 4466, 4466, 4466, 4466, 0, 174, 282, - - 336, 520, 296, 315, 557, 0, 345, 334, 568, 511, - 327, 611, 569, 345, 419, 421, 441, 444, 631, 469, - 515, 520, 552, 557, 562, 563, 574, 609, 578, 605, - 0, 618, 616, 665, 619, 628, 616, 637, 664, 685, - 631, 657, 667, 663, 669, 678, 690, 689, 0, 693, - 681, 685, 722, 722, 720, 726, 724, 729, 737, 727, - 725, 743, 749, 762, 772, 766, 767, 784, 779, 785, - 781, 785, 818, 787, 775, 798, 4466, 0, 4466, 0, - 389, 0, 512, 0, 499, 1066, 1076, 1087, 0, 0, - 0, 0, 806, 824, 855, 859, 913, 860, 878, 922, - - 872, 961, 962, 1080, 957, 1081, 1133, 1084, 1083, 1085, - 1121, 1137, 1119, 1187, 952, 1145, 1149, 1170, 1189, 1181, - 1193, 1211, 1227, 1223, 1219, 1222, 1233, 1245, 1294, 1275, - 1285, 1277, 1290, 1307, 1347, 1306, 1339, 1349, 1362, 1364, - 1361, 1397, 1398, 1360, 1401, 1414, 1392, 1435, 1433, 1443, - 1447, 1465, 1451, 1468, 1403, 1487, 1501, 1489, 1503, 1505, - 1531, 1506, 1541, 1555, 1520, 1556, 1572, 1577, 1554, 1580, - 1598, 0, 4466, 498, 1645, 0, 822, 0, 829, 827, - 0, 839, 0, 828, 879, 872, 907, 1640, 907, 910, - 919, 929, 956, 982, 973, 1082, 0, 1079, 1097, 1323, - - 1152, 1151, 1140, 1176, 1213, 1252, 0, 1259, 1261, 1275, - 1284, 1294, 1331, 1337, 1363, 1419, 1438, 1461, 1470, 1494, - 1492, 1539, 1539, 1578, 1583, 1608, 1605, 1616, 1626, 1639, - 1644, 1630, 1638, 0, 1633, 1649, 1646, 1652, 1656, 1654, - 1655, 1642, 1644, 1644, 0, 1654, 1649, 1649, 1664, 1668, - 1673, 1661, 1661, 1672, 1696, 1678, 1691, 1691, 1700, 1691, - 1702, 0, 1685, 1689, 1690, 1699, 1697, 1694, 1701, 1711, - 0, 1703, 1713, 1704, 1705, 1721, 1709, 1707, 1726, 1708, - 1719, 1739, 1743, 1734, 0, 495, 1779, 1756, 1757, 1758, - 1760, 1781, 1772, 1786, 1790, 1802, 1794, 1800, 1816, 1840, - - 1831, 1826, 1848, 1857, 1832, 1866, 1874, 1834, 1870, 1885, - 1880, 1891, 1910, 1896, 1909, 1925, 1920, 1914, 1926, 1948, - 1939, 1962, 1950, 1974, 1963, 1965, 1978, 1984, 2014, 2015, - 1993, 2019, 2017, 2045, 2032, 2053, 2054, 2051, 2076, 2070, - 2082, 2085, 2104, 2091, 2099, 2110, 2125, 2116, 2144, 2150, - 2158, 2153, 2159, 2174, 2169, 2183, 2187, 2195, 2212, 2204, - 2193, 2208, 2223, 2227, 2233, 2241, 2262, 2257, 2266, 2283, - 2267, 2281, 2275, 2278, 2306, 2292, 2300, 2316, 2321, 2329, - 2337, 2311, 2335, 2345, 2360, 2378, 2375, 2374, 2391, 2383, - 2408, 2414, 2389, 2437, 2440, 2429, 491, 1784, 1915, 1922, - - 1979, 1989, 2019, 2056, 0, 2092, 0, 0, 0, 2085, - 2102, 2126, 0, 2150, 2223, 2223, 2333, 2336, 2351, 2390, - 2407, 2426, 2435, 2437, 0, 0, 2434, 2437, 2436, 2438, - 2458, 2462, 2462, 0, 2448, 2469, 0, 0, 2472, 2463, - 0, 2469, 0, 0, 2482, 2470, 2467, 2475, 2478, 2491, - 0, 2487, 0, 0, 0, 2481, 0, 2490, 0, 2498, - 2485, 2499, 2490, 0, 2508, 2507, 2495, 2498, 2504, 0, - 2518, 2520, 2509, 2506, 2507, 2531, 2524, 2527, 2539, 0, - 2540, 2538, 2545, 2537, 0, 0, 2534, 2536, 0, 2553, - 2543, 2537, 2558, 2541, 2555, 2558, 2557, 0, 2545, 0, - - 2562, 0, 0, 474, 2573, 2582, 2570, 2571, 2592, 2594, - 2596, 2604, 2615, 2606, 2607, 2625, 2628, 2640, 2637, 2646, - 2659, 2656, 2665, 2661, 2678, 2689, 2700, 2702, 2713, 2710, - 2719, 2724, 2728, 2732, 2734, 2758, 2762, 2767, 2768, 2756, - 2773, 2792, 2802, 2786, 2796, 2821, 2826, 2808, 2818, 2830, - 2831, 2832, 2847, 2842, 2863, 2871, 2880, 2872, 2895, 2881, - 2885, 2886, 2916, 2897, 2914, 2925, 2926, 2935, 2937, 2965, - 2939, 2970, 2954, 2980, 2983, 2971, 2988, 3013, 3025, 3011, - 3024, 3014, 3042, 3047, 3050, 3065, 3053, 3068, 3079, 3076, - 3081, 3078, 3084, 3093, 3102, 3117, 3121, 3127, 3135, 3156, - - 3130, 3165, 3133, 3139, 3161, 3171, 3170, 3173, 3175, 3184, - 442, 0, 0, 2669, 0, 2691, 0, 2784, 2798, 2887, - 2945, 2965, 2989, 0, 2995, 3012, 3080, 3189, 0, 3192, - 3184, 3192, 3205, 3206, 3192, 3194, 3196, 3209, 3217, 0, - 0, 3204, 3214, 0, 3222, 0, 3210, 0, 0, 3212, - 3229, 3216, 3228, 0, 0, 0, 0, 3238, 0, 3243, - 3238, 3228, 0, 0, 3244, 3232, 3234, 3249, 3246, 0, - 3257, 3259, 3259, 3244, 3261, 3265, 3249, 3251, 3252, 3273, - 3277, 0, 3275, 3279, 3279, 0, 3267, 3287, 3288, 0, - 441, 3289, 3292, 3293, 3295, 3297, 3298, 3301, 3327, 3323, - - 3331, 3352, 3329, 3337, 3361, 3367, 3375, 3363, 3366, 3396, - 3391, 3412, 3397, 3415, 3425, 3426, 3436, 3451, 3449, 3434, - 3437, 3460, 3479, 3465, 3488, 3489, 3503, 3494, 3500, 3504, - 3505, 3528, 3533, 3529, 3534, 3537, 3538, 3539, 3543, 3572, - 3571, 3562, 3573, 3583, 3587, 3602, 3608, 3596, 3613, 3605, - 3631, 3641, 3639, 3647, 3657, 3673, 3671, 3679, 3675, 3701, - 3707, 3705, 3709, 3711, 3713, 3715, 3739, 3745, 3747, 3744, - 435, 3303, 0, 3298, 3333, 3357, 0, 3373, 0, 3393, - 3405, 3416, 0, 3469, 0, 3472, 0, 0, 0, 3495, - 0, 3570, 3582, 0, 0, 0, 0, 0, 3613, 3636, - - 0, 0, 3638, 3685, 0, 3672, 3723, 3726, 0, 3751, - 3753, 3741, 0, 0, 0, 3750, 0, 3765, 3767, 3771, - 3760, 0, 0, 0, 0, 3764, 3772, 434, 3781, 3783, - 3789, 3785, 3793, 3795, 3811, 3797, 3819, 3823, 3837, 3829, - 3862, 3833, 3863, 3847, 3851, 3865, 3873, 3875, 3887, 3891, - 3877, 3881, 3899, 3905, 3915, 3916, 3917, 3921, 3927, 3950, - 3949, 3931, 3940, 3939, 3953, 3961, 3985, 3991, 3979, 3975, - 3994, 4003, 4017, 4007, 4013, 4019, 4045, 4047, 4028, 4029, - 4053, 4057, 4058, 4061, 429, 0, 0, 0, 0, 0, - 3787, 3803, 0, 3841, 3888, 0, 0, 0, 0, 3967, - - 0, 3958, 4004, 0, 0, 4010, 4053, 0, 0, 4050, - 4061, 4064, 4082, 0, 0, 404, 4083, 4087, 4091, 4093, - 4097, 4099, 4116, 4101, 4102, 4127, 4125, 4131, 4133, 4135, - 4159, 4141, 4170, 4165, 4167, 4171, 4181, 4189, 4173, 4199, - 4211, 4205, 4215, 4207, 4221, 4229, 402, 0, 4108, 0, - 0, 4122, 0, 4162, 0, 0, 4156, 4166, 4229, 0, - 401, 4239, 4250, 4244, 4247, 4263, 4253, 4269, 4261, 4275, - 4279, 4287, 4311, 4293, 397, 4245, 0, 4271, 0, 0, - 4291, 396, 4303, 4317, 4319, 4321, 4327, 4335, 383, 0, - 0, 4315, 382, 4329, 4332, 4361, 376, 0, 342, 4353, - - 333, 331, 303, 291, 278, 255, 250, 245, 243, 240, - 235, 221, 226, 197, 187, 173, 4466, 0, 4466, 4435, - 4440, 181, 4445, 4450, 4455, 4460 - } ; - -static const flex_int16_t yy_def[1127] = - { 0, - 1119, 1, 1120, 1120, 1119, 5, 1119, 1119, 1119, 1119, - 1119, 1121, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1119, 1123, 1119, 1124, 1124, 1119, - 1124, 1125, 1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124, - 1126, 1126, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 1124, 1119, 1119, 1121, 1119, 1119, - 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1122, 1122, 1122, - - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1119, 1123, 1119, 1124, - 1124, 1124, 1125, 1124, 1124, 1124, 1124, 1124, 1124, 1124, - 1124, 1124, 62, 62, 62, 62, 62, 62, 62, 62, - - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 1124, 1119, 1119, 1119, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1124, 1124, 1124, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 1119, 1122, 1122, 1122, - - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - - 1122, 1122, 1122, 1124, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 1119, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1124, 62, 62, 62, 62, 62, 62, 62, 62, 62, - - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 1119, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1124, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 1119, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1124, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 1119, 1122, 1122, 1122, - 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, 1122, - 1124, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 1119, 1122, 1122, 1122, 1122, 1122, - 1122, 1124, 62, 62, 62, 62, 62, 62, 1119, 1122, - 1122, 1122, 1124, 62, 62, 62, 1119, 1122, 1124, 62, - - 1119, 1124, 1119, 1124, 1119, 1124, 1119, 1124, 1119, 1124, - 1119, 1124, 1119, 1124, 1119, 1124, 1119, 1124, 0, 1119, - 1119, 1119, 1119, 1119, 1119, 1119 - } ; - -static const flex_int16_t yy_nxt[4543] = - { 0, - 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 37, 44, 37, 8, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 37, 44, 37, 45, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 58, 59, 60, 61, 62, - - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 77, 84, 77, 48, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, 83, 77, 84, - 77, 85, 86, 86, 86, 86, 89, 91, 91, 91, - 91, 91, 91, 91, 91, 91, 91, 90, 92, 93, - 93, 93, 93, 93, 93, 93, 93, 93, 93, 94, - 95, 99, 105, 100, 111, 98, 107, 136, 112, 101, - 1118, 102, 113, 108, 137, 103, 104, 176, 114, 276, - - 109, 115, 106, 110, 1117, 116, 1116, 117, 99, 105, - 100, 111, 118, 107, 136, 112, 101, 119, 102, 113, - 108, 137, 103, 104, 176, 114, 276, 109, 115, 106, - 110, 126, 116, 128, 117, 1115, 138, 127, 1114, 118, - 139, 129, 131, 172, 119, 120, 140, 130, 132, 133, - 134, 173, 1113, 121, 1112, 135, 122, 1111, 126, 123, - 128, 1110, 124, 138, 127, 125, 1109, 139, 129, 131, - 172, 1108, 120, 140, 130, 132, 133, 134, 173, 144, - 121, 141, 135, 122, 152, 142, 123, 174, 175, 124, - 148, 143, 125, 145, 1107, 153, 181, 86, 149, 146, - - 147, 154, 150, 155, 1106, 151, 144, 156, 141, 86, - 86, 152, 142, 157, 174, 175, 1105, 148, 143, 169, - 145, 170, 153, 277, 171, 149, 146, 147, 154, 150, - 155, 158, 151, 159, 156, 282, 160, 232, 184, 283, - 157, 189, 190, 161, 162, 1104, 169, 1103, 170, 185, - 277, 171, 86, 86, 193, 193, 289, 193, 158, 1102, - 159, 221, 282, 160, 232, 231, 283, 222, 296, 278, - 161, 162, 163, 297, 193, 193, 164, 279, 287, 165, - 166, 193, 193, 289, 193, 288, 167, 304, 221, 168, - 181, 86, 231, 1101, 222, 296, 278, 1099, 1097, 163, - - 297, 193, 193, 164, 279, 287, 165, 166, 1093, 1089, - 1082, 1075, 288, 167, 304, 1061, 168, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 187, 188, 188, - 188, 188, 188, 188, 188, 188, 188, 188, 180, 180, - 1047, 180, 180, 180, 180, 180, 180, 193, 223, 271, - 1016, 985, 193, 928, 871, 305, 224, 180, 180, 180, - 233, 306, 225, 194, 234, 195, 307, 193, 308, 193, - 235, 196, 193, 197, 193, 223, 271, 198, 199, 193, - 193, 193, 305, 224, 269, 270, 791, 233, 306, 225, - 194, 234, 195, 307, 193, 308, 193, 235, 196, 193, - - 197, 193, 314, 711, 198, 199, 604, 193, 193, 497, - 386, 269, 270, 180, 180, 180, 385, 180, 180, 180, - 180, 180, 180, 274, 273, 272, 236, 247, 193, 314, - 237, 193, 192, 180, 180, 180, 238, 294, 248, 250, - 200, 193, 280, 251, 249, 281, 193, 295, 315, 252, - 264, 193, 265, 236, 247, 266, 316, 237, 193, 193, - 201, 193, 191, 238, 294, 248, 250, 200, 193, 280, - 251, 249, 281, 193, 295, 315, 252, 264, 193, 265, - 180, 182, 266, 316, 284, 285, 193, 201, 193, 180, - 202, 317, 267, 318, 193, 319, 193, 203, 286, 320, - - 268, 290, 291, 292, 204, 293, 179, 205, 302, 303, - 321, 284, 285, 324, 193, 177, 193, 202, 317, 267, - 318, 193, 319, 193, 203, 286, 320, 268, 290, 291, - 292, 204, 293, 298, 205, 302, 303, 321, 299, 97, - 324, 193, 206, 193, 300, 96, 207, 325, 326, 322, - 208, 301, 323, 327, 332, 309, 209, 310, 333, 210, - 298, 311, 334, 87, 335, 299, 193, 1119, 312, 206, - 341, 300, 313, 207, 325, 326, 322, 208, 301, 323, - 327, 332, 309, 209, 310, 333, 210, 47, 311, 334, - 328, 335, 342, 193, 193, 312, 336, 341, 337, 313, - - 329, 211, 343, 212, 344, 330, 331, 338, 213, 339, - 345, 346, 347, 214, 193, 47, 348, 328, 349, 342, - 340, 193, 350, 336, 351, 337, 1119, 329, 211, 343, - 212, 344, 330, 331, 338, 213, 339, 345, 346, 347, - 214, 193, 215, 348, 352, 349, 193, 340, 353, 350, - 216, 351, 354, 217, 357, 355, 218, 358, 359, 219, - 356, 360, 220, 363, 364, 365, 193, 1119, 1119, 215, - 361, 352, 366, 193, 1119, 353, 1119, 216, 362, 354, - 217, 357, 355, 218, 358, 359, 219, 356, 360, 220, - 363, 364, 365, 193, 193, 226, 367, 361, 369, 366, - - 370, 227, 228, 229, 371, 362, 372, 368, 230, 374, - 376, 377, 375, 382, 193, 1119, 383, 1119, 378, 1119, - 384, 193, 226, 367, 379, 369, 373, 370, 227, 228, - 229, 371, 193, 372, 368, 230, 374, 376, 377, 375, - 382, 193, 239, 383, 380, 378, 193, 384, 498, 388, - 193, 379, 193, 373, 1119, 499, 240, 381, 1119, 193, - 500, 501, 241, 242, 502, 1119, 193, 1119, 1119, 239, - 193, 380, 1119, 193, 1119, 498, 388, 193, 1119, 193, - 1119, 193, 499, 240, 381, 193, 193, 500, 501, 241, - 242, 502, 390, 193, 193, 243, 389, 193, 193, 394, - - 391, 193, 395, 244, 193, 193, 193, 245, 193, 503, - 246, 1119, 193, 193, 193, 1119, 504, 1119, 193, 390, - 1119, 193, 243, 389, 193, 193, 394, 391, 193, 395, - 244, 193, 193, 193, 245, 392, 503, 246, 393, 193, - 505, 193, 253, 504, 254, 193, 509, 255, 193, 396, - 397, 193, 510, 511, 256, 257, 1119, 1119, 1119, 193, - 1119, 1119, 392, 398, 193, 393, 193, 505, 193, 253, - 512, 254, 1119, 509, 255, 193, 396, 397, 193, 510, - 511, 256, 257, 406, 401, 426, 193, 193, 193, 1119, - 398, 193, 258, 407, 399, 193, 259, 512, 193, 260, - - 261, 400, 513, 193, 514, 193, 262, 193, 193, 263, - 406, 401, 426, 515, 193, 193, 193, 1119, 1119, 258, - 407, 399, 1119, 259, 1119, 193, 260, 261, 400, 513, - 193, 514, 1119, 262, 193, 193, 263, 1119, 1119, 1119, - 515, 1119, 1119, 193, 91, 91, 91, 91, 91, 91, - 91, 91, 91, 91, 275, 275, 275, 275, 275, 275, - 275, 275, 275, 275, 92, 93, 93, 93, 93, 93, - 93, 93, 93, 93, 93, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 387, 387, 387, 387, 387, - 387, 387, 387, 387, 387, 187, 188, 188, 188, 188, - - 188, 188, 188, 188, 188, 188, 193, 193, 516, 193, - 193, 193, 517, 402, 403, 404, 1119, 405, 1119, 518, - 1119, 417, 408, 414, 415, 416, 193, 409, 1119, 193, - 193, 193, 1119, 193, 193, 516, 193, 193, 193, 517, - 402, 403, 404, 420, 405, 193, 518, 193, 417, 408, - 414, 415, 416, 193, 409, 410, 193, 193, 193, 193, - 411, 418, 419, 193, 1119, 193, 412, 193, 1119, 1119, - 420, 193, 193, 413, 193, 193, 521, 522, 427, 193, - 1119, 523, 410, 193, 1119, 428, 193, 411, 418, 419, - 193, 193, 193, 412, 193, 193, 193, 1119, 193, 524, - - 413, 1119, 193, 521, 522, 427, 193, 193, 523, 429, - 193, 421, 428, 422, 431, 193, 193, 423, 193, 193, - 1119, 1119, 193, 193, 424, 430, 524, 193, 425, 432, - 1119, 1119, 1119, 193, 193, 193, 429, 193, 421, 193, - 422, 431, 193, 193, 423, 193, 193, 433, 193, 193, - 525, 424, 430, 193, 193, 425, 432, 193, 436, 193, - 193, 437, 193, 438, 193, 193, 193, 434, 193, 193, - 435, 193, 193, 193, 433, 193, 193, 525, 526, 193, - 193, 527, 439, 1119, 193, 436, 193, 528, 437, 1119, - 438, 193, 193, 1119, 434, 193, 193, 435, 193, 529, - - 193, 193, 1119, 193, 1119, 526, 193, 1119, 527, 439, - 444, 193, 1119, 1119, 528, 445, 193, 447, 193, 440, - 193, 193, 1119, 446, 530, 1119, 529, 531, 193, 441, - 193, 193, 193, 193, 442, 443, 193, 444, 193, 448, - 193, 449, 445, 193, 447, 453, 440, 193, 193, 519, - 446, 530, 193, 193, 531, 1119, 441, 1119, 193, 193, - 193, 442, 443, 193, 520, 193, 448, 193, 449, 450, - 532, 451, 453, 193, 454, 193, 519, 533, 1119, 193, - 193, 1119, 452, 1119, 455, 193, 193, 193, 193, 534, - 193, 520, 193, 193, 458, 193, 450, 532, 451, 1119, - - 193, 454, 193, 456, 533, 457, 193, 193, 193, 452, - 193, 455, 193, 193, 193, 193, 534, 193, 193, 459, - 193, 458, 193, 193, 193, 460, 461, 193, 1119, 193, - 456, 463, 457, 193, 193, 193, 1119, 193, 193, 475, - 193, 535, 1119, 193, 193, 193, 459, 193, 1119, 193, - 193, 193, 460, 461, 193, 462, 193, 464, 463, 465, - 193, 193, 1119, 466, 1119, 193, 475, 193, 535, 193, - 193, 193, 536, 193, 193, 469, 193, 193, 467, 193, - 471, 193, 462, 468, 464, 1119, 465, 193, 193, 193, - 466, 193, 472, 193, 193, 537, 193, 193, 470, 536, - - 193, 473, 469, 538, 193, 467, 193, 471, 193, 474, - 468, 193, 478, 193, 193, 193, 193, 539, 193, 472, - 193, 193, 537, 477, 193, 470, 476, 193, 473, 193, - 538, 481, 193, 193, 540, 193, 474, 479, 193, 478, - 193, 193, 193, 483, 539, 488, 193, 193, 480, 193, - 477, 193, 193, 476, 193, 1119, 193, 193, 481, 193, - 193, 540, 193, 484, 479, 482, 193, 193, 541, 542, - 483, 1119, 488, 193, 193, 480, 193, 193, 193, 193, - 494, 193, 193, 485, 193, 486, 489, 193, 487, 1119, - 484, 1119, 482, 193, 193, 541, 542, 1119, 193, 1119, - - 193, 193, 193, 492, 193, 490, 193, 494, 193, 193, - 485, 491, 486, 489, 193, 487, 493, 1119, 193, 543, - 496, 495, 544, 193, 193, 193, 193, 193, 193, 193, - 492, 1119, 490, 193, 1119, 1119, 1119, 1119, 491, 1119, - 545, 546, 547, 493, 193, 193, 543, 496, 495, 544, - 193, 193, 548, 193, 275, 275, 275, 275, 275, 275, - 275, 275, 275, 275, 506, 549, 507, 545, 546, 547, - 550, 193, 552, 553, 554, 555, 556, 557, 558, 548, - 551, 508, 559, 560, 561, 562, 563, 564, 565, 566, - 567, 506, 549, 507, 568, 569, 570, 550, 571, 552, - - 553, 554, 555, 556, 557, 558, 572, 551, 508, 559, - 560, 561, 562, 563, 564, 565, 566, 567, 573, 574, - 575, 568, 569, 570, 576, 571, 577, 578, 579, 580, - 581, 582, 583, 572, 584, 585, 586, 587, 588, 589, - 591, 593, 592, 594, 595, 573, 574, 575, 590, 596, - 597, 576, 598, 577, 578, 579, 580, 581, 582, 583, - 599, 584, 585, 586, 587, 588, 589, 591, 593, 592, - 594, 595, 602, 603, 600, 590, 596, 597, 601, 598, - 1119, 1119, 193, 605, 193, 1119, 606, 599, 387, 387, - 387, 387, 387, 387, 387, 387, 387, 387, 193, 602, - - 603, 600, 193, 193, 193, 601, 193, 193, 608, 193, - 605, 193, 193, 606, 607, 1119, 193, 1119, 193, 1119, - 193, 1119, 1119, 712, 610, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 608, 193, 1119, 609, 193, - 193, 607, 193, 193, 611, 193, 193, 193, 193, 612, - 712, 610, 193, 193, 193, 193, 1119, 193, 193, 193, - 623, 1119, 193, 193, 613, 609, 614, 193, 617, 193, - 616, 611, 193, 193, 193, 193, 612, 193, 620, 193, - 193, 615, 618, 193, 193, 193, 193, 623, 621, 193, - 1119, 613, 193, 614, 193, 617, 193, 616, 619, 193, - - 193, 193, 625, 193, 193, 620, 193, 193, 615, 618, - 193, 193, 193, 193, 622, 621, 193, 626, 624, 193, - 193, 193, 629, 193, 1119, 619, 193, 193, 1119, 625, - 193, 193, 627, 193, 628, 193, 193, 193, 193, 193, - 633, 622, 193, 193, 626, 624, 193, 193, 631, 629, - 630, 193, 193, 193, 713, 193, 193, 632, 193, 627, - 193, 628, 193, 193, 193, 635, 193, 633, 714, 193, - 634, 193, 193, 193, 193, 631, 193, 630, 193, 193, - 1119, 713, 193, 193, 632, 193, 636, 193, 193, 193, - 637, 193, 635, 193, 193, 714, 193, 634, 193, 193, - - 193, 193, 639, 193, 641, 640, 642, 638, 193, 193, - 193, 193, 193, 636, 1119, 193, 193, 637, 193, 193, - 193, 193, 1119, 193, 193, 715, 645, 193, 716, 639, - 193, 641, 640, 642, 638, 193, 193, 193, 193, 193, - 193, 193, 646, 193, 1119, 193, 193, 193, 643, 644, - 1119, 193, 715, 645, 717, 716, 1119, 193, 193, 647, - 193, 193, 649, 193, 1119, 193, 193, 193, 193, 646, - 193, 193, 193, 1119, 648, 643, 644, 193, 193, 193, - 193, 717, 718, 652, 1119, 193, 647, 193, 193, 649, - 193, 193, 193, 651, 650, 1119, 654, 193, 193, 193, - - 193, 648, 193, 1119, 193, 193, 193, 193, 655, 718, - 652, 656, 653, 1119, 719, 1119, 193, 193, 193, 720, - 651, 650, 193, 654, 193, 193, 193, 193, 193, 193, - 657, 193, 721, 659, 660, 655, 193, 193, 656, 653, - 658, 719, 662, 193, 193, 193, 720, 1119, 1119, 193, - 193, 193, 193, 1119, 1119, 193, 193, 657, 193, 721, - 659, 660, 193, 193, 193, 722, 661, 658, 1119, 662, - 193, 193, 193, 1119, 663, 664, 193, 193, 193, 193, - 665, 666, 1119, 193, 193, 193, 1119, 667, 1119, 193, - 193, 723, 722, 661, 1119, 193, 193, 193, 193, 193, - - 193, 663, 664, 193, 193, 193, 193, 665, 666, 193, - 669, 193, 193, 193, 667, 193, 668, 193, 723, 674, - 193, 193, 193, 193, 1119, 670, 193, 193, 671, 193, - 193, 193, 193, 193, 675, 1119, 193, 669, 193, 193, - 193, 193, 193, 668, 673, 676, 674, 193, 193, 193, - 193, 672, 670, 193, 193, 671, 193, 193, 193, 193, - 193, 675, 677, 724, 725, 193, 193, 193, 193, 193, - 678, 673, 676, 193, 1119, 679, 193, 193, 672, 193, - 193, 193, 1119, 193, 680, 193, 193, 193, 193, 677, - 724, 725, 193, 684, 193, 682, 193, 678, 681, 1119, - - 193, 686, 679, 193, 193, 1119, 193, 193, 193, 193, - 193, 680, 193, 193, 193, 193, 683, 685, 193, 193, - 684, 193, 682, 1119, 193, 681, 193, 193, 686, 193, - 193, 193, 193, 688, 193, 193, 193, 694, 193, 193, - 193, 689, 193, 683, 685, 193, 193, 193, 193, 690, - 687, 193, 193, 193, 193, 193, 193, 193, 691, 193, - 688, 193, 193, 193, 694, 193, 726, 193, 689, 193, - 692, 193, 693, 193, 193, 193, 690, 687, 727, 193, - 695, 193, 193, 193, 193, 691, 696, 1119, 193, 193, - 193, 193, 728, 726, 193, 697, 701, 692, 193, 693, - - 193, 193, 193, 1119, 193, 727, 193, 695, 193, 193, - 193, 700, 729, 696, 698, 193, 699, 193, 193, 728, - 193, 193, 697, 701, 193, 703, 702, 193, 193, 193, - 706, 193, 704, 193, 193, 193, 193, 193, 700, 729, - 193, 698, 193, 699, 193, 1119, 730, 193, 193, 1119, - 731, 193, 703, 702, 193, 193, 193, 706, 705, 704, - 193, 193, 193, 193, 193, 732, 193, 193, 710, 709, - 733, 734, 707, 730, 735, 193, 708, 731, 736, 737, - 738, 193, 193, 193, 739, 705, 193, 193, 740, 741, - 193, 742, 732, 193, 743, 710, 709, 733, 734, 707, - - 744, 735, 193, 708, 745, 736, 737, 738, 746, 747, - 193, 739, 748, 193, 749, 740, 741, 750, 742, 751, - 753, 743, 754, 755, 756, 757, 758, 744, 759, 760, - 752, 745, 761, 762, 763, 746, 747, 764, 765, 748, - 766, 749, 767, 768, 750, 769, 751, 753, 770, 754, - 755, 756, 757, 758, 771, 759, 760, 752, 772, 761, - 762, 763, 773, 774, 764, 765, 775, 766, 776, 767, - 768, 777, 769, 778, 779, 770, 780, 781, 782, 783, - 784, 771, 785, 786, 787, 772, 788, 789, 790, 773, - 774, 1119, 1119, 775, 1119, 776, 193, 193, 777, 193, - - 778, 779, 1119, 780, 781, 782, 783, 784, 193, 785, - 786, 787, 792, 788, 789, 790, 794, 795, 193, 193, - 193, 793, 798, 193, 193, 1119, 193, 1119, 193, 797, - 193, 796, 193, 193, 1119, 193, 1119, 799, 193, 792, - 193, 193, 193, 794, 795, 193, 193, 193, 793, 798, - 193, 193, 193, 193, 193, 193, 797, 193, 796, 193, - 193, 193, 800, 193, 799, 193, 193, 193, 193, 193, - 801, 193, 193, 1119, 193, 1119, 802, 193, 193, 193, - 193, 193, 193, 193, 1119, 193, 193, 193, 193, 800, - 193, 193, 193, 193, 806, 1119, 804, 801, 193, 193, - - 803, 193, 193, 802, 193, 193, 805, 193, 1119, 193, - 193, 193, 193, 193, 193, 193, 872, 873, 193, 193, - 807, 806, 809, 804, 193, 1119, 193, 803, 193, 193, - 808, 193, 193, 805, 193, 193, 193, 811, 193, 193, - 812, 810, 193, 872, 873, 193, 193, 807, 193, 809, - 193, 193, 813, 193, 193, 193, 193, 808, 193, 193, - 193, 1119, 193, 193, 811, 193, 193, 812, 810, 814, - 193, 815, 193, 193, 193, 193, 1119, 193, 193, 813, - 193, 193, 820, 193, 193, 193, 193, 193, 193, 818, - 819, 1119, 193, 193, 193, 1119, 814, 193, 815, 193, - - 816, 193, 193, 817, 193, 193, 1119, 193, 193, 820, - 874, 193, 193, 193, 193, 193, 818, 819, 193, 193, - 193, 193, 193, 875, 822, 1119, 193, 816, 193, 193, - 817, 193, 193, 821, 193, 193, 1119, 874, 193, 193, - 193, 193, 193, 823, 193, 193, 193, 193, 193, 193, - 875, 822, 193, 825, 193, 193, 193, 193, 826, 193, - 821, 193, 1119, 824, 193, 193, 1119, 193, 193, 193, - 823, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 825, 193, 1119, 193, 193, 826, 827, 828, 193, 193, - 824, 193, 1119, 193, 193, 193, 1119, 193, 193, 193, - - 193, 1119, 829, 193, 193, 193, 193, 193, 831, 193, - 830, 193, 193, 827, 828, 193, 193, 193, 193, 832, - 193, 193, 876, 193, 193, 193, 193, 193, 833, 829, - 1119, 193, 193, 193, 193, 831, 193, 830, 193, 193, - 193, 193, 193, 193, 193, 193, 832, 835, 193, 876, - 193, 193, 836, 193, 193, 833, 1119, 834, 193, 193, - 193, 193, 193, 193, 1119, 193, 839, 193, 193, 193, - 193, 193, 193, 1119, 835, 837, 838, 1119, 193, 836, - 842, 193, 1119, 193, 834, 193, 877, 193, 193, 193, - 193, 193, 193, 839, 841, 1119, 193, 193, 193, 193, - - 193, 878, 837, 838, 840, 845, 193, 842, 193, 193, - 193, 193, 193, 877, 193, 879, 193, 193, 193, 843, - 1119, 841, 844, 193, 193, 880, 193, 193, 878, 193, - 1119, 840, 845, 193, 193, 846, 193, 193, 193, 193, - 193, 193, 879, 193, 193, 848, 843, 847, 881, 844, - 193, 193, 880, 193, 1119, 850, 193, 193, 1119, 193, - 193, 193, 846, 849, 193, 851, 193, 193, 193, 1119, - 193, 193, 848, 193, 847, 881, 193, 193, 193, 193, - 1119, 852, 850, 1119, 193, 853, 193, 193, 193, 854, - 849, 193, 851, 193, 855, 193, 193, 193, 193, 193, - - 193, 1119, 857, 193, 193, 193, 193, 193, 852, 856, - 193, 193, 853, 882, 193, 193, 854, 858, 193, 193, - 193, 855, 193, 193, 193, 193, 193, 193, 193, 857, - 193, 193, 193, 859, 193, 1119, 856, 193, 193, 193, - 882, 193, 860, 193, 858, 861, 193, 193, 193, 193, - 1119, 193, 193, 193, 193, 193, 193, 193, 1119, 867, - 859, 193, 862, 193, 1119, 193, 193, 193, 868, 860, - 193, 865, 861, 193, 193, 193, 193, 863, 864, 193, - 193, 193, 193, 193, 1119, 193, 867, 193, 193, 862, - 193, 193, 193, 866, 193, 868, 193, 193, 865, 870, - - 193, 193, 193, 193, 863, 864, 193, 193, 193, 193, - 193, 193, 193, 869, 193, 883, 193, 193, 193, 193, - 866, 193, 884, 193, 193, 885, 870, 886, 193, 193, - 193, 887, 888, 889, 193, 890, 891, 193, 193, 892, - 869, 893, 883, 193, 193, 894, 193, 895, 193, 884, - 896, 897, 885, 898, 886, 899, 900, 193, 887, 888, - 889, 901, 890, 891, 902, 903, 892, 904, 893, 905, - 906, 907, 894, 908, 895, 909, 910, 896, 897, 911, - 898, 912, 899, 900, 913, 914, 915, 916, 901, 917, - 918, 902, 903, 919, 904, 920, 905, 906, 907, 921, - - 908, 922, 909, 910, 923, 924, 911, 925, 912, 926, - 927, 913, 914, 915, 916, 193, 917, 918, 193, 193, - 919, 193, 920, 930, 193, 1119, 921, 931, 922, 986, - 1119, 923, 924, 987, 925, 193, 926, 927, 193, 193, - 929, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 930, 193, 932, 193, 931, 936, 986, 193, 933, 988, - 987, 1119, 193, 193, 1119, 193, 193, 929, 193, 193, - 193, 193, 934, 193, 193, 193, 193, 193, 193, 932, - 193, 1119, 936, 193, 193, 933, 988, 193, 935, 940, - 193, 937, 193, 193, 1119, 1119, 193, 989, 193, 934, - - 193, 193, 193, 938, 193, 193, 990, 193, 939, 193, - 193, 1119, 193, 193, 193, 935, 940, 193, 937, 193, - 193, 193, 193, 944, 989, 193, 941, 991, 193, 992, - 938, 1119, 942, 990, 193, 939, 193, 193, 193, 193, - 193, 945, 193, 193, 193, 1119, 1119, 943, 193, 193, - 944, 193, 193, 941, 991, 1119, 992, 993, 193, 942, - 193, 193, 193, 193, 193, 193, 946, 947, 945, 193, - 193, 193, 193, 950, 943, 193, 948, 193, 193, 193, - 193, 949, 193, 193, 993, 193, 193, 193, 193, 193, - 193, 193, 994, 946, 947, 193, 995, 193, 193, 193, - - 950, 951, 193, 948, 193, 193, 193, 193, 949, 193, - 193, 193, 952, 193, 193, 193, 953, 1119, 193, 994, - 193, 996, 193, 995, 193, 193, 193, 1119, 951, 193, - 193, 956, 193, 193, 193, 193, 1119, 1119, 193, 952, - 193, 193, 193, 953, 954, 955, 193, 193, 996, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 956, 193, - 193, 193, 193, 193, 193, 959, 958, 193, 957, 193, - 1119, 954, 955, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 959, 958, 960, 957, 193, 193, 193, 193, - - 961, 193, 193, 962, 1119, 997, 193, 193, 193, 193, - 193, 193, 193, 963, 1119, 193, 193, 193, 193, 193, - 1119, 960, 966, 998, 193, 193, 193, 961, 193, 193, - 962, 193, 997, 193, 193, 193, 193, 1119, 1119, 193, - 963, 964, 193, 967, 193, 193, 193, 965, 193, 966, - 998, 193, 999, 968, 193, 193, 193, 193, 193, 193, - 193, 193, 1000, 969, 970, 193, 193, 193, 964, 193, - 967, 1001, 1119, 193, 965, 193, 1119, 193, 193, 999, - 968, 193, 972, 193, 193, 193, 193, 193, 971, 1000, - 969, 970, 193, 193, 193, 973, 1119, 193, 1001, 193, - - 193, 193, 1119, 193, 193, 193, 1119, 1002, 1119, 972, - 193, 974, 193, 1003, 193, 971, 976, 193, 975, 193, - 193, 193, 973, 977, 193, 193, 193, 193, 193, 978, - 193, 193, 193, 193, 1002, 979, 980, 193, 974, 981, - 1003, 193, 1119, 976, 193, 975, 193, 193, 193, 1004, - 977, 193, 193, 193, 193, 193, 978, 193, 193, 193, - 193, 193, 979, 980, 193, 193, 981, 983, 193, 984, - 193, 193, 1005, 193, 193, 1006, 1004, 1007, 193, 982, - 193, 1008, 193, 1009, 193, 193, 193, 1010, 193, 1011, - 193, 193, 193, 193, 983, 1012, 984, 193, 193, 1005, - - 193, 1013, 1006, 1014, 1007, 1015, 982, 1017, 1008, 193, - 1009, 1019, 193, 1048, 1010, 193, 1011, 193, 193, 193, - 193, 193, 1012, 193, 1018, 1049, 1119, 193, 1013, 193, - 1014, 193, 1015, 1020, 1017, 193, 193, 193, 1019, 193, - 1048, 193, 193, 193, 1021, 193, 193, 1023, 193, 193, - 193, 1018, 1049, 1022, 193, 193, 193, 193, 193, 193, - 1020, 1119, 193, 193, 193, 193, 193, 1050, 193, 193, - 193, 1021, 193, 193, 1023, 193, 193, 193, 1024, 193, - 1022, 1119, 193, 193, 193, 1025, 193, 1026, 193, 193, - 193, 193, 193, 193, 1050, 1119, 193, 193, 1119, 1027, - - 193, 193, 193, 193, 193, 1024, 193, 193, 193, 193, - 193, 193, 1025, 193, 1026, 193, 193, 193, 193, 193, - 193, 193, 1028, 193, 193, 193, 1027, 193, 193, 1051, - 193, 193, 1029, 193, 193, 193, 193, 193, 193, 1119, - 193, 193, 193, 1031, 193, 193, 193, 193, 193, 1028, - 193, 193, 193, 193, 193, 1030, 1051, 193, 193, 1029, - 193, 193, 193, 193, 193, 1035, 193, 193, 193, 193, - 1031, 1033, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 1034, 1030, 1032, 193, 193, 193, 193, 193, 193, - 193, 1052, 1035, 193, 193, 193, 193, 1053, 1033, 1036, - - 193, 193, 193, 193, 193, 193, 193, 193, 1034, 1037, - 1032, 193, 193, 193, 193, 1038, 1119, 193, 1052, 1039, - 193, 193, 193, 193, 1053, 193, 1036, 1119, 193, 193, - 1054, 193, 193, 193, 193, 1041, 1037, 193, 193, 193, - 193, 1042, 1038, 193, 193, 193, 1039, 193, 193, 193, - 1040, 1055, 193, 193, 193, 193, 193, 1054, 193, 193, - 193, 1119, 1041, 193, 193, 193, 193, 193, 1042, 1043, - 193, 193, 193, 193, 193, 193, 193, 1040, 1055, 193, - 193, 193, 193, 193, 193, 1056, 193, 193, 1044, 1057, - 193, 193, 193, 193, 1046, 1058, 1043, 1045, 193, 193, - - 193, 193, 193, 193, 193, 1059, 193, 193, 1060, 193, - 193, 193, 1056, 193, 193, 1044, 1057, 193, 193, 193, - 193, 1046, 1058, 193, 1045, 1062, 193, 193, 1064, 193, - 193, 193, 1059, 193, 193, 1060, 193, 193, 1063, 193, - 193, 1119, 193, 193, 193, 193, 193, 193, 193, 1076, - 193, 193, 1062, 193, 193, 1064, 193, 193, 1119, 193, - 193, 193, 193, 1077, 193, 1063, 193, 193, 1065, 193, - 193, 193, 193, 193, 193, 193, 1076, 193, 193, 193, - 193, 193, 1119, 1066, 193, 193, 193, 193, 193, 193, - 1077, 1068, 1119, 193, 193, 1065, 193, 193, 193, 193, - - 193, 1078, 1079, 1080, 193, 193, 193, 193, 193, 1067, - 1066, 193, 193, 193, 193, 193, 193, 193, 1068, 193, - 193, 1070, 1069, 193, 193, 193, 193, 193, 1078, 1079, - 1080, 193, 193, 1074, 193, 193, 1067, 193, 193, 1072, - 193, 193, 193, 193, 193, 193, 193, 193, 1070, 1069, - 1071, 193, 193, 193, 193, 193, 1073, 193, 193, 1081, - 1074, 193, 193, 1119, 193, 193, 1072, 193, 193, 1119, - 193, 1090, 193, 193, 193, 193, 193, 1071, 193, 193, - 193, 1119, 193, 1073, 193, 193, 1081, 193, 193, 193, - 193, 1083, 193, 193, 193, 193, 193, 193, 1090, 193, - - 193, 193, 193, 193, 1084, 193, 193, 193, 1085, 193, - 1119, 1091, 193, 193, 193, 193, 193, 193, 1083, 193, - 193, 193, 193, 193, 1087, 1086, 193, 1092, 193, 1094, - 1119, 1084, 193, 193, 193, 1085, 193, 193, 1091, 193, - 193, 1088, 193, 193, 1119, 193, 193, 193, 193, 193, - 1098, 1087, 1086, 193, 1092, 193, 1094, 193, 193, 1095, - 193, 193, 1119, 193, 193, 193, 193, 193, 1088, 1119, - 193, 1096, 193, 193, 193, 193, 193, 1098, 193, 193, - 193, 193, 193, 1119, 193, 193, 1095, 193, 193, 1119, - 193, 1119, 193, 1119, 193, 1119, 1100, 1119, 1096, 193, - - 193, 1119, 193, 1119, 1119, 193, 193, 193, 193, 1119, - 1119, 1119, 1119, 1119, 193, 1119, 1119, 1119, 1119, 1119, - 1119, 1119, 1119, 1100, 1119, 1119, 193, 1119, 1119, 1119, - 1119, 1119, 1119, 1119, 193, 46, 46, 46, 46, 46, - 88, 1119, 1119, 88, 88, 178, 178, 178, 1119, 178, - 180, 1119, 180, 180, 180, 183, 1119, 183, 183, 183, - 193, 1119, 193, 193, 193, 7, 1119, 1119, 1119, 1119, - 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, - 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, - 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, - - 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, - 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, - 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, - 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, - 1119, 1119 - } ; - -static const flex_int16_t yy_chk[4543] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 9, 9, 10, 10, 15, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 15, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, - 18, 21, 22, 21, 24, 1122, 23, 30, 24, 21, - 1116, 21, 24, 23, 31, 21, 21, 44, 24, 99, - - 23, 24, 22, 23, 1115, 25, 1114, 25, 21, 22, - 21, 24, 25, 23, 30, 24, 21, 25, 21, 24, - 23, 31, 21, 21, 44, 24, 99, 23, 24, 22, - 23, 27, 25, 28, 25, 1113, 32, 27, 1112, 25, - 32, 28, 29, 42, 25, 26, 32, 28, 29, 29, - 29, 42, 1111, 26, 1110, 29, 26, 1109, 27, 26, - 28, 1108, 26, 32, 27, 26, 1107, 32, 28, 29, - 42, 1106, 26, 32, 28, 29, 29, 29, 42, 34, - 26, 33, 29, 26, 36, 33, 26, 43, 43, 26, - 35, 33, 26, 34, 1105, 36, 49, 49, 35, 34, - - 34, 36, 35, 38, 1104, 35, 34, 38, 33, 50, - 50, 36, 33, 38, 43, 43, 1103, 35, 33, 41, - 34, 41, 36, 100, 41, 35, 34, 34, 36, 35, - 38, 39, 35, 39, 38, 103, 39, 71, 55, 104, - 38, 58, 58, 39, 39, 1102, 41, 1101, 41, 55, - 100, 41, 86, 86, 67, 70, 108, 71, 39, 1099, - 39, 67, 103, 39, 71, 70, 104, 67, 111, 101, - 39, 39, 40, 111, 67, 70, 40, 101, 107, 40, - 40, 67, 70, 108, 71, 107, 40, 114, 67, 40, - 181, 181, 70, 1097, 67, 111, 101, 1093, 1089, 40, - - 111, 67, 70, 40, 101, 107, 40, 40, 1082, 1075, - 1061, 1047, 107, 40, 114, 1016, 40, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, 61, 61, - 985, 61, 61, 61, 61, 61, 61, 77, 68, 84, - 928, 871, 68, 791, 711, 115, 68, 61, 61, 61, - 72, 116, 68, 61, 72, 61, 117, 77, 118, 84, - 72, 61, 68, 61, 77, 68, 84, 61, 61, 68, - 72, 83, 115, 68, 83, 83, 604, 72, 116, 68, - 61, 72, 61, 117, 77, 118, 84, 72, 61, 68, - - 61, 83, 120, 497, 61, 61, 386, 72, 83, 274, - 185, 83, 83, 61, 62, 62, 183, 62, 62, 62, - 62, 62, 62, 90, 88, 85, 73, 76, 83, 120, - 73, 76, 60, 62, 62, 62, 73, 110, 76, 78, - 62, 81, 102, 78, 76, 102, 73, 110, 121, 78, - 81, 76, 81, 73, 76, 81, 122, 73, 76, 78, - 62, 81, 59, 73, 110, 76, 78, 62, 81, 102, - 78, 76, 102, 73, 110, 121, 78, 81, 76, 81, - 52, 51, 81, 122, 105, 105, 78, 62, 81, 62, - 63, 123, 82, 124, 63, 125, 82, 63, 105, 126, - - 82, 109, 109, 109, 63, 109, 47, 63, 113, 113, - 127, 105, 105, 129, 63, 45, 82, 63, 123, 82, - 124, 63, 125, 82, 63, 105, 126, 82, 109, 109, - 109, 63, 109, 112, 63, 113, 113, 127, 112, 20, - 129, 63, 64, 82, 112, 19, 64, 130, 132, 128, - 64, 112, 128, 133, 135, 119, 64, 119, 136, 64, - 112, 119, 137, 11, 138, 112, 64, 7, 119, 64, - 141, 112, 119, 64, 130, 132, 128, 64, 112, 128, - 133, 135, 119, 64, 119, 136, 64, 4, 119, 137, - 134, 138, 142, 64, 65, 119, 139, 141, 139, 119, - - 134, 65, 143, 65, 144, 134, 134, 140, 65, 140, - 145, 146, 147, 65, 65, 3, 148, 134, 150, 142, - 140, 65, 151, 139, 152, 139, 0, 134, 65, 143, - 65, 144, 134, 134, 140, 65, 140, 145, 146, 147, - 65, 65, 66, 148, 153, 150, 66, 140, 154, 151, - 66, 152, 154, 66, 156, 155, 66, 157, 158, 66, - 155, 159, 66, 160, 161, 162, 66, 0, 0, 66, - 159, 153, 163, 66, 0, 154, 0, 66, 159, 154, - 66, 156, 155, 66, 157, 158, 66, 155, 159, 66, - 160, 161, 162, 66, 69, 69, 164, 159, 165, 163, - - 166, 69, 69, 69, 167, 159, 168, 164, 69, 169, - 170, 171, 169, 174, 69, 0, 175, 0, 172, 0, - 176, 69, 69, 164, 172, 165, 168, 166, 69, 69, - 69, 167, 193, 168, 164, 69, 169, 170, 171, 169, - 174, 69, 74, 175, 173, 172, 74, 176, 277, 194, - 194, 172, 193, 168, 0, 279, 74, 173, 0, 193, - 280, 282, 74, 74, 284, 0, 74, 0, 0, 74, - 194, 173, 0, 74, 0, 277, 194, 194, 0, 193, - 0, 195, 279, 74, 173, 196, 198, 280, 282, 74, - 74, 284, 196, 74, 75, 75, 195, 194, 201, 198, - - 196, 195, 199, 75, 199, 196, 198, 75, 195, 285, - 75, 0, 196, 198, 75, 0, 286, 0, 201, 196, - 0, 75, 75, 195, 199, 201, 198, 196, 195, 199, - 75, 199, 196, 198, 75, 197, 285, 75, 197, 197, - 287, 75, 79, 286, 79, 201, 289, 79, 200, 200, - 200, 199, 290, 291, 79, 79, 0, 0, 0, 197, - 0, 0, 197, 200, 79, 197, 197, 287, 200, 79, - 292, 79, 0, 289, 79, 200, 200, 200, 215, 290, - 291, 79, 79, 205, 203, 215, 197, 202, 203, 0, - 200, 79, 80, 205, 202, 200, 80, 292, 215, 80, - - 80, 202, 293, 205, 294, 215, 80, 202, 203, 80, - 205, 203, 215, 295, 202, 203, 80, 0, 0, 80, - 205, 202, 0, 80, 0, 215, 80, 80, 202, 293, - 205, 294, 0, 80, 202, 203, 80, 0, 0, 0, - 295, 0, 0, 80, 91, 91, 91, 91, 91, 91, - 91, 91, 91, 91, 92, 92, 92, 92, 92, 92, - 92, 92, 92, 92, 93, 93, 93, 93, 93, 93, - 93, 93, 93, 93, 93, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 187, 187, 187, 187, 187, - 187, 187, 187, 187, 187, 188, 188, 188, 188, 188, - - 188, 188, 188, 188, 188, 188, 204, 206, 296, 209, - 208, 210, 298, 204, 204, 204, 0, 204, 0, 299, - 0, 210, 206, 208, 208, 209, 204, 206, 0, 209, - 208, 210, 0, 204, 206, 296, 209, 208, 210, 298, - 204, 204, 204, 213, 204, 213, 299, 211, 210, 206, - 208, 208, 209, 204, 206, 207, 209, 208, 210, 207, - 207, 211, 212, 212, 0, 213, 207, 211, 0, 0, - 213, 216, 213, 207, 211, 217, 301, 302, 216, 207, - 0, 303, 207, 212, 0, 217, 207, 207, 211, 212, - 212, 216, 213, 207, 211, 217, 218, 0, 216, 304, - - 207, 0, 217, 301, 302, 216, 207, 220, 303, 218, - 212, 214, 217, 214, 220, 219, 218, 214, 216, 221, - 0, 0, 217, 218, 214, 219, 304, 220, 214, 221, - 0, 0, 0, 214, 220, 219, 218, 222, 214, 221, - 214, 220, 219, 218, 214, 225, 221, 222, 226, 224, - 305, 214, 219, 223, 220, 214, 221, 222, 224, 227, - 214, 225, 219, 227, 222, 225, 221, 223, 226, 224, - 223, 228, 225, 223, 222, 226, 224, 305, 306, 227, - 223, 308, 228, 0, 222, 224, 227, 309, 225, 0, - 227, 228, 225, 0, 223, 226, 224, 223, 228, 310, - - 223, 230, 0, 232, 0, 306, 227, 0, 308, 228, - 230, 231, 0, 0, 309, 231, 233, 233, 228, 229, - 229, 230, 0, 232, 311, 0, 310, 312, 230, 229, - 232, 231, 236, 234, 229, 229, 233, 230, 231, 234, - 229, 234, 231, 233, 233, 236, 229, 229, 230, 300, - 232, 311, 236, 234, 312, 0, 229, 0, 231, 236, - 234, 229, 229, 233, 300, 237, 234, 229, 234, 235, - 313, 235, 236, 235, 237, 238, 300, 314, 0, 236, - 234, 0, 235, 0, 238, 237, 244, 241, 239, 315, - 240, 300, 237, 235, 241, 238, 235, 313, 235, 0, - - 235, 237, 238, 239, 314, 240, 244, 241, 239, 235, - 240, 238, 237, 244, 241, 239, 315, 240, 247, 242, - 235, 241, 238, 242, 243, 243, 245, 245, 0, 255, - 239, 247, 240, 244, 241, 239, 0, 240, 247, 255, - 246, 316, 0, 242, 243, 247, 242, 245, 0, 255, - 242, 243, 243, 245, 245, 246, 255, 248, 247, 249, - 246, 248, 0, 249, 0, 247, 255, 246, 316, 250, - 242, 243, 317, 251, 245, 251, 255, 253, 250, 249, - 253, 248, 246, 250, 248, 0, 249, 246, 248, 250, - 249, 252, 254, 251, 254, 318, 250, 253, 252, 317, - - 251, 254, 251, 319, 253, 250, 249, 253, 248, 254, - 250, 252, 258, 256, 254, 258, 250, 320, 252, 254, - 251, 254, 318, 257, 253, 252, 256, 257, 254, 259, - 319, 260, 262, 256, 321, 258, 254, 259, 252, 258, - 256, 254, 258, 262, 320, 265, 265, 257, 259, 259, - 257, 260, 262, 256, 257, 0, 259, 261, 260, 262, - 256, 321, 258, 263, 259, 261, 265, 263, 322, 323, - 262, 0, 265, 265, 257, 259, 259, 261, 260, 262, - 269, 264, 266, 263, 261, 264, 266, 263, 264, 0, - 263, 0, 261, 265, 263, 322, 323, 0, 267, 0, - - 269, 264, 266, 268, 261, 267, 270, 269, 264, 266, - 263, 267, 264, 266, 263, 264, 268, 0, 267, 324, - 271, 270, 325, 268, 271, 267, 270, 269, 264, 266, - 268, 0, 267, 270, 0, 0, 0, 0, 267, 0, - 326, 327, 328, 268, 271, 267, 324, 271, 270, 325, - 268, 271, 329, 270, 275, 275, 275, 275, 275, 275, - 275, 275, 275, 275, 288, 330, 288, 326, 327, 328, - 331, 271, 332, 333, 335, 336, 337, 338, 339, 329, - 331, 288, 340, 341, 342, 343, 344, 346, 347, 348, - 349, 288, 330, 288, 350, 351, 352, 331, 353, 332, - - 333, 335, 336, 337, 338, 339, 354, 331, 288, 340, - 341, 342, 343, 344, 346, 347, 348, 349, 355, 356, - 357, 350, 351, 352, 358, 353, 359, 360, 361, 363, - 364, 365, 366, 354, 367, 368, 369, 370, 372, 373, - 374, 375, 374, 376, 377, 355, 356, 357, 373, 378, - 379, 358, 380, 359, 360, 361, 363, 364, 365, 366, - 381, 367, 368, 369, 370, 372, 373, 374, 375, 374, - 376, 377, 383, 384, 382, 373, 378, 379, 382, 380, - 0, 0, 388, 389, 390, 0, 391, 381, 387, 387, - 387, 387, 387, 387, 387, 387, 387, 387, 393, 383, - - 384, 382, 388, 389, 390, 382, 391, 392, 394, 388, - 389, 390, 394, 391, 392, 0, 395, 0, 393, 0, - 397, 0, 0, 498, 397, 393, 398, 392, 396, 388, - 389, 390, 394, 391, 392, 394, 395, 0, 396, 394, - 397, 392, 399, 395, 398, 393, 398, 397, 396, 399, - 498, 397, 402, 398, 392, 396, 0, 401, 405, 394, - 408, 0, 399, 395, 400, 396, 400, 397, 402, 399, - 401, 398, 402, 398, 403, 396, 399, 401, 405, 402, - 408, 400, 403, 404, 401, 405, 400, 408, 406, 399, - 0, 400, 406, 400, 403, 402, 409, 401, 404, 402, - - 407, 403, 411, 404, 401, 405, 411, 408, 400, 403, - 404, 410, 406, 400, 407, 406, 409, 412, 410, 406, - 407, 403, 414, 409, 0, 404, 411, 407, 0, 411, - 404, 410, 412, 411, 413, 415, 413, 412, 410, 406, - 418, 407, 414, 409, 412, 410, 417, 407, 416, 414, - 415, 416, 419, 411, 499, 415, 413, 417, 410, 412, - 418, 413, 415, 413, 412, 421, 417, 418, 500, 414, - 420, 416, 419, 417, 420, 416, 423, 415, 416, 419, - 0, 499, 415, 413, 417, 421, 422, 418, 422, 425, - 423, 426, 421, 417, 420, 500, 423, 420, 416, 419, - - 424, 420, 425, 423, 427, 426, 428, 424, 422, 425, - 428, 426, 421, 422, 0, 422, 425, 423, 426, 431, - 424, 420, 0, 423, 427, 501, 431, 424, 502, 425, - 428, 427, 426, 428, 424, 422, 425, 428, 426, 431, - 429, 430, 432, 433, 0, 432, 431, 424, 429, 430, - 0, 427, 501, 431, 503, 502, 0, 428, 435, 433, - 429, 430, 435, 433, 0, 432, 431, 429, 430, 432, - 433, 434, 432, 0, 434, 429, 430, 438, 435, 436, - 437, 503, 504, 438, 0, 435, 433, 429, 430, 435, - 433, 434, 432, 437, 436, 0, 440, 438, 434, 436, - - 437, 434, 439, 0, 438, 435, 436, 437, 441, 504, - 438, 442, 439, 0, 506, 0, 440, 444, 434, 510, - 437, 436, 439, 440, 438, 445, 436, 437, 441, 439, - 443, 442, 511, 444, 445, 441, 446, 444, 442, 439, - 443, 506, 448, 440, 444, 445, 510, 0, 0, 439, - 443, 447, 445, 0, 0, 441, 446, 443, 442, 511, - 444, 445, 448, 446, 444, 512, 447, 443, 0, 448, - 449, 447, 445, 0, 449, 450, 450, 443, 447, 452, - 451, 452, 0, 446, 451, 453, 0, 453, 0, 448, - 449, 514, 512, 447, 0, 455, 450, 449, 447, 452, - - 454, 449, 450, 450, 451, 453, 452, 451, 452, 456, - 455, 451, 453, 457, 453, 455, 454, 449, 514, 461, - 454, 458, 455, 450, 0, 456, 452, 454, 458, 456, - 460, 451, 453, 457, 462, 0, 456, 455, 459, 461, - 457, 458, 455, 454, 460, 463, 461, 454, 458, 463, - 460, 459, 456, 464, 462, 458, 456, 460, 459, 465, - 457, 462, 464, 515, 516, 459, 461, 466, 458, 463, - 465, 460, 463, 464, 0, 466, 463, 460, 459, 465, - 464, 462, 0, 468, 467, 459, 465, 466, 467, 464, - 515, 516, 469, 471, 466, 469, 463, 465, 468, 0, - - 464, 473, 466, 468, 474, 0, 465, 472, 467, 470, - 468, 467, 469, 471, 466, 467, 470, 472, 476, 469, - 471, 473, 469, 0, 474, 468, 477, 472, 473, 470, - 468, 474, 475, 476, 472, 467, 470, 482, 476, 469, - 471, 477, 478, 470, 472, 476, 477, 479, 473, 478, - 475, 474, 475, 477, 472, 480, 470, 482, 479, 475, - 476, 483, 478, 481, 482, 476, 517, 479, 477, 478, - 480, 484, 481, 477, 479, 480, 478, 475, 518, 475, - 484, 483, 480, 481, 482, 479, 485, 0, 483, 478, - 481, 484, 519, 517, 479, 485, 488, 480, 484, 481, - - 488, 487, 480, 0, 486, 518, 485, 484, 483, 490, - 481, 487, 520, 485, 486, 493, 486, 489, 484, 519, - 488, 487, 485, 488, 486, 490, 489, 488, 487, 490, - 493, 486, 491, 485, 491, 493, 490, 489, 487, 520, - 492, 486, 493, 486, 489, 0, 521, 488, 487, 0, - 522, 486, 490, 489, 491, 496, 490, 493, 492, 491, - 492, 491, 493, 494, 489, 523, 495, 492, 496, 495, - 524, 527, 494, 521, 528, 496, 494, 522, 529, 530, - 531, 491, 496, 494, 532, 492, 495, 492, 533, 535, - 494, 536, 523, 495, 539, 496, 495, 524, 527, 494, - - 540, 528, 496, 494, 542, 529, 530, 531, 545, 546, - 494, 532, 547, 495, 548, 533, 535, 549, 536, 550, - 552, 539, 556, 558, 560, 561, 561, 540, 562, 563, - 550, 542, 565, 566, 567, 545, 546, 568, 569, 547, - 571, 548, 572, 573, 549, 574, 550, 552, 575, 556, - 558, 560, 561, 561, 576, 562, 563, 550, 577, 565, - 566, 567, 578, 579, 568, 569, 581, 571, 582, 572, - 573, 583, 574, 584, 587, 575, 588, 590, 591, 592, - 593, 576, 594, 595, 596, 577, 597, 599, 601, 578, - 579, 0, 0, 581, 0, 582, 607, 608, 583, 605, - - 584, 587, 0, 588, 590, 591, 592, 593, 606, 594, - 595, 596, 605, 597, 599, 601, 607, 608, 609, 605, - 610, 606, 611, 607, 608, 0, 605, 0, 606, 610, - 612, 609, 614, 615, 0, 606, 0, 613, 609, 605, - 610, 613, 611, 607, 608, 609, 605, 610, 606, 611, - 612, 616, 614, 615, 617, 606, 610, 612, 609, 614, - 615, 613, 617, 619, 613, 609, 618, 610, 613, 611, - 618, 616, 620, 0, 617, 0, 619, 612, 616, 614, - 615, 617, 622, 619, 0, 621, 618, 624, 613, 617, - 619, 623, 620, 618, 624, 0, 622, 618, 616, 620, - - 621, 617, 622, 619, 625, 621, 623, 624, 0, 622, - 619, 623, 621, 618, 624, 626, 714, 716, 623, 620, - 625, 624, 627, 622, 625, 0, 627, 621, 628, 622, - 626, 625, 621, 623, 624, 626, 630, 629, 623, 629, - 630, 628, 626, 714, 716, 631, 627, 625, 628, 627, - 632, 625, 631, 627, 633, 628, 630, 626, 634, 629, - 635, 0, 626, 630, 629, 631, 629, 630, 628, 634, - 632, 635, 631, 627, 633, 628, 0, 632, 634, 631, - 635, 633, 640, 630, 636, 634, 629, 635, 637, 638, - 639, 0, 631, 638, 639, 0, 634, 632, 635, 641, - - 636, 633, 640, 637, 636, 634, 0, 635, 637, 640, - 718, 636, 644, 638, 639, 637, 638, 639, 642, 641, - 638, 639, 645, 719, 643, 0, 641, 636, 643, 640, - 637, 636, 644, 642, 648, 637, 0, 718, 642, 644, - 638, 639, 645, 646, 649, 642, 641, 646, 643, 645, - 719, 643, 647, 649, 648, 643, 650, 651, 652, 644, - 642, 648, 0, 647, 649, 642, 0, 646, 654, 645, - 646, 649, 647, 653, 646, 643, 650, 651, 652, 647, - 649, 648, 0, 650, 651, 652, 653, 654, 654, 655, - 647, 649, 0, 653, 646, 654, 0, 656, 658, 647, - - 653, 0, 655, 650, 651, 652, 657, 660, 657, 655, - 656, 661, 662, 653, 654, 654, 655, 656, 658, 657, - 653, 659, 720, 664, 656, 658, 657, 660, 659, 655, - 0, 661, 662, 657, 660, 657, 655, 656, 661, 662, - 665, 659, 663, 664, 656, 658, 657, 665, 659, 720, - 664, 666, 667, 657, 660, 659, 0, 663, 661, 662, - 665, 668, 663, 669, 0, 671, 669, 665, 659, 663, - 664, 666, 667, 0, 665, 668, 668, 0, 666, 667, - 673, 668, 0, 669, 663, 671, 721, 665, 668, 663, - 669, 670, 671, 669, 672, 0, 672, 676, 666, 667, - - 673, 722, 668, 668, 670, 676, 674, 673, 668, 675, - 669, 670, 671, 721, 677, 723, 672, 676, 670, 674, - 0, 672, 675, 672, 676, 725, 674, 673, 722, 675, - 0, 670, 676, 674, 677, 678, 675, 680, 670, 678, - 682, 677, 723, 672, 676, 680, 674, 679, 726, 675, - 681, 679, 725, 674, 0, 682, 675, 680, 0, 678, - 682, 677, 678, 681, 680, 683, 678, 682, 683, 0, - 681, 679, 680, 684, 679, 726, 685, 681, 679, 687, - 0, 684, 682, 0, 680, 685, 678, 682, 683, 686, - 681, 686, 683, 684, 688, 683, 685, 681, 679, 687, - - 684, 0, 690, 685, 692, 689, 687, 691, 684, 689, - 693, 686, 685, 727, 688, 683, 686, 691, 686, 694, - 684, 688, 690, 685, 692, 689, 687, 691, 695, 690, - 693, 692, 689, 694, 691, 0, 689, 693, 686, 694, - 727, 688, 695, 696, 691, 697, 694, 697, 695, 690, - 0, 692, 689, 698, 691, 695, 701, 693, 0, 703, - 694, 699, 698, 696, 0, 704, 694, 697, 704, 695, - 696, 701, 697, 698, 697, 695, 701, 699, 700, 703, - 698, 699, 700, 701, 0, 704, 703, 705, 699, 698, - 696, 702, 704, 702, 697, 704, 707, 706, 701, 708, - - 698, 709, 700, 701, 699, 700, 703, 705, 699, 700, - 710, 702, 704, 706, 705, 728, 707, 706, 702, 708, - 702, 709, 730, 707, 706, 731, 708, 732, 709, 700, - 710, 733, 734, 735, 705, 736, 737, 710, 702, 738, - 706, 739, 728, 707, 706, 742, 708, 743, 709, 730, - 745, 747, 731, 750, 732, 751, 752, 710, 733, 734, - 735, 753, 736, 737, 758, 760, 738, 761, 739, 762, - 765, 766, 742, 767, 743, 768, 769, 745, 747, 771, - 750, 772, 751, 752, 773, 774, 775, 776, 753, 777, - 778, 758, 760, 779, 761, 780, 762, 765, 766, 781, - - 767, 783, 768, 769, 784, 785, 771, 787, 772, 788, - 789, 773, 774, 775, 776, 792, 777, 778, 793, 794, - 779, 795, 780, 796, 797, 0, 781, 798, 783, 872, - 0, 784, 785, 874, 787, 792, 788, 789, 793, 794, - 794, 795, 792, 796, 797, 793, 794, 798, 795, 800, - 796, 797, 799, 799, 798, 803, 872, 801, 800, 875, - 874, 0, 792, 804, 0, 793, 794, 794, 795, 800, - 796, 797, 801, 799, 798, 803, 800, 801, 802, 799, - 799, 0, 803, 804, 801, 800, 875, 805, 802, 808, - 804, 805, 809, 806, 0, 0, 800, 876, 802, 801, - - 799, 807, 803, 806, 801, 802, 878, 805, 807, 808, - 804, 0, 809, 806, 805, 802, 808, 811, 805, 809, - 806, 807, 810, 813, 876, 802, 810, 880, 807, 881, - 806, 0, 811, 878, 805, 807, 808, 811, 812, 809, - 806, 814, 810, 813, 811, 0, 0, 812, 807, 810, - 813, 815, 816, 810, 880, 0, 881, 882, 812, 811, - 820, 814, 817, 821, 811, 812, 815, 816, 814, 810, - 813, 815, 816, 819, 812, 819, 817, 818, 815, 816, - 820, 818, 817, 821, 882, 812, 822, 820, 814, 817, - 821, 824, 884, 815, 816, 819, 886, 818, 815, 816, - - 819, 822, 819, 817, 818, 823, 822, 820, 818, 817, - 821, 824, 823, 822, 825, 826, 825, 0, 824, 884, - 828, 890, 819, 886, 818, 823, 829, 0, 822, 827, - 830, 831, 823, 822, 825, 826, 0, 0, 824, 823, - 828, 825, 826, 825, 827, 830, 829, 828, 890, 827, - 830, 831, 823, 829, 832, 834, 827, 830, 831, 833, - 835, 825, 826, 836, 837, 838, 833, 828, 832, 839, - 0, 827, 830, 829, 832, 834, 827, 830, 831, 833, - 835, 832, 834, 836, 837, 838, 833, 835, 842, 839, - 836, 837, 838, 833, 840, 832, 839, 841, 840, 843, - - 841, 832, 834, 842, 0, 892, 833, 835, 842, 844, - 836, 837, 838, 845, 0, 842, 839, 841, 840, 843, - 0, 840, 848, 893, 841, 840, 843, 841, 846, 844, - 842, 850, 892, 845, 847, 842, 844, 0, 0, 849, - 845, 846, 848, 849, 841, 840, 843, 847, 846, 848, - 893, 850, 899, 851, 847, 846, 844, 851, 850, 849, - 845, 847, 900, 852, 853, 853, 849, 852, 846, 848, - 849, 903, 0, 854, 847, 846, 0, 851, 850, 899, - 851, 847, 855, 855, 851, 853, 849, 852, 854, 900, - 852, 853, 853, 854, 852, 856, 0, 857, 903, 856, - - 854, 859, 0, 855, 851, 858, 0, 904, 0, 855, - 855, 857, 853, 906, 852, 854, 859, 857, 858, 856, - 854, 859, 856, 860, 857, 858, 856, 860, 859, 861, - 855, 862, 858, 861, 904, 863, 864, 864, 857, 865, - 906, 866, 0, 859, 857, 858, 856, 860, 859, 907, - 860, 862, 858, 861, 860, 863, 861, 864, 862, 865, - 861, 866, 863, 864, 864, 867, 865, 868, 866, 869, - 870, 868, 908, 869, 860, 910, 907, 911, 862, 867, - 861, 912, 863, 916, 864, 867, 865, 918, 866, 919, - 870, 868, 867, 869, 868, 920, 869, 870, 868, 908, - - 869, 921, 910, 926, 911, 927, 867, 929, 912, 930, - 916, 932, 867, 991, 918, 931, 919, 870, 868, 933, - 869, 934, 920, 936, 931, 992, 0, 929, 921, 930, - 926, 932, 927, 933, 929, 931, 930, 935, 932, 933, - 991, 934, 931, 936, 935, 937, 933, 938, 934, 938, - 936, 931, 992, 937, 929, 940, 930, 935, 932, 942, - 933, 0, 931, 939, 935, 937, 933, 994, 934, 938, - 936, 935, 937, 944, 938, 940, 938, 945, 939, 942, - 937, 0, 940, 939, 935, 941, 942, 943, 941, 943, - 939, 946, 937, 944, 994, 0, 938, 945, 0, 947, - - 944, 948, 940, 951, 945, 939, 942, 952, 941, 943, - 939, 946, 941, 949, 943, 941, 943, 950, 946, 947, - 944, 948, 949, 951, 945, 953, 947, 952, 948, 995, - 951, 954, 950, 949, 952, 941, 943, 950, 946, 0, - 949, 955, 956, 957, 950, 953, 947, 958, 948, 949, - 951, 954, 953, 959, 952, 956, 995, 962, 954, 950, - 949, 955, 956, 957, 950, 964, 963, 958, 955, 956, - 957, 961, 953, 959, 958, 961, 960, 962, 954, 965, - 959, 963, 956, 960, 962, 964, 963, 966, 955, 956, - 957, 1000, 964, 963, 958, 961, 960, 1002, 961, 965, - - 959, 970, 961, 960, 962, 969, 965, 966, 963, 967, - 960, 967, 964, 963, 966, 968, 0, 968, 1000, 969, - 971, 970, 961, 960, 1002, 969, 965, 0, 970, 972, - 1003, 967, 969, 974, 966, 975, 967, 968, 967, 975, - 971, 976, 968, 973, 968, 976, 969, 971, 970, 972, - 973, 1006, 969, 974, 979, 980, 972, 1003, 967, 975, - 974, 0, 975, 973, 968, 976, 975, 971, 976, 977, - 973, 977, 976, 978, 979, 980, 972, 973, 1006, 981, - 974, 979, 980, 982, 983, 1007, 975, 984, 978, 1010, - 973, 977, 976, 978, 984, 1011, 977, 983, 977, 981, - - 978, 979, 980, 982, 983, 1012, 981, 984, 1013, 1017, - 982, 983, 1007, 1018, 984, 978, 1010, 1019, 977, 1020, - 978, 984, 1011, 1021, 983, 1022, 981, 1024, 1025, 1017, - 982, 983, 1012, 1018, 984, 1013, 1017, 1019, 1023, 1020, - 1018, 0, 1023, 1021, 1019, 1022, 1020, 1024, 1025, 1049, - 1021, 1027, 1022, 1026, 1024, 1025, 1017, 1028, 0, 1029, - 1018, 1030, 1023, 1052, 1019, 1023, 1020, 1032, 1026, 1023, - 1021, 1027, 1022, 1026, 1024, 1025, 1049, 1028, 1027, 1029, - 1026, 1030, 0, 1031, 1028, 1031, 1029, 1032, 1030, 1023, - 1052, 1034, 0, 1035, 1032, 1026, 1033, 1036, 1027, 1039, - - 1026, 1054, 1057, 1058, 1028, 1031, 1029, 1037, 1030, 1033, - 1031, 1034, 1031, 1035, 1032, 1038, 1033, 1036, 1034, 1039, - 1035, 1038, 1037, 1033, 1036, 1040, 1039, 1037, 1054, 1057, - 1058, 1042, 1031, 1044, 1037, 1038, 1033, 1041, 1034, 1042, - 1035, 1043, 1038, 1033, 1036, 1040, 1039, 1045, 1038, 1037, - 1041, 1042, 1040, 1044, 1037, 1046, 1043, 1041, 1042, 1059, - 1044, 1043, 1038, 0, 1041, 1062, 1042, 1045, 1043, 0, - 1064, 1076, 1040, 1065, 1045, 1046, 1063, 1041, 1042, 1067, - 1044, 0, 1046, 1043, 1041, 1062, 1059, 1069, 1043, 1066, - 1064, 1063, 1062, 1065, 1045, 1068, 1063, 1064, 1076, 1067, - - 1065, 1070, 1046, 1063, 1066, 1071, 1067, 1069, 1068, 1066, - 0, 1078, 1062, 1072, 1069, 1068, 1066, 1064, 1063, 1074, - 1065, 1070, 1068, 1063, 1072, 1071, 1067, 1081, 1070, 1083, - 0, 1066, 1071, 1072, 1069, 1068, 1066, 1073, 1078, 1074, - 1072, 1073, 1068, 1084, 0, 1085, 1074, 1086, 1070, 1083, - 1092, 1072, 1071, 1087, 1081, 1094, 1083, 1073, 1095, 1085, - 1072, 1088, 0, 1084, 1073, 1085, 1074, 1086, 1073, 0, - 1084, 1088, 1085, 1087, 1086, 1094, 1083, 1092, 1095, 1100, - 1087, 1088, 1094, 0, 1073, 1095, 1085, 1096, 1088, 0, - 1084, 0, 1085, 0, 1086, 0, 1096, 0, 1088, 1100, - - 1087, 0, 1094, 0, 0, 1095, 1100, 1096, 1088, 0, - 0, 0, 0, 0, 1096, 0, 0, 0, 0, 0, - 0, 0, 0, 1096, 0, 0, 1100, 0, 0, 0, - 0, 0, 0, 0, 1096, 1120, 1120, 1120, 1120, 1120, - 1121, 0, 0, 1121, 1121, 1123, 1123, 1123, 0, 1123, - 1124, 0, 1124, 1124, 1124, 1125, 0, 1125, 1125, 1125, - 1126, 0, 1126, 1126, 1126, 1119, 1119, 1119, 1119, 1119, - 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, - 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, - 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, - - 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, - 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, - 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, - 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1119, - 1119, 1119 - } ; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -#line 1 "flex_lexer.l" -/** - * lexer - * - * - */ -/*************************** - ** Section 1: Definitions - ***************************/ -#line 12 "flex_lexer.l" - -#include "../sql/Expr.h" -#include "bison_parser.h" -#include -#include -#include - -#define TOKEN(name) { return SQL_##name; } - -static thread_local std::stringstream strbuf; - -#line 2048 "flex_lexer.cpp" - -/*************************** - ** Section 2: Rules - ***************************/ -/* Define the output files */ -/* Make reentrant */ -/* performance tweeks */ -/* other flags */ -/* %option nodefault */ - -/*************************** - ** Section 3: Rules - ***************************/ -#line 2062 "flex_lexer.cpp" - -#define INITIAL 0 -#define singlequotedstring 1 -#define COMMENT 2 - -#ifndef YY_NO_UNISTD_H -/* Special case for "unistd.h", since it is non-ANSI. We include it way - * down here because we want the user's section 1 to have been scanned first. - * The user has a chance to override it with an option. - */ -#include -#endif - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -/* Holds the entire state of the reentrant scanner. */ -struct yyguts_t - { - - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; - - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - int yy_n_chars; - int yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char* yy_last_accepting_cpos; - - int yylineno_r; - int yy_flex_debug_r; - - char *yytext_r; - int yy_more_flag; - int yy_more_len; - - YYSTYPE * yylval_r; - - YYLTYPE * yylloc_r; - - }; /* end struct yyguts_t */ - -static int yy_init_globals ( yyscan_t yyscanner ); - - /* This must go here because YYSTYPE and YYLTYPE are included - * from bison output in section 1.*/ - # define yylval yyg->yylval_r - - # define yylloc yyg->yylloc_r - -int yylex_init (yyscan_t* scanner); - -int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int yylex_destroy ( yyscan_t yyscanner ); - -int yyget_debug ( yyscan_t yyscanner ); - -void yyset_debug ( int debug_flag , yyscan_t yyscanner ); - -YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); - -void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); - -FILE *yyget_in ( yyscan_t yyscanner ); - -void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); - -FILE *yyget_out ( yyscan_t yyscanner ); - -void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); - - int yyget_leng ( yyscan_t yyscanner ); - -char *yyget_text ( yyscan_t yyscanner ); - -int yyget_lineno ( yyscan_t yyscanner ); - -void yyset_lineno ( int _line_number , yyscan_t yyscanner ); - -int yyget_column ( yyscan_t yyscanner ); - -void yyset_column ( int _column_no , yyscan_t yyscanner ); - -YYSTYPE * yyget_lval ( yyscan_t yyscanner ); - -void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); - - YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); - - void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int yywrap ( yyscan_t yyscanner ); -#else -extern int yywrap ( yyscan_t yyscanner ); -#endif -#endif - -#ifndef YY_NO_UNPUT - -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen ( const char * , yyscan_t yyscanner); -#endif - -#ifndef YY_NO_INPUT -#ifdef __cplusplus -static int yyinput ( yyscan_t yyscanner ); -#else -static int input ( yyscan_t yyscanner ); -#endif - -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else -#define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ -#endif - -/* Copy whatever the last rule matched to the standard output. */ -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - int n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ -\ - -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) -#endif - -/* end tables serialization structures and prototypes */ - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); - -#define YY_DECL int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after yytext and yyleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK /*LINTED*/break; -#endif - -#define YY_RULE_SETUP \ - YY_USER_ACTION - -/** The main scanner function which does all the work. - */ -YY_DECL -{ - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yylval = yylval_param; - - yylloc = yylloc_param; - - if ( !yyg->yy_init ) - { - yyg->yy_init = 1; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! yyg->yy_start ) - yyg->yy_start = 1; /* first start state */ - - if ( ! yyin ) - yyin = stdin; - - if ( ! yyout ) - yyout = stdout; - - if ( ! YY_CURRENT_BUFFER ) { - yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); - } - - yy_load_buffer_state( yyscanner ); - } - - { -#line 57 "flex_lexer.l" - - -#line 2349 "flex_lexer.cpp" - - while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yyg->yy_start; -yy_match: - do - { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 1120 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - ++yy_cp; - } - while ( yy_current_state != 1119 ); - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - -case 1: -YY_RULE_SETUP -#line 59 "flex_lexer.l" -BEGIN(COMMENT); - YY_BREAK -case 2: -YY_RULE_SETUP -#line 60 "flex_lexer.l" -/* skipping comment content until a end of line is read */; - YY_BREAK -case 3: -/* rule 3 can match eol */ -YY_RULE_SETUP -#line 61 "flex_lexer.l" -BEGIN(INITIAL); - YY_BREAK -case 4: -/* rule 4 can match eol */ -YY_RULE_SETUP -#line 63 "flex_lexer.l" -/* skip whitespace */; - YY_BREAK -case 5: -YY_RULE_SETUP -#line 65 "flex_lexer.l" -TOKEN(DEALLOCATE) - YY_BREAK -case 6: -YY_RULE_SETUP -#line 66 "flex_lexer.l" -TOKEN(PARAMETERS) - YY_BREAK -case 7: -YY_RULE_SETUP -#line 67 "flex_lexer.l" -TOKEN(INTERSECT) - YY_BREAK -case 8: -YY_RULE_SETUP -#line 68 "flex_lexer.l" -TOKEN(TEMPORARY) - YY_BREAK -case 9: -YY_RULE_SETUP -#line 69 "flex_lexer.l" -TOKEN(TIMESTAMP) - YY_BREAK -case 10: -YY_RULE_SETUP -#line 70 "flex_lexer.l" -TOKEN(DESCRIBE) - YY_BREAK -case 11: -YY_RULE_SETUP -#line 71 "flex_lexer.l" -TOKEN(DISTINCT) - YY_BREAK -case 12: -YY_RULE_SETUP -#line 72 "flex_lexer.l" -TOKEN(NVARCHAR) - YY_BREAK -case 13: -YY_RULE_SETUP -#line 73 "flex_lexer.l" -TOKEN(RESTRICT) - YY_BREAK -case 14: -YY_RULE_SETUP -#line 74 "flex_lexer.l" -TOKEN(TRUNCATE) - YY_BREAK -case 15: -YY_RULE_SETUP -#line 75 "flex_lexer.l" -TOKEN(ANALYZE) - YY_BREAK -case 16: -YY_RULE_SETUP -#line 76 "flex_lexer.l" -TOKEN(BETWEEN) - YY_BREAK -case 17: -YY_RULE_SETUP -#line 77 "flex_lexer.l" -TOKEN(CASCADE) - YY_BREAK -case 18: -YY_RULE_SETUP -#line 78 "flex_lexer.l" -TOKEN(COLUMNS) - YY_BREAK -case 19: -YY_RULE_SETUP -#line 79 "flex_lexer.l" -TOKEN(CONTROL) - YY_BREAK -case 20: -YY_RULE_SETUP -#line 80 "flex_lexer.l" -TOKEN(DEFAULT) - YY_BREAK -case 21: -YY_RULE_SETUP -#line 81 "flex_lexer.l" -TOKEN(EXECUTE) - YY_BREAK -case 22: -YY_RULE_SETUP -#line 82 "flex_lexer.l" -TOKEN(EXPLAIN) - YY_BREAK -case 23: -YY_RULE_SETUP -#line 83 "flex_lexer.l" -TOKEN(INTEGER) - YY_BREAK -case 24: -YY_RULE_SETUP -#line 84 "flex_lexer.l" -TOKEN(NATURAL) - YY_BREAK -case 25: -YY_RULE_SETUP -#line 85 "flex_lexer.l" -TOKEN(PREPARE) - YY_BREAK -case 26: -YY_RULE_SETUP -#line 86 "flex_lexer.l" -TOKEN(PRIMARY) - YY_BREAK -case 27: -YY_RULE_SETUP -#line 87 "flex_lexer.l" -TOKEN(SCHEMAS) - YY_BREAK -case 28: -YY_RULE_SETUP -#line 88 "flex_lexer.l" -TOKEN(SPATIAL) - YY_BREAK -case 29: -YY_RULE_SETUP -#line 89 "flex_lexer.l" -TOKEN(VARCHAR) - YY_BREAK -case 30: -YY_RULE_SETUP -#line 90 "flex_lexer.l" -TOKEN(VIRTUAL) - YY_BREAK -case 31: -YY_RULE_SETUP -#line 91 "flex_lexer.l" -TOKEN(BEFORE) - YY_BREAK -case 32: -YY_RULE_SETUP -#line 92 "flex_lexer.l" -TOKEN(COLUMN) - YY_BREAK -case 33: -YY_RULE_SETUP -#line 93 "flex_lexer.l" -TOKEN(CREATE) - YY_BREAK -case 34: -YY_RULE_SETUP -#line 94 "flex_lexer.l" -TOKEN(DELETE) - YY_BREAK -case 35: -YY_RULE_SETUP -#line 95 "flex_lexer.l" -TOKEN(DIRECT) - YY_BREAK -case 36: -YY_RULE_SETUP -#line 96 "flex_lexer.l" -TOKEN(DOUBLE) - YY_BREAK -case 37: -YY_RULE_SETUP -#line 97 "flex_lexer.l" -TOKEN(ESCAPE) - YY_BREAK -case 38: -YY_RULE_SETUP -#line 98 "flex_lexer.l" -TOKEN(EXCEPT) - YY_BREAK -case 39: -YY_RULE_SETUP -#line 99 "flex_lexer.l" -TOKEN(EXISTS) - YY_BREAK -case 40: -YY_RULE_SETUP -#line 100 "flex_lexer.l" -TOKEN(EXTRACT) - YY_BREAK -case 41: -YY_RULE_SETUP -#line 101 "flex_lexer.l" -TOKEN(CAST) - YY_BREAK -case 42: -YY_RULE_SETUP -#line 102 "flex_lexer.l" -TOKEN(FORMAT) - YY_BREAK -case 43: -YY_RULE_SETUP -#line 103 "flex_lexer.l" -TOKEN(GLOBAL) - YY_BREAK -case 44: -YY_RULE_SETUP -#line 104 "flex_lexer.l" -TOKEN(HAVING) - YY_BREAK -case 45: -YY_RULE_SETUP -#line 105 "flex_lexer.l" -TOKEN(IMPORT) - YY_BREAK -case 46: -YY_RULE_SETUP -#line 106 "flex_lexer.l" -TOKEN(INSERT) - YY_BREAK -case 47: -YY_RULE_SETUP -#line 107 "flex_lexer.l" -TOKEN(ISNULL) - YY_BREAK -case 48: -YY_RULE_SETUP -#line 108 "flex_lexer.l" -TOKEN(OFFSET) - YY_BREAK -case 49: -YY_RULE_SETUP -#line 109 "flex_lexer.l" -TOKEN(RENAME) - YY_BREAK -case 50: -YY_RULE_SETUP -#line 110 "flex_lexer.l" -TOKEN(SCHEMA) - YY_BREAK -case 51: -YY_RULE_SETUP -#line 111 "flex_lexer.l" -TOKEN(SELECT) - YY_BREAK -case 52: -YY_RULE_SETUP -#line 112 "flex_lexer.l" -TOKEN(SORTED) - YY_BREAK -case 53: -YY_RULE_SETUP -#line 113 "flex_lexer.l" -TOKEN(TABLES) - YY_BREAK -case 54: -YY_RULE_SETUP -#line 114 "flex_lexer.l" -TOKEN(UNIQUE) - YY_BREAK -case 55: -YY_RULE_SETUP -#line 115 "flex_lexer.l" -TOKEN(UNLOAD) - YY_BREAK -case 56: -YY_RULE_SETUP -#line 116 "flex_lexer.l" -TOKEN(UPDATE) - YY_BREAK -case 57: -YY_RULE_SETUP -#line 117 "flex_lexer.l" -TOKEN(VALUES) - YY_BREAK -case 58: -YY_RULE_SETUP -#line 118 "flex_lexer.l" -TOKEN(AFTER) - YY_BREAK -case 59: -YY_RULE_SETUP -#line 119 "flex_lexer.l" -TOKEN(ALTER) - YY_BREAK -case 60: -YY_RULE_SETUP -#line 120 "flex_lexer.l" -TOKEN(ARRAY) - YY_BREAK -case 61: -YY_RULE_SETUP -#line 121 "flex_lexer.l" -TOKEN(CROSS) - YY_BREAK -case 62: -YY_RULE_SETUP -#line 122 "flex_lexer.l" -TOKEN(DELTA) - YY_BREAK -case 63: -YY_RULE_SETUP -#line 123 "flex_lexer.l" -TOKEN(FLOAT) - YY_BREAK -case 64: -YY_RULE_SETUP -#line 124 "flex_lexer.l" -TOKEN(GROUP) - YY_BREAK -case 65: -YY_RULE_SETUP -#line 125 "flex_lexer.l" -TOKEN(INDEX) - YY_BREAK -case 66: -YY_RULE_SETUP -#line 126 "flex_lexer.l" -TOKEN(INNER) - YY_BREAK -case 67: -YY_RULE_SETUP -#line 127 "flex_lexer.l" -TOKEN(LIMIT) - YY_BREAK -case 68: -YY_RULE_SETUP -#line 128 "flex_lexer.l" -TOKEN(LOCAL) - YY_BREAK -case 69: -YY_RULE_SETUP -#line 129 "flex_lexer.l" -TOKEN(MERGE) - YY_BREAK -case 70: -YY_RULE_SETUP -#line 130 "flex_lexer.l" -TOKEN(MINUS) - YY_BREAK -case 71: -YY_RULE_SETUP -#line 131 "flex_lexer.l" -TOKEN(ORDER) - YY_BREAK -case 72: -YY_RULE_SETUP -#line 132 "flex_lexer.l" -TOKEN(OUTER) - YY_BREAK -case 73: -YY_RULE_SETUP -#line 133 "flex_lexer.l" -TOKEN(RIGHT) - YY_BREAK -case 74: -YY_RULE_SETUP -#line 134 "flex_lexer.l" -TOKEN(TABLE) - YY_BREAK -case 75: -YY_RULE_SETUP -#line 135 "flex_lexer.l" -TOKEN(UNION) - YY_BREAK -case 76: -YY_RULE_SETUP -#line 136 "flex_lexer.l" -TOKEN(USING) - YY_BREAK -case 77: -YY_RULE_SETUP -#line 137 "flex_lexer.l" -TOKEN(WHERE) - YY_BREAK -case 78: -YY_RULE_SETUP -#line 138 "flex_lexer.l" -TOKEN(CALL) - YY_BREAK -case 79: -YY_RULE_SETUP -#line 139 "flex_lexer.l" -TOKEN(CASE) - YY_BREAK -case 80: -YY_RULE_SETUP -#line 140 "flex_lexer.l" -TOKEN(CHAR) - YY_BREAK -case 81: -YY_RULE_SETUP -#line 141 "flex_lexer.l" -TOKEN(COPY) - YY_BREAK -case 82: -YY_RULE_SETUP -#line 142 "flex_lexer.l" -TOKEN(DATE) - YY_BREAK -case 83: -YY_RULE_SETUP -#line 143 "flex_lexer.l" -TOKEN(DATETIME) - YY_BREAK -case 84: -YY_RULE_SETUP -#line 144 "flex_lexer.l" -TOKEN(DESC) - YY_BREAK -case 85: -YY_RULE_SETUP -#line 145 "flex_lexer.l" -TOKEN(DROP) - YY_BREAK -case 86: -YY_RULE_SETUP -#line 146 "flex_lexer.l" -TOKEN(ELSE) - YY_BREAK -case 87: -YY_RULE_SETUP -#line 147 "flex_lexer.l" -TOKEN(FILE) - YY_BREAK -case 88: -YY_RULE_SETUP -#line 148 "flex_lexer.l" -TOKEN(FROM) - YY_BREAK -case 89: -YY_RULE_SETUP -#line 149 "flex_lexer.l" -TOKEN(FULL) - YY_BREAK -case 90: -YY_RULE_SETUP -#line 150 "flex_lexer.l" -TOKEN(HASH) - YY_BREAK -case 91: -YY_RULE_SETUP -#line 151 "flex_lexer.l" -TOKEN(HINT) - YY_BREAK -case 92: -YY_RULE_SETUP -#line 152 "flex_lexer.l" -TOKEN(INTO) - YY_BREAK -case 93: -YY_RULE_SETUP -#line 153 "flex_lexer.l" -TOKEN(JOIN) - YY_BREAK -case 94: -YY_RULE_SETUP -#line 154 "flex_lexer.l" -TOKEN(LEFT) - YY_BREAK -case 95: -YY_RULE_SETUP -#line 155 "flex_lexer.l" -TOKEN(LIKE) - YY_BREAK -case 96: -YY_RULE_SETUP -#line 156 "flex_lexer.l" -TOKEN(ILIKE) - YY_BREAK -case 97: -YY_RULE_SETUP -#line 157 "flex_lexer.l" -TOKEN(LOAD) - YY_BREAK -case 98: -YY_RULE_SETUP -#line 158 "flex_lexer.l" -TOKEN(LONG) - YY_BREAK -case 99: -YY_RULE_SETUP -#line 159 "flex_lexer.l" -TOKEN(NULL) - YY_BREAK -case 100: -YY_RULE_SETUP -#line 160 "flex_lexer.l" -TOKEN(PLAN) - YY_BREAK -case 101: -YY_RULE_SETUP -#line 161 "flex_lexer.l" -TOKEN(SHOW) - YY_BREAK -case 102: -YY_RULE_SETUP -#line 162 "flex_lexer.l" -TOKEN(TEXT) - YY_BREAK -case 103: -YY_RULE_SETUP -#line 163 "flex_lexer.l" -TOKEN(THEN) - YY_BREAK -case 104: -YY_RULE_SETUP -#line 164 "flex_lexer.l" -TOKEN(TIME) - YY_BREAK -case 105: -YY_RULE_SETUP -#line 165 "flex_lexer.l" -TOKEN(VIEW) - YY_BREAK -case 106: -YY_RULE_SETUP -#line 166 "flex_lexer.l" -TOKEN(WHEN) - YY_BREAK -case 107: -YY_RULE_SETUP -#line 167 "flex_lexer.l" -TOKEN(WITH) - YY_BREAK -case 108: -YY_RULE_SETUP -#line 168 "flex_lexer.l" -TOKEN(ADD) - YY_BREAK -case 109: -YY_RULE_SETUP -#line 169 "flex_lexer.l" -TOKEN(ALL) - YY_BREAK -case 110: -YY_RULE_SETUP -#line 170 "flex_lexer.l" -TOKEN(AND) - YY_BREAK -case 111: -YY_RULE_SETUP -#line 171 "flex_lexer.l" -TOKEN(ASC) - YY_BREAK -case 112: -YY_RULE_SETUP -#line 172 "flex_lexer.l" -TOKEN(END) - YY_BREAK -case 113: -YY_RULE_SETUP -#line 173 "flex_lexer.l" -TOKEN(FOR) - YY_BREAK -case 114: -YY_RULE_SETUP -#line 174 "flex_lexer.l" -TOKEN(INT) - YY_BREAK -case 115: -YY_RULE_SETUP -#line 175 "flex_lexer.l" -TOKEN(KEY) - YY_BREAK -case 116: -YY_RULE_SETUP -#line 176 "flex_lexer.l" -TOKEN(NOT) - YY_BREAK -case 117: -YY_RULE_SETUP -#line 177 "flex_lexer.l" -TOKEN(OFF) - YY_BREAK -case 118: -YY_RULE_SETUP -#line 178 "flex_lexer.l" -TOKEN(SET) - YY_BREAK -case 119: -YY_RULE_SETUP -#line 179 "flex_lexer.l" -TOKEN(TOP) - YY_BREAK -case 120: -YY_RULE_SETUP -#line 180 "flex_lexer.l" -TOKEN(AS) - YY_BREAK -case 121: -YY_RULE_SETUP -#line 181 "flex_lexer.l" -TOKEN(BY) - YY_BREAK -case 122: -YY_RULE_SETUP -#line 182 "flex_lexer.l" -TOKEN(IF) - YY_BREAK -case 123: -YY_RULE_SETUP -#line 183 "flex_lexer.l" -TOKEN(IN) - YY_BREAK -case 124: -YY_RULE_SETUP -#line 184 "flex_lexer.l" -TOKEN(IS) - YY_BREAK -case 125: -YY_RULE_SETUP -#line 185 "flex_lexer.l" -TOKEN(OF) - YY_BREAK -case 126: -YY_RULE_SETUP -#line 186 "flex_lexer.l" -TOKEN(ON) - YY_BREAK -case 127: -YY_RULE_SETUP -#line 187 "flex_lexer.l" -TOKEN(OR) - YY_BREAK -case 128: -YY_RULE_SETUP -#line 188 "flex_lexer.l" -TOKEN(TO) - YY_BREAK -case 129: -YY_RULE_SETUP -#line 189 "flex_lexer.l" -TOKEN(SECOND) - YY_BREAK -case 130: -YY_RULE_SETUP -#line 190 "flex_lexer.l" -TOKEN(MINUTE) - YY_BREAK -case 131: -YY_RULE_SETUP -#line 191 "flex_lexer.l" -TOKEN(HOUR) - YY_BREAK -case 132: -YY_RULE_SETUP -#line 192 "flex_lexer.l" -TOKEN(DAY) - YY_BREAK -case 133: -YY_RULE_SETUP -#line 193 "flex_lexer.l" -TOKEN(MONTH) - YY_BREAK -case 134: -YY_RULE_SETUP -#line 194 "flex_lexer.l" -TOKEN(YEAR) - YY_BREAK -case 135: -YY_RULE_SETUP -#line 195 "flex_lexer.l" -TOKEN(TRUE) - YY_BREAK -case 136: -YY_RULE_SETUP -#line 196 "flex_lexer.l" -TOKEN(FALSE) - YY_BREAK -case 137: -YY_RULE_SETUP -#line 197 "flex_lexer.l" -TOKEN(TRANSACTION) - YY_BREAK -case 138: -YY_RULE_SETUP -#line 198 "flex_lexer.l" -TOKEN(BEGIN) - YY_BREAK -case 139: -YY_RULE_SETUP -#line 199 "flex_lexer.l" -TOKEN(ROLLBACK) - YY_BREAK -case 140: -YY_RULE_SETUP -#line 200 "flex_lexer.l" -TOKEN(COMMIT) - YY_BREAK -/* Allow =/== see https://sqlite.org/lang_expr.html#collateop */ -case 141: -YY_RULE_SETUP -#line 203 "flex_lexer.l" -TOKEN(EQUALS) - YY_BREAK -case 142: -YY_RULE_SETUP -#line 204 "flex_lexer.l" -TOKEN(NOTEQUALS) - YY_BREAK -case 143: -YY_RULE_SETUP -#line 205 "flex_lexer.l" -TOKEN(NOTEQUALS) - YY_BREAK -case 144: -YY_RULE_SETUP -#line 206 "flex_lexer.l" -TOKEN(LESSEQ) - YY_BREAK -case 145: -YY_RULE_SETUP -#line 207 "flex_lexer.l" -TOKEN(GREATEREQ) - YY_BREAK -case 146: -YY_RULE_SETUP -#line 208 "flex_lexer.l" -TOKEN(CONCAT) - YY_BREAK -case 147: -YY_RULE_SETUP -#line 210 "flex_lexer.l" -{ return yytext[0]; } - YY_BREAK -case 148: -#line 213 "flex_lexer.l" -case 149: -YY_RULE_SETUP -#line 213 "flex_lexer.l" -{ - yylval->fval = atof(yytext); - return SQL_FLOATVAL; -} - YY_BREAK -/* - * Regularly, negative literals are treated as . This does not work for LLONG_MIN, as it has no - * positive equivalent. We thus match for LLONG_MIN specifically. This is not an issue for floats, where - * numeric_limits::lowest() == -numeric_limits::max(); - */ -case 150: -YY_RULE_SETUP -#line 223 "flex_lexer.l" -{ - yylval->ival = LLONG_MIN; - return SQL_INTVAL; -} - YY_BREAK -case 151: -YY_RULE_SETUP -#line 228 "flex_lexer.l" -{ - errno = 0; - yylval->ival = strtoll(yytext, nullptr, 0); - if (errno) { - return fprintf(stderr, "[SQL-Lexer-Error] Integer cannot be parsed - is it out of range?"); - return 0; - } - return SQL_INTVAL; -} - YY_BREAK -case 152: -YY_RULE_SETUP -#line 238 "flex_lexer.l" -{ - // Crop the leading and trailing quote char - yylval->sval = hsql::substr(yytext, 1, strlen(yytext)-1); - return SQL_IDENTIFIER; -} - YY_BREAK -case 153: -YY_RULE_SETUP -#line 244 "flex_lexer.l" -{ - yylval->sval = strdup(yytext); - return SQL_IDENTIFIER; -} - YY_BREAK -case 154: -YY_RULE_SETUP -#line 249 "flex_lexer.l" -{ BEGIN singlequotedstring; strbuf.clear(); strbuf.str(""); } // Clear strbuf manually, see #170 - YY_BREAK -case 155: -YY_RULE_SETUP -#line 250 "flex_lexer.l" -{ strbuf << '\''; } - YY_BREAK -case 156: -/* rule 156 can match eol */ -YY_RULE_SETUP -#line 251 "flex_lexer.l" -{ strbuf << yytext; } - YY_BREAK -case 157: -YY_RULE_SETUP -#line 252 "flex_lexer.l" -{ BEGIN 0; yylval->sval = strdup(strbuf.str().c_str()); return SQL_STRING; } - YY_BREAK -case YY_STATE_EOF(singlequotedstring): -#line 253 "flex_lexer.l" -{ fprintf(stderr, "[SQL-Lexer-Error] Unterminated string\n"); return 0; } - YY_BREAK -case 158: -YY_RULE_SETUP -#line 255 "flex_lexer.l" -{ fprintf(stderr, "[SQL-Lexer-Error] Unknown Character: %c\n", yytext[0]); return 0; } - YY_BREAK -case 159: -YY_RULE_SETUP -#line 258 "flex_lexer.l" -ECHO; - YY_BREAK -#line 3228 "flex_lexer.cpp" -case YY_STATE_EOF(INITIAL): -case YY_STATE_EOF(COMMENT): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_END_OF_FILE: - { - yyg->yy_did_buffer_switch_on_eof = 0; - - if ( yywrap( yyscanner ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = - yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ -} /* end of yylex */ - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ -static int yy_get_next_buffer (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = yyg->yytext_ptr; - int number_to_move, i; - int ret_val; - - if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else - { - int num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - - int yy_c_buf_p_offset = - (int) (yyg->yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yyrealloc( (void *) b->yy_ch_buf, - (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if ( yyg->yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart( yyin , yyscanner); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( - (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - /* "- 2" to take care of EOB's */ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; -} - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - - static yy_state_type yy_get_previous_state (yyscan_t yyscanner) -{ - yy_state_type yy_current_state; - char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_current_state = yyg->yy_start; - - for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) - { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 1120 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - } - - return yy_current_state; -} - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) -{ - int yy_is_jam; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - char *yy_cp = yyg->yy_c_buf_p; - - YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 1120 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 1119); - - (void)yyg; - return yy_is_jam ? 0 : yy_current_state; -} - -#ifndef YY_NO_UNPUT - -#endif - -#ifndef YY_NO_INPUT -#ifdef __cplusplus - static int yyinput (yyscan_t yyscanner) -#else - static int input (yyscan_t yyscanner) -#endif - -{ - int c; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else - { /* need more input */ - int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr); - ++yyg->yy_c_buf_p; - - switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart( yyin , yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( yywrap( yyscanner ) ) - return 0; - - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(yyscanner); -#else - return input(yyscanner); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + offset; - break; - } - } - } - - c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; - - return c; -} -#endif /* ifndef YY_NO_INPUT */ - -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * @param yyscanner The scanner object. - * @note This function does not reset the start condition to @c INITIAL . - */ - void yyrestart (FILE * input_file , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! YY_CURRENT_BUFFER ){ - yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); - } - - yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); - yy_load_buffer_state( yyscanner ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * @param yyscanner The scanner object. - */ - void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_buffer_stack (yyscanner); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state( yyscanner ); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; -} - -static void yy_load_buffer_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; -} - -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * @param yyscanner The scanner object. - * @return the allocated buffer state. - */ - YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_buf_size = size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - yy_init_buffer( b, file , yyscanner); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with yy_create_buffer() - * @param yyscanner The scanner object. - */ - void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! b ) - return; - - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - yyfree( (void *) b->yy_ch_buf , yyscanner ); - - yyfree( (void *) b , yyscanner ); -} - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a yyrestart() or at EOF. - */ - static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) - -{ - int oerrno = errno; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_flush_buffer( b , yyscanner); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = 0; - - errno = oerrno; -} - -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * @param yyscanner The scanner object. - */ - void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == YY_CURRENT_BUFFER ) - yy_load_buffer_state( yyscanner ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * @param yyscanner The scanner object. - */ -void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (new_buffer == NULL) - return; - - yyensure_buffer_stack(yyscanner); - - /* This block is copied from yy_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state( yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * @param yyscanner The scanner object. - */ -void yypop_buffer_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state( yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; - } -} - -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -static void yyensure_buffer_stack (yyscan_t yyscanner) -{ - yy_size_t num_to_alloc; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ - yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc - (yyg->yy_buffer_stack, - num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); - yyg->yy_buffer_stack_max = num_to_alloc; - } -} - -/** Setup the input buffer state to scan directly from a user-specified character buffer. - * @param base the character buffer - * @param size the size in bytes of the character buffer - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return NULL; - - b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - - b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer( b , yyscanner ); - - return b; -} - -/** Setup the input buffer state to scan a string. The next call to yylex() will - * scan from a @e copy of @a str. - * @param yystr a NUL-terminated string to scan - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * yy_scan_bytes() instead. - */ -YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) -{ - - return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); -} - -/** Setup the input buffer state to scan the given bytes. The next call to yylex() will - * scan from a @e copy of @a bytes. - * @param yybytes the byte buffer to scan - * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t) (_yybytes_len + 2); - buf = (char *) yyalloc( n , yyscanner ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer( buf, n , yyscanner); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/** Get the user-defined data for this scanner. - * @param yyscanner The scanner object. - */ -YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyextra; -} - -/** Get the current line number. - * @param yyscanner The scanner object. - */ -int yyget_lineno (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yylineno; -} - -/** Get the current column number. - * @param yyscanner The scanner object. - */ -int yyget_column (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yycolumn; -} - -/** Get the input stream. - * @param yyscanner The scanner object. - */ -FILE *yyget_in (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyin; -} - -/** Get the output stream. - * @param yyscanner The scanner object. - */ -FILE *yyget_out (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyout; -} - -/** Get the length of the current token. - * @param yyscanner The scanner object. - */ -int yyget_leng (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyleng; -} - -/** Get the current token. - * @param yyscanner The scanner object. - */ - -char *yyget_text (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yytext; -} - -/** Set the user-defined data. This data is never touched by the scanner. - * @param user_defined The data to be associated with this scanner. - * @param yyscanner The scanner object. - */ -void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyextra = user_defined ; -} - -/** Set the current line number. - * @param _line_number line number - * @param yyscanner The scanner object. - */ -void yyset_lineno (int _line_number , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* lineno is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); - - yylineno = _line_number; -} - -/** Set the current column. - * @param _column_no column number - * @param yyscanner The scanner object. - */ -void yyset_column (int _column_no , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* column is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "yyset_column called with no buffer" ); - - yycolumn = _column_no; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param _in_str A readable stream. - * @param yyscanner The scanner object. - * @see yy_switch_to_buffer - */ -void yyset_in (FILE * _in_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = _in_str ; -} - -void yyset_out (FILE * _out_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = _out_str ; -} - -int yyget_debug (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yy_flex_debug; -} - -void yyset_debug (int _bdebug , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = _bdebug ; -} - -/* Accessor methods for yylval and yylloc */ - -YYSTYPE * yyget_lval (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylval; -} - -void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylval = yylval_param; -} - -YYLTYPE *yyget_lloc (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylloc; -} - -void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylloc = yylloc_param; -} - -/* User-visible API */ - -/* yylex_init is special because it creates the scanner itself, so it is - * the ONLY reentrant function that doesn't take the scanner as the last argument. - * That's why we explicitly handle the declaration, instead of using our macros. - */ -int yylex_init(yyscan_t* ptr_yy_globals) -{ - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - return yy_init_globals ( *ptr_yy_globals ); -} - -/* yylex_init_extra has the same functionality as yylex_init, but follows the - * convention of taking the scanner as the last argument. Note however, that - * this is a *pointer* to a scanner, as it will be allocated by this call (and - * is the reason, too, why this function also must handle its own declaration). - * The user defined value in the first argument will be available to yyalloc in - * the yyextra field. - */ -int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) -{ - struct yyguts_t dummy_yyguts; - - yyset_extra (yy_user_defined, &dummy_yyguts); - - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - yyset_extra (yy_user_defined, *ptr_yy_globals); - - return yy_init_globals ( *ptr_yy_globals ); -} - -static int yy_init_globals (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = NULL; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = NULL; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; - -/* Defined in main.c */ -#ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; -#else - yyin = NULL; - yyout = NULL; -#endif - - /* For future reference: Set errno on error, since we are called by - * yylex_init() - */ - return 0; -} - -/* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - yyfree(yyg->yy_buffer_stack , yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - yyfree( yyg->yy_start_stack , yyscanner ); - yyg->yy_start_stack = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * yylex() is called, initialization will occur. */ - yy_init_globals( yyscanner); - - /* Destroy the main struct (reentrant only). */ - yyfree ( yyscanner , yyscanner ); - yyscanner = NULL; - return 0; -} - -/* - * Internal utility routines. - */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - - int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; -} -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (const char * s , yyscan_t yyscanner) -{ - int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; -} -#endif - -void *yyalloc (yy_size_t size , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - return malloc(size); -} - -void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return realloc(ptr, size); -} - -void yyfree (void * ptr , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ -} - -#define YYTABLES_NAME "yytables" - -#line 258 "flex_lexer.l" - -/*************************** - ** Section 3: User code - ***************************/ - -int yyerror(const char *msg) { - fprintf(stderr, "[SQL-Lexer-Error] %s\n",msg); return 0; -} - From 6f35609236ce17fa316417140d9e176625eb1b78 Mon Sep 17 00:00:00 2001 From: simonstadlinger Date: Thu, 26 Aug 2021 00:57:55 +0200 Subject: [PATCH 46/73] Fix parsing of drop index and column definitions. Add tests for sql statements in sql parser. --- src/parser/bison_parser.y | 4 +- src/sql/CreateStatement.h | 7 +-- test/queries/queries-bad.sql | 1 + test/queries/queries-good.sql | 7 +++ test/sql_tests.cpp | 80 ++++++++++++++++++++++++++++++++++- 5 files changed, 91 insertions(+), 8 deletions(-) diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 9918fe3b..2cbbcb21 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -656,9 +656,9 @@ drop_statement: $$->ifExists = false; $$->name = $3; } - | DROP INDEX opt_exists index_name ON table_name { + + | DROP INDEX opt_exists index_name { $$ = new DropStatement(kDropIndex); - $$->name = $6.name; $$->ifExists = $3; $$->indexName = $4; } diff --git a/src/sql/CreateStatement.h b/src/sql/CreateStatement.h index acddee8e..28755b0d 100755 --- a/src/sql/CreateStatement.h +++ b/src/sql/CreateStatement.h @@ -34,14 +34,11 @@ namespace hsql { void setNullableExplicit() { nullable = false; - auto length = column_constraints->size(); - for(unsigned long constraint_index = 0; constraint_index < length; constraint_index++) { + for(unsigned long constraint_index = 0; constraint_index < column_constraints->size(); constraint_index++) { if(column_constraints->at(constraint_index) == ConstraintType::_NULL) { nullable = true; column_constraints->erase(column_constraints->cbegin() + constraint_index); - } - - if(column_constraints->at(constraint_index) == ConstraintType::NOTNULL) { + } else if(column_constraints->at(constraint_index) == ConstraintType::NOTNULL) { column_constraints->erase(column_constraints->cbegin() + constraint_index); } } diff --git a/test/queries/queries-bad.sql b/test/queries/queries-bad.sql index 5f75a52e..59407a20 100644 --- a/test/queries/queries-bad.sql +++ b/test/queries/queries-bad.sql @@ -27,3 +27,4 @@ !SELECT * FROM t WHERE a = DATE '1996-120-31'; !SELECT * FROM t WHERE a = DATE '19960-12-31'; !SELECT * FROM t WHERE a = DATE 'asdf-gh-jkl'; +!DROP INDEX myindex ON mytable; # ON is not supported by postgres diff --git a/test/queries/queries-good.sql b/test/queries/queries-good.sql index f209a561..2eed14e2 100755 --- a/test/queries/queries-good.sql +++ b/test/queries/queries-good.sql @@ -26,7 +26,9 @@ SELECT a, SUM(b) FROM t2 GROUP BY a HAVING SUM(b) > 100; 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 students (name TEXT, student_number INTEGER NOT NULL, city TEXT, grade DOUBLE PRIMARY KEY UNIQUE) CREATE TABLE teachers (name VARCHAR(30), student_number LONG, city CHAR(10), grade FLOAT) +CREATE TABLE teachers (name VARCHAR(30), student_number LONG, PRIMARY KEY (name, student_number), 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 @@ -45,10 +47,15 @@ UPDATE students SET grade = 1.3 WHERE name = 'Max Mustermann'; UPDATE students SET grade = 1.3, name='Felix Fürstenberg' WHERE name = 'Max Mustermann'; UPDATE students SET grade = 1.0; UPDATE some_schema.students SET grade = 1.0; +# ALTER +ALTER TABLE mytable DROP COLUMN IF EXISTS mycolumn; +ALTER TABLE IF EXISTS mytable DROP COLUMN IF EXISTS mycolumn; # DROP DROP TABLE students; DROP TABLE IF EXISTS students; DROP VIEW IF EXISTS students; +DROP INDEX myindex; +DROP INDEX IF EXISTS myindex; # PREPARE PREPARE prep_inst FROM 'INSERT INTO test VALUES (?, ?, ?)'; PREPARE prep2 FROM 'INSERT INTO test VALUES (?, 0, 0); INSERT INTO test VALUES (0, ?, 0); INSERT INTO test VALUES (0, 0, ?);'; diff --git a/test/sql_tests.cpp b/test/sql_tests.cpp index f7858cf1..d355756f 100644 --- a/test/sql_tests.cpp +++ b/test/sql_tests.cpp @@ -30,7 +30,7 @@ TEST(DeleteStatementTest) { TEST(CreateStatementTest) { SQLParserResult result; - SQLParser::parse("CREATE TABLE students (name VARCHAR(50), student_number INT, city INTEGER NULL, grade DOUBLE NOT NULL, comment TEXT)", &result); + SQLParser::parse("CREATE TABLE students (name VARCHAR(50), student_number INT, city INTEGER NULL, PRIMARY KEY(name, student_number), grade DOUBLE NOT NULL, comment TEXT UNIQUE PRIMARY KEY NOT NULL)", &result); ASSERT(result.isValid()); ASSERT_EQ(result.size(), 1); @@ -56,6 +56,9 @@ TEST(CreateStatementTest) { ASSERT_EQ(stmt->columns->at(2)->nullable, true); ASSERT_EQ(stmt->columns->at(3)->nullable, false); ASSERT_EQ(stmt->columns->at(4)->nullable, false); + ASSERT_EQ(stmt->columns->at(4)->column_constraints->size(), 2); + ASSERT_STREQ(stmt->tableConstraints->at(0)->columnNames->at(0), "name"); + ASSERT_STREQ(stmt->tableConstraints->at(0)->columnNames->at(1), "student_number"); } TEST(CreateAsSelectStatementTest) { @@ -117,6 +120,79 @@ TEST(InsertStatementTest) { // TODO } +TEST(AlterStatementDropActionTest) { + SQLParserResult result; + SQLParser::parse("ALTER TABLE mytable DROP COLUMN IF EXISTS mycolumn", &result); + + ASSERT(result.isValid()); + ASSERT_EQ(result.size(), 1); + + const AlterStatement* stmt = (const AlterStatement*) result.getStatement(0); + ASSERT_STREQ(stmt->name, "mytable"); + ASSERT_EQ(stmt->ifTableExists, false); + + auto dropAction = (const DropColumnAction*) stmt->action; + + ASSERT_EQ(dropAction->type, hsql::ActionType::DROPCOLUMN); + ASSERT_STREQ(dropAction->columnName, "mycolumn"); +} + +TEST(CreateIndexStatementTest) { + SQLParserResult result; + SQLParser::parse("CREATE INDEX myindex ON myTable (col1);", &result); + + ASSERT(result.isValid()); + ASSERT_EQ(result.size(), 1); + + const CreateStatement* stmt = (const CreateStatement*) result.getStatement(0); + ASSERT_STREQ(stmt->indexName, "myindex"); + ASSERT_STREQ(stmt->tableName, "myTable"); + ASSERT_EQ(stmt->type, kCreateIndex); + ASSERT_EQ(stmt->ifNotExists, false); + ASSERT_EQ(stmt->indexColumns->size(), 1); +} + +TEST(CreateIndexStatementIfNotExistsTest) { + SQLParserResult result; + SQLParser::parse("CREATE INDEX IF NOT EXISTS myindex ON myTable (col1, col2);", &result); + + ASSERT(result.isValid()); + ASSERT_EQ(result.size(), 1); + + const CreateStatement* stmt = (const CreateStatement*) result.getStatement(0); + ASSERT_STREQ(stmt->indexName, "myindex"); + ASSERT_STREQ(stmt->tableName, "myTable"); + ASSERT_EQ(stmt->type, kCreateIndex); + ASSERT_EQ(stmt->ifNotExists, true); + ASSERT_EQ(stmt->indexColumns->size(), 2); +} + +TEST(DropIndexTest) { + SQLParserResult result; + SQLParser::parse("DROP INDEX myindex", &result); + + ASSERT(result.isValid()); + ASSERT_EQ(result.size(), 1); + + const DropStatement* stmt = (const DropStatement*) result.getStatement(0); + ASSERT_STREQ(stmt->indexName, "myindex"); + ASSERT_EQ(stmt->ifExists, false); +} + +TEST(DropIndexIfExistsTest) { + SQLParserResult result; + SQLParser::parse("DROP INDEX IF EXISTS myindex", &result); + + ASSERT(result.isValid()); + ASSERT_EQ(result.size(), 1); + + const DropStatement* stmt = (const DropStatement*) result.getStatement(0); + ASSERT_STREQ(stmt->indexName, "myindex"); + ASSERT_EQ(stmt->ifExists, true); +} + + + TEST(DropTableStatementTest) { TEST_PARSE_SINGLE_SQL( "DROP TABLE students", @@ -145,6 +221,8 @@ TEST(DropTableIfExistsStatementTest) { ASSERT_STREQ(stmt->name, "students"); } + + TEST(ReleaseStatementTest) { TEST_PARSE_SINGLE_SQL( "SELECT * FROM students;", From 44ae7cf75373ed6dfcac23bc04f40ebe6e1698bf Mon Sep 17 00:00:00 2001 From: simonstadlinger Date: Thu, 26 Aug 2021 18:46:20 +0200 Subject: [PATCH 47/73] Add flex lexer and bison parser --- src/parser/bison_parser.cpp | 5155 +++++++++++++++++++++++++++++++++++ src/parser/flex_lexer.cpp | 4457 ++++++++++++++++++++++++++++++ 2 files changed, 9612 insertions(+) create mode 100644 src/parser/bison_parser.cpp create mode 100644 src/parser/flex_lexer.cpp diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp new file mode 100644 index 00000000..dfaa0b49 --- /dev/null +++ b/src/parser/bison_parser.cpp @@ -0,0 +1,5155 @@ +/* A Bison parser, made by GNU Bison 3.7.6. */ + +/* Bison implementation for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 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 + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, + especially those whose name start with YY_ or yy_. They are + private implementation details that can be changed or removed. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output, and Bison version. */ +#define YYBISON 30706 + +/* Bison version string. */ +#define YYBISON_VERSION "3.7.6" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 2 + +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + +/* Substitute the type names. */ +#define YYSTYPE HSQL_STYPE +#define YYLTYPE HSQL_LTYPE +/* Substitute the variable and function names. */ +#define yyparse hsql_parse +#define yylex hsql_lex +#define yyerror hsql_error +#define yydebug hsql_debug +#define yynerrs hsql_nerrs + +/* First part of user prologue. */ +#line 1 "bison_parser.y" + +/** + * bison_parser.y + * defines bison_parser.h + * outputs bison_parser.c + * + * Grammar File Spec: http://dinosaur.compilertools.net/bison/bison_6.html + * + */ +/********************************* + ** Section 1: C Declarations + *********************************/ + +#include "bison_parser.h" +#include "flex_lexer.h" + +#include +#include + +using namespace hsql; + +int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const char *msg) { + result->setIsValid(false); + result->setErrorDetails(strdup(msg), llocp->first_line, llocp->first_column); + return 0; +} + + +#line 107 "bison_parser.cpp" + +# ifndef YY_CAST +# ifdef __cplusplus +# define YY_CAST(Type, Val) static_cast (Val) +# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) +# else +# define YY_CAST(Type, Val) ((Type) (Val)) +# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) +# endif +# endif +# ifndef YY_NULLPTR +# if defined __cplusplus +# if 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# else +# define YY_NULLPTR ((void*)0) +# endif +# endif + +#include "bison_parser.h" +/* Symbol kind. */ +enum yysymbol_kind_t +{ + YYSYMBOL_YYEMPTY = -2, + YYSYMBOL_YYEOF = 0, /* "end of file" */ + YYSYMBOL_YYerror = 1, /* error */ + YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ + YYSYMBOL_IDENTIFIER = 3, /* IDENTIFIER */ + YYSYMBOL_STRING = 4, /* STRING */ + YYSYMBOL_FLOATVAL = 5, /* FLOATVAL */ + YYSYMBOL_INTVAL = 6, /* INTVAL */ + YYSYMBOL_DEALLOCATE = 7, /* DEALLOCATE */ + YYSYMBOL_PARAMETERS = 8, /* PARAMETERS */ + YYSYMBOL_INTERSECT = 9, /* INTERSECT */ + YYSYMBOL_TEMPORARY = 10, /* TEMPORARY */ + YYSYMBOL_TIMESTAMP = 11, /* TIMESTAMP */ + YYSYMBOL_DISTINCT = 12, /* DISTINCT */ + YYSYMBOL_NVARCHAR = 13, /* NVARCHAR */ + YYSYMBOL_RESTRICT = 14, /* RESTRICT */ + YYSYMBOL_TRUNCATE = 15, /* TRUNCATE */ + YYSYMBOL_ANALYZE = 16, /* ANALYZE */ + YYSYMBOL_BETWEEN = 17, /* BETWEEN */ + YYSYMBOL_CASCADE = 18, /* CASCADE */ + YYSYMBOL_COLUMNS = 19, /* COLUMNS */ + YYSYMBOL_CONTROL = 20, /* CONTROL */ + YYSYMBOL_DEFAULT = 21, /* DEFAULT */ + YYSYMBOL_EXECUTE = 22, /* EXECUTE */ + YYSYMBOL_EXPLAIN = 23, /* EXPLAIN */ + YYSYMBOL_INTEGER = 24, /* INTEGER */ + YYSYMBOL_NATURAL = 25, /* NATURAL */ + YYSYMBOL_PREPARE = 26, /* PREPARE */ + YYSYMBOL_PRIMARY = 27, /* PRIMARY */ + YYSYMBOL_SCHEMAS = 28, /* SCHEMAS */ + YYSYMBOL_CHARACTER = 29, /* CHARACTER */ + YYSYMBOL_VARYING = 30, /* VARYING */ + YYSYMBOL_REAL = 31, /* REAL */ + YYSYMBOL_DECIMAL = 32, /* DECIMAL */ + YYSYMBOL_SPATIAL = 33, /* SPATIAL */ + YYSYMBOL_VARCHAR = 34, /* VARCHAR */ + YYSYMBOL_VIRTUAL = 35, /* VIRTUAL */ + YYSYMBOL_DESCRIBE = 36, /* DESCRIBE */ + YYSYMBOL_BEFORE = 37, /* BEFORE */ + YYSYMBOL_COLUMN = 38, /* COLUMN */ + YYSYMBOL_CREATE = 39, /* CREATE */ + YYSYMBOL_DELETE = 40, /* DELETE */ + YYSYMBOL_DIRECT = 41, /* DIRECT */ + YYSYMBOL_DOUBLE = 42, /* DOUBLE */ + YYSYMBOL_ESCAPE = 43, /* ESCAPE */ + YYSYMBOL_EXCEPT = 44, /* EXCEPT */ + YYSYMBOL_EXISTS = 45, /* EXISTS */ + YYSYMBOL_EXTRACT = 46, /* EXTRACT */ + YYSYMBOL_CAST = 47, /* CAST */ + YYSYMBOL_FORMAT = 48, /* FORMAT */ + YYSYMBOL_GLOBAL = 49, /* GLOBAL */ + YYSYMBOL_HAVING = 50, /* HAVING */ + YYSYMBOL_IMPORT = 51, /* IMPORT */ + YYSYMBOL_INSERT = 52, /* INSERT */ + YYSYMBOL_ISNULL = 53, /* ISNULL */ + YYSYMBOL_OFFSET = 54, /* OFFSET */ + YYSYMBOL_RENAME = 55, /* RENAME */ + YYSYMBOL_SCHEMA = 56, /* SCHEMA */ + YYSYMBOL_SELECT = 57, /* SELECT */ + YYSYMBOL_SORTED = 58, /* SORTED */ + YYSYMBOL_TABLES = 59, /* TABLES */ + YYSYMBOL_UNIQUE = 60, /* UNIQUE */ + YYSYMBOL_UNLOAD = 61, /* UNLOAD */ + YYSYMBOL_UPDATE = 62, /* UPDATE */ + YYSYMBOL_VALUES = 63, /* VALUES */ + YYSYMBOL_AFTER = 64, /* AFTER */ + YYSYMBOL_ALTER = 65, /* ALTER */ + YYSYMBOL_CROSS = 66, /* CROSS */ + YYSYMBOL_DELTA = 67, /* DELTA */ + YYSYMBOL_FLOAT = 68, /* FLOAT */ + YYSYMBOL_GROUP = 69, /* GROUP */ + YYSYMBOL_INDEX = 70, /* INDEX */ + YYSYMBOL_INNER = 71, /* INNER */ + YYSYMBOL_LIMIT = 72, /* LIMIT */ + YYSYMBOL_LOCAL = 73, /* LOCAL */ + YYSYMBOL_MERGE = 74, /* MERGE */ + YYSYMBOL_MINUS = 75, /* MINUS */ + YYSYMBOL_ORDER = 76, /* ORDER */ + YYSYMBOL_OUTER = 77, /* OUTER */ + YYSYMBOL_RIGHT = 78, /* RIGHT */ + YYSYMBOL_TABLE = 79, /* TABLE */ + YYSYMBOL_UNION = 80, /* UNION */ + YYSYMBOL_USING = 81, /* USING */ + YYSYMBOL_WHERE = 82, /* WHERE */ + YYSYMBOL_CALL = 83, /* CALL */ + YYSYMBOL_CASE = 84, /* CASE */ + YYSYMBOL_CHAR = 85, /* CHAR */ + YYSYMBOL_COPY = 86, /* COPY */ + YYSYMBOL_DATE = 87, /* DATE */ + YYSYMBOL_DATETIME = 88, /* DATETIME */ + YYSYMBOL_DESC = 89, /* DESC */ + YYSYMBOL_DROP = 90, /* DROP */ + YYSYMBOL_ELSE = 91, /* ELSE */ + YYSYMBOL_FILE = 92, /* FILE */ + YYSYMBOL_FROM = 93, /* FROM */ + YYSYMBOL_FULL = 94, /* FULL */ + YYSYMBOL_HASH = 95, /* HASH */ + YYSYMBOL_HINT = 96, /* HINT */ + YYSYMBOL_INTO = 97, /* INTO */ + YYSYMBOL_JOIN = 98, /* JOIN */ + YYSYMBOL_LEFT = 99, /* LEFT */ + YYSYMBOL_LIKE = 100, /* LIKE */ + YYSYMBOL_LOAD = 101, /* LOAD */ + YYSYMBOL_LONG = 102, /* LONG */ + YYSYMBOL_NULL = 103, /* NULL */ + YYSYMBOL_PLAN = 104, /* PLAN */ + YYSYMBOL_SHOW = 105, /* SHOW */ + YYSYMBOL_TEXT = 106, /* TEXT */ + YYSYMBOL_THEN = 107, /* THEN */ + YYSYMBOL_TIME = 108, /* TIME */ + YYSYMBOL_VIEW = 109, /* VIEW */ + YYSYMBOL_WHEN = 110, /* WHEN */ + YYSYMBOL_WITH = 111, /* WITH */ + YYSYMBOL_ADD = 112, /* ADD */ + YYSYMBOL_ALL = 113, /* ALL */ + YYSYMBOL_AND = 114, /* AND */ + YYSYMBOL_ASC = 115, /* ASC */ + YYSYMBOL_END = 116, /* END */ + YYSYMBOL_FOR = 117, /* FOR */ + YYSYMBOL_INT = 118, /* INT */ + YYSYMBOL_KEY = 119, /* KEY */ + YYSYMBOL_NOT = 120, /* NOT */ + YYSYMBOL_OFF = 121, /* OFF */ + YYSYMBOL_SET = 122, /* SET */ + YYSYMBOL_TOP = 123, /* TOP */ + YYSYMBOL_AS = 124, /* AS */ + YYSYMBOL_BY = 125, /* BY */ + YYSYMBOL_IF = 126, /* IF */ + YYSYMBOL_IN = 127, /* IN */ + YYSYMBOL_IS = 128, /* IS */ + YYSYMBOL_OF = 129, /* OF */ + YYSYMBOL_ON = 130, /* ON */ + YYSYMBOL_OR = 131, /* OR */ + YYSYMBOL_TO = 132, /* TO */ + YYSYMBOL_ARRAY = 133, /* ARRAY */ + YYSYMBOL_CONCAT = 134, /* CONCAT */ + YYSYMBOL_ILIKE = 135, /* ILIKE */ + YYSYMBOL_SECOND = 136, /* SECOND */ + YYSYMBOL_MINUTE = 137, /* MINUTE */ + YYSYMBOL_HOUR = 138, /* HOUR */ + YYSYMBOL_DAY = 139, /* DAY */ + YYSYMBOL_MONTH = 140, /* MONTH */ + YYSYMBOL_YEAR = 141, /* YEAR */ + YYSYMBOL_TRUE = 142, /* TRUE */ + YYSYMBOL_FALSE = 143, /* FALSE */ + YYSYMBOL_TRANSACTION = 144, /* TRANSACTION */ + YYSYMBOL_BEGIN = 145, /* BEGIN */ + YYSYMBOL_COMMIT = 146, /* COMMIT */ + YYSYMBOL_ROLLBACK = 147, /* ROLLBACK */ + YYSYMBOL_148_ = 148, /* '=' */ + YYSYMBOL_EQUALS = 149, /* EQUALS */ + YYSYMBOL_NOTEQUALS = 150, /* NOTEQUALS */ + YYSYMBOL_151_ = 151, /* '<' */ + YYSYMBOL_152_ = 152, /* '>' */ + YYSYMBOL_LESS = 153, /* LESS */ + YYSYMBOL_GREATER = 154, /* GREATER */ + YYSYMBOL_LESSEQ = 155, /* LESSEQ */ + YYSYMBOL_GREATEREQ = 156, /* GREATEREQ */ + YYSYMBOL_NOTNULL = 157, /* NOTNULL */ + YYSYMBOL_158_ = 158, /* '+' */ + YYSYMBOL_159_ = 159, /* '-' */ + YYSYMBOL_160_ = 160, /* '*' */ + YYSYMBOL_161_ = 161, /* '/' */ + YYSYMBOL_162_ = 162, /* '%' */ + YYSYMBOL_163_ = 163, /* '^' */ + YYSYMBOL_UMINUS = 164, /* UMINUS */ + YYSYMBOL_165_ = 165, /* '[' */ + YYSYMBOL_166_ = 166, /* ']' */ + YYSYMBOL_167_ = 167, /* '(' */ + YYSYMBOL_168_ = 168, /* ')' */ + YYSYMBOL_169_ = 169, /* '.' */ + YYSYMBOL_170_ = 170, /* ';' */ + YYSYMBOL_171_ = 171, /* ',' */ + YYSYMBOL_172_ = 172, /* '?' */ + YYSYMBOL_YYACCEPT = 173, /* $accept */ + YYSYMBOL_input = 174, /* input */ + YYSYMBOL_statement_list = 175, /* statement_list */ + YYSYMBOL_statement = 176, /* statement */ + YYSYMBOL_preparable_statement = 177, /* preparable_statement */ + YYSYMBOL_opt_hints = 178, /* opt_hints */ + YYSYMBOL_hint_list = 179, /* hint_list */ + YYSYMBOL_hint = 180, /* hint */ + YYSYMBOL_transaction_statement = 181, /* transaction_statement */ + YYSYMBOL_opt_transaction_keyword = 182, /* opt_transaction_keyword */ + YYSYMBOL_prepare_statement = 183, /* prepare_statement */ + YYSYMBOL_prepare_target_query = 184, /* prepare_target_query */ + YYSYMBOL_execute_statement = 185, /* execute_statement */ + YYSYMBOL_import_statement = 186, /* import_statement */ + YYSYMBOL_file_type = 187, /* file_type */ + YYSYMBOL_file_path = 188, /* file_path */ + YYSYMBOL_opt_file_type = 189, /* opt_file_type */ + YYSYMBOL_export_statement = 190, /* export_statement */ + YYSYMBOL_show_statement = 191, /* show_statement */ + YYSYMBOL_create_statement = 192, /* create_statement */ + YYSYMBOL_opt_not_exists = 193, /* opt_not_exists */ + YYSYMBOL_table_elem_commalist = 194, /* table_elem_commalist */ + YYSYMBOL_table_elem = 195, /* table_elem */ + YYSYMBOL_column_def = 196, /* column_def */ + YYSYMBOL_column_type = 197, /* column_type */ + YYSYMBOL_opt_time_specification = 198, /* opt_time_specification */ + YYSYMBOL_opt_decimal_specification = 199, /* opt_decimal_specification */ + YYSYMBOL_opt_column_constraints = 200, /* opt_column_constraints */ + YYSYMBOL_column_constraint = 201, /* column_constraint */ + YYSYMBOL_table_constraint = 202, /* table_constraint */ + YYSYMBOL_drop_statement = 203, /* drop_statement */ + YYSYMBOL_opt_exists = 204, /* opt_exists */ + YYSYMBOL_alter_statement = 205, /* alter_statement */ + YYSYMBOL_alter_action = 206, /* alter_action */ + YYSYMBOL_drop_action = 207, /* drop_action */ + YYSYMBOL_delete_statement = 208, /* delete_statement */ + YYSYMBOL_truncate_statement = 209, /* truncate_statement */ + YYSYMBOL_insert_statement = 210, /* insert_statement */ + YYSYMBOL_opt_column_list = 211, /* opt_column_list */ + YYSYMBOL_update_statement = 212, /* update_statement */ + YYSYMBOL_update_clause_commalist = 213, /* update_clause_commalist */ + YYSYMBOL_update_clause = 214, /* update_clause */ + YYSYMBOL_select_statement = 215, /* select_statement */ + YYSYMBOL_select_within_set_operation = 216, /* select_within_set_operation */ + YYSYMBOL_select_within_set_operation_no_parentheses = 217, /* select_within_set_operation_no_parentheses */ + YYSYMBOL_select_with_paren = 218, /* select_with_paren */ + YYSYMBOL_select_no_paren = 219, /* select_no_paren */ + YYSYMBOL_set_operator = 220, /* set_operator */ + YYSYMBOL_set_type = 221, /* set_type */ + YYSYMBOL_opt_all = 222, /* opt_all */ + YYSYMBOL_select_clause = 223, /* select_clause */ + YYSYMBOL_opt_distinct = 224, /* opt_distinct */ + YYSYMBOL_select_list = 225, /* select_list */ + YYSYMBOL_opt_from_clause = 226, /* opt_from_clause */ + YYSYMBOL_from_clause = 227, /* from_clause */ + YYSYMBOL_opt_where = 228, /* opt_where */ + YYSYMBOL_opt_group = 229, /* opt_group */ + YYSYMBOL_opt_having = 230, /* opt_having */ + YYSYMBOL_opt_order = 231, /* opt_order */ + YYSYMBOL_order_list = 232, /* order_list */ + YYSYMBOL_order_desc = 233, /* order_desc */ + YYSYMBOL_opt_order_type = 234, /* opt_order_type */ + YYSYMBOL_opt_top = 235, /* opt_top */ + YYSYMBOL_opt_limit = 236, /* opt_limit */ + YYSYMBOL_expr_list = 237, /* expr_list */ + YYSYMBOL_opt_literal_list = 238, /* opt_literal_list */ + YYSYMBOL_literal_list = 239, /* literal_list */ + YYSYMBOL_expr_alias = 240, /* expr_alias */ + YYSYMBOL_expr = 241, /* expr */ + YYSYMBOL_operand = 242, /* operand */ + YYSYMBOL_scalar_expr = 243, /* scalar_expr */ + YYSYMBOL_unary_expr = 244, /* unary_expr */ + YYSYMBOL_binary_expr = 245, /* binary_expr */ + YYSYMBOL_logic_expr = 246, /* logic_expr */ + YYSYMBOL_in_expr = 247, /* in_expr */ + YYSYMBOL_case_expr = 248, /* case_expr */ + YYSYMBOL_case_list = 249, /* case_list */ + YYSYMBOL_exists_expr = 250, /* exists_expr */ + YYSYMBOL_comp_expr = 251, /* comp_expr */ + YYSYMBOL_function_expr = 252, /* function_expr */ + YYSYMBOL_extract_expr = 253, /* extract_expr */ + YYSYMBOL_cast_expr = 254, /* cast_expr */ + YYSYMBOL_datetime_field = 255, /* datetime_field */ + YYSYMBOL_array_expr = 256, /* array_expr */ + YYSYMBOL_array_index = 257, /* array_index */ + YYSYMBOL_between_expr = 258, /* between_expr */ + YYSYMBOL_column_name = 259, /* column_name */ + YYSYMBOL_literal = 260, /* literal */ + YYSYMBOL_string_literal = 261, /* string_literal */ + YYSYMBOL_bool_literal = 262, /* bool_literal */ + YYSYMBOL_num_literal = 263, /* num_literal */ + YYSYMBOL_int_literal = 264, /* int_literal */ + YYSYMBOL_null_literal = 265, /* null_literal */ + YYSYMBOL_date_literal = 266, /* date_literal */ + YYSYMBOL_param_expr = 267, /* param_expr */ + YYSYMBOL_table_ref = 268, /* table_ref */ + YYSYMBOL_table_ref_atomic = 269, /* table_ref_atomic */ + YYSYMBOL_nonjoin_table_ref_atomic = 270, /* nonjoin_table_ref_atomic */ + YYSYMBOL_table_ref_commalist = 271, /* table_ref_commalist */ + YYSYMBOL_table_ref_name = 272, /* table_ref_name */ + YYSYMBOL_table_ref_name_no_alias = 273, /* table_ref_name_no_alias */ + YYSYMBOL_table_name = 274, /* table_name */ + YYSYMBOL_opt_index_name = 275, /* opt_index_name */ + YYSYMBOL_index_name = 276, /* index_name */ + YYSYMBOL_table_alias = 277, /* table_alias */ + YYSYMBOL_opt_table_alias = 278, /* opt_table_alias */ + YYSYMBOL_alias = 279, /* alias */ + YYSYMBOL_opt_alias = 280, /* opt_alias */ + YYSYMBOL_opt_with_clause = 281, /* opt_with_clause */ + YYSYMBOL_with_clause = 282, /* with_clause */ + YYSYMBOL_with_description_list = 283, /* with_description_list */ + YYSYMBOL_with_description = 284, /* with_description */ + YYSYMBOL_join_clause = 285, /* join_clause */ + YYSYMBOL_opt_join_type = 286, /* opt_join_type */ + YYSYMBOL_join_condition = 287, /* join_condition */ + YYSYMBOL_opt_semicolon = 288, /* opt_semicolon */ + YYSYMBOL_ident_commalist = 289 /* ident_commalist */ +}; +typedef enum yysymbol_kind_t yysymbol_kind_t; + + + + +#ifdef short +# undef short +#endif + +/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure + and (if available) are included + so that the code can choose integer types of a good width. */ + +#ifndef __PTRDIFF_MAX__ +# include /* INFRINGES ON USER NAME SPACE */ +# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_STDINT_H +# endif +#endif + +/* Narrow types that promote to a signed type and that can represent a + signed or unsigned integer of at least N bits. In tables they can + save space and decrease cache pressure. Promoting to a signed type + helps avoid bugs in integer arithmetic. */ + +#ifdef __INT_LEAST8_MAX__ +typedef __INT_LEAST8_TYPE__ yytype_int8; +#elif defined YY_STDINT_H +typedef int_least8_t yytype_int8; +#else +typedef signed char yytype_int8; +#endif + +#ifdef __INT_LEAST16_MAX__ +typedef __INT_LEAST16_TYPE__ yytype_int16; +#elif defined YY_STDINT_H +typedef int_least16_t yytype_int16; +#else +typedef short yytype_int16; +#endif + +/* Work around bug in HP-UX 11.23, which defines these macros + incorrectly for preprocessor constants. This workaround can likely + be removed in 2023, as HPE has promised support for HP-UX 11.23 + (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of + . */ +#ifdef __hpux +# undef UINT_LEAST8_MAX +# undef UINT_LEAST16_MAX +# define UINT_LEAST8_MAX 255 +# define UINT_LEAST16_MAX 65535 +#endif + +#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ +typedef __UINT_LEAST8_TYPE__ yytype_uint8; +#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST8_MAX <= INT_MAX) +typedef uint_least8_t yytype_uint8; +#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX +typedef unsigned char yytype_uint8; +#else +typedef short yytype_uint8; +#endif + +#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ +typedef __UINT_LEAST16_TYPE__ yytype_uint16; +#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST16_MAX <= INT_MAX) +typedef uint_least16_t yytype_uint16; +#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX +typedef unsigned short yytype_uint16; +#else +typedef int yytype_uint16; +#endif + +#ifndef YYPTRDIFF_T +# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ +# define YYPTRDIFF_T __PTRDIFF_TYPE__ +# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ +# elif defined PTRDIFF_MAX +# ifndef ptrdiff_t +# include /* INFRINGES ON USER NAME SPACE */ +# endif +# define YYPTRDIFF_T ptrdiff_t +# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX +# else +# define YYPTRDIFF_T long +# define YYPTRDIFF_MAXIMUM LONG_MAX +# endif +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned +# endif +#endif + +#define YYSIZE_MAXIMUM \ + YY_CAST (YYPTRDIFF_T, \ + (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ + ? YYPTRDIFF_MAXIMUM \ + : YY_CAST (YYSIZE_T, -1))) + +#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) + + +/* Stored state numbers (used for stacks). */ +typedef yytype_int16 yy_state_t; + +/* State numbers in computations. */ +typedef int yy_state_fast_t; + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) +# endif +# endif +# ifndef YY_ +# define YY_(Msgid) Msgid +# endif +#endif + + +#ifndef YY_ATTRIBUTE_PURE +# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define YY_ATTRIBUTE_PURE +# endif +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +# else +# define YY_ATTRIBUTE_UNUSED +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YY_USE(E) ((void) (E)) +#else +# define YY_USE(E) /* empty */ +#endif + +#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") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") +#else +# define YY_INITIAL_VALUE(Value) Value +#endif +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + +#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ +# define YY_IGNORE_USELESS_CAST_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") +# define YY_IGNORE_USELESS_CAST_END \ + _Pragma ("GCC diagnostic pop") +#endif +#ifndef YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_END +#endif + + +#define YY_ASSERT(E) ((void) (0 && (E))) + +#if 1 + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS +# include /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined EXIT_SUCCESS +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* 1 */ + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined HSQL_LTYPE_IS_TRIVIAL && HSQL_LTYPE_IS_TRIVIAL \ + && defined HSQL_STYPE_IS_TRIVIAL && HSQL_STYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yy_state_t yyss_alloc; + YYSTYPE yyvs_alloc; + YYLTYPE yyls_alloc; +}; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \ + + YYSIZEOF (YYLTYPE)) \ + + 2 * YYSTACK_GAP_MAXIMUM) + +# define YYCOPY_NEEDED 1 + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYPTRDIFF_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / YYSIZEOF (*yyptr); \ + } \ + while (0) + +#endif + +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from SRC to DST. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) +# else +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYPTRDIFF_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (0) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 67 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 819 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 173 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 117 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 290 +/* YYNSTATES -- Number of states. */ +#define YYNSTATES 536 + +/* YYMAXUTOK -- Last valid token kind. */ +#define YYMAXUTOK 410 + + +/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, with out-of-bounds checking. */ +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK \ + ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ + : YYSYMBOL_YYUNDEF) + +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 162, 2, 2, + 167, 168, 160, 158, 171, 159, 169, 161, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 170, + 151, 148, 152, 172, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 165, 2, 166, 163, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 149, 150, 153, 154, 155, 156, 157, + 164 +}; + +#if HSQL_DEBUG + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ +static const yytype_int16 yyrline[] = +{ + 0, 288, 288, 309, 315, 324, 328, 332, 335, 338, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 363, 364, 369, 370, 374, 378, 390, 393, 396, 402, + 403, 410, 417, 420, 424, 438, 444, 453, 470, 474, + 477, 486, 500, 503, 508, 522, 535, 542, 549, 556, + 567, 568, 572, 573, 577, 578, 582, 589, 590, 591, + 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 606, 607, 611, 612, 613, 617, 618, 619, 623, + 624, 625, 626, 630, 631, 642, 648, 654, 660, 668, + 669, 678, 686, 689, 701, 710, 723, 730, 741, 742, + 752, 761, 762, 766, 778, 782, 786, 800, 801, 804, + 805, 816, 817, 821, 831, 844, 851, 855, 859, 866, + 869, 875, 887, 888, 892, 896, 897, 901, 906, 907, + 911, 916, 920, 921, 925, 926, 930, 931, 935, 939, + 940, 941, 947, 948, 952, 953, 954, 955, 956, 957, + 964, 965, 969, 970, 974, 975, 979, 989, 990, 991, + 992, 993, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, + 1005, 1006, 1007, 1011, 1012, 1016, 1017, 1018, 1019, 1020, + 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, + 1034, 1038, 1039, 1043, 1044, 1045, 1046, 1052, 1053, 1054, + 1055, 1059, 1060, 1064, 1065, 1069, 1070, 1071, 1072, 1073, + 1074, 1075, 1079, 1080, 1084, 1088, 1092, 1093, 1094, 1095, + 1096, 1097, 1101, 1105, 1109, 1113, 1114, 1115, 1116, 1120, + 1121, 1122, 1123, 1124, 1125, 1129, 1133, 1134, 1138, 1139, + 1143, 1147, 1151, 1164, 1176, 1177, 1187, 1188, 1192, 1193, + 1202, 1203, 1208, 1219, 1228, 1229, 1233, 1234, 1238, 1243, + 1244, 1249, 1250, 1255, 1256, 1261, 1262, 1271, 1272, 1276, + 1280, 1284, 1291, 1304, 1312, 1322, 1341, 1342, 1343, 1344, + 1345, 1346, 1347, 1348, 1349, 1350, 1355, 1364, 1365, 1370, + 1371 +}; +#endif + +/** Accessing symbol of state STATE. */ +#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) + +#if 1 +/* The user-facing name of the symbol whose (internal) number is + YYSYMBOL. No bounds checking. */ +static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; + +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "\"end of file\"", "error", "\"invalid token\"", "IDENTIFIER", "STRING", + "FLOATVAL", "INTVAL", "DEALLOCATE", "PARAMETERS", "INTERSECT", + "TEMPORARY", "TIMESTAMP", "DISTINCT", "NVARCHAR", "RESTRICT", "TRUNCATE", + "ANALYZE", "BETWEEN", "CASCADE", "COLUMNS", "CONTROL", "DEFAULT", + "EXECUTE", "EXPLAIN", "INTEGER", "NATURAL", "PREPARE", "PRIMARY", + "SCHEMAS", "CHARACTER", "VARYING", "REAL", "DECIMAL", "SPATIAL", + "VARCHAR", "VIRTUAL", "DESCRIBE", "BEFORE", "COLUMN", "CREATE", "DELETE", + "DIRECT", "DOUBLE", "ESCAPE", "EXCEPT", "EXISTS", "EXTRACT", "CAST", + "FORMAT", "GLOBAL", "HAVING", "IMPORT", "INSERT", "ISNULL", "OFFSET", + "RENAME", "SCHEMA", "SELECT", "SORTED", "TABLES", "UNIQUE", "UNLOAD", + "UPDATE", "VALUES", "AFTER", "ALTER", "CROSS", "DELTA", "FLOAT", "GROUP", + "INDEX", "INNER", "LIMIT", "LOCAL", "MERGE", "MINUS", "ORDER", "OUTER", + "RIGHT", "TABLE", "UNION", "USING", "WHERE", "CALL", "CASE", "CHAR", + "COPY", "DATE", "DATETIME", "DESC", "DROP", "ELSE", "FILE", "FROM", + "FULL", "HASH", "HINT", "INTO", "JOIN", "LEFT", "LIKE", "LOAD", "LONG", + "NULL", "PLAN", "SHOW", "TEXT", "THEN", "TIME", "VIEW", "WHEN", "WITH", + "ADD", "ALL", "AND", "ASC", "END", "FOR", "INT", "KEY", "NOT", "OFF", + "SET", "TOP", "AS", "BY", "IF", "IN", "IS", "OF", "ON", "OR", "TO", + "ARRAY", "CONCAT", "ILIKE", "SECOND", "MINUTE", "HOUR", "DAY", "MONTH", + "YEAR", "TRUE", "FALSE", "TRANSACTION", "BEGIN", "COMMIT", "ROLLBACK", + "'='", "EQUALS", "NOTEQUALS", "'<'", "'>'", "LESS", "GREATER", "LESSEQ", + "GREATEREQ", "NOTNULL", "'+'", "'-'", "'*'", "'/'", "'%'", "'^'", + "UMINUS", "'['", "']'", "'('", "')'", "'.'", "';'", "','", "'?'", + "$accept", "input", "statement_list", "statement", + "preparable_statement", "opt_hints", "hint_list", "hint", + "transaction_statement", "opt_transaction_keyword", "prepare_statement", + "prepare_target_query", "execute_statement", "import_statement", + "file_type", "file_path", "opt_file_type", "export_statement", + "show_statement", "create_statement", "opt_not_exists", + "table_elem_commalist", "table_elem", "column_def", "column_type", + "opt_time_specification", "opt_decimal_specification", + "opt_column_constraints", "column_constraint", "table_constraint", + "drop_statement", "opt_exists", "alter_statement", "alter_action", + "drop_action", "delete_statement", "truncate_statement", + "insert_statement", "opt_column_list", "update_statement", + "update_clause_commalist", "update_clause", "select_statement", + "select_within_set_operation", + "select_within_set_operation_no_parentheses", "select_with_paren", + "select_no_paren", "set_operator", "set_type", "opt_all", + "select_clause", "opt_distinct", "select_list", "opt_from_clause", + "from_clause", "opt_where", "opt_group", "opt_having", "opt_order", + "order_list", "order_desc", "opt_order_type", "opt_top", "opt_limit", + "expr_list", "opt_literal_list", "literal_list", "expr_alias", "expr", + "operand", "scalar_expr", "unary_expr", "binary_expr", "logic_expr", + "in_expr", "case_expr", "case_list", "exists_expr", "comp_expr", + "function_expr", "extract_expr", "cast_expr", "datetime_field", + "array_expr", "array_index", "between_expr", "column_name", "literal", + "string_literal", "bool_literal", "num_literal", "int_literal", + "null_literal", "date_literal", "param_expr", "table_ref", + "table_ref_atomic", "nonjoin_table_ref_atomic", "table_ref_commalist", + "table_ref_name", "table_ref_name_no_alias", "table_name", + "opt_index_name", "index_name", "table_alias", "opt_table_alias", + "alias", "opt_alias", "opt_with_clause", "with_clause", + "with_description_list", "with_description", "join_clause", + "opt_join_type", "join_condition", "opt_semicolon", "ident_commalist", YY_NULLPTR +}; + +static const char * +yysymbol_name (yysymbol_kind_t yysymbol) +{ + return yytname[yysymbol]; +} +#endif + +#ifdef YYPRINT +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ +static const yytype_int16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, + 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, + 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, + 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, + 395, 396, 397, 398, 399, 400, 401, 402, 61, 403, + 404, 60, 62, 405, 406, 407, 408, 409, 43, 45, + 42, 47, 37, 94, 410, 91, 93, 40, 41, 46, + 59, 44, 63 +}; +#endif + +#define YYPACT_NINF (-405) + +#define yypact_value_is_default(Yyn) \ + ((Yyn) == YYPACT_NINF) + +#define YYTABLE_NINF (-288) + +#define yytable_value_is_error(Yyn) \ + ((Yyn) == YYTABLE_NINF) + + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +static const yytype_int16 yypact[] = +{ + 572, 85, 65, 133, 214, 65, 116, 130, 144, 147, + 65, 176, 65, 126, 24, 254, 122, 122, 122, 267, + 109, -405, 189, -405, 189, -405, -405, -405, -405, -405, + -405, -405, -405, -405, -405, -405, -405, -29, -405, 281, + 118, -405, 132, 209, -405, 178, 178, 178, 65, 303, + 65, 192, -405, 196, -61, 196, 196, 196, 65, -405, + 210, 180, -405, -405, -405, -405, -405, -405, 567, -405, + 251, -405, -405, 237, -29, 46, -405, 48, -405, 358, + 20, 362, 255, 371, 65, 65, 299, -405, 292, 220, + 385, 344, 65, 387, 387, 389, 65, 65, -405, 226, + 254, -405, 227, 390, 383, 229, 230, -405, -405, -405, + -29, 287, 276, -29, 60, -405, -405, -405, -405, 398, + -405, -405, -405, -405, 239, 240, -405, -405, -405, -405, + -405, -405, -405, -405, -405, -405, 365, -405, 284, -63, + 220, 270, -405, 387, 412, -15, 268, -55, -405, -405, + 328, 311, -405, 311, -405, -405, -405, -405, -405, -405, + 421, -405, -405, 270, -405, -405, 352, -405, -405, 46, + -405, -405, 270, 352, 270, 165, -405, -405, -405, 20, + -405, 65, 428, 321, 43, 310, 40, 269, 272, 286, + 266, 359, 290, 374, -405, 34, 149, 410, -405, -405, + -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, + -405, -405, -405, -405, 338, -405, -10, 297, -405, 270, + 385, -405, 418, -405, -405, 409, -405, -405, 300, 115, + -405, 366, 295, -405, 42, 60, -29, 298, -405, 99, + 60, 149, 414, -25, -405, 306, 378, -405, 701, 355, + 309, 123, -405, -405, -405, 321, 23, 14, 423, 190, + 270, 270, 128, -28, 314, 374, 603, 270, 158, 315, + -58, 270, 270, 374, -405, 374, -26, 317, 161, 374, + 374, 374, 374, 374, 374, 374, 374, 374, 374, 374, + 374, 374, 374, 374, 390, 65, -405, 475, 20, 149, + -405, 196, 303, 20, -405, 421, 15, 299, -405, 270, + -405, 479, -405, -405, -405, -405, 270, -405, -405, -405, + -405, 270, 270, 412, 387, -405, 455, -405, 319, 320, + -405, -405, 322, -405, -405, -405, -405, 323, -405, 69, + 324, 412, -405, 43, -405, -405, 270, -405, -405, 327, + -405, -405, -405, -405, -405, -405, 403, 3, -38, 108, + 270, 270, -405, 423, 397, -66, -405, -405, -405, 384, + 546, 622, 374, 332, 34, -405, 400, 335, 622, 622, + 622, 622, 289, 289, 289, 289, 158, 158, 66, 66, + 66, -68, 339, -405, -405, 167, 18, -405, 168, -405, + 321, -405, 162, -405, 333, -405, 33, -405, 437, -405, + -405, -405, 149, 149, 172, -405, 341, 503, -405, 505, + 506, 507, -405, 395, -405, -405, 417, 69, -405, 412, + 173, -405, 177, -405, 270, 701, 270, 270, -405, 131, + 120, 347, -405, 374, 622, 34, 353, 181, -405, -405, + -405, 354, -405, -405, 357, 424, -405, -405, -405, 450, + 451, 452, 434, 15, 532, -405, -405, -405, 411, -405, + -405, 533, 187, 372, 375, 379, -405, -405, -405, 188, + -405, -405, -56, 380, 149, 134, -405, 270, -405, 603, + 381, 199, -405, -405, 33, 15, -405, -405, -405, 15, + 211, 386, 270, 382, -405, 536, -405, -405, -405, -405, + -405, -405, -405, 149, -405, -405, -405, -405, 394, 412, + -6, -405, 388, 396, 270, 200, 270, -405, -405, 18, + 149, -405, -405, 149, 408, -405 +}; + + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ +static const yytype_int16 yydefact[] = +{ + 268, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 30, 30, 30, 0, + 288, 3, 21, 19, 21, 18, 8, 9, 7, 11, + 16, 17, 13, 14, 12, 15, 10, 0, 267, 0, + 254, 95, 33, 0, 44, 51, 51, 51, 0, 0, + 0, 0, 253, 90, 0, 90, 90, 90, 0, 42, + 0, 269, 270, 29, 26, 28, 27, 1, 268, 2, + 0, 6, 5, 143, 0, 104, 105, 135, 87, 0, + 153, 0, 0, 257, 0, 0, 129, 37, 0, 99, + 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, + 0, 4, 0, 0, 123, 0, 0, 117, 118, 116, + 0, 120, 0, 0, 149, 255, 235, 238, 240, 0, + 241, 236, 237, 243, 0, 152, 154, 229, 230, 231, + 239, 232, 233, 234, 32, 31, 0, 256, 0, 0, + 99, 0, 94, 0, 0, 0, 0, 129, 101, 89, + 0, 40, 38, 40, 258, 88, 85, 86, 272, 271, + 0, 142, 122, 0, 112, 111, 135, 108, 107, 109, + 119, 115, 0, 135, 0, 0, 113, 242, 34, 0, + 50, 0, 0, 268, 0, 0, 225, 0, 0, 0, + 0, 0, 0, 0, 227, 0, 128, 157, 164, 165, + 166, 159, 161, 167, 160, 180, 168, 169, 170, 171, + 163, 158, 173, 174, 0, 289, 0, 0, 97, 0, + 0, 100, 0, 91, 92, 0, 36, 41, 24, 0, + 22, 126, 124, 150, 266, 149, 0, 134, 136, 141, + 149, 145, 147, 144, 155, 0, 0, 47, 0, 0, + 0, 0, 52, 54, 55, 268, 123, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 176, 0, 175, 0, + 0, 0, 0, 0, 177, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 98, 0, 0, 103, + 102, 90, 0, 0, 20, 0, 0, 129, 125, 0, + 264, 0, 265, 156, 106, 110, 0, 140, 139, 138, + 114, 0, 0, 0, 0, 58, 0, 63, 75, 0, + 62, 60, 0, 70, 69, 59, 67, 72, 57, 78, + 0, 0, 46, 0, 49, 212, 0, 226, 228, 0, + 216, 217, 218, 219, 220, 221, 0, 0, 0, 0, + 0, 0, 199, 0, 0, 0, 172, 162, 191, 192, + 0, 187, 0, 0, 0, 178, 0, 190, 189, 205, + 206, 207, 208, 209, 210, 211, 182, 181, 184, 183, + 185, 186, 0, 35, 290, 0, 0, 39, 0, 23, + 268, 127, 244, 246, 0, 248, 262, 247, 131, 151, + 263, 137, 148, 146, 0, 45, 0, 0, 61, 0, + 0, 0, 68, 0, 80, 81, 0, 56, 76, 0, + 0, 53, 0, 203, 0, 0, 0, 0, 197, 0, + 0, 0, 222, 0, 188, 0, 0, 0, 179, 223, + 96, 225, 93, 25, 0, 0, 284, 276, 282, 280, + 283, 278, 0, 0, 0, 261, 252, 259, 0, 121, + 48, 0, 0, 0, 0, 0, 79, 82, 77, 0, + 84, 213, 0, 0, 201, 0, 200, 0, 204, 224, + 0, 0, 195, 193, 262, 0, 279, 281, 277, 0, + 245, 263, 0, 0, 74, 0, 64, 66, 71, 83, + 214, 215, 198, 202, 196, 194, 249, 273, 285, 0, + 133, 65, 0, 0, 0, 0, 0, 130, 73, 0, + 286, 274, 260, 132, 0, 275 +}; + + /* YYPGOTO[NTERM-NUM]. */ +static const yytype_int16 yypgoto[] = +{ + -405, -405, -405, 483, -405, 528, -405, 249, -405, 142, + -405, -405, -405, -405, 253, -81, 404, -405, -405, -405, + 169, -405, 221, -405, 143, -405, -405, -405, 150, -405, + -405, -47, -405, -405, -405, -405, -405, -405, 440, -405, + -405, 361, -178, -72, -405, 10, -73, -54, -405, -405, + -46, 329, -405, -405, -405, -128, -405, -405, 31, -405, + 274, -405, -405, -32, -261, -405, -45, 275, -141, -140, + -405, -405, -405, -405, -405, -405, 326, -405, -405, -405, + -405, -405, -405, -405, -405, -405, -374, -77, -78, -405, + -405, -92, -405, -405, -405, -405, -404, 88, -405, -405, + -405, 2, -405, -405, -405, 92, 363, -405, -405, -405, + -405, 491, -405, -405, -405, -405, -321 +}; + + /* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = +{ + 0, 19, 20, 21, 22, 71, 229, 230, 23, 64, + 24, 135, 25, 26, 88, 151, 226, 27, 28, 29, + 83, 251, 252, 253, 339, 422, 418, 427, 428, 254, + 30, 92, 31, 223, 224, 32, 33, 34, 145, 35, + 147, 148, 36, 166, 167, 168, 76, 110, 111, 171, + 77, 163, 231, 307, 308, 142, 469, 527, 114, 237, + 238, 319, 104, 176, 232, 124, 125, 233, 234, 197, + 198, 199, 200, 201, 202, 203, 263, 204, 205, 206, + 207, 208, 356, 209, 210, 211, 212, 213, 127, 128, + 129, 130, 131, 132, 133, 401, 402, 403, 404, 405, + 51, 406, 138, 155, 465, 466, 467, 313, 37, 38, + 61, 62, 407, 462, 531, 69, 216 +}; + + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ +static const yytype_int16 yytable[] = +{ + 196, 106, 414, 126, 41, 247, 365, 44, 95, 96, + 97, 161, 52, 153, 54, 152, 152, 347, 40, 221, + 430, 451, 452, 113, 116, 117, 118, 141, 73, 322, + 182, 239, 93, 241, 243, 162, 310, 186, 116, 117, + 118, 173, 73, 58, 526, 310, 248, 75, 217, 262, + 86, 266, 89, 268, 270, 107, 271, 107, 271, 500, + 98, 183, 214, 360, 169, 152, 279, 169, 40, 436, + 249, 94, 218, 272, 372, 272, 271, 344, 299, 187, + 188, 189, 361, 59, 105, 432, 139, 140, 362, 271, + 108, 73, 108, 272, 150, 518, 423, 294, 156, 157, + 442, 373, 244, 250, 184, 309, 272, 119, 479, 158, + 367, 39, 510, 447, 174, 236, 220, 271, 190, 357, + 358, 119, 269, 120, 112, 266, 109, 435, 109, 424, + 368, 369, 175, 370, 272, 371, 42, 120, 74, 377, + 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, + 388, 389, 390, 391, 191, 534, 271, 464, 296, 65, + 66, 297, 121, 122, 315, 309, 311, 192, 186, 116, + 117, 118, 425, 272, 348, 239, 121, 122, 194, 408, + 412, 413, 400, 245, 491, 349, 45, 455, 317, 426, + 169, 345, 123, 193, 194, 46, 55, 235, 525, 437, + 279, 195, 392, 314, 240, 56, 123, 256, 320, 257, + 187, 188, 189, 271, 318, 84, 85, 43, 361, 439, + 440, 126, 454, 48, 438, 47, 126, 487, 456, 293, + 272, 294, 444, 457, 271, 57, 455, 49, 261, 458, + 459, 520, 271, 415, 50, 271, 152, 486, 271, 190, + 512, 272, 119, 395, 396, 53, 460, 60, 398, 272, + -285, 461, 272, 271, 375, 272, 63, 67, 120, 186, + 116, 117, 118, 186, 116, 117, 118, 456, 242, 68, + 272, 376, 457, 304, 78, 191, 305, 79, 458, 459, + 441, 342, 279, 482, 343, 484, 485, 393, 192, 80, + 70, 446, 81, 489, 82, 460, 87, 121, 122, -285, + 461, 187, 188, 189, 90, 187, 188, 189, 290, 291, + 292, 293, 91, 294, 193, 194, 350, 351, 352, 353, + 354, 355, 195, -250, 99, 450, 453, 123, 179, 179, + 470, 480, 274, 297, 297, 481, 513, 102, 309, 493, + 190, 100, 309, 119, 190, 504, 509, 119, 505, 297, + 103, 115, 186, 116, 117, 118, 134, 515, 532, 120, + 309, 297, 490, 120, 137, 136, 261, 186, 116, 117, + 118, 141, -251, 530, 143, 533, 191, 144, 146, 149, + 191, 116, 154, 74, 160, 162, 118, 164, 165, 192, + 170, 172, 177, 192, 264, 188, 189, 178, 121, 122, + 180, 179, 121, 122, 181, 215, 219, 278, 222, 455, + 188, 189, 225, 279, 228, 193, 194, 273, 112, 193, + 194, 246, 15, 195, 255, 295, 258, 195, 123, 259, + -288, -288, 123, 190, -288, -288, 119, 288, 289, 290, + 291, 292, 293, 260, 294, 267, 301, 302, 190, 306, + 456, 119, 120, 274, 298, 457, 309, 303, 321, 316, + 324, 458, 459, 323, 340, 523, 341, 120, 394, 265, + 73, 363, 410, 366, 374, 416, 417, 419, 460, 420, + 421, 429, 192, 461, 265, 433, 434, 372, 271, 445, + 294, 121, 122, 448, 463, 449, 468, 192, 471, 472, + 275, 473, 474, 475, 476, 488, 121, 122, 193, 194, + 477, 492, 495, 257, 524, 494, 195, 496, 497, 498, + 276, 123, 499, 193, 194, 501, 502, 277, 278, 503, + 506, 195, 522, 507, 279, 280, 123, 508, 511, 514, + 521, 101, 72, 519, 399, 397, 528, 227, 281, 282, + 283, 284, 285, 529, 431, 286, 287, -287, 288, 289, + 290, 291, 292, 293, 1, 294, 535, 478, 483, 1, + 185, 300, 2, 517, 409, 346, 516, 2, 359, 3, + 411, 159, 0, 4, 3, 0, 0, 312, 4, 274, + 0, 0, 0, 5, 0, 0, 6, 7, 5, 0, + 0, 6, 7, 0, 0, 0, 0, 0, 8, 9, + 0, 0, 0, 8, 9, 0, 0, 0, 0, 10, + 0, 0, 11, 0, 10, 0, 0, 11, 0, 0, + 0, 0, 0, 0, 0, 0, 275, 0, 0, 0, + 0, 0, 0, 12, 0, 0, 274, 13, 12, 0, + 443, 0, 13, 0, 0, 0, 364, 0, 0, 0, + 0, 0, 14, 0, 278, 274, 0, 14, 15, 0, + 279, 280, 0, 15, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 281, 282, 283, 284, 285, 0, + 0, 286, 287, 275, 288, 289, 290, 291, 292, 293, + 0, 294, 16, 17, 18, 0, 0, 16, 17, 18, + 0, 0, -288, 364, 0, 325, 0, 0, 0, 0, + 326, 278, 327, 328, 0, 329, 0, 279, 280, 0, + 0, 0, 0, 330, 0, 0, 0, 0, 0, 0, + 278, 281, 282, 283, 284, 285, 279, -288, 286, 287, + 0, 288, 289, 290, 291, 292, 293, 0, 294, 331, + -288, -288, -288, 284, 285, 0, 0, 286, 287, 0, + 288, 289, 290, 291, 292, 293, 332, 294, 333, 334, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 335, 0, 0, 0, 336, 0, 337, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 338 +}; + +static const yytype_int16 yycheck[] = +{ + 141, 74, 323, 80, 2, 183, 267, 5, 55, 56, + 57, 103, 10, 94, 12, 93, 94, 3, 3, 147, + 341, 3, 396, 77, 4, 5, 6, 82, 57, 54, + 93, 172, 93, 174, 175, 12, 3, 3, 4, 5, + 6, 113, 57, 19, 50, 3, 3, 37, 63, 190, + 48, 191, 50, 193, 195, 9, 114, 9, 114, 463, + 58, 124, 143, 91, 110, 143, 134, 113, 3, 107, + 27, 132, 145, 131, 100, 131, 114, 255, 219, 45, + 46, 47, 110, 59, 74, 346, 84, 85, 116, 114, + 44, 57, 44, 131, 92, 499, 27, 165, 96, 97, + 166, 127, 179, 60, 167, 171, 131, 87, 429, 99, + 168, 26, 168, 374, 54, 169, 171, 114, 84, 260, + 261, 87, 195, 103, 76, 265, 80, 124, 80, 60, + 271, 272, 72, 273, 131, 275, 3, 103, 167, 279, + 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 120, 529, 114, 124, 168, 17, + 18, 171, 142, 143, 236, 171, 124, 133, 3, 4, + 5, 6, 103, 131, 160, 316, 142, 143, 160, 307, + 321, 322, 167, 181, 445, 258, 70, 25, 89, 120, + 236, 168, 172, 159, 160, 79, 70, 166, 519, 91, + 134, 167, 294, 235, 173, 79, 172, 167, 240, 169, + 45, 46, 47, 114, 115, 46, 47, 3, 110, 360, + 361, 298, 400, 93, 116, 109, 303, 107, 66, 163, + 131, 165, 372, 71, 114, 109, 25, 93, 110, 77, + 78, 502, 114, 324, 97, 114, 324, 116, 114, 84, + 116, 131, 87, 298, 301, 79, 94, 3, 303, 131, + 98, 99, 131, 114, 103, 131, 144, 0, 103, 3, + 4, 5, 6, 3, 4, 5, 6, 66, 113, 170, + 131, 120, 71, 168, 3, 120, 171, 169, 77, 78, + 363, 168, 134, 434, 171, 436, 437, 295, 133, 167, + 111, 374, 93, 443, 126, 94, 3, 142, 143, 98, + 99, 45, 46, 47, 122, 45, 46, 47, 160, 161, + 162, 163, 126, 165, 159, 160, 136, 137, 138, 139, + 140, 141, 167, 171, 124, 168, 168, 172, 171, 171, + 168, 168, 53, 171, 171, 168, 487, 96, 171, 168, + 84, 171, 171, 87, 84, 168, 168, 87, 171, 171, + 123, 3, 3, 4, 5, 6, 4, 168, 168, 103, + 171, 171, 445, 103, 3, 120, 110, 3, 4, 5, + 6, 82, 171, 524, 92, 526, 120, 167, 3, 45, + 120, 4, 3, 167, 167, 12, 6, 168, 168, 133, + 113, 125, 4, 133, 45, 46, 47, 168, 142, 143, + 45, 171, 142, 143, 130, 3, 148, 128, 90, 25, + 46, 47, 111, 134, 3, 159, 160, 17, 76, 159, + 160, 3, 111, 167, 124, 97, 167, 167, 172, 167, + 151, 152, 172, 84, 155, 156, 87, 158, 159, 160, + 161, 162, 163, 167, 165, 165, 38, 48, 84, 93, + 66, 87, 103, 53, 167, 71, 171, 167, 54, 171, + 92, 77, 78, 167, 119, 81, 167, 103, 3, 120, + 57, 167, 3, 168, 167, 30, 167, 167, 94, 167, + 167, 167, 133, 99, 120, 168, 93, 100, 114, 167, + 165, 142, 143, 103, 171, 166, 69, 133, 167, 6, + 100, 6, 6, 6, 119, 168, 142, 143, 159, 160, + 103, 168, 98, 169, 130, 168, 167, 77, 77, 77, + 120, 172, 98, 159, 160, 3, 125, 127, 128, 6, + 168, 167, 6, 168, 134, 135, 172, 168, 168, 168, + 168, 68, 24, 167, 305, 302, 168, 153, 148, 149, + 150, 151, 152, 167, 343, 155, 156, 0, 158, 159, + 160, 161, 162, 163, 7, 165, 168, 427, 435, 7, + 140, 220, 15, 495, 309, 256, 494, 15, 262, 22, + 316, 100, -1, 26, 22, -1, -1, 234, 26, 53, + -1, -1, -1, 36, -1, -1, 39, 40, 36, -1, + -1, 39, 40, -1, -1, -1, -1, -1, 51, 52, + -1, -1, -1, 51, 52, -1, -1, -1, -1, 62, + -1, -1, 65, -1, 62, -1, -1, 65, -1, -1, + -1, -1, -1, -1, -1, -1, 100, -1, -1, -1, + -1, -1, -1, 86, -1, -1, 53, 90, 86, -1, + 114, -1, 90, -1, -1, -1, 120, -1, -1, -1, + -1, -1, 105, -1, 128, 53, -1, 105, 111, -1, + 134, 135, -1, 111, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 148, 149, 150, 151, 152, -1, + -1, 155, 156, 100, 158, 159, 160, 161, 162, 163, + -1, 165, 145, 146, 147, -1, -1, 145, 146, 147, + -1, -1, 100, 120, -1, 24, -1, -1, -1, -1, + 29, 128, 31, 32, -1, 34, -1, 134, 135, -1, + -1, -1, -1, 42, -1, -1, -1, -1, -1, -1, + 128, 148, 149, 150, 151, 152, 134, 135, 155, 156, + -1, 158, 159, 160, 161, 162, 163, -1, 165, 68, + 148, 149, 150, 151, 152, -1, -1, 155, 156, -1, + 158, 159, 160, 161, 162, 163, 85, 165, 87, 88, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 102, -1, -1, -1, 106, -1, 108, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 118 +}; + + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_int16 yystos[] = +{ + 0, 7, 15, 22, 26, 36, 39, 40, 51, 52, + 62, 65, 86, 90, 105, 111, 145, 146, 147, 174, + 175, 176, 177, 181, 183, 185, 186, 190, 191, 192, + 203, 205, 208, 209, 210, 212, 215, 281, 282, 26, + 3, 274, 3, 3, 274, 70, 79, 109, 93, 93, + 97, 273, 274, 79, 274, 70, 79, 109, 19, 59, + 3, 283, 284, 144, 182, 182, 182, 0, 170, 288, + 111, 178, 178, 57, 167, 218, 219, 223, 3, 169, + 167, 93, 126, 193, 193, 193, 274, 3, 187, 274, + 122, 126, 204, 93, 132, 204, 204, 204, 274, 124, + 171, 176, 96, 123, 235, 218, 219, 9, 44, 80, + 220, 221, 76, 220, 231, 3, 4, 5, 6, 87, + 103, 142, 143, 172, 238, 239, 260, 261, 262, 263, + 264, 265, 266, 267, 4, 184, 120, 3, 275, 274, + 274, 82, 228, 92, 167, 211, 3, 213, 214, 45, + 274, 188, 261, 188, 3, 276, 274, 274, 218, 284, + 167, 264, 12, 224, 168, 168, 216, 217, 218, 223, + 113, 222, 125, 216, 54, 72, 236, 4, 168, 171, + 45, 130, 93, 124, 167, 211, 3, 45, 46, 47, + 84, 120, 133, 159, 160, 167, 241, 242, 243, 244, + 245, 246, 247, 248, 250, 251, 252, 253, 254, 256, + 257, 258, 259, 260, 188, 3, 289, 63, 219, 148, + 171, 228, 90, 206, 207, 111, 189, 189, 3, 179, + 180, 225, 237, 240, 241, 231, 220, 232, 233, 241, + 231, 241, 113, 241, 260, 274, 3, 215, 3, 27, + 60, 194, 195, 196, 202, 124, 167, 169, 167, 167, + 167, 110, 241, 249, 45, 120, 242, 165, 242, 219, + 241, 114, 131, 17, 53, 100, 120, 127, 128, 134, + 135, 148, 149, 150, 151, 152, 155, 156, 158, 159, + 160, 161, 162, 163, 165, 97, 168, 171, 167, 241, + 214, 38, 48, 167, 168, 171, 93, 226, 227, 171, + 3, 124, 279, 280, 236, 216, 171, 89, 115, 234, + 236, 54, 54, 167, 92, 24, 29, 31, 32, 34, + 42, 68, 85, 87, 88, 102, 106, 108, 118, 197, + 119, 167, 168, 171, 215, 168, 224, 3, 160, 219, + 136, 137, 138, 139, 140, 141, 255, 241, 241, 249, + 91, 110, 116, 167, 120, 237, 168, 168, 241, 241, + 242, 242, 100, 127, 167, 103, 120, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 264, 274, 3, 239, 204, 187, 239, 180, + 167, 268, 269, 270, 271, 272, 274, 285, 228, 240, + 3, 233, 241, 241, 289, 188, 30, 167, 199, 167, + 167, 167, 198, 27, 60, 103, 120, 200, 201, 167, + 289, 195, 237, 168, 93, 124, 107, 91, 116, 241, + 241, 219, 166, 114, 242, 167, 219, 237, 103, 166, + 168, 3, 259, 168, 215, 25, 66, 71, 77, 78, + 94, 99, 286, 171, 124, 277, 278, 279, 69, 229, + 168, 167, 6, 6, 6, 6, 119, 103, 201, 289, + 168, 168, 241, 197, 241, 241, 116, 107, 168, 242, + 219, 237, 168, 168, 168, 98, 77, 77, 77, 98, + 269, 3, 125, 6, 168, 171, 168, 168, 168, 168, + 168, 168, 116, 241, 168, 168, 278, 270, 269, 167, + 237, 168, 6, 81, 130, 289, 50, 230, 168, 167, + 241, 287, 168, 241, 259, 168 +}; + + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_int16 yyr1[] = +{ + 0, 173, 174, 175, 175, 176, 176, 176, 176, 176, + 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, + 178, 178, 179, 179, 180, 180, 181, 181, 181, 182, + 182, 183, 184, 185, 185, 186, 186, 187, 188, 189, + 189, 190, 191, 191, 191, 192, 192, 192, 192, 192, + 193, 193, 194, 194, 195, 195, 196, 197, 197, 197, + 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, + 197, 198, 198, 199, 199, 199, 200, 200, 200, 201, + 201, 201, 201, 202, 202, 203, 203, 203, 203, 204, + 204, 205, 206, 207, 208, 209, 210, 210, 211, 211, + 212, 213, 213, 214, 215, 215, 215, 216, 216, 217, + 217, 218, 218, 219, 219, 220, 221, 221, 221, 222, + 222, 223, 224, 224, 225, 226, 226, 227, 228, 228, + 229, 229, 230, 230, 231, 231, 232, 232, 233, 234, + 234, 234, 235, 235, 236, 236, 236, 236, 236, 236, + 237, 237, 238, 238, 239, 239, 240, 241, 241, 241, + 241, 241, 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 243, 243, 244, 244, 244, 244, 244, + 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, + 245, 246, 246, 247, 247, 247, 247, 248, 248, 248, + 248, 249, 249, 250, 250, 251, 251, 251, 251, 251, + 251, 251, 252, 252, 253, 254, 255, 255, 255, 255, + 255, 255, 256, 257, 258, 259, 259, 259, 259, 260, + 260, 260, 260, 260, 260, 261, 262, 262, 263, 263, + 264, 265, 266, 267, 268, 268, 269, 269, 270, 270, + 271, 271, 272, 273, 274, 274, 275, 275, 276, 277, + 277, 278, 278, 279, 279, 280, 280, 281, 281, 282, + 283, 283, 284, 285, 285, 285, 286, 286, 286, 286, + 286, 286, 286, 286, 286, 286, 287, 288, 288, 289, + 289 +}; + + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +static const yytype_int8 yyr2[] = +{ + 0, 2, 2, 1, 3, 2, 2, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 5, 0, 1, 3, 1, 4, 2, 2, 2, 1, + 0, 4, 1, 2, 5, 7, 5, 1, 1, 3, + 0, 5, 2, 3, 2, 8, 7, 6, 9, 7, + 3, 0, 1, 3, 1, 1, 3, 1, 1, 1, + 1, 2, 1, 1, 4, 5, 4, 1, 2, 1, + 1, 3, 0, 5, 3, 0, 1, 2, 0, 2, + 1, 1, 2, 5, 4, 4, 4, 3, 4, 2, + 0, 5, 1, 4, 4, 2, 8, 5, 3, 0, + 5, 1, 3, 3, 2, 2, 6, 1, 1, 1, + 3, 3, 3, 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, 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, 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, 2, 1, 1, 3, 1, 1, 1, 4, + 1, 3, 2, 1, 1, 3, 1, 0, 1, 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 +}; + + +enum { YYENOMEM = -2 }; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = SQL_HSQL_EMPTY) + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ + do \ + if (yychar == SQL_HSQL_EMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (&yylloc, result, scanner, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ + while (0) + +/* Backward compatibility with an undocumented macro. + Use SQL_HSQL_error or SQL_HSQL_UNDEF. */ +#define YYERRCODE SQL_HSQL_UNDEF + +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (N) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (0) +#endif + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) + + +/* Enable debugging if requested. */ +#if HSQL_DEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) + + +/* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know + we won't break user code: when these are the locations we know. */ + +# ifndef YY_LOCATION_PRINT +# if defined HSQL_LTYPE_IS_TRIVIAL && HSQL_LTYPE_IS_TRIVIAL + +/* Print *YYLOCP on YYO. Private, do not rely on its existence. */ + +YY_ATTRIBUTE_UNUSED +static int +yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) +{ + int res = 0; + int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; + if (0 <= yylocp->first_line) + { + res += YYFPRINTF (yyo, "%d", yylocp->first_line); + if (0 <= yylocp->first_column) + res += YYFPRINTF (yyo, ".%d", yylocp->first_column); + } + if (0 <= yylocp->last_line) + { + if (yylocp->first_line < yylocp->last_line) + { + res += YYFPRINTF (yyo, "-%d", yylocp->last_line); + if (0 <= end_col) + res += YYFPRINTF (yyo, ".%d", end_col); + } + else if (0 <= end_col && yylocp->first_column < end_col) + res += YYFPRINTF (yyo, "-%d", end_col); + } + return res; + } + +# define YY_LOCATION_PRINT(File, Loc) \ + yy_location_print_ (File, &(Loc)) + +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif +# endif /* !defined YY_LOCATION_PRINT */ + + +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Kind, Value, Location, result, scanner); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) + + +/*-----------------------------------. +| Print this symbol's value on YYO. | +`-----------------------------------*/ + +static void +yy_symbol_value_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, hsql::SQLParserResult* result, yyscan_t scanner) +{ + FILE *yyoutput = yyo; + YY_USE (yyoutput); + YY_USE (yylocationp); + YY_USE (result); + YY_USE (scanner); + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yykind < YYNTOKENS) + YYPRINT (yyo, yytoknum[yykind], *yyvaluep); +# endif + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YY_USE (yykind); + YY_IGNORE_MAYBE_UNINITIALIZED_END +} + + +/*---------------------------. +| Print this symbol on YYO. | +`---------------------------*/ + +static void +yy_symbol_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, hsql::SQLParserResult* result, yyscan_t scanner) +{ + YYFPRINTF (yyo, "%s %s (", + yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); + + YY_LOCATION_PRINT (yyo, *yylocationp); + YYFPRINTF (yyo, ": "); + yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, result, scanner); + YYFPRINTF (yyo, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +static void +yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) +{ + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +static void +yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, + int yyrule, hsql::SQLParserResult* result, yyscan_t scanner) +{ + int yylno = yyrline[yyrule]; + int yynrhs = yyr2[yyrule]; + int yyi; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, + YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), + &yyvsp[(yyi + 1) - (yynrhs)], + &(yylsp[(yyi + 1) - (yynrhs)]), result, scanner); + YYFPRINTF (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, yylsp, Rule, result, scanner); \ +} while (0) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !HSQL_DEBUG */ +# define YYDPRINTF(Args) ((void) 0) +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !HSQL_DEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + +/* Context of a parse error. */ +typedef struct +{ + yy_state_t *yyssp; + yysymbol_kind_t yytoken; + YYLTYPE *yylloc; +} yypcontext_t; + +/* Put in YYARG at most YYARGN of the expected tokens given the + current YYCTX, and return the number of tokens stored in YYARG. If + YYARG is null, return the number of expected tokens (guaranteed to + be less than YYNTOKENS). Return YYENOMEM on memory exhaustion. + Return 0 if there are more than YYARGN expected tokens, yet fill + YYARG up to YYARGN. */ +static int +yypcontext_expected_tokens (const yypcontext_t *yyctx, + yysymbol_kind_t yyarg[], int yyargn) +{ + /* Actual size of YYARG. */ + int yycount = 0; + int yyn = yypact[+*yyctx->yyssp]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (!yyarg) + ++yycount; + else if (yycount == yyargn) + return 0; + else + yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx); + } + } + if (yyarg && yycount == 0 && 0 < yyargn) + yyarg[0] = YYSYMBOL_YYEMPTY; + return yycount; +} + + + + +#ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) +# else +/* Return the length of YYSTR. */ +static YYPTRDIFF_T +yystrlen (const char *yystr) +{ + YYPTRDIFF_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +#endif + +#ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +static char * +yystpcpy (char *yydest, const char *yysrc) +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +#endif + +#ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYPTRDIFF_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYPTRDIFF_T yyn = 0; + char const *yyp = yystr; + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + else + goto append; + + append: + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (yyres) + return yystpcpy (yyres, yystr) - yyres; + else + return yystrlen (yystr); +} +#endif + + +static int +yy_syntax_error_arguments (const yypcontext_t *yyctx, + yysymbol_kind_t yyarg[], int yyargn) +{ + /* Actual size of YYARG. */ + int yycount = 0; + /* There are many possibilities here to consider: + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yyctx->yytoken != YYSYMBOL_YYEMPTY) + { + int yyn; + if (yyarg) + yyarg[yycount] = yyctx->yytoken; + ++yycount; + yyn = yypcontext_expected_tokens (yyctx, + yyarg ? yyarg + 1 : yyarg, yyargn - 1); + if (yyn == YYENOMEM) + return YYENOMEM; + else + yycount += yyn; + } + return yycount; +} + +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. + + Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, + const yypcontext_t *yyctx) +{ + enum { YYARGS_MAX = 5 }; + /* Internationalized format string. */ + const char *yyformat = YY_NULLPTR; + /* Arguments of yyformat: reported tokens (one for the "unexpected", + one per "expected"). */ + yysymbol_kind_t yyarg[YYARGS_MAX]; + /* Cumulated lengths of YYARG. */ + YYPTRDIFF_T yysize = 0; + + /* Actual size of YYARG. */ + int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX); + if (yycount == YYENOMEM) + return YYENOMEM; + + switch (yycount) + { +#define YYCASE_(N, S) \ + 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")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +#undef YYCASE_ + } + + /* Compute error message size. Don't count the "%s"s, but reserve + room for the terminator. */ + yysize = yystrlen (yyformat) - 2 * yycount + 1; + { + int yyi; + for (yyi = 0; yyi < yycount; ++yyi) + { + YYPTRDIFF_T yysize1 + = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]); + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else + return YYENOMEM; + } + } + + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return -1; + } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]); + yyformat += 2; + } + else + { + ++yyp; + ++yyformat; + } + } + return 0; +} + + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +static void +yydestruct (const char *yymsg, + yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, hsql::SQLParserResult* result, yyscan_t scanner) +{ + YY_USE (yyvaluep); + YY_USE (yylocationp); + YY_USE (result); + YY_USE (scanner); + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); + + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + switch (yykind) + { + case YYSYMBOL_IDENTIFIER: /* IDENTIFIER */ +#line 157 "bison_parser.y" + { free( (((*yyvaluep).sval)) ); } +#line 1979 "bison_parser.cpp" + break; + + case YYSYMBOL_STRING: /* STRING */ +#line 157 "bison_parser.y" + { free( (((*yyvaluep).sval)) ); } +#line 1985 "bison_parser.cpp" + break; + + case YYSYMBOL_FLOATVAL: /* FLOATVAL */ +#line 155 "bison_parser.y" + { } +#line 1991 "bison_parser.cpp" + break; + + case YYSYMBOL_INTVAL: /* INTVAL */ +#line 155 "bison_parser.y" + { } +#line 1997 "bison_parser.cpp" + break; + + case YYSYMBOL_statement_list: /* statement_list */ +#line 158 "bison_parser.y" + { + if ((((*yyvaluep).stmt_vec)) != nullptr) { + for (auto ptr : *(((*yyvaluep).stmt_vec))) { + delete ptr; + } + } + delete (((*yyvaluep).stmt_vec)); +} +#line 2010 "bison_parser.cpp" + break; + + case YYSYMBOL_statement: /* statement */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).statement)); } +#line 2016 "bison_parser.cpp" + break; + + case YYSYMBOL_preparable_statement: /* preparable_statement */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).statement)); } +#line 2022 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_hints: /* opt_hints */ +#line 158 "bison_parser.y" + { + if ((((*yyvaluep).expr_vec)) != nullptr) { + for (auto ptr : *(((*yyvaluep).expr_vec))) { + delete ptr; + } + } + delete (((*yyvaluep).expr_vec)); +} +#line 2035 "bison_parser.cpp" + break; + + case YYSYMBOL_hint_list: /* hint_list */ +#line 158 "bison_parser.y" + { + if ((((*yyvaluep).expr_vec)) != nullptr) { + for (auto ptr : *(((*yyvaluep).expr_vec))) { + delete ptr; + } + } + delete (((*yyvaluep).expr_vec)); +} +#line 2048 "bison_parser.cpp" + break; + + case YYSYMBOL_hint: /* hint */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2054 "bison_parser.cpp" + break; + + case YYSYMBOL_transaction_statement: /* transaction_statement */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).transaction_stmt)); } +#line 2060 "bison_parser.cpp" + break; + + case YYSYMBOL_prepare_statement: /* prepare_statement */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).prep_stmt)); } +#line 2066 "bison_parser.cpp" + break; + + case YYSYMBOL_prepare_target_query: /* prepare_target_query */ +#line 157 "bison_parser.y" + { free( (((*yyvaluep).sval)) ); } +#line 2072 "bison_parser.cpp" + break; + + case YYSYMBOL_execute_statement: /* execute_statement */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).exec_stmt)); } +#line 2078 "bison_parser.cpp" + break; + + case YYSYMBOL_import_statement: /* import_statement */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).import_stmt)); } +#line 2084 "bison_parser.cpp" + break; + + case YYSYMBOL_file_type: /* file_type */ +#line 155 "bison_parser.y" + { } +#line 2090 "bison_parser.cpp" + break; + + case YYSYMBOL_file_path: /* file_path */ +#line 157 "bison_parser.y" + { free( (((*yyvaluep).sval)) ); } +#line 2096 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_file_type: /* opt_file_type */ +#line 155 "bison_parser.y" + { } +#line 2102 "bison_parser.cpp" + break; + + case YYSYMBOL_export_statement: /* export_statement */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).export_stmt)); } +#line 2108 "bison_parser.cpp" + break; + + case YYSYMBOL_show_statement: /* show_statement */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).show_stmt)); } +#line 2114 "bison_parser.cpp" + break; + + case YYSYMBOL_create_statement: /* create_statement */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).create_stmt)); } +#line 2120 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_not_exists: /* opt_not_exists */ +#line 155 "bison_parser.y" + { } +#line 2126 "bison_parser.cpp" + break; + + case YYSYMBOL_table_elem_commalist: /* table_elem_commalist */ +#line 158 "bison_parser.y" + { + if ((((*yyvaluep).table_element_vec)) != nullptr) { + for (auto ptr : *(((*yyvaluep).table_element_vec))) { + delete ptr; + } + } + delete (((*yyvaluep).table_element_vec)); +} +#line 2139 "bison_parser.cpp" + break; + + case YYSYMBOL_table_elem: /* table_elem */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).table_element_t)); } +#line 2145 "bison_parser.cpp" + break; + + case YYSYMBOL_column_def: /* column_def */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).column_t)); } +#line 2151 "bison_parser.cpp" + break; + + case YYSYMBOL_column_type: /* column_type */ +#line 155 "bison_parser.y" + { } +#line 2157 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_time_specification: /* opt_time_specification */ +#line 155 "bison_parser.y" + { } +#line 2163 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_decimal_specification: /* opt_decimal_specification */ +#line 155 "bison_parser.y" + { } +#line 2169 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_column_constraints: /* opt_column_constraints */ +#line 155 "bison_parser.y" + { } +#line 2175 "bison_parser.cpp" + break; + + case YYSYMBOL_column_constraint: /* column_constraint */ +#line 155 "bison_parser.y" + { } +#line 2181 "bison_parser.cpp" + break; + + case YYSYMBOL_table_constraint: /* table_constraint */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).table_constraint_t)); } +#line 2187 "bison_parser.cpp" + break; + + case YYSYMBOL_drop_statement: /* drop_statement */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).drop_stmt)); } +#line 2193 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_exists: /* opt_exists */ +#line 155 "bison_parser.y" + { } +#line 2199 "bison_parser.cpp" + break; + + case YYSYMBOL_alter_statement: /* alter_statement */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).alter_stmt)); } +#line 2205 "bison_parser.cpp" + break; + + case YYSYMBOL_alter_action: /* alter_action */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).alter_action_t)); } +#line 2211 "bison_parser.cpp" + break; + + case YYSYMBOL_drop_action: /* drop_action */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).drop_action_t)); } +#line 2217 "bison_parser.cpp" + break; + + case YYSYMBOL_delete_statement: /* delete_statement */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).delete_stmt)); } +#line 2223 "bison_parser.cpp" + break; + + case YYSYMBOL_truncate_statement: /* truncate_statement */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).delete_stmt)); } +#line 2229 "bison_parser.cpp" + break; + + case YYSYMBOL_insert_statement: /* insert_statement */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).insert_stmt)); } +#line 2235 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_column_list: /* opt_column_list */ +#line 158 "bison_parser.y" + { + if ((((*yyvaluep).str_vec)) != nullptr) { + for (auto ptr : *(((*yyvaluep).str_vec))) { + delete ptr; + } + } + delete (((*yyvaluep).str_vec)); +} +#line 2248 "bison_parser.cpp" + break; + + case YYSYMBOL_update_statement: /* update_statement */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).update_stmt)); } +#line 2254 "bison_parser.cpp" + break; + + case YYSYMBOL_update_clause_commalist: /* update_clause_commalist */ +#line 158 "bison_parser.y" + { + if ((((*yyvaluep).update_vec)) != nullptr) { + for (auto ptr : *(((*yyvaluep).update_vec))) { + delete ptr; + } + } + delete (((*yyvaluep).update_vec)); +} +#line 2267 "bison_parser.cpp" + break; + + case YYSYMBOL_update_clause: /* update_clause */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).update_t)); } +#line 2273 "bison_parser.cpp" + break; + + case YYSYMBOL_select_statement: /* select_statement */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).select_stmt)); } +#line 2279 "bison_parser.cpp" + break; + + case YYSYMBOL_select_within_set_operation: /* select_within_set_operation */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).select_stmt)); } +#line 2285 "bison_parser.cpp" + break; + + case YYSYMBOL_select_within_set_operation_no_parentheses: /* select_within_set_operation_no_parentheses */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).select_stmt)); } +#line 2291 "bison_parser.cpp" + break; + + case YYSYMBOL_select_with_paren: /* select_with_paren */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).select_stmt)); } +#line 2297 "bison_parser.cpp" + break; + + case YYSYMBOL_select_no_paren: /* select_no_paren */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).select_stmt)); } +#line 2303 "bison_parser.cpp" + break; + + case YYSYMBOL_set_operator: /* set_operator */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).set_operator_t)); } +#line 2309 "bison_parser.cpp" + break; + + case YYSYMBOL_set_type: /* set_type */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).set_operator_t)); } +#line 2315 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_all: /* opt_all */ +#line 155 "bison_parser.y" + { } +#line 2321 "bison_parser.cpp" + break; + + case YYSYMBOL_select_clause: /* select_clause */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).select_stmt)); } +#line 2327 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_distinct: /* opt_distinct */ +#line 155 "bison_parser.y" + { } +#line 2333 "bison_parser.cpp" + break; + + case YYSYMBOL_select_list: /* select_list */ +#line 158 "bison_parser.y" + { + if ((((*yyvaluep).expr_vec)) != nullptr) { + for (auto ptr : *(((*yyvaluep).expr_vec))) { + delete ptr; + } + } + delete (((*yyvaluep).expr_vec)); +} +#line 2346 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_from_clause: /* opt_from_clause */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).table)); } +#line 2352 "bison_parser.cpp" + break; + + case YYSYMBOL_from_clause: /* from_clause */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).table)); } +#line 2358 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_where: /* opt_where */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2364 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_group: /* opt_group */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).group_t)); } +#line 2370 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_having: /* opt_having */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2376 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_order: /* opt_order */ +#line 158 "bison_parser.y" + { + if ((((*yyvaluep).order_vec)) != nullptr) { + for (auto ptr : *(((*yyvaluep).order_vec))) { + delete ptr; + } + } + delete (((*yyvaluep).order_vec)); +} +#line 2389 "bison_parser.cpp" + break; + + case YYSYMBOL_order_list: /* order_list */ +#line 158 "bison_parser.y" + { + if ((((*yyvaluep).order_vec)) != nullptr) { + for (auto ptr : *(((*yyvaluep).order_vec))) { + delete ptr; + } + } + delete (((*yyvaluep).order_vec)); +} +#line 2402 "bison_parser.cpp" + break; + + case YYSYMBOL_order_desc: /* order_desc */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).order)); } +#line 2408 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_order_type: /* opt_order_type */ +#line 155 "bison_parser.y" + { } +#line 2414 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_top: /* opt_top */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).limit)); } +#line 2420 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_limit: /* opt_limit */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).limit)); } +#line 2426 "bison_parser.cpp" + break; + + case YYSYMBOL_expr_list: /* expr_list */ +#line 158 "bison_parser.y" + { + if ((((*yyvaluep).expr_vec)) != nullptr) { + for (auto ptr : *(((*yyvaluep).expr_vec))) { + delete ptr; + } + } + delete (((*yyvaluep).expr_vec)); +} +#line 2439 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_literal_list: /* opt_literal_list */ +#line 158 "bison_parser.y" + { + if ((((*yyvaluep).expr_vec)) != nullptr) { + for (auto ptr : *(((*yyvaluep).expr_vec))) { + delete ptr; + } + } + delete (((*yyvaluep).expr_vec)); +} +#line 2452 "bison_parser.cpp" + break; + + case YYSYMBOL_literal_list: /* literal_list */ +#line 158 "bison_parser.y" + { + if ((((*yyvaluep).expr_vec)) != nullptr) { + for (auto ptr : *(((*yyvaluep).expr_vec))) { + delete ptr; + } + } + delete (((*yyvaluep).expr_vec)); +} +#line 2465 "bison_parser.cpp" + break; + + case YYSYMBOL_expr_alias: /* expr_alias */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2471 "bison_parser.cpp" + break; + + case YYSYMBOL_expr: /* expr */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2477 "bison_parser.cpp" + break; + + case YYSYMBOL_operand: /* operand */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2483 "bison_parser.cpp" + break; + + case YYSYMBOL_scalar_expr: /* scalar_expr */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2489 "bison_parser.cpp" + break; + + case YYSYMBOL_unary_expr: /* unary_expr */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2495 "bison_parser.cpp" + break; + + case YYSYMBOL_binary_expr: /* binary_expr */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2501 "bison_parser.cpp" + break; + + case YYSYMBOL_logic_expr: /* logic_expr */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2507 "bison_parser.cpp" + break; + + case YYSYMBOL_in_expr: /* in_expr */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2513 "bison_parser.cpp" + break; + + case YYSYMBOL_case_expr: /* case_expr */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2519 "bison_parser.cpp" + break; + + case YYSYMBOL_case_list: /* case_list */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2525 "bison_parser.cpp" + break; + + case YYSYMBOL_exists_expr: /* exists_expr */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2531 "bison_parser.cpp" + break; + + case YYSYMBOL_comp_expr: /* comp_expr */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2537 "bison_parser.cpp" + break; + + case YYSYMBOL_function_expr: /* function_expr */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2543 "bison_parser.cpp" + break; + + case YYSYMBOL_extract_expr: /* extract_expr */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2549 "bison_parser.cpp" + break; + + case YYSYMBOL_cast_expr: /* cast_expr */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2555 "bison_parser.cpp" + break; + + case YYSYMBOL_datetime_field: /* datetime_field */ +#line 155 "bison_parser.y" + { } +#line 2561 "bison_parser.cpp" + break; + + case YYSYMBOL_array_expr: /* array_expr */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2567 "bison_parser.cpp" + break; + + case YYSYMBOL_array_index: /* array_index */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2573 "bison_parser.cpp" + break; + + case YYSYMBOL_between_expr: /* between_expr */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2579 "bison_parser.cpp" + break; + + case YYSYMBOL_column_name: /* column_name */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2585 "bison_parser.cpp" + break; + + case YYSYMBOL_literal: /* literal */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2591 "bison_parser.cpp" + break; + + case YYSYMBOL_string_literal: /* string_literal */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2597 "bison_parser.cpp" + break; + + case YYSYMBOL_bool_literal: /* bool_literal */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2603 "bison_parser.cpp" + break; + + case YYSYMBOL_num_literal: /* num_literal */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2609 "bison_parser.cpp" + break; + + case YYSYMBOL_int_literal: /* int_literal */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2615 "bison_parser.cpp" + break; + + case YYSYMBOL_null_literal: /* null_literal */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2621 "bison_parser.cpp" + break; + + case YYSYMBOL_date_literal: /* date_literal */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2627 "bison_parser.cpp" + break; + + case YYSYMBOL_param_expr: /* param_expr */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2633 "bison_parser.cpp" + break; + + case YYSYMBOL_table_ref: /* table_ref */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).table)); } +#line 2639 "bison_parser.cpp" + break; + + case YYSYMBOL_table_ref_atomic: /* table_ref_atomic */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).table)); } +#line 2645 "bison_parser.cpp" + break; + + case YYSYMBOL_nonjoin_table_ref_atomic: /* nonjoin_table_ref_atomic */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).table)); } +#line 2651 "bison_parser.cpp" + break; + + case YYSYMBOL_table_ref_commalist: /* table_ref_commalist */ +#line 158 "bison_parser.y" + { + if ((((*yyvaluep).table_vec)) != nullptr) { + for (auto ptr : *(((*yyvaluep).table_vec))) { + delete ptr; + } + } + delete (((*yyvaluep).table_vec)); +} +#line 2664 "bison_parser.cpp" + break; + + case YYSYMBOL_table_ref_name: /* table_ref_name */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).table)); } +#line 2670 "bison_parser.cpp" + break; + + case YYSYMBOL_table_ref_name_no_alias: /* table_ref_name_no_alias */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).table)); } +#line 2676 "bison_parser.cpp" + break; + + case YYSYMBOL_table_name: /* table_name */ +#line 156 "bison_parser.y" + { free( (((*yyvaluep).table_name).name) ); free( (((*yyvaluep).table_name).schema) ); } +#line 2682 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_index_name: /* opt_index_name */ +#line 157 "bison_parser.y" + { free( (((*yyvaluep).sval)) ); } +#line 2688 "bison_parser.cpp" + break; + + case YYSYMBOL_index_name: /* index_name */ +#line 157 "bison_parser.y" + { free( (((*yyvaluep).sval)) ); } +#line 2694 "bison_parser.cpp" + break; + + case YYSYMBOL_table_alias: /* table_alias */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).alias_t)); } +#line 2700 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_table_alias: /* opt_table_alias */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).alias_t)); } +#line 2706 "bison_parser.cpp" + break; + + case YYSYMBOL_alias: /* alias */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).alias_t)); } +#line 2712 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_alias: /* opt_alias */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).alias_t)); } +#line 2718 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_with_clause: /* opt_with_clause */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).with_description_vec)); } +#line 2724 "bison_parser.cpp" + break; + + case YYSYMBOL_with_clause: /* with_clause */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).with_description_vec)); } +#line 2730 "bison_parser.cpp" + break; + + case YYSYMBOL_with_description_list: /* with_description_list */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).with_description_vec)); } +#line 2736 "bison_parser.cpp" + break; + + case YYSYMBOL_with_description: /* with_description */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).with_description_t)); } +#line 2742 "bison_parser.cpp" + break; + + case YYSYMBOL_join_clause: /* join_clause */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).table)); } +#line 2748 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_join_type: /* opt_join_type */ +#line 155 "bison_parser.y" + { } +#line 2754 "bison_parser.cpp" + break; + + case YYSYMBOL_join_condition: /* join_condition */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2760 "bison_parser.cpp" + break; + + case YYSYMBOL_ident_commalist: /* ident_commalist */ +#line 158 "bison_parser.y" + { + if ((((*yyvaluep).str_vec)) != nullptr) { + for (auto ptr : *(((*yyvaluep).str_vec))) { + delete ptr; + } + } + delete (((*yyvaluep).str_vec)); +} +#line 2773 "bison_parser.cpp" + break; + + default: + break; + } + YY_IGNORE_MAYBE_UNINITIALIZED_END +} + + + + + + +/*----------. +| yyparse. | +`----------*/ + +int +yyparse (hsql::SQLParserResult* result, yyscan_t scanner) +{ +/* Lookahead token kind. */ +int yychar; + + +/* The semantic value of the lookahead symbol. */ +/* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ +YY_INITIAL_VALUE (static YYSTYPE yyval_default;) +YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); + +/* Location data for the lookahead symbol. */ +static YYLTYPE yyloc_default +# if defined HSQL_LTYPE_IS_TRIVIAL && HSQL_LTYPE_IS_TRIVIAL + = { 1, 1, 1, 1 } +# endif +; +YYLTYPE yylloc = yyloc_default; + + /* Number of syntax errors so far. */ + int yynerrs = 0; + + yy_state_fast_t yystate = 0; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus = 0; + + /* Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* Their size. */ + YYPTRDIFF_T yystacksize = YYINITDEPTH; + + /* The state stack: array, bottom, top. */ + yy_state_t yyssa[YYINITDEPTH]; + yy_state_t *yyss = yyssa; + yy_state_t *yyssp = yyss; + + /* The semantic value stack: array, bottom, top. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp = yyvs; + + /* The location stack: array, bottom, top. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp = yyls; + + int yyn; + /* The return value of yyparse. */ + int yyresult; + /* Lookahead symbol kind. */ + yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY; + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + YYLTYPE yyloc; + + /* The locations where the error started and ended. */ + YYLTYPE yyerror_range[3]; + + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yychar = SQL_HSQL_EMPTY; /* Cause a token to be read. */ + +/* User initialization code. */ +#line 73 "bison_parser.y" +{ + // Initialize + yylloc.first_column = 0; + yylloc.last_column = 0; + yylloc.first_line = 0; + yylloc.last_line = 0; + yylloc.total_column = 0; + yylloc.string_length = 0; +} + +#line 2880 "bison_parser.cpp" + + yylsp[0] = yylloc; + goto yysetstate; + + +/*------------------------------------------------------------. +| yynewstate -- push a new state, which is found in yystate. | +`------------------------------------------------------------*/ +yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + + +/*--------------------------------------------------------------------. +| yysetstate -- set current state (the top of the stack) to yystate. | +`--------------------------------------------------------------------*/ +yysetstate: + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + YY_ASSERT (0 <= yystate && yystate < YYNSTATES); + YY_IGNORE_USELESS_CAST_BEGIN + *yyssp = YY_CAST (yy_state_t, yystate); + YY_IGNORE_USELESS_CAST_END + YY_STACK_PRINT (yyss, yyssp); + + 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. */ + YYPTRDIFF_T yysize = yyssp - yyss + 1; + +# 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 + memory. */ + yy_state_t *yyss1 = yyss; + YYSTYPE *yyvs1 = yyvs; + YYLTYPE *yyls1 = yyls; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * YYSIZEOF (*yyssp), + &yyvs1, yysize * YYSIZEOF (*yyvsp), + &yyls1, yysize * YYSIZEOF (*yylsp), + &yystacksize); + yyss = yyss1; + yyvs = yyvs1; + yyls = yyls1; + } +# else /* defined YYSTACK_RELOCATE */ + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yy_state_t *yyss1 = yyss; + union yyalloc *yyptr = + YY_CAST (union yyalloc *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); + YYSTACK_RELOCATE (yyls_alloc, yyls); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + yylsp = yyls + yysize - 1; + + YY_IGNORE_USELESS_CAST_BEGIN + YYDPRINTF ((stderr, "Stack size increased to %ld\n", + YY_CAST (long, yystacksize))); + YY_IGNORE_USELESS_CAST_END + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } +#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ + + if (yystate == YYFINAL) + YYACCEPT; + + goto yybackup; + + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + /* Do appropriate processing given the current state. Read a + lookahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to lookahead token. */ + yyn = yypact[yystate]; + if (yypact_value_is_default (yyn)) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ + if (yychar == SQL_HSQL_EMPTY) + { + YYDPRINTF ((stderr, "Reading a token\n")); + yychar = yylex (&yylval, &yylloc, scanner); + } + + if (yychar <= SQL_YYEOF) + { + yychar = SQL_YYEOF; + yytoken = YYSYMBOL_YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else if (yychar == SQL_HSQL_error) + { + /* The scanner already issued an error message, process directly + to error recovery. But do not keep the error token as + lookahead, it is too special and may lead us to an endless + loop in error recovery. */ + yychar = SQL_HSQL_UNDEF; + yytoken = YYSYMBOL_YYerror; + yyerror_range[1] = yylloc; + goto yyerrlab1; + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yytable_value_is_error (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the lookahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + *++yylsp = yylloc; + + /* Discard the shifted token. */ + yychar = SQL_HSQL_EMPTY; + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + '$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + /* Default location. */ + YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); + yyerror_range[1] = yyloc; + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 2: /* input: statement_list opt_semicolon */ +#line 288 "bison_parser.y" + { + for (SQLStatement* stmt : *(yyvsp[-1].stmt_vec)) { + // Transfers ownership of the statement. + result->addStatement(stmt); + } + + unsigned param_id = 0; + for (void* param : yyloc.param_list) { + if (param != nullptr) { + Expr* expr = (Expr*) param; + expr->ival = param_id; + result->addParameter(expr); + ++param_id; + } + } + delete (yyvsp[-1].stmt_vec); + } +#line 3108 "bison_parser.cpp" + break; + + case 3: /* statement_list: statement */ +#line 309 "bison_parser.y" + { + (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 3119 "bison_parser.cpp" + break; + + case 4: /* statement_list: statement_list ';' statement */ +#line 315 "bison_parser.y" + { + (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 3130 "bison_parser.cpp" + break; + + case 5: /* statement: prepare_statement opt_hints */ +#line 324 "bison_parser.y" + { + (yyval.statement) = (yyvsp[-1].prep_stmt); + (yyval.statement)->hints = (yyvsp[0].expr_vec); + } +#line 3139 "bison_parser.cpp" + break; + + case 6: /* statement: preparable_statement opt_hints */ +#line 328 "bison_parser.y" + { + (yyval.statement) = (yyvsp[-1].statement); + (yyval.statement)->hints = (yyvsp[0].expr_vec); + } +#line 3148 "bison_parser.cpp" + break; + + case 7: /* statement: show_statement */ +#line 332 "bison_parser.y" + { + (yyval.statement) = (yyvsp[0].show_stmt); + } +#line 3156 "bison_parser.cpp" + break; + + case 8: /* statement: import_statement */ +#line 335 "bison_parser.y" + { + (yyval.statement) = (yyvsp[0].import_stmt); + } +#line 3164 "bison_parser.cpp" + break; + + case 9: /* statement: export_statement */ +#line 338 "bison_parser.y" + { + (yyval.statement) = (yyvsp[0].export_stmt); + } +#line 3172 "bison_parser.cpp" + break; + + case 10: /* preparable_statement: select_statement */ +#line 345 "bison_parser.y" + { (yyval.statement) = (yyvsp[0].select_stmt); } +#line 3178 "bison_parser.cpp" + break; + + case 11: /* preparable_statement: create_statement */ +#line 346 "bison_parser.y" + { (yyval.statement) = (yyvsp[0].create_stmt); } +#line 3184 "bison_parser.cpp" + break; + + case 12: /* preparable_statement: insert_statement */ +#line 347 "bison_parser.y" + { (yyval.statement) = (yyvsp[0].insert_stmt); } +#line 3190 "bison_parser.cpp" + break; + + case 13: /* preparable_statement: delete_statement */ +#line 348 "bison_parser.y" + { (yyval.statement) = (yyvsp[0].delete_stmt); } +#line 3196 "bison_parser.cpp" + break; + + case 14: /* preparable_statement: truncate_statement */ +#line 349 "bison_parser.y" + { (yyval.statement) = (yyvsp[0].delete_stmt); } +#line 3202 "bison_parser.cpp" + break; + + case 15: /* preparable_statement: update_statement */ +#line 350 "bison_parser.y" + { (yyval.statement) = (yyvsp[0].update_stmt); } +#line 3208 "bison_parser.cpp" + break; + + case 16: /* preparable_statement: drop_statement */ +#line 351 "bison_parser.y" + { (yyval.statement) = (yyvsp[0].drop_stmt); } +#line 3214 "bison_parser.cpp" + break; + + case 17: /* preparable_statement: alter_statement */ +#line 352 "bison_parser.y" + { (yyval.statement) = (yyvsp[0].alter_stmt); } +#line 3220 "bison_parser.cpp" + break; + + case 18: /* preparable_statement: execute_statement */ +#line 353 "bison_parser.y" + { (yyval.statement) = (yyvsp[0].exec_stmt); } +#line 3226 "bison_parser.cpp" + break; + + case 19: /* preparable_statement: transaction_statement */ +#line 354 "bison_parser.y" + { (yyval.statement) = (yyvsp[0].transaction_stmt); } +#line 3232 "bison_parser.cpp" + break; + + case 20: /* opt_hints: WITH HINT '(' hint_list ')' */ +#line 363 "bison_parser.y" + { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } +#line 3238 "bison_parser.cpp" + break; + + case 21: /* opt_hints: %empty */ +#line 364 "bison_parser.y" + { (yyval.expr_vec) = nullptr; } +#line 3244 "bison_parser.cpp" + break; + + case 22: /* hint_list: hint */ +#line 369 "bison_parser.y" + { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } +#line 3250 "bison_parser.cpp" + break; + + case 23: /* hint_list: hint_list ',' hint */ +#line 370 "bison_parser.y" + { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } +#line 3256 "bison_parser.cpp" + break; + + case 24: /* hint: IDENTIFIER */ +#line 374 "bison_parser.y" + { + (yyval.expr) = Expr::make(kExprHint); + (yyval.expr)->name = (yyvsp[0].sval); + } +#line 3265 "bison_parser.cpp" + break; + + case 25: /* hint: IDENTIFIER '(' literal_list ')' */ +#line 378 "bison_parser.y" + { + (yyval.expr) = Expr::make(kExprHint); + (yyval.expr)->name = (yyvsp[-3].sval); + (yyval.expr)->exprList = (yyvsp[-1].expr_vec); + } +#line 3275 "bison_parser.cpp" + break; + + case 26: /* transaction_statement: BEGIN opt_transaction_keyword */ +#line 390 "bison_parser.y" + { + (yyval.transaction_stmt) = new TransactionStatement(kBeginTransaction); + } +#line 3283 "bison_parser.cpp" + break; + + case 27: /* transaction_statement: ROLLBACK opt_transaction_keyword */ +#line 393 "bison_parser.y" + { + (yyval.transaction_stmt) = new TransactionStatement(kRollbackTransaction); + } +#line 3291 "bison_parser.cpp" + break; + + case 28: /* transaction_statement: COMMIT opt_transaction_keyword */ +#line 396 "bison_parser.y" + { + (yyval.transaction_stmt) = new TransactionStatement(kCommitTransaction); + } +#line 3299 "bison_parser.cpp" + break; + + case 31: /* prepare_statement: PREPARE IDENTIFIER FROM prepare_target_query */ +#line 410 "bison_parser.y" + { + (yyval.prep_stmt) = new PrepareStatement(); + (yyval.prep_stmt)->name = (yyvsp[-2].sval); + (yyval.prep_stmt)->query = (yyvsp[0].sval); + } +#line 3309 "bison_parser.cpp" + break; + + case 33: /* execute_statement: EXECUTE IDENTIFIER */ +#line 420 "bison_parser.y" + { + (yyval.exec_stmt) = new ExecuteStatement(); + (yyval.exec_stmt)->name = (yyvsp[0].sval); + } +#line 3318 "bison_parser.cpp" + break; + + case 34: /* execute_statement: EXECUTE IDENTIFIER '(' opt_literal_list ')' */ +#line 424 "bison_parser.y" + { + (yyval.exec_stmt) = new ExecuteStatement(); + (yyval.exec_stmt)->name = (yyvsp[-3].sval); + (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); + } +#line 3328 "bison_parser.cpp" + break; + + case 35: /* import_statement: IMPORT FROM file_type FILE file_path INTO table_name */ +#line 438 "bison_parser.y" + { + (yyval.import_stmt) = new ImportStatement((yyvsp[-4].import_type_t)); + (yyval.import_stmt)->filePath = (yyvsp[-2].sval); + (yyval.import_stmt)->schema = (yyvsp[0].table_name).schema; + (yyval.import_stmt)->tableName = (yyvsp[0].table_name).name; + } +#line 3339 "bison_parser.cpp" + break; + + case 36: /* import_statement: COPY table_name FROM file_path opt_file_type */ +#line 444 "bison_parser.y" + { + (yyval.import_stmt) = new ImportStatement((yyvsp[0].import_type_t)); + (yyval.import_stmt)->filePath = (yyvsp[-1].sval); + (yyval.import_stmt)->schema = (yyvsp[-3].table_name).schema; + (yyval.import_stmt)->tableName = (yyvsp[-3].table_name).name; + } +#line 3350 "bison_parser.cpp" + break; + + case 37: /* file_type: IDENTIFIER */ +#line 453 "bison_parser.y" + { + if (strcasecmp((yyvsp[0].sval), "csv") == 0) { + (yyval.import_type_t) = kImportCSV; + } else if (strcasecmp((yyvsp[0].sval), "tbl") == 0) { + (yyval.import_type_t) = kImportTbl; + } else if (strcasecmp((yyvsp[0].sval), "binary") == 0 || strcasecmp((yyvsp[0].sval), "bin") == 0) { + (yyval.import_type_t) = kImportBinary; + } else { + free((yyvsp[0].sval)); + yyerror(&yyloc, result, scanner, "File type is unknown."); + YYERROR; + } + free((yyvsp[0].sval)); + } +#line 3369 "bison_parser.cpp" + break; + + case 38: /* file_path: string_literal */ +#line 470 "bison_parser.y" + { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } +#line 3375 "bison_parser.cpp" + break; + + case 39: /* opt_file_type: WITH FORMAT file_type */ +#line 474 "bison_parser.y" + { + (yyval.import_type_t) = (yyvsp[0].import_type_t); + } +#line 3383 "bison_parser.cpp" + break; + + case 40: /* opt_file_type: %empty */ +#line 477 "bison_parser.y" + { (yyval.import_type_t) = kImportAuto; } +#line 3389 "bison_parser.cpp" + break; + + case 41: /* export_statement: COPY table_name TO file_path opt_file_type */ +#line 486 "bison_parser.y" + { + (yyval.export_stmt) = new ExportStatement((yyvsp[0].import_type_t)); + (yyval.export_stmt)->filePath = (yyvsp[-1].sval); + (yyval.export_stmt)->schema = (yyvsp[-3].table_name).schema; + (yyval.export_stmt)->tableName = (yyvsp[-3].table_name).name; + } +#line 3400 "bison_parser.cpp" + break; + + case 42: /* show_statement: SHOW TABLES */ +#line 500 "bison_parser.y" + { + (yyval.show_stmt) = new ShowStatement(kShowTables); + } +#line 3408 "bison_parser.cpp" + break; + + case 43: /* show_statement: SHOW COLUMNS table_name */ +#line 503 "bison_parser.y" + { + (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 3418 "bison_parser.cpp" + break; + + case 44: /* show_statement: DESCRIBE table_name */ +#line 508 "bison_parser.y" + { + (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 3428 "bison_parser.cpp" + break; + + case 45: /* create_statement: CREATE TABLE opt_not_exists table_name FROM IDENTIFIER FILE file_path */ +#line 522 "bison_parser.y" + { + (yyval.create_stmt) = new CreateStatement(kCreateTableFromTbl); + (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); + (yyval.create_stmt)->schema = (yyvsp[-4].table_name).schema; + (yyval.create_stmt)->tableName = (yyvsp[-4].table_name).name; + if (strcasecmp((yyvsp[-2].sval), "tbl") != 0) { + free((yyvsp[-2].sval)); + yyerror(&yyloc, result, scanner, "File type is unknown."); + YYERROR; + } + free((yyvsp[-2].sval)); + (yyval.create_stmt)->filePath = (yyvsp[0].sval); + } +#line 3446 "bison_parser.cpp" + break; + + case 46: /* create_statement: CREATE TABLE opt_not_exists table_name '(' table_elem_commalist ')' */ +#line 535 "bison_parser.y" + { + (yyval.create_stmt) = new CreateStatement(kCreateTable); + (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); + (yyval.create_stmt)->schema = (yyvsp[-3].table_name).schema; + (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; + (yyval.create_stmt)->setColumnDefsAndConstraints((yyvsp[-1].table_element_vec)); + } +#line 3458 "bison_parser.cpp" + break; + + case 47: /* create_statement: CREATE TABLE opt_not_exists table_name AS select_statement */ +#line 542 "bison_parser.y" + { + (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 3470 "bison_parser.cpp" + break; + + case 48: /* create_statement: CREATE INDEX opt_not_exists opt_index_name ON table_name '(' ident_commalist ')' */ +#line 549 "bison_parser.y" + { + (yyval.create_stmt) = new CreateStatement(kCreateIndex); + (yyval.create_stmt)->indexName = (yyvsp[-5].sval); + (yyval.create_stmt)->ifNotExists = (yyvsp[-6].bval); + (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; + (yyval.create_stmt)->indexColumns = (yyvsp[-1].str_vec); + } +#line 3482 "bison_parser.cpp" + break; + + case 49: /* create_statement: CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement */ +#line 556 "bison_parser.y" + { + (yyval.create_stmt) = new CreateStatement(kCreateView); + (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); + (yyval.create_stmt)->schema = (yyvsp[-3].table_name).schema; + (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; + (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); + (yyval.create_stmt)->select = (yyvsp[0].select_stmt); + } +#line 3495 "bison_parser.cpp" + break; + + case 50: /* opt_not_exists: IF NOT EXISTS */ +#line 567 "bison_parser.y" + { (yyval.bval) = true; } +#line 3501 "bison_parser.cpp" + break; + + case 51: /* opt_not_exists: %empty */ +#line 568 "bison_parser.y" + { (yyval.bval) = false; } +#line 3507 "bison_parser.cpp" + break; + + case 52: /* table_elem_commalist: table_elem */ +#line 572 "bison_parser.y" + { (yyval.table_element_vec) = new std::vector(); (yyval.table_element_vec)->push_back((yyvsp[0].table_element_t)); } +#line 3513 "bison_parser.cpp" + break; + + case 53: /* table_elem_commalist: table_elem_commalist ',' table_elem */ +#line 573 "bison_parser.y" + { (yyvsp[-2].table_element_vec)->push_back((yyvsp[0].table_element_t)); (yyval.table_element_vec) = (yyvsp[-2].table_element_vec); } +#line 3519 "bison_parser.cpp" + break; + + case 54: /* table_elem: column_def */ +#line 577 "bison_parser.y" + { (yyval.table_element_t) = (yyvsp[0].column_t); } +#line 3525 "bison_parser.cpp" + break; + + case 55: /* table_elem: table_constraint */ +#line 578 "bison_parser.y" + { (yyval.table_element_t) = (yyvsp[0].table_constraint_t); } +#line 3531 "bison_parser.cpp" + break; + + case 56: /* column_def: IDENTIFIER column_type opt_column_constraints */ +#line 582 "bison_parser.y" + { + (yyval.column_t) = new ColumnDefinition((yyvsp[-2].sval), (yyvsp[-1].column_type_t), (yyvsp[0].column_constraint_vec)); + (yyval.column_t)->setNullableExplicit(); + } +#line 3540 "bison_parser.cpp" + break; + + case 57: /* column_type: INT */ +#line 589 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::INT}; } +#line 3546 "bison_parser.cpp" + break; + + case 58: /* column_type: INTEGER */ +#line 590 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::INT}; } +#line 3552 "bison_parser.cpp" + break; + + case 59: /* column_type: LONG */ +#line 591 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::LONG}; } +#line 3558 "bison_parser.cpp" + break; + + case 60: /* column_type: FLOAT */ +#line 592 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } +#line 3564 "bison_parser.cpp" + break; + + case 61: /* column_type: DECIMAL opt_decimal_specification */ +#line 593 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::DECIMAL, 0, (yyvsp[0].column_specification_t)}; } +#line 3570 "bison_parser.cpp" + break; + + case 62: /* column_type: DOUBLE */ +#line 594 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } +#line 3576 "bison_parser.cpp" + break; + + case 63: /* column_type: REAL */ +#line 595 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::REAL}; } +#line 3582 "bison_parser.cpp" + break; + + case 64: /* column_type: VARCHAR '(' INTVAL ')' */ +#line 596 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } +#line 3588 "bison_parser.cpp" + break; + + case 65: /* column_type: CHARACTER VARYING '(' INTVAL ')' */ +#line 597 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::VARCHAR_VARYING, (yyvsp[-1].ival)}; } +#line 3594 "bison_parser.cpp" + break; + + case 66: /* column_type: CHAR '(' INTVAL ')' */ +#line 598 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } +#line 3600 "bison_parser.cpp" + break; + + case 67: /* column_type: TEXT */ +#line 599 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } +#line 3606 "bison_parser.cpp" + break; + + case 68: /* column_type: TIME opt_time_specification */ +#line 600 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::TIME, 0, (yyvsp[0].column_specification_t) }; } +#line 3612 "bison_parser.cpp" + break; + + case 69: /* column_type: DATETIME */ +#line 601 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } +#line 3618 "bison_parser.cpp" + break; + + case 70: /* column_type: DATE */ +#line 602 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::DATE}; } +#line 3624 "bison_parser.cpp" + break; + + case 71: /* opt_time_specification: '(' INTVAL ')' */ +#line 606 "bison_parser.y" + { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-1].ival)}; } +#line 3630 "bison_parser.cpp" + break; + + case 72: /* opt_time_specification: %empty */ +#line 607 "bison_parser.y" + { (yyval.column_specification_t) = ColumnSpecification{}; } +#line 3636 "bison_parser.cpp" + break; + + case 73: /* opt_decimal_specification: '(' INTVAL ',' INTVAL ')' */ +#line 611 "bison_parser.y" + { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-3].ival), (yyvsp[-1].ival)}; } +#line 3642 "bison_parser.cpp" + break; + + case 74: /* opt_decimal_specification: '(' INTVAL ')' */ +#line 612 "bison_parser.y" + { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-1].ival)}; } +#line 3648 "bison_parser.cpp" + break; + + case 75: /* opt_decimal_specification: %empty */ +#line 613 "bison_parser.y" + { (yyval.column_specification_t) = ColumnSpecification{}; } +#line 3654 "bison_parser.cpp" + break; + + case 76: /* opt_column_constraints: column_constraint */ +#line 617 "bison_parser.y" + { (yyval.column_constraint_vec) = new std::vector(); (yyval.column_constraint_vec)->push_back((yyvsp[0].column_constraint_t)); } +#line 3660 "bison_parser.cpp" + break; + + case 77: /* opt_column_constraints: opt_column_constraints column_constraint */ +#line 618 "bison_parser.y" + { (yyvsp[-1].column_constraint_vec)->push_back((yyvsp[0].column_constraint_t)); (yyval.column_constraint_vec) = (yyvsp[-1].column_constraint_vec); } +#line 3666 "bison_parser.cpp" + break; + + case 78: /* opt_column_constraints: %empty */ +#line 619 "bison_parser.y" + { (yyval.column_constraint_vec) = new std::vector(); } +#line 3672 "bison_parser.cpp" + break; + + case 79: /* column_constraint: PRIMARY KEY */ +#line 623 "bison_parser.y" + { (yyval.column_constraint_t) = ConstraintType::PRIMARY_KEY; } +#line 3678 "bison_parser.cpp" + break; + + case 80: /* column_constraint: UNIQUE */ +#line 624 "bison_parser.y" + { (yyval.column_constraint_t) = ConstraintType::UNIQUE; } +#line 3684 "bison_parser.cpp" + break; + + case 81: /* column_constraint: NULL */ +#line 625 "bison_parser.y" + { (yyval.column_constraint_t) = ConstraintType::_NULL; } +#line 3690 "bison_parser.cpp" + break; + + case 82: /* column_constraint: NOT NULL */ +#line 626 "bison_parser.y" + { (yyval.column_constraint_t) = ConstraintType::NOTNULL; } +#line 3696 "bison_parser.cpp" + break; + + case 83: /* table_constraint: PRIMARY KEY '(' ident_commalist ')' */ +#line 630 "bison_parser.y" + { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::PRIMARY_KEY, (yyvsp[-1].str_vec)); } +#line 3702 "bison_parser.cpp" + break; + + case 84: /* table_constraint: UNIQUE '(' ident_commalist ')' */ +#line 631 "bison_parser.y" + { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::UNIQUE, (yyvsp[-1].str_vec)); } +#line 3708 "bison_parser.cpp" + break; + + case 85: /* drop_statement: DROP TABLE opt_exists table_name */ +#line 642 "bison_parser.y" + { + (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 3719 "bison_parser.cpp" + break; + + case 86: /* drop_statement: DROP VIEW opt_exists table_name */ +#line 648 "bison_parser.y" + { + (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 3730 "bison_parser.cpp" + break; + + case 87: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ +#line 654 "bison_parser.y" + { + (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); + (yyval.drop_stmt)->ifExists = false; + (yyval.drop_stmt)->name = (yyvsp[0].sval); + } +#line 3740 "bison_parser.cpp" + break; + + case 88: /* drop_statement: DROP INDEX opt_exists index_name */ +#line 660 "bison_parser.y" + { + (yyval.drop_stmt) = new DropStatement(kDropIndex); + (yyval.drop_stmt)->ifExists = (yyvsp[-1].bval); + (yyval.drop_stmt)->indexName = (yyvsp[0].sval); + } +#line 3750 "bison_parser.cpp" + break; + + case 89: /* opt_exists: IF EXISTS */ +#line 668 "bison_parser.y" + { (yyval.bval) = true; } +#line 3756 "bison_parser.cpp" + break; + + case 90: /* opt_exists: %empty */ +#line 669 "bison_parser.y" + { (yyval.bval) = false; } +#line 3762 "bison_parser.cpp" + break; + + case 91: /* alter_statement: ALTER TABLE opt_exists table_name alter_action */ +#line 678 "bison_parser.y" + { + (yyval.alter_stmt) = new AlterStatement((yyvsp[-1].table_name).name, (yyvsp[0].alter_action_t)); + (yyval.alter_stmt)->ifTableExists = (yyvsp[-2].bval); + (yyval.alter_stmt)->schema = (yyvsp[-1].table_name).schema; + } +#line 3772 "bison_parser.cpp" + break; + + case 92: /* alter_action: drop_action */ +#line 686 "bison_parser.y" + {(yyval.alter_action_t) = (yyvsp[0].drop_action_t);} +#line 3778 "bison_parser.cpp" + break; + + case 93: /* drop_action: DROP COLUMN opt_exists column_name */ +#line 689 "bison_parser.y" + { + (yyval.drop_action_t) = new DropColumnAction((yyvsp[0].expr)->name); + (yyval.drop_action_t)->ifExists = (yyvsp[-1].bval); + } +#line 3787 "bison_parser.cpp" + break; + + case 94: /* delete_statement: DELETE FROM table_name opt_where */ +#line 701 "bison_parser.y" + { + (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 3798 "bison_parser.cpp" + break; + + case 95: /* truncate_statement: TRUNCATE table_name */ +#line 710 "bison_parser.y" + { + (yyval.delete_stmt) = new DeleteStatement(); + (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; + (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; + } +#line 3808 "bison_parser.cpp" + break; + + case 96: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ +#line 723 "bison_parser.y" + { + (yyval.insert_stmt) = new InsertStatement(kInsertValues); + (yyval.insert_stmt)->schema = (yyvsp[-5].table_name).schema; + (yyval.insert_stmt)->tableName = (yyvsp[-5].table_name).name; + (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); + (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); + } +#line 3820 "bison_parser.cpp" + break; + + case 97: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ +#line 730 "bison_parser.y" + { + (yyval.insert_stmt) = new InsertStatement(kInsertSelect); + (yyval.insert_stmt)->schema = (yyvsp[-2].table_name).schema; + (yyval.insert_stmt)->tableName = (yyvsp[-2].table_name).name; + (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); + (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); + } +#line 3832 "bison_parser.cpp" + break; + + case 98: /* opt_column_list: '(' ident_commalist ')' */ +#line 741 "bison_parser.y" + { (yyval.str_vec) = (yyvsp[-1].str_vec); } +#line 3838 "bison_parser.cpp" + break; + + case 99: /* opt_column_list: %empty */ +#line 742 "bison_parser.y" + { (yyval.str_vec) = nullptr; } +#line 3844 "bison_parser.cpp" + break; + + case 100: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ +#line 752 "bison_parser.y" + { + (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 3855 "bison_parser.cpp" + break; + + case 101: /* update_clause_commalist: update_clause */ +#line 761 "bison_parser.y" + { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } +#line 3861 "bison_parser.cpp" + break; + + case 102: /* update_clause_commalist: update_clause_commalist ',' update_clause */ +#line 762 "bison_parser.y" + { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } +#line 3867 "bison_parser.cpp" + break; + + case 103: /* update_clause: IDENTIFIER '=' expr */ +#line 766 "bison_parser.y" + { + (yyval.update_t) = new UpdateClause(); + (yyval.update_t)->column = (yyvsp[-2].sval); + (yyval.update_t)->value = (yyvsp[0].expr); + } +#line 3877 "bison_parser.cpp" + break; + + case 104: /* select_statement: opt_with_clause select_with_paren */ +#line 778 "bison_parser.y" + { + (yyval.select_stmt) = (yyvsp[0].select_stmt); + (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); + } +#line 3886 "bison_parser.cpp" + break; + + case 105: /* select_statement: opt_with_clause select_no_paren */ +#line 782 "bison_parser.y" + { + (yyval.select_stmt) = (yyvsp[0].select_stmt); + (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); + } +#line 3895 "bison_parser.cpp" + break; + + case 106: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ +#line 786 "bison_parser.y" + { + (yyval.select_stmt) = (yyvsp[-4].select_stmt); + if ((yyval.select_stmt)->setOperations == nullptr) { + (yyval.select_stmt)->setOperations = new std::vector(); + } + (yyval.select_stmt)->setOperations->push_back((yyvsp[-3].set_operator_t)); + (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[-2].select_stmt); + (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); + (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); + (yyval.select_stmt)->withDescriptions = (yyvsp[-5].with_description_vec); + } +#line 3911 "bison_parser.cpp" + break; + + case 109: /* select_within_set_operation_no_parentheses: select_clause */ +#line 804 "bison_parser.y" + { (yyval.select_stmt) = (yyvsp[0].select_stmt); } +#line 3917 "bison_parser.cpp" + break; + + case 110: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ +#line 805 "bison_parser.y" + { + (yyval.select_stmt) = (yyvsp[-2].select_stmt); + if ((yyval.select_stmt)->setOperations == nullptr) { + (yyval.select_stmt)->setOperations = new std::vector(); + } + (yyval.select_stmt)->setOperations->push_back((yyvsp[-1].set_operator_t)); + (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[0].select_stmt); + } +#line 3930 "bison_parser.cpp" + break; + + case 111: /* select_with_paren: '(' select_no_paren ')' */ +#line 816 "bison_parser.y" + { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } +#line 3936 "bison_parser.cpp" + break; + + case 112: /* select_with_paren: '(' select_with_paren ')' */ +#line 817 "bison_parser.y" + { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } +#line 3942 "bison_parser.cpp" + break; + + case 113: /* select_no_paren: select_clause opt_order opt_limit */ +#line 821 "bison_parser.y" + { + (yyval.select_stmt) = (yyvsp[-2].select_stmt); + (yyval.select_stmt)->order = (yyvsp[-1].order_vec); + + // Limit could have been set by TOP. + if ((yyvsp[0].limit) != nullptr) { + delete (yyval.select_stmt)->limit; + (yyval.select_stmt)->limit = (yyvsp[0].limit); + } + } +#line 3957 "bison_parser.cpp" + break; + + case 114: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ +#line 831 "bison_parser.y" + { + (yyval.select_stmt) = (yyvsp[-4].select_stmt); + if ((yyval.select_stmt)->setOperations == nullptr) { + (yyval.select_stmt)->setOperations = new std::vector(); + } + (yyval.select_stmt)->setOperations->push_back((yyvsp[-3].set_operator_t)); + (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[-2].select_stmt); + (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); + (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); + } +#line 3972 "bison_parser.cpp" + break; + + case 115: /* set_operator: set_type opt_all */ +#line 844 "bison_parser.y" + { + (yyval.set_operator_t) = (yyvsp[-1].set_operator_t); + (yyval.set_operator_t)->isAll = (yyvsp[0].bval); + } +#line 3981 "bison_parser.cpp" + break; + + case 116: /* set_type: UNION */ +#line 851 "bison_parser.y" + { + (yyval.set_operator_t) = new SetOperation(); + (yyval.set_operator_t)->setType = SetType::kSetUnion; + } +#line 3990 "bison_parser.cpp" + break; + + case 117: /* set_type: INTERSECT */ +#line 855 "bison_parser.y" + { + (yyval.set_operator_t) = new SetOperation(); + (yyval.set_operator_t)->setType = SetType::kSetIntersect; + } +#line 3999 "bison_parser.cpp" + break; + + case 118: /* set_type: EXCEPT */ +#line 859 "bison_parser.y" + { + (yyval.set_operator_t) = new SetOperation(); + (yyval.set_operator_t)->setType = SetType::kSetExcept; + } +#line 4008 "bison_parser.cpp" + break; + + case 119: /* opt_all: ALL */ +#line 866 "bison_parser.y" + { + (yyval.bval) = true; + } +#line 4016 "bison_parser.cpp" + break; + + case 120: /* opt_all: %empty */ +#line 869 "bison_parser.y" + { + (yyval.bval) = false; + } +#line 4024 "bison_parser.cpp" + break; + + case 121: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ +#line 875 "bison_parser.y" + { + (yyval.select_stmt) = new SelectStatement(); + (yyval.select_stmt)->limit = (yyvsp[-5].limit); + (yyval.select_stmt)->selectDistinct = (yyvsp[-4].bval); + (yyval.select_stmt)->selectList = (yyvsp[-3].expr_vec); + (yyval.select_stmt)->fromTable = (yyvsp[-2].table); + (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); + (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); + } +#line 4038 "bison_parser.cpp" + break; + + case 122: /* opt_distinct: DISTINCT */ +#line 887 "bison_parser.y" + { (yyval.bval) = true; } +#line 4044 "bison_parser.cpp" + break; + + case 123: /* opt_distinct: %empty */ +#line 888 "bison_parser.y" + { (yyval.bval) = false; } +#line 4050 "bison_parser.cpp" + break; + + case 125: /* opt_from_clause: from_clause */ +#line 896 "bison_parser.y" + { (yyval.table) = (yyvsp[0].table); } +#line 4056 "bison_parser.cpp" + break; + + case 126: /* opt_from_clause: %empty */ +#line 897 "bison_parser.y" + { (yyval.table) = nullptr; } +#line 4062 "bison_parser.cpp" + break; + + case 127: /* from_clause: FROM table_ref */ +#line 901 "bison_parser.y" + { (yyval.table) = (yyvsp[0].table); } +#line 4068 "bison_parser.cpp" + break; + + case 128: /* opt_where: WHERE expr */ +#line 906 "bison_parser.y" + { (yyval.expr) = (yyvsp[0].expr); } +#line 4074 "bison_parser.cpp" + break; + + case 129: /* opt_where: %empty */ +#line 907 "bison_parser.y" + { (yyval.expr) = nullptr; } +#line 4080 "bison_parser.cpp" + break; + + case 130: /* opt_group: GROUP BY expr_list opt_having */ +#line 911 "bison_parser.y" + { + (yyval.group_t) = new GroupByDescription(); + (yyval.group_t)->columns = (yyvsp[-1].expr_vec); + (yyval.group_t)->having = (yyvsp[0].expr); + } +#line 4090 "bison_parser.cpp" + break; + + case 131: /* opt_group: %empty */ +#line 916 "bison_parser.y" + { (yyval.group_t) = nullptr; } +#line 4096 "bison_parser.cpp" + break; + + case 132: /* opt_having: HAVING expr */ +#line 920 "bison_parser.y" + { (yyval.expr) = (yyvsp[0].expr); } +#line 4102 "bison_parser.cpp" + break; + + case 133: /* opt_having: %empty */ +#line 921 "bison_parser.y" + { (yyval.expr) = nullptr; } +#line 4108 "bison_parser.cpp" + break; + + case 134: /* opt_order: ORDER BY order_list */ +#line 925 "bison_parser.y" + { (yyval.order_vec) = (yyvsp[0].order_vec); } +#line 4114 "bison_parser.cpp" + break; + + case 135: /* opt_order: %empty */ +#line 926 "bison_parser.y" + { (yyval.order_vec) = nullptr; } +#line 4120 "bison_parser.cpp" + break; + + case 136: /* order_list: order_desc */ +#line 930 "bison_parser.y" + { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } +#line 4126 "bison_parser.cpp" + break; + + case 137: /* order_list: order_list ',' order_desc */ +#line 931 "bison_parser.y" + { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } +#line 4132 "bison_parser.cpp" + break; + + case 138: /* order_desc: expr opt_order_type */ +#line 935 "bison_parser.y" + { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } +#line 4138 "bison_parser.cpp" + break; + + case 139: /* opt_order_type: ASC */ +#line 939 "bison_parser.y" + { (yyval.order_type) = kOrderAsc; } +#line 4144 "bison_parser.cpp" + break; + + case 140: /* opt_order_type: DESC */ +#line 940 "bison_parser.y" + { (yyval.order_type) = kOrderDesc; } +#line 4150 "bison_parser.cpp" + break; + + case 141: /* opt_order_type: %empty */ +#line 941 "bison_parser.y" + { (yyval.order_type) = kOrderAsc; } +#line 4156 "bison_parser.cpp" + break; + + case 142: /* opt_top: TOP int_literal */ +#line 947 "bison_parser.y" + { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } +#line 4162 "bison_parser.cpp" + break; + + case 143: /* opt_top: %empty */ +#line 948 "bison_parser.y" + { (yyval.limit) = nullptr; } +#line 4168 "bison_parser.cpp" + break; + + case 144: /* opt_limit: LIMIT expr */ +#line 952 "bison_parser.y" + { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } +#line 4174 "bison_parser.cpp" + break; + + case 145: /* opt_limit: OFFSET expr */ +#line 953 "bison_parser.y" + { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } +#line 4180 "bison_parser.cpp" + break; + + case 146: /* opt_limit: LIMIT expr OFFSET expr */ +#line 954 "bison_parser.y" + { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } +#line 4186 "bison_parser.cpp" + break; + + case 147: /* opt_limit: LIMIT ALL */ +#line 955 "bison_parser.y" + { (yyval.limit) = new LimitDescription(nullptr, nullptr); } +#line 4192 "bison_parser.cpp" + break; + + case 148: /* opt_limit: LIMIT ALL OFFSET expr */ +#line 956 "bison_parser.y" + { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } +#line 4198 "bison_parser.cpp" + break; + + case 149: /* opt_limit: %empty */ +#line 957 "bison_parser.y" + { (yyval.limit) = nullptr; } +#line 4204 "bison_parser.cpp" + break; + + case 150: /* expr_list: expr_alias */ +#line 964 "bison_parser.y" + { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } +#line 4210 "bison_parser.cpp" + break; + + case 151: /* expr_list: expr_list ',' expr_alias */ +#line 965 "bison_parser.y" + { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } +#line 4216 "bison_parser.cpp" + break; + + case 152: /* opt_literal_list: literal_list */ +#line 969 "bison_parser.y" + { (yyval.expr_vec) = (yyvsp[0].expr_vec); } +#line 4222 "bison_parser.cpp" + break; + + case 153: /* opt_literal_list: %empty */ +#line 970 "bison_parser.y" + { (yyval.expr_vec) = nullptr; } +#line 4228 "bison_parser.cpp" + break; + + case 154: /* literal_list: literal */ +#line 974 "bison_parser.y" + { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } +#line 4234 "bison_parser.cpp" + break; + + case 155: /* literal_list: literal_list ',' literal */ +#line 975 "bison_parser.y" + { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } +#line 4240 "bison_parser.cpp" + break; + + case 156: /* expr_alias: expr opt_alias */ +#line 979 "bison_parser.y" + { + (yyval.expr) = (yyvsp[-1].expr); + if ((yyvsp[0].alias_t)) { + (yyval.expr)->alias = strdup((yyvsp[0].alias_t)->name); + delete (yyvsp[0].alias_t); + } + } +#line 4252 "bison_parser.cpp" + break; + + case 162: /* operand: '(' expr ')' */ +#line 997 "bison_parser.y" + { (yyval.expr) = (yyvsp[-1].expr); } +#line 4258 "bison_parser.cpp" + break; + + case 172: /* operand: '(' select_no_paren ')' */ +#line 1007 "bison_parser.y" + { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } +#line 4264 "bison_parser.cpp" + break; + + case 175: /* unary_expr: '-' operand */ +#line 1016 "bison_parser.y" + { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } +#line 4270 "bison_parser.cpp" + break; + + case 176: /* unary_expr: NOT operand */ +#line 1017 "bison_parser.y" + { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } +#line 4276 "bison_parser.cpp" + break; + + case 177: /* unary_expr: operand ISNULL */ +#line 1018 "bison_parser.y" + { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } +#line 4282 "bison_parser.cpp" + break; + + case 178: /* unary_expr: operand IS NULL */ +#line 1019 "bison_parser.y" + { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } +#line 4288 "bison_parser.cpp" + break; + + case 179: /* unary_expr: operand IS NOT NULL */ +#line 1020 "bison_parser.y" + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } +#line 4294 "bison_parser.cpp" + break; + + case 181: /* binary_expr: operand '-' operand */ +#line 1025 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } +#line 4300 "bison_parser.cpp" + break; + + case 182: /* binary_expr: operand '+' operand */ +#line 1026 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } +#line 4306 "bison_parser.cpp" + break; + + case 183: /* binary_expr: operand '/' operand */ +#line 1027 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } +#line 4312 "bison_parser.cpp" + break; + + case 184: /* binary_expr: operand '*' operand */ +#line 1028 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } +#line 4318 "bison_parser.cpp" + break; + + case 185: /* binary_expr: operand '%' operand */ +#line 1029 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } +#line 4324 "bison_parser.cpp" + break; + + case 186: /* binary_expr: operand '^' operand */ +#line 1030 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } +#line 4330 "bison_parser.cpp" + break; + + case 187: /* binary_expr: operand LIKE operand */ +#line 1031 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } +#line 4336 "bison_parser.cpp" + break; + + case 188: /* binary_expr: operand NOT LIKE operand */ +#line 1032 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } +#line 4342 "bison_parser.cpp" + break; + + case 189: /* binary_expr: operand ILIKE operand */ +#line 1033 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } +#line 4348 "bison_parser.cpp" + break; + + case 190: /* binary_expr: operand CONCAT operand */ +#line 1034 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } +#line 4354 "bison_parser.cpp" + break; + + case 191: /* logic_expr: expr AND expr */ +#line 1038 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } +#line 4360 "bison_parser.cpp" + break; + + case 192: /* logic_expr: expr OR expr */ +#line 1039 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } +#line 4366 "bison_parser.cpp" + break; + + case 193: /* in_expr: operand IN '(' expr_list ')' */ +#line 1043 "bison_parser.y" + { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } +#line 4372 "bison_parser.cpp" + break; + + case 194: /* in_expr: operand NOT IN '(' expr_list ')' */ +#line 1044 "bison_parser.y" + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } +#line 4378 "bison_parser.cpp" + break; + + case 195: /* in_expr: operand IN '(' select_no_paren ')' */ +#line 1045 "bison_parser.y" + { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } +#line 4384 "bison_parser.cpp" + break; + + case 196: /* in_expr: operand NOT IN '(' select_no_paren ')' */ +#line 1046 "bison_parser.y" + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } +#line 4390 "bison_parser.cpp" + break; + + case 197: /* case_expr: CASE expr case_list END */ +#line 1052 "bison_parser.y" + { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } +#line 4396 "bison_parser.cpp" + break; + + case 198: /* case_expr: CASE expr case_list ELSE expr END */ +#line 1053 "bison_parser.y" + { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } +#line 4402 "bison_parser.cpp" + break; + + case 199: /* case_expr: CASE case_list END */ +#line 1054 "bison_parser.y" + { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } +#line 4408 "bison_parser.cpp" + break; + + case 200: /* case_expr: CASE case_list ELSE expr END */ +#line 1055 "bison_parser.y" + { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } +#line 4414 "bison_parser.cpp" + break; + + case 201: /* case_list: WHEN expr THEN expr */ +#line 1059 "bison_parser.y" + { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } +#line 4420 "bison_parser.cpp" + break; + + case 202: /* case_list: case_list WHEN expr THEN expr */ +#line 1060 "bison_parser.y" + { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } +#line 4426 "bison_parser.cpp" + break; + + case 203: /* exists_expr: EXISTS '(' select_no_paren ')' */ +#line 1064 "bison_parser.y" + { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } +#line 4432 "bison_parser.cpp" + break; + + case 204: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ +#line 1065 "bison_parser.y" + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } +#line 4438 "bison_parser.cpp" + break; + + case 205: /* comp_expr: operand '=' operand */ +#line 1069 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } +#line 4444 "bison_parser.cpp" + break; + + case 206: /* comp_expr: operand EQUALS operand */ +#line 1070 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } +#line 4450 "bison_parser.cpp" + break; + + case 207: /* comp_expr: operand NOTEQUALS operand */ +#line 1071 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } +#line 4456 "bison_parser.cpp" + break; + + case 208: /* comp_expr: operand '<' operand */ +#line 1072 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } +#line 4462 "bison_parser.cpp" + break; + + case 209: /* comp_expr: operand '>' operand */ +#line 1073 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } +#line 4468 "bison_parser.cpp" + break; + + case 210: /* comp_expr: operand LESSEQ operand */ +#line 1074 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } +#line 4474 "bison_parser.cpp" + break; + + case 211: /* comp_expr: operand GREATEREQ operand */ +#line 1075 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } +#line 4480 "bison_parser.cpp" + break; + + case 212: /* function_expr: IDENTIFIER '(' ')' */ +#line 1079 "bison_parser.y" + { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } +#line 4486 "bison_parser.cpp" + break; + + case 213: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ +#line 1080 "bison_parser.y" + { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } +#line 4492 "bison_parser.cpp" + break; + + case 214: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ +#line 1084 "bison_parser.y" + { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } +#line 4498 "bison_parser.cpp" + break; + + case 215: /* cast_expr: CAST '(' expr AS column_type ')' */ +#line 1088 "bison_parser.y" + { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } +#line 4504 "bison_parser.cpp" + break; + + case 216: /* datetime_field: SECOND */ +#line 1092 "bison_parser.y" + { (yyval.datetime_field) = kDatetimeSecond; } +#line 4510 "bison_parser.cpp" + break; + + case 217: /* datetime_field: MINUTE */ +#line 1093 "bison_parser.y" + { (yyval.datetime_field) = kDatetimeMinute; } +#line 4516 "bison_parser.cpp" + break; + + case 218: /* datetime_field: HOUR */ +#line 1094 "bison_parser.y" + { (yyval.datetime_field) = kDatetimeHour; } +#line 4522 "bison_parser.cpp" + break; + + case 219: /* datetime_field: DAY */ +#line 1095 "bison_parser.y" + { (yyval.datetime_field) = kDatetimeDay; } +#line 4528 "bison_parser.cpp" + break; + + case 220: /* datetime_field: MONTH */ +#line 1096 "bison_parser.y" + { (yyval.datetime_field) = kDatetimeMonth; } +#line 4534 "bison_parser.cpp" + break; + + case 221: /* datetime_field: YEAR */ +#line 1097 "bison_parser.y" + { (yyval.datetime_field) = kDatetimeYear; } +#line 4540 "bison_parser.cpp" + break; + + case 222: /* array_expr: ARRAY '[' expr_list ']' */ +#line 1101 "bison_parser.y" + { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } +#line 4546 "bison_parser.cpp" + break; + + case 223: /* array_index: operand '[' int_literal ']' */ +#line 1105 "bison_parser.y" + { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } +#line 4552 "bison_parser.cpp" + break; + + case 224: /* between_expr: operand BETWEEN operand AND operand */ +#line 1109 "bison_parser.y" + { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } +#line 4558 "bison_parser.cpp" + break; + + case 225: /* column_name: IDENTIFIER */ +#line 1113 "bison_parser.y" + { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } +#line 4564 "bison_parser.cpp" + break; + + case 226: /* column_name: IDENTIFIER '.' IDENTIFIER */ +#line 1114 "bison_parser.y" + { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } +#line 4570 "bison_parser.cpp" + break; + + case 227: /* column_name: '*' */ +#line 1115 "bison_parser.y" + { (yyval.expr) = Expr::makeStar(); } +#line 4576 "bison_parser.cpp" + break; + + case 228: /* column_name: IDENTIFIER '.' '*' */ +#line 1116 "bison_parser.y" + { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } +#line 4582 "bison_parser.cpp" + break; + + case 235: /* string_literal: STRING */ +#line 1129 "bison_parser.y" + { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } +#line 4588 "bison_parser.cpp" + break; + + case 236: /* bool_literal: TRUE */ +#line 1133 "bison_parser.y" + { (yyval.expr) = Expr::makeLiteral(true); } +#line 4594 "bison_parser.cpp" + break; + + case 237: /* bool_literal: FALSE */ +#line 1134 "bison_parser.y" + { (yyval.expr) = Expr::makeLiteral(false); } +#line 4600 "bison_parser.cpp" + break; + + case 238: /* num_literal: FLOATVAL */ +#line 1138 "bison_parser.y" + { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } +#line 4606 "bison_parser.cpp" + break; + + case 240: /* int_literal: INTVAL */ +#line 1143 "bison_parser.y" + { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } +#line 4612 "bison_parser.cpp" + break; + + case 241: /* null_literal: NULL */ +#line 1147 "bison_parser.y" + { (yyval.expr) = Expr::makeNullLiteral(); } +#line 4618 "bison_parser.cpp" + break; + + case 242: /* date_literal: DATE STRING */ +#line 1151 "bison_parser.y" + { + int day{0}, month{0}, year{0}, chars_parsed{0}; + // If the whole string is parsed, chars_parsed points to the terminating null byte after the last character + if (sscanf((yyvsp[0].sval), "%4d-%2d-%2d%n", &day, &month, &year, &chars_parsed) != 3 || (yyvsp[0].sval)[chars_parsed] != 0) { + free((yyvsp[0].sval)); + yyerror(&yyloc, result, scanner, "Found incorrect date format. Expected format: YYYY-MM-DD"); + YYERROR; + } + (yyval.expr) = Expr::makeDateLiteral((yyvsp[0].sval)); + } +#line 4633 "bison_parser.cpp" + break; + + case 243: /* param_expr: '?' */ +#line 1164 "bison_parser.y" + { + (yyval.expr) = Expr::makeParameter(yylloc.total_column); + (yyval.expr)->ival2 = yyloc.param_list.size(); + yyloc.param_list.push_back((yyval.expr)); + } +#line 4643 "bison_parser.cpp" + break; + + case 245: /* table_ref: table_ref_commalist ',' table_ref_atomic */ +#line 1177 "bison_parser.y" + { + (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); + auto tbl = new TableRef(kTableCrossProduct); + tbl->list = (yyvsp[-2].table_vec); + (yyval.table) = tbl; + } +#line 4654 "bison_parser.cpp" + break; + + case 249: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ +#line 1193 "bison_parser.y" + { + auto tbl = new TableRef(kTableSelect); + tbl->select = (yyvsp[-2].select_stmt); + tbl->alias = (yyvsp[0].alias_t); + (yyval.table) = tbl; + } +#line 4665 "bison_parser.cpp" + break; + + case 250: /* table_ref_commalist: table_ref_atomic */ +#line 1202 "bison_parser.y" + { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } +#line 4671 "bison_parser.cpp" + break; + + case 251: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ +#line 1203 "bison_parser.y" + { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } +#line 4677 "bison_parser.cpp" + break; + + case 252: /* table_ref_name: table_name opt_table_alias */ +#line 1208 "bison_parser.y" + { + auto tbl = new TableRef(kTableName); + tbl->schema = (yyvsp[-1].table_name).schema; + tbl->name = (yyvsp[-1].table_name).name; + tbl->alias = (yyvsp[0].alias_t); + (yyval.table) = tbl; + } +#line 4689 "bison_parser.cpp" + break; + + case 253: /* table_ref_name_no_alias: table_name */ +#line 1219 "bison_parser.y" + { + (yyval.table) = new TableRef(kTableName); + (yyval.table)->schema = (yyvsp[0].table_name).schema; + (yyval.table)->name = (yyvsp[0].table_name).name; + } +#line 4699 "bison_parser.cpp" + break; + + case 254: /* table_name: IDENTIFIER */ +#line 1228 "bison_parser.y" + { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} +#line 4705 "bison_parser.cpp" + break; + + case 255: /* table_name: IDENTIFIER '.' IDENTIFIER */ +#line 1229 "bison_parser.y" + { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } +#line 4711 "bison_parser.cpp" + break; + + case 256: /* opt_index_name: IDENTIFIER */ +#line 1233 "bison_parser.y" + { (yyval.sval) = (yyvsp[0].sval);} +#line 4717 "bison_parser.cpp" + break; + + case 257: /* opt_index_name: %empty */ +#line 1234 "bison_parser.y" + { (yyval.sval) = nullptr;} +#line 4723 "bison_parser.cpp" + break; + + case 258: /* index_name: IDENTIFIER */ +#line 1238 "bison_parser.y" + { (yyval.sval) = (yyvsp[0].sval);} +#line 4729 "bison_parser.cpp" + break; + + case 260: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ +#line 1244 "bison_parser.y" + { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } +#line 4735 "bison_parser.cpp" + break; + + case 262: /* opt_table_alias: %empty */ +#line 1250 "bison_parser.y" + { (yyval.alias_t) = nullptr; } +#line 4741 "bison_parser.cpp" + break; + + case 263: /* alias: AS IDENTIFIER */ +#line 1255 "bison_parser.y" + { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } +#line 4747 "bison_parser.cpp" + break; + + case 264: /* alias: IDENTIFIER */ +#line 1256 "bison_parser.y" + { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } +#line 4753 "bison_parser.cpp" + break; + + case 266: /* opt_alias: %empty */ +#line 1262 "bison_parser.y" + { (yyval.alias_t) = nullptr; } +#line 4759 "bison_parser.cpp" + break; + + case 268: /* opt_with_clause: %empty */ +#line 1272 "bison_parser.y" + { (yyval.with_description_vec) = nullptr; } +#line 4765 "bison_parser.cpp" + break; + + case 269: /* with_clause: WITH with_description_list */ +#line 1276 "bison_parser.y" + { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } +#line 4771 "bison_parser.cpp" + break; + + case 270: /* with_description_list: with_description */ +#line 1280 "bison_parser.y" + { + (yyval.with_description_vec) = new std::vector(); + (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); + } +#line 4780 "bison_parser.cpp" + break; + + case 271: /* with_description_list: with_description_list ',' with_description */ +#line 1284 "bison_parser.y" + { + (yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t)); + (yyval.with_description_vec) = (yyvsp[-2].with_description_vec); + } +#line 4789 "bison_parser.cpp" + break; + + case 272: /* with_description: IDENTIFIER AS select_with_paren */ +#line 1291 "bison_parser.y" + { + (yyval.with_description_t) = new WithDescription(); + (yyval.with_description_t)->alias = (yyvsp[-2].sval); + (yyval.with_description_t)->select = (yyvsp[0].select_stmt); + } +#line 4799 "bison_parser.cpp" + break; + + case 273: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ +#line 1305 "bison_parser.y" + { + (yyval.table) = new TableRef(kTableJoin); + (yyval.table)->join = new JoinDefinition(); + (yyval.table)->join->type = kJoinNatural; + (yyval.table)->join->left = (yyvsp[-3].table); + (yyval.table)->join->right = (yyvsp[0].table); + } +#line 4811 "bison_parser.cpp" + break; + + case 274: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ +#line 1313 "bison_parser.y" + { + (yyval.table) = new TableRef(kTableJoin); + (yyval.table)->join = new JoinDefinition(); + (yyval.table)->join->type = (JoinType) (yyvsp[-4].uval); + (yyval.table)->join->left = (yyvsp[-5].table); + (yyval.table)->join->right = (yyvsp[-2].table); + (yyval.table)->join->condition = (yyvsp[0].expr); + } +#line 4824 "bison_parser.cpp" + break; + + case 275: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ +#line 1323 "bison_parser.y" + { + (yyval.table) = new TableRef(kTableJoin); + (yyval.table)->join = new JoinDefinition(); + (yyval.table)->join->type = (JoinType) (yyvsp[-6].uval); + (yyval.table)->join->left = (yyvsp[-7].table); + (yyval.table)->join->right = (yyvsp[-4].table); + auto left_col = Expr::makeColumnRef(strdup((yyvsp[-1].expr)->name)); + if ((yyvsp[-1].expr)->alias != nullptr) left_col->alias = strdup((yyvsp[-1].expr)->alias); + if ((yyvsp[-7].table)->getName() != nullptr) left_col->table = strdup((yyvsp[-7].table)->getName()); + auto right_col = Expr::makeColumnRef(strdup((yyvsp[-1].expr)->name)); + if ((yyvsp[-1].expr)->alias != nullptr) right_col->alias = strdup((yyvsp[-1].expr)->alias); + if ((yyvsp[-4].table)->getName() != nullptr) right_col->table = strdup((yyvsp[-4].table)->getName()); + (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); + delete (yyvsp[-1].expr); + } +#line 4844 "bison_parser.cpp" + break; + + case 276: /* opt_join_type: INNER */ +#line 1341 "bison_parser.y" + { (yyval.uval) = kJoinInner; } +#line 4850 "bison_parser.cpp" + break; + + case 277: /* opt_join_type: LEFT OUTER */ +#line 1342 "bison_parser.y" + { (yyval.uval) = kJoinLeft; } +#line 4856 "bison_parser.cpp" + break; + + case 278: /* opt_join_type: LEFT */ +#line 1343 "bison_parser.y" + { (yyval.uval) = kJoinLeft; } +#line 4862 "bison_parser.cpp" + break; + + case 279: /* opt_join_type: RIGHT OUTER */ +#line 1344 "bison_parser.y" + { (yyval.uval) = kJoinRight; } +#line 4868 "bison_parser.cpp" + break; + + case 280: /* opt_join_type: RIGHT */ +#line 1345 "bison_parser.y" + { (yyval.uval) = kJoinRight; } +#line 4874 "bison_parser.cpp" + break; + + case 281: /* opt_join_type: FULL OUTER */ +#line 1346 "bison_parser.y" + { (yyval.uval) = kJoinFull; } +#line 4880 "bison_parser.cpp" + break; + + case 282: /* opt_join_type: OUTER */ +#line 1347 "bison_parser.y" + { (yyval.uval) = kJoinFull; } +#line 4886 "bison_parser.cpp" + break; + + case 283: /* opt_join_type: FULL */ +#line 1348 "bison_parser.y" + { (yyval.uval) = kJoinFull; } +#line 4892 "bison_parser.cpp" + break; + + case 284: /* opt_join_type: CROSS */ +#line 1349 "bison_parser.y" + { (yyval.uval) = kJoinCross; } +#line 4898 "bison_parser.cpp" + break; + + case 285: /* opt_join_type: %empty */ +#line 1350 "bison_parser.y" + { (yyval.uval) = kJoinInner; } +#line 4904 "bison_parser.cpp" + break; + + case 289: /* ident_commalist: IDENTIFIER */ +#line 1370 "bison_parser.y" + { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } +#line 4910 "bison_parser.cpp" + break; + + case 290: /* ident_commalist: ident_commalist ',' IDENTIFIER */ +#line 1371 "bison_parser.y" + { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } +#line 4916 "bison_parser.cpp" + break; + + +#line 4920 "bison_parser.cpp" + + default: break; + } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ + YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + + *++yyvsp = yyval; + *++yylsp = yyloc; + + /* Now 'shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + { + 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; + + +/*--------------------------------------. +| yyerrlab -- here on detecting error. | +`--------------------------------------*/ +yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == SQL_HSQL_EMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; + { + yypcontext_t yyctx + = {yyssp, yytoken, &yylloc}; + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == -1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = YY_CAST (char *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); + if (yymsg) + { + yysyntax_error_status + = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); + yymsgp = yymsg; + } + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = YYENOMEM; + } + } + yyerror (&yylloc, result, scanner, yymsgp); + if (yysyntax_error_status == YYENOMEM) + goto yyexhaustedlab; + } + } + + yyerror_range[1] = yylloc; + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + if (yychar <= SQL_YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == SQL_YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval, &yylloc, result, scanner); + yychar = SQL_HSQL_EMPTY; + } + } + + /* Else will try to reuse lookahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| 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; + + /* Do not reclaim the symbols of the rule whose action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + /* Pop stack until we find a state that shifts the error token. */ + for (;;) + { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) + { + yyn += YYSYMBOL_YYerror; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + yyerror_range[1] = *yylsp; + yydestruct ("Error: popping", + YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, result, scanner); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + + yyerror_range[2] = yylloc; + ++yylsp; + YYLLOC_DEFAULT (*yylsp, yyerror_range, 2); + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + + +#if 1 +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (&yylloc, result, scanner, YY_("memory exhausted")); + yyresult = 2; + goto yyreturn; +#endif + + +/*-------------------------------------------------------. +| yyreturn -- parsing is finished, clean up and return. | +`-------------------------------------------------------*/ +yyreturn: + if (yychar != SQL_HSQL_EMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, &yylloc, result, scanner); + } + /* Do not reclaim the symbols of the rule whose action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, result, scanner); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + return yyresult; +} + +#line 1374 "bison_parser.y" + +/********************************* + ** Section 4: Additional C code + *********************************/ + +/* empty */ diff --git a/src/parser/flex_lexer.cpp b/src/parser/flex_lexer.cpp new file mode 100644 index 00000000..ba5c1b7b --- /dev/null +++ b/src/parser/flex_lexer.cpp @@ -0,0 +1,4457 @@ +#line 1 "flex_lexer.cpp" + +#line 3 "flex_lexer.cpp" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 4 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +#ifdef yy_create_buffer +#define hsql__create_buffer_ALREADY_DEFINED +#else +#define yy_create_buffer hsql__create_buffer +#endif + +#ifdef yy_delete_buffer +#define hsql__delete_buffer_ALREADY_DEFINED +#else +#define yy_delete_buffer hsql__delete_buffer +#endif + +#ifdef yy_scan_buffer +#define hsql__scan_buffer_ALREADY_DEFINED +#else +#define yy_scan_buffer hsql__scan_buffer +#endif + +#ifdef yy_scan_string +#define hsql__scan_string_ALREADY_DEFINED +#else +#define yy_scan_string hsql__scan_string +#endif + +#ifdef yy_scan_bytes +#define hsql__scan_bytes_ALREADY_DEFINED +#else +#define yy_scan_bytes hsql__scan_bytes +#endif + +#ifdef yy_init_buffer +#define hsql__init_buffer_ALREADY_DEFINED +#else +#define yy_init_buffer hsql__init_buffer +#endif + +#ifdef yy_flush_buffer +#define hsql__flush_buffer_ALREADY_DEFINED +#else +#define yy_flush_buffer hsql__flush_buffer +#endif + +#ifdef yy_load_buffer_state +#define hsql__load_buffer_state_ALREADY_DEFINED +#else +#define yy_load_buffer_state hsql__load_buffer_state +#endif + +#ifdef yy_switch_to_buffer +#define hsql__switch_to_buffer_ALREADY_DEFINED +#else +#define yy_switch_to_buffer hsql__switch_to_buffer +#endif + +#ifdef yypush_buffer_state +#define hsql_push_buffer_state_ALREADY_DEFINED +#else +#define yypush_buffer_state hsql_push_buffer_state +#endif + +#ifdef yypop_buffer_state +#define hsql_pop_buffer_state_ALREADY_DEFINED +#else +#define yypop_buffer_state hsql_pop_buffer_state +#endif + +#ifdef yyensure_buffer_stack +#define hsql_ensure_buffer_stack_ALREADY_DEFINED +#else +#define yyensure_buffer_stack hsql_ensure_buffer_stack +#endif + +#ifdef yylex +#define hsql_lex_ALREADY_DEFINED +#else +#define yylex hsql_lex +#endif + +#ifdef yyrestart +#define hsql_restart_ALREADY_DEFINED +#else +#define yyrestart hsql_restart +#endif + +#ifdef yylex_init +#define hsql_lex_init_ALREADY_DEFINED +#else +#define yylex_init hsql_lex_init +#endif + +#ifdef yylex_init_extra +#define hsql_lex_init_extra_ALREADY_DEFINED +#else +#define yylex_init_extra hsql_lex_init_extra +#endif + +#ifdef yylex_destroy +#define hsql_lex_destroy_ALREADY_DEFINED +#else +#define yylex_destroy hsql_lex_destroy +#endif + +#ifdef yyget_debug +#define hsql_get_debug_ALREADY_DEFINED +#else +#define yyget_debug hsql_get_debug +#endif + +#ifdef yyset_debug +#define hsql_set_debug_ALREADY_DEFINED +#else +#define yyset_debug hsql_set_debug +#endif + +#ifdef yyget_extra +#define hsql_get_extra_ALREADY_DEFINED +#else +#define yyget_extra hsql_get_extra +#endif + +#ifdef yyset_extra +#define hsql_set_extra_ALREADY_DEFINED +#else +#define yyset_extra hsql_set_extra +#endif + +#ifdef yyget_in +#define hsql_get_in_ALREADY_DEFINED +#else +#define yyget_in hsql_get_in +#endif + +#ifdef yyset_in +#define hsql_set_in_ALREADY_DEFINED +#else +#define yyset_in hsql_set_in +#endif + +#ifdef yyget_out +#define hsql_get_out_ALREADY_DEFINED +#else +#define yyget_out hsql_get_out +#endif + +#ifdef yyset_out +#define hsql_set_out_ALREADY_DEFINED +#else +#define yyset_out hsql_set_out +#endif + +#ifdef yyget_leng +#define hsql_get_leng_ALREADY_DEFINED +#else +#define yyget_leng hsql_get_leng +#endif + +#ifdef yyget_text +#define hsql_get_text_ALREADY_DEFINED +#else +#define yyget_text hsql_get_text +#endif + +#ifdef yyget_lineno +#define hsql_get_lineno_ALREADY_DEFINED +#else +#define yyget_lineno hsql_get_lineno +#endif + +#ifdef yyset_lineno +#define hsql_set_lineno_ALREADY_DEFINED +#else +#define yyset_lineno hsql_set_lineno +#endif + +#ifdef yyget_column +#define hsql_get_column_ALREADY_DEFINED +#else +#define yyget_column hsql_get_column +#endif + +#ifdef yyset_column +#define hsql_set_column_ALREADY_DEFINED +#else +#define yyset_column hsql_set_column +#endif + +#ifdef yywrap +#define hsql_wrap_ALREADY_DEFINED +#else +#define yywrap hsql_wrap +#endif + +#ifdef yyget_lval +#define hsql_get_lval_ALREADY_DEFINED +#else +#define yyget_lval hsql_get_lval +#endif + +#ifdef yyset_lval +#define hsql_set_lval_ALREADY_DEFINED +#else +#define yyset_lval hsql_set_lval +#endif + +#ifdef yyget_lloc +#define hsql_get_lloc_ALREADY_DEFINED +#else +#define yyget_lloc hsql_get_lloc +#endif + +#ifdef yyset_lloc +#define hsql_set_lloc_ALREADY_DEFINED +#else +#define yyset_lloc hsql_set_lloc +#endif + +#ifdef yyalloc +#define hsql_alloc_ALREADY_DEFINED +#else +#define yyalloc hsql_alloc +#endif + +#ifdef yyrealloc +#define hsql_realloc_ALREADY_DEFINED +#else +#define yyrealloc hsql_realloc +#endif + +#ifdef yyfree +#define hsql_free_ALREADY_DEFINED +#else +#define yyfree hsql_free +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#ifndef SIZE_MAX +#define SIZE_MAX (~(size_t)0) +#endif + +#endif /* ! C99 */ + +#endif /* ! FLEXINT_H */ + +/* begin standard C++ headers. */ + +/* TODO: this is always defined, so inline it */ +#define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) +#else +#define yynoreturn +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an + * integer in range [0..255] for use as an array index. + */ +#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) + +/* An opaque pointer. */ +#ifndef YY_TYPEDEF_YY_SCANNER_T +#define YY_TYPEDEF_YY_SCANNER_T +typedef void* yyscan_t; +#endif + +/* For convenience, these vars (plus the bison vars far below) + are macros in the reentrant scanner. */ +#define yyin yyg->yyin_r +#define yyout yyg->yyout_r +#define yyextra yyg->yyextra_r +#define yyleng yyg->yyleng_r +#define yytext yyg->yytext_r +#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) +#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) +#define yy_flex_debug yyg->yy_flex_debug_r + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN yyg->yy_start = 1 + 2 * +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START ((yyg->yy_start - 1) / 2) +#define YYSTATE YY_START +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart( yyin , yyscanner ) +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else +#define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = yyg->yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) +#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ + ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ + : NULL) +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] + +void yyrestart ( FILE *input_file , yyscan_t yyscanner ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); +void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +void yypop_buffer_state ( yyscan_t yyscanner ); + +static void yyensure_buffer_stack ( yyscan_t yyscanner ); +static void yy_load_buffer_state ( yyscan_t yyscanner ); +static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); +#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) + +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); + +void *yyalloc ( yy_size_t , yyscan_t yyscanner ); +void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); +void yyfree ( void * , yyscan_t yyscanner ); + +#define yy_new_buffer yy_create_buffer +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +#define hsql_wrap(yyscanner) (/*CONSTCOND*/1) +#define YY_SKIP_YYWRAP +typedef flex_uint8_t YY_CHAR; + +typedef int yy_state_type; + +#define yytext_ptr yytext_r + +static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); +static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); +static int yy_get_next_buffer ( yyscan_t yyscanner ); +static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; +#define YY_NUM_RULES 164 +#define YY_END_OF_BUFFER 165 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static const flex_int16_t yy_accept[1152] = + { 0, + 0, 0, 161, 161, 2, 2, 165, 163, 4, 4, + 163, 163, 152, 159, 152, 152, 156, 152, 152, 152, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 152, 161, 162, 2, 2, 3, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 4, 147, 0, 1, 0, + 154, 153, 156, 149, 148, 146, 150, 158, 158, 158, + + 158, 158, 158, 125, 158, 126, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 127, 158, 158, 128, 129, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 130, 131, 132, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 133, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 151, 161, 160, 2, + 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 157, 0, 153, 113, 158, 114, 158, 158, + 115, 158, 116, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 137, 158, 158, 158, + + 158, 158, 158, 158, 158, 158, 158, 117, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 118, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 119, 158, 158, 120, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 121, 158, 158, 122, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 123, 158, 158, 158, 158, 158, 158, + 158, 158, 124, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + + 0, 158, 158, 158, 158, 158, 158, 158, 83, 158, + 84, 46, 85, 158, 158, 158, 86, 158, 158, 87, + 158, 158, 158, 158, 158, 89, 158, 158, 158, 90, + 91, 158, 158, 158, 158, 158, 158, 158, 92, 158, + 158, 93, 94, 158, 158, 95, 158, 96, 136, 158, + 158, 158, 158, 158, 158, 97, 158, 98, 99, 100, + 158, 102, 158, 103, 158, 158, 158, 158, 104, 158, + 158, 158, 158, 158, 105, 158, 158, 34, 158, 158, + 158, 158, 158, 158, 158, 106, 158, 158, 158, 158, + 107, 108, 32, 158, 140, 158, 158, 158, 158, 158, + + 158, 158, 158, 158, 110, 158, 111, 158, 112, 139, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 0, 63, 64, 158, 65, 158, 143, 158, 158, 158, + 158, 158, 158, 158, 66, 158, 158, 158, 158, 158, + 67, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 141, 68, 158, 158, 69, 158, 101, 158, 70, + 71, 158, 158, 158, 158, 72, 73, 74, 75, 158, + 138, 158, 158, 158, 76, 77, 158, 158, 158, 158, + 158, 78, 158, 158, 158, 158, 158, 158, 79, 158, + 158, 158, 158, 80, 158, 158, 158, 81, 158, 158, + + 158, 158, 82, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 0, 158, 36, 158, + 158, 158, 37, 145, 158, 38, 158, 158, 158, 158, + + 39, 158, 40, 158, 41, 42, 43, 158, 44, 158, + 158, 47, 48, 49, 50, 51, 158, 158, 52, 135, + 158, 158, 53, 158, 158, 158, 54, 158, 158, 55, + 134, 56, 57, 158, 58, 158, 158, 158, 158, 59, + 60, 61, 62, 158, 158, 158, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + + 2, 2, 2, 2, 2, 2, 0, 15, 16, 17, + 158, 18, 19, 158, 158, 33, 20, 158, 158, 21, + 22, 45, 23, 158, 24, 158, 158, 25, 26, 158, + 158, 27, 28, 158, 158, 158, 158, 29, 31, 35, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 0, 158, 88, 158, 10, 11, + 158, 12, 158, 13, 144, 158, 158, 158, 14, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + + 2, 2, 2, 2, 0, 30, 158, 7, 158, 8, + 9, 158, 2, 2, 2, 2, 2, 2, 2, 2, + 0, 5, 6, 158, 2, 2, 2, 2, 0, 142, + 2, 2, 0, 2, 0, 2, 0, 2, 0, 2, + 0, 2, 0, 2, 0, 2, 0, 2, 155, 2, + 0 + } ; + +static const YY_CHAR yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 4, 5, 1, 1, 6, 1, 7, 6, + 6, 6, 6, 6, 8, 9, 6, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 6, 6, 20, + 21, 22, 6, 1, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 6, 1, 6, 6, 49, 1, 50, 51, 52, 53, + + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 6, 76, 6, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static const YY_CHAR yy_meta[77] = + { 0, + 1, 1, 2, 1, 3, 1, 4, 1, 1, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, + 1, 1, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 1 + } ; + +static const flex_int16_t yy_base[1159] = + { 0, + 0, 0, 720, 709, 76, 0, 688, 4601, 151, 153, + 647, 0, 4601, 4601, 149, 148, 160, 159, 643, 625, + 156, 156, 164, 162, 172, 223, 198, 211, 215, 151, + 168, 210, 255, 257, 263, 262, 0, 277, 307, 350, + 284, 221, 258, 171, 564, 0, 609, 0, 295, 308, + 586, 576, 0, 0, 331, 408, 419, 321, 542, 512, + 438, 514, 568, 620, 668, 720, 328, 426, 768, 329, + 311, 434, 500, 820, 868, 505, 421, 513, 918, 970, + 515, 570, 455, 423, 450, 351, 4601, 520, 4601, 512, + 1035, 1045, 1056, 4601, 4601, 4601, 4601, 0, 174, 282, + + 336, 520, 296, 315, 557, 0, 345, 334, 568, 511, + 327, 611, 570, 345, 419, 421, 441, 444, 631, 469, + 515, 520, 542, 555, 560, 559, 563, 609, 578, 605, + 0, 618, 616, 665, 619, 628, 618, 643, 664, 685, + 650, 657, 667, 663, 669, 678, 690, 691, 0, 697, + 683, 704, 722, 722, 750, 726, 722, 728, 764, 724, + 725, 743, 773, 764, 774, 770, 769, 796, 777, 788, + 786, 787, 818, 822, 808, 828, 4601, 0, 4601, 0, + 389, 0, 512, 0, 499, 1066, 1076, 1087, 0, 0, + 0, 0, 826, 835, 856, 859, 913, 887, 872, 922, + + 905, 961, 962, 1080, 957, 1081, 1133, 1085, 1119, 1083, + 1097, 1122, 1143, 1193, 1145, 1175, 1178, 959, 1196, 1187, + 1217, 1219, 1228, 1232, 1183, 1137, 1247, 1238, 1296, 1253, + 1257, 1270, 1281, 1306, 1331, 1335, 1298, 1350, 1346, 1349, + 1365, 1383, 1380, 1374, 1405, 1402, 1413, 1415, 1414, 1450, + 1454, 1448, 1469, 1478, 1480, 1502, 1508, 1513, 1524, 1389, + 1518, 1519, 1552, 1554, 1563, 1573, 1596, 1567, 1467, 1591, + 1602, 0, 4601, 498, 1667, 0, 825, 0, 833, 831, + 0, 852, 0, 880, 916, 908, 937, 1619, 963, 962, + 979, 1067, 1066, 1154, 1140, 1159, 0, 1166, 1181, 1240, + + 1315, 1262, 1286, 1277, 1296, 1325, 1344, 0, 1364, 1368, + 1422, 1410, 1432, 1444, 1451, 1479, 1513, 1515, 1570, 1579, + 1600, 1592, 1609, 1611, 1606, 1624, 1634, 1631, 1645, 1647, + 1660, 1663, 1646, 1656, 0, 1651, 1669, 1666, 1672, 1679, + 1674, 1675, 1662, 1664, 1664, 0, 1674, 1669, 1669, 1684, + 1685, 1690, 1679, 1680, 1686, 1688, 1703, 1686, 1711, 1709, + 1717, 1709, 1720, 0, 1705, 1709, 1710, 1720, 1718, 1715, + 1722, 1732, 0, 1724, 1736, 1725, 1724, 1742, 1730, 1724, + 1750, 1724, 1734, 1764, 1750, 1742, 0, 495, 1800, 1774, + 1778, 1779, 1793, 1795, 1796, 1807, 1808, 1831, 1832, 1819, + + 1849, 1847, 1857, 1865, 1853, 1871, 1875, 1903, 1887, 1890, + 1905, 1909, 1911, 1924, 1933, 1941, 1935, 1949, 1957, 1959, + 1945, 1963, 1978, 1967, 1995, 1989, 2011, 1999, 2007, 2008, + 2017, 2033, 2043, 2049, 2062, 2057, 2071, 2061, 2052, 2093, + 2097, 2075, 2087, 2105, 2111, 2116, 2119, 2128, 2127, 2141, + 2145, 2167, 2150, 2173, 2179, 2182, 2185, 2195, 2203, 2204, + 2218, 2221, 2213, 2216, 2235, 2253, 2247, 2258, 2264, 2259, + 2275, 2277, 2287, 2281, 2289, 2303, 2312, 2318, 2326, 2327, + 2337, 2341, 2356, 2343, 2372, 2335, 2360, 2377, 2389, 2400, + 2391, 2406, 2414, 2415, 2432, 2445, 2440, 2464, 2448, 2456, + + 491, 1798, 1804, 1813, 1899, 1960, 1993, 2023, 0, 2119, + 0, 0, 2155, 2151, 2176, 2177, 0, 2336, 2352, 2380, + 2410, 2435, 2438, 2451, 2475, 2461, 2482, 2481, 2479, 0, + 0, 2477, 2478, 2478, 2482, 2503, 2506, 2505, 0, 2491, + 2512, 0, 0, 2513, 2499, 0, 2505, 0, 0, 2517, + 2505, 2500, 2507, 2509, 2521, 0, 2518, 0, 0, 0, + 2512, 0, 2521, 0, 2530, 2524, 2528, 2527, 0, 2544, + 2543, 2535, 2538, 2545, 0, 2560, 2563, 0, 2552, 2549, + 2548, 2567, 2560, 2562, 2574, 0, 2573, 2570, 2576, 2567, + 0, 0, 2565, 2567, 0, 2584, 2575, 2569, 2592, 2577, + + 2591, 2594, 2593, 2593, 0, 2586, 0, 2605, 0, 0, + 474, 2613, 2614, 2610, 2616, 2618, 2635, 2622, 2639, 2650, + 2647, 2648, 2656, 2664, 2681, 2680, 2678, 2689, 2710, 2702, + 2706, 2715, 2718, 2732, 2743, 2755, 2756, 2760, 2777, 2758, + 2769, 2788, 2798, 2794, 2786, 2823, 2831, 2773, 2812, 2829, + 2842, 2840, 2848, 2857, 2852, 2861, 2873, 2874, 2883, 2885, + 2898, 2896, 2906, 2914, 2935, 2897, 2929, 2931, 2939, 2940, + 2950, 2952, 2973, 2968, 2969, 2990, 2971, 3006, 2994, 3024, + 3003, 3025, 3027, 3028, 3039, 3060, 3061, 3042, 3070, 3079, + 3076, 3101, 3102, 3073, 3113, 3104, 3112, 3130, 3115, 3136, + + 3127, 3144, 3152, 3155, 3158, 3167, 3180, 3168, 3190, 3203, + 3204, 3181, 3209, 3221, 3220, 3222, 3226, 3234, 3235, 3243, + 442, 0, 0, 2666, 0, 2692, 0, 2721, 2865, 2888, + 2948, 2966, 2975, 3002, 0, 3054, 3058, 3118, 3109, 3170, + 0, 3228, 3229, 3248, 3258, 3260, 3249, 3251, 3258, 3270, + 3277, 0, 0, 3261, 3270, 0, 3276, 0, 3264, 0, + 0, 3265, 3283, 3272, 3281, 0, 0, 0, 0, 3289, + 0, 3296, 3291, 3280, 0, 0, 3296, 3284, 3285, 3300, + 3304, 0, 3313, 3315, 3313, 3299, 3318, 3322, 3306, 3313, + 3313, 3333, 3334, 0, 3331, 3333, 3333, 0, 3320, 3341, + + 3331, 3346, 0, 441, 3343, 3346, 3351, 3348, 3354, 3362, + 3365, 3377, 3386, 3387, 3400, 3408, 3402, 3405, 3417, 3416, + 3450, 3431, 3439, 3440, 3468, 3454, 3462, 3456, 3480, 3490, + 3491, 3494, 3516, 3504, 3492, 3522, 3525, 3546, 3528, 3554, + 3530, 3544, 3558, 3562, 3579, 3568, 3570, 3596, 3587, 3592, + 3598, 3600, 3602, 3604, 3632, 3633, 3641, 3637, 3638, 3642, + 3654, 3673, 3650, 3671, 3672, 3707, 3708, 3696, 3690, 3725, + 3733, 3744, 3746, 3721, 3742, 3761, 3747, 3750, 3776, 3778, + 3779, 3787, 3804, 3809, 3815, 3790, 435, 3352, 0, 3374, + 3430, 3519, 3594, 0, 3606, 0, 3674, 3689, 3705, 3777, + + 0, 3798, 0, 3814, 0, 0, 0, 3813, 0, 3807, + 3805, 0, 0, 0, 0, 0, 3808, 3830, 0, 0, + 3825, 3837, 0, 3826, 3844, 3826, 0, 3851, 3852, 3838, + 0, 0, 0, 3846, 0, 3858, 3859, 3860, 3846, 0, + 0, 0, 0, 3850, 3862, 3858, 434, 3866, 3867, 3869, + 3875, 3883, 3897, 3899, 3900, 3901, 3915, 3931, 3932, 3940, + 3937, 3968, 3943, 3971, 3953, 3954, 3977, 3983, 3985, 3993, + 3994, 3999, 4007, 4008, 4011, 4017, 4039, 4022, 4023, 4033, + 4056, 4051, 4045, 4062, 4048, 4061, 4067, 4093, 4099, 4096, + 4085, 4101, 4102, 4127, 4111, 4139, 4145, 4144, 4136, 4130, + + 4133, 4155, 4167, 4176, 4179, 4190, 429, 0, 0, 0, + 3906, 0, 0, 3909, 3922, 0, 0, 3949, 3974, 0, + 0, 0, 0, 4059, 0, 4060, 4125, 0, 0, 4158, + 4178, 0, 0, 4172, 4180, 4178, 4195, 0, 0, 0, + 404, 4198, 4201, 4207, 4209, 4213, 4219, 4230, 4235, 4232, + 4241, 4243, 4249, 4247, 4251, 4253, 4265, 4283, 4275, 4284, + 4286, 4287, 4289, 4305, 4315, 4299, 4317, 4338, 4341, 4339, + 4323, 4340, 4353, 4355, 402, 4288, 0, 4303, 0, 0, + 4314, 0, 4344, 0, 0, 4343, 4358, 4367, 0, 401, + 4379, 4374, 4389, 4383, 4391, 4393, 4395, 4412, 4397, 4407, + + 4423, 4437, 4429, 4441, 397, 0, 4428, 0, 4431, 0, + 0, 4436, 396, 4447, 4451, 4462, 4463, 4465, 4466, 4481, + 383, 0, 0, 4444, 382, 4479, 4487, 4496, 376, 0, + 342, 4495, 333, 331, 303, 291, 278, 255, 250, 245, + 243, 240, 235, 221, 226, 197, 187, 173, 4601, 0, + 4601, 4570, 4575, 181, 4580, 4585, 4590, 4595 + } ; + +static const flex_int16_t yy_def[1159] = + { 0, + 1151, 1, 1152, 1152, 1151, 5, 1151, 1151, 1151, 1151, + 1151, 1153, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1151, 1155, 1151, 1156, 1156, 1151, + 1156, 1157, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1158, 1158, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 1156, 1151, 1151, 1153, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1154, 1154, 1154, + + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1151, 1155, 1151, 1156, + 1156, 1156, 1157, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 62, 62, 62, 62, 62, 62, 62, 62, + + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 1156, 1151, 1151, 1151, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1156, 1156, 1156, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + + 1151, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1156, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 1151, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + + 1154, 1154, 1154, 1156, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 1151, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1156, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + + 62, 62, 62, 62, 62, 62, 1151, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1156, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 1151, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1156, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + + 62, 62, 62, 62, 1151, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1156, 62, 62, 62, 62, 62, 62, 62, + 1151, 1154, 1154, 1154, 1156, 62, 62, 62, 1151, 1154, + 1156, 62, 1151, 1156, 1151, 1156, 1151, 1156, 1151, 1156, + 1151, 1156, 1151, 1156, 1151, 1156, 1151, 1156, 1151, 1156, + 0, 1151, 1151, 1151, 1151, 1151, 1151, 1151 + } ; + +static const flex_int16_t yy_nxt[4678] = + { 0, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 37, 44, 37, 8, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 37, 44, 37, 45, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 58, 59, 60, 61, 62, + + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 77, 84, 77, 48, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 77, 84, + 77, 85, 86, 86, 86, 86, 89, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 91, 90, 92, 93, + 93, 93, 93, 93, 93, 93, 93, 93, 93, 94, + 95, 99, 105, 100, 111, 98, 107, 136, 112, 101, + 1150, 102, 113, 108, 137, 103, 104, 176, 114, 276, + + 109, 115, 106, 110, 1149, 116, 1148, 117, 99, 105, + 100, 111, 118, 107, 136, 112, 101, 119, 102, 113, + 108, 137, 103, 104, 176, 114, 276, 109, 115, 106, + 110, 126, 116, 128, 117, 1147, 138, 127, 1146, 118, + 139, 129, 131, 172, 119, 120, 140, 130, 132, 133, + 134, 173, 1145, 121, 1144, 135, 122, 1143, 126, 123, + 128, 1142, 124, 138, 127, 125, 1141, 139, 129, 131, + 172, 1140, 120, 140, 130, 132, 133, 134, 173, 144, + 121, 141, 135, 122, 152, 142, 123, 174, 175, 124, + 148, 143, 125, 145, 1139, 153, 181, 86, 149, 146, + + 147, 154, 150, 155, 1138, 151, 144, 156, 141, 86, + 86, 152, 142, 157, 174, 175, 1137, 148, 143, 169, + 145, 170, 153, 277, 171, 149, 146, 147, 154, 150, + 155, 158, 151, 159, 156, 282, 160, 232, 184, 283, + 157, 189, 190, 161, 162, 1136, 169, 1135, 170, 185, + 277, 171, 86, 86, 193, 193, 289, 193, 158, 1134, + 159, 221, 282, 160, 232, 231, 283, 222, 296, 278, + 161, 162, 163, 297, 193, 193, 164, 279, 287, 165, + 166, 193, 193, 289, 193, 288, 167, 305, 221, 168, + 181, 86, 231, 1133, 222, 296, 278, 1131, 1129, 163, + + 297, 193, 193, 164, 279, 287, 165, 166, 1125, 1121, + 1113, 1105, 288, 167, 305, 1090, 168, 186, 186, 186, + 186, 186, 186, 186, 186, 186, 186, 187, 188, 188, + 188, 188, 188, 188, 188, 188, 188, 188, 180, 180, + 1075, 180, 180, 180, 180, 180, 180, 193, 223, 271, + 1041, 1007, 193, 947, 887, 306, 224, 180, 180, 180, + 233, 307, 225, 194, 234, 195, 308, 193, 309, 193, + 235, 196, 193, 197, 193, 223, 271, 198, 199, 193, + 193, 193, 306, 224, 269, 270, 804, 233, 307, 225, + 194, 234, 195, 308, 193, 309, 193, 235, 196, 193, + + 197, 193, 315, 721, 198, 199, 611, 193, 193, 501, + 388, 269, 270, 180, 180, 180, 387, 180, 180, 180, + 180, 180, 180, 274, 273, 272, 236, 247, 193, 315, + 237, 193, 192, 180, 180, 180, 238, 294, 248, 250, + 200, 193, 280, 251, 249, 281, 193, 295, 316, 252, + 264, 193, 265, 236, 247, 266, 317, 237, 193, 193, + 201, 193, 191, 238, 294, 248, 250, 200, 193, 280, + 251, 249, 281, 193, 295, 316, 252, 264, 193, 265, + 180, 318, 266, 317, 284, 285, 193, 201, 193, 180, + 202, 319, 267, 320, 193, 321, 193, 203, 286, 322, + + 268, 290, 291, 292, 204, 293, 182, 205, 318, 303, + 304, 284, 285, 325, 193, 179, 193, 202, 319, 267, + 320, 193, 321, 193, 203, 286, 322, 268, 290, 291, + 292, 204, 293, 298, 205, 299, 303, 304, 300, 177, + 325, 193, 206, 193, 301, 97, 207, 326, 327, 323, + 208, 302, 324, 328, 333, 310, 209, 311, 334, 210, + 298, 312, 299, 96, 335, 300, 193, 87, 313, 206, + 336, 301, 314, 207, 326, 327, 323, 208, 302, 324, + 328, 333, 310, 209, 311, 334, 210, 1151, 312, 342, + 329, 335, 343, 193, 193, 313, 337, 336, 338, 314, + + 330, 211, 344, 212, 345, 331, 332, 339, 213, 340, + 346, 347, 348, 214, 193, 47, 342, 329, 349, 343, + 341, 193, 350, 337, 351, 338, 47, 330, 211, 344, + 212, 345, 331, 332, 339, 213, 340, 346, 347, 348, + 214, 193, 215, 352, 353, 349, 193, 341, 354, 350, + 216, 351, 355, 217, 359, 360, 218, 361, 1151, 219, + 365, 1151, 220, 1151, 366, 367, 193, 1151, 1151, 215, + 352, 353, 356, 193, 1151, 354, 1151, 216, 1151, 355, + 217, 359, 360, 218, 361, 357, 219, 365, 362, 220, + 358, 366, 367, 193, 193, 226, 368, 363, 369, 356, + + 371, 227, 228, 229, 372, 364, 373, 376, 230, 370, + 377, 1151, 357, 378, 193, 362, 379, 358, 374, 1151, + 380, 193, 226, 368, 363, 369, 381, 371, 227, 228, + 229, 372, 364, 373, 376, 230, 370, 377, 375, 1151, + 378, 193, 239, 379, 382, 374, 193, 380, 384, 385, + 386, 502, 193, 381, 1151, 1151, 240, 383, 1151, 503, + 390, 193, 241, 242, 504, 375, 193, 1151, 1151, 239, + 1151, 382, 193, 193, 505, 384, 385, 386, 502, 193, + 1151, 193, 193, 240, 383, 193, 503, 390, 193, 241, + 242, 504, 392, 193, 193, 243, 397, 391, 193, 193, + + 393, 505, 193, 244, 1151, 193, 1151, 245, 193, 193, + 246, 1151, 193, 193, 193, 1151, 506, 1151, 193, 392, + 1151, 193, 243, 397, 391, 193, 396, 393, 1151, 193, + 244, 193, 193, 193, 245, 394, 1151, 246, 395, 193, + 193, 193, 253, 506, 254, 193, 507, 255, 193, 398, + 399, 193, 508, 396, 256, 257, 1151, 1151, 193, 193, + 193, 1151, 394, 400, 193, 395, 193, 1151, 193, 253, + 509, 254, 1151, 507, 255, 193, 398, 399, 193, 508, + 1151, 256, 257, 408, 403, 193, 193, 193, 193, 1151, + 400, 193, 258, 409, 401, 193, 259, 509, 432, 260, + + 261, 402, 513, 193, 514, 193, 262, 193, 193, 263, + 408, 403, 193, 515, 193, 193, 193, 1151, 1151, 258, + 409, 401, 1151, 259, 1151, 432, 260, 261, 402, 513, + 193, 514, 193, 262, 193, 193, 263, 1151, 1151, 1151, + 515, 1151, 1151, 193, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 275, 275, 275, 275, 275, 275, + 275, 275, 275, 275, 92, 93, 93, 93, 93, 93, + 93, 93, 93, 93, 93, 186, 186, 186, 186, 186, + 186, 186, 186, 186, 186, 389, 389, 389, 389, 389, + 389, 389, 389, 389, 389, 187, 188, 188, 188, 188, + + 188, 188, 188, 188, 188, 188, 193, 193, 516, 193, + 1151, 193, 517, 404, 405, 406, 1151, 407, 1151, 420, + 1151, 1151, 410, 193, 417, 418, 193, 411, 1151, 193, + 1151, 193, 1151, 193, 193, 516, 193, 421, 193, 517, + 404, 405, 406, 193, 407, 193, 420, 422, 193, 410, + 193, 417, 418, 193, 411, 412, 193, 413, 193, 193, + 414, 419, 1151, 193, 421, 193, 415, 423, 193, 193, + 193, 193, 193, 416, 422, 193, 518, 1151, 429, 193, + 519, 1151, 412, 193, 413, 520, 193, 414, 419, 193, + 193, 193, 193, 415, 423, 193, 193, 1151, 193, 521, + + 416, 193, 1151, 518, 193, 429, 193, 519, 430, 193, + 193, 522, 520, 193, 431, 1151, 193, 424, 193, 425, + 434, 193, 193, 426, 193, 440, 521, 1151, 193, 193, + 427, 193, 433, 193, 428, 430, 193, 1151, 522, 193, + 193, 431, 193, 193, 424, 193, 425, 434, 193, 193, + 426, 193, 440, 435, 193, 436, 193, 427, 193, 433, + 193, 428, 523, 193, 193, 193, 193, 439, 437, 193, + 193, 438, 193, 193, 193, 442, 1151, 441, 193, 193, + 435, 193, 436, 193, 193, 193, 526, 448, 447, 523, + 193, 193, 193, 193, 439, 437, 193, 1151, 438, 193, + + 193, 193, 442, 193, 441, 193, 193, 193, 450, 1151, + 193, 193, 527, 526, 448, 447, 449, 1151, 528, 529, + 193, 443, 193, 193, 193, 1151, 193, 193, 1151, 1151, + 193, 444, 193, 457, 193, 450, 445, 446, 451, 527, + 452, 524, 193, 449, 193, 528, 529, 1151, 443, 193, + 1151, 193, 193, 453, 193, 454, 525, 193, 444, 193, + 457, 193, 530, 445, 446, 451, 455, 452, 524, 193, + 531, 193, 193, 1151, 456, 193, 193, 193, 1151, 193, + 453, 193, 454, 525, 193, 458, 532, 459, 193, 530, + 460, 193, 193, 455, 533, 193, 193, 531, 461, 193, + + 193, 456, 193, 193, 193, 462, 193, 463, 193, 193, + 1151, 193, 458, 532, 459, 485, 1151, 460, 193, 193, + 193, 533, 193, 193, 1151, 461, 193, 193, 193, 193, + 464, 193, 462, 193, 463, 193, 193, 467, 193, 193, + 468, 193, 485, 465, 469, 1151, 534, 193, 193, 1151, + 535, 193, 466, 193, 1151, 193, 193, 464, 193, 193, + 193, 193, 193, 1151, 467, 536, 193, 468, 193, 1151, + 465, 469, 470, 534, 193, 193, 193, 535, 193, 466, + 193, 474, 473, 537, 1151, 471, 193, 193, 193, 1151, + 472, 538, 536, 498, 193, 193, 193, 1151, 475, 470, + + 193, 193, 476, 193, 193, 539, 193, 193, 474, 473, + 537, 477, 471, 193, 1151, 193, 479, 472, 538, 478, + 498, 193, 193, 193, 193, 475, 193, 193, 193, 476, + 481, 193, 539, 193, 193, 540, 482, 1151, 477, 193, + 193, 480, 193, 479, 193, 193, 478, 1151, 193, 541, + 193, 193, 486, 193, 193, 193, 487, 481, 483, 193, + 1151, 193, 540, 482, 193, 193, 193, 1151, 480, 484, + 193, 193, 193, 1151, 488, 193, 541, 193, 193, 486, + 193, 193, 1151, 487, 490, 483, 193, 491, 492, 193, + 1151, 193, 193, 496, 489, 1151, 484, 193, 193, 193, + + 193, 488, 1151, 493, 542, 193, 497, 193, 1151, 193, + 1151, 490, 543, 193, 491, 492, 193, 193, 1151, 193, + 496, 489, 193, 544, 500, 193, 193, 193, 193, 494, + 493, 542, 499, 497, 545, 495, 193, 193, 546, 543, + 193, 547, 193, 510, 193, 511, 193, 548, 193, 193, + 544, 500, 1151, 1151, 1151, 193, 494, 1151, 1151, 499, + 512, 545, 495, 549, 193, 546, 550, 551, 547, 193, + 510, 552, 511, 553, 548, 193, 275, 275, 275, 275, + 275, 275, 275, 275, 275, 275, 554, 512, 557, 555, + 549, 558, 559, 550, 551, 560, 561, 562, 552, 556, + + 553, 563, 564, 565, 566, 567, 568, 569, 570, 571, + 572, 573, 574, 554, 575, 557, 555, 576, 558, 559, + 577, 578, 560, 561, 562, 579, 556, 580, 563, 564, + 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, + 581, 575, 582, 583, 576, 584, 585, 577, 578, 586, + 587, 588, 579, 589, 580, 590, 591, 592, 593, 594, + 599, 597, 595, 598, 600, 601, 602, 581, 605, 582, + 583, 596, 584, 585, 603, 606, 586, 587, 588, 609, + 589, 610, 590, 591, 592, 593, 594, 599, 597, 595, + 598, 600, 601, 602, 1151, 605, 604, 1151, 596, 607, + + 193, 603, 606, 608, 612, 193, 609, 1151, 610, 389, + 389, 389, 389, 389, 389, 389, 389, 389, 389, 613, + 193, 193, 193, 604, 193, 193, 607, 193, 614, 615, + 608, 612, 193, 193, 193, 1151, 1151, 722, 1151, 193, + 1151, 193, 193, 723, 1151, 193, 613, 193, 193, 193, + 1151, 193, 193, 193, 193, 614, 615, 193, 193, 724, + 193, 193, 617, 618, 722, 193, 193, 616, 193, 193, + 723, 620, 193, 621, 1151, 193, 1151, 193, 193, 193, + 193, 193, 619, 193, 193, 193, 724, 625, 622, 617, + 618, 193, 193, 193, 616, 193, 623, 193, 620, 193, + + 621, 193, 193, 193, 193, 193, 193, 624, 1151, 619, + 193, 193, 626, 193, 625, 622, 630, 193, 193, 1151, + 193, 627, 193, 623, 193, 628, 193, 629, 193, 193, + 193, 193, 1151, 193, 624, 193, 193, 193, 193, 626, + 193, 632, 631, 630, 193, 725, 633, 1151, 627, 193, + 193, 193, 628, 1151, 629, 193, 193, 193, 193, 634, + 193, 637, 193, 193, 193, 636, 1151, 193, 632, 631, + 193, 641, 725, 633, 635, 193, 193, 193, 193, 193, + 639, 193, 193, 193, 193, 193, 634, 193, 637, 193, + 638, 193, 636, 643, 193, 193, 640, 193, 641, 726, + + 642, 635, 193, 193, 193, 193, 193, 639, 193, 193, + 193, 1151, 193, 193, 193, 193, 193, 638, 193, 644, + 643, 193, 193, 640, 193, 193, 726, 642, 727, 645, + 193, 193, 193, 193, 649, 193, 193, 193, 647, 650, + 193, 193, 193, 193, 646, 193, 644, 648, 193, 728, + 1151, 193, 193, 193, 193, 727, 645, 193, 1151, 193, + 193, 649, 193, 193, 193, 647, 650, 651, 193, 193, + 193, 646, 193, 1151, 648, 193, 728, 652, 193, 193, + 193, 193, 653, 193, 193, 654, 193, 193, 193, 193, + 193, 657, 1151, 658, 651, 193, 193, 193, 193, 655, + + 656, 193, 193, 193, 652, 193, 193, 193, 193, 653, + 193, 661, 654, 662, 193, 193, 193, 193, 657, 193, + 658, 193, 193, 193, 193, 193, 655, 656, 193, 660, + 193, 663, 659, 193, 193, 193, 1151, 664, 661, 193, + 662, 729, 665, 193, 193, 193, 193, 1151, 193, 1151, + 193, 193, 666, 193, 193, 1151, 660, 193, 663, 659, + 193, 667, 193, 668, 664, 193, 193, 193, 729, 665, + 193, 670, 193, 193, 193, 672, 193, 730, 193, 666, + 193, 193, 669, 1151, 193, 731, 1151, 193, 667, 193, + 668, 193, 193, 193, 193, 673, 193, 671, 670, 193, + + 193, 193, 672, 193, 730, 193, 732, 674, 193, 669, + 675, 193, 731, 193, 193, 1151, 733, 1151, 193, 193, + 193, 193, 673, 193, 671, 193, 193, 676, 193, 193, + 193, 193, 193, 732, 674, 193, 677, 675, 193, 193, + 193, 193, 682, 733, 193, 678, 193, 193, 193, 193, + 193, 679, 193, 681, 676, 193, 193, 193, 193, 193, + 680, 683, 193, 677, 193, 1151, 193, 193, 193, 682, + 1151, 193, 678, 193, 193, 684, 193, 193, 679, 193, + 681, 193, 685, 1151, 193, 193, 193, 680, 683, 193, + 193, 193, 688, 193, 193, 686, 1151, 689, 687, 193, + + 193, 193, 684, 193, 193, 193, 193, 193, 193, 685, + 193, 193, 193, 193, 692, 693, 691, 193, 690, 688, + 193, 193, 686, 193, 689, 687, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 1151, 193, 695, 694, + 193, 692, 693, 691, 193, 690, 1151, 1151, 193, 193, + 193, 1151, 193, 193, 193, 1151, 193, 1151, 193, 1151, + 193, 703, 193, 193, 193, 695, 694, 193, 697, 193, + 696, 193, 193, 193, 699, 1151, 193, 734, 698, 193, + 193, 193, 193, 193, 701, 193, 193, 193, 703, 193, + 193, 193, 735, 700, 193, 697, 193, 696, 193, 193, + + 193, 699, 193, 193, 734, 698, 193, 702, 193, 193, + 193, 701, 704, 193, 193, 705, 193, 193, 193, 735, + 700, 736, 1151, 193, 706, 193, 193, 709, 710, 193, + 193, 1151, 193, 193, 702, 193, 707, 193, 708, 704, + 193, 193, 705, 737, 193, 193, 193, 1151, 736, 711, + 193, 706, 193, 193, 709, 710, 713, 712, 193, 193, + 193, 193, 193, 707, 193, 708, 193, 193, 193, 738, + 737, 193, 1151, 193, 193, 1151, 711, 719, 714, 193, + 739, 716, 193, 713, 712, 193, 193, 193, 193, 715, + 193, 193, 740, 193, 193, 720, 738, 741, 193, 717, + + 742, 193, 193, 718, 719, 714, 743, 739, 716, 193, + 193, 744, 745, 193, 746, 747, 715, 193, 193, 740, + 748, 193, 720, 749, 741, 750, 717, 742, 751, 193, + 718, 752, 753, 743, 754, 755, 756, 193, 744, 745, + 757, 746, 747, 758, 759, 760, 761, 748, 762, 763, + 749, 765, 750, 766, 767, 751, 768, 771, 752, 753, + 764, 754, 755, 756, 769, 770, 772, 757, 773, 774, + 758, 759, 760, 761, 775, 762, 763, 776, 765, 777, + 766, 767, 778, 768, 771, 779, 780, 764, 781, 782, + 783, 769, 770, 772, 784, 773, 774, 785, 786, 787, + + 788, 775, 789, 790, 776, 791, 777, 792, 793, 778, + 794, 795, 779, 780, 796, 781, 782, 783, 797, 798, + 799, 784, 800, 801, 785, 786, 787, 788, 802, 789, + 790, 803, 791, 1151, 792, 793, 193, 794, 795, 193, + 193, 796, 193, 1151, 193, 797, 798, 799, 811, 800, + 801, 1151, 805, 806, 1151, 802, 807, 809, 803, 193, + 193, 193, 808, 193, 193, 193, 193, 193, 193, 193, + 810, 193, 812, 193, 193, 811, 193, 1151, 813, 805, + 806, 193, 193, 807, 809, 193, 193, 193, 193, 808, + 193, 193, 193, 193, 193, 193, 193, 810, 814, 812, + + 193, 193, 193, 193, 193, 813, 193, 193, 193, 193, + 193, 815, 193, 888, 1151, 193, 1151, 193, 889, 816, + 193, 193, 1151, 193, 193, 814, 193, 193, 193, 193, + 817, 193, 193, 193, 193, 193, 193, 193, 815, 820, + 888, 193, 193, 819, 193, 889, 816, 890, 193, 821, + 818, 193, 193, 193, 193, 193, 193, 817, 193, 193, + 822, 193, 193, 193, 193, 824, 820, 1151, 193, 193, + 819, 193, 1151, 823, 890, 193, 821, 818, 193, 193, + 826, 193, 193, 193, 193, 193, 193, 822, 193, 193, + 827, 193, 824, 1151, 825, 193, 193, 1151, 1151, 835, + + 823, 193, 193, 193, 193, 193, 193, 826, 193, 193, + 828, 193, 193, 193, 193, 193, 193, 827, 1151, 193, + 193, 825, 193, 193, 193, 829, 835, 832, 193, 193, + 193, 193, 193, 193, 193, 830, 831, 828, 193, 193, + 193, 193, 193, 1151, 193, 833, 193, 193, 1151, 193, + 193, 193, 829, 834, 832, 193, 1151, 193, 193, 193, + 1151, 193, 830, 831, 837, 193, 193, 193, 193, 193, + 836, 193, 833, 1151, 193, 193, 193, 193, 193, 838, + 834, 1151, 193, 193, 193, 193, 193, 193, 193, 839, + 891, 837, 1151, 193, 193, 193, 193, 836, 193, 193, + + 193, 193, 193, 193, 193, 193, 838, 193, 840, 193, + 193, 841, 892, 193, 193, 193, 839, 891, 1151, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 1151, 193, + 193, 193, 193, 1151, 193, 840, 193, 842, 841, 892, + 193, 843, 193, 193, 193, 844, 193, 193, 1151, 193, + 193, 193, 193, 845, 1151, 193, 193, 193, 193, 193, + 193, 193, 848, 846, 842, 193, 193, 193, 843, 193, + 193, 193, 844, 1151, 847, 193, 193, 193, 193, 193, + 845, 193, 193, 893, 193, 193, 193, 193, 193, 848, + 846, 849, 193, 193, 193, 851, 193, 193, 193, 193, + + 854, 847, 193, 193, 193, 193, 850, 894, 193, 1151, + 893, 895, 193, 193, 193, 193, 193, 193, 849, 193, + 193, 193, 851, 193, 193, 193, 193, 854, 896, 857, + 852, 853, 193, 850, 894, 1151, 193, 1151, 895, 1151, + 193, 193, 193, 193, 193, 855, 193, 193, 856, 193, + 193, 193, 193, 193, 193, 896, 857, 852, 853, 193, + 1151, 1151, 860, 193, 858, 193, 859, 193, 193, 1151, + 193, 193, 855, 193, 193, 856, 193, 193, 193, 193, + 193, 193, 861, 862, 897, 193, 193, 193, 193, 860, + 1151, 858, 193, 859, 898, 193, 193, 193, 193, 193, + + 193, 193, 193, 1151, 863, 193, 193, 193, 868, 861, + 862, 897, 193, 193, 193, 193, 193, 865, 864, 193, + 1151, 898, 193, 193, 866, 193, 193, 193, 193, 193, + 193, 863, 193, 193, 193, 868, 867, 869, 870, 193, + 899, 872, 900, 193, 865, 864, 193, 193, 193, 193, + 193, 866, 193, 193, 193, 193, 193, 193, 193, 193, + 871, 193, 193, 867, 869, 870, 193, 899, 872, 900, + 193, 1151, 873, 193, 193, 193, 193, 193, 193, 1151, + 193, 193, 193, 193, 193, 193, 193, 871, 193, 193, + 193, 876, 874, 193, 193, 875, 901, 193, 193, 873, + + 193, 193, 1151, 193, 193, 193, 193, 882, 193, 193, + 878, 193, 879, 193, 193, 877, 193, 193, 876, 874, + 193, 193, 875, 901, 1151, 193, 193, 193, 193, 193, + 193, 193, 881, 193, 882, 193, 193, 878, 883, 879, + 193, 193, 877, 193, 880, 1151, 193, 193, 193, 193, + 193, 884, 193, 193, 193, 193, 193, 193, 902, 881, + 886, 193, 193, 193, 885, 883, 193, 193, 193, 193, + 903, 880, 193, 193, 193, 193, 193, 193, 884, 193, + 193, 193, 193, 904, 905, 902, 906, 886, 193, 193, + 907, 885, 908, 193, 193, 193, 193, 903, 909, 193, + + 910, 911, 912, 913, 914, 915, 916, 193, 193, 917, + 904, 905, 918, 906, 919, 920, 193, 907, 921, 908, + 922, 923, 924, 925, 926, 909, 927, 910, 911, 912, + 913, 914, 915, 916, 928, 929, 917, 930, 931, 918, + 932, 919, 920, 933, 934, 921, 935, 922, 923, 924, + 925, 926, 936, 927, 937, 938, 939, 940, 941, 942, + 943, 928, 929, 944, 930, 931, 945, 932, 946, 193, + 933, 934, 193, 935, 193, 1151, 1151, 193, 1008, 936, + 949, 937, 938, 939, 940, 941, 942, 943, 193, 193, + 944, 950, 193, 945, 193, 946, 193, 193, 948, 193, + + 193, 193, 951, 193, 193, 1008, 1151, 949, 193, 1009, + 952, 193, 193, 193, 1151, 193, 193, 1151, 950, 193, + 1151, 193, 953, 193, 193, 948, 193, 193, 956, 951, + 193, 193, 193, 193, 193, 193, 1009, 952, 193, 193, + 193, 954, 193, 193, 955, 1151, 193, 957, 193, 953, + 193, 193, 958, 193, 193, 956, 1010, 193, 193, 193, + 193, 193, 193, 193, 960, 961, 193, 1151, 954, 193, + 193, 955, 959, 193, 957, 193, 193, 193, 193, 958, + 193, 193, 965, 1010, 193, 193, 193, 1151, 193, 193, + 193, 960, 961, 193, 193, 963, 193, 964, 962, 959, + + 193, 1151, 193, 193, 193, 1151, 966, 193, 193, 965, + 1151, 1151, 193, 193, 193, 193, 193, 193, 193, 1151, + 193, 193, 963, 193, 964, 962, 193, 193, 971, 193, + 193, 967, 968, 966, 969, 193, 193, 193, 193, 1151, + 193, 193, 193, 193, 193, 193, 970, 193, 193, 1151, + 193, 193, 1151, 193, 193, 971, 193, 193, 967, 968, + 1011, 969, 193, 193, 193, 193, 972, 193, 193, 193, + 193, 193, 193, 970, 193, 193, 193, 193, 193, 973, + 193, 193, 974, 193, 193, 975, 1151, 1011, 193, 193, + 193, 1151, 193, 972, 977, 193, 193, 193, 193, 193, + + 193, 193, 1151, 193, 193, 193, 973, 193, 193, 974, + 978, 193, 975, 193, 193, 193, 193, 193, 193, 193, + 976, 977, 193, 193, 193, 193, 193, 193, 980, 979, + 193, 193, 193, 193, 1012, 193, 1151, 978, 193, 1013, + 193, 193, 193, 193, 193, 193, 193, 976, 193, 193, + 193, 193, 193, 193, 981, 980, 979, 193, 193, 193, + 193, 1012, 982, 193, 193, 193, 1013, 193, 984, 193, + 1151, 193, 1151, 193, 1151, 193, 987, 193, 193, 193, + 193, 981, 983, 193, 193, 193, 193, 193, 193, 982, + 193, 193, 1151, 985, 193, 984, 193, 193, 193, 193, + + 193, 988, 1151, 987, 1151, 193, 193, 193, 1014, 983, + 193, 193, 986, 1015, 193, 193, 193, 193, 193, 193, + 985, 991, 193, 193, 193, 193, 193, 193, 988, 989, + 990, 992, 1151, 193, 193, 1014, 193, 1151, 1016, 986, + 1015, 1151, 193, 193, 193, 193, 193, 193, 991, 193, + 993, 193, 1151, 193, 193, 994, 989, 990, 992, 193, + 193, 193, 997, 193, 998, 1016, 1151, 193, 193, 193, + 193, 193, 193, 193, 193, 1151, 1000, 993, 193, 193, + 193, 193, 994, 999, 995, 996, 193, 193, 193, 997, + 193, 998, 193, 193, 193, 193, 193, 193, 193, 193, + + 193, 1001, 193, 1000, 1002, 193, 193, 193, 1151, 1151, + 999, 995, 996, 193, 193, 193, 193, 193, 1017, 193, + 193, 1018, 193, 193, 193, 193, 1004, 1003, 1001, 193, + 193, 1002, 193, 193, 193, 193, 193, 1006, 1019, 1020, + 193, 193, 1021, 193, 1005, 1017, 1022, 1023, 1018, 193, + 193, 193, 193, 1004, 1003, 193, 1024, 193, 1025, 1026, + 193, 193, 193, 193, 1006, 1019, 1020, 1027, 193, 1021, + 1028, 1005, 1029, 1022, 1023, 1030, 1031, 193, 1032, 1033, + 1034, 1035, 193, 1024, 1036, 1025, 1026, 1037, 193, 1038, + 1039, 1040, 1042, 193, 1027, 193, 1151, 1028, 1151, 1029, + + 1151, 1044, 1030, 1031, 1043, 1032, 1033, 1034, 1035, 193, + 1151, 1036, 193, 193, 1037, 193, 1038, 1039, 1040, 1042, + 193, 193, 193, 193, 1045, 193, 193, 193, 1044, 193, + 1151, 1043, 1076, 1047, 1151, 1077, 193, 1046, 1151, 193, + 193, 193, 193, 193, 1078, 193, 193, 193, 193, 1048, + 193, 1045, 193, 193, 193, 1049, 193, 193, 193, 1076, + 1047, 193, 1077, 193, 1046, 1050, 193, 1151, 193, 193, + 193, 1078, 193, 193, 193, 1079, 1048, 193, 193, 193, + 193, 1051, 1049, 193, 193, 193, 193, 1151, 193, 193, + 193, 1052, 1050, 193, 193, 1053, 193, 193, 1151, 193, + + 193, 1151, 1079, 193, 193, 193, 193, 193, 1051, 1054, + 193, 193, 1151, 193, 193, 1080, 193, 193, 1052, 193, + 193, 193, 1053, 193, 193, 193, 193, 193, 1055, 193, + 193, 193, 1151, 193, 193, 1056, 1054, 193, 193, 193, + 193, 193, 1080, 193, 193, 193, 193, 193, 1058, 193, + 193, 1151, 193, 193, 193, 1055, 193, 193, 193, 193, + 193, 193, 1056, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 1060, 1062, 1058, 193, 193, 1057, 193, + 193, 193, 193, 1081, 193, 193, 193, 193, 193, 1059, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 1082, + + 1060, 1062, 193, 1061, 193, 1057, 193, 1063, 193, 193, + 1081, 193, 193, 193, 193, 193, 1059, 1064, 193, 193, + 193, 193, 193, 1065, 193, 193, 1082, 193, 193, 193, + 1061, 193, 1151, 1151, 1063, 193, 1066, 193, 193, 193, + 193, 1151, 193, 1151, 1064, 193, 193, 193, 193, 193, + 1065, 1083, 193, 193, 193, 193, 193, 193, 193, 193, + 1067, 1068, 193, 1066, 193, 193, 193, 1069, 1070, 193, + 193, 193, 193, 193, 193, 193, 193, 1071, 1083, 193, + 193, 193, 193, 193, 193, 193, 193, 1067, 1068, 193, + 193, 193, 193, 193, 1069, 1070, 1151, 193, 193, 1084, + + 193, 193, 193, 193, 1071, 193, 193, 1073, 193, 193, + 1085, 1086, 193, 193, 1087, 1072, 193, 193, 193, 1088, + 193, 1089, 193, 1074, 193, 193, 1084, 193, 193, 193, + 1151, 1151, 193, 193, 1073, 1091, 193, 1085, 1086, 193, + 193, 1087, 1072, 193, 193, 193, 1088, 193, 1089, 193, + 1074, 193, 193, 193, 193, 193, 1092, 1093, 193, 193, + 193, 193, 1091, 193, 1151, 193, 193, 193, 1151, 1094, + 1151, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 1092, 1093, 193, 193, 193, 193, 193, + 1095, 193, 193, 193, 193, 193, 1094, 193, 1151, 193, + + 193, 193, 193, 193, 193, 193, 193, 1096, 193, 193, + 193, 193, 1098, 193, 193, 193, 193, 1095, 193, 1151, + 193, 193, 193, 1097, 193, 193, 193, 1106, 193, 193, + 193, 193, 193, 193, 1096, 193, 193, 193, 193, 1098, + 193, 193, 193, 193, 1107, 193, 1099, 1100, 193, 1104, + 1097, 193, 193, 1151, 1106, 1108, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 1107, 193, 1099, 1100, 1102, 1104, 1101, 193, 193, + 1103, 193, 1108, 1109, 193, 193, 193, 193, 193, 1110, + 193, 193, 193, 193, 193, 1111, 193, 1112, 1151, 193, + + 193, 193, 1102, 1151, 1101, 193, 193, 1103, 193, 193, + 1109, 193, 193, 193, 193, 193, 1110, 193, 1114, 193, + 193, 193, 1111, 193, 1112, 193, 193, 193, 193, 193, + 1115, 1151, 193, 193, 1116, 193, 193, 193, 193, 193, + 1151, 193, 193, 193, 193, 1114, 193, 193, 193, 193, + 193, 1117, 193, 193, 1122, 193, 193, 1115, 193, 1120, + 193, 1116, 193, 193, 193, 193, 193, 193, 193, 1118, + 193, 1123, 1124, 193, 1119, 193, 193, 1126, 1117, 1130, + 193, 1122, 193, 193, 1151, 193, 1120, 193, 193, 193, + 193, 193, 193, 193, 193, 1151, 1118, 193, 1123, 1124, + + 193, 1119, 193, 1127, 1126, 193, 1130, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 1128, 193, 193, + 193, 193, 193, 1151, 193, 193, 1151, 193, 1151, 1151, + 1127, 1132, 193, 193, 193, 193, 193, 1151, 193, 193, + 193, 193, 193, 1151, 1128, 1151, 1151, 1151, 193, 193, + 1151, 1151, 193, 1151, 193, 1151, 1151, 1151, 1132, 1151, + 193, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 193, 193, + 46, 46, 46, 46, 46, 88, 1151, 1151, 88, 88, + 178, 178, 178, 1151, 178, 180, 1151, 180, 180, 180, + 183, 1151, 183, 183, 183, 193, 1151, 193, 193, 193, + + 7, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151 + } ; + +static const flex_int16_t yy_chk[4678] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 9, 9, 10, 10, 15, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 15, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, + 18, 21, 22, 21, 24, 1154, 23, 30, 24, 21, + 1148, 21, 24, 23, 31, 21, 21, 44, 24, 99, + + 23, 24, 22, 23, 1147, 25, 1146, 25, 21, 22, + 21, 24, 25, 23, 30, 24, 21, 25, 21, 24, + 23, 31, 21, 21, 44, 24, 99, 23, 24, 22, + 23, 27, 25, 28, 25, 1145, 32, 27, 1144, 25, + 32, 28, 29, 42, 25, 26, 32, 28, 29, 29, + 29, 42, 1143, 26, 1142, 29, 26, 1141, 27, 26, + 28, 1140, 26, 32, 27, 26, 1139, 32, 28, 29, + 42, 1138, 26, 32, 28, 29, 29, 29, 42, 34, + 26, 33, 29, 26, 36, 33, 26, 43, 43, 26, + 35, 33, 26, 34, 1137, 36, 49, 49, 35, 34, + + 34, 36, 35, 38, 1136, 35, 34, 38, 33, 50, + 50, 36, 33, 38, 43, 43, 1135, 35, 33, 41, + 34, 41, 36, 100, 41, 35, 34, 34, 36, 35, + 38, 39, 35, 39, 38, 103, 39, 71, 55, 104, + 38, 58, 58, 39, 39, 1134, 41, 1133, 41, 55, + 100, 41, 86, 86, 67, 70, 108, 71, 39, 1131, + 39, 67, 103, 39, 71, 70, 104, 67, 111, 101, + 39, 39, 40, 111, 67, 70, 40, 101, 107, 40, + 40, 67, 70, 108, 71, 107, 40, 114, 67, 40, + 181, 181, 70, 1129, 67, 111, 101, 1125, 1121, 40, + + 111, 67, 70, 40, 101, 107, 40, 40, 1113, 1105, + 1090, 1075, 107, 40, 114, 1041, 40, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, 61, 61, + 1007, 61, 61, 61, 61, 61, 61, 77, 68, 84, + 947, 887, 68, 804, 721, 115, 68, 61, 61, 61, + 72, 116, 68, 61, 72, 61, 117, 77, 118, 84, + 72, 61, 68, 61, 77, 68, 84, 61, 61, 68, + 72, 83, 115, 68, 83, 83, 611, 72, 116, 68, + 61, 72, 61, 117, 77, 118, 84, 72, 61, 68, + + 61, 83, 120, 501, 61, 61, 388, 72, 83, 274, + 185, 83, 83, 61, 62, 62, 183, 62, 62, 62, + 62, 62, 62, 90, 88, 85, 73, 76, 83, 120, + 73, 76, 60, 62, 62, 62, 73, 110, 76, 78, + 62, 81, 102, 78, 76, 102, 73, 110, 121, 78, + 81, 76, 81, 73, 76, 81, 122, 73, 76, 78, + 62, 81, 59, 73, 110, 76, 78, 62, 81, 102, + 78, 76, 102, 73, 110, 121, 78, 81, 76, 81, + 52, 123, 81, 122, 105, 105, 78, 62, 81, 62, + 63, 124, 82, 125, 63, 126, 82, 63, 105, 127, + + 82, 109, 109, 109, 63, 109, 51, 63, 123, 113, + 113, 105, 105, 129, 63, 47, 82, 63, 124, 82, + 125, 63, 126, 82, 63, 105, 127, 82, 109, 109, + 109, 63, 109, 112, 63, 112, 113, 113, 112, 45, + 129, 63, 64, 82, 112, 20, 64, 130, 132, 128, + 64, 112, 128, 133, 135, 119, 64, 119, 136, 64, + 112, 119, 112, 19, 137, 112, 64, 11, 119, 64, + 138, 112, 119, 64, 130, 132, 128, 64, 112, 128, + 133, 135, 119, 64, 119, 136, 64, 7, 119, 141, + 134, 137, 142, 64, 65, 119, 139, 138, 139, 119, + + 134, 65, 143, 65, 144, 134, 134, 140, 65, 140, + 145, 146, 147, 65, 65, 4, 141, 134, 148, 142, + 140, 65, 150, 139, 151, 139, 3, 134, 65, 143, + 65, 144, 134, 134, 140, 65, 140, 145, 146, 147, + 65, 65, 66, 152, 153, 148, 66, 140, 154, 150, + 66, 151, 154, 66, 156, 157, 66, 158, 0, 66, + 160, 0, 66, 0, 161, 162, 66, 0, 0, 66, + 152, 153, 155, 66, 0, 154, 0, 66, 0, 154, + 66, 156, 157, 66, 158, 155, 66, 160, 159, 66, + 155, 161, 162, 66, 69, 69, 163, 159, 164, 155, + + 165, 69, 69, 69, 166, 159, 167, 169, 69, 164, + 169, 0, 155, 170, 69, 159, 171, 155, 168, 0, + 172, 69, 69, 163, 159, 164, 172, 165, 69, 69, + 69, 166, 159, 167, 169, 69, 164, 169, 168, 0, + 170, 69, 74, 171, 173, 168, 74, 172, 174, 175, + 176, 277, 193, 172, 0, 0, 74, 173, 0, 279, + 194, 194, 74, 74, 280, 168, 74, 0, 0, 74, + 0, 173, 193, 74, 282, 174, 175, 176, 277, 193, + 0, 194, 195, 74, 173, 196, 279, 194, 194, 74, + 74, 280, 196, 74, 75, 75, 199, 195, 199, 193, + + 196, 282, 195, 75, 0, 196, 0, 75, 194, 195, + 75, 0, 196, 198, 75, 0, 284, 0, 199, 196, + 0, 75, 75, 199, 195, 199, 198, 196, 0, 195, + 75, 201, 196, 198, 75, 197, 0, 75, 197, 197, + 198, 75, 79, 284, 79, 199, 285, 79, 200, 200, + 200, 201, 286, 198, 79, 79, 0, 0, 201, 197, + 198, 0, 197, 200, 79, 197, 197, 0, 200, 79, + 287, 79, 0, 285, 79, 200, 200, 200, 201, 286, + 0, 79, 79, 205, 203, 218, 197, 202, 203, 0, + 200, 79, 80, 205, 202, 200, 80, 287, 218, 80, + + 80, 202, 289, 205, 290, 218, 80, 202, 203, 80, + 205, 203, 218, 291, 202, 203, 80, 0, 0, 80, + 205, 202, 0, 80, 0, 218, 80, 80, 202, 289, + 205, 290, 218, 80, 202, 203, 80, 0, 0, 0, + 291, 0, 0, 80, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 93, 93, 93, 93, 93, 93, + 93, 93, 93, 93, 93, 186, 186, 186, 186, 186, + 186, 186, 186, 186, 186, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 188, 188, 188, 188, 188, + + 188, 188, 188, 188, 188, 188, 204, 206, 292, 210, + 0, 208, 293, 204, 204, 204, 0, 204, 0, 210, + 0, 0, 206, 211, 208, 208, 204, 206, 0, 210, + 0, 208, 0, 204, 206, 292, 210, 211, 208, 293, + 204, 204, 204, 211, 204, 209, 210, 212, 212, 206, + 211, 208, 208, 204, 206, 207, 210, 207, 208, 207, + 207, 209, 0, 226, 211, 209, 207, 213, 212, 213, + 211, 215, 209, 207, 212, 212, 294, 0, 215, 207, + 295, 0, 207, 226, 207, 296, 207, 207, 209, 213, + 226, 215, 209, 207, 213, 212, 213, 0, 215, 298, + + 207, 216, 0, 294, 217, 215, 207, 295, 216, 225, + 226, 299, 296, 220, 217, 0, 213, 214, 215, 214, + 220, 216, 219, 214, 217, 225, 298, 0, 216, 225, + 214, 217, 219, 220, 214, 216, 225, 0, 299, 214, + 220, 217, 219, 221, 214, 222, 214, 220, 216, 219, + 214, 217, 225, 221, 223, 222, 225, 214, 224, 219, + 220, 214, 300, 221, 228, 222, 214, 224, 223, 219, + 221, 223, 222, 227, 223, 228, 0, 227, 224, 230, + 221, 223, 222, 231, 228, 224, 302, 231, 230, 300, + 221, 228, 222, 227, 224, 223, 232, 0, 223, 230, + + 227, 223, 228, 231, 227, 224, 230, 233, 233, 0, + 231, 228, 303, 302, 231, 230, 232, 0, 304, 305, + 227, 229, 229, 232, 237, 0, 230, 233, 0, 0, + 231, 229, 234, 237, 233, 233, 229, 229, 234, 303, + 234, 301, 229, 232, 237, 304, 305, 0, 229, 229, + 0, 237, 234, 235, 233, 235, 301, 235, 229, 234, + 237, 236, 306, 229, 229, 234, 235, 234, 301, 229, + 307, 237, 239, 0, 236, 240, 238, 235, 0, 234, + 235, 236, 235, 301, 235, 238, 309, 239, 236, 306, + 240, 241, 239, 235, 310, 240, 238, 307, 241, 239, + + 244, 236, 240, 238, 235, 242, 243, 243, 236, 242, + 0, 241, 238, 309, 239, 260, 0, 240, 241, 239, + 244, 310, 240, 238, 0, 241, 243, 244, 246, 242, + 245, 245, 242, 243, 243, 260, 242, 248, 241, 247, + 249, 248, 260, 246, 249, 0, 311, 244, 246, 0, + 312, 245, 247, 243, 0, 246, 242, 245, 245, 247, + 249, 248, 260, 0, 248, 313, 247, 249, 248, 0, + 246, 249, 250, 311, 252, 246, 250, 312, 245, 247, + 251, 252, 251, 314, 0, 250, 247, 249, 248, 0, + 250, 315, 313, 269, 252, 253, 250, 0, 253, 250, + + 251, 252, 254, 250, 254, 316, 255, 251, 252, 251, + 314, 254, 250, 269, 0, 253, 255, 250, 315, 254, + 269, 252, 253, 250, 254, 253, 255, 251, 256, 254, + 257, 254, 316, 255, 257, 317, 258, 0, 254, 258, + 269, 256, 253, 255, 261, 262, 254, 0, 256, 318, + 259, 254, 261, 255, 257, 256, 262, 257, 259, 258, + 0, 257, 317, 258, 261, 262, 258, 0, 256, 259, + 259, 261, 262, 0, 263, 256, 318, 259, 263, 261, + 264, 257, 0, 262, 264, 259, 258, 264, 265, 265, + 0, 261, 262, 268, 263, 0, 259, 259, 263, 266, + + 264, 263, 0, 266, 319, 263, 268, 264, 0, 265, + 0, 264, 320, 268, 264, 265, 265, 270, 0, 266, + 268, 263, 267, 321, 271, 263, 266, 264, 271, 267, + 266, 319, 270, 268, 322, 267, 265, 270, 323, 320, + 268, 324, 267, 288, 270, 288, 266, 325, 271, 267, + 321, 271, 0, 0, 0, 271, 267, 0, 0, 270, + 288, 322, 267, 326, 270, 323, 327, 328, 324, 267, + 288, 329, 288, 330, 325, 271, 275, 275, 275, 275, + 275, 275, 275, 275, 275, 275, 331, 288, 333, 332, + 326, 334, 336, 327, 328, 337, 338, 339, 329, 332, + + 330, 340, 341, 342, 343, 344, 345, 347, 348, 349, + 350, 351, 352, 331, 353, 333, 332, 354, 334, 336, + 355, 356, 337, 338, 339, 357, 332, 358, 340, 341, + 342, 343, 344, 345, 347, 348, 349, 350, 351, 352, + 359, 353, 360, 361, 354, 362, 363, 355, 356, 365, + 366, 367, 357, 368, 358, 369, 370, 371, 372, 374, + 377, 376, 375, 376, 378, 379, 380, 359, 382, 360, + 361, 375, 362, 363, 381, 383, 365, 366, 367, 385, + 368, 386, 369, 370, 371, 372, 374, 377, 376, 375, + 376, 378, 379, 380, 0, 382, 381, 0, 375, 384, + + 390, 381, 383, 384, 391, 392, 385, 0, 386, 389, + 389, 389, 389, 389, 389, 389, 389, 389, 389, 393, + 390, 394, 395, 381, 391, 392, 384, 390, 394, 396, + 384, 391, 392, 396, 397, 0, 0, 502, 0, 393, + 0, 394, 395, 503, 0, 400, 393, 390, 394, 395, + 0, 391, 392, 396, 397, 394, 396, 398, 399, 504, + 396, 397, 399, 400, 502, 400, 393, 398, 394, 395, + 503, 402, 400, 402, 0, 401, 0, 398, 399, 405, + 396, 397, 401, 403, 398, 399, 504, 405, 402, 399, + 400, 404, 400, 402, 398, 401, 403, 406, 402, 405, + + 402, 407, 401, 403, 398, 399, 405, 404, 0, 401, + 403, 404, 406, 409, 405, 402, 410, 406, 404, 0, + 402, 407, 401, 403, 406, 408, 405, 409, 407, 408, + 403, 411, 0, 409, 404, 412, 410, 413, 404, 406, + 409, 413, 412, 410, 406, 505, 414, 0, 407, 408, + 414, 411, 408, 0, 409, 412, 408, 413, 411, 415, + 409, 417, 412, 410, 413, 416, 0, 416, 413, 412, + 414, 421, 505, 414, 415, 418, 408, 414, 411, 415, + 419, 417, 412, 419, 413, 420, 415, 416, 417, 422, + 418, 421, 416, 424, 416, 418, 420, 414, 421, 506, + + 423, 415, 418, 419, 423, 420, 415, 419, 417, 422, + 419, 0, 420, 424, 416, 426, 422, 418, 421, 425, + 424, 425, 418, 420, 423, 428, 506, 423, 507, 426, + 419, 423, 420, 429, 430, 426, 422, 427, 428, 431, + 424, 425, 426, 431, 427, 428, 425, 429, 425, 508, + 0, 423, 428, 429, 430, 507, 426, 427, 0, 432, + 429, 430, 426, 431, 427, 428, 431, 432, 425, 433, + 431, 427, 428, 0, 429, 434, 508, 433, 439, 432, + 429, 430, 434, 436, 427, 435, 432, 438, 435, 433, + 431, 438, 0, 439, 432, 434, 433, 437, 439, 436, + + 437, 442, 434, 436, 433, 439, 432, 438, 435, 434, + 436, 442, 435, 443, 438, 435, 433, 437, 438, 440, + 439, 442, 434, 441, 437, 439, 436, 437, 442, 441, + 436, 444, 440, 443, 438, 435, 0, 445, 442, 440, + 443, 510, 446, 441, 437, 447, 440, 0, 442, 0, + 441, 444, 446, 449, 448, 0, 441, 445, 444, 440, + 443, 447, 446, 448, 445, 447, 440, 450, 510, 446, + 441, 451, 447, 449, 448, 453, 453, 513, 444, 446, + 449, 448, 450, 0, 445, 514, 0, 450, 447, 446, + 448, 451, 447, 452, 450, 454, 453, 452, 451, 454, + + 449, 448, 453, 453, 513, 455, 515, 455, 456, 450, + 456, 457, 514, 452, 450, 0, 516, 0, 451, 454, + 452, 458, 454, 453, 452, 455, 454, 457, 456, 459, + 460, 457, 455, 515, 455, 456, 458, 456, 457, 463, + 452, 458, 464, 516, 461, 459, 454, 462, 458, 459, + 460, 461, 455, 463, 457, 456, 459, 460, 457, 463, + 462, 465, 464, 458, 461, 0, 463, 462, 458, 464, + 0, 461, 459, 467, 462, 466, 459, 460, 461, 466, + 463, 465, 467, 0, 468, 470, 463, 462, 465, 464, + 469, 461, 470, 467, 462, 468, 0, 471, 469, 466, + + 467, 471, 466, 472, 468, 470, 466, 474, 465, 467, + 469, 468, 470, 473, 474, 475, 473, 469, 472, 470, + 467, 471, 468, 472, 471, 469, 466, 474, 471, 476, + 472, 468, 470, 473, 474, 475, 0, 469, 477, 476, + 473, 474, 475, 473, 478, 472, 0, 0, 471, 476, + 472, 0, 479, 480, 474, 0, 476, 0, 477, 0, + 473, 486, 475, 481, 478, 477, 476, 482, 480, 484, + 479, 478, 479, 480, 482, 0, 476, 518, 481, 479, + 480, 486, 483, 481, 484, 477, 487, 482, 486, 484, + 481, 478, 519, 483, 482, 480, 484, 479, 485, 479, + + 480, 482, 483, 488, 518, 481, 487, 485, 486, 483, + 481, 484, 488, 487, 482, 489, 484, 491, 485, 519, + 483, 520, 0, 488, 489, 485, 490, 491, 492, 483, + 488, 0, 492, 487, 485, 489, 490, 491, 490, 488, + 493, 494, 489, 521, 491, 485, 490, 0, 520, 493, + 488, 489, 492, 490, 491, 492, 495, 494, 495, 492, + 493, 494, 489, 490, 491, 490, 497, 493, 494, 522, + 521, 496, 0, 490, 499, 0, 493, 499, 495, 492, + 523, 497, 500, 495, 494, 495, 497, 493, 494, 496, + 498, 496, 524, 497, 499, 500, 522, 525, 496, 498, + + 526, 499, 500, 498, 499, 495, 527, 523, 497, 500, + 498, 528, 529, 497, 532, 533, 496, 498, 496, 524, + 534, 499, 500, 535, 525, 536, 498, 526, 537, 500, + 498, 538, 540, 527, 541, 544, 545, 498, 528, 529, + 547, 532, 533, 550, 551, 552, 553, 534, 554, 555, + 535, 557, 536, 561, 563, 537, 565, 567, 538, 540, + 555, 541, 544, 545, 566, 566, 568, 547, 570, 571, + 550, 551, 552, 553, 572, 554, 555, 573, 557, 574, + 561, 563, 576, 565, 567, 577, 579, 555, 580, 581, + 582, 566, 566, 568, 583, 570, 571, 584, 585, 587, + + 588, 572, 589, 590, 573, 593, 574, 594, 596, 576, + 597, 598, 577, 579, 599, 580, 581, 582, 600, 601, + 602, 583, 603, 604, 584, 585, 587, 588, 606, 589, + 590, 608, 593, 0, 594, 596, 614, 597, 598, 612, + 613, 599, 615, 0, 616, 600, 601, 602, 618, 603, + 604, 0, 612, 613, 0, 606, 614, 616, 608, 612, + 613, 617, 615, 614, 616, 619, 612, 613, 618, 615, + 617, 616, 620, 621, 622, 618, 620, 0, 623, 612, + 613, 617, 623, 614, 616, 619, 612, 613, 617, 615, + 624, 616, 619, 621, 622, 618, 620, 617, 624, 620, + + 621, 622, 623, 620, 627, 623, 626, 625, 617, 623, + 624, 625, 619, 724, 0, 628, 0, 624, 726, 626, + 621, 622, 0, 620, 627, 624, 626, 625, 630, 623, + 628, 627, 631, 626, 625, 628, 629, 624, 625, 631, + 724, 632, 628, 630, 633, 726, 626, 728, 630, 632, + 629, 627, 631, 626, 625, 630, 629, 628, 634, 631, + 633, 632, 628, 629, 633, 635, 631, 0, 632, 635, + 630, 633, 0, 634, 728, 630, 632, 629, 634, 631, + 637, 636, 637, 629, 640, 634, 638, 633, 632, 635, + 638, 633, 635, 0, 636, 641, 635, 0, 0, 648, + + 634, 636, 637, 639, 640, 634, 638, 637, 636, 637, + 639, 640, 645, 638, 642, 641, 635, 638, 0, 648, + 644, 636, 641, 639, 643, 642, 648, 645, 636, 637, + 639, 640, 645, 638, 642, 643, 644, 639, 649, 645, + 644, 642, 641, 0, 643, 646, 648, 644, 0, 646, + 639, 643, 642, 647, 645, 650, 0, 647, 649, 645, + 0, 642, 643, 644, 651, 649, 652, 644, 651, 646, + 650, 643, 646, 0, 653, 650, 646, 647, 655, 654, + 647, 0, 650, 654, 647, 649, 652, 656, 651, 655, + 729, 651, 0, 652, 653, 651, 646, 650, 655, 657, + + 658, 653, 650, 654, 647, 655, 654, 656, 657, 659, + 654, 660, 730, 652, 656, 651, 655, 729, 0, 657, + 658, 653, 662, 666, 661, 655, 657, 658, 0, 659, + 654, 660, 663, 0, 656, 657, 659, 661, 660, 730, + 664, 662, 662, 666, 661, 663, 657, 658, 0, 662, + 666, 661, 663, 664, 0, 667, 659, 668, 660, 663, + 664, 665, 667, 665, 661, 669, 670, 664, 662, 662, + 666, 661, 663, 0, 665, 667, 671, 668, 672, 663, + 664, 665, 667, 731, 668, 669, 670, 664, 665, 667, + 665, 671, 669, 670, 674, 675, 671, 677, 672, 673, + + 677, 665, 667, 671, 668, 672, 673, 732, 665, 0, + 731, 733, 669, 670, 674, 675, 676, 677, 671, 673, + 679, 674, 675, 671, 677, 672, 673, 677, 734, 681, + 676, 676, 678, 673, 732, 0, 676, 0, 733, 0, + 679, 674, 675, 676, 677, 678, 673, 679, 680, 681, + 680, 682, 678, 683, 684, 734, 681, 676, 676, 678, + 0, 0, 684, 676, 682, 685, 683, 679, 688, 0, + 680, 682, 678, 683, 684, 680, 681, 680, 682, 678, + 683, 684, 686, 687, 736, 685, 686, 687, 688, 684, + 0, 682, 685, 683, 737, 688, 689, 680, 682, 694, + + 683, 684, 691, 0, 689, 690, 686, 687, 694, 686, + 687, 736, 685, 686, 687, 688, 689, 691, 690, 694, + 0, 737, 691, 689, 692, 690, 694, 692, 693, 691, + 696, 689, 690, 686, 687, 694, 693, 695, 697, 695, + 738, 699, 739, 689, 691, 690, 694, 692, 693, 691, + 696, 692, 690, 701, 692, 693, 698, 696, 697, 695, + 698, 699, 700, 693, 695, 697, 695, 738, 699, 739, + 702, 0, 700, 701, 692, 693, 698, 696, 703, 0, + 701, 704, 700, 698, 705, 697, 695, 698, 699, 700, + 702, 706, 703, 706, 708, 704, 740, 702, 703, 700, + + 701, 704, 0, 698, 705, 703, 707, 712, 704, 700, + 708, 705, 709, 706, 708, 707, 709, 702, 706, 703, + 706, 708, 704, 740, 0, 703, 707, 712, 704, 710, + 711, 705, 711, 707, 712, 713, 709, 708, 713, 709, + 706, 708, 707, 709, 710, 0, 715, 714, 716, 710, + 711, 714, 717, 707, 712, 713, 710, 711, 742, 711, + 718, 719, 713, 709, 716, 713, 715, 714, 716, 720, + 743, 710, 717, 715, 714, 716, 710, 711, 714, 717, + 718, 719, 713, 744, 745, 742, 746, 718, 719, 720, + 747, 716, 748, 715, 714, 716, 720, 743, 749, 717, + + 750, 751, 754, 755, 757, 759, 762, 718, 719, 763, + 744, 745, 764, 746, 765, 770, 720, 747, 772, 748, + 773, 774, 777, 778, 779, 749, 780, 750, 751, 754, + 755, 757, 759, 762, 781, 783, 763, 784, 785, 764, + 786, 765, 770, 787, 788, 772, 789, 773, 774, 777, + 778, 779, 790, 780, 791, 792, 793, 795, 796, 797, + 799, 781, 783, 800, 784, 785, 801, 786, 802, 805, + 787, 788, 806, 789, 808, 0, 0, 807, 888, 790, + 809, 791, 792, 793, 795, 796, 797, 799, 810, 805, + 800, 811, 806, 801, 808, 802, 805, 807, 807, 806, + + 809, 808, 812, 812, 807, 888, 0, 809, 810, 890, + 813, 811, 813, 814, 0, 810, 805, 0, 811, 806, + 0, 808, 814, 812, 807, 807, 815, 809, 817, 812, + 812, 818, 813, 814, 816, 810, 890, 813, 811, 813, + 814, 815, 820, 819, 816, 0, 815, 819, 817, 814, + 812, 818, 820, 815, 816, 817, 891, 822, 818, 813, + 814, 816, 820, 819, 822, 823, 824, 0, 815, 820, + 819, 816, 821, 815, 819, 817, 821, 822, 818, 820, + 826, 816, 828, 891, 822, 823, 824, 0, 827, 820, + 819, 822, 823, 824, 825, 826, 821, 827, 825, 821, + + 826, 0, 828, 821, 822, 0, 829, 826, 827, 828, + 0, 0, 823, 824, 825, 827, 830, 831, 835, 0, + 832, 825, 826, 821, 827, 825, 829, 826, 834, 828, + 834, 830, 831, 829, 832, 827, 830, 831, 835, 0, + 832, 825, 833, 830, 831, 835, 833, 832, 836, 0, + 834, 837, 0, 829, 839, 834, 841, 834, 830, 831, + 892, 832, 833, 830, 831, 835, 837, 832, 836, 833, + 842, 837, 838, 833, 839, 836, 841, 834, 837, 838, + 840, 839, 840, 841, 843, 842, 0, 892, 844, 833, + 842, 0, 838, 837, 846, 836, 847, 842, 837, 838, + + 840, 839, 0, 841, 843, 845, 838, 840, 844, 840, + 847, 843, 842, 849, 846, 844, 847, 842, 850, 838, + 845, 846, 848, 847, 851, 845, 852, 840, 853, 848, + 854, 843, 845, 849, 893, 844, 0, 847, 850, 895, + 849, 846, 848, 847, 851, 850, 852, 845, 853, 848, + 854, 851, 845, 852, 855, 853, 848, 854, 855, 856, + 849, 893, 856, 858, 859, 850, 895, 857, 860, 848, + 0, 851, 0, 852, 0, 853, 863, 854, 855, 856, + 861, 855, 857, 858, 859, 855, 856, 857, 860, 856, + 858, 859, 0, 861, 857, 860, 863, 864, 865, 862, + + 861, 864, 0, 863, 0, 855, 856, 861, 897, 857, + 858, 859, 862, 898, 857, 860, 869, 864, 865, 862, + 861, 868, 868, 863, 864, 865, 862, 861, 864, 866, + 867, 869, 0, 866, 867, 897, 869, 0, 899, 862, + 898, 0, 868, 869, 864, 865, 862, 874, 868, 868, + 870, 870, 0, 866, 867, 871, 866, 867, 869, 871, + 866, 867, 874, 869, 875, 899, 0, 874, 875, 868, + 872, 870, 873, 877, 874, 0, 878, 870, 870, 871, + 866, 867, 871, 876, 872, 873, 871, 876, 875, 874, + 872, 875, 873, 877, 874, 875, 878, 872, 870, 873, + + 877, 879, 879, 878, 880, 881, 871, 876, 0, 0, + 876, 872, 873, 882, 876, 875, 886, 872, 900, 873, + 877, 902, 879, 878, 880, 881, 883, 882, 879, 879, + 883, 880, 881, 882, 876, 884, 886, 885, 904, 908, + 882, 885, 910, 886, 884, 900, 911, 917, 902, 879, + 883, 880, 881, 883, 882, 884, 918, 883, 921, 922, + 882, 885, 884, 886, 885, 904, 908, 924, 885, 910, + 925, 884, 926, 911, 917, 928, 929, 883, 930, 934, + 936, 937, 884, 918, 938, 921, 922, 939, 885, 944, + 945, 946, 948, 949, 924, 950, 0, 925, 0, 926, + + 0, 951, 928, 929, 950, 930, 934, 936, 937, 952, + 0, 938, 948, 949, 939, 950, 944, 945, 946, 948, + 949, 951, 950, 953, 952, 954, 955, 956, 951, 952, + 0, 950, 1011, 955, 0, 1014, 952, 953, 0, 948, + 949, 957, 950, 953, 1015, 954, 955, 956, 951, 957, + 953, 952, 954, 955, 956, 958, 952, 958, 959, 1011, + 955, 957, 1014, 961, 953, 959, 960, 0, 957, 963, + 953, 1015, 954, 955, 956, 1018, 957, 958, 959, 965, + 966, 960, 958, 961, 958, 959, 960, 0, 957, 963, + 961, 962, 959, 960, 962, 964, 963, 964, 0, 965, + + 966, 0, 1018, 967, 958, 959, 965, 966, 960, 968, + 961, 969, 0, 960, 962, 1019, 963, 964, 962, 970, + 971, 962, 964, 967, 964, 972, 965, 966, 970, 968, + 967, 969, 0, 973, 974, 971, 968, 975, 969, 970, + 971, 962, 1019, 976, 964, 972, 970, 971, 978, 979, + 967, 0, 972, 973, 974, 970, 968, 975, 969, 980, + 973, 974, 971, 976, 975, 977, 970, 971, 978, 979, + 976, 983, 972, 982, 985, 978, 979, 982, 977, 980, + 973, 974, 981, 1024, 975, 977, 980, 986, 984, 981, + 976, 983, 977, 987, 985, 978, 979, 982, 983, 1026, + + 982, 985, 981, 984, 982, 977, 980, 986, 984, 981, + 1024, 991, 977, 987, 986, 984, 981, 988, 983, 988, + 987, 985, 990, 989, 982, 989, 1026, 992, 993, 981, + 984, 991, 0, 0, 986, 984, 990, 995, 991, 988, + 987, 0, 990, 0, 988, 989, 988, 992, 993, 990, + 989, 1027, 989, 994, 992, 993, 1000, 995, 991, 1001, + 994, 996, 999, 990, 995, 996, 988, 997, 998, 990, + 998, 997, 989, 994, 992, 993, 1000, 999, 1027, 1001, + 994, 1002, 999, 1000, 995, 996, 1001, 994, 996, 999, + 998, 997, 996, 1003, 997, 998, 0, 998, 997, 1030, + + 994, 1002, 1004, 1000, 999, 1005, 1001, 1005, 1002, 999, + 1031, 1034, 996, 1003, 1035, 1004, 1006, 998, 997, 1036, + 1003, 1037, 1004, 1006, 1042, 1005, 1030, 1043, 1002, 1004, + 0, 0, 1005, 1044, 1005, 1045, 1006, 1031, 1034, 1046, + 1003, 1035, 1004, 1006, 1042, 1047, 1036, 1043, 1037, 1004, + 1006, 1042, 1005, 1044, 1043, 1045, 1048, 1049, 1050, 1046, + 1044, 1049, 1045, 1006, 0, 1047, 1046, 1051, 0, 1052, + 0, 1042, 1047, 1054, 1043, 1053, 1048, 1055, 1050, 1056, + 1044, 1049, 1045, 1048, 1049, 1050, 1046, 1051, 1049, 1052, + 1053, 1057, 1047, 1054, 1051, 1053, 1052, 1055, 0, 1056, + + 1054, 1059, 1053, 1048, 1055, 1050, 1056, 1058, 1049, 1058, + 1060, 1057, 1061, 1062, 1051, 1063, 1052, 1053, 1057, 0, + 1054, 1059, 1053, 1060, 1055, 1066, 1056, 1076, 1059, 1058, + 1060, 1064, 1061, 1062, 1058, 1063, 1058, 1060, 1057, 1061, + 1062, 1065, 1063, 1067, 1078, 1066, 1064, 1065, 1059, 1071, + 1060, 1064, 1066, 0, 1076, 1081, 1058, 1060, 1064, 1061, + 1062, 1065, 1063, 1067, 1068, 1070, 1072, 1069, 1065, 1071, + 1067, 1078, 1066, 1064, 1065, 1069, 1071, 1068, 1064, 1073, + 1070, 1074, 1081, 1083, 1068, 1070, 1072, 1069, 1065, 1086, + 1067, 1068, 1070, 1072, 1069, 1087, 1071, 1088, 0, 1073, + + 1092, 1074, 1069, 0, 1068, 1091, 1073, 1070, 1074, 1094, + 1083, 1068, 1070, 1072, 1069, 1093, 1086, 1095, 1091, 1096, + 1092, 1097, 1087, 1099, 1088, 1091, 1073, 1092, 1074, 1094, + 1093, 0, 1091, 1100, 1096, 1093, 1094, 1095, 1098, 1096, + 0, 1097, 1093, 1099, 1095, 1091, 1096, 1092, 1097, 1101, + 1099, 1098, 1091, 1100, 1107, 1103, 1094, 1093, 1098, 1103, + 1100, 1096, 1093, 1102, 1095, 1098, 1096, 1104, 1097, 1101, + 1099, 1109, 1112, 1114, 1102, 1103, 1101, 1115, 1098, 1124, + 1100, 1107, 1103, 1102, 0, 1098, 1103, 1104, 1116, 1117, + 1102, 1118, 1119, 1114, 1104, 0, 1101, 1115, 1109, 1112, + + 1114, 1102, 1103, 1117, 1115, 1126, 1124, 1120, 1116, 1117, + 1102, 1118, 1119, 1127, 1104, 1116, 1117, 1120, 1118, 1119, + 1114, 1132, 1128, 0, 1115, 1126, 0, 1120, 0, 0, + 1117, 1128, 1126, 1127, 1120, 1116, 1117, 0, 1118, 1119, + 1127, 1132, 1128, 0, 1120, 0, 0, 0, 1132, 1128, + 0, 0, 1126, 0, 1120, 0, 0, 0, 1128, 0, + 1127, 0, 0, 0, 0, 0, 0, 0, 1132, 1128, + 1152, 1152, 1152, 1152, 1152, 1153, 0, 0, 1153, 1153, + 1155, 1155, 1155, 0, 1155, 1156, 0, 1156, 1156, 1156, + 1157, 0, 1157, 1157, 1157, 1158, 0, 1158, 1158, 1158, + + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151 + } ; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +#line 1 "flex_lexer.l" +/** + * lexer + * + * + */ +/*************************** + ** Section 1: Definitions + ***************************/ +#line 12 "flex_lexer.l" + +#include "../sql/Expr.h" +#include "bison_parser.h" +#include +#include +#include + +#define TOKEN(name) { return SQL_##name; } + +static thread_local std::stringstream strbuf; + +#line 2086 "flex_lexer.cpp" + +/*************************** + ** Section 2: Rules + ***************************/ +/* Define the output files */ +/* Make reentrant */ +/* performance tweeks */ +/* other flags */ +/* %option nodefault */ + +/*************************** + ** Section 3: Rules + ***************************/ +#line 2100 "flex_lexer.cpp" + +#define INITIAL 0 +#define singlequotedstring 1 +#define COMMENT 2 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +/* Holds the entire state of the reentrant scanner. */ +struct yyguts_t + { + + /* User-defined. Not touched by flex. */ + YY_EXTRA_TYPE yyextra_r; + + /* The rest are the same as the globals declared in the non-reentrant scanner. */ + FILE *yyin_r, *yyout_r; + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; + int yy_n_chars; + int yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; + int yy_did_buffer_switch_on_eof; + int yy_start_stack_ptr; + int yy_start_stack_depth; + int *yy_start_stack; + yy_state_type yy_last_accepting_state; + char* yy_last_accepting_cpos; + + int yylineno_r; + int yy_flex_debug_r; + + char *yytext_r; + int yy_more_flag; + int yy_more_len; + + YYSTYPE * yylval_r; + + YYLTYPE * yylloc_r; + + }; /* end struct yyguts_t */ + +static int yy_init_globals ( yyscan_t yyscanner ); + + /* This must go here because YYSTYPE and YYLTYPE are included + * from bison output in section 1.*/ + # define yylval yyg->yylval_r + + # define yylloc yyg->yylloc_r + +int yylex_init (yyscan_t* scanner); + +int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int yylex_destroy ( yyscan_t yyscanner ); + +int yyget_debug ( yyscan_t yyscanner ); + +void yyset_debug ( int debug_flag , yyscan_t yyscanner ); + +YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); + +void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); + +FILE *yyget_in ( yyscan_t yyscanner ); + +void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); + +FILE *yyget_out ( yyscan_t yyscanner ); + +void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); + + int yyget_leng ( yyscan_t yyscanner ); + +char *yyget_text ( yyscan_t yyscanner ); + +int yyget_lineno ( yyscan_t yyscanner ); + +void yyset_lineno ( int _line_number , yyscan_t yyscanner ); + +int yyget_column ( yyscan_t yyscanner ); + +void yyset_column ( int _column_no , yyscan_t yyscanner ); + +YYSTYPE * yyget_lval ( yyscan_t yyscanner ); + +void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); + + YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); + + void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int yywrap ( yyscan_t yyscanner ); +#else +extern int yywrap ( yyscan_t yyscanner ); +#endif +#endif + +#ifndef YY_NO_UNPUT + +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen ( const char * , yyscan_t yyscanner); +#endif + +#ifndef YY_NO_INPUT +#ifdef __cplusplus +static int yyinput ( yyscan_t yyscanner ); +#else +static int input ( yyscan_t yyscanner ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else +#define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + int n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); + +#define YY_DECL int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK /*LINTED*/break; +#endif + +#define YY_RULE_SETUP \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + yylval = yylval_param; + + yylloc = yylloc_param; + + if ( !yyg->yy_init ) + { + yyg->yy_init = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! yyg->yy_start ) + yyg->yy_start = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); + } + + yy_load_buffer_state( yyscanner ); + } + + { +#line 57 "flex_lexer.l" + + +#line 2387 "flex_lexer.cpp" + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yyg->yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yyg->yy_start; +yy_match: + do + { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 1152 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + ++yy_cp; + } + while ( yy_current_state != 1151 ); + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yyg->yy_hold_char; + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + +case 1: +YY_RULE_SETUP +#line 59 "flex_lexer.l" +BEGIN(COMMENT); + YY_BREAK +case 2: +YY_RULE_SETUP +#line 60 "flex_lexer.l" +/* skipping comment content until a end of line is read */; + YY_BREAK +case 3: +/* rule 3 can match eol */ +YY_RULE_SETUP +#line 61 "flex_lexer.l" +BEGIN(INITIAL); + YY_BREAK +case 4: +/* rule 4 can match eol */ +YY_RULE_SETUP +#line 63 "flex_lexer.l" +/* skip whitespace */; + YY_BREAK +case 5: +YY_RULE_SETUP +#line 65 "flex_lexer.l" +TOKEN(DEALLOCATE) + YY_BREAK +case 6: +YY_RULE_SETUP +#line 66 "flex_lexer.l" +TOKEN(PARAMETERS) + YY_BREAK +case 7: +YY_RULE_SETUP +#line 67 "flex_lexer.l" +TOKEN(INTERSECT) + YY_BREAK +case 8: +YY_RULE_SETUP +#line 68 "flex_lexer.l" +TOKEN(TEMPORARY) + YY_BREAK +case 9: +YY_RULE_SETUP +#line 69 "flex_lexer.l" +TOKEN(TIMESTAMP) + YY_BREAK +case 10: +YY_RULE_SETUP +#line 70 "flex_lexer.l" +TOKEN(DESCRIBE) + YY_BREAK +case 11: +YY_RULE_SETUP +#line 71 "flex_lexer.l" +TOKEN(DISTINCT) + YY_BREAK +case 12: +YY_RULE_SETUP +#line 72 "flex_lexer.l" +TOKEN(NVARCHAR) + YY_BREAK +case 13: +YY_RULE_SETUP +#line 73 "flex_lexer.l" +TOKEN(RESTRICT) + YY_BREAK +case 14: +YY_RULE_SETUP +#line 74 "flex_lexer.l" +TOKEN(TRUNCATE) + YY_BREAK +case 15: +YY_RULE_SETUP +#line 75 "flex_lexer.l" +TOKEN(ANALYZE) + YY_BREAK +case 16: +YY_RULE_SETUP +#line 76 "flex_lexer.l" +TOKEN(BETWEEN) + YY_BREAK +case 17: +YY_RULE_SETUP +#line 77 "flex_lexer.l" +TOKEN(CASCADE) + YY_BREAK +case 18: +YY_RULE_SETUP +#line 78 "flex_lexer.l" +TOKEN(COLUMNS) + YY_BREAK +case 19: +YY_RULE_SETUP +#line 79 "flex_lexer.l" +TOKEN(CONTROL) + YY_BREAK +case 20: +YY_RULE_SETUP +#line 80 "flex_lexer.l" +TOKEN(DEFAULT) + YY_BREAK +case 21: +YY_RULE_SETUP +#line 81 "flex_lexer.l" +TOKEN(EXECUTE) + YY_BREAK +case 22: +YY_RULE_SETUP +#line 82 "flex_lexer.l" +TOKEN(EXPLAIN) + YY_BREAK +case 23: +YY_RULE_SETUP +#line 83 "flex_lexer.l" +TOKEN(INTEGER) + YY_BREAK +case 24: +YY_RULE_SETUP +#line 84 "flex_lexer.l" +TOKEN(NATURAL) + YY_BREAK +case 25: +YY_RULE_SETUP +#line 85 "flex_lexer.l" +TOKEN(PREPARE) + YY_BREAK +case 26: +YY_RULE_SETUP +#line 86 "flex_lexer.l" +TOKEN(PRIMARY) + YY_BREAK +case 27: +YY_RULE_SETUP +#line 87 "flex_lexer.l" +TOKEN(SCHEMAS) + YY_BREAK +case 28: +YY_RULE_SETUP +#line 88 "flex_lexer.l" +TOKEN(SPATIAL) + YY_BREAK +case 29: +YY_RULE_SETUP +#line 89 "flex_lexer.l" +TOKEN(VARCHAR) + YY_BREAK +case 30: +YY_RULE_SETUP +#line 90 "flex_lexer.l" +TOKEN(CHARACTER) + YY_BREAK +case 31: +YY_RULE_SETUP +#line 91 "flex_lexer.l" +TOKEN(VARYING) + YY_BREAK +case 32: +YY_RULE_SETUP +#line 92 "flex_lexer.l" +TOKEN(TIME) + YY_BREAK +case 33: +YY_RULE_SETUP +#line 93 "flex_lexer.l" +TOKEN(DECIMAL) + YY_BREAK +case 34: +YY_RULE_SETUP +#line 94 "flex_lexer.l" +TOKEN(REAL) + YY_BREAK +case 35: +YY_RULE_SETUP +#line 95 "flex_lexer.l" +TOKEN(VIRTUAL) + YY_BREAK +case 36: +YY_RULE_SETUP +#line 96 "flex_lexer.l" +TOKEN(BEFORE) + YY_BREAK +case 37: +YY_RULE_SETUP +#line 97 "flex_lexer.l" +TOKEN(COLUMN) + YY_BREAK +case 38: +YY_RULE_SETUP +#line 98 "flex_lexer.l" +TOKEN(CREATE) + YY_BREAK +case 39: +YY_RULE_SETUP +#line 99 "flex_lexer.l" +TOKEN(DELETE) + YY_BREAK +case 40: +YY_RULE_SETUP +#line 100 "flex_lexer.l" +TOKEN(DIRECT) + YY_BREAK +case 41: +YY_RULE_SETUP +#line 101 "flex_lexer.l" +TOKEN(DOUBLE) + YY_BREAK +case 42: +YY_RULE_SETUP +#line 102 "flex_lexer.l" +TOKEN(ESCAPE) + YY_BREAK +case 43: +YY_RULE_SETUP +#line 103 "flex_lexer.l" +TOKEN(EXCEPT) + YY_BREAK +case 44: +YY_RULE_SETUP +#line 104 "flex_lexer.l" +TOKEN(EXISTS) + YY_BREAK +case 45: +YY_RULE_SETUP +#line 105 "flex_lexer.l" +TOKEN(EXTRACT) + YY_BREAK +case 46: +YY_RULE_SETUP +#line 106 "flex_lexer.l" +TOKEN(CAST) + YY_BREAK +case 47: +YY_RULE_SETUP +#line 107 "flex_lexer.l" +TOKEN(FORMAT) + YY_BREAK +case 48: +YY_RULE_SETUP +#line 108 "flex_lexer.l" +TOKEN(GLOBAL) + YY_BREAK +case 49: +YY_RULE_SETUP +#line 109 "flex_lexer.l" +TOKEN(HAVING) + YY_BREAK +case 50: +YY_RULE_SETUP +#line 110 "flex_lexer.l" +TOKEN(IMPORT) + YY_BREAK +case 51: +YY_RULE_SETUP +#line 111 "flex_lexer.l" +TOKEN(INSERT) + YY_BREAK +case 52: +YY_RULE_SETUP +#line 112 "flex_lexer.l" +TOKEN(ISNULL) + YY_BREAK +case 53: +YY_RULE_SETUP +#line 113 "flex_lexer.l" +TOKEN(OFFSET) + YY_BREAK +case 54: +YY_RULE_SETUP +#line 114 "flex_lexer.l" +TOKEN(RENAME) + YY_BREAK +case 55: +YY_RULE_SETUP +#line 115 "flex_lexer.l" +TOKEN(SCHEMA) + YY_BREAK +case 56: +YY_RULE_SETUP +#line 116 "flex_lexer.l" +TOKEN(SELECT) + YY_BREAK +case 57: +YY_RULE_SETUP +#line 117 "flex_lexer.l" +TOKEN(SORTED) + YY_BREAK +case 58: +YY_RULE_SETUP +#line 118 "flex_lexer.l" +TOKEN(TABLES) + YY_BREAK +case 59: +YY_RULE_SETUP +#line 119 "flex_lexer.l" +TOKEN(UNIQUE) + YY_BREAK +case 60: +YY_RULE_SETUP +#line 120 "flex_lexer.l" +TOKEN(UNLOAD) + YY_BREAK +case 61: +YY_RULE_SETUP +#line 121 "flex_lexer.l" +TOKEN(UPDATE) + YY_BREAK +case 62: +YY_RULE_SETUP +#line 122 "flex_lexer.l" +TOKEN(VALUES) + YY_BREAK +case 63: +YY_RULE_SETUP +#line 123 "flex_lexer.l" +TOKEN(AFTER) + YY_BREAK +case 64: +YY_RULE_SETUP +#line 124 "flex_lexer.l" +TOKEN(ALTER) + YY_BREAK +case 65: +YY_RULE_SETUP +#line 125 "flex_lexer.l" +TOKEN(ARRAY) + YY_BREAK +case 66: +YY_RULE_SETUP +#line 126 "flex_lexer.l" +TOKEN(CROSS) + YY_BREAK +case 67: +YY_RULE_SETUP +#line 127 "flex_lexer.l" +TOKEN(DELTA) + YY_BREAK +case 68: +YY_RULE_SETUP +#line 128 "flex_lexer.l" +TOKEN(FLOAT) + YY_BREAK +case 69: +YY_RULE_SETUP +#line 129 "flex_lexer.l" +TOKEN(GROUP) + YY_BREAK +case 70: +YY_RULE_SETUP +#line 130 "flex_lexer.l" +TOKEN(INDEX) + YY_BREAK +case 71: +YY_RULE_SETUP +#line 131 "flex_lexer.l" +TOKEN(INNER) + YY_BREAK +case 72: +YY_RULE_SETUP +#line 132 "flex_lexer.l" +TOKEN(LIMIT) + YY_BREAK +case 73: +YY_RULE_SETUP +#line 133 "flex_lexer.l" +TOKEN(LOCAL) + YY_BREAK +case 74: +YY_RULE_SETUP +#line 134 "flex_lexer.l" +TOKEN(MERGE) + YY_BREAK +case 75: +YY_RULE_SETUP +#line 135 "flex_lexer.l" +TOKEN(MINUS) + YY_BREAK +case 76: +YY_RULE_SETUP +#line 136 "flex_lexer.l" +TOKEN(ORDER) + YY_BREAK +case 77: +YY_RULE_SETUP +#line 137 "flex_lexer.l" +TOKEN(OUTER) + YY_BREAK +case 78: +YY_RULE_SETUP +#line 138 "flex_lexer.l" +TOKEN(RIGHT) + YY_BREAK +case 79: +YY_RULE_SETUP +#line 139 "flex_lexer.l" +TOKEN(TABLE) + YY_BREAK +case 80: +YY_RULE_SETUP +#line 140 "flex_lexer.l" +TOKEN(UNION) + YY_BREAK +case 81: +YY_RULE_SETUP +#line 141 "flex_lexer.l" +TOKEN(USING) + YY_BREAK +case 82: +YY_RULE_SETUP +#line 142 "flex_lexer.l" +TOKEN(WHERE) + YY_BREAK +case 83: +YY_RULE_SETUP +#line 143 "flex_lexer.l" +TOKEN(CALL) + YY_BREAK +case 84: +YY_RULE_SETUP +#line 144 "flex_lexer.l" +TOKEN(CASE) + YY_BREAK +case 85: +YY_RULE_SETUP +#line 145 "flex_lexer.l" +TOKEN(CHAR) + YY_BREAK +case 86: +YY_RULE_SETUP +#line 146 "flex_lexer.l" +TOKEN(COPY) + YY_BREAK +case 87: +YY_RULE_SETUP +#line 147 "flex_lexer.l" +TOKEN(DATE) + YY_BREAK +case 88: +YY_RULE_SETUP +#line 148 "flex_lexer.l" +TOKEN(DATETIME) + YY_BREAK +case 89: +YY_RULE_SETUP +#line 149 "flex_lexer.l" +TOKEN(DESC) + YY_BREAK +case 90: +YY_RULE_SETUP +#line 150 "flex_lexer.l" +TOKEN(DROP) + YY_BREAK +case 91: +YY_RULE_SETUP +#line 151 "flex_lexer.l" +TOKEN(ELSE) + YY_BREAK +case 92: +YY_RULE_SETUP +#line 152 "flex_lexer.l" +TOKEN(FILE) + YY_BREAK +case 93: +YY_RULE_SETUP +#line 153 "flex_lexer.l" +TOKEN(FROM) + YY_BREAK +case 94: +YY_RULE_SETUP +#line 154 "flex_lexer.l" +TOKEN(FULL) + YY_BREAK +case 95: +YY_RULE_SETUP +#line 155 "flex_lexer.l" +TOKEN(HASH) + YY_BREAK +case 96: +YY_RULE_SETUP +#line 156 "flex_lexer.l" +TOKEN(HINT) + YY_BREAK +case 97: +YY_RULE_SETUP +#line 157 "flex_lexer.l" +TOKEN(INTO) + YY_BREAK +case 98: +YY_RULE_SETUP +#line 158 "flex_lexer.l" +TOKEN(JOIN) + YY_BREAK +case 99: +YY_RULE_SETUP +#line 159 "flex_lexer.l" +TOKEN(LEFT) + YY_BREAK +case 100: +YY_RULE_SETUP +#line 160 "flex_lexer.l" +TOKEN(LIKE) + YY_BREAK +case 101: +YY_RULE_SETUP +#line 161 "flex_lexer.l" +TOKEN(ILIKE) + YY_BREAK +case 102: +YY_RULE_SETUP +#line 162 "flex_lexer.l" +TOKEN(LOAD) + YY_BREAK +case 103: +YY_RULE_SETUP +#line 163 "flex_lexer.l" +TOKEN(LONG) + YY_BREAK +case 104: +YY_RULE_SETUP +#line 164 "flex_lexer.l" +TOKEN(NULL) + YY_BREAK +case 105: +YY_RULE_SETUP +#line 165 "flex_lexer.l" +TOKEN(PLAN) + YY_BREAK +case 106: +YY_RULE_SETUP +#line 166 "flex_lexer.l" +TOKEN(SHOW) + YY_BREAK +case 107: +YY_RULE_SETUP +#line 167 "flex_lexer.l" +TOKEN(TEXT) + YY_BREAK +case 108: +YY_RULE_SETUP +#line 168 "flex_lexer.l" +TOKEN(THEN) + YY_BREAK +case 109: +YY_RULE_SETUP +#line 169 "flex_lexer.l" +TOKEN(TIME) + YY_BREAK +case 110: +YY_RULE_SETUP +#line 170 "flex_lexer.l" +TOKEN(VIEW) + YY_BREAK +case 111: +YY_RULE_SETUP +#line 171 "flex_lexer.l" +TOKEN(WHEN) + YY_BREAK +case 112: +YY_RULE_SETUP +#line 172 "flex_lexer.l" +TOKEN(WITH) + YY_BREAK +case 113: +YY_RULE_SETUP +#line 173 "flex_lexer.l" +TOKEN(ADD) + YY_BREAK +case 114: +YY_RULE_SETUP +#line 174 "flex_lexer.l" +TOKEN(ALL) + YY_BREAK +case 115: +YY_RULE_SETUP +#line 175 "flex_lexer.l" +TOKEN(AND) + YY_BREAK +case 116: +YY_RULE_SETUP +#line 176 "flex_lexer.l" +TOKEN(ASC) + YY_BREAK +case 117: +YY_RULE_SETUP +#line 177 "flex_lexer.l" +TOKEN(END) + YY_BREAK +case 118: +YY_RULE_SETUP +#line 178 "flex_lexer.l" +TOKEN(FOR) + YY_BREAK +case 119: +YY_RULE_SETUP +#line 179 "flex_lexer.l" +TOKEN(INT) + YY_BREAK +case 120: +YY_RULE_SETUP +#line 180 "flex_lexer.l" +TOKEN(KEY) + YY_BREAK +case 121: +YY_RULE_SETUP +#line 181 "flex_lexer.l" +TOKEN(NOT) + YY_BREAK +case 122: +YY_RULE_SETUP +#line 182 "flex_lexer.l" +TOKEN(OFF) + YY_BREAK +case 123: +YY_RULE_SETUP +#line 183 "flex_lexer.l" +TOKEN(SET) + YY_BREAK +case 124: +YY_RULE_SETUP +#line 184 "flex_lexer.l" +TOKEN(TOP) + YY_BREAK +case 125: +YY_RULE_SETUP +#line 185 "flex_lexer.l" +TOKEN(AS) + YY_BREAK +case 126: +YY_RULE_SETUP +#line 186 "flex_lexer.l" +TOKEN(BY) + YY_BREAK +case 127: +YY_RULE_SETUP +#line 187 "flex_lexer.l" +TOKEN(IF) + YY_BREAK +case 128: +YY_RULE_SETUP +#line 188 "flex_lexer.l" +TOKEN(IN) + YY_BREAK +case 129: +YY_RULE_SETUP +#line 189 "flex_lexer.l" +TOKEN(IS) + YY_BREAK +case 130: +YY_RULE_SETUP +#line 190 "flex_lexer.l" +TOKEN(OF) + YY_BREAK +case 131: +YY_RULE_SETUP +#line 191 "flex_lexer.l" +TOKEN(ON) + YY_BREAK +case 132: +YY_RULE_SETUP +#line 192 "flex_lexer.l" +TOKEN(OR) + YY_BREAK +case 133: +YY_RULE_SETUP +#line 193 "flex_lexer.l" +TOKEN(TO) + YY_BREAK +case 134: +YY_RULE_SETUP +#line 194 "flex_lexer.l" +TOKEN(SECOND) + YY_BREAK +case 135: +YY_RULE_SETUP +#line 195 "flex_lexer.l" +TOKEN(MINUTE) + YY_BREAK +case 136: +YY_RULE_SETUP +#line 196 "flex_lexer.l" +TOKEN(HOUR) + YY_BREAK +case 137: +YY_RULE_SETUP +#line 197 "flex_lexer.l" +TOKEN(DAY) + YY_BREAK +case 138: +YY_RULE_SETUP +#line 198 "flex_lexer.l" +TOKEN(MONTH) + YY_BREAK +case 139: +YY_RULE_SETUP +#line 199 "flex_lexer.l" +TOKEN(YEAR) + YY_BREAK +case 140: +YY_RULE_SETUP +#line 200 "flex_lexer.l" +TOKEN(TRUE) + YY_BREAK +case 141: +YY_RULE_SETUP +#line 201 "flex_lexer.l" +TOKEN(FALSE) + YY_BREAK +case 142: +YY_RULE_SETUP +#line 202 "flex_lexer.l" +TOKEN(TRANSACTION) + YY_BREAK +case 143: +YY_RULE_SETUP +#line 203 "flex_lexer.l" +TOKEN(BEGIN) + YY_BREAK +case 144: +YY_RULE_SETUP +#line 204 "flex_lexer.l" +TOKEN(ROLLBACK) + YY_BREAK +case 145: +YY_RULE_SETUP +#line 205 "flex_lexer.l" +TOKEN(COMMIT) + YY_BREAK +/* Allow =/== see https://sqlite.org/lang_expr.html#collateop */ +case 146: +YY_RULE_SETUP +#line 208 "flex_lexer.l" +TOKEN(EQUALS) + YY_BREAK +case 147: +YY_RULE_SETUP +#line 209 "flex_lexer.l" +TOKEN(NOTEQUALS) + YY_BREAK +case 148: +YY_RULE_SETUP +#line 210 "flex_lexer.l" +TOKEN(NOTEQUALS) + YY_BREAK +case 149: +YY_RULE_SETUP +#line 211 "flex_lexer.l" +TOKEN(LESSEQ) + YY_BREAK +case 150: +YY_RULE_SETUP +#line 212 "flex_lexer.l" +TOKEN(GREATEREQ) + YY_BREAK +case 151: +YY_RULE_SETUP +#line 213 "flex_lexer.l" +TOKEN(CONCAT) + YY_BREAK +case 152: +YY_RULE_SETUP +#line 215 "flex_lexer.l" +{ return yytext[0]; } + YY_BREAK +case 153: +#line 218 "flex_lexer.l" +case 154: +YY_RULE_SETUP +#line 218 "flex_lexer.l" +{ + yylval->fval = atof(yytext); + return SQL_FLOATVAL; +} + YY_BREAK +/* + * Regularly, negative literals are treated as . This does not work for LLONG_MIN, as it has no + * positive equivalent. We thus match for LLONG_MIN specifically. This is not an issue for floats, where + * numeric_limits::lowest() == -numeric_limits::max(); + */ +case 155: +YY_RULE_SETUP +#line 228 "flex_lexer.l" +{ + yylval->ival = LLONG_MIN; + return SQL_INTVAL; +} + YY_BREAK +case 156: +YY_RULE_SETUP +#line 233 "flex_lexer.l" +{ + errno = 0; + yylval->ival = strtoll(yytext, nullptr, 0); + if (errno) { + return fprintf(stderr, "[SQL-Lexer-Error] Integer cannot be parsed - is it out of range?"); + return 0; + } + return SQL_INTVAL; +} + YY_BREAK +case 157: +YY_RULE_SETUP +#line 243 "flex_lexer.l" +{ + // Crop the leading and trailing quote char + yylval->sval = hsql::substr(yytext, 1, strlen(yytext)-1); + return SQL_IDENTIFIER; +} + YY_BREAK +case 158: +YY_RULE_SETUP +#line 249 "flex_lexer.l" +{ + yylval->sval = strdup(yytext); + return SQL_IDENTIFIER; +} + YY_BREAK +case 159: +YY_RULE_SETUP +#line 254 "flex_lexer.l" +{ BEGIN singlequotedstring; strbuf.clear(); strbuf.str(""); } // Clear strbuf manually, see #170 + YY_BREAK +case 160: +YY_RULE_SETUP +#line 255 "flex_lexer.l" +{ strbuf << '\''; } + YY_BREAK +case 161: +/* rule 161 can match eol */ +YY_RULE_SETUP +#line 256 "flex_lexer.l" +{ strbuf << yytext; } + YY_BREAK +case 162: +YY_RULE_SETUP +#line 257 "flex_lexer.l" +{ BEGIN 0; yylval->sval = strdup(strbuf.str().c_str()); return SQL_STRING; } + YY_BREAK +case YY_STATE_EOF(singlequotedstring): +#line 258 "flex_lexer.l" +{ fprintf(stderr, "[SQL-Lexer-Error] Unterminated string\n"); return 0; } + YY_BREAK +case 163: +YY_RULE_SETUP +#line 260 "flex_lexer.l" +{ fprintf(stderr, "[SQL-Lexer-Error] Unknown Character: %c\n", yytext[0]); return 0; } + YY_BREAK +case 164: +YY_RULE_SETUP +#line 263 "flex_lexer.l" +ECHO; + YY_BREAK +#line 3291 "flex_lexer.cpp" +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(COMMENT): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yyg->yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); + + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yyg->yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_END_OF_FILE: + { + yyg->yy_did_buffer_switch_on_eof = 0; + + if ( yywrap( yyscanner ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = + yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yyg->yy_c_buf_p = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ +} /* end of yylex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = yyg->yytext_ptr; + int number_to_move, i; + int ret_val; + + if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) (yyg->yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + yyg->yy_n_chars, num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + if ( yyg->yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin , yyscanner); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); + } + + yyg->yy_n_chars += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + static yy_state_type yy_get_previous_state (yyscan_t yyscanner) +{ + yy_state_type yy_current_state; + char *yy_cp; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + yy_current_state = yyg->yy_start; + + for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) + { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 1152 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) +{ + int yy_is_jam; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ + char *yy_cp = yyg->yy_c_buf_p; + + YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 1152 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 1151); + + (void)yyg; + return yy_is_jam ? 0 : yy_current_state; +} + +#ifndef YY_NO_UNPUT + +#endif + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (yyscan_t yyscanner) +#else + static int input (yyscan_t yyscanner) +#endif + +{ + int c; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + *yyg->yy_c_buf_p = yyg->yy_hold_char; + + if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + /* This was really a NUL. */ + *yyg->yy_c_buf_p = '\0'; + + else + { /* need more input */ + int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr); + ++yyg->yy_c_buf_p; + + switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin , yyscanner); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( yyscanner ) ) + return 0; + + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(yyscanner); +#else + return input(yyscanner); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = yyg->yytext_ptr + offset; + break; + } + } + } + + c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ + *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ + yyg->yy_hold_char = *++yyg->yy_c_buf_p; + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * @param yyscanner The scanner object. + * @note This function does not reset the start condition to @c INITIAL . + */ + void yyrestart (FILE * input_file , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); + } + + yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); + yy_load_buffer_state( yyscanner ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * @param yyscanner The scanner object. + */ + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (yyscanner); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( yyscanner ); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yyg->yy_did_buffer_switch_on_eof = 1; +} + +static void yy_load_buffer_state (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyg->yy_hold_char = *yyg->yy_c_buf_p; +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * @param yyscanner The scanner object. + * @return the allocated buffer state. + */ + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + yy_init_buffer( b, file , yyscanner); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with yy_create_buffer() + * @param yyscanner The scanner object. + */ + void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + yyfree( (void *) b->yy_ch_buf , yyscanner ); + + yyfree( (void *) b , yyscanner ); +} + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a yyrestart() or at EOF. + */ + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) + +{ + int oerrno = errno; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + yy_flush_buffer( b , yyscanner); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * @param yyscanner The scanner object. + */ + void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( yyscanner ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * @param yyscanner The scanner object. + */ +void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(yyscanner); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + yyg->yy_buffer_stack_top++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * @param yyscanner The scanner object. + */ +void yypop_buffer_state (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + if (yyg->yy_buffer_stack_top > 0) + --yyg->yy_buffer_stack_top; + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void yyensure_buffer_stack (yyscan_t yyscanner) +{ + yy_size_t num_to_alloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (!yyg->yy_buffer_stack) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + yyg->yy_buffer_stack_max = num_to_alloc; + yyg->yy_buffer_stack_top = 0; + return; + } + + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = yyg->yy_buffer_stack_max + grow_size; + yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc + (yyg->yy_buffer_stack, + num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); + yyg->yy_buffer_stack_max = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer( b , yyscanner ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to yylex() will + * scan from a @e copy of @a str. + * @param yystr a NUL-terminated string to scan + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * yy_scan_bytes() instead. + */ +YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) +{ + + return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); +} + +/** Setup the input buffer state to scan the given bytes. The next call to yylex() will + * scan from a @e copy of @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t) (_yybytes_len + 2); + buf = (char *) yyalloc( n , yyscanner ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer( buf, n , yyscanner); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = yyg->yy_hold_char; \ + yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ + yyg->yy_hold_char = *yyg->yy_c_buf_p; \ + *yyg->yy_c_buf_p = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the user-defined data for this scanner. + * @param yyscanner The scanner object. + */ +YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyextra; +} + +/** Get the current line number. + * @param yyscanner The scanner object. + */ +int yyget_lineno (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (! YY_CURRENT_BUFFER) + return 0; + + return yylineno; +} + +/** Get the current column number. + * @param yyscanner The scanner object. + */ +int yyget_column (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (! YY_CURRENT_BUFFER) + return 0; + + return yycolumn; +} + +/** Get the input stream. + * @param yyscanner The scanner object. + */ +FILE *yyget_in (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyin; +} + +/** Get the output stream. + * @param yyscanner The scanner object. + */ +FILE *yyget_out (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyout; +} + +/** Get the length of the current token. + * @param yyscanner The scanner object. + */ +int yyget_leng (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyleng; +} + +/** Get the current token. + * @param yyscanner The scanner object. + */ + +char *yyget_text (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yytext; +} + +/** Set the user-defined data. This data is never touched by the scanner. + * @param user_defined The data to be associated with this scanner. + * @param yyscanner The scanner object. + */ +void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyextra = user_defined ; +} + +/** Set the current line number. + * @param _line_number line number + * @param yyscanner The scanner object. + */ +void yyset_lineno (int _line_number , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* lineno is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); + + yylineno = _line_number; +} + +/** Set the current column. + * @param _column_no column number + * @param yyscanner The scanner object. + */ +void yyset_column (int _column_no , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* column is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "yyset_column called with no buffer" ); + + yycolumn = _column_no; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param _in_str A readable stream. + * @param yyscanner The scanner object. + * @see yy_switch_to_buffer + */ +void yyset_in (FILE * _in_str , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyin = _in_str ; +} + +void yyset_out (FILE * _out_str , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyout = _out_str ; +} + +int yyget_debug (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yy_flex_debug; +} + +void yyset_debug (int _bdebug , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yy_flex_debug = _bdebug ; +} + +/* Accessor methods for yylval and yylloc */ + +YYSTYPE * yyget_lval (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yylval; +} + +void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yylval = yylval_param; +} + +YYLTYPE *yyget_lloc (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yylloc; +} + +void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yylloc = yylloc_param; +} + +/* User-visible API */ + +/* yylex_init is special because it creates the scanner itself, so it is + * the ONLY reentrant function that doesn't take the scanner as the last argument. + * That's why we explicitly handle the declaration, instead of using our macros. + */ +int yylex_init(yyscan_t* ptr_yy_globals) +{ + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } + + *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); + + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } + + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + + return yy_init_globals ( *ptr_yy_globals ); +} + +/* yylex_init_extra has the same functionality as yylex_init, but follows the + * convention of taking the scanner as the last argument. Note however, that + * this is a *pointer* to a scanner, as it will be allocated by this call (and + * is the reason, too, why this function also must handle its own declaration). + * The user defined value in the first argument will be available to yyalloc in + * the yyextra field. + */ +int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) +{ + struct yyguts_t dummy_yyguts; + + yyset_extra (yy_user_defined, &dummy_yyguts); + + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } + + *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); + + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } + + /* By setting to 0xAA, we expose bugs in + yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + + yyset_extra (yy_user_defined, *ptr_yy_globals); + + return yy_init_globals ( *ptr_yy_globals ); +} + +static int yy_init_globals (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ + + yyg->yy_buffer_stack = NULL; + yyg->yy_buffer_stack_top = 0; + yyg->yy_buffer_stack_max = 0; + yyg->yy_c_buf_p = NULL; + yyg->yy_init = 0; + yyg->yy_start = 0; + + yyg->yy_start_stack_ptr = 0; + yyg->yy_start_stack_depth = 0; + yyg->yy_start_stack = NULL; + +/* Defined in main.c */ +#ifdef YY_STDINIT + yyin = stdin; + yyout = stdout; +#else + yyin = NULL; + yyout = NULL; +#endif + + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; +} + +/* yylex_destroy is for both reentrant and non-reentrant scanners. */ +int yylex_destroy (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(yyscanner); + } + + /* Destroy the stack itself. */ + yyfree(yyg->yy_buffer_stack , yyscanner); + yyg->yy_buffer_stack = NULL; + + /* Destroy the start condition stack. */ + yyfree( yyg->yy_start_stack , yyscanner ); + yyg->yy_start_stack = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals( yyscanner); + + /* Destroy the main struct (reentrant only). */ + yyfree ( yyscanner , yyscanner ); + yyscanner = NULL; + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (const char * s , yyscan_t yyscanner) +{ + int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *yyalloc (yy_size_t size , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + return malloc(size); +} + +void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); +} + +void yyfree (void * ptr , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#line 263 "flex_lexer.l" + +/*************************** + ** Section 3: User code + ***************************/ + +int yyerror(const char *msg) { + fprintf(stderr, "[SQL-Lexer-Error] %s\n",msg); return 0; +} + From 873527dd1b09fa99fd9add1589991278ed9c0838 Mon Sep 17 00:00:00 2001 From: Moritz Spranger Date: Sun, 29 Aug 2021 17:48:06 +0200 Subject: [PATCH 48/73] Add bison_parser and flex_lexer to git --- src/parser/bison_parser.cpp | 5130 +++++++++++++++++++++++++++++++++++ src/parser/flex_lexer.cpp | 4457 ++++++++++++++++++++++++++++++ 2 files changed, 9587 insertions(+) create mode 100644 src/parser/bison_parser.cpp create mode 100644 src/parser/flex_lexer.cpp diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp new file mode 100644 index 00000000..45eda34a --- /dev/null +++ b/src/parser/bison_parser.cpp @@ -0,0 +1,5130 @@ +/* A Bison parser, made by GNU Bison 3.7.6. */ + +/* Bison implementation for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 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 + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, + especially those whose name start with YY_ or yy_. They are + private implementation details that can be changed or removed. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output, and Bison version. */ +#define YYBISON 30706 + +/* Bison version string. */ +#define YYBISON_VERSION "3.7.6" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 2 + +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + +/* Substitute the type names. */ +#define YYSTYPE HSQL_STYPE +#define YYLTYPE HSQL_LTYPE +/* Substitute the variable and function names. */ +#define yyparse hsql_parse +#define yylex hsql_lex +#define yyerror hsql_error +#define yydebug hsql_debug +#define yynerrs hsql_nerrs + +/* First part of user prologue. */ +#line 1 "bison_parser.y" + +/** + * bison_parser.y + * defines bison_parser.h + * outputs bison_parser.c + * + * Grammar File Spec: http://dinosaur.compilertools.net/bison/bison_6.html + * + */ +/********************************* + ** Section 1: C Declarations + *********************************/ + +#include "bison_parser.h" +#include "flex_lexer.h" + +#include +#include + +using namespace hsql; + +int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const char *msg) { + result->setIsValid(false); + result->setErrorDetails(strdup(msg), llocp->first_line, llocp->first_column); + return 0; +} + + +#line 107 "bison_parser.cpp" + +# ifndef YY_CAST +# ifdef __cplusplus +# define YY_CAST(Type, Val) static_cast (Val) +# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) +# else +# define YY_CAST(Type, Val) ((Type) (Val)) +# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) +# endif +# endif +# ifndef YY_NULLPTR +# if defined __cplusplus +# if 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# else +# define YY_NULLPTR ((void*)0) +# endif +# endif + +#include "bison_parser.h" +/* Symbol kind. */ +enum yysymbol_kind_t +{ + YYSYMBOL_YYEMPTY = -2, + YYSYMBOL_YYEOF = 0, /* "end of file" */ + YYSYMBOL_YYerror = 1, /* error */ + YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ + YYSYMBOL_IDENTIFIER = 3, /* IDENTIFIER */ + YYSYMBOL_STRING = 4, /* STRING */ + YYSYMBOL_FLOATVAL = 5, /* FLOATVAL */ + YYSYMBOL_INTVAL = 6, /* INTVAL */ + YYSYMBOL_DEALLOCATE = 7, /* DEALLOCATE */ + YYSYMBOL_PARAMETERS = 8, /* PARAMETERS */ + YYSYMBOL_INTERSECT = 9, /* INTERSECT */ + YYSYMBOL_TEMPORARY = 10, /* TEMPORARY */ + YYSYMBOL_TIMESTAMP = 11, /* TIMESTAMP */ + YYSYMBOL_DISTINCT = 12, /* DISTINCT */ + YYSYMBOL_NVARCHAR = 13, /* NVARCHAR */ + YYSYMBOL_RESTRICT = 14, /* RESTRICT */ + YYSYMBOL_TRUNCATE = 15, /* TRUNCATE */ + YYSYMBOL_ANALYZE = 16, /* ANALYZE */ + YYSYMBOL_BETWEEN = 17, /* BETWEEN */ + YYSYMBOL_CASCADE = 18, /* CASCADE */ + YYSYMBOL_COLUMNS = 19, /* COLUMNS */ + YYSYMBOL_CONTROL = 20, /* CONTROL */ + YYSYMBOL_DEFAULT = 21, /* DEFAULT */ + YYSYMBOL_EXECUTE = 22, /* EXECUTE */ + YYSYMBOL_EXPLAIN = 23, /* EXPLAIN */ + YYSYMBOL_INTEGER = 24, /* INTEGER */ + YYSYMBOL_NATURAL = 25, /* NATURAL */ + YYSYMBOL_PREPARE = 26, /* PREPARE */ + YYSYMBOL_PRIMARY = 27, /* PRIMARY */ + YYSYMBOL_SCHEMAS = 28, /* SCHEMAS */ + YYSYMBOL_CHARACTER = 29, /* CHARACTER */ + YYSYMBOL_VARYING = 30, /* VARYING */ + YYSYMBOL_REAL = 31, /* REAL */ + YYSYMBOL_DECIMAL = 32, /* DECIMAL */ + YYSYMBOL_SPATIAL = 33, /* SPATIAL */ + YYSYMBOL_VARCHAR = 34, /* VARCHAR */ + YYSYMBOL_VIRTUAL = 35, /* VIRTUAL */ + YYSYMBOL_DESCRIBE = 36, /* DESCRIBE */ + YYSYMBOL_BEFORE = 37, /* BEFORE */ + YYSYMBOL_COLUMN = 38, /* COLUMN */ + YYSYMBOL_CREATE = 39, /* CREATE */ + YYSYMBOL_DELETE = 40, /* DELETE */ + YYSYMBOL_DIRECT = 41, /* DIRECT */ + YYSYMBOL_DOUBLE = 42, /* DOUBLE */ + YYSYMBOL_ESCAPE = 43, /* ESCAPE */ + YYSYMBOL_EXCEPT = 44, /* EXCEPT */ + YYSYMBOL_EXISTS = 45, /* EXISTS */ + YYSYMBOL_EXTRACT = 46, /* EXTRACT */ + YYSYMBOL_CAST = 47, /* CAST */ + YYSYMBOL_FORMAT = 48, /* FORMAT */ + YYSYMBOL_GLOBAL = 49, /* GLOBAL */ + YYSYMBOL_HAVING = 50, /* HAVING */ + YYSYMBOL_IMPORT = 51, /* IMPORT */ + YYSYMBOL_INSERT = 52, /* INSERT */ + YYSYMBOL_ISNULL = 53, /* ISNULL */ + YYSYMBOL_OFFSET = 54, /* OFFSET */ + YYSYMBOL_RENAME = 55, /* RENAME */ + YYSYMBOL_SCHEMA = 56, /* SCHEMA */ + YYSYMBOL_SELECT = 57, /* SELECT */ + YYSYMBOL_SORTED = 58, /* SORTED */ + YYSYMBOL_TABLES = 59, /* TABLES */ + YYSYMBOL_UNIQUE = 60, /* UNIQUE */ + YYSYMBOL_UNLOAD = 61, /* UNLOAD */ + YYSYMBOL_UPDATE = 62, /* UPDATE */ + YYSYMBOL_VALUES = 63, /* VALUES */ + YYSYMBOL_AFTER = 64, /* AFTER */ + YYSYMBOL_ALTER = 65, /* ALTER */ + YYSYMBOL_CROSS = 66, /* CROSS */ + YYSYMBOL_DELTA = 67, /* DELTA */ + YYSYMBOL_FLOAT = 68, /* FLOAT */ + YYSYMBOL_GROUP = 69, /* GROUP */ + YYSYMBOL_INDEX = 70, /* INDEX */ + YYSYMBOL_INNER = 71, /* INNER */ + YYSYMBOL_LIMIT = 72, /* LIMIT */ + YYSYMBOL_LOCAL = 73, /* LOCAL */ + YYSYMBOL_MERGE = 74, /* MERGE */ + YYSYMBOL_MINUS = 75, /* MINUS */ + YYSYMBOL_ORDER = 76, /* ORDER */ + YYSYMBOL_OUTER = 77, /* OUTER */ + YYSYMBOL_RIGHT = 78, /* RIGHT */ + YYSYMBOL_TABLE = 79, /* TABLE */ + YYSYMBOL_UNION = 80, /* UNION */ + YYSYMBOL_USING = 81, /* USING */ + YYSYMBOL_WHERE = 82, /* WHERE */ + YYSYMBOL_CALL = 83, /* CALL */ + YYSYMBOL_CASE = 84, /* CASE */ + YYSYMBOL_CHAR = 85, /* CHAR */ + YYSYMBOL_COPY = 86, /* COPY */ + YYSYMBOL_DATE = 87, /* DATE */ + YYSYMBOL_DATETIME = 88, /* DATETIME */ + YYSYMBOL_DESC = 89, /* DESC */ + YYSYMBOL_DROP = 90, /* DROP */ + YYSYMBOL_ELSE = 91, /* ELSE */ + YYSYMBOL_FILE = 92, /* FILE */ + YYSYMBOL_FROM = 93, /* FROM */ + YYSYMBOL_FULL = 94, /* FULL */ + YYSYMBOL_HASH = 95, /* HASH */ + YYSYMBOL_HINT = 96, /* HINT */ + YYSYMBOL_INTO = 97, /* INTO */ + YYSYMBOL_JOIN = 98, /* JOIN */ + YYSYMBOL_LEFT = 99, /* LEFT */ + YYSYMBOL_LIKE = 100, /* LIKE */ + YYSYMBOL_LOAD = 101, /* LOAD */ + YYSYMBOL_LONG = 102, /* LONG */ + YYSYMBOL_NULL = 103, /* NULL */ + YYSYMBOL_PLAN = 104, /* PLAN */ + YYSYMBOL_SHOW = 105, /* SHOW */ + YYSYMBOL_TEXT = 106, /* TEXT */ + YYSYMBOL_THEN = 107, /* THEN */ + YYSYMBOL_TIME = 108, /* TIME */ + YYSYMBOL_VIEW = 109, /* VIEW */ + YYSYMBOL_WHEN = 110, /* WHEN */ + YYSYMBOL_WITH = 111, /* WITH */ + YYSYMBOL_ADD = 112, /* ADD */ + YYSYMBOL_ALL = 113, /* ALL */ + YYSYMBOL_AND = 114, /* AND */ + YYSYMBOL_ASC = 115, /* ASC */ + YYSYMBOL_END = 116, /* END */ + YYSYMBOL_FOR = 117, /* FOR */ + YYSYMBOL_INT = 118, /* INT */ + YYSYMBOL_KEY = 119, /* KEY */ + YYSYMBOL_NOT = 120, /* NOT */ + YYSYMBOL_OFF = 121, /* OFF */ + YYSYMBOL_SET = 122, /* SET */ + YYSYMBOL_TOP = 123, /* TOP */ + YYSYMBOL_AS = 124, /* AS */ + YYSYMBOL_BY = 125, /* BY */ + YYSYMBOL_IF = 126, /* IF */ + YYSYMBOL_IN = 127, /* IN */ + YYSYMBOL_IS = 128, /* IS */ + YYSYMBOL_OF = 129, /* OF */ + YYSYMBOL_ON = 130, /* ON */ + YYSYMBOL_OR = 131, /* OR */ + YYSYMBOL_TO = 132, /* TO */ + YYSYMBOL_ARRAY = 133, /* ARRAY */ + YYSYMBOL_CONCAT = 134, /* CONCAT */ + YYSYMBOL_ILIKE = 135, /* ILIKE */ + YYSYMBOL_SECOND = 136, /* SECOND */ + YYSYMBOL_MINUTE = 137, /* MINUTE */ + YYSYMBOL_HOUR = 138, /* HOUR */ + YYSYMBOL_DAY = 139, /* DAY */ + YYSYMBOL_MONTH = 140, /* MONTH */ + YYSYMBOL_YEAR = 141, /* YEAR */ + YYSYMBOL_TRUE = 142, /* TRUE */ + YYSYMBOL_FALSE = 143, /* FALSE */ + YYSYMBOL_TRANSACTION = 144, /* TRANSACTION */ + YYSYMBOL_BEGIN = 145, /* BEGIN */ + YYSYMBOL_COMMIT = 146, /* COMMIT */ + YYSYMBOL_ROLLBACK = 147, /* ROLLBACK */ + YYSYMBOL_148_ = 148, /* '=' */ + YYSYMBOL_EQUALS = 149, /* EQUALS */ + YYSYMBOL_NOTEQUALS = 150, /* NOTEQUALS */ + YYSYMBOL_151_ = 151, /* '<' */ + YYSYMBOL_152_ = 152, /* '>' */ + YYSYMBOL_LESS = 153, /* LESS */ + YYSYMBOL_GREATER = 154, /* GREATER */ + YYSYMBOL_LESSEQ = 155, /* LESSEQ */ + YYSYMBOL_GREATEREQ = 156, /* GREATEREQ */ + YYSYMBOL_NOTNULL = 157, /* NOTNULL */ + YYSYMBOL_158_ = 158, /* '+' */ + YYSYMBOL_159_ = 159, /* '-' */ + YYSYMBOL_160_ = 160, /* '*' */ + YYSYMBOL_161_ = 161, /* '/' */ + YYSYMBOL_162_ = 162, /* '%' */ + YYSYMBOL_163_ = 163, /* '^' */ + YYSYMBOL_UMINUS = 164, /* UMINUS */ + YYSYMBOL_165_ = 165, /* '[' */ + YYSYMBOL_166_ = 166, /* ']' */ + YYSYMBOL_167_ = 167, /* '(' */ + YYSYMBOL_168_ = 168, /* ')' */ + YYSYMBOL_169_ = 169, /* '.' */ + YYSYMBOL_170_ = 170, /* ';' */ + YYSYMBOL_171_ = 171, /* ',' */ + YYSYMBOL_172_ = 172, /* '?' */ + YYSYMBOL_YYACCEPT = 173, /* $accept */ + YYSYMBOL_input = 174, /* input */ + YYSYMBOL_statement_list = 175, /* statement_list */ + YYSYMBOL_statement = 176, /* statement */ + YYSYMBOL_preparable_statement = 177, /* preparable_statement */ + YYSYMBOL_opt_hints = 178, /* opt_hints */ + YYSYMBOL_hint_list = 179, /* hint_list */ + YYSYMBOL_hint = 180, /* hint */ + YYSYMBOL_transaction_statement = 181, /* transaction_statement */ + YYSYMBOL_opt_transaction_keyword = 182, /* opt_transaction_keyword */ + YYSYMBOL_prepare_statement = 183, /* prepare_statement */ + YYSYMBOL_prepare_target_query = 184, /* prepare_target_query */ + YYSYMBOL_execute_statement = 185, /* execute_statement */ + YYSYMBOL_import_statement = 186, /* import_statement */ + YYSYMBOL_file_type = 187, /* file_type */ + YYSYMBOL_file_path = 188, /* file_path */ + YYSYMBOL_opt_file_type = 189, /* opt_file_type */ + YYSYMBOL_export_statement = 190, /* export_statement */ + YYSYMBOL_show_statement = 191, /* show_statement */ + YYSYMBOL_create_statement = 192, /* create_statement */ + YYSYMBOL_opt_not_exists = 193, /* opt_not_exists */ + YYSYMBOL_table_elem_commalist = 194, /* table_elem_commalist */ + YYSYMBOL_table_elem = 195, /* table_elem */ + YYSYMBOL_column_def = 196, /* column_def */ + YYSYMBOL_column_type = 197, /* column_type */ + YYSYMBOL_opt_time_specification = 198, /* opt_time_specification */ + YYSYMBOL_opt_decimal_specification = 199, /* opt_decimal_specification */ + YYSYMBOL_opt_column_constraints = 200, /* opt_column_constraints */ + YYSYMBOL_column_constraint = 201, /* column_constraint */ + YYSYMBOL_table_constraint = 202, /* table_constraint */ + YYSYMBOL_drop_statement = 203, /* drop_statement */ + YYSYMBOL_opt_exists = 204, /* opt_exists */ + YYSYMBOL_alter_statement = 205, /* alter_statement */ + YYSYMBOL_alter_action = 206, /* alter_action */ + YYSYMBOL_drop_action = 207, /* drop_action */ + YYSYMBOL_delete_statement = 208, /* delete_statement */ + YYSYMBOL_truncate_statement = 209, /* truncate_statement */ + YYSYMBOL_insert_statement = 210, /* insert_statement */ + YYSYMBOL_opt_column_list = 211, /* opt_column_list */ + YYSYMBOL_update_statement = 212, /* update_statement */ + YYSYMBOL_update_clause_commalist = 213, /* update_clause_commalist */ + YYSYMBOL_update_clause = 214, /* update_clause */ + YYSYMBOL_select_statement = 215, /* select_statement */ + YYSYMBOL_select_within_set_operation = 216, /* select_within_set_operation */ + YYSYMBOL_select_within_set_operation_no_parentheses = 217, /* select_within_set_operation_no_parentheses */ + YYSYMBOL_select_with_paren = 218, /* select_with_paren */ + YYSYMBOL_select_no_paren = 219, /* select_no_paren */ + YYSYMBOL_set_operator = 220, /* set_operator */ + YYSYMBOL_set_type = 221, /* set_type */ + YYSYMBOL_opt_all = 222, /* opt_all */ + YYSYMBOL_select_clause = 223, /* select_clause */ + YYSYMBOL_opt_distinct = 224, /* opt_distinct */ + YYSYMBOL_select_list = 225, /* select_list */ + YYSYMBOL_opt_from_clause = 226, /* opt_from_clause */ + YYSYMBOL_from_clause = 227, /* from_clause */ + YYSYMBOL_opt_where = 228, /* opt_where */ + YYSYMBOL_opt_group = 229, /* opt_group */ + YYSYMBOL_opt_having = 230, /* opt_having */ + YYSYMBOL_opt_order = 231, /* opt_order */ + YYSYMBOL_order_list = 232, /* order_list */ + YYSYMBOL_order_desc = 233, /* order_desc */ + YYSYMBOL_opt_order_type = 234, /* opt_order_type */ + YYSYMBOL_opt_top = 235, /* opt_top */ + YYSYMBOL_opt_limit = 236, /* opt_limit */ + YYSYMBOL_expr_list = 237, /* expr_list */ + YYSYMBOL_opt_literal_list = 238, /* opt_literal_list */ + YYSYMBOL_literal_list = 239, /* literal_list */ + YYSYMBOL_expr_alias = 240, /* expr_alias */ + YYSYMBOL_expr = 241, /* expr */ + YYSYMBOL_operand = 242, /* operand */ + YYSYMBOL_scalar_expr = 243, /* scalar_expr */ + YYSYMBOL_unary_expr = 244, /* unary_expr */ + YYSYMBOL_binary_expr = 245, /* binary_expr */ + YYSYMBOL_logic_expr = 246, /* logic_expr */ + YYSYMBOL_in_expr = 247, /* in_expr */ + YYSYMBOL_case_expr = 248, /* case_expr */ + YYSYMBOL_case_list = 249, /* case_list */ + YYSYMBOL_exists_expr = 250, /* exists_expr */ + YYSYMBOL_comp_expr = 251, /* comp_expr */ + YYSYMBOL_function_expr = 252, /* function_expr */ + YYSYMBOL_extract_expr = 253, /* extract_expr */ + YYSYMBOL_cast_expr = 254, /* cast_expr */ + YYSYMBOL_datetime_field = 255, /* datetime_field */ + YYSYMBOL_array_expr = 256, /* array_expr */ + YYSYMBOL_array_index = 257, /* array_index */ + YYSYMBOL_between_expr = 258, /* between_expr */ + YYSYMBOL_column_name = 259, /* column_name */ + YYSYMBOL_literal = 260, /* literal */ + YYSYMBOL_string_literal = 261, /* string_literal */ + YYSYMBOL_bool_literal = 262, /* bool_literal */ + YYSYMBOL_num_literal = 263, /* num_literal */ + YYSYMBOL_int_literal = 264, /* int_literal */ + YYSYMBOL_null_literal = 265, /* null_literal */ + YYSYMBOL_param_expr = 266, /* param_expr */ + YYSYMBOL_table_ref = 267, /* table_ref */ + YYSYMBOL_table_ref_atomic = 268, /* table_ref_atomic */ + YYSYMBOL_nonjoin_table_ref_atomic = 269, /* nonjoin_table_ref_atomic */ + YYSYMBOL_table_ref_commalist = 270, /* table_ref_commalist */ + YYSYMBOL_table_ref_name = 271, /* table_ref_name */ + YYSYMBOL_table_ref_name_no_alias = 272, /* table_ref_name_no_alias */ + YYSYMBOL_table_name = 273, /* table_name */ + YYSYMBOL_opt_index_name = 274, /* opt_index_name */ + YYSYMBOL_index_name = 275, /* index_name */ + YYSYMBOL_table_alias = 276, /* table_alias */ + YYSYMBOL_opt_table_alias = 277, /* opt_table_alias */ + YYSYMBOL_alias = 278, /* alias */ + YYSYMBOL_opt_alias = 279, /* opt_alias */ + YYSYMBOL_opt_with_clause = 280, /* opt_with_clause */ + YYSYMBOL_with_clause = 281, /* with_clause */ + YYSYMBOL_with_description_list = 282, /* with_description_list */ + YYSYMBOL_with_description = 283, /* with_description */ + YYSYMBOL_join_clause = 284, /* join_clause */ + YYSYMBOL_opt_join_type = 285, /* opt_join_type */ + YYSYMBOL_join_condition = 286, /* join_condition */ + YYSYMBOL_opt_semicolon = 287, /* opt_semicolon */ + YYSYMBOL_ident_commalist = 288 /* ident_commalist */ +}; +typedef enum yysymbol_kind_t yysymbol_kind_t; + + + + +#ifdef short +# undef short +#endif + +/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure + and (if available) are included + so that the code can choose integer types of a good width. */ + +#ifndef __PTRDIFF_MAX__ +# include /* INFRINGES ON USER NAME SPACE */ +# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_STDINT_H +# endif +#endif + +/* Narrow types that promote to a signed type and that can represent a + signed or unsigned integer of at least N bits. In tables they can + save space and decrease cache pressure. Promoting to a signed type + helps avoid bugs in integer arithmetic. */ + +#ifdef __INT_LEAST8_MAX__ +typedef __INT_LEAST8_TYPE__ yytype_int8; +#elif defined YY_STDINT_H +typedef int_least8_t yytype_int8; +#else +typedef signed char yytype_int8; +#endif + +#ifdef __INT_LEAST16_MAX__ +typedef __INT_LEAST16_TYPE__ yytype_int16; +#elif defined YY_STDINT_H +typedef int_least16_t yytype_int16; +#else +typedef short yytype_int16; +#endif + +/* Work around bug in HP-UX 11.23, which defines these macros + incorrectly for preprocessor constants. This workaround can likely + be removed in 2023, as HPE has promised support for HP-UX 11.23 + (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of + . */ +#ifdef __hpux +# undef UINT_LEAST8_MAX +# undef UINT_LEAST16_MAX +# define UINT_LEAST8_MAX 255 +# define UINT_LEAST16_MAX 65535 +#endif + +#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ +typedef __UINT_LEAST8_TYPE__ yytype_uint8; +#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST8_MAX <= INT_MAX) +typedef uint_least8_t yytype_uint8; +#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX +typedef unsigned char yytype_uint8; +#else +typedef short yytype_uint8; +#endif + +#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ +typedef __UINT_LEAST16_TYPE__ yytype_uint16; +#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST16_MAX <= INT_MAX) +typedef uint_least16_t yytype_uint16; +#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX +typedef unsigned short yytype_uint16; +#else +typedef int yytype_uint16; +#endif + +#ifndef YYPTRDIFF_T +# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ +# define YYPTRDIFF_T __PTRDIFF_TYPE__ +# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ +# elif defined PTRDIFF_MAX +# ifndef ptrdiff_t +# include /* INFRINGES ON USER NAME SPACE */ +# endif +# define YYPTRDIFF_T ptrdiff_t +# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX +# else +# define YYPTRDIFF_T long +# define YYPTRDIFF_MAXIMUM LONG_MAX +# endif +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned +# endif +#endif + +#define YYSIZE_MAXIMUM \ + YY_CAST (YYPTRDIFF_T, \ + (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ + ? YYPTRDIFF_MAXIMUM \ + : YY_CAST (YYSIZE_T, -1))) + +#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) + + +/* Stored state numbers (used for stacks). */ +typedef yytype_int16 yy_state_t; + +/* State numbers in computations. */ +typedef int yy_state_fast_t; + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) +# endif +# endif +# ifndef YY_ +# define YY_(Msgid) Msgid +# endif +#endif + + +#ifndef YY_ATTRIBUTE_PURE +# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define YY_ATTRIBUTE_PURE +# endif +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +# else +# define YY_ATTRIBUTE_UNUSED +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YY_USE(E) ((void) (E)) +#else +# define YY_USE(E) /* empty */ +#endif + +#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") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") +#else +# define YY_INITIAL_VALUE(Value) Value +#endif +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + +#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ +# define YY_IGNORE_USELESS_CAST_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") +# define YY_IGNORE_USELESS_CAST_END \ + _Pragma ("GCC diagnostic pop") +#endif +#ifndef YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_END +#endif + + +#define YY_ASSERT(E) ((void) (0 && (E))) + +#if 1 + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS +# include /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined EXIT_SUCCESS +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* 1 */ + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined HSQL_LTYPE_IS_TRIVIAL && HSQL_LTYPE_IS_TRIVIAL \ + && defined HSQL_STYPE_IS_TRIVIAL && HSQL_STYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yy_state_t yyss_alloc; + YYSTYPE yyvs_alloc; + YYLTYPE yyls_alloc; +}; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \ + + YYSIZEOF (YYLTYPE)) \ + + 2 * YYSTACK_GAP_MAXIMUM) + +# define YYCOPY_NEEDED 1 + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYPTRDIFF_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / YYSIZEOF (*yyptr); \ + } \ + while (0) + +#endif + +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from SRC to DST. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) +# else +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYPTRDIFF_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (0) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 67 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 813 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 173 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 116 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 288 +/* YYNSTATES -- Number of states. */ +#define YYNSTATES 533 + +/* YYMAXUTOK -- Last valid token kind. */ +#define YYMAXUTOK 410 + + +/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, with out-of-bounds checking. */ +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK \ + ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ + : YYSYMBOL_YYUNDEF) + +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 162, 2, 2, + 167, 168, 160, 158, 171, 159, 169, 161, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 170, + 151, 148, 152, 172, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 165, 2, 166, 163, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 149, 150, 153, 154, 155, 156, 157, + 164 +}; + +#if HSQL_DEBUG + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ +static const yytype_int16 yyrline[] = +{ + 0, 288, 288, 309, 315, 324, 328, 332, 335, 338, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 363, 364, 369, 370, 374, 378, 390, 393, 396, 402, + 403, 410, 417, 420, 424, 438, 444, 453, 470, 474, + 477, 486, 500, 503, 508, 522, 535, 542, 549, 556, + 567, 568, 572, 573, 577, 578, 582, 589, 590, 591, + 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 606, 607, 611, 612, 613, 617, 618, 619, 623, + 624, 625, 626, 630, 631, 642, 648, 654, 659, 667, + 668, 677, 685, 688, 700, 709, 722, 729, 740, 741, + 751, 760, 761, 765, 777, 781, 785, 799, 800, 803, + 804, 815, 816, 820, 830, 843, 850, 854, 858, 865, + 868, 874, 886, 887, 891, 895, 896, 900, 905, 906, + 910, 915, 919, 920, 924, 925, 929, 930, 934, 938, + 939, 940, 946, 947, 951, 952, 953, 954, 955, 956, + 963, 964, 968, 969, 973, 974, 978, 988, 989, 990, + 991, 992, 996, 997, 998, 999, 1000, 1001, 1002, 1003, + 1004, 1005, 1006, 1010, 1011, 1015, 1016, 1017, 1018, 1019, + 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, + 1033, 1037, 1038, 1042, 1043, 1044, 1045, 1051, 1052, 1053, + 1054, 1058, 1059, 1063, 1064, 1068, 1069, 1070, 1071, 1072, + 1073, 1074, 1078, 1079, 1083, 1087, 1091, 1092, 1093, 1094, + 1095, 1096, 1100, 1104, 1108, 1112, 1113, 1114, 1115, 1119, + 1120, 1121, 1122, 1123, 1127, 1131, 1132, 1136, 1137, 1141, + 1145, 1149, 1161, 1162, 1172, 1173, 1177, 1178, 1187, 1188, + 1193, 1204, 1213, 1214, 1218, 1219, 1223, 1228, 1229, 1234, + 1235, 1240, 1241, 1246, 1247, 1256, 1257, 1261, 1265, 1269, + 1276, 1289, 1297, 1307, 1326, 1327, 1328, 1329, 1330, 1331, + 1332, 1333, 1334, 1335, 1340, 1349, 1350, 1355, 1356 +}; +#endif + +/** Accessing symbol of state STATE. */ +#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) + +#if 1 +/* The user-facing name of the symbol whose (internal) number is + YYSYMBOL. No bounds checking. */ +static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; + +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "\"end of file\"", "error", "\"invalid token\"", "IDENTIFIER", "STRING", + "FLOATVAL", "INTVAL", "DEALLOCATE", "PARAMETERS", "INTERSECT", + "TEMPORARY", "TIMESTAMP", "DISTINCT", "NVARCHAR", "RESTRICT", "TRUNCATE", + "ANALYZE", "BETWEEN", "CASCADE", "COLUMNS", "CONTROL", "DEFAULT", + "EXECUTE", "EXPLAIN", "INTEGER", "NATURAL", "PREPARE", "PRIMARY", + "SCHEMAS", "CHARACTER", "VARYING", "REAL", "DECIMAL", "SPATIAL", + "VARCHAR", "VIRTUAL", "DESCRIBE", "BEFORE", "COLUMN", "CREATE", "DELETE", + "DIRECT", "DOUBLE", "ESCAPE", "EXCEPT", "EXISTS", "EXTRACT", "CAST", + "FORMAT", "GLOBAL", "HAVING", "IMPORT", "INSERT", "ISNULL", "OFFSET", + "RENAME", "SCHEMA", "SELECT", "SORTED", "TABLES", "UNIQUE", "UNLOAD", + "UPDATE", "VALUES", "AFTER", "ALTER", "CROSS", "DELTA", "FLOAT", "GROUP", + "INDEX", "INNER", "LIMIT", "LOCAL", "MERGE", "MINUS", "ORDER", "OUTER", + "RIGHT", "TABLE", "UNION", "USING", "WHERE", "CALL", "CASE", "CHAR", + "COPY", "DATE", "DATETIME", "DESC", "DROP", "ELSE", "FILE", "FROM", + "FULL", "HASH", "HINT", "INTO", "JOIN", "LEFT", "LIKE", "LOAD", "LONG", + "NULL", "PLAN", "SHOW", "TEXT", "THEN", "TIME", "VIEW", "WHEN", "WITH", + "ADD", "ALL", "AND", "ASC", "END", "FOR", "INT", "KEY", "NOT", "OFF", + "SET", "TOP", "AS", "BY", "IF", "IN", "IS", "OF", "ON", "OR", "TO", + "ARRAY", "CONCAT", "ILIKE", "SECOND", "MINUTE", "HOUR", "DAY", "MONTH", + "YEAR", "TRUE", "FALSE", "TRANSACTION", "BEGIN", "COMMIT", "ROLLBACK", + "'='", "EQUALS", "NOTEQUALS", "'<'", "'>'", "LESS", "GREATER", "LESSEQ", + "GREATEREQ", "NOTNULL", "'+'", "'-'", "'*'", "'/'", "'%'", "'^'", + "UMINUS", "'['", "']'", "'('", "')'", "'.'", "';'", "','", "'?'", + "$accept", "input", "statement_list", "statement", + "preparable_statement", "opt_hints", "hint_list", "hint", + "transaction_statement", "opt_transaction_keyword", "prepare_statement", + "prepare_target_query", "execute_statement", "import_statement", + "file_type", "file_path", "opt_file_type", "export_statement", + "show_statement", "create_statement", "opt_not_exists", + "table_elem_commalist", "table_elem", "column_def", "column_type", + "opt_time_specification", "opt_decimal_specification", + "opt_column_constraints", "column_constraint", "table_constraint", + "drop_statement", "opt_exists", "alter_statement", "alter_action", + "drop_action", "delete_statement", "truncate_statement", + "insert_statement", "opt_column_list", "update_statement", + "update_clause_commalist", "update_clause", "select_statement", + "select_within_set_operation", + "select_within_set_operation_no_parentheses", "select_with_paren", + "select_no_paren", "set_operator", "set_type", "opt_all", + "select_clause", "opt_distinct", "select_list", "opt_from_clause", + "from_clause", "opt_where", "opt_group", "opt_having", "opt_order", + "order_list", "order_desc", "opt_order_type", "opt_top", "opt_limit", + "expr_list", "opt_literal_list", "literal_list", "expr_alias", "expr", + "operand", "scalar_expr", "unary_expr", "binary_expr", "logic_expr", + "in_expr", "case_expr", "case_list", "exists_expr", "comp_expr", + "function_expr", "extract_expr", "cast_expr", "datetime_field", + "array_expr", "array_index", "between_expr", "column_name", "literal", + "string_literal", "bool_literal", "num_literal", "int_literal", + "null_literal", "param_expr", "table_ref", "table_ref_atomic", + "nonjoin_table_ref_atomic", "table_ref_commalist", "table_ref_name", + "table_ref_name_no_alias", "table_name", "opt_index_name", "index_name", + "table_alias", "opt_table_alias", "alias", "opt_alias", + "opt_with_clause", "with_clause", "with_description_list", + "with_description", "join_clause", "opt_join_type", "join_condition", + "opt_semicolon", "ident_commalist", YY_NULLPTR +}; + +static const char * +yysymbol_name (yysymbol_kind_t yysymbol) +{ + return yytname[yysymbol]; +} +#endif + +#ifdef YYPRINT +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ +static const yytype_int16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, + 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, + 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, + 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, + 395, 396, 397, 398, 399, 400, 401, 402, 61, 403, + 404, 60, 62, 405, 406, 407, 408, 409, 43, 45, + 42, 47, 37, 94, 410, 91, 93, 40, 41, 46, + 59, 44, 63 +}; +#endif + +#define YYPACT_NINF (-429) + +#define yypact_value_is_default(Yyn) \ + ((Yyn) == YYPACT_NINF) + +#define YYTABLE_NINF (-286) + +#define yytable_value_is_error(Yyn) \ + ((Yyn) == YYTABLE_NINF) + + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +static const yytype_int16 yypact[] = +{ + 558, 40, 64, 75, 98, 64, 62, -5, 89, 56, + 64, 116, 64, 91, 35, 198, 68, 68, 68, 222, + 74, -429, 149, -429, 149, -429, -429, -429, -429, -429, + -429, -429, -429, -429, -429, -429, -429, -15, -429, 262, + 113, -429, 114, 193, -429, 167, 167, 167, 64, 300, + 64, 185, -429, 182, 72, 182, 182, 182, 64, -429, + 189, 144, -429, -429, -429, -429, -429, -429, 553, -429, + 232, -429, -429, 211, -15, 155, -429, 153, -429, 313, + 33, 328, 230, 354, 64, 64, 276, -429, 271, 202, + 376, 320, 64, 385, 385, 387, 64, 64, -429, 228, + 198, -429, 229, 395, 390, 235, 236, -429, -429, -429, + -15, 293, 284, -15, 131, -429, -429, -429, -429, -429, + -429, -429, -429, 242, 240, -429, -429, -429, -429, -429, + -429, -429, -429, -429, 367, -429, 286, -65, 202, 265, + -429, 385, 414, 1, 272, -31, -429, -429, 329, 310, + -429, 310, -429, -429, -429, -429, -429, -429, 419, -429, + -429, 265, -429, -429, 347, -429, -429, 155, -429, -429, + 265, 347, 265, 142, -429, -429, 33, -429, 64, 423, + 316, 38, 305, 24, 263, 264, 267, 163, 315, 273, + 368, -429, 233, -59, 396, -429, -429, -429, -429, -429, + -429, -429, -429, -429, -429, -429, -429, -429, -429, -429, + -429, 339, -429, 93, 274, -429, 265, 376, -429, 404, + -429, -429, 397, -429, -429, 277, 129, -429, 353, 279, + -429, 19, 131, -15, 280, -429, -45, 131, -59, 393, + 103, -429, 287, 361, -429, 687, 336, 292, 175, -429, + -429, -429, 316, 18, 13, 403, 201, 265, 265, 80, + -35, 295, 368, 589, 265, 164, 296, -68, 265, 265, + 368, -429, 368, -48, 298, 104, 368, 368, 368, 368, + 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, + 368, 395, 64, -429, 460, 33, -59, -429, 182, 300, + 33, -429, 419, 17, 276, -429, 265, -429, 463, -429, + -429, -429, -429, 265, -429, -429, -429, -429, 265, 265, + 414, 385, -429, 437, -429, 301, 302, -429, -429, 303, + -429, -429, -429, -429, 306, -429, 112, 309, 414, -429, + 38, -429, -429, 265, -429, -429, 304, -429, -429, -429, + -429, -429, -429, 384, 92, 143, 111, 265, 265, -429, + 403, 378, 85, -429, -429, -429, 365, 532, 608, 368, + 314, 233, -429, 377, 318, 608, 608, 608, 608, 648, + 648, 648, 648, 164, 164, -89, -89, -89, -73, 319, + -429, -429, 176, 21, -429, 183, -429, 316, -429, 57, + -429, 322, -429, 20, -429, 415, -429, -429, -429, -59, + -59, 184, -429, 323, 480, -429, 483, 485, 488, -429, + 379, -429, -429, 392, 112, -429, 414, 188, -429, 196, + -429, 265, 687, 265, 265, -429, 173, 145, 331, -429, + 368, 608, 233, 332, 209, -429, -429, -429, 333, -429, + -429, 335, 399, -429, -429, -429, 427, 428, 429, 409, + 17, 505, -429, -429, -429, 388, -429, -429, 503, 210, + 344, 346, 349, -429, -429, -429, 215, -429, -429, -41, + 350, -59, 217, -429, 265, -429, 589, 351, 220, -429, + -429, 20, 17, -429, -429, -429, 17, 60, 348, 265, + 352, -429, 515, -429, -429, -429, -429, -429, -429, -429, + -59, -429, -429, -429, -429, 362, 414, -29, -429, 357, + 355, 265, 226, 265, -429, -429, 21, -59, -429, -429, + -59, 358, -429 +}; + + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ +static const yytype_int16 yydefact[] = +{ + 266, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 30, 30, 30, 0, + 286, 3, 21, 19, 21, 18, 8, 9, 7, 11, + 16, 17, 13, 14, 12, 15, 10, 0, 265, 0, + 252, 95, 33, 0, 44, 51, 51, 51, 0, 0, + 0, 0, 251, 90, 0, 90, 90, 90, 0, 42, + 0, 267, 268, 29, 26, 28, 27, 1, 266, 2, + 0, 6, 5, 143, 0, 104, 105, 135, 87, 0, + 153, 0, 0, 255, 0, 0, 129, 37, 0, 99, + 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, + 0, 4, 0, 0, 123, 0, 0, 117, 118, 116, + 0, 120, 0, 0, 149, 253, 234, 237, 239, 240, + 235, 236, 241, 0, 152, 154, 229, 230, 231, 238, + 232, 233, 32, 31, 0, 254, 0, 0, 99, 0, + 94, 0, 0, 0, 0, 129, 101, 89, 0, 40, + 38, 40, 256, 88, 85, 86, 270, 269, 0, 142, + 122, 0, 112, 111, 135, 108, 107, 109, 119, 115, + 0, 135, 0, 0, 113, 34, 0, 50, 0, 0, + 266, 0, 0, 225, 0, 0, 0, 0, 0, 0, + 0, 227, 0, 128, 157, 164, 165, 166, 159, 161, + 167, 160, 180, 168, 169, 170, 171, 163, 158, 173, + 174, 0, 287, 0, 0, 97, 0, 0, 100, 0, + 91, 92, 0, 36, 41, 24, 0, 22, 126, 124, + 150, 264, 149, 0, 134, 136, 141, 149, 145, 147, + 144, 155, 0, 0, 47, 0, 0, 0, 0, 52, + 54, 55, 266, 123, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 176, 0, 175, 0, 0, 0, 0, + 0, 177, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 98, 0, 0, 103, 102, 90, 0, + 0, 20, 0, 0, 129, 125, 0, 262, 0, 263, + 156, 106, 110, 0, 140, 139, 138, 114, 0, 0, + 0, 0, 58, 0, 63, 75, 0, 62, 60, 0, + 70, 69, 59, 67, 72, 57, 78, 0, 0, 46, + 0, 49, 212, 0, 226, 228, 0, 216, 217, 218, + 219, 220, 221, 0, 0, 0, 0, 0, 0, 199, + 0, 0, 0, 172, 162, 191, 192, 0, 187, 0, + 0, 0, 178, 0, 190, 189, 205, 206, 207, 208, + 209, 210, 211, 182, 181, 184, 183, 185, 186, 0, + 35, 288, 0, 0, 39, 0, 23, 266, 127, 242, + 244, 0, 246, 260, 245, 131, 151, 261, 137, 148, + 146, 0, 45, 0, 0, 61, 0, 0, 0, 68, + 0, 80, 81, 0, 56, 76, 0, 0, 53, 0, + 203, 0, 0, 0, 0, 197, 0, 0, 0, 222, + 0, 188, 0, 0, 0, 179, 223, 96, 225, 93, + 25, 0, 0, 282, 274, 280, 278, 281, 276, 0, + 0, 0, 259, 250, 257, 0, 121, 48, 0, 0, + 0, 0, 0, 79, 82, 77, 0, 84, 213, 0, + 0, 201, 0, 200, 0, 204, 224, 0, 0, 195, + 193, 260, 0, 277, 279, 275, 0, 243, 261, 0, + 0, 74, 0, 64, 66, 71, 83, 214, 215, 198, + 202, 196, 194, 247, 271, 283, 0, 133, 65, 0, + 0, 0, 0, 0, 130, 73, 0, 284, 272, 258, + 132, 0, 273 +}; + + /* YYPGOTO[NTERM-NUM]. */ +static const yytype_int16 yypgoto[] = +{ + -429, -429, -429, 461, -429, 508, -429, 231, -429, 225, + -429, -429, -429, -429, 237, -91, 383, -429, -429, -429, + 207, -429, 197, -429, 106, -429, -429, -429, 115, -429, + -429, -50, -429, -429, -429, -429, -429, -429, 405, -429, + -429, 324, -172, -84, -429, -12, -72, -42, -429, -429, + -70, 289, -429, -429, -429, -126, -429, -429, 49, -429, + 249, -429, -429, 26, -250, -429, -23, 243, -139, -173, + -429, -429, -429, -429, -429, -429, 291, -429, -429, -429, + -429, -429, -429, -429, -429, -429, -366, -54, -81, -429, + -429, -93, -429, -429, -429, -428, 71, -429, -429, -429, + -1, -429, -429, -429, 73, 338, -429, -429, -429, -429, + 466, -429, -429, -429, -429, -302 +}; + + /* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = +{ + 0, 19, 20, 21, 22, 71, 226, 227, 23, 64, + 24, 133, 25, 26, 88, 149, 223, 27, 28, 29, + 83, 248, 249, 250, 336, 419, 415, 424, 425, 251, + 30, 92, 31, 220, 221, 32, 33, 34, 143, 35, + 145, 146, 36, 164, 165, 166, 76, 110, 111, 169, + 77, 161, 228, 304, 305, 140, 466, 524, 114, 234, + 235, 316, 104, 174, 229, 123, 124, 230, 231, 194, + 195, 196, 197, 198, 199, 200, 260, 201, 202, 203, + 204, 205, 353, 206, 207, 208, 209, 210, 126, 127, + 128, 129, 130, 131, 398, 399, 400, 401, 402, 51, + 403, 136, 153, 462, 463, 464, 310, 37, 38, 61, + 62, 404, 459, 528, 69, 213 +}; + + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ +static const yytype_int16 yytable[] = +{ + 193, 41, 106, 151, 44, 95, 96, 97, 244, 52, + 159, 54, 150, 150, 362, 263, 344, 265, 411, 218, + 40, 523, 307, 307, 448, 75, 125, 449, 179, 171, + 160, 236, 497, 238, 240, 113, 427, 116, 117, 118, + 167, 245, 73, 167, 314, 276, 268, 86, 259, 89, + 211, 139, 369, 267, 58, 268, 357, 98, 73, 180, + 150, 276, 105, 269, 214, 246, 39, 40, 515, 268, + 315, 215, 269, 268, 290, 358, 291, 296, 42, 370, + 341, 359, 452, 137, 138, 452, 269, 156, 48, 263, + 269, 148, 291, 429, 59, 154, 155, 367, 247, 368, + 364, 43, 181, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 354, 355, + 266, 444, 241, 453, 476, 233, 453, 507, 454, 365, + 366, 454, 45, 268, 455, 456, 119, 455, 456, 420, + 217, 46, 306, 308, 461, 183, 116, 117, 118, 312, + 269, 457, 74, 50, 457, -283, 458, 319, -283, 458, + 531, 55, 107, 167, 107, 93, 183, 116, 117, 118, + 56, 47, 421, 345, 236, 120, 121, 242, 405, 409, + 410, 191, 49, 346, 397, 172, 342, 184, 185, 186, + 258, 253, 488, 254, 268, 53, 441, 108, 389, 108, + 57, 60, 434, 173, 94, 122, 268, 372, 184, 185, + 186, 269, 63, 232, 522, 422, 432, 268, 436, 437, + 237, 358, 67, 269, 373, 451, 187, 435, -248, 112, + 412, -249, 423, 109, 269, 109, 183, 116, 117, 118, + 150, 125, 65, 66, 68, 119, 125, 187, 393, 517, + 433, 439, 484, 84, 85, 239, 306, 268, 311, 268, + 70, 293, 188, 317, 294, 78, 119, 486, 183, 116, + 117, 118, 392, 258, 269, 189, 269, 395, 184, 185, + 186, 80, 79, 188, 120, 121, 81, 268, 438, 483, + 73, 390, 479, 82, 481, 482, 189, 301, 276, 443, + 302, 190, 191, 87, 269, 120, 121, 90, 91, 192, + 184, 185, 186, 99, 122, 100, 115, 187, 183, 116, + 117, 118, 190, 191, 287, 288, 289, 290, 102, 291, + 192, 268, 132, 509, 103, 122, 119, 347, 348, 349, + 350, 351, 352, 339, 447, 510, 340, 176, 269, 187, + 134, 450, 467, 188, 176, 294, 477, 135, 139, 294, + 261, 185, 186, 141, 478, 147, 189, 306, 119, 142, + 487, 183, 116, 117, 118, 120, 121, 490, 501, 144, + 306, 502, 527, 506, 530, 188, 294, 452, 512, 116, + 152, 306, 190, 191, 529, 74, 158, 294, 189, 187, + 192, 118, 160, 162, 163, 122, 168, 120, 121, 170, + 175, 176, 177, 270, 185, 186, 178, 212, 119, 219, + 216, 222, 225, 112, 190, 191, 243, 15, 453, 252, + 255, 256, 192, 454, 257, 262, 292, 122, 264, 455, + 456, 295, 298, 520, 300, 299, 303, 318, 189, 271, + 306, 313, 187, 321, 320, 337, 457, 120, 121, 338, + 73, 458, 360, 391, 363, 371, 407, 413, 414, 416, + 417, 119, 430, 418, 190, 191, 426, 431, 369, 268, + 445, 442, 192, 291, 465, 446, 469, 122, 262, 470, + 468, 471, 521, 460, 472, 474, 272, 492, 473, 485, + 489, 189, 254, 491, 493, 494, 495, 496, 498, 500, + 120, 121, 503, 499, 504, 516, 273, 505, 508, 511, + 518, 519, 526, 274, 275, 525, 532, 190, 191, 101, + 276, 277, 72, 396, 224, 192, 394, 428, 480, 475, + 122, 297, 343, 182, 278, 279, 280, 281, 282, 406, + 356, 283, 284, -285, 285, 286, 287, 288, 289, 290, + 1, 291, 408, 514, 513, 1, 157, 0, 2, 309, + 0, 0, 0, 2, 0, 3, 0, 0, 0, 4, + 3, 0, 0, 0, 4, 271, 0, 0, 0, 5, + 0, 0, 6, 7, 5, 0, 0, 6, 7, 0, + 0, 0, 0, 0, 8, 9, 0, 0, 0, 8, + 9, 0, 0, 0, 0, 10, 0, 0, 11, 0, + 10, 0, 0, 11, 0, 0, 0, 0, 0, 0, + 0, 0, 272, 0, 0, 0, 0, 0, 0, 12, + 0, 0, 271, 13, 12, 0, 440, 0, 13, 0, + 0, 0, 361, 0, 0, 0, 0, 0, 14, 0, + 275, 271, 0, 14, 15, 0, 276, 277, 0, 15, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 278, 279, 280, 281, 282, 0, 0, 283, 284, 272, + 285, 286, 287, 288, 289, 290, 0, 291, 16, 17, + 18, 271, 0, 16, 17, 18, 0, 0, -286, 361, + 0, 322, 0, 0, 0, 0, 323, 275, 324, 325, + 0, 326, 0, 276, 277, 0, 0, 0, 0, 327, + 0, 0, 0, 0, 0, 0, 275, 278, 279, 280, + 281, 282, 276, -286, 283, 284, 0, 285, 286, 287, + 288, 289, 290, 0, 291, 328, -286, -286, -286, 281, + 282, 0, 0, 283, 284, 0, 285, 286, 287, 288, + 289, 290, 329, 291, 330, 331, 275, 0, 0, 0, + 0, 0, 276, 0, 0, 0, 0, 0, 0, 332, + 0, 0, 0, 333, 0, 334, 0, 0, 0, -286, + -286, 0, 0, -286, -286, 335, 285, 286, 287, 288, + 289, 290, 0, 291 +}; + +static const yytype_int16 yycheck[] = +{ + 139, 2, 74, 94, 5, 55, 56, 57, 180, 10, + 103, 12, 93, 94, 264, 188, 3, 190, 320, 145, + 3, 50, 3, 3, 3, 37, 80, 393, 93, 113, + 12, 170, 460, 172, 173, 77, 338, 4, 5, 6, + 110, 3, 57, 113, 89, 134, 114, 48, 187, 50, + 141, 82, 100, 192, 19, 114, 91, 58, 57, 124, + 141, 134, 74, 131, 63, 27, 26, 3, 496, 114, + 115, 143, 131, 114, 163, 110, 165, 216, 3, 127, + 252, 116, 25, 84, 85, 25, 131, 99, 93, 262, + 131, 92, 165, 343, 59, 96, 97, 270, 60, 272, + 168, 3, 167, 276, 277, 278, 279, 280, 281, 282, + 283, 284, 285, 286, 287, 288, 289, 290, 257, 258, + 192, 371, 176, 66, 426, 167, 66, 168, 71, 268, + 269, 71, 70, 114, 77, 78, 103, 77, 78, 27, + 171, 79, 171, 124, 124, 3, 4, 5, 6, 233, + 131, 94, 167, 97, 94, 98, 99, 54, 98, 99, + 526, 70, 9, 233, 9, 93, 3, 4, 5, 6, + 79, 109, 60, 160, 313, 142, 143, 178, 304, 318, + 319, 160, 93, 255, 167, 54, 168, 45, 46, 47, + 110, 167, 442, 169, 114, 79, 369, 44, 291, 44, + 109, 3, 91, 72, 132, 172, 114, 103, 45, 46, + 47, 131, 144, 164, 516, 103, 124, 114, 357, 358, + 171, 110, 0, 131, 120, 397, 84, 116, 171, 76, + 321, 171, 120, 80, 131, 80, 3, 4, 5, 6, + 321, 295, 17, 18, 170, 103, 300, 84, 298, 499, + 107, 166, 107, 46, 47, 113, 171, 114, 232, 114, + 111, 168, 120, 237, 171, 3, 103, 440, 3, 4, + 5, 6, 295, 110, 131, 133, 131, 300, 45, 46, + 47, 167, 169, 120, 142, 143, 93, 114, 360, 116, + 57, 292, 431, 126, 433, 434, 133, 168, 134, 371, + 171, 159, 160, 3, 131, 142, 143, 122, 126, 167, + 45, 46, 47, 124, 172, 171, 3, 84, 3, 4, + 5, 6, 159, 160, 160, 161, 162, 163, 96, 165, + 167, 114, 4, 116, 123, 172, 103, 136, 137, 138, + 139, 140, 141, 168, 168, 484, 171, 171, 131, 84, + 120, 168, 168, 120, 171, 171, 168, 3, 82, 171, + 45, 46, 47, 92, 168, 45, 133, 171, 103, 167, + 442, 3, 4, 5, 6, 142, 143, 168, 168, 3, + 171, 171, 521, 168, 523, 120, 171, 25, 168, 4, + 3, 171, 159, 160, 168, 167, 167, 171, 133, 84, + 167, 6, 12, 168, 168, 172, 113, 142, 143, 125, + 168, 171, 45, 17, 46, 47, 130, 3, 103, 90, + 148, 111, 3, 76, 159, 160, 3, 111, 66, 124, + 167, 167, 167, 71, 167, 120, 97, 172, 165, 77, + 78, 167, 38, 81, 167, 48, 93, 54, 133, 53, + 171, 171, 84, 92, 167, 119, 94, 142, 143, 167, + 57, 99, 167, 3, 168, 167, 3, 30, 167, 167, + 167, 103, 168, 167, 159, 160, 167, 93, 100, 114, + 103, 167, 167, 165, 69, 166, 6, 172, 120, 6, + 167, 6, 130, 171, 6, 103, 100, 98, 119, 168, + 168, 133, 169, 168, 77, 77, 77, 98, 3, 6, + 142, 143, 168, 125, 168, 167, 120, 168, 168, 168, + 168, 6, 167, 127, 128, 168, 168, 159, 160, 68, + 134, 135, 24, 302, 151, 167, 299, 340, 432, 424, + 172, 217, 253, 138, 148, 149, 150, 151, 152, 306, + 259, 155, 156, 0, 158, 159, 160, 161, 162, 163, + 7, 165, 313, 492, 491, 7, 100, -1, 15, 231, + -1, -1, -1, 15, -1, 22, -1, -1, -1, 26, + 22, -1, -1, -1, 26, 53, -1, -1, -1, 36, + -1, -1, 39, 40, 36, -1, -1, 39, 40, -1, + -1, -1, -1, -1, 51, 52, -1, -1, -1, 51, + 52, -1, -1, -1, -1, 62, -1, -1, 65, -1, + 62, -1, -1, 65, -1, -1, -1, -1, -1, -1, + -1, -1, 100, -1, -1, -1, -1, -1, -1, 86, + -1, -1, 53, 90, 86, -1, 114, -1, 90, -1, + -1, -1, 120, -1, -1, -1, -1, -1, 105, -1, + 128, 53, -1, 105, 111, -1, 134, 135, -1, 111, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 148, 149, 150, 151, 152, -1, -1, 155, 156, 100, + 158, 159, 160, 161, 162, 163, -1, 165, 145, 146, + 147, 53, -1, 145, 146, 147, -1, -1, 100, 120, + -1, 24, -1, -1, -1, -1, 29, 128, 31, 32, + -1, 34, -1, 134, 135, -1, -1, -1, -1, 42, + -1, -1, -1, -1, -1, -1, 128, 148, 149, 150, + 151, 152, 134, 135, 155, 156, -1, 158, 159, 160, + 161, 162, 163, -1, 165, 68, 148, 149, 150, 151, + 152, -1, -1, 155, 156, -1, 158, 159, 160, 161, + 162, 163, 85, 165, 87, 88, 128, -1, -1, -1, + -1, -1, 134, -1, -1, -1, -1, -1, -1, 102, + -1, -1, -1, 106, -1, 108, -1, -1, -1, 151, + 152, -1, -1, 155, 156, 118, 158, 159, 160, 161, + 162, 163, -1, 165 +}; + + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_int16 yystos[] = +{ + 0, 7, 15, 22, 26, 36, 39, 40, 51, 52, + 62, 65, 86, 90, 105, 111, 145, 146, 147, 174, + 175, 176, 177, 181, 183, 185, 186, 190, 191, 192, + 203, 205, 208, 209, 210, 212, 215, 280, 281, 26, + 3, 273, 3, 3, 273, 70, 79, 109, 93, 93, + 97, 272, 273, 79, 273, 70, 79, 109, 19, 59, + 3, 282, 283, 144, 182, 182, 182, 0, 170, 287, + 111, 178, 178, 57, 167, 218, 219, 223, 3, 169, + 167, 93, 126, 193, 193, 193, 273, 3, 187, 273, + 122, 126, 204, 93, 132, 204, 204, 204, 273, 124, + 171, 176, 96, 123, 235, 218, 219, 9, 44, 80, + 220, 221, 76, 220, 231, 3, 4, 5, 6, 103, + 142, 143, 172, 238, 239, 260, 261, 262, 263, 264, + 265, 266, 4, 184, 120, 3, 274, 273, 273, 82, + 228, 92, 167, 211, 3, 213, 214, 45, 273, 188, + 261, 188, 3, 275, 273, 273, 218, 283, 167, 264, + 12, 224, 168, 168, 216, 217, 218, 223, 113, 222, + 125, 216, 54, 72, 236, 168, 171, 45, 130, 93, + 124, 167, 211, 3, 45, 46, 47, 84, 120, 133, + 159, 160, 167, 241, 242, 243, 244, 245, 246, 247, + 248, 250, 251, 252, 253, 254, 256, 257, 258, 259, + 260, 188, 3, 288, 63, 219, 148, 171, 228, 90, + 206, 207, 111, 189, 189, 3, 179, 180, 225, 237, + 240, 241, 231, 220, 232, 233, 241, 231, 241, 113, + 241, 260, 273, 3, 215, 3, 27, 60, 194, 195, + 196, 202, 124, 167, 169, 167, 167, 167, 110, 241, + 249, 45, 120, 242, 165, 242, 219, 241, 114, 131, + 17, 53, 100, 120, 127, 128, 134, 135, 148, 149, + 150, 151, 152, 155, 156, 158, 159, 160, 161, 162, + 163, 165, 97, 168, 171, 167, 241, 214, 38, 48, + 167, 168, 171, 93, 226, 227, 171, 3, 124, 278, + 279, 236, 216, 171, 89, 115, 234, 236, 54, 54, + 167, 92, 24, 29, 31, 32, 34, 42, 68, 85, + 87, 88, 102, 106, 108, 118, 197, 119, 167, 168, + 171, 215, 168, 224, 3, 160, 219, 136, 137, 138, + 139, 140, 141, 255, 241, 241, 249, 91, 110, 116, + 167, 120, 237, 168, 168, 241, 241, 242, 242, 100, + 127, 167, 103, 120, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, 242, 264, + 273, 3, 239, 204, 187, 239, 180, 167, 267, 268, + 269, 270, 271, 273, 284, 228, 240, 3, 233, 241, + 241, 288, 188, 30, 167, 199, 167, 167, 167, 198, + 27, 60, 103, 120, 200, 201, 167, 288, 195, 237, + 168, 93, 124, 107, 91, 116, 241, 241, 219, 166, + 114, 242, 167, 219, 237, 103, 166, 168, 3, 259, + 168, 215, 25, 66, 71, 77, 78, 94, 99, 285, + 171, 124, 276, 277, 278, 69, 229, 168, 167, 6, + 6, 6, 6, 119, 103, 201, 288, 168, 168, 241, + 197, 241, 241, 116, 107, 168, 242, 219, 237, 168, + 168, 168, 98, 77, 77, 77, 98, 268, 3, 125, + 6, 168, 171, 168, 168, 168, 168, 168, 168, 116, + 241, 168, 168, 277, 269, 268, 167, 237, 168, 6, + 81, 130, 288, 50, 230, 168, 167, 241, 286, 168, + 241, 259, 168 +}; + + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_int16 yyr1[] = +{ + 0, 173, 174, 175, 175, 176, 176, 176, 176, 176, + 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, + 178, 178, 179, 179, 180, 180, 181, 181, 181, 182, + 182, 183, 184, 185, 185, 186, 186, 187, 188, 189, + 189, 190, 191, 191, 191, 192, 192, 192, 192, 192, + 193, 193, 194, 194, 195, 195, 196, 197, 197, 197, + 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, + 197, 198, 198, 199, 199, 199, 200, 200, 200, 201, + 201, 201, 201, 202, 202, 203, 203, 203, 203, 204, + 204, 205, 206, 207, 208, 209, 210, 210, 211, 211, + 212, 213, 213, 214, 215, 215, 215, 216, 216, 217, + 217, 218, 218, 219, 219, 220, 221, 221, 221, 222, + 222, 223, 224, 224, 225, 226, 226, 227, 228, 228, + 229, 229, 230, 230, 231, 231, 232, 232, 233, 234, + 234, 234, 235, 235, 236, 236, 236, 236, 236, 236, + 237, 237, 238, 238, 239, 239, 240, 241, 241, 241, + 241, 241, 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 243, 243, 244, 244, 244, 244, 244, + 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, + 245, 246, 246, 247, 247, 247, 247, 248, 248, 248, + 248, 249, 249, 250, 250, 251, 251, 251, 251, 251, + 251, 251, 252, 252, 253, 254, 255, 255, 255, 255, + 255, 255, 256, 257, 258, 259, 259, 259, 259, 260, + 260, 260, 260, 260, 261, 262, 262, 263, 263, 264, + 265, 266, 267, 267, 268, 268, 269, 269, 270, 270, + 271, 272, 273, 273, 274, 274, 275, 276, 276, 277, + 277, 278, 278, 279, 279, 280, 280, 281, 282, 282, + 283, 284, 284, 284, 285, 285, 285, 285, 285, 285, + 285, 285, 285, 285, 286, 287, 287, 288, 288 +}; + + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +static const yytype_int8 yyr2[] = +{ + 0, 2, 2, 1, 3, 2, 2, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 5, 0, 1, 3, 1, 4, 2, 2, 2, 1, + 0, 4, 1, 2, 5, 7, 5, 1, 1, 3, + 0, 5, 2, 3, 2, 8, 7, 6, 9, 7, + 3, 0, 1, 3, 1, 1, 3, 1, 1, 1, + 1, 2, 1, 1, 4, 5, 4, 1, 2, 1, + 1, 3, 0, 5, 3, 0, 1, 2, 0, 2, + 1, 1, 2, 5, 4, 4, 4, 3, 4, 2, + 0, 5, 1, 4, 4, 2, 8, 5, 3, 0, + 5, 1, 3, 3, 2, 2, 6, 1, 1, 1, + 3, 3, 3, 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, 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, 6, 1, 1, 1, 1, + 1, 1, 4, 4, 5, 1, 3, 1, 3, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 3, 1, 1, 1, 4, 1, 3, + 2, 1, 1, 3, 1, 0, 1, 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 +}; + + +enum { YYENOMEM = -2 }; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = SQL_HSQL_EMPTY) + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ + do \ + if (yychar == SQL_HSQL_EMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (&yylloc, result, scanner, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ + while (0) + +/* Backward compatibility with an undocumented macro. + Use SQL_HSQL_error or SQL_HSQL_UNDEF. */ +#define YYERRCODE SQL_HSQL_UNDEF + +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (N) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (0) +#endif + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) + + +/* Enable debugging if requested. */ +#if HSQL_DEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) + + +/* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know + we won't break user code: when these are the locations we know. */ + +# ifndef YY_LOCATION_PRINT +# if defined HSQL_LTYPE_IS_TRIVIAL && HSQL_LTYPE_IS_TRIVIAL + +/* Print *YYLOCP on YYO. Private, do not rely on its existence. */ + +YY_ATTRIBUTE_UNUSED +static int +yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) +{ + int res = 0; + int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; + if (0 <= yylocp->first_line) + { + res += YYFPRINTF (yyo, "%d", yylocp->first_line); + if (0 <= yylocp->first_column) + res += YYFPRINTF (yyo, ".%d", yylocp->first_column); + } + if (0 <= yylocp->last_line) + { + if (yylocp->first_line < yylocp->last_line) + { + res += YYFPRINTF (yyo, "-%d", yylocp->last_line); + if (0 <= end_col) + res += YYFPRINTF (yyo, ".%d", end_col); + } + else if (0 <= end_col && yylocp->first_column < end_col) + res += YYFPRINTF (yyo, "-%d", end_col); + } + return res; + } + +# define YY_LOCATION_PRINT(File, Loc) \ + yy_location_print_ (File, &(Loc)) + +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif +# endif /* !defined YY_LOCATION_PRINT */ + + +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Kind, Value, Location, result, scanner); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) + + +/*-----------------------------------. +| Print this symbol's value on YYO. | +`-----------------------------------*/ + +static void +yy_symbol_value_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, hsql::SQLParserResult* result, yyscan_t scanner) +{ + FILE *yyoutput = yyo; + YY_USE (yyoutput); + YY_USE (yylocationp); + YY_USE (result); + YY_USE (scanner); + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yykind < YYNTOKENS) + YYPRINT (yyo, yytoknum[yykind], *yyvaluep); +# endif + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YY_USE (yykind); + YY_IGNORE_MAYBE_UNINITIALIZED_END +} + + +/*---------------------------. +| Print this symbol on YYO. | +`---------------------------*/ + +static void +yy_symbol_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, hsql::SQLParserResult* result, yyscan_t scanner) +{ + YYFPRINTF (yyo, "%s %s (", + yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); + + YY_LOCATION_PRINT (yyo, *yylocationp); + YYFPRINTF (yyo, ": "); + yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, result, scanner); + YYFPRINTF (yyo, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +static void +yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) +{ + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +static void +yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, + int yyrule, hsql::SQLParserResult* result, yyscan_t scanner) +{ + int yylno = yyrline[yyrule]; + int yynrhs = yyr2[yyrule]; + int yyi; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, + YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), + &yyvsp[(yyi + 1) - (yynrhs)], + &(yylsp[(yyi + 1) - (yynrhs)]), result, scanner); + YYFPRINTF (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, yylsp, Rule, result, scanner); \ +} while (0) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !HSQL_DEBUG */ +# define YYDPRINTF(Args) ((void) 0) +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !HSQL_DEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + +/* Context of a parse error. */ +typedef struct +{ + yy_state_t *yyssp; + yysymbol_kind_t yytoken; + YYLTYPE *yylloc; +} yypcontext_t; + +/* Put in YYARG at most YYARGN of the expected tokens given the + current YYCTX, and return the number of tokens stored in YYARG. If + YYARG is null, return the number of expected tokens (guaranteed to + be less than YYNTOKENS). Return YYENOMEM on memory exhaustion. + Return 0 if there are more than YYARGN expected tokens, yet fill + YYARG up to YYARGN. */ +static int +yypcontext_expected_tokens (const yypcontext_t *yyctx, + yysymbol_kind_t yyarg[], int yyargn) +{ + /* Actual size of YYARG. */ + int yycount = 0; + int yyn = yypact[+*yyctx->yyssp]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (!yyarg) + ++yycount; + else if (yycount == yyargn) + return 0; + else + yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx); + } + } + if (yyarg && yycount == 0 && 0 < yyargn) + yyarg[0] = YYSYMBOL_YYEMPTY; + return yycount; +} + + + + +#ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) +# else +/* Return the length of YYSTR. */ +static YYPTRDIFF_T +yystrlen (const char *yystr) +{ + YYPTRDIFF_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +#endif + +#ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +static char * +yystpcpy (char *yydest, const char *yysrc) +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +#endif + +#ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYPTRDIFF_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYPTRDIFF_T yyn = 0; + char const *yyp = yystr; + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + else + goto append; + + append: + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (yyres) + return yystpcpy (yyres, yystr) - yyres; + else + return yystrlen (yystr); +} +#endif + + +static int +yy_syntax_error_arguments (const yypcontext_t *yyctx, + yysymbol_kind_t yyarg[], int yyargn) +{ + /* Actual size of YYARG. */ + int yycount = 0; + /* There are many possibilities here to consider: + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yyctx->yytoken != YYSYMBOL_YYEMPTY) + { + int yyn; + if (yyarg) + yyarg[yycount] = yyctx->yytoken; + ++yycount; + yyn = yypcontext_expected_tokens (yyctx, + yyarg ? yyarg + 1 : yyarg, yyargn - 1); + if (yyn == YYENOMEM) + return YYENOMEM; + else + yycount += yyn; + } + return yycount; +} + +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. + + Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, + const yypcontext_t *yyctx) +{ + enum { YYARGS_MAX = 5 }; + /* Internationalized format string. */ + const char *yyformat = YY_NULLPTR; + /* Arguments of yyformat: reported tokens (one for the "unexpected", + one per "expected"). */ + yysymbol_kind_t yyarg[YYARGS_MAX]; + /* Cumulated lengths of YYARG. */ + YYPTRDIFF_T yysize = 0; + + /* Actual size of YYARG. */ + int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX); + if (yycount == YYENOMEM) + return YYENOMEM; + + switch (yycount) + { +#define YYCASE_(N, S) \ + 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")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +#undef YYCASE_ + } + + /* Compute error message size. Don't count the "%s"s, but reserve + room for the terminator. */ + yysize = yystrlen (yyformat) - 2 * yycount + 1; + { + int yyi; + for (yyi = 0; yyi < yycount; ++yyi) + { + YYPTRDIFF_T yysize1 + = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]); + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else + return YYENOMEM; + } + } + + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return -1; + } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]); + yyformat += 2; + } + else + { + ++yyp; + ++yyformat; + } + } + return 0; +} + + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +static void +yydestruct (const char *yymsg, + yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, hsql::SQLParserResult* result, yyscan_t scanner) +{ + YY_USE (yyvaluep); + YY_USE (yylocationp); + YY_USE (result); + YY_USE (scanner); + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); + + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + switch (yykind) + { + case YYSYMBOL_IDENTIFIER: /* IDENTIFIER */ +#line 157 "bison_parser.y" + { free( (((*yyvaluep).sval)) ); } +#line 1975 "bison_parser.cpp" + break; + + case YYSYMBOL_STRING: /* STRING */ +#line 157 "bison_parser.y" + { free( (((*yyvaluep).sval)) ); } +#line 1981 "bison_parser.cpp" + break; + + case YYSYMBOL_FLOATVAL: /* FLOATVAL */ +#line 155 "bison_parser.y" + { } +#line 1987 "bison_parser.cpp" + break; + + case YYSYMBOL_INTVAL: /* INTVAL */ +#line 155 "bison_parser.y" + { } +#line 1993 "bison_parser.cpp" + break; + + case YYSYMBOL_statement_list: /* statement_list */ +#line 158 "bison_parser.y" + { + if ((((*yyvaluep).stmt_vec)) != nullptr) { + for (auto ptr : *(((*yyvaluep).stmt_vec))) { + delete ptr; + } + } + delete (((*yyvaluep).stmt_vec)); +} +#line 2006 "bison_parser.cpp" + break; + + case YYSYMBOL_statement: /* statement */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).statement)); } +#line 2012 "bison_parser.cpp" + break; + + case YYSYMBOL_preparable_statement: /* preparable_statement */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).statement)); } +#line 2018 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_hints: /* opt_hints */ +#line 158 "bison_parser.y" + { + if ((((*yyvaluep).expr_vec)) != nullptr) { + for (auto ptr : *(((*yyvaluep).expr_vec))) { + delete ptr; + } + } + delete (((*yyvaluep).expr_vec)); +} +#line 2031 "bison_parser.cpp" + break; + + case YYSYMBOL_hint_list: /* hint_list */ +#line 158 "bison_parser.y" + { + if ((((*yyvaluep).expr_vec)) != nullptr) { + for (auto ptr : *(((*yyvaluep).expr_vec))) { + delete ptr; + } + } + delete (((*yyvaluep).expr_vec)); +} +#line 2044 "bison_parser.cpp" + break; + + case YYSYMBOL_hint: /* hint */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2050 "bison_parser.cpp" + break; + + case YYSYMBOL_transaction_statement: /* transaction_statement */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).transaction_stmt)); } +#line 2056 "bison_parser.cpp" + break; + + case YYSYMBOL_prepare_statement: /* prepare_statement */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).prep_stmt)); } +#line 2062 "bison_parser.cpp" + break; + + case YYSYMBOL_prepare_target_query: /* prepare_target_query */ +#line 157 "bison_parser.y" + { free( (((*yyvaluep).sval)) ); } +#line 2068 "bison_parser.cpp" + break; + + case YYSYMBOL_execute_statement: /* execute_statement */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).exec_stmt)); } +#line 2074 "bison_parser.cpp" + break; + + case YYSYMBOL_import_statement: /* import_statement */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).import_stmt)); } +#line 2080 "bison_parser.cpp" + break; + + case YYSYMBOL_file_type: /* file_type */ +#line 155 "bison_parser.y" + { } +#line 2086 "bison_parser.cpp" + break; + + case YYSYMBOL_file_path: /* file_path */ +#line 157 "bison_parser.y" + { free( (((*yyvaluep).sval)) ); } +#line 2092 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_file_type: /* opt_file_type */ +#line 155 "bison_parser.y" + { } +#line 2098 "bison_parser.cpp" + break; + + case YYSYMBOL_export_statement: /* export_statement */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).export_stmt)); } +#line 2104 "bison_parser.cpp" + break; + + case YYSYMBOL_show_statement: /* show_statement */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).show_stmt)); } +#line 2110 "bison_parser.cpp" + break; + + case YYSYMBOL_create_statement: /* create_statement */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).create_stmt)); } +#line 2116 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_not_exists: /* opt_not_exists */ +#line 155 "bison_parser.y" + { } +#line 2122 "bison_parser.cpp" + break; + + case YYSYMBOL_table_elem_commalist: /* table_elem_commalist */ +#line 158 "bison_parser.y" + { + if ((((*yyvaluep).table_element_vec)) != nullptr) { + for (auto ptr : *(((*yyvaluep).table_element_vec))) { + delete ptr; + } + } + delete (((*yyvaluep).table_element_vec)); +} +#line 2135 "bison_parser.cpp" + break; + + case YYSYMBOL_table_elem: /* table_elem */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).table_element_t)); } +#line 2141 "bison_parser.cpp" + break; + + case YYSYMBOL_column_def: /* column_def */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).column_t)); } +#line 2147 "bison_parser.cpp" + break; + + case YYSYMBOL_column_type: /* column_type */ +#line 155 "bison_parser.y" + { } +#line 2153 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_time_specification: /* opt_time_specification */ +#line 155 "bison_parser.y" + { } +#line 2159 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_decimal_specification: /* opt_decimal_specification */ +#line 155 "bison_parser.y" + { } +#line 2165 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_column_constraints: /* opt_column_constraints */ +#line 155 "bison_parser.y" + { } +#line 2171 "bison_parser.cpp" + break; + + case YYSYMBOL_column_constraint: /* column_constraint */ +#line 155 "bison_parser.y" + { } +#line 2177 "bison_parser.cpp" + break; + + case YYSYMBOL_table_constraint: /* table_constraint */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).table_constraint_t)); } +#line 2183 "bison_parser.cpp" + break; + + case YYSYMBOL_drop_statement: /* drop_statement */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).drop_stmt)); } +#line 2189 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_exists: /* opt_exists */ +#line 155 "bison_parser.y" + { } +#line 2195 "bison_parser.cpp" + break; + + case YYSYMBOL_alter_statement: /* alter_statement */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).alter_stmt)); } +#line 2201 "bison_parser.cpp" + break; + + case YYSYMBOL_alter_action: /* alter_action */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).alter_action_t)); } +#line 2207 "bison_parser.cpp" + break; + + case YYSYMBOL_drop_action: /* drop_action */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).drop_action_t)); } +#line 2213 "bison_parser.cpp" + break; + + case YYSYMBOL_delete_statement: /* delete_statement */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).delete_stmt)); } +#line 2219 "bison_parser.cpp" + break; + + case YYSYMBOL_truncate_statement: /* truncate_statement */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).delete_stmt)); } +#line 2225 "bison_parser.cpp" + break; + + case YYSYMBOL_insert_statement: /* insert_statement */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).insert_stmt)); } +#line 2231 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_column_list: /* opt_column_list */ +#line 158 "bison_parser.y" + { + if ((((*yyvaluep).str_vec)) != nullptr) { + for (auto ptr : *(((*yyvaluep).str_vec))) { + delete ptr; + } + } + delete (((*yyvaluep).str_vec)); +} +#line 2244 "bison_parser.cpp" + break; + + case YYSYMBOL_update_statement: /* update_statement */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).update_stmt)); } +#line 2250 "bison_parser.cpp" + break; + + case YYSYMBOL_update_clause_commalist: /* update_clause_commalist */ +#line 158 "bison_parser.y" + { + if ((((*yyvaluep).update_vec)) != nullptr) { + for (auto ptr : *(((*yyvaluep).update_vec))) { + delete ptr; + } + } + delete (((*yyvaluep).update_vec)); +} +#line 2263 "bison_parser.cpp" + break; + + case YYSYMBOL_update_clause: /* update_clause */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).update_t)); } +#line 2269 "bison_parser.cpp" + break; + + case YYSYMBOL_select_statement: /* select_statement */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).select_stmt)); } +#line 2275 "bison_parser.cpp" + break; + + case YYSYMBOL_select_within_set_operation: /* select_within_set_operation */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).select_stmt)); } +#line 2281 "bison_parser.cpp" + break; + + case YYSYMBOL_select_within_set_operation_no_parentheses: /* select_within_set_operation_no_parentheses */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).select_stmt)); } +#line 2287 "bison_parser.cpp" + break; + + case YYSYMBOL_select_with_paren: /* select_with_paren */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).select_stmt)); } +#line 2293 "bison_parser.cpp" + break; + + case YYSYMBOL_select_no_paren: /* select_no_paren */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).select_stmt)); } +#line 2299 "bison_parser.cpp" + break; + + case YYSYMBOL_set_operator: /* set_operator */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).set_operator_t)); } +#line 2305 "bison_parser.cpp" + break; + + case YYSYMBOL_set_type: /* set_type */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).set_operator_t)); } +#line 2311 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_all: /* opt_all */ +#line 155 "bison_parser.y" + { } +#line 2317 "bison_parser.cpp" + break; + + case YYSYMBOL_select_clause: /* select_clause */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).select_stmt)); } +#line 2323 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_distinct: /* opt_distinct */ +#line 155 "bison_parser.y" + { } +#line 2329 "bison_parser.cpp" + break; + + case YYSYMBOL_select_list: /* select_list */ +#line 158 "bison_parser.y" + { + if ((((*yyvaluep).expr_vec)) != nullptr) { + for (auto ptr : *(((*yyvaluep).expr_vec))) { + delete ptr; + } + } + delete (((*yyvaluep).expr_vec)); +} +#line 2342 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_from_clause: /* opt_from_clause */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).table)); } +#line 2348 "bison_parser.cpp" + break; + + case YYSYMBOL_from_clause: /* from_clause */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).table)); } +#line 2354 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_where: /* opt_where */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2360 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_group: /* opt_group */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).group_t)); } +#line 2366 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_having: /* opt_having */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2372 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_order: /* opt_order */ +#line 158 "bison_parser.y" + { + if ((((*yyvaluep).order_vec)) != nullptr) { + for (auto ptr : *(((*yyvaluep).order_vec))) { + delete ptr; + } + } + delete (((*yyvaluep).order_vec)); +} +#line 2385 "bison_parser.cpp" + break; + + case YYSYMBOL_order_list: /* order_list */ +#line 158 "bison_parser.y" + { + if ((((*yyvaluep).order_vec)) != nullptr) { + for (auto ptr : *(((*yyvaluep).order_vec))) { + delete ptr; + } + } + delete (((*yyvaluep).order_vec)); +} +#line 2398 "bison_parser.cpp" + break; + + case YYSYMBOL_order_desc: /* order_desc */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).order)); } +#line 2404 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_order_type: /* opt_order_type */ +#line 155 "bison_parser.y" + { } +#line 2410 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_top: /* opt_top */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).limit)); } +#line 2416 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_limit: /* opt_limit */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).limit)); } +#line 2422 "bison_parser.cpp" + break; + + case YYSYMBOL_expr_list: /* expr_list */ +#line 158 "bison_parser.y" + { + if ((((*yyvaluep).expr_vec)) != nullptr) { + for (auto ptr : *(((*yyvaluep).expr_vec))) { + delete ptr; + } + } + delete (((*yyvaluep).expr_vec)); +} +#line 2435 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_literal_list: /* opt_literal_list */ +#line 158 "bison_parser.y" + { + if ((((*yyvaluep).expr_vec)) != nullptr) { + for (auto ptr : *(((*yyvaluep).expr_vec))) { + delete ptr; + } + } + delete (((*yyvaluep).expr_vec)); +} +#line 2448 "bison_parser.cpp" + break; + + case YYSYMBOL_literal_list: /* literal_list */ +#line 158 "bison_parser.y" + { + if ((((*yyvaluep).expr_vec)) != nullptr) { + for (auto ptr : *(((*yyvaluep).expr_vec))) { + delete ptr; + } + } + delete (((*yyvaluep).expr_vec)); +} +#line 2461 "bison_parser.cpp" + break; + + case YYSYMBOL_expr_alias: /* expr_alias */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2467 "bison_parser.cpp" + break; + + case YYSYMBOL_expr: /* expr */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2473 "bison_parser.cpp" + break; + + case YYSYMBOL_operand: /* operand */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2479 "bison_parser.cpp" + break; + + case YYSYMBOL_scalar_expr: /* scalar_expr */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2485 "bison_parser.cpp" + break; + + case YYSYMBOL_unary_expr: /* unary_expr */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2491 "bison_parser.cpp" + break; + + case YYSYMBOL_binary_expr: /* binary_expr */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2497 "bison_parser.cpp" + break; + + case YYSYMBOL_logic_expr: /* logic_expr */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2503 "bison_parser.cpp" + break; + + case YYSYMBOL_in_expr: /* in_expr */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2509 "bison_parser.cpp" + break; + + case YYSYMBOL_case_expr: /* case_expr */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2515 "bison_parser.cpp" + break; + + case YYSYMBOL_case_list: /* case_list */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2521 "bison_parser.cpp" + break; + + case YYSYMBOL_exists_expr: /* exists_expr */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2527 "bison_parser.cpp" + break; + + case YYSYMBOL_comp_expr: /* comp_expr */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2533 "bison_parser.cpp" + break; + + case YYSYMBOL_function_expr: /* function_expr */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2539 "bison_parser.cpp" + break; + + case YYSYMBOL_extract_expr: /* extract_expr */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2545 "bison_parser.cpp" + break; + + case YYSYMBOL_cast_expr: /* cast_expr */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2551 "bison_parser.cpp" + break; + + case YYSYMBOL_datetime_field: /* datetime_field */ +#line 155 "bison_parser.y" + { } +#line 2557 "bison_parser.cpp" + break; + + case YYSYMBOL_array_expr: /* array_expr */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2563 "bison_parser.cpp" + break; + + case YYSYMBOL_array_index: /* array_index */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2569 "bison_parser.cpp" + break; + + case YYSYMBOL_between_expr: /* between_expr */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2575 "bison_parser.cpp" + break; + + case YYSYMBOL_column_name: /* column_name */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2581 "bison_parser.cpp" + break; + + case YYSYMBOL_literal: /* literal */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2587 "bison_parser.cpp" + break; + + case YYSYMBOL_string_literal: /* string_literal */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2593 "bison_parser.cpp" + break; + + case YYSYMBOL_bool_literal: /* bool_literal */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2599 "bison_parser.cpp" + break; + + case YYSYMBOL_num_literal: /* num_literal */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2605 "bison_parser.cpp" + break; + + case YYSYMBOL_int_literal: /* int_literal */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2611 "bison_parser.cpp" + break; + + case YYSYMBOL_null_literal: /* null_literal */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2617 "bison_parser.cpp" + break; + + case YYSYMBOL_param_expr: /* param_expr */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2623 "bison_parser.cpp" + break; + + case YYSYMBOL_table_ref: /* table_ref */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).table)); } +#line 2629 "bison_parser.cpp" + break; + + case YYSYMBOL_table_ref_atomic: /* table_ref_atomic */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).table)); } +#line 2635 "bison_parser.cpp" + break; + + case YYSYMBOL_nonjoin_table_ref_atomic: /* nonjoin_table_ref_atomic */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).table)); } +#line 2641 "bison_parser.cpp" + break; + + case YYSYMBOL_table_ref_commalist: /* table_ref_commalist */ +#line 158 "bison_parser.y" + { + if ((((*yyvaluep).table_vec)) != nullptr) { + for (auto ptr : *(((*yyvaluep).table_vec))) { + delete ptr; + } + } + delete (((*yyvaluep).table_vec)); +} +#line 2654 "bison_parser.cpp" + break; + + case YYSYMBOL_table_ref_name: /* table_ref_name */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).table)); } +#line 2660 "bison_parser.cpp" + break; + + case YYSYMBOL_table_ref_name_no_alias: /* table_ref_name_no_alias */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).table)); } +#line 2666 "bison_parser.cpp" + break; + + case YYSYMBOL_table_name: /* table_name */ +#line 156 "bison_parser.y" + { free( (((*yyvaluep).table_name).name) ); free( (((*yyvaluep).table_name).schema) ); } +#line 2672 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_index_name: /* opt_index_name */ +#line 157 "bison_parser.y" + { free( (((*yyvaluep).sval)) ); } +#line 2678 "bison_parser.cpp" + break; + + case YYSYMBOL_index_name: /* index_name */ +#line 157 "bison_parser.y" + { free( (((*yyvaluep).sval)) ); } +#line 2684 "bison_parser.cpp" + break; + + case YYSYMBOL_table_alias: /* table_alias */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).alias_t)); } +#line 2690 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_table_alias: /* opt_table_alias */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).alias_t)); } +#line 2696 "bison_parser.cpp" + break; + + case YYSYMBOL_alias: /* alias */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).alias_t)); } +#line 2702 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_alias: /* opt_alias */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).alias_t)); } +#line 2708 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_with_clause: /* opt_with_clause */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).with_description_vec)); } +#line 2714 "bison_parser.cpp" + break; + + case YYSYMBOL_with_clause: /* with_clause */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).with_description_vec)); } +#line 2720 "bison_parser.cpp" + break; + + case YYSYMBOL_with_description_list: /* with_description_list */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).with_description_vec)); } +#line 2726 "bison_parser.cpp" + break; + + case YYSYMBOL_with_description: /* with_description */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).with_description_t)); } +#line 2732 "bison_parser.cpp" + break; + + case YYSYMBOL_join_clause: /* join_clause */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).table)); } +#line 2738 "bison_parser.cpp" + break; + + case YYSYMBOL_opt_join_type: /* opt_join_type */ +#line 155 "bison_parser.y" + { } +#line 2744 "bison_parser.cpp" + break; + + case YYSYMBOL_join_condition: /* join_condition */ +#line 166 "bison_parser.y" + { delete (((*yyvaluep).expr)); } +#line 2750 "bison_parser.cpp" + break; + + case YYSYMBOL_ident_commalist: /* ident_commalist */ +#line 158 "bison_parser.y" + { + if ((((*yyvaluep).str_vec)) != nullptr) { + for (auto ptr : *(((*yyvaluep).str_vec))) { + delete ptr; + } + } + delete (((*yyvaluep).str_vec)); +} +#line 2763 "bison_parser.cpp" + break; + + default: + break; + } + YY_IGNORE_MAYBE_UNINITIALIZED_END +} + + + + + + +/*----------. +| yyparse. | +`----------*/ + +int +yyparse (hsql::SQLParserResult* result, yyscan_t scanner) +{ +/* Lookahead token kind. */ +int yychar; + + +/* The semantic value of the lookahead symbol. */ +/* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ +YY_INITIAL_VALUE (static YYSTYPE yyval_default;) +YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); + +/* Location data for the lookahead symbol. */ +static YYLTYPE yyloc_default +# if defined HSQL_LTYPE_IS_TRIVIAL && HSQL_LTYPE_IS_TRIVIAL + = { 1, 1, 1, 1 } +# endif +; +YYLTYPE yylloc = yyloc_default; + + /* Number of syntax errors so far. */ + int yynerrs = 0; + + yy_state_fast_t yystate = 0; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus = 0; + + /* Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* Their size. */ + YYPTRDIFF_T yystacksize = YYINITDEPTH; + + /* The state stack: array, bottom, top. */ + yy_state_t yyssa[YYINITDEPTH]; + yy_state_t *yyss = yyssa; + yy_state_t *yyssp = yyss; + + /* The semantic value stack: array, bottom, top. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp = yyvs; + + /* The location stack: array, bottom, top. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp = yyls; + + int yyn; + /* The return value of yyparse. */ + int yyresult; + /* Lookahead symbol kind. */ + yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY; + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + YYLTYPE yyloc; + + /* The locations where the error started and ended. */ + YYLTYPE yyerror_range[3]; + + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yychar = SQL_HSQL_EMPTY; /* Cause a token to be read. */ + +/* User initialization code. */ +#line 73 "bison_parser.y" +{ + // Initialize + yylloc.first_column = 0; + yylloc.last_column = 0; + yylloc.first_line = 0; + yylloc.last_line = 0; + yylloc.total_column = 0; + yylloc.string_length = 0; +} + +#line 2870 "bison_parser.cpp" + + yylsp[0] = yylloc; + goto yysetstate; + + +/*------------------------------------------------------------. +| yynewstate -- push a new state, which is found in yystate. | +`------------------------------------------------------------*/ +yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + + +/*--------------------------------------------------------------------. +| yysetstate -- set current state (the top of the stack) to yystate. | +`--------------------------------------------------------------------*/ +yysetstate: + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + YY_ASSERT (0 <= yystate && yystate < YYNSTATES); + YY_IGNORE_USELESS_CAST_BEGIN + *yyssp = YY_CAST (yy_state_t, yystate); + YY_IGNORE_USELESS_CAST_END + YY_STACK_PRINT (yyss, yyssp); + + 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. */ + YYPTRDIFF_T yysize = yyssp - yyss + 1; + +# 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 + memory. */ + yy_state_t *yyss1 = yyss; + YYSTYPE *yyvs1 = yyvs; + YYLTYPE *yyls1 = yyls; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * YYSIZEOF (*yyssp), + &yyvs1, yysize * YYSIZEOF (*yyvsp), + &yyls1, yysize * YYSIZEOF (*yylsp), + &yystacksize); + yyss = yyss1; + yyvs = yyvs1; + yyls = yyls1; + } +# else /* defined YYSTACK_RELOCATE */ + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yy_state_t *yyss1 = yyss; + union yyalloc *yyptr = + YY_CAST (union yyalloc *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); + YYSTACK_RELOCATE (yyls_alloc, yyls); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + yylsp = yyls + yysize - 1; + + YY_IGNORE_USELESS_CAST_BEGIN + YYDPRINTF ((stderr, "Stack size increased to %ld\n", + YY_CAST (long, yystacksize))); + YY_IGNORE_USELESS_CAST_END + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } +#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ + + if (yystate == YYFINAL) + YYACCEPT; + + goto yybackup; + + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + /* Do appropriate processing given the current state. Read a + lookahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to lookahead token. */ + yyn = yypact[yystate]; + if (yypact_value_is_default (yyn)) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ + if (yychar == SQL_HSQL_EMPTY) + { + YYDPRINTF ((stderr, "Reading a token\n")); + yychar = yylex (&yylval, &yylloc, scanner); + } + + if (yychar <= SQL_YYEOF) + { + yychar = SQL_YYEOF; + yytoken = YYSYMBOL_YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else if (yychar == SQL_HSQL_error) + { + /* The scanner already issued an error message, process directly + to error recovery. But do not keep the error token as + lookahead, it is too special and may lead us to an endless + loop in error recovery. */ + yychar = SQL_HSQL_UNDEF; + yytoken = YYSYMBOL_YYerror; + yyerror_range[1] = yylloc; + goto yyerrlab1; + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yytable_value_is_error (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the lookahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + *++yylsp = yylloc; + + /* Discard the shifted token. */ + yychar = SQL_HSQL_EMPTY; + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + '$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + /* Default location. */ + YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); + yyerror_range[1] = yyloc; + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 2: /* input: statement_list opt_semicolon */ +#line 288 "bison_parser.y" + { + for (SQLStatement* stmt : *(yyvsp[-1].stmt_vec)) { + // Transfers ownership of the statement. + result->addStatement(stmt); + } + + unsigned param_id = 0; + for (void* param : yyloc.param_list) { + if (param != nullptr) { + Expr* expr = (Expr*) param; + expr->ival = param_id; + result->addParameter(expr); + ++param_id; + } + } + delete (yyvsp[-1].stmt_vec); + } +#line 3098 "bison_parser.cpp" + break; + + case 3: /* statement_list: statement */ +#line 309 "bison_parser.y" + { + (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 3109 "bison_parser.cpp" + break; + + case 4: /* statement_list: statement_list ';' statement */ +#line 315 "bison_parser.y" + { + (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 3120 "bison_parser.cpp" + break; + + case 5: /* statement: prepare_statement opt_hints */ +#line 324 "bison_parser.y" + { + (yyval.statement) = (yyvsp[-1].prep_stmt); + (yyval.statement)->hints = (yyvsp[0].expr_vec); + } +#line 3129 "bison_parser.cpp" + break; + + case 6: /* statement: preparable_statement opt_hints */ +#line 328 "bison_parser.y" + { + (yyval.statement) = (yyvsp[-1].statement); + (yyval.statement)->hints = (yyvsp[0].expr_vec); + } +#line 3138 "bison_parser.cpp" + break; + + case 7: /* statement: show_statement */ +#line 332 "bison_parser.y" + { + (yyval.statement) = (yyvsp[0].show_stmt); + } +#line 3146 "bison_parser.cpp" + break; + + case 8: /* statement: import_statement */ +#line 335 "bison_parser.y" + { + (yyval.statement) = (yyvsp[0].import_stmt); + } +#line 3154 "bison_parser.cpp" + break; + + case 9: /* statement: export_statement */ +#line 338 "bison_parser.y" + { + (yyval.statement) = (yyvsp[0].export_stmt); + } +#line 3162 "bison_parser.cpp" + break; + + case 10: /* preparable_statement: select_statement */ +#line 345 "bison_parser.y" + { (yyval.statement) = (yyvsp[0].select_stmt); } +#line 3168 "bison_parser.cpp" + break; + + case 11: /* preparable_statement: create_statement */ +#line 346 "bison_parser.y" + { (yyval.statement) = (yyvsp[0].create_stmt); } +#line 3174 "bison_parser.cpp" + break; + + case 12: /* preparable_statement: insert_statement */ +#line 347 "bison_parser.y" + { (yyval.statement) = (yyvsp[0].insert_stmt); } +#line 3180 "bison_parser.cpp" + break; + + case 13: /* preparable_statement: delete_statement */ +#line 348 "bison_parser.y" + { (yyval.statement) = (yyvsp[0].delete_stmt); } +#line 3186 "bison_parser.cpp" + break; + + case 14: /* preparable_statement: truncate_statement */ +#line 349 "bison_parser.y" + { (yyval.statement) = (yyvsp[0].delete_stmt); } +#line 3192 "bison_parser.cpp" + break; + + case 15: /* preparable_statement: update_statement */ +#line 350 "bison_parser.y" + { (yyval.statement) = (yyvsp[0].update_stmt); } +#line 3198 "bison_parser.cpp" + break; + + case 16: /* preparable_statement: drop_statement */ +#line 351 "bison_parser.y" + { (yyval.statement) = (yyvsp[0].drop_stmt); } +#line 3204 "bison_parser.cpp" + break; + + case 17: /* preparable_statement: alter_statement */ +#line 352 "bison_parser.y" + { (yyval.statement) = (yyvsp[0].alter_stmt); } +#line 3210 "bison_parser.cpp" + break; + + case 18: /* preparable_statement: execute_statement */ +#line 353 "bison_parser.y" + { (yyval.statement) = (yyvsp[0].exec_stmt); } +#line 3216 "bison_parser.cpp" + break; + + case 19: /* preparable_statement: transaction_statement */ +#line 354 "bison_parser.y" + { (yyval.statement) = (yyvsp[0].transaction_stmt); } +#line 3222 "bison_parser.cpp" + break; + + case 20: /* opt_hints: WITH HINT '(' hint_list ')' */ +#line 363 "bison_parser.y" + { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } +#line 3228 "bison_parser.cpp" + break; + + case 21: /* opt_hints: %empty */ +#line 364 "bison_parser.y" + { (yyval.expr_vec) = nullptr; } +#line 3234 "bison_parser.cpp" + break; + + case 22: /* hint_list: hint */ +#line 369 "bison_parser.y" + { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } +#line 3240 "bison_parser.cpp" + break; + + case 23: /* hint_list: hint_list ',' hint */ +#line 370 "bison_parser.y" + { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } +#line 3246 "bison_parser.cpp" + break; + + case 24: /* hint: IDENTIFIER */ +#line 374 "bison_parser.y" + { + (yyval.expr) = Expr::make(kExprHint); + (yyval.expr)->name = (yyvsp[0].sval); + } +#line 3255 "bison_parser.cpp" + break; + + case 25: /* hint: IDENTIFIER '(' literal_list ')' */ +#line 378 "bison_parser.y" + { + (yyval.expr) = Expr::make(kExprHint); + (yyval.expr)->name = (yyvsp[-3].sval); + (yyval.expr)->exprList = (yyvsp[-1].expr_vec); + } +#line 3265 "bison_parser.cpp" + break; + + case 26: /* transaction_statement: BEGIN opt_transaction_keyword */ +#line 390 "bison_parser.y" + { + (yyval.transaction_stmt) = new TransactionStatement(kBeginTransaction); + } +#line 3273 "bison_parser.cpp" + break; + + case 27: /* transaction_statement: ROLLBACK opt_transaction_keyword */ +#line 393 "bison_parser.y" + { + (yyval.transaction_stmt) = new TransactionStatement(kRollbackTransaction); + } +#line 3281 "bison_parser.cpp" + break; + + case 28: /* transaction_statement: COMMIT opt_transaction_keyword */ +#line 396 "bison_parser.y" + { + (yyval.transaction_stmt) = new TransactionStatement(kCommitTransaction); + } +#line 3289 "bison_parser.cpp" + break; + + case 31: /* prepare_statement: PREPARE IDENTIFIER FROM prepare_target_query */ +#line 410 "bison_parser.y" + { + (yyval.prep_stmt) = new PrepareStatement(); + (yyval.prep_stmt)->name = (yyvsp[-2].sval); + (yyval.prep_stmt)->query = (yyvsp[0].sval); + } +#line 3299 "bison_parser.cpp" + break; + + case 33: /* execute_statement: EXECUTE IDENTIFIER */ +#line 420 "bison_parser.y" + { + (yyval.exec_stmt) = new ExecuteStatement(); + (yyval.exec_stmt)->name = (yyvsp[0].sval); + } +#line 3308 "bison_parser.cpp" + break; + + case 34: /* execute_statement: EXECUTE IDENTIFIER '(' opt_literal_list ')' */ +#line 424 "bison_parser.y" + { + (yyval.exec_stmt) = new ExecuteStatement(); + (yyval.exec_stmt)->name = (yyvsp[-3].sval); + (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); + } +#line 3318 "bison_parser.cpp" + break; + + case 35: /* import_statement: IMPORT FROM file_type FILE file_path INTO table_name */ +#line 438 "bison_parser.y" + { + (yyval.import_stmt) = new ImportStatement((yyvsp[-4].import_type_t)); + (yyval.import_stmt)->filePath = (yyvsp[-2].sval); + (yyval.import_stmt)->schema = (yyvsp[0].table_name).schema; + (yyval.import_stmt)->tableName = (yyvsp[0].table_name).name; + } +#line 3329 "bison_parser.cpp" + break; + + case 36: /* import_statement: COPY table_name FROM file_path opt_file_type */ +#line 444 "bison_parser.y" + { + (yyval.import_stmt) = new ImportStatement((yyvsp[0].import_type_t)); + (yyval.import_stmt)->filePath = (yyvsp[-1].sval); + (yyval.import_stmt)->schema = (yyvsp[-3].table_name).schema; + (yyval.import_stmt)->tableName = (yyvsp[-3].table_name).name; + } +#line 3340 "bison_parser.cpp" + break; + + case 37: /* file_type: IDENTIFIER */ +#line 453 "bison_parser.y" + { + if (strcasecmp((yyvsp[0].sval), "csv") == 0) { + (yyval.import_type_t) = kImportCSV; + } else if (strcasecmp((yyvsp[0].sval), "tbl") == 0) { + (yyval.import_type_t) = kImportTbl; + } else if (strcasecmp((yyvsp[0].sval), "binary") == 0 || strcasecmp((yyvsp[0].sval), "bin") == 0) { + (yyval.import_type_t) = kImportBinary; + } else { + free((yyvsp[0].sval)); + yyerror(&yyloc, result, scanner, "File type is unknown."); + YYERROR; + } + free((yyvsp[0].sval)); + } +#line 3359 "bison_parser.cpp" + break; + + case 38: /* file_path: string_literal */ +#line 470 "bison_parser.y" + { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } +#line 3365 "bison_parser.cpp" + break; + + case 39: /* opt_file_type: WITH FORMAT file_type */ +#line 474 "bison_parser.y" + { + (yyval.import_type_t) = (yyvsp[0].import_type_t); + } +#line 3373 "bison_parser.cpp" + break; + + case 40: /* opt_file_type: %empty */ +#line 477 "bison_parser.y" + { (yyval.import_type_t) = kImportAuto; } +#line 3379 "bison_parser.cpp" + break; + + case 41: /* export_statement: COPY table_name TO file_path opt_file_type */ +#line 486 "bison_parser.y" + { + (yyval.export_stmt) = new ExportStatement((yyvsp[0].import_type_t)); + (yyval.export_stmt)->filePath = (yyvsp[-1].sval); + (yyval.export_stmt)->schema = (yyvsp[-3].table_name).schema; + (yyval.export_stmt)->tableName = (yyvsp[-3].table_name).name; + } +#line 3390 "bison_parser.cpp" + break; + + case 42: /* show_statement: SHOW TABLES */ +#line 500 "bison_parser.y" + { + (yyval.show_stmt) = new ShowStatement(kShowTables); + } +#line 3398 "bison_parser.cpp" + break; + + case 43: /* show_statement: SHOW COLUMNS table_name */ +#line 503 "bison_parser.y" + { + (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 3408 "bison_parser.cpp" + break; + + case 44: /* show_statement: DESCRIBE table_name */ +#line 508 "bison_parser.y" + { + (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 3418 "bison_parser.cpp" + break; + + case 45: /* create_statement: CREATE TABLE opt_not_exists table_name FROM IDENTIFIER FILE file_path */ +#line 522 "bison_parser.y" + { + (yyval.create_stmt) = new CreateStatement(kCreateTableFromTbl); + (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); + (yyval.create_stmt)->schema = (yyvsp[-4].table_name).schema; + (yyval.create_stmt)->tableName = (yyvsp[-4].table_name).name; + if (strcasecmp((yyvsp[-2].sval), "tbl") != 0) { + free((yyvsp[-2].sval)); + yyerror(&yyloc, result, scanner, "File type is unknown."); + YYERROR; + } + free((yyvsp[-2].sval)); + (yyval.create_stmt)->filePath = (yyvsp[0].sval); + } +#line 3436 "bison_parser.cpp" + break; + + case 46: /* create_statement: CREATE TABLE opt_not_exists table_name '(' table_elem_commalist ')' */ +#line 535 "bison_parser.y" + { + (yyval.create_stmt) = new CreateStatement(kCreateTable); + (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); + (yyval.create_stmt)->schema = (yyvsp[-3].table_name).schema; + (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; + (yyval.create_stmt)->setColumnDefsAndConstraints((yyvsp[-1].table_element_vec)); + } +#line 3448 "bison_parser.cpp" + break; + + case 47: /* create_statement: CREATE TABLE opt_not_exists table_name AS select_statement */ +#line 542 "bison_parser.y" + { + (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 3460 "bison_parser.cpp" + break; + + case 48: /* create_statement: CREATE INDEX opt_not_exists opt_index_name ON table_name '(' ident_commalist ')' */ +#line 549 "bison_parser.y" + { + (yyval.create_stmt) = new CreateStatement(kCreateIndex); + (yyval.create_stmt)->indexName = (yyvsp[-5].sval); + (yyval.create_stmt)->ifNotExists = (yyvsp[-6].bval); + (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; + (yyval.create_stmt)->indexColumns = (yyvsp[-1].str_vec); + } +#line 3472 "bison_parser.cpp" + break; + + case 49: /* create_statement: CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement */ +#line 556 "bison_parser.y" + { + (yyval.create_stmt) = new CreateStatement(kCreateView); + (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); + (yyval.create_stmt)->schema = (yyvsp[-3].table_name).schema; + (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; + (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); + (yyval.create_stmt)->select = (yyvsp[0].select_stmt); + } +#line 3485 "bison_parser.cpp" + break; + + case 50: /* opt_not_exists: IF NOT EXISTS */ +#line 567 "bison_parser.y" + { (yyval.bval) = true; } +#line 3491 "bison_parser.cpp" + break; + + case 51: /* opt_not_exists: %empty */ +#line 568 "bison_parser.y" + { (yyval.bval) = false; } +#line 3497 "bison_parser.cpp" + break; + + case 52: /* table_elem_commalist: table_elem */ +#line 572 "bison_parser.y" + { (yyval.table_element_vec) = new std::vector(); (yyval.table_element_vec)->push_back((yyvsp[0].table_element_t)); } +#line 3503 "bison_parser.cpp" + break; + + case 53: /* table_elem_commalist: table_elem_commalist ',' table_elem */ +#line 573 "bison_parser.y" + { (yyvsp[-2].table_element_vec)->push_back((yyvsp[0].table_element_t)); (yyval.table_element_vec) = (yyvsp[-2].table_element_vec); } +#line 3509 "bison_parser.cpp" + break; + + case 54: /* table_elem: column_def */ +#line 577 "bison_parser.y" + { (yyval.table_element_t) = (yyvsp[0].column_t); } +#line 3515 "bison_parser.cpp" + break; + + case 55: /* table_elem: table_constraint */ +#line 578 "bison_parser.y" + { (yyval.table_element_t) = (yyvsp[0].table_constraint_t); } +#line 3521 "bison_parser.cpp" + break; + + case 56: /* column_def: IDENTIFIER column_type opt_column_constraints */ +#line 582 "bison_parser.y" + { + (yyval.column_t) = new ColumnDefinition((yyvsp[-2].sval), (yyvsp[-1].column_type_t), (yyvsp[0].column_constraint_vec)); + (yyval.column_t)->setNullableExplicit(); + } +#line 3530 "bison_parser.cpp" + break; + + case 57: /* column_type: INT */ +#line 589 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::INT}; } +#line 3536 "bison_parser.cpp" + break; + + case 58: /* column_type: INTEGER */ +#line 590 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::INT}; } +#line 3542 "bison_parser.cpp" + break; + + case 59: /* column_type: LONG */ +#line 591 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::LONG}; } +#line 3548 "bison_parser.cpp" + break; + + case 60: /* column_type: FLOAT */ +#line 592 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } +#line 3554 "bison_parser.cpp" + break; + + case 61: /* column_type: DECIMAL opt_decimal_specification */ +#line 593 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::DECIMAL, 0, (yyvsp[0].column_specification_t)}; } +#line 3560 "bison_parser.cpp" + break; + + case 62: /* column_type: DOUBLE */ +#line 594 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } +#line 3566 "bison_parser.cpp" + break; + + case 63: /* column_type: REAL */ +#line 595 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::REAL}; } +#line 3572 "bison_parser.cpp" + break; + + case 64: /* column_type: VARCHAR '(' INTVAL ')' */ +#line 596 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } +#line 3578 "bison_parser.cpp" + break; + + case 65: /* column_type: CHARACTER VARYING '(' INTVAL ')' */ +#line 597 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::VARCHAR_VARYING, (yyvsp[-1].ival)}; } +#line 3584 "bison_parser.cpp" + break; + + case 66: /* column_type: CHAR '(' INTVAL ')' */ +#line 598 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } +#line 3590 "bison_parser.cpp" + break; + + case 67: /* column_type: TEXT */ +#line 599 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } +#line 3596 "bison_parser.cpp" + break; + + case 68: /* column_type: TIME opt_time_specification */ +#line 600 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::TIME, 0, (yyvsp[0].column_specification_t) }; } +#line 3602 "bison_parser.cpp" + break; + + case 69: /* column_type: DATETIME */ +#line 601 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } +#line 3608 "bison_parser.cpp" + break; + + case 70: /* column_type: DATE */ +#line 602 "bison_parser.y" + { (yyval.column_type_t) = ColumnType{DataType::DATE}; } +#line 3614 "bison_parser.cpp" + break; + + case 71: /* opt_time_specification: '(' INTVAL ')' */ +#line 606 "bison_parser.y" + { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-1].ival)}; } +#line 3620 "bison_parser.cpp" + break; + + case 72: /* opt_time_specification: %empty */ +#line 607 "bison_parser.y" + { (yyval.column_specification_t) = ColumnSpecification{}; } +#line 3626 "bison_parser.cpp" + break; + + case 73: /* opt_decimal_specification: '(' INTVAL ',' INTVAL ')' */ +#line 611 "bison_parser.y" + { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-3].ival), (yyvsp[-1].ival)}; } +#line 3632 "bison_parser.cpp" + break; + + case 74: /* opt_decimal_specification: '(' INTVAL ')' */ +#line 612 "bison_parser.y" + { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-1].ival)}; } +#line 3638 "bison_parser.cpp" + break; + + case 75: /* opt_decimal_specification: %empty */ +#line 613 "bison_parser.y" + { (yyval.column_specification_t) = ColumnSpecification{}; } +#line 3644 "bison_parser.cpp" + break; + + case 76: /* opt_column_constraints: column_constraint */ +#line 617 "bison_parser.y" + { (yyval.column_constraint_vec) = new std::vector(); (yyval.column_constraint_vec)->push_back((yyvsp[0].column_constraint_t)); } +#line 3650 "bison_parser.cpp" + break; + + case 77: /* opt_column_constraints: opt_column_constraints column_constraint */ +#line 618 "bison_parser.y" + { (yyvsp[-1].column_constraint_vec)->push_back((yyvsp[0].column_constraint_t)); (yyval.column_constraint_vec) = (yyvsp[-1].column_constraint_vec); } +#line 3656 "bison_parser.cpp" + break; + + case 78: /* opt_column_constraints: %empty */ +#line 619 "bison_parser.y" + { (yyval.column_constraint_vec) = new std::vector(); } +#line 3662 "bison_parser.cpp" + break; + + case 79: /* column_constraint: PRIMARY KEY */ +#line 623 "bison_parser.y" + { (yyval.column_constraint_t) = ConstraintType::PRIMARY_KEY; } +#line 3668 "bison_parser.cpp" + break; + + case 80: /* column_constraint: UNIQUE */ +#line 624 "bison_parser.y" + { (yyval.column_constraint_t) = ConstraintType::UNIQUE; } +#line 3674 "bison_parser.cpp" + break; + + case 81: /* column_constraint: NULL */ +#line 625 "bison_parser.y" + { (yyval.column_constraint_t) = ConstraintType::_NULL; } +#line 3680 "bison_parser.cpp" + break; + + case 82: /* column_constraint: NOT NULL */ +#line 626 "bison_parser.y" + { (yyval.column_constraint_t) = ConstraintType::NOTNULL; } +#line 3686 "bison_parser.cpp" + break; + + case 83: /* table_constraint: PRIMARY KEY '(' ident_commalist ')' */ +#line 630 "bison_parser.y" + { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::PRIMARY_KEY, (yyvsp[-1].str_vec)); } +#line 3692 "bison_parser.cpp" + break; + + case 84: /* table_constraint: UNIQUE '(' ident_commalist ')' */ +#line 631 "bison_parser.y" + { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::UNIQUE, (yyvsp[-1].str_vec)); } +#line 3698 "bison_parser.cpp" + break; + + case 85: /* drop_statement: DROP TABLE opt_exists table_name */ +#line 642 "bison_parser.y" + { + (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 3709 "bison_parser.cpp" + break; + + case 86: /* drop_statement: DROP VIEW opt_exists table_name */ +#line 648 "bison_parser.y" + { + (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 3720 "bison_parser.cpp" + break; + + case 87: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ +#line 654 "bison_parser.y" + { + (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); + (yyval.drop_stmt)->ifExists = false; + (yyval.drop_stmt)->name = (yyvsp[0].sval); + } +#line 3730 "bison_parser.cpp" + break; + + case 88: /* drop_statement: DROP INDEX opt_exists index_name */ +#line 659 "bison_parser.y" + { + (yyval.drop_stmt) = new DropStatement(kDropIndex); + (yyval.drop_stmt)->ifExists = (yyvsp[-1].bval); + (yyval.drop_stmt)->indexName = (yyvsp[0].sval); + } +#line 3740 "bison_parser.cpp" + break; + + case 89: /* opt_exists: IF EXISTS */ +#line 667 "bison_parser.y" + { (yyval.bval) = true; } +#line 3746 "bison_parser.cpp" + break; + + case 90: /* opt_exists: %empty */ +#line 668 "bison_parser.y" + { (yyval.bval) = false; } +#line 3752 "bison_parser.cpp" + break; + + case 91: /* alter_statement: ALTER TABLE opt_exists table_name alter_action */ +#line 677 "bison_parser.y" + { + (yyval.alter_stmt) = new AlterStatement((yyvsp[-1].table_name).name, (yyvsp[0].alter_action_t)); + (yyval.alter_stmt)->ifTableExists = (yyvsp[-2].bval); + (yyval.alter_stmt)->schema = (yyvsp[-1].table_name).schema; + } +#line 3762 "bison_parser.cpp" + break; + + case 92: /* alter_action: drop_action */ +#line 685 "bison_parser.y" + {(yyval.alter_action_t) = (yyvsp[0].drop_action_t);} +#line 3768 "bison_parser.cpp" + break; + + case 93: /* drop_action: DROP COLUMN opt_exists column_name */ +#line 688 "bison_parser.y" + { + (yyval.drop_action_t) = new DropColumnAction((yyvsp[0].expr)->name); + (yyval.drop_action_t)->ifExists = (yyvsp[-1].bval); + } +#line 3777 "bison_parser.cpp" + break; + + case 94: /* delete_statement: DELETE FROM table_name opt_where */ +#line 700 "bison_parser.y" + { + (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 3788 "bison_parser.cpp" + break; + + case 95: /* truncate_statement: TRUNCATE table_name */ +#line 709 "bison_parser.y" + { + (yyval.delete_stmt) = new DeleteStatement(); + (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; + (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; + } +#line 3798 "bison_parser.cpp" + break; + + case 96: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ +#line 722 "bison_parser.y" + { + (yyval.insert_stmt) = new InsertStatement(kInsertValues); + (yyval.insert_stmt)->schema = (yyvsp[-5].table_name).schema; + (yyval.insert_stmt)->tableName = (yyvsp[-5].table_name).name; + (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); + (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); + } +#line 3810 "bison_parser.cpp" + break; + + case 97: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ +#line 729 "bison_parser.y" + { + (yyval.insert_stmt) = new InsertStatement(kInsertSelect); + (yyval.insert_stmt)->schema = (yyvsp[-2].table_name).schema; + (yyval.insert_stmt)->tableName = (yyvsp[-2].table_name).name; + (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); + (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); + } +#line 3822 "bison_parser.cpp" + break; + + case 98: /* opt_column_list: '(' ident_commalist ')' */ +#line 740 "bison_parser.y" + { (yyval.str_vec) = (yyvsp[-1].str_vec); } +#line 3828 "bison_parser.cpp" + break; + + case 99: /* opt_column_list: %empty */ +#line 741 "bison_parser.y" + { (yyval.str_vec) = nullptr; } +#line 3834 "bison_parser.cpp" + break; + + case 100: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ +#line 751 "bison_parser.y" + { + (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 3845 "bison_parser.cpp" + break; + + case 101: /* update_clause_commalist: update_clause */ +#line 760 "bison_parser.y" + { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } +#line 3851 "bison_parser.cpp" + break; + + case 102: /* update_clause_commalist: update_clause_commalist ',' update_clause */ +#line 761 "bison_parser.y" + { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } +#line 3857 "bison_parser.cpp" + break; + + case 103: /* update_clause: IDENTIFIER '=' expr */ +#line 765 "bison_parser.y" + { + (yyval.update_t) = new UpdateClause(); + (yyval.update_t)->column = (yyvsp[-2].sval); + (yyval.update_t)->value = (yyvsp[0].expr); + } +#line 3867 "bison_parser.cpp" + break; + + case 104: /* select_statement: opt_with_clause select_with_paren */ +#line 777 "bison_parser.y" + { + (yyval.select_stmt) = (yyvsp[0].select_stmt); + (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); + } +#line 3876 "bison_parser.cpp" + break; + + case 105: /* select_statement: opt_with_clause select_no_paren */ +#line 781 "bison_parser.y" + { + (yyval.select_stmt) = (yyvsp[0].select_stmt); + (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); + } +#line 3885 "bison_parser.cpp" + break; + + case 106: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ +#line 785 "bison_parser.y" + { + (yyval.select_stmt) = (yyvsp[-4].select_stmt); + if ((yyval.select_stmt)->setOperations == nullptr) { + (yyval.select_stmt)->setOperations = new std::vector(); + } + (yyval.select_stmt)->setOperations->push_back((yyvsp[-3].set_operator_t)); + (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[-2].select_stmt); + (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); + (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); + (yyval.select_stmt)->withDescriptions = (yyvsp[-5].with_description_vec); + } +#line 3901 "bison_parser.cpp" + break; + + case 109: /* select_within_set_operation_no_parentheses: select_clause */ +#line 803 "bison_parser.y" + { (yyval.select_stmt) = (yyvsp[0].select_stmt); } +#line 3907 "bison_parser.cpp" + break; + + case 110: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ +#line 804 "bison_parser.y" + { + (yyval.select_stmt) = (yyvsp[-2].select_stmt); + if ((yyval.select_stmt)->setOperations == nullptr) { + (yyval.select_stmt)->setOperations = new std::vector(); + } + (yyval.select_stmt)->setOperations->push_back((yyvsp[-1].set_operator_t)); + (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[0].select_stmt); + } +#line 3920 "bison_parser.cpp" + break; + + case 111: /* select_with_paren: '(' select_no_paren ')' */ +#line 815 "bison_parser.y" + { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } +#line 3926 "bison_parser.cpp" + break; + + case 112: /* select_with_paren: '(' select_with_paren ')' */ +#line 816 "bison_parser.y" + { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } +#line 3932 "bison_parser.cpp" + break; + + case 113: /* select_no_paren: select_clause opt_order opt_limit */ +#line 820 "bison_parser.y" + { + (yyval.select_stmt) = (yyvsp[-2].select_stmt); + (yyval.select_stmt)->order = (yyvsp[-1].order_vec); + + // Limit could have been set by TOP. + if ((yyvsp[0].limit) != nullptr) { + delete (yyval.select_stmt)->limit; + (yyval.select_stmt)->limit = (yyvsp[0].limit); + } + } +#line 3947 "bison_parser.cpp" + break; + + case 114: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ +#line 830 "bison_parser.y" + { + (yyval.select_stmt) = (yyvsp[-4].select_stmt); + if ((yyval.select_stmt)->setOperations == nullptr) { + (yyval.select_stmt)->setOperations = new std::vector(); + } + (yyval.select_stmt)->setOperations->push_back((yyvsp[-3].set_operator_t)); + (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[-2].select_stmt); + (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); + (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); + } +#line 3962 "bison_parser.cpp" + break; + + case 115: /* set_operator: set_type opt_all */ +#line 843 "bison_parser.y" + { + (yyval.set_operator_t) = (yyvsp[-1].set_operator_t); + (yyval.set_operator_t)->isAll = (yyvsp[0].bval); + } +#line 3971 "bison_parser.cpp" + break; + + case 116: /* set_type: UNION */ +#line 850 "bison_parser.y" + { + (yyval.set_operator_t) = new SetOperation(); + (yyval.set_operator_t)->setType = SetType::kSetUnion; + } +#line 3980 "bison_parser.cpp" + break; + + case 117: /* set_type: INTERSECT */ +#line 854 "bison_parser.y" + { + (yyval.set_operator_t) = new SetOperation(); + (yyval.set_operator_t)->setType = SetType::kSetIntersect; + } +#line 3989 "bison_parser.cpp" + break; + + case 118: /* set_type: EXCEPT */ +#line 858 "bison_parser.y" + { + (yyval.set_operator_t) = new SetOperation(); + (yyval.set_operator_t)->setType = SetType::kSetExcept; + } +#line 3998 "bison_parser.cpp" + break; + + case 119: /* opt_all: ALL */ +#line 865 "bison_parser.y" + { + (yyval.bval) = true; + } +#line 4006 "bison_parser.cpp" + break; + + case 120: /* opt_all: %empty */ +#line 868 "bison_parser.y" + { + (yyval.bval) = false; + } +#line 4014 "bison_parser.cpp" + break; + + case 121: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ +#line 874 "bison_parser.y" + { + (yyval.select_stmt) = new SelectStatement(); + (yyval.select_stmt)->limit = (yyvsp[-5].limit); + (yyval.select_stmt)->selectDistinct = (yyvsp[-4].bval); + (yyval.select_stmt)->selectList = (yyvsp[-3].expr_vec); + (yyval.select_stmt)->fromTable = (yyvsp[-2].table); + (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); + (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); + } +#line 4028 "bison_parser.cpp" + break; + + case 122: /* opt_distinct: DISTINCT */ +#line 886 "bison_parser.y" + { (yyval.bval) = true; } +#line 4034 "bison_parser.cpp" + break; + + case 123: /* opt_distinct: %empty */ +#line 887 "bison_parser.y" + { (yyval.bval) = false; } +#line 4040 "bison_parser.cpp" + break; + + case 125: /* opt_from_clause: from_clause */ +#line 895 "bison_parser.y" + { (yyval.table) = (yyvsp[0].table); } +#line 4046 "bison_parser.cpp" + break; + + case 126: /* opt_from_clause: %empty */ +#line 896 "bison_parser.y" + { (yyval.table) = nullptr; } +#line 4052 "bison_parser.cpp" + break; + + case 127: /* from_clause: FROM table_ref */ +#line 900 "bison_parser.y" + { (yyval.table) = (yyvsp[0].table); } +#line 4058 "bison_parser.cpp" + break; + + case 128: /* opt_where: WHERE expr */ +#line 905 "bison_parser.y" + { (yyval.expr) = (yyvsp[0].expr); } +#line 4064 "bison_parser.cpp" + break; + + case 129: /* opt_where: %empty */ +#line 906 "bison_parser.y" + { (yyval.expr) = nullptr; } +#line 4070 "bison_parser.cpp" + break; + + case 130: /* opt_group: GROUP BY expr_list opt_having */ +#line 910 "bison_parser.y" + { + (yyval.group_t) = new GroupByDescription(); + (yyval.group_t)->columns = (yyvsp[-1].expr_vec); + (yyval.group_t)->having = (yyvsp[0].expr); + } +#line 4080 "bison_parser.cpp" + break; + + case 131: /* opt_group: %empty */ +#line 915 "bison_parser.y" + { (yyval.group_t) = nullptr; } +#line 4086 "bison_parser.cpp" + break; + + case 132: /* opt_having: HAVING expr */ +#line 919 "bison_parser.y" + { (yyval.expr) = (yyvsp[0].expr); } +#line 4092 "bison_parser.cpp" + break; + + case 133: /* opt_having: %empty */ +#line 920 "bison_parser.y" + { (yyval.expr) = nullptr; } +#line 4098 "bison_parser.cpp" + break; + + case 134: /* opt_order: ORDER BY order_list */ +#line 924 "bison_parser.y" + { (yyval.order_vec) = (yyvsp[0].order_vec); } +#line 4104 "bison_parser.cpp" + break; + + case 135: /* opt_order: %empty */ +#line 925 "bison_parser.y" + { (yyval.order_vec) = nullptr; } +#line 4110 "bison_parser.cpp" + break; + + case 136: /* order_list: order_desc */ +#line 929 "bison_parser.y" + { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } +#line 4116 "bison_parser.cpp" + break; + + case 137: /* order_list: order_list ',' order_desc */ +#line 930 "bison_parser.y" + { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } +#line 4122 "bison_parser.cpp" + break; + + case 138: /* order_desc: expr opt_order_type */ +#line 934 "bison_parser.y" + { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } +#line 4128 "bison_parser.cpp" + break; + + case 139: /* opt_order_type: ASC */ +#line 938 "bison_parser.y" + { (yyval.order_type) = kOrderAsc; } +#line 4134 "bison_parser.cpp" + break; + + case 140: /* opt_order_type: DESC */ +#line 939 "bison_parser.y" + { (yyval.order_type) = kOrderDesc; } +#line 4140 "bison_parser.cpp" + break; + + case 141: /* opt_order_type: %empty */ +#line 940 "bison_parser.y" + { (yyval.order_type) = kOrderAsc; } +#line 4146 "bison_parser.cpp" + break; + + case 142: /* opt_top: TOP int_literal */ +#line 946 "bison_parser.y" + { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } +#line 4152 "bison_parser.cpp" + break; + + case 143: /* opt_top: %empty */ +#line 947 "bison_parser.y" + { (yyval.limit) = nullptr; } +#line 4158 "bison_parser.cpp" + break; + + case 144: /* opt_limit: LIMIT expr */ +#line 951 "bison_parser.y" + { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } +#line 4164 "bison_parser.cpp" + break; + + case 145: /* opt_limit: OFFSET expr */ +#line 952 "bison_parser.y" + { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } +#line 4170 "bison_parser.cpp" + break; + + case 146: /* opt_limit: LIMIT expr OFFSET expr */ +#line 953 "bison_parser.y" + { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } +#line 4176 "bison_parser.cpp" + break; + + case 147: /* opt_limit: LIMIT ALL */ +#line 954 "bison_parser.y" + { (yyval.limit) = new LimitDescription(nullptr, nullptr); } +#line 4182 "bison_parser.cpp" + break; + + case 148: /* opt_limit: LIMIT ALL OFFSET expr */ +#line 955 "bison_parser.y" + { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } +#line 4188 "bison_parser.cpp" + break; + + case 149: /* opt_limit: %empty */ +#line 956 "bison_parser.y" + { (yyval.limit) = nullptr; } +#line 4194 "bison_parser.cpp" + break; + + case 150: /* expr_list: expr_alias */ +#line 963 "bison_parser.y" + { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } +#line 4200 "bison_parser.cpp" + break; + + case 151: /* expr_list: expr_list ',' expr_alias */ +#line 964 "bison_parser.y" + { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } +#line 4206 "bison_parser.cpp" + break; + + case 152: /* opt_literal_list: literal_list */ +#line 968 "bison_parser.y" + { (yyval.expr_vec) = (yyvsp[0].expr_vec); } +#line 4212 "bison_parser.cpp" + break; + + case 153: /* opt_literal_list: %empty */ +#line 969 "bison_parser.y" + { (yyval.expr_vec) = nullptr; } +#line 4218 "bison_parser.cpp" + break; + + case 154: /* literal_list: literal */ +#line 973 "bison_parser.y" + { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } +#line 4224 "bison_parser.cpp" + break; + + case 155: /* literal_list: literal_list ',' literal */ +#line 974 "bison_parser.y" + { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } +#line 4230 "bison_parser.cpp" + break; + + case 156: /* expr_alias: expr opt_alias */ +#line 978 "bison_parser.y" + { + (yyval.expr) = (yyvsp[-1].expr); + if ((yyvsp[0].alias_t)) { + (yyval.expr)->alias = strdup((yyvsp[0].alias_t)->name); + delete (yyvsp[0].alias_t); + } + } +#line 4242 "bison_parser.cpp" + break; + + case 162: /* operand: '(' expr ')' */ +#line 996 "bison_parser.y" + { (yyval.expr) = (yyvsp[-1].expr); } +#line 4248 "bison_parser.cpp" + break; + + case 172: /* operand: '(' select_no_paren ')' */ +#line 1006 "bison_parser.y" + { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } +#line 4254 "bison_parser.cpp" + break; + + case 175: /* unary_expr: '-' operand */ +#line 1015 "bison_parser.y" + { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } +#line 4260 "bison_parser.cpp" + break; + + case 176: /* unary_expr: NOT operand */ +#line 1016 "bison_parser.y" + { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } +#line 4266 "bison_parser.cpp" + break; + + case 177: /* unary_expr: operand ISNULL */ +#line 1017 "bison_parser.y" + { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } +#line 4272 "bison_parser.cpp" + break; + + case 178: /* unary_expr: operand IS NULL */ +#line 1018 "bison_parser.y" + { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } +#line 4278 "bison_parser.cpp" + break; + + case 179: /* unary_expr: operand IS NOT NULL */ +#line 1019 "bison_parser.y" + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } +#line 4284 "bison_parser.cpp" + break; + + case 181: /* binary_expr: operand '-' operand */ +#line 1024 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } +#line 4290 "bison_parser.cpp" + break; + + case 182: /* binary_expr: operand '+' operand */ +#line 1025 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } +#line 4296 "bison_parser.cpp" + break; + + case 183: /* binary_expr: operand '/' operand */ +#line 1026 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } +#line 4302 "bison_parser.cpp" + break; + + case 184: /* binary_expr: operand '*' operand */ +#line 1027 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } +#line 4308 "bison_parser.cpp" + break; + + case 185: /* binary_expr: operand '%' operand */ +#line 1028 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } +#line 4314 "bison_parser.cpp" + break; + + case 186: /* binary_expr: operand '^' operand */ +#line 1029 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } +#line 4320 "bison_parser.cpp" + break; + + case 187: /* binary_expr: operand LIKE operand */ +#line 1030 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } +#line 4326 "bison_parser.cpp" + break; + + case 188: /* binary_expr: operand NOT LIKE operand */ +#line 1031 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } +#line 4332 "bison_parser.cpp" + break; + + case 189: /* binary_expr: operand ILIKE operand */ +#line 1032 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } +#line 4338 "bison_parser.cpp" + break; + + case 190: /* binary_expr: operand CONCAT operand */ +#line 1033 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } +#line 4344 "bison_parser.cpp" + break; + + case 191: /* logic_expr: expr AND expr */ +#line 1037 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } +#line 4350 "bison_parser.cpp" + break; + + case 192: /* logic_expr: expr OR expr */ +#line 1038 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } +#line 4356 "bison_parser.cpp" + break; + + case 193: /* in_expr: operand IN '(' expr_list ')' */ +#line 1042 "bison_parser.y" + { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } +#line 4362 "bison_parser.cpp" + break; + + case 194: /* in_expr: operand NOT IN '(' expr_list ')' */ +#line 1043 "bison_parser.y" + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } +#line 4368 "bison_parser.cpp" + break; + + case 195: /* in_expr: operand IN '(' select_no_paren ')' */ +#line 1044 "bison_parser.y" + { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } +#line 4374 "bison_parser.cpp" + break; + + case 196: /* in_expr: operand NOT IN '(' select_no_paren ')' */ +#line 1045 "bison_parser.y" + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } +#line 4380 "bison_parser.cpp" + break; + + case 197: /* case_expr: CASE expr case_list END */ +#line 1051 "bison_parser.y" + { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } +#line 4386 "bison_parser.cpp" + break; + + case 198: /* case_expr: CASE expr case_list ELSE expr END */ +#line 1052 "bison_parser.y" + { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } +#line 4392 "bison_parser.cpp" + break; + + case 199: /* case_expr: CASE case_list END */ +#line 1053 "bison_parser.y" + { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } +#line 4398 "bison_parser.cpp" + break; + + case 200: /* case_expr: CASE case_list ELSE expr END */ +#line 1054 "bison_parser.y" + { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } +#line 4404 "bison_parser.cpp" + break; + + case 201: /* case_list: WHEN expr THEN expr */ +#line 1058 "bison_parser.y" + { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } +#line 4410 "bison_parser.cpp" + break; + + case 202: /* case_list: case_list WHEN expr THEN expr */ +#line 1059 "bison_parser.y" + { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } +#line 4416 "bison_parser.cpp" + break; + + case 203: /* exists_expr: EXISTS '(' select_no_paren ')' */ +#line 1063 "bison_parser.y" + { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } +#line 4422 "bison_parser.cpp" + break; + + case 204: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ +#line 1064 "bison_parser.y" + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } +#line 4428 "bison_parser.cpp" + break; + + case 205: /* comp_expr: operand '=' operand */ +#line 1068 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } +#line 4434 "bison_parser.cpp" + break; + + case 206: /* comp_expr: operand EQUALS operand */ +#line 1069 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } +#line 4440 "bison_parser.cpp" + break; + + case 207: /* comp_expr: operand NOTEQUALS operand */ +#line 1070 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } +#line 4446 "bison_parser.cpp" + break; + + case 208: /* comp_expr: operand '<' operand */ +#line 1071 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } +#line 4452 "bison_parser.cpp" + break; + + case 209: /* comp_expr: operand '>' operand */ +#line 1072 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } +#line 4458 "bison_parser.cpp" + break; + + case 210: /* comp_expr: operand LESSEQ operand */ +#line 1073 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } +#line 4464 "bison_parser.cpp" + break; + + case 211: /* comp_expr: operand GREATEREQ operand */ +#line 1074 "bison_parser.y" + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } +#line 4470 "bison_parser.cpp" + break; + + case 212: /* function_expr: IDENTIFIER '(' ')' */ +#line 1078 "bison_parser.y" + { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } +#line 4476 "bison_parser.cpp" + break; + + case 213: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ +#line 1079 "bison_parser.y" + { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } +#line 4482 "bison_parser.cpp" + break; + + case 214: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ +#line 1083 "bison_parser.y" + { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } +#line 4488 "bison_parser.cpp" + break; + + case 215: /* cast_expr: CAST '(' expr AS column_type ')' */ +#line 1087 "bison_parser.y" + { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } +#line 4494 "bison_parser.cpp" + break; + + case 216: /* datetime_field: SECOND */ +#line 1091 "bison_parser.y" + { (yyval.datetime_field) = kDatetimeSecond; } +#line 4500 "bison_parser.cpp" + break; + + case 217: /* datetime_field: MINUTE */ +#line 1092 "bison_parser.y" + { (yyval.datetime_field) = kDatetimeMinute; } +#line 4506 "bison_parser.cpp" + break; + + case 218: /* datetime_field: HOUR */ +#line 1093 "bison_parser.y" + { (yyval.datetime_field) = kDatetimeHour; } +#line 4512 "bison_parser.cpp" + break; + + case 219: /* datetime_field: DAY */ +#line 1094 "bison_parser.y" + { (yyval.datetime_field) = kDatetimeDay; } +#line 4518 "bison_parser.cpp" + break; + + case 220: /* datetime_field: MONTH */ +#line 1095 "bison_parser.y" + { (yyval.datetime_field) = kDatetimeMonth; } +#line 4524 "bison_parser.cpp" + break; + + case 221: /* datetime_field: YEAR */ +#line 1096 "bison_parser.y" + { (yyval.datetime_field) = kDatetimeYear; } +#line 4530 "bison_parser.cpp" + break; + + case 222: /* array_expr: ARRAY '[' expr_list ']' */ +#line 1100 "bison_parser.y" + { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } +#line 4536 "bison_parser.cpp" + break; + + case 223: /* array_index: operand '[' int_literal ']' */ +#line 1104 "bison_parser.y" + { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } +#line 4542 "bison_parser.cpp" + break; + + case 224: /* between_expr: operand BETWEEN operand AND operand */ +#line 1108 "bison_parser.y" + { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } +#line 4548 "bison_parser.cpp" + break; + + case 225: /* column_name: IDENTIFIER */ +#line 1112 "bison_parser.y" + { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } +#line 4554 "bison_parser.cpp" + break; + + case 226: /* column_name: IDENTIFIER '.' IDENTIFIER */ +#line 1113 "bison_parser.y" + { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } +#line 4560 "bison_parser.cpp" + break; + + case 227: /* column_name: '*' */ +#line 1114 "bison_parser.y" + { (yyval.expr) = Expr::makeStar(); } +#line 4566 "bison_parser.cpp" + break; + + case 228: /* column_name: IDENTIFIER '.' '*' */ +#line 1115 "bison_parser.y" + { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } +#line 4572 "bison_parser.cpp" + break; + + case 234: /* string_literal: STRING */ +#line 1127 "bison_parser.y" + { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } +#line 4578 "bison_parser.cpp" + break; + + case 235: /* bool_literal: TRUE */ +#line 1131 "bison_parser.y" + { (yyval.expr) = Expr::makeLiteral(true); } +#line 4584 "bison_parser.cpp" + break; + + case 236: /* bool_literal: FALSE */ +#line 1132 "bison_parser.y" + { (yyval.expr) = Expr::makeLiteral(false); } +#line 4590 "bison_parser.cpp" + break; + + case 237: /* num_literal: FLOATVAL */ +#line 1136 "bison_parser.y" + { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } +#line 4596 "bison_parser.cpp" + break; + + case 239: /* int_literal: INTVAL */ +#line 1141 "bison_parser.y" + { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } +#line 4602 "bison_parser.cpp" + break; + + case 240: /* null_literal: NULL */ +#line 1145 "bison_parser.y" + { (yyval.expr) = Expr::makeNullLiteral(); } +#line 4608 "bison_parser.cpp" + break; + + case 241: /* param_expr: '?' */ +#line 1149 "bison_parser.y" + { + (yyval.expr) = Expr::makeParameter(yylloc.total_column); + (yyval.expr)->ival2 = yyloc.param_list.size(); + yyloc.param_list.push_back((yyval.expr)); + } +#line 4618 "bison_parser.cpp" + break; + + case 243: /* table_ref: table_ref_commalist ',' table_ref_atomic */ +#line 1162 "bison_parser.y" + { + (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); + auto tbl = new TableRef(kTableCrossProduct); + tbl->list = (yyvsp[-2].table_vec); + (yyval.table) = tbl; + } +#line 4629 "bison_parser.cpp" + break; + + case 247: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ +#line 1178 "bison_parser.y" + { + auto tbl = new TableRef(kTableSelect); + tbl->select = (yyvsp[-2].select_stmt); + tbl->alias = (yyvsp[0].alias_t); + (yyval.table) = tbl; + } +#line 4640 "bison_parser.cpp" + break; + + case 248: /* table_ref_commalist: table_ref_atomic */ +#line 1187 "bison_parser.y" + { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } +#line 4646 "bison_parser.cpp" + break; + + case 249: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ +#line 1188 "bison_parser.y" + { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } +#line 4652 "bison_parser.cpp" + break; + + case 250: /* table_ref_name: table_name opt_table_alias */ +#line 1193 "bison_parser.y" + { + auto tbl = new TableRef(kTableName); + tbl->schema = (yyvsp[-1].table_name).schema; + tbl->name = (yyvsp[-1].table_name).name; + tbl->alias = (yyvsp[0].alias_t); + (yyval.table) = tbl; + } +#line 4664 "bison_parser.cpp" + break; + + case 251: /* table_ref_name_no_alias: table_name */ +#line 1204 "bison_parser.y" + { + (yyval.table) = new TableRef(kTableName); + (yyval.table)->schema = (yyvsp[0].table_name).schema; + (yyval.table)->name = (yyvsp[0].table_name).name; + } +#line 4674 "bison_parser.cpp" + break; + + case 252: /* table_name: IDENTIFIER */ +#line 1213 "bison_parser.y" + { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} +#line 4680 "bison_parser.cpp" + break; + + case 253: /* table_name: IDENTIFIER '.' IDENTIFIER */ +#line 1214 "bison_parser.y" + { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } +#line 4686 "bison_parser.cpp" + break; + + case 254: /* opt_index_name: IDENTIFIER */ +#line 1218 "bison_parser.y" + { (yyval.sval) = (yyvsp[0].sval);} +#line 4692 "bison_parser.cpp" + break; + + case 255: /* opt_index_name: %empty */ +#line 1219 "bison_parser.y" + { (yyval.sval) = nullptr;} +#line 4698 "bison_parser.cpp" + break; + + case 256: /* index_name: IDENTIFIER */ +#line 1223 "bison_parser.y" + { (yyval.sval) = (yyvsp[0].sval);} +#line 4704 "bison_parser.cpp" + break; + + case 258: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ +#line 1229 "bison_parser.y" + { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } +#line 4710 "bison_parser.cpp" + break; + + case 260: /* opt_table_alias: %empty */ +#line 1235 "bison_parser.y" + { (yyval.alias_t) = nullptr; } +#line 4716 "bison_parser.cpp" + break; + + case 261: /* alias: AS IDENTIFIER */ +#line 1240 "bison_parser.y" + { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } +#line 4722 "bison_parser.cpp" + break; + + case 262: /* alias: IDENTIFIER */ +#line 1241 "bison_parser.y" + { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } +#line 4728 "bison_parser.cpp" + break; + + case 264: /* opt_alias: %empty */ +#line 1247 "bison_parser.y" + { (yyval.alias_t) = nullptr; } +#line 4734 "bison_parser.cpp" + break; + + case 266: /* opt_with_clause: %empty */ +#line 1257 "bison_parser.y" + { (yyval.with_description_vec) = nullptr; } +#line 4740 "bison_parser.cpp" + break; + + case 267: /* with_clause: WITH with_description_list */ +#line 1261 "bison_parser.y" + { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } +#line 4746 "bison_parser.cpp" + break; + + case 268: /* with_description_list: with_description */ +#line 1265 "bison_parser.y" + { + (yyval.with_description_vec) = new std::vector(); + (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); + } +#line 4755 "bison_parser.cpp" + break; + + case 269: /* with_description_list: with_description_list ',' with_description */ +#line 1269 "bison_parser.y" + { + (yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t)); + (yyval.with_description_vec) = (yyvsp[-2].with_description_vec); + } +#line 4764 "bison_parser.cpp" + break; + + case 270: /* with_description: IDENTIFIER AS select_with_paren */ +#line 1276 "bison_parser.y" + { + (yyval.with_description_t) = new WithDescription(); + (yyval.with_description_t)->alias = (yyvsp[-2].sval); + (yyval.with_description_t)->select = (yyvsp[0].select_stmt); + } +#line 4774 "bison_parser.cpp" + break; + + case 271: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ +#line 1290 "bison_parser.y" + { + (yyval.table) = new TableRef(kTableJoin); + (yyval.table)->join = new JoinDefinition(); + (yyval.table)->join->type = kJoinNatural; + (yyval.table)->join->left = (yyvsp[-3].table); + (yyval.table)->join->right = (yyvsp[0].table); + } +#line 4786 "bison_parser.cpp" + break; + + case 272: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ +#line 1298 "bison_parser.y" + { + (yyval.table) = new TableRef(kTableJoin); + (yyval.table)->join = new JoinDefinition(); + (yyval.table)->join->type = (JoinType) (yyvsp[-4].uval); + (yyval.table)->join->left = (yyvsp[-5].table); + (yyval.table)->join->right = (yyvsp[-2].table); + (yyval.table)->join->condition = (yyvsp[0].expr); + } +#line 4799 "bison_parser.cpp" + break; + + case 273: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ +#line 1308 "bison_parser.y" + { + (yyval.table) = new TableRef(kTableJoin); + (yyval.table)->join = new JoinDefinition(); + (yyval.table)->join->type = (JoinType) (yyvsp[-6].uval); + (yyval.table)->join->left = (yyvsp[-7].table); + (yyval.table)->join->right = (yyvsp[-4].table); + auto left_col = Expr::makeColumnRef(strdup((yyvsp[-1].expr)->name)); + if ((yyvsp[-1].expr)->alias != nullptr) left_col->alias = strdup((yyvsp[-1].expr)->alias); + if ((yyvsp[-7].table)->getName() != nullptr) left_col->table = strdup((yyvsp[-7].table)->getName()); + auto right_col = Expr::makeColumnRef(strdup((yyvsp[-1].expr)->name)); + if ((yyvsp[-1].expr)->alias != nullptr) right_col->alias = strdup((yyvsp[-1].expr)->alias); + if ((yyvsp[-4].table)->getName() != nullptr) right_col->table = strdup((yyvsp[-4].table)->getName()); + (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); + delete (yyvsp[-1].expr); + } +#line 4819 "bison_parser.cpp" + break; + + case 274: /* opt_join_type: INNER */ +#line 1326 "bison_parser.y" + { (yyval.uval) = kJoinInner; } +#line 4825 "bison_parser.cpp" + break; + + case 275: /* opt_join_type: LEFT OUTER */ +#line 1327 "bison_parser.y" + { (yyval.uval) = kJoinLeft; } +#line 4831 "bison_parser.cpp" + break; + + case 276: /* opt_join_type: LEFT */ +#line 1328 "bison_parser.y" + { (yyval.uval) = kJoinLeft; } +#line 4837 "bison_parser.cpp" + break; + + case 277: /* opt_join_type: RIGHT OUTER */ +#line 1329 "bison_parser.y" + { (yyval.uval) = kJoinRight; } +#line 4843 "bison_parser.cpp" + break; + + case 278: /* opt_join_type: RIGHT */ +#line 1330 "bison_parser.y" + { (yyval.uval) = kJoinRight; } +#line 4849 "bison_parser.cpp" + break; + + case 279: /* opt_join_type: FULL OUTER */ +#line 1331 "bison_parser.y" + { (yyval.uval) = kJoinFull; } +#line 4855 "bison_parser.cpp" + break; + + case 280: /* opt_join_type: OUTER */ +#line 1332 "bison_parser.y" + { (yyval.uval) = kJoinFull; } +#line 4861 "bison_parser.cpp" + break; + + case 281: /* opt_join_type: FULL */ +#line 1333 "bison_parser.y" + { (yyval.uval) = kJoinFull; } +#line 4867 "bison_parser.cpp" + break; + + case 282: /* opt_join_type: CROSS */ +#line 1334 "bison_parser.y" + { (yyval.uval) = kJoinCross; } +#line 4873 "bison_parser.cpp" + break; + + case 283: /* opt_join_type: %empty */ +#line 1335 "bison_parser.y" + { (yyval.uval) = kJoinInner; } +#line 4879 "bison_parser.cpp" + break; + + case 287: /* ident_commalist: IDENTIFIER */ +#line 1355 "bison_parser.y" + { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } +#line 4885 "bison_parser.cpp" + break; + + case 288: /* ident_commalist: ident_commalist ',' IDENTIFIER */ +#line 1356 "bison_parser.y" + { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } +#line 4891 "bison_parser.cpp" + break; + + +#line 4895 "bison_parser.cpp" + + default: break; + } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ + YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + + *++yyvsp = yyval; + *++yylsp = yyloc; + + /* Now 'shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + { + 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; + + +/*--------------------------------------. +| yyerrlab -- here on detecting error. | +`--------------------------------------*/ +yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == SQL_HSQL_EMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; + { + yypcontext_t yyctx + = {yyssp, yytoken, &yylloc}; + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == -1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = YY_CAST (char *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); + if (yymsg) + { + yysyntax_error_status + = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); + yymsgp = yymsg; + } + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = YYENOMEM; + } + } + yyerror (&yylloc, result, scanner, yymsgp); + if (yysyntax_error_status == YYENOMEM) + goto yyexhaustedlab; + } + } + + yyerror_range[1] = yylloc; + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + if (yychar <= SQL_YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == SQL_YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval, &yylloc, result, scanner); + yychar = SQL_HSQL_EMPTY; + } + } + + /* Else will try to reuse lookahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| 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; + + /* Do not reclaim the symbols of the rule whose action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + /* Pop stack until we find a state that shifts the error token. */ + for (;;) + { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) + { + yyn += YYSYMBOL_YYerror; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + yyerror_range[1] = *yylsp; + yydestruct ("Error: popping", + YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, result, scanner); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + + yyerror_range[2] = yylloc; + ++yylsp; + YYLLOC_DEFAULT (*yylsp, yyerror_range, 2); + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + + +#if 1 +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (&yylloc, result, scanner, YY_("memory exhausted")); + yyresult = 2; + goto yyreturn; +#endif + + +/*-------------------------------------------------------. +| yyreturn -- parsing is finished, clean up and return. | +`-------------------------------------------------------*/ +yyreturn: + if (yychar != SQL_HSQL_EMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, &yylloc, result, scanner); + } + /* Do not reclaim the symbols of the rule whose action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, result, scanner); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + return yyresult; +} + +#line 1359 "bison_parser.y" + +/********************************* + ** Section 4: Additional C code + *********************************/ + +/* empty */ diff --git a/src/parser/flex_lexer.cpp b/src/parser/flex_lexer.cpp new file mode 100644 index 00000000..47fd636a --- /dev/null +++ b/src/parser/flex_lexer.cpp @@ -0,0 +1,4457 @@ +#line 1 "flex_lexer.cpp" + +#line 3 "flex_lexer.cpp" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 4 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +#ifdef yy_create_buffer +#define hsql__create_buffer_ALREADY_DEFINED +#else +#define yy_create_buffer hsql__create_buffer +#endif + +#ifdef yy_delete_buffer +#define hsql__delete_buffer_ALREADY_DEFINED +#else +#define yy_delete_buffer hsql__delete_buffer +#endif + +#ifdef yy_scan_buffer +#define hsql__scan_buffer_ALREADY_DEFINED +#else +#define yy_scan_buffer hsql__scan_buffer +#endif + +#ifdef yy_scan_string +#define hsql__scan_string_ALREADY_DEFINED +#else +#define yy_scan_string hsql__scan_string +#endif + +#ifdef yy_scan_bytes +#define hsql__scan_bytes_ALREADY_DEFINED +#else +#define yy_scan_bytes hsql__scan_bytes +#endif + +#ifdef yy_init_buffer +#define hsql__init_buffer_ALREADY_DEFINED +#else +#define yy_init_buffer hsql__init_buffer +#endif + +#ifdef yy_flush_buffer +#define hsql__flush_buffer_ALREADY_DEFINED +#else +#define yy_flush_buffer hsql__flush_buffer +#endif + +#ifdef yy_load_buffer_state +#define hsql__load_buffer_state_ALREADY_DEFINED +#else +#define yy_load_buffer_state hsql__load_buffer_state +#endif + +#ifdef yy_switch_to_buffer +#define hsql__switch_to_buffer_ALREADY_DEFINED +#else +#define yy_switch_to_buffer hsql__switch_to_buffer +#endif + +#ifdef yypush_buffer_state +#define hsql_push_buffer_state_ALREADY_DEFINED +#else +#define yypush_buffer_state hsql_push_buffer_state +#endif + +#ifdef yypop_buffer_state +#define hsql_pop_buffer_state_ALREADY_DEFINED +#else +#define yypop_buffer_state hsql_pop_buffer_state +#endif + +#ifdef yyensure_buffer_stack +#define hsql_ensure_buffer_stack_ALREADY_DEFINED +#else +#define yyensure_buffer_stack hsql_ensure_buffer_stack +#endif + +#ifdef yylex +#define hsql_lex_ALREADY_DEFINED +#else +#define yylex hsql_lex +#endif + +#ifdef yyrestart +#define hsql_restart_ALREADY_DEFINED +#else +#define yyrestart hsql_restart +#endif + +#ifdef yylex_init +#define hsql_lex_init_ALREADY_DEFINED +#else +#define yylex_init hsql_lex_init +#endif + +#ifdef yylex_init_extra +#define hsql_lex_init_extra_ALREADY_DEFINED +#else +#define yylex_init_extra hsql_lex_init_extra +#endif + +#ifdef yylex_destroy +#define hsql_lex_destroy_ALREADY_DEFINED +#else +#define yylex_destroy hsql_lex_destroy +#endif + +#ifdef yyget_debug +#define hsql_get_debug_ALREADY_DEFINED +#else +#define yyget_debug hsql_get_debug +#endif + +#ifdef yyset_debug +#define hsql_set_debug_ALREADY_DEFINED +#else +#define yyset_debug hsql_set_debug +#endif + +#ifdef yyget_extra +#define hsql_get_extra_ALREADY_DEFINED +#else +#define yyget_extra hsql_get_extra +#endif + +#ifdef yyset_extra +#define hsql_set_extra_ALREADY_DEFINED +#else +#define yyset_extra hsql_set_extra +#endif + +#ifdef yyget_in +#define hsql_get_in_ALREADY_DEFINED +#else +#define yyget_in hsql_get_in +#endif + +#ifdef yyset_in +#define hsql_set_in_ALREADY_DEFINED +#else +#define yyset_in hsql_set_in +#endif + +#ifdef yyget_out +#define hsql_get_out_ALREADY_DEFINED +#else +#define yyget_out hsql_get_out +#endif + +#ifdef yyset_out +#define hsql_set_out_ALREADY_DEFINED +#else +#define yyset_out hsql_set_out +#endif + +#ifdef yyget_leng +#define hsql_get_leng_ALREADY_DEFINED +#else +#define yyget_leng hsql_get_leng +#endif + +#ifdef yyget_text +#define hsql_get_text_ALREADY_DEFINED +#else +#define yyget_text hsql_get_text +#endif + +#ifdef yyget_lineno +#define hsql_get_lineno_ALREADY_DEFINED +#else +#define yyget_lineno hsql_get_lineno +#endif + +#ifdef yyset_lineno +#define hsql_set_lineno_ALREADY_DEFINED +#else +#define yyset_lineno hsql_set_lineno +#endif + +#ifdef yyget_column +#define hsql_get_column_ALREADY_DEFINED +#else +#define yyget_column hsql_get_column +#endif + +#ifdef yyset_column +#define hsql_set_column_ALREADY_DEFINED +#else +#define yyset_column hsql_set_column +#endif + +#ifdef yywrap +#define hsql_wrap_ALREADY_DEFINED +#else +#define yywrap hsql_wrap +#endif + +#ifdef yyget_lval +#define hsql_get_lval_ALREADY_DEFINED +#else +#define yyget_lval hsql_get_lval +#endif + +#ifdef yyset_lval +#define hsql_set_lval_ALREADY_DEFINED +#else +#define yyset_lval hsql_set_lval +#endif + +#ifdef yyget_lloc +#define hsql_get_lloc_ALREADY_DEFINED +#else +#define yyget_lloc hsql_get_lloc +#endif + +#ifdef yyset_lloc +#define hsql_set_lloc_ALREADY_DEFINED +#else +#define yyset_lloc hsql_set_lloc +#endif + +#ifdef yyalloc +#define hsql_alloc_ALREADY_DEFINED +#else +#define yyalloc hsql_alloc +#endif + +#ifdef yyrealloc +#define hsql_realloc_ALREADY_DEFINED +#else +#define yyrealloc hsql_realloc +#endif + +#ifdef yyfree +#define hsql_free_ALREADY_DEFINED +#else +#define yyfree hsql_free +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#ifndef SIZE_MAX +#define SIZE_MAX (~(size_t)0) +#endif + +#endif /* ! C99 */ + +#endif /* ! FLEXINT_H */ + +/* begin standard C++ headers. */ + +/* TODO: this is always defined, so inline it */ +#define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) +#else +#define yynoreturn +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an + * integer in range [0..255] for use as an array index. + */ +#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) + +/* An opaque pointer. */ +#ifndef YY_TYPEDEF_YY_SCANNER_T +#define YY_TYPEDEF_YY_SCANNER_T +typedef void* yyscan_t; +#endif + +/* For convenience, these vars (plus the bison vars far below) + are macros in the reentrant scanner. */ +#define yyin yyg->yyin_r +#define yyout yyg->yyout_r +#define yyextra yyg->yyextra_r +#define yyleng yyg->yyleng_r +#define yytext yyg->yytext_r +#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) +#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) +#define yy_flex_debug yyg->yy_flex_debug_r + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN yyg->yy_start = 1 + 2 * +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START ((yyg->yy_start - 1) / 2) +#define YYSTATE YY_START +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart( yyin , yyscanner ) +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else +#define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = yyg->yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) +#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ + ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ + : NULL) +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] + +void yyrestart ( FILE *input_file , yyscan_t yyscanner ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); +void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); +void yypop_buffer_state ( yyscan_t yyscanner ); + +static void yyensure_buffer_stack ( yyscan_t yyscanner ); +static void yy_load_buffer_state ( yyscan_t yyscanner ); +static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); +#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) + +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); + +void *yyalloc ( yy_size_t , yyscan_t yyscanner ); +void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); +void yyfree ( void * , yyscan_t yyscanner ); + +#define yy_new_buffer yy_create_buffer +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +#define hsql_wrap(yyscanner) (/*CONSTCOND*/1) +#define YY_SKIP_YYWRAP +typedef flex_uint8_t YY_CHAR; + +typedef int yy_state_type; + +#define yytext_ptr yytext_r + +static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); +static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); +static int yy_get_next_buffer ( yyscan_t yyscanner ); +static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; +#define YY_NUM_RULES 164 +#define YY_END_OF_BUFFER 165 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static const flex_int16_t yy_accept[1152] = + { 0, + 0, 0, 161, 161, 2, 2, 165, 163, 4, 4, + 163, 163, 152, 159, 152, 152, 156, 152, 152, 152, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 152, 161, 162, 2, 2, 3, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 4, 147, 0, 1, 0, + 154, 153, 156, 149, 148, 146, 150, 158, 158, 158, + + 158, 158, 158, 125, 158, 126, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 127, 158, 158, 128, 129, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 130, 131, 132, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 133, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 151, 161, 160, 2, + 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 157, 0, 153, 113, 158, 114, 158, 158, + 115, 158, 116, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 137, 158, 158, 158, + + 158, 158, 158, 158, 158, 158, 158, 117, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 118, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 119, 158, 158, 120, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 121, 158, 158, 122, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 123, 158, 158, 158, 158, 158, 158, + 158, 158, 124, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + + 0, 158, 158, 158, 158, 158, 158, 158, 83, 158, + 84, 46, 85, 158, 158, 158, 86, 158, 158, 87, + 158, 158, 158, 158, 158, 89, 158, 158, 158, 90, + 91, 158, 158, 158, 158, 158, 158, 158, 92, 158, + 158, 93, 94, 158, 158, 95, 158, 96, 136, 158, + 158, 158, 158, 158, 158, 97, 158, 98, 99, 100, + 158, 102, 158, 103, 158, 158, 158, 158, 104, 158, + 158, 158, 158, 158, 105, 158, 158, 34, 158, 158, + 158, 158, 158, 158, 158, 106, 158, 158, 158, 158, + 107, 108, 32, 158, 140, 158, 158, 158, 158, 158, + + 158, 158, 158, 158, 110, 158, 111, 158, 112, 139, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 0, 63, 64, 158, 65, 158, 143, 158, 158, 158, + 158, 158, 158, 158, 66, 158, 158, 158, 158, 158, + 67, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 141, 68, 158, 158, 69, 158, 101, 158, 70, + 71, 158, 158, 158, 158, 72, 73, 74, 75, 158, + 138, 158, 158, 158, 76, 77, 158, 158, 158, 158, + 158, 78, 158, 158, 158, 158, 158, 158, 79, 158, + 158, 158, 158, 80, 158, 158, 158, 81, 158, 158, + + 158, 158, 82, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 0, 158, 36, 158, + 158, 158, 37, 145, 158, 38, 158, 158, 158, 158, + + 39, 158, 40, 158, 41, 42, 43, 158, 44, 158, + 158, 47, 48, 49, 50, 51, 158, 158, 52, 135, + 158, 158, 53, 158, 158, 158, 54, 158, 158, 55, + 134, 56, 57, 158, 58, 158, 158, 158, 158, 59, + 60, 61, 62, 158, 158, 158, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + + 2, 2, 2, 2, 2, 2, 0, 15, 16, 17, + 158, 18, 19, 158, 158, 33, 20, 158, 158, 21, + 22, 45, 23, 158, 24, 158, 158, 25, 26, 158, + 158, 27, 28, 158, 158, 158, 158, 29, 31, 35, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 0, 158, 88, 158, 10, 11, + 158, 12, 158, 13, 144, 158, 158, 158, 14, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + + 2, 2, 2, 2, 0, 30, 158, 7, 158, 8, + 9, 158, 2, 2, 2, 2, 2, 2, 2, 2, + 0, 5, 6, 158, 2, 2, 2, 2, 0, 142, + 2, 2, 0, 2, 0, 2, 0, 2, 0, 2, + 0, 2, 0, 2, 0, 2, 0, 2, 155, 2, + 0 + } ; + +static const YY_CHAR yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 4, 5, 1, 1, 6, 1, 7, 6, + 6, 6, 6, 6, 8, 9, 6, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 6, 6, 20, + 21, 22, 6, 1, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 6, 1, 6, 6, 49, 1, 50, 51, 52, 53, + + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 6, 76, 6, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static const YY_CHAR yy_meta[77] = + { 0, + 1, 1, 2, 1, 3, 1, 4, 1, 1, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, + 1, 1, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 1 + } ; + +static const flex_int16_t yy_base[1159] = + { 0, + 0, 0, 720, 709, 76, 0, 688, 4601, 151, 153, + 647, 0, 4601, 4601, 149, 148, 160, 159, 643, 625, + 156, 156, 164, 162, 172, 223, 198, 211, 215, 151, + 168, 210, 255, 257, 263, 262, 0, 277, 307, 350, + 284, 221, 258, 171, 564, 0, 609, 0, 295, 308, + 586, 576, 0, 0, 331, 408, 419, 321, 542, 512, + 438, 514, 568, 620, 668, 720, 328, 426, 768, 329, + 311, 434, 500, 820, 868, 505, 421, 513, 918, 970, + 515, 570, 455, 423, 450, 351, 4601, 520, 4601, 512, + 1035, 1045, 1056, 4601, 4601, 4601, 4601, 0, 174, 282, + + 336, 520, 296, 315, 557, 0, 345, 334, 568, 511, + 327, 611, 570, 345, 419, 421, 441, 444, 631, 469, + 515, 520, 542, 555, 560, 559, 563, 609, 578, 605, + 0, 618, 616, 665, 619, 628, 618, 643, 664, 685, + 650, 657, 667, 663, 669, 678, 690, 691, 0, 697, + 683, 704, 722, 722, 750, 726, 722, 728, 764, 724, + 725, 743, 773, 764, 774, 770, 769, 796, 777, 788, + 786, 787, 818, 822, 808, 828, 4601, 0, 4601, 0, + 389, 0, 512, 0, 499, 1066, 1076, 1087, 0, 0, + 0, 0, 826, 835, 856, 859, 913, 887, 872, 922, + + 905, 961, 962, 1080, 957, 1081, 1133, 1085, 1119, 1083, + 1097, 1122, 1143, 1193, 1145, 1175, 1178, 959, 1196, 1187, + 1217, 1219, 1228, 1232, 1183, 1137, 1247, 1238, 1296, 1253, + 1257, 1270, 1281, 1306, 1331, 1335, 1298, 1350, 1346, 1349, + 1365, 1383, 1380, 1374, 1405, 1402, 1413, 1415, 1414, 1450, + 1454, 1448, 1469, 1478, 1480, 1502, 1508, 1513, 1524, 1389, + 1518, 1519, 1552, 1554, 1563, 1573, 1596, 1567, 1467, 1591, + 1602, 0, 4601, 498, 1667, 0, 825, 0, 833, 831, + 0, 852, 0, 880, 916, 908, 937, 1619, 963, 962, + 979, 1067, 1066, 1154, 1140, 1159, 0, 1166, 1181, 1240, + + 1315, 1262, 1286, 1277, 1296, 1325, 1344, 0, 1364, 1368, + 1422, 1410, 1432, 1444, 1451, 1479, 1513, 1515, 1570, 1579, + 1600, 1592, 1609, 1611, 1606, 1624, 1634, 1631, 1645, 1647, + 1660, 1663, 1646, 1656, 0, 1651, 1669, 1666, 1672, 1679, + 1674, 1675, 1662, 1664, 1664, 0, 1674, 1669, 1669, 1684, + 1685, 1690, 1679, 1680, 1686, 1688, 1703, 1686, 1711, 1709, + 1717, 1709, 1720, 0, 1705, 1709, 1710, 1720, 1718, 1715, + 1722, 1732, 0, 1724, 1736, 1725, 1724, 1742, 1730, 1724, + 1750, 1724, 1734, 1764, 1750, 1742, 0, 495, 1800, 1774, + 1778, 1779, 1793, 1795, 1796, 1807, 1808, 1831, 1832, 1819, + + 1849, 1847, 1857, 1865, 1853, 1871, 1875, 1903, 1887, 1890, + 1905, 1909, 1911, 1924, 1933, 1941, 1935, 1949, 1957, 1959, + 1945, 1963, 1978, 1967, 1995, 1989, 2011, 1999, 2007, 2008, + 2017, 2033, 2043, 2049, 2062, 2057, 2071, 2061, 2052, 2093, + 2097, 2075, 2087, 2105, 2111, 2116, 2119, 2128, 2127, 2141, + 2145, 2167, 2150, 2173, 2179, 2182, 2185, 2195, 2203, 2204, + 2218, 2221, 2213, 2216, 2235, 2253, 2247, 2258, 2264, 2259, + 2275, 2277, 2287, 2281, 2289, 2303, 2312, 2318, 2326, 2327, + 2337, 2341, 2356, 2343, 2372, 2335, 2360, 2377, 2389, 2400, + 2391, 2406, 2414, 2415, 2432, 2445, 2440, 2464, 2448, 2456, + + 491, 1798, 1804, 1813, 1899, 1960, 1993, 2023, 0, 2119, + 0, 0, 2155, 2151, 2176, 2177, 0, 2336, 2352, 2380, + 2410, 2435, 2438, 2451, 2475, 2461, 2482, 2481, 2479, 0, + 0, 2477, 2478, 2478, 2482, 2503, 2506, 2505, 0, 2491, + 2512, 0, 0, 2513, 2499, 0, 2505, 0, 0, 2517, + 2505, 2500, 2507, 2509, 2521, 0, 2518, 0, 0, 0, + 2512, 0, 2521, 0, 2530, 2524, 2528, 2527, 0, 2544, + 2543, 2535, 2538, 2545, 0, 2560, 2563, 0, 2552, 2549, + 2548, 2567, 2560, 2562, 2574, 0, 2573, 2570, 2576, 2567, + 0, 0, 2565, 2567, 0, 2584, 2575, 2569, 2592, 2577, + + 2591, 2594, 2593, 2593, 0, 2586, 0, 2605, 0, 0, + 474, 2613, 2614, 2610, 2616, 2618, 2635, 2622, 2639, 2650, + 2647, 2648, 2656, 2664, 2681, 2680, 2678, 2689, 2710, 2702, + 2706, 2715, 2718, 2732, 2743, 2755, 2756, 2760, 2777, 2758, + 2769, 2788, 2798, 2794, 2786, 2823, 2831, 2773, 2812, 2829, + 2842, 2840, 2848, 2857, 2852, 2861, 2873, 2874, 2883, 2885, + 2898, 2896, 2906, 2914, 2935, 2897, 2929, 2931, 2939, 2940, + 2950, 2952, 2973, 2968, 2969, 2990, 2971, 3006, 2994, 3024, + 3003, 3025, 3027, 3028, 3039, 3060, 3061, 3042, 3070, 3079, + 3076, 3101, 3102, 3073, 3113, 3104, 3112, 3130, 3115, 3136, + + 3127, 3144, 3152, 3155, 3158, 3167, 3180, 3168, 3190, 3203, + 3204, 3181, 3209, 3221, 3220, 3222, 3226, 3234, 3235, 3243, + 442, 0, 0, 2666, 0, 2692, 0, 2721, 2865, 2888, + 2948, 2966, 2975, 3002, 0, 3054, 3058, 3118, 3109, 3170, + 0, 3228, 3229, 3248, 3258, 3260, 3249, 3251, 3258, 3270, + 3277, 0, 0, 3261, 3270, 0, 3276, 0, 3264, 0, + 0, 3265, 3283, 3272, 3281, 0, 0, 0, 0, 3289, + 0, 3296, 3291, 3280, 0, 0, 3296, 3284, 3285, 3300, + 3304, 0, 3313, 3315, 3313, 3299, 3318, 3322, 3306, 3313, + 3313, 3333, 3334, 0, 3331, 3333, 3333, 0, 3320, 3341, + + 3331, 3346, 0, 441, 3343, 3346, 3351, 3348, 3354, 3362, + 3365, 3377, 3386, 3387, 3400, 3408, 3402, 3405, 3417, 3416, + 3450, 3431, 3439, 3440, 3468, 3454, 3462, 3456, 3480, 3490, + 3491, 3494, 3516, 3504, 3492, 3522, 3525, 3546, 3528, 3554, + 3530, 3544, 3558, 3562, 3579, 3568, 3570, 3596, 3587, 3592, + 3598, 3600, 3602, 3604, 3632, 3633, 3641, 3637, 3638, 3642, + 3654, 3673, 3650, 3671, 3672, 3707, 3708, 3696, 3690, 3725, + 3733, 3744, 3746, 3721, 3742, 3761, 3747, 3750, 3776, 3778, + 3779, 3787, 3804, 3809, 3815, 3790, 435, 3352, 0, 3374, + 3430, 3519, 3594, 0, 3606, 0, 3674, 3689, 3705, 3777, + + 0, 3798, 0, 3814, 0, 0, 0, 3813, 0, 3807, + 3805, 0, 0, 0, 0, 0, 3808, 3830, 0, 0, + 3825, 3837, 0, 3826, 3844, 3826, 0, 3851, 3852, 3838, + 0, 0, 0, 3846, 0, 3858, 3859, 3860, 3846, 0, + 0, 0, 0, 3850, 3862, 3858, 434, 3866, 3867, 3869, + 3875, 3883, 3897, 3899, 3900, 3901, 3915, 3931, 3932, 3940, + 3937, 3968, 3943, 3971, 3953, 3954, 3977, 3983, 3985, 3993, + 3994, 3999, 4007, 4008, 4011, 4017, 4039, 4022, 4023, 4033, + 4056, 4051, 4045, 4062, 4048, 4061, 4067, 4093, 4099, 4096, + 4085, 4101, 4102, 4127, 4111, 4139, 4145, 4144, 4136, 4130, + + 4133, 4155, 4167, 4176, 4179, 4190, 429, 0, 0, 0, + 3906, 0, 0, 3909, 3922, 0, 0, 3949, 3974, 0, + 0, 0, 0, 4059, 0, 4060, 4125, 0, 0, 4158, + 4178, 0, 0, 4172, 4180, 4178, 4195, 0, 0, 0, + 404, 4198, 4201, 4207, 4209, 4213, 4219, 4230, 4235, 4232, + 4241, 4243, 4249, 4247, 4251, 4253, 4265, 4283, 4275, 4284, + 4286, 4287, 4289, 4305, 4315, 4299, 4317, 4338, 4341, 4339, + 4323, 4340, 4353, 4355, 402, 4288, 0, 4303, 0, 0, + 4314, 0, 4344, 0, 0, 4343, 4358, 4367, 0, 401, + 4379, 4374, 4389, 4383, 4391, 4393, 4395, 4412, 4397, 4407, + + 4423, 4437, 4429, 4441, 397, 0, 4428, 0, 4431, 0, + 0, 4436, 396, 4447, 4451, 4462, 4463, 4465, 4466, 4481, + 383, 0, 0, 4444, 382, 4479, 4487, 4496, 376, 0, + 342, 4495, 333, 331, 303, 291, 278, 255, 250, 245, + 243, 240, 235, 221, 226, 197, 187, 173, 4601, 0, + 4601, 4570, 4575, 181, 4580, 4585, 4590, 4595 + } ; + +static const flex_int16_t yy_def[1159] = + { 0, + 1151, 1, 1152, 1152, 1151, 5, 1151, 1151, 1151, 1151, + 1151, 1153, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1151, 1155, 1151, 1156, 1156, 1151, + 1156, 1157, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1158, 1158, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 1156, 1151, 1151, 1153, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1154, 1154, 1154, + + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1151, 1155, 1151, 1156, + 1156, 1156, 1157, 1156, 1156, 1156, 1156, 1156, 1156, 1156, + 1156, 1156, 62, 62, 62, 62, 62, 62, 62, 62, + + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 1156, 1151, 1151, 1151, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1156, 1156, 1156, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + + 1151, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1156, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 1151, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + + 1154, 1154, 1154, 1156, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 1151, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1156, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + + 62, 62, 62, 62, 62, 62, 1151, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, + 1156, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 1151, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1156, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + + 62, 62, 62, 62, 1151, 1154, 1154, 1154, 1154, 1154, + 1154, 1154, 1156, 62, 62, 62, 62, 62, 62, 62, + 1151, 1154, 1154, 1154, 1156, 62, 62, 62, 1151, 1154, + 1156, 62, 1151, 1156, 1151, 1156, 1151, 1156, 1151, 1156, + 1151, 1156, 1151, 1156, 1151, 1156, 1151, 1156, 1151, 1156, + 0, 1151, 1151, 1151, 1151, 1151, 1151, 1151 + } ; + +static const flex_int16_t yy_nxt[4678] = + { 0, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 37, 44, 37, 8, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 37, 44, 37, 45, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 58, 59, 60, 61, 62, + + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 77, 84, 77, 48, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 77, 84, + 77, 85, 86, 86, 86, 86, 89, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 91, 90, 92, 93, + 93, 93, 93, 93, 93, 93, 93, 93, 93, 94, + 95, 99, 105, 100, 111, 98, 107, 136, 112, 101, + 1150, 102, 113, 108, 137, 103, 104, 176, 114, 276, + + 109, 115, 106, 110, 1149, 116, 1148, 117, 99, 105, + 100, 111, 118, 107, 136, 112, 101, 119, 102, 113, + 108, 137, 103, 104, 176, 114, 276, 109, 115, 106, + 110, 126, 116, 128, 117, 1147, 138, 127, 1146, 118, + 139, 129, 131, 172, 119, 120, 140, 130, 132, 133, + 134, 173, 1145, 121, 1144, 135, 122, 1143, 126, 123, + 128, 1142, 124, 138, 127, 125, 1141, 139, 129, 131, + 172, 1140, 120, 140, 130, 132, 133, 134, 173, 144, + 121, 141, 135, 122, 152, 142, 123, 174, 175, 124, + 148, 143, 125, 145, 1139, 153, 181, 86, 149, 146, + + 147, 154, 150, 155, 1138, 151, 144, 156, 141, 86, + 86, 152, 142, 157, 174, 175, 1137, 148, 143, 169, + 145, 170, 153, 277, 171, 149, 146, 147, 154, 150, + 155, 158, 151, 159, 156, 282, 160, 232, 184, 283, + 157, 189, 190, 161, 162, 1136, 169, 1135, 170, 185, + 277, 171, 86, 86, 193, 193, 289, 193, 158, 1134, + 159, 221, 282, 160, 232, 231, 283, 222, 296, 278, + 161, 162, 163, 297, 193, 193, 164, 279, 287, 165, + 166, 193, 193, 289, 193, 288, 167, 305, 221, 168, + 181, 86, 231, 1133, 222, 296, 278, 1131, 1129, 163, + + 297, 193, 193, 164, 279, 287, 165, 166, 1125, 1121, + 1113, 1105, 288, 167, 305, 1090, 168, 186, 186, 186, + 186, 186, 186, 186, 186, 186, 186, 187, 188, 188, + 188, 188, 188, 188, 188, 188, 188, 188, 180, 180, + 1075, 180, 180, 180, 180, 180, 180, 193, 223, 271, + 1041, 1007, 193, 947, 887, 306, 224, 180, 180, 180, + 233, 307, 225, 194, 234, 195, 308, 193, 309, 193, + 235, 196, 193, 197, 193, 223, 271, 198, 199, 193, + 193, 193, 306, 224, 269, 270, 804, 233, 307, 225, + 194, 234, 195, 308, 193, 309, 193, 235, 196, 193, + + 197, 193, 315, 721, 198, 199, 611, 193, 193, 501, + 388, 269, 270, 180, 180, 180, 387, 180, 180, 180, + 180, 180, 180, 274, 273, 272, 236, 247, 193, 315, + 237, 193, 192, 180, 180, 180, 238, 294, 248, 250, + 200, 193, 280, 251, 249, 281, 193, 295, 316, 252, + 264, 193, 265, 236, 247, 266, 317, 237, 193, 193, + 201, 193, 191, 238, 294, 248, 250, 200, 193, 280, + 251, 249, 281, 193, 295, 316, 252, 264, 193, 265, + 180, 318, 266, 317, 284, 285, 193, 201, 193, 180, + 202, 319, 267, 320, 193, 321, 193, 203, 286, 322, + + 268, 290, 291, 292, 204, 293, 182, 205, 318, 303, + 304, 284, 285, 325, 193, 179, 193, 202, 319, 267, + 320, 193, 321, 193, 203, 286, 322, 268, 290, 291, + 292, 204, 293, 298, 205, 299, 303, 304, 300, 177, + 325, 193, 206, 193, 301, 97, 207, 326, 327, 323, + 208, 302, 324, 328, 333, 310, 209, 311, 334, 210, + 298, 312, 299, 96, 335, 300, 193, 87, 313, 206, + 336, 301, 314, 207, 326, 327, 323, 208, 302, 324, + 328, 333, 310, 209, 311, 334, 210, 1151, 312, 342, + 329, 335, 343, 193, 193, 313, 337, 336, 338, 314, + + 330, 211, 344, 212, 345, 331, 332, 339, 213, 340, + 346, 347, 348, 214, 193, 47, 342, 329, 349, 343, + 341, 193, 350, 337, 351, 338, 47, 330, 211, 344, + 212, 345, 331, 332, 339, 213, 340, 346, 347, 348, + 214, 193, 215, 352, 353, 349, 193, 341, 354, 350, + 216, 351, 355, 217, 359, 360, 218, 361, 1151, 219, + 365, 1151, 220, 1151, 366, 367, 193, 1151, 1151, 215, + 352, 353, 356, 193, 1151, 354, 1151, 216, 1151, 355, + 217, 359, 360, 218, 361, 357, 219, 365, 362, 220, + 358, 366, 367, 193, 193, 226, 368, 363, 369, 356, + + 371, 227, 228, 229, 372, 364, 373, 376, 230, 370, + 377, 1151, 357, 378, 193, 362, 379, 358, 374, 1151, + 380, 193, 226, 368, 363, 369, 381, 371, 227, 228, + 229, 372, 364, 373, 376, 230, 370, 377, 375, 1151, + 378, 193, 239, 379, 382, 374, 193, 380, 384, 385, + 386, 502, 193, 381, 1151, 1151, 240, 383, 1151, 503, + 390, 193, 241, 242, 504, 375, 193, 1151, 1151, 239, + 1151, 382, 193, 193, 505, 384, 385, 386, 502, 193, + 1151, 193, 193, 240, 383, 193, 503, 390, 193, 241, + 242, 504, 392, 193, 193, 243, 397, 391, 193, 193, + + 393, 505, 193, 244, 1151, 193, 1151, 245, 193, 193, + 246, 1151, 193, 193, 193, 1151, 506, 1151, 193, 392, + 1151, 193, 243, 397, 391, 193, 396, 393, 1151, 193, + 244, 193, 193, 193, 245, 394, 1151, 246, 395, 193, + 193, 193, 253, 506, 254, 193, 507, 255, 193, 398, + 399, 193, 508, 396, 256, 257, 1151, 1151, 193, 193, + 193, 1151, 394, 400, 193, 395, 193, 1151, 193, 253, + 509, 254, 1151, 507, 255, 193, 398, 399, 193, 508, + 1151, 256, 257, 408, 403, 193, 193, 193, 193, 1151, + 400, 193, 258, 409, 401, 193, 259, 509, 432, 260, + + 261, 402, 513, 193, 514, 193, 262, 193, 193, 263, + 408, 403, 193, 515, 193, 193, 193, 1151, 1151, 258, + 409, 401, 1151, 259, 1151, 432, 260, 261, 402, 513, + 193, 514, 193, 262, 193, 193, 263, 1151, 1151, 1151, + 515, 1151, 1151, 193, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 275, 275, 275, 275, 275, 275, + 275, 275, 275, 275, 92, 93, 93, 93, 93, 93, + 93, 93, 93, 93, 93, 186, 186, 186, 186, 186, + 186, 186, 186, 186, 186, 389, 389, 389, 389, 389, + 389, 389, 389, 389, 389, 187, 188, 188, 188, 188, + + 188, 188, 188, 188, 188, 188, 193, 193, 516, 193, + 1151, 193, 517, 404, 405, 406, 1151, 407, 1151, 420, + 1151, 1151, 410, 193, 417, 418, 193, 411, 1151, 193, + 1151, 193, 1151, 193, 193, 516, 193, 421, 193, 517, + 404, 405, 406, 193, 407, 193, 420, 422, 193, 410, + 193, 417, 418, 193, 411, 412, 193, 413, 193, 193, + 414, 419, 1151, 193, 421, 193, 415, 423, 193, 193, + 193, 193, 193, 416, 422, 193, 518, 1151, 429, 193, + 519, 1151, 412, 193, 413, 520, 193, 414, 419, 193, + 193, 193, 193, 415, 423, 193, 193, 1151, 193, 521, + + 416, 193, 1151, 518, 193, 429, 193, 519, 430, 193, + 193, 522, 520, 193, 431, 1151, 193, 424, 193, 425, + 434, 193, 193, 426, 193, 440, 521, 1151, 193, 193, + 427, 193, 433, 193, 428, 430, 193, 1151, 522, 193, + 193, 431, 193, 193, 424, 193, 425, 434, 193, 193, + 426, 193, 440, 435, 193, 436, 193, 427, 193, 433, + 193, 428, 523, 193, 193, 193, 193, 439, 437, 193, + 193, 438, 193, 193, 193, 442, 1151, 441, 193, 193, + 435, 193, 436, 193, 193, 193, 526, 448, 447, 523, + 193, 193, 193, 193, 439, 437, 193, 1151, 438, 193, + + 193, 193, 442, 193, 441, 193, 193, 193, 450, 1151, + 193, 193, 527, 526, 448, 447, 449, 1151, 528, 529, + 193, 443, 193, 193, 193, 1151, 193, 193, 1151, 1151, + 193, 444, 193, 457, 193, 450, 445, 446, 451, 527, + 452, 524, 193, 449, 193, 528, 529, 1151, 443, 193, + 1151, 193, 193, 453, 193, 454, 525, 193, 444, 193, + 457, 193, 530, 445, 446, 451, 455, 452, 524, 193, + 531, 193, 193, 1151, 456, 193, 193, 193, 1151, 193, + 453, 193, 454, 525, 193, 458, 532, 459, 193, 530, + 460, 193, 193, 455, 533, 193, 193, 531, 461, 193, + + 193, 456, 193, 193, 193, 462, 193, 463, 193, 193, + 1151, 193, 458, 532, 459, 485, 1151, 460, 193, 193, + 193, 533, 193, 193, 1151, 461, 193, 193, 193, 193, + 464, 193, 462, 193, 463, 193, 193, 467, 193, 193, + 468, 193, 485, 465, 469, 1151, 534, 193, 193, 1151, + 535, 193, 466, 193, 1151, 193, 193, 464, 193, 193, + 193, 193, 193, 1151, 467, 536, 193, 468, 193, 1151, + 465, 469, 470, 534, 193, 193, 193, 535, 193, 466, + 193, 474, 473, 537, 1151, 471, 193, 193, 193, 1151, + 472, 538, 536, 498, 193, 193, 193, 1151, 475, 470, + + 193, 193, 476, 193, 193, 539, 193, 193, 474, 473, + 537, 477, 471, 193, 1151, 193, 479, 472, 538, 478, + 498, 193, 193, 193, 193, 475, 193, 193, 193, 476, + 481, 193, 539, 193, 193, 540, 482, 1151, 477, 193, + 193, 480, 193, 479, 193, 193, 478, 1151, 193, 541, + 193, 193, 486, 193, 193, 193, 487, 481, 483, 193, + 1151, 193, 540, 482, 193, 193, 193, 1151, 480, 484, + 193, 193, 193, 1151, 488, 193, 541, 193, 193, 486, + 193, 193, 1151, 487, 490, 483, 193, 491, 492, 193, + 1151, 193, 193, 496, 489, 1151, 484, 193, 193, 193, + + 193, 488, 1151, 493, 542, 193, 497, 193, 1151, 193, + 1151, 490, 543, 193, 491, 492, 193, 193, 1151, 193, + 496, 489, 193, 544, 500, 193, 193, 193, 193, 494, + 493, 542, 499, 497, 545, 495, 193, 193, 546, 543, + 193, 547, 193, 510, 193, 511, 193, 548, 193, 193, + 544, 500, 1151, 1151, 1151, 193, 494, 1151, 1151, 499, + 512, 545, 495, 549, 193, 546, 550, 551, 547, 193, + 510, 552, 511, 553, 548, 193, 275, 275, 275, 275, + 275, 275, 275, 275, 275, 275, 554, 512, 557, 555, + 549, 558, 559, 550, 551, 560, 561, 562, 552, 556, + + 553, 563, 564, 565, 566, 567, 568, 569, 570, 571, + 572, 573, 574, 554, 575, 557, 555, 576, 558, 559, + 577, 578, 560, 561, 562, 579, 556, 580, 563, 564, + 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, + 581, 575, 582, 583, 576, 584, 585, 577, 578, 586, + 587, 588, 579, 589, 580, 590, 591, 592, 593, 594, + 599, 597, 595, 598, 600, 601, 602, 581, 605, 582, + 583, 596, 584, 585, 603, 606, 586, 587, 588, 609, + 589, 610, 590, 591, 592, 593, 594, 599, 597, 595, + 598, 600, 601, 602, 1151, 605, 604, 1151, 596, 607, + + 193, 603, 606, 608, 612, 193, 609, 1151, 610, 389, + 389, 389, 389, 389, 389, 389, 389, 389, 389, 613, + 193, 193, 193, 604, 193, 193, 607, 193, 614, 615, + 608, 612, 193, 193, 193, 1151, 1151, 722, 1151, 193, + 1151, 193, 193, 723, 1151, 193, 613, 193, 193, 193, + 1151, 193, 193, 193, 193, 614, 615, 193, 193, 724, + 193, 193, 617, 618, 722, 193, 193, 616, 193, 193, + 723, 620, 193, 621, 1151, 193, 1151, 193, 193, 193, + 193, 193, 619, 193, 193, 193, 724, 625, 622, 617, + 618, 193, 193, 193, 616, 193, 623, 193, 620, 193, + + 621, 193, 193, 193, 193, 193, 193, 624, 1151, 619, + 193, 193, 626, 193, 625, 622, 630, 193, 193, 1151, + 193, 627, 193, 623, 193, 628, 193, 629, 193, 193, + 193, 193, 1151, 193, 624, 193, 193, 193, 193, 626, + 193, 632, 631, 630, 193, 725, 633, 1151, 627, 193, + 193, 193, 628, 1151, 629, 193, 193, 193, 193, 634, + 193, 637, 193, 193, 193, 636, 1151, 193, 632, 631, + 193, 641, 725, 633, 635, 193, 193, 193, 193, 193, + 639, 193, 193, 193, 193, 193, 634, 193, 637, 193, + 638, 193, 636, 643, 193, 193, 640, 193, 641, 726, + + 642, 635, 193, 193, 193, 193, 193, 639, 193, 193, + 193, 1151, 193, 193, 193, 193, 193, 638, 193, 644, + 643, 193, 193, 640, 193, 193, 726, 642, 727, 645, + 193, 193, 193, 193, 649, 193, 193, 193, 647, 650, + 193, 193, 193, 193, 646, 193, 644, 648, 193, 728, + 1151, 193, 193, 193, 193, 727, 645, 193, 1151, 193, + 193, 649, 193, 193, 193, 647, 650, 651, 193, 193, + 193, 646, 193, 1151, 648, 193, 728, 652, 193, 193, + 193, 193, 653, 193, 193, 654, 193, 193, 193, 193, + 193, 657, 1151, 658, 651, 193, 193, 193, 193, 655, + + 656, 193, 193, 193, 652, 193, 193, 193, 193, 653, + 193, 661, 654, 662, 193, 193, 193, 193, 657, 193, + 658, 193, 193, 193, 193, 193, 655, 656, 193, 660, + 193, 663, 659, 193, 193, 193, 1151, 664, 661, 193, + 662, 729, 665, 193, 193, 193, 193, 1151, 193, 1151, + 193, 193, 666, 193, 193, 1151, 660, 193, 663, 659, + 193, 667, 193, 668, 664, 193, 193, 193, 729, 665, + 193, 670, 193, 193, 193, 672, 193, 730, 193, 666, + 193, 193, 669, 1151, 193, 731, 1151, 193, 667, 193, + 668, 193, 193, 193, 193, 673, 193, 671, 670, 193, + + 193, 193, 672, 193, 730, 193, 732, 674, 193, 669, + 675, 193, 731, 193, 193, 1151, 733, 1151, 193, 193, + 193, 193, 673, 193, 671, 193, 193, 676, 193, 193, + 193, 193, 193, 732, 674, 193, 677, 675, 193, 193, + 193, 193, 682, 733, 193, 678, 193, 193, 193, 193, + 193, 679, 193, 681, 676, 193, 193, 193, 193, 193, + 680, 683, 193, 677, 193, 1151, 193, 193, 193, 682, + 1151, 193, 678, 193, 193, 684, 193, 193, 679, 193, + 681, 193, 685, 1151, 193, 193, 193, 680, 683, 193, + 193, 193, 688, 193, 193, 686, 1151, 689, 687, 193, + + 193, 193, 684, 193, 193, 193, 193, 193, 193, 685, + 193, 193, 193, 193, 692, 693, 691, 193, 690, 688, + 193, 193, 686, 193, 689, 687, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 1151, 193, 695, 694, + 193, 692, 693, 691, 193, 690, 1151, 1151, 193, 193, + 193, 1151, 193, 193, 193, 1151, 193, 1151, 193, 1151, + 193, 703, 193, 193, 193, 695, 694, 193, 697, 193, + 696, 193, 193, 193, 699, 1151, 193, 734, 698, 193, + 193, 193, 193, 193, 701, 193, 193, 193, 703, 193, + 193, 193, 735, 700, 193, 697, 193, 696, 193, 193, + + 193, 699, 193, 193, 734, 698, 193, 702, 193, 193, + 193, 701, 704, 193, 193, 705, 193, 193, 193, 735, + 700, 736, 1151, 193, 706, 193, 193, 709, 710, 193, + 193, 1151, 193, 193, 702, 193, 707, 193, 708, 704, + 193, 193, 705, 737, 193, 193, 193, 1151, 736, 711, + 193, 706, 193, 193, 709, 710, 713, 712, 193, 193, + 193, 193, 193, 707, 193, 708, 193, 193, 193, 738, + 737, 193, 1151, 193, 193, 1151, 711, 719, 714, 193, + 739, 716, 193, 713, 712, 193, 193, 193, 193, 715, + 193, 193, 740, 193, 193, 720, 738, 741, 193, 717, + + 742, 193, 193, 718, 719, 714, 743, 739, 716, 193, + 193, 744, 745, 193, 746, 747, 715, 193, 193, 740, + 748, 193, 720, 749, 741, 750, 717, 742, 751, 193, + 718, 752, 753, 743, 754, 755, 756, 193, 744, 745, + 757, 746, 747, 758, 759, 760, 761, 748, 762, 763, + 749, 765, 750, 766, 767, 751, 768, 771, 752, 753, + 764, 754, 755, 756, 769, 770, 772, 757, 773, 774, + 758, 759, 760, 761, 775, 762, 763, 776, 765, 777, + 766, 767, 778, 768, 771, 779, 780, 764, 781, 782, + 783, 769, 770, 772, 784, 773, 774, 785, 786, 787, + + 788, 775, 789, 790, 776, 791, 777, 792, 793, 778, + 794, 795, 779, 780, 796, 781, 782, 783, 797, 798, + 799, 784, 800, 801, 785, 786, 787, 788, 802, 789, + 790, 803, 791, 1151, 792, 793, 193, 794, 795, 193, + 193, 796, 193, 1151, 193, 797, 798, 799, 811, 800, + 801, 1151, 805, 806, 1151, 802, 807, 809, 803, 193, + 193, 193, 808, 193, 193, 193, 193, 193, 193, 193, + 810, 193, 812, 193, 193, 811, 193, 1151, 813, 805, + 806, 193, 193, 807, 809, 193, 193, 193, 193, 808, + 193, 193, 193, 193, 193, 193, 193, 810, 814, 812, + + 193, 193, 193, 193, 193, 813, 193, 193, 193, 193, + 193, 815, 193, 888, 1151, 193, 1151, 193, 889, 816, + 193, 193, 1151, 193, 193, 814, 193, 193, 193, 193, + 817, 193, 193, 193, 193, 193, 193, 193, 815, 820, + 888, 193, 193, 819, 193, 889, 816, 890, 193, 821, + 818, 193, 193, 193, 193, 193, 193, 817, 193, 193, + 822, 193, 193, 193, 193, 824, 820, 1151, 193, 193, + 819, 193, 1151, 823, 890, 193, 821, 818, 193, 193, + 826, 193, 193, 193, 193, 193, 193, 822, 193, 193, + 827, 193, 824, 1151, 825, 193, 193, 1151, 1151, 835, + + 823, 193, 193, 193, 193, 193, 193, 826, 193, 193, + 828, 193, 193, 193, 193, 193, 193, 827, 1151, 193, + 193, 825, 193, 193, 193, 829, 835, 832, 193, 193, + 193, 193, 193, 193, 193, 830, 831, 828, 193, 193, + 193, 193, 193, 1151, 193, 833, 193, 193, 1151, 193, + 193, 193, 829, 834, 832, 193, 1151, 193, 193, 193, + 1151, 193, 830, 831, 837, 193, 193, 193, 193, 193, + 836, 193, 833, 1151, 193, 193, 193, 193, 193, 838, + 834, 1151, 193, 193, 193, 193, 193, 193, 193, 839, + 891, 837, 1151, 193, 193, 193, 193, 836, 193, 193, + + 193, 193, 193, 193, 193, 193, 838, 193, 840, 193, + 193, 841, 892, 193, 193, 193, 839, 891, 1151, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 1151, 193, + 193, 193, 193, 1151, 193, 840, 193, 842, 841, 892, + 193, 843, 193, 193, 193, 844, 193, 193, 1151, 193, + 193, 193, 193, 845, 1151, 193, 193, 193, 193, 193, + 193, 193, 848, 846, 842, 193, 193, 193, 843, 193, + 193, 193, 844, 1151, 847, 193, 193, 193, 193, 193, + 845, 193, 193, 893, 193, 193, 193, 193, 193, 848, + 846, 849, 193, 193, 193, 851, 193, 193, 193, 193, + + 854, 847, 193, 193, 193, 193, 850, 894, 193, 1151, + 893, 895, 193, 193, 193, 193, 193, 193, 849, 193, + 193, 193, 851, 193, 193, 193, 193, 854, 896, 857, + 852, 853, 193, 850, 894, 1151, 193, 1151, 895, 1151, + 193, 193, 193, 193, 193, 855, 193, 193, 856, 193, + 193, 193, 193, 193, 193, 896, 857, 852, 853, 193, + 1151, 1151, 860, 193, 858, 193, 859, 193, 193, 1151, + 193, 193, 855, 193, 193, 856, 193, 193, 193, 193, + 193, 193, 861, 862, 897, 193, 193, 193, 193, 860, + 1151, 858, 193, 859, 898, 193, 193, 193, 193, 193, + + 193, 193, 193, 1151, 863, 193, 193, 193, 868, 861, + 862, 897, 193, 193, 193, 193, 193, 865, 864, 193, + 1151, 898, 193, 193, 866, 193, 193, 193, 193, 193, + 193, 863, 193, 193, 193, 868, 867, 869, 870, 193, + 899, 872, 900, 193, 865, 864, 193, 193, 193, 193, + 193, 866, 193, 193, 193, 193, 193, 193, 193, 193, + 871, 193, 193, 867, 869, 870, 193, 899, 872, 900, + 193, 1151, 873, 193, 193, 193, 193, 193, 193, 1151, + 193, 193, 193, 193, 193, 193, 193, 871, 193, 193, + 193, 876, 874, 193, 193, 875, 901, 193, 193, 873, + + 193, 193, 1151, 193, 193, 193, 193, 882, 193, 193, + 878, 193, 879, 193, 193, 877, 193, 193, 876, 874, + 193, 193, 875, 901, 1151, 193, 193, 193, 193, 193, + 193, 193, 881, 193, 882, 193, 193, 878, 883, 879, + 193, 193, 877, 193, 880, 1151, 193, 193, 193, 193, + 193, 884, 193, 193, 193, 193, 193, 193, 902, 881, + 886, 193, 193, 193, 885, 883, 193, 193, 193, 193, + 903, 880, 193, 193, 193, 193, 193, 193, 884, 193, + 193, 193, 193, 904, 905, 902, 906, 886, 193, 193, + 907, 885, 908, 193, 193, 193, 193, 903, 909, 193, + + 910, 911, 912, 913, 914, 915, 916, 193, 193, 917, + 904, 905, 918, 906, 919, 920, 193, 907, 921, 908, + 922, 923, 924, 925, 926, 909, 927, 910, 911, 912, + 913, 914, 915, 916, 928, 929, 917, 930, 931, 918, + 932, 919, 920, 933, 934, 921, 935, 922, 923, 924, + 925, 926, 936, 927, 937, 938, 939, 940, 941, 942, + 943, 928, 929, 944, 930, 931, 945, 932, 946, 193, + 933, 934, 193, 935, 193, 1151, 1151, 193, 1008, 936, + 949, 937, 938, 939, 940, 941, 942, 943, 193, 193, + 944, 950, 193, 945, 193, 946, 193, 193, 948, 193, + + 193, 193, 951, 193, 193, 1008, 1151, 949, 193, 1009, + 952, 193, 193, 193, 1151, 193, 193, 1151, 950, 193, + 1151, 193, 953, 193, 193, 948, 193, 193, 956, 951, + 193, 193, 193, 193, 193, 193, 1009, 952, 193, 193, + 193, 954, 193, 193, 955, 1151, 193, 957, 193, 953, + 193, 193, 958, 193, 193, 956, 1010, 193, 193, 193, + 193, 193, 193, 193, 960, 961, 193, 1151, 954, 193, + 193, 955, 959, 193, 957, 193, 193, 193, 193, 958, + 193, 193, 965, 1010, 193, 193, 193, 1151, 193, 193, + 193, 960, 961, 193, 193, 963, 193, 964, 962, 959, + + 193, 1151, 193, 193, 193, 1151, 966, 193, 193, 965, + 1151, 1151, 193, 193, 193, 193, 193, 193, 193, 1151, + 193, 193, 963, 193, 964, 962, 193, 193, 971, 193, + 193, 967, 968, 966, 969, 193, 193, 193, 193, 1151, + 193, 193, 193, 193, 193, 193, 970, 193, 193, 1151, + 193, 193, 1151, 193, 193, 971, 193, 193, 967, 968, + 1011, 969, 193, 193, 193, 193, 972, 193, 193, 193, + 193, 193, 193, 970, 193, 193, 193, 193, 193, 973, + 193, 193, 974, 193, 193, 975, 1151, 1011, 193, 193, + 193, 1151, 193, 972, 977, 193, 193, 193, 193, 193, + + 193, 193, 1151, 193, 193, 193, 973, 193, 193, 974, + 978, 193, 975, 193, 193, 193, 193, 193, 193, 193, + 976, 977, 193, 193, 193, 193, 193, 193, 980, 979, + 193, 193, 193, 193, 1012, 193, 1151, 978, 193, 1013, + 193, 193, 193, 193, 193, 193, 193, 976, 193, 193, + 193, 193, 193, 193, 981, 980, 979, 193, 193, 193, + 193, 1012, 982, 193, 193, 193, 1013, 193, 984, 193, + 1151, 193, 1151, 193, 1151, 193, 987, 193, 193, 193, + 193, 981, 983, 193, 193, 193, 193, 193, 193, 982, + 193, 193, 1151, 985, 193, 984, 193, 193, 193, 193, + + 193, 988, 1151, 987, 1151, 193, 193, 193, 1014, 983, + 193, 193, 986, 1015, 193, 193, 193, 193, 193, 193, + 985, 991, 193, 193, 193, 193, 193, 193, 988, 989, + 990, 992, 1151, 193, 193, 1014, 193, 1151, 1016, 986, + 1015, 1151, 193, 193, 193, 193, 193, 193, 991, 193, + 993, 193, 1151, 193, 193, 994, 989, 990, 992, 193, + 193, 193, 997, 193, 998, 1016, 1151, 193, 193, 193, + 193, 193, 193, 193, 193, 1151, 1000, 993, 193, 193, + 193, 193, 994, 999, 995, 996, 193, 193, 193, 997, + 193, 998, 193, 193, 193, 193, 193, 193, 193, 193, + + 193, 1001, 193, 1000, 1002, 193, 193, 193, 1151, 1151, + 999, 995, 996, 193, 193, 193, 193, 193, 1017, 193, + 193, 1018, 193, 193, 193, 193, 1004, 1003, 1001, 193, + 193, 1002, 193, 193, 193, 193, 193, 1006, 1019, 1020, + 193, 193, 1021, 193, 1005, 1017, 1022, 1023, 1018, 193, + 193, 193, 193, 1004, 1003, 193, 1024, 193, 1025, 1026, + 193, 193, 193, 193, 1006, 1019, 1020, 1027, 193, 1021, + 1028, 1005, 1029, 1022, 1023, 1030, 1031, 193, 1032, 1033, + 1034, 1035, 193, 1024, 1036, 1025, 1026, 1037, 193, 1038, + 1039, 1040, 1042, 193, 1027, 193, 1151, 1028, 1151, 1029, + + 1151, 1044, 1030, 1031, 1043, 1032, 1033, 1034, 1035, 193, + 1151, 1036, 193, 193, 1037, 193, 1038, 1039, 1040, 1042, + 193, 193, 193, 193, 1045, 193, 193, 193, 1044, 193, + 1151, 1043, 1076, 1047, 1151, 1077, 193, 1046, 1151, 193, + 193, 193, 193, 193, 1078, 193, 193, 193, 193, 1048, + 193, 1045, 193, 193, 193, 1049, 193, 193, 193, 1076, + 1047, 193, 1077, 193, 1046, 1050, 193, 1151, 193, 193, + 193, 1078, 193, 193, 193, 1079, 1048, 193, 193, 193, + 193, 1051, 1049, 193, 193, 193, 193, 1151, 193, 193, + 193, 1052, 1050, 193, 193, 1053, 193, 193, 1151, 193, + + 193, 1151, 1079, 193, 193, 193, 193, 193, 1051, 1054, + 193, 193, 1151, 193, 193, 1080, 193, 193, 1052, 193, + 193, 193, 1053, 193, 193, 193, 193, 193, 1055, 193, + 193, 193, 1151, 193, 193, 1056, 1054, 193, 193, 193, + 193, 193, 1080, 193, 193, 193, 193, 193, 1058, 193, + 193, 1151, 193, 193, 193, 1055, 193, 193, 193, 193, + 193, 193, 1056, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 1060, 1062, 1058, 193, 193, 1057, 193, + 193, 193, 193, 1081, 193, 193, 193, 193, 193, 1059, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 1082, + + 1060, 1062, 193, 1061, 193, 1057, 193, 1063, 193, 193, + 1081, 193, 193, 193, 193, 193, 1059, 1064, 193, 193, + 193, 193, 193, 1065, 193, 193, 1082, 193, 193, 193, + 1061, 193, 1151, 1151, 1063, 193, 1066, 193, 193, 193, + 193, 1151, 193, 1151, 1064, 193, 193, 193, 193, 193, + 1065, 1083, 193, 193, 193, 193, 193, 193, 193, 193, + 1067, 1068, 193, 1066, 193, 193, 193, 1069, 1070, 193, + 193, 193, 193, 193, 193, 193, 193, 1071, 1083, 193, + 193, 193, 193, 193, 193, 193, 193, 1067, 1068, 193, + 193, 193, 193, 193, 1069, 1070, 1151, 193, 193, 1084, + + 193, 193, 193, 193, 1071, 193, 193, 1073, 193, 193, + 1085, 1086, 193, 193, 1087, 1072, 193, 193, 193, 1088, + 193, 1089, 193, 1074, 193, 193, 1084, 193, 193, 193, + 1151, 1151, 193, 193, 1073, 1091, 193, 1085, 1086, 193, + 193, 1087, 1072, 193, 193, 193, 1088, 193, 1089, 193, + 1074, 193, 193, 193, 193, 193, 1092, 1093, 193, 193, + 193, 193, 1091, 193, 1151, 193, 193, 193, 1151, 1094, + 1151, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 193, 193, 1092, 1093, 193, 193, 193, 193, 193, + 1095, 193, 193, 193, 193, 193, 1094, 193, 1151, 193, + + 193, 193, 193, 193, 193, 193, 193, 1096, 193, 193, + 193, 193, 1098, 193, 193, 193, 193, 1095, 193, 1151, + 193, 193, 193, 1097, 193, 193, 193, 1106, 193, 193, + 193, 193, 193, 193, 1096, 193, 193, 193, 193, 1098, + 193, 193, 193, 193, 1107, 193, 1099, 1100, 193, 1104, + 1097, 193, 193, 1151, 1106, 1108, 193, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 1107, 193, 1099, 1100, 1102, 1104, 1101, 193, 193, + 1103, 193, 1108, 1109, 193, 193, 193, 193, 193, 1110, + 193, 193, 193, 193, 193, 1111, 193, 1112, 1151, 193, + + 193, 193, 1102, 1151, 1101, 193, 193, 1103, 193, 193, + 1109, 193, 193, 193, 193, 193, 1110, 193, 1114, 193, + 193, 193, 1111, 193, 1112, 193, 193, 193, 193, 193, + 1115, 1151, 193, 193, 1116, 193, 193, 193, 193, 193, + 1151, 193, 193, 193, 193, 1114, 193, 193, 193, 193, + 193, 1117, 193, 193, 1122, 193, 193, 1115, 193, 1120, + 193, 1116, 193, 193, 193, 193, 193, 193, 193, 1118, + 193, 1123, 1124, 193, 1119, 193, 193, 1126, 1117, 1130, + 193, 1122, 193, 193, 1151, 193, 1120, 193, 193, 193, + 193, 193, 193, 193, 193, 1151, 1118, 193, 1123, 1124, + + 193, 1119, 193, 1127, 1126, 193, 1130, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 1128, 193, 193, + 193, 193, 193, 1151, 193, 193, 1151, 193, 1151, 1151, + 1127, 1132, 193, 193, 193, 193, 193, 1151, 193, 193, + 193, 193, 193, 1151, 1128, 1151, 1151, 1151, 193, 193, + 1151, 1151, 193, 1151, 193, 1151, 1151, 1151, 1132, 1151, + 193, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 193, 193, + 46, 46, 46, 46, 46, 88, 1151, 1151, 88, 88, + 178, 178, 178, 1151, 178, 180, 1151, 180, 180, 180, + 183, 1151, 183, 183, 183, 193, 1151, 193, 193, 193, + + 7, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151 + } ; + +static const flex_int16_t yy_chk[4678] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 9, 9, 10, 10, 15, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 15, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, + 18, 21, 22, 21, 24, 1154, 23, 30, 24, 21, + 1148, 21, 24, 23, 31, 21, 21, 44, 24, 99, + + 23, 24, 22, 23, 1147, 25, 1146, 25, 21, 22, + 21, 24, 25, 23, 30, 24, 21, 25, 21, 24, + 23, 31, 21, 21, 44, 24, 99, 23, 24, 22, + 23, 27, 25, 28, 25, 1145, 32, 27, 1144, 25, + 32, 28, 29, 42, 25, 26, 32, 28, 29, 29, + 29, 42, 1143, 26, 1142, 29, 26, 1141, 27, 26, + 28, 1140, 26, 32, 27, 26, 1139, 32, 28, 29, + 42, 1138, 26, 32, 28, 29, 29, 29, 42, 34, + 26, 33, 29, 26, 36, 33, 26, 43, 43, 26, + 35, 33, 26, 34, 1137, 36, 49, 49, 35, 34, + + 34, 36, 35, 38, 1136, 35, 34, 38, 33, 50, + 50, 36, 33, 38, 43, 43, 1135, 35, 33, 41, + 34, 41, 36, 100, 41, 35, 34, 34, 36, 35, + 38, 39, 35, 39, 38, 103, 39, 71, 55, 104, + 38, 58, 58, 39, 39, 1134, 41, 1133, 41, 55, + 100, 41, 86, 86, 67, 70, 108, 71, 39, 1131, + 39, 67, 103, 39, 71, 70, 104, 67, 111, 101, + 39, 39, 40, 111, 67, 70, 40, 101, 107, 40, + 40, 67, 70, 108, 71, 107, 40, 114, 67, 40, + 181, 181, 70, 1129, 67, 111, 101, 1125, 1121, 40, + + 111, 67, 70, 40, 101, 107, 40, 40, 1113, 1105, + 1090, 1075, 107, 40, 114, 1041, 40, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, 61, 61, + 1007, 61, 61, 61, 61, 61, 61, 77, 68, 84, + 947, 887, 68, 804, 721, 115, 68, 61, 61, 61, + 72, 116, 68, 61, 72, 61, 117, 77, 118, 84, + 72, 61, 68, 61, 77, 68, 84, 61, 61, 68, + 72, 83, 115, 68, 83, 83, 611, 72, 116, 68, + 61, 72, 61, 117, 77, 118, 84, 72, 61, 68, + + 61, 83, 120, 501, 61, 61, 388, 72, 83, 274, + 185, 83, 83, 61, 62, 62, 183, 62, 62, 62, + 62, 62, 62, 90, 88, 85, 73, 76, 83, 120, + 73, 76, 60, 62, 62, 62, 73, 110, 76, 78, + 62, 81, 102, 78, 76, 102, 73, 110, 121, 78, + 81, 76, 81, 73, 76, 81, 122, 73, 76, 78, + 62, 81, 59, 73, 110, 76, 78, 62, 81, 102, + 78, 76, 102, 73, 110, 121, 78, 81, 76, 81, + 52, 123, 81, 122, 105, 105, 78, 62, 81, 62, + 63, 124, 82, 125, 63, 126, 82, 63, 105, 127, + + 82, 109, 109, 109, 63, 109, 51, 63, 123, 113, + 113, 105, 105, 129, 63, 47, 82, 63, 124, 82, + 125, 63, 126, 82, 63, 105, 127, 82, 109, 109, + 109, 63, 109, 112, 63, 112, 113, 113, 112, 45, + 129, 63, 64, 82, 112, 20, 64, 130, 132, 128, + 64, 112, 128, 133, 135, 119, 64, 119, 136, 64, + 112, 119, 112, 19, 137, 112, 64, 11, 119, 64, + 138, 112, 119, 64, 130, 132, 128, 64, 112, 128, + 133, 135, 119, 64, 119, 136, 64, 7, 119, 141, + 134, 137, 142, 64, 65, 119, 139, 138, 139, 119, + + 134, 65, 143, 65, 144, 134, 134, 140, 65, 140, + 145, 146, 147, 65, 65, 4, 141, 134, 148, 142, + 140, 65, 150, 139, 151, 139, 3, 134, 65, 143, + 65, 144, 134, 134, 140, 65, 140, 145, 146, 147, + 65, 65, 66, 152, 153, 148, 66, 140, 154, 150, + 66, 151, 154, 66, 156, 157, 66, 158, 0, 66, + 160, 0, 66, 0, 161, 162, 66, 0, 0, 66, + 152, 153, 155, 66, 0, 154, 0, 66, 0, 154, + 66, 156, 157, 66, 158, 155, 66, 160, 159, 66, + 155, 161, 162, 66, 69, 69, 163, 159, 164, 155, + + 165, 69, 69, 69, 166, 159, 167, 169, 69, 164, + 169, 0, 155, 170, 69, 159, 171, 155, 168, 0, + 172, 69, 69, 163, 159, 164, 172, 165, 69, 69, + 69, 166, 159, 167, 169, 69, 164, 169, 168, 0, + 170, 69, 74, 171, 173, 168, 74, 172, 174, 175, + 176, 277, 193, 172, 0, 0, 74, 173, 0, 279, + 194, 194, 74, 74, 280, 168, 74, 0, 0, 74, + 0, 173, 193, 74, 282, 174, 175, 176, 277, 193, + 0, 194, 195, 74, 173, 196, 279, 194, 194, 74, + 74, 280, 196, 74, 75, 75, 199, 195, 199, 193, + + 196, 282, 195, 75, 0, 196, 0, 75, 194, 195, + 75, 0, 196, 198, 75, 0, 284, 0, 199, 196, + 0, 75, 75, 199, 195, 199, 198, 196, 0, 195, + 75, 201, 196, 198, 75, 197, 0, 75, 197, 197, + 198, 75, 79, 284, 79, 199, 285, 79, 200, 200, + 200, 201, 286, 198, 79, 79, 0, 0, 201, 197, + 198, 0, 197, 200, 79, 197, 197, 0, 200, 79, + 287, 79, 0, 285, 79, 200, 200, 200, 201, 286, + 0, 79, 79, 205, 203, 218, 197, 202, 203, 0, + 200, 79, 80, 205, 202, 200, 80, 287, 218, 80, + + 80, 202, 289, 205, 290, 218, 80, 202, 203, 80, + 205, 203, 218, 291, 202, 203, 80, 0, 0, 80, + 205, 202, 0, 80, 0, 218, 80, 80, 202, 289, + 205, 290, 218, 80, 202, 203, 80, 0, 0, 0, + 291, 0, 0, 80, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 93, 93, 93, 93, 93, 93, + 93, 93, 93, 93, 93, 186, 186, 186, 186, 186, + 186, 186, 186, 186, 186, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 188, 188, 188, 188, 188, + + 188, 188, 188, 188, 188, 188, 204, 206, 292, 210, + 0, 208, 293, 204, 204, 204, 0, 204, 0, 210, + 0, 0, 206, 211, 208, 208, 204, 206, 0, 210, + 0, 208, 0, 204, 206, 292, 210, 211, 208, 293, + 204, 204, 204, 211, 204, 209, 210, 212, 212, 206, + 211, 208, 208, 204, 206, 207, 210, 207, 208, 207, + 207, 209, 0, 226, 211, 209, 207, 213, 212, 213, + 211, 215, 209, 207, 212, 212, 294, 0, 215, 207, + 295, 0, 207, 226, 207, 296, 207, 207, 209, 213, + 226, 215, 209, 207, 213, 212, 213, 0, 215, 298, + + 207, 216, 0, 294, 217, 215, 207, 295, 216, 225, + 226, 299, 296, 220, 217, 0, 213, 214, 215, 214, + 220, 216, 219, 214, 217, 225, 298, 0, 216, 225, + 214, 217, 219, 220, 214, 216, 225, 0, 299, 214, + 220, 217, 219, 221, 214, 222, 214, 220, 216, 219, + 214, 217, 225, 221, 223, 222, 225, 214, 224, 219, + 220, 214, 300, 221, 228, 222, 214, 224, 223, 219, + 221, 223, 222, 227, 223, 228, 0, 227, 224, 230, + 221, 223, 222, 231, 228, 224, 302, 231, 230, 300, + 221, 228, 222, 227, 224, 223, 232, 0, 223, 230, + + 227, 223, 228, 231, 227, 224, 230, 233, 233, 0, + 231, 228, 303, 302, 231, 230, 232, 0, 304, 305, + 227, 229, 229, 232, 237, 0, 230, 233, 0, 0, + 231, 229, 234, 237, 233, 233, 229, 229, 234, 303, + 234, 301, 229, 232, 237, 304, 305, 0, 229, 229, + 0, 237, 234, 235, 233, 235, 301, 235, 229, 234, + 237, 236, 306, 229, 229, 234, 235, 234, 301, 229, + 307, 237, 239, 0, 236, 240, 238, 235, 0, 234, + 235, 236, 235, 301, 235, 238, 309, 239, 236, 306, + 240, 241, 239, 235, 310, 240, 238, 307, 241, 239, + + 244, 236, 240, 238, 235, 242, 243, 243, 236, 242, + 0, 241, 238, 309, 239, 260, 0, 240, 241, 239, + 244, 310, 240, 238, 0, 241, 243, 244, 246, 242, + 245, 245, 242, 243, 243, 260, 242, 248, 241, 247, + 249, 248, 260, 246, 249, 0, 311, 244, 246, 0, + 312, 245, 247, 243, 0, 246, 242, 245, 245, 247, + 249, 248, 260, 0, 248, 313, 247, 249, 248, 0, + 246, 249, 250, 311, 252, 246, 250, 312, 245, 247, + 251, 252, 251, 314, 0, 250, 247, 249, 248, 0, + 250, 315, 313, 269, 252, 253, 250, 0, 253, 250, + + 251, 252, 254, 250, 254, 316, 255, 251, 252, 251, + 314, 254, 250, 269, 0, 253, 255, 250, 315, 254, + 269, 252, 253, 250, 254, 253, 255, 251, 256, 254, + 257, 254, 316, 255, 257, 317, 258, 0, 254, 258, + 269, 256, 253, 255, 261, 262, 254, 0, 256, 318, + 259, 254, 261, 255, 257, 256, 262, 257, 259, 258, + 0, 257, 317, 258, 261, 262, 258, 0, 256, 259, + 259, 261, 262, 0, 263, 256, 318, 259, 263, 261, + 264, 257, 0, 262, 264, 259, 258, 264, 265, 265, + 0, 261, 262, 268, 263, 0, 259, 259, 263, 266, + + 264, 263, 0, 266, 319, 263, 268, 264, 0, 265, + 0, 264, 320, 268, 264, 265, 265, 270, 0, 266, + 268, 263, 267, 321, 271, 263, 266, 264, 271, 267, + 266, 319, 270, 268, 322, 267, 265, 270, 323, 320, + 268, 324, 267, 288, 270, 288, 266, 325, 271, 267, + 321, 271, 0, 0, 0, 271, 267, 0, 0, 270, + 288, 322, 267, 326, 270, 323, 327, 328, 324, 267, + 288, 329, 288, 330, 325, 271, 275, 275, 275, 275, + 275, 275, 275, 275, 275, 275, 331, 288, 333, 332, + 326, 334, 336, 327, 328, 337, 338, 339, 329, 332, + + 330, 340, 341, 342, 343, 344, 345, 347, 348, 349, + 350, 351, 352, 331, 353, 333, 332, 354, 334, 336, + 355, 356, 337, 338, 339, 357, 332, 358, 340, 341, + 342, 343, 344, 345, 347, 348, 349, 350, 351, 352, + 359, 353, 360, 361, 354, 362, 363, 355, 356, 365, + 366, 367, 357, 368, 358, 369, 370, 371, 372, 374, + 377, 376, 375, 376, 378, 379, 380, 359, 382, 360, + 361, 375, 362, 363, 381, 383, 365, 366, 367, 385, + 368, 386, 369, 370, 371, 372, 374, 377, 376, 375, + 376, 378, 379, 380, 0, 382, 381, 0, 375, 384, + + 390, 381, 383, 384, 391, 392, 385, 0, 386, 389, + 389, 389, 389, 389, 389, 389, 389, 389, 389, 393, + 390, 394, 395, 381, 391, 392, 384, 390, 394, 396, + 384, 391, 392, 396, 397, 0, 0, 502, 0, 393, + 0, 394, 395, 503, 0, 400, 393, 390, 394, 395, + 0, 391, 392, 396, 397, 394, 396, 398, 399, 504, + 396, 397, 399, 400, 502, 400, 393, 398, 394, 395, + 503, 402, 400, 402, 0, 401, 0, 398, 399, 405, + 396, 397, 401, 403, 398, 399, 504, 405, 402, 399, + 400, 404, 400, 402, 398, 401, 403, 406, 402, 405, + + 402, 407, 401, 403, 398, 399, 405, 404, 0, 401, + 403, 404, 406, 409, 405, 402, 410, 406, 404, 0, + 402, 407, 401, 403, 406, 408, 405, 409, 407, 408, + 403, 411, 0, 409, 404, 412, 410, 413, 404, 406, + 409, 413, 412, 410, 406, 505, 414, 0, 407, 408, + 414, 411, 408, 0, 409, 412, 408, 413, 411, 415, + 409, 417, 412, 410, 413, 416, 0, 416, 413, 412, + 414, 421, 505, 414, 415, 418, 408, 414, 411, 415, + 419, 417, 412, 419, 413, 420, 415, 416, 417, 422, + 418, 421, 416, 424, 416, 418, 420, 414, 421, 506, + + 423, 415, 418, 419, 423, 420, 415, 419, 417, 422, + 419, 0, 420, 424, 416, 426, 422, 418, 421, 425, + 424, 425, 418, 420, 423, 428, 506, 423, 507, 426, + 419, 423, 420, 429, 430, 426, 422, 427, 428, 431, + 424, 425, 426, 431, 427, 428, 425, 429, 425, 508, + 0, 423, 428, 429, 430, 507, 426, 427, 0, 432, + 429, 430, 426, 431, 427, 428, 431, 432, 425, 433, + 431, 427, 428, 0, 429, 434, 508, 433, 439, 432, + 429, 430, 434, 436, 427, 435, 432, 438, 435, 433, + 431, 438, 0, 439, 432, 434, 433, 437, 439, 436, + + 437, 442, 434, 436, 433, 439, 432, 438, 435, 434, + 436, 442, 435, 443, 438, 435, 433, 437, 438, 440, + 439, 442, 434, 441, 437, 439, 436, 437, 442, 441, + 436, 444, 440, 443, 438, 435, 0, 445, 442, 440, + 443, 510, 446, 441, 437, 447, 440, 0, 442, 0, + 441, 444, 446, 449, 448, 0, 441, 445, 444, 440, + 443, 447, 446, 448, 445, 447, 440, 450, 510, 446, + 441, 451, 447, 449, 448, 453, 453, 513, 444, 446, + 449, 448, 450, 0, 445, 514, 0, 450, 447, 446, + 448, 451, 447, 452, 450, 454, 453, 452, 451, 454, + + 449, 448, 453, 453, 513, 455, 515, 455, 456, 450, + 456, 457, 514, 452, 450, 0, 516, 0, 451, 454, + 452, 458, 454, 453, 452, 455, 454, 457, 456, 459, + 460, 457, 455, 515, 455, 456, 458, 456, 457, 463, + 452, 458, 464, 516, 461, 459, 454, 462, 458, 459, + 460, 461, 455, 463, 457, 456, 459, 460, 457, 463, + 462, 465, 464, 458, 461, 0, 463, 462, 458, 464, + 0, 461, 459, 467, 462, 466, 459, 460, 461, 466, + 463, 465, 467, 0, 468, 470, 463, 462, 465, 464, + 469, 461, 470, 467, 462, 468, 0, 471, 469, 466, + + 467, 471, 466, 472, 468, 470, 466, 474, 465, 467, + 469, 468, 470, 473, 474, 475, 473, 469, 472, 470, + 467, 471, 468, 472, 471, 469, 466, 474, 471, 476, + 472, 468, 470, 473, 474, 475, 0, 469, 477, 476, + 473, 474, 475, 473, 478, 472, 0, 0, 471, 476, + 472, 0, 479, 480, 474, 0, 476, 0, 477, 0, + 473, 486, 475, 481, 478, 477, 476, 482, 480, 484, + 479, 478, 479, 480, 482, 0, 476, 518, 481, 479, + 480, 486, 483, 481, 484, 477, 487, 482, 486, 484, + 481, 478, 519, 483, 482, 480, 484, 479, 485, 479, + + 480, 482, 483, 488, 518, 481, 487, 485, 486, 483, + 481, 484, 488, 487, 482, 489, 484, 491, 485, 519, + 483, 520, 0, 488, 489, 485, 490, 491, 492, 483, + 488, 0, 492, 487, 485, 489, 490, 491, 490, 488, + 493, 494, 489, 521, 491, 485, 490, 0, 520, 493, + 488, 489, 492, 490, 491, 492, 495, 494, 495, 492, + 493, 494, 489, 490, 491, 490, 497, 493, 494, 522, + 521, 496, 0, 490, 499, 0, 493, 499, 495, 492, + 523, 497, 500, 495, 494, 495, 497, 493, 494, 496, + 498, 496, 524, 497, 499, 500, 522, 525, 496, 498, + + 526, 499, 500, 498, 499, 495, 527, 523, 497, 500, + 498, 528, 529, 497, 532, 533, 496, 498, 496, 524, + 534, 499, 500, 535, 525, 536, 498, 526, 537, 500, + 498, 538, 540, 527, 541, 544, 545, 498, 528, 529, + 547, 532, 533, 550, 551, 552, 553, 534, 554, 555, + 535, 557, 536, 561, 563, 537, 565, 567, 538, 540, + 555, 541, 544, 545, 566, 566, 568, 547, 570, 571, + 550, 551, 552, 553, 572, 554, 555, 573, 557, 574, + 561, 563, 576, 565, 567, 577, 579, 555, 580, 581, + 582, 566, 566, 568, 583, 570, 571, 584, 585, 587, + + 588, 572, 589, 590, 573, 593, 574, 594, 596, 576, + 597, 598, 577, 579, 599, 580, 581, 582, 600, 601, + 602, 583, 603, 604, 584, 585, 587, 588, 606, 589, + 590, 608, 593, 0, 594, 596, 614, 597, 598, 612, + 613, 599, 615, 0, 616, 600, 601, 602, 618, 603, + 604, 0, 612, 613, 0, 606, 614, 616, 608, 612, + 613, 617, 615, 614, 616, 619, 612, 613, 618, 615, + 617, 616, 620, 621, 622, 618, 620, 0, 623, 612, + 613, 617, 623, 614, 616, 619, 612, 613, 617, 615, + 624, 616, 619, 621, 622, 618, 620, 617, 624, 620, + + 621, 622, 623, 620, 627, 623, 626, 625, 617, 623, + 624, 625, 619, 724, 0, 628, 0, 624, 726, 626, + 621, 622, 0, 620, 627, 624, 626, 625, 630, 623, + 628, 627, 631, 626, 625, 628, 629, 624, 625, 631, + 724, 632, 628, 630, 633, 726, 626, 728, 630, 632, + 629, 627, 631, 626, 625, 630, 629, 628, 634, 631, + 633, 632, 628, 629, 633, 635, 631, 0, 632, 635, + 630, 633, 0, 634, 728, 630, 632, 629, 634, 631, + 637, 636, 637, 629, 640, 634, 638, 633, 632, 635, + 638, 633, 635, 0, 636, 641, 635, 0, 0, 648, + + 634, 636, 637, 639, 640, 634, 638, 637, 636, 637, + 639, 640, 645, 638, 642, 641, 635, 638, 0, 648, + 644, 636, 641, 639, 643, 642, 648, 645, 636, 637, + 639, 640, 645, 638, 642, 643, 644, 639, 649, 645, + 644, 642, 641, 0, 643, 646, 648, 644, 0, 646, + 639, 643, 642, 647, 645, 650, 0, 647, 649, 645, + 0, 642, 643, 644, 651, 649, 652, 644, 651, 646, + 650, 643, 646, 0, 653, 650, 646, 647, 655, 654, + 647, 0, 650, 654, 647, 649, 652, 656, 651, 655, + 729, 651, 0, 652, 653, 651, 646, 650, 655, 657, + + 658, 653, 650, 654, 647, 655, 654, 656, 657, 659, + 654, 660, 730, 652, 656, 651, 655, 729, 0, 657, + 658, 653, 662, 666, 661, 655, 657, 658, 0, 659, + 654, 660, 663, 0, 656, 657, 659, 661, 660, 730, + 664, 662, 662, 666, 661, 663, 657, 658, 0, 662, + 666, 661, 663, 664, 0, 667, 659, 668, 660, 663, + 664, 665, 667, 665, 661, 669, 670, 664, 662, 662, + 666, 661, 663, 0, 665, 667, 671, 668, 672, 663, + 664, 665, 667, 731, 668, 669, 670, 664, 665, 667, + 665, 671, 669, 670, 674, 675, 671, 677, 672, 673, + + 677, 665, 667, 671, 668, 672, 673, 732, 665, 0, + 731, 733, 669, 670, 674, 675, 676, 677, 671, 673, + 679, 674, 675, 671, 677, 672, 673, 677, 734, 681, + 676, 676, 678, 673, 732, 0, 676, 0, 733, 0, + 679, 674, 675, 676, 677, 678, 673, 679, 680, 681, + 680, 682, 678, 683, 684, 734, 681, 676, 676, 678, + 0, 0, 684, 676, 682, 685, 683, 679, 688, 0, + 680, 682, 678, 683, 684, 680, 681, 680, 682, 678, + 683, 684, 686, 687, 736, 685, 686, 687, 688, 684, + 0, 682, 685, 683, 737, 688, 689, 680, 682, 694, + + 683, 684, 691, 0, 689, 690, 686, 687, 694, 686, + 687, 736, 685, 686, 687, 688, 689, 691, 690, 694, + 0, 737, 691, 689, 692, 690, 694, 692, 693, 691, + 696, 689, 690, 686, 687, 694, 693, 695, 697, 695, + 738, 699, 739, 689, 691, 690, 694, 692, 693, 691, + 696, 692, 690, 701, 692, 693, 698, 696, 697, 695, + 698, 699, 700, 693, 695, 697, 695, 738, 699, 739, + 702, 0, 700, 701, 692, 693, 698, 696, 703, 0, + 701, 704, 700, 698, 705, 697, 695, 698, 699, 700, + 702, 706, 703, 706, 708, 704, 740, 702, 703, 700, + + 701, 704, 0, 698, 705, 703, 707, 712, 704, 700, + 708, 705, 709, 706, 708, 707, 709, 702, 706, 703, + 706, 708, 704, 740, 0, 703, 707, 712, 704, 710, + 711, 705, 711, 707, 712, 713, 709, 708, 713, 709, + 706, 708, 707, 709, 710, 0, 715, 714, 716, 710, + 711, 714, 717, 707, 712, 713, 710, 711, 742, 711, + 718, 719, 713, 709, 716, 713, 715, 714, 716, 720, + 743, 710, 717, 715, 714, 716, 710, 711, 714, 717, + 718, 719, 713, 744, 745, 742, 746, 718, 719, 720, + 747, 716, 748, 715, 714, 716, 720, 743, 749, 717, + + 750, 751, 754, 755, 757, 759, 762, 718, 719, 763, + 744, 745, 764, 746, 765, 770, 720, 747, 772, 748, + 773, 774, 777, 778, 779, 749, 780, 750, 751, 754, + 755, 757, 759, 762, 781, 783, 763, 784, 785, 764, + 786, 765, 770, 787, 788, 772, 789, 773, 774, 777, + 778, 779, 790, 780, 791, 792, 793, 795, 796, 797, + 799, 781, 783, 800, 784, 785, 801, 786, 802, 805, + 787, 788, 806, 789, 808, 0, 0, 807, 888, 790, + 809, 791, 792, 793, 795, 796, 797, 799, 810, 805, + 800, 811, 806, 801, 808, 802, 805, 807, 807, 806, + + 809, 808, 812, 812, 807, 888, 0, 809, 810, 890, + 813, 811, 813, 814, 0, 810, 805, 0, 811, 806, + 0, 808, 814, 812, 807, 807, 815, 809, 817, 812, + 812, 818, 813, 814, 816, 810, 890, 813, 811, 813, + 814, 815, 820, 819, 816, 0, 815, 819, 817, 814, + 812, 818, 820, 815, 816, 817, 891, 822, 818, 813, + 814, 816, 820, 819, 822, 823, 824, 0, 815, 820, + 819, 816, 821, 815, 819, 817, 821, 822, 818, 820, + 826, 816, 828, 891, 822, 823, 824, 0, 827, 820, + 819, 822, 823, 824, 825, 826, 821, 827, 825, 821, + + 826, 0, 828, 821, 822, 0, 829, 826, 827, 828, + 0, 0, 823, 824, 825, 827, 830, 831, 835, 0, + 832, 825, 826, 821, 827, 825, 829, 826, 834, 828, + 834, 830, 831, 829, 832, 827, 830, 831, 835, 0, + 832, 825, 833, 830, 831, 835, 833, 832, 836, 0, + 834, 837, 0, 829, 839, 834, 841, 834, 830, 831, + 892, 832, 833, 830, 831, 835, 837, 832, 836, 833, + 842, 837, 838, 833, 839, 836, 841, 834, 837, 838, + 840, 839, 840, 841, 843, 842, 0, 892, 844, 833, + 842, 0, 838, 837, 846, 836, 847, 842, 837, 838, + + 840, 839, 0, 841, 843, 845, 838, 840, 844, 840, + 847, 843, 842, 849, 846, 844, 847, 842, 850, 838, + 845, 846, 848, 847, 851, 845, 852, 840, 853, 848, + 854, 843, 845, 849, 893, 844, 0, 847, 850, 895, + 849, 846, 848, 847, 851, 850, 852, 845, 853, 848, + 854, 851, 845, 852, 855, 853, 848, 854, 855, 856, + 849, 893, 856, 858, 859, 850, 895, 857, 860, 848, + 0, 851, 0, 852, 0, 853, 863, 854, 855, 856, + 861, 855, 857, 858, 859, 855, 856, 857, 860, 856, + 858, 859, 0, 861, 857, 860, 863, 864, 865, 862, + + 861, 864, 0, 863, 0, 855, 856, 861, 897, 857, + 858, 859, 862, 898, 857, 860, 869, 864, 865, 862, + 861, 868, 868, 863, 864, 865, 862, 861, 864, 866, + 867, 869, 0, 866, 867, 897, 869, 0, 899, 862, + 898, 0, 868, 869, 864, 865, 862, 874, 868, 868, + 870, 870, 0, 866, 867, 871, 866, 867, 869, 871, + 866, 867, 874, 869, 875, 899, 0, 874, 875, 868, + 872, 870, 873, 877, 874, 0, 878, 870, 870, 871, + 866, 867, 871, 876, 872, 873, 871, 876, 875, 874, + 872, 875, 873, 877, 874, 875, 878, 872, 870, 873, + + 877, 879, 879, 878, 880, 881, 871, 876, 0, 0, + 876, 872, 873, 882, 876, 875, 886, 872, 900, 873, + 877, 902, 879, 878, 880, 881, 883, 882, 879, 879, + 883, 880, 881, 882, 876, 884, 886, 885, 904, 908, + 882, 885, 910, 886, 884, 900, 911, 917, 902, 879, + 883, 880, 881, 883, 882, 884, 918, 883, 921, 922, + 882, 885, 884, 886, 885, 904, 908, 924, 885, 910, + 925, 884, 926, 911, 917, 928, 929, 883, 930, 934, + 936, 937, 884, 918, 938, 921, 922, 939, 885, 944, + 945, 946, 948, 949, 924, 950, 0, 925, 0, 926, + + 0, 951, 928, 929, 950, 930, 934, 936, 937, 952, + 0, 938, 948, 949, 939, 950, 944, 945, 946, 948, + 949, 951, 950, 953, 952, 954, 955, 956, 951, 952, + 0, 950, 1011, 955, 0, 1014, 952, 953, 0, 948, + 949, 957, 950, 953, 1015, 954, 955, 956, 951, 957, + 953, 952, 954, 955, 956, 958, 952, 958, 959, 1011, + 955, 957, 1014, 961, 953, 959, 960, 0, 957, 963, + 953, 1015, 954, 955, 956, 1018, 957, 958, 959, 965, + 966, 960, 958, 961, 958, 959, 960, 0, 957, 963, + 961, 962, 959, 960, 962, 964, 963, 964, 0, 965, + + 966, 0, 1018, 967, 958, 959, 965, 966, 960, 968, + 961, 969, 0, 960, 962, 1019, 963, 964, 962, 970, + 971, 962, 964, 967, 964, 972, 965, 966, 970, 968, + 967, 969, 0, 973, 974, 971, 968, 975, 969, 970, + 971, 962, 1019, 976, 964, 972, 970, 971, 978, 979, + 967, 0, 972, 973, 974, 970, 968, 975, 969, 980, + 973, 974, 971, 976, 975, 977, 970, 971, 978, 979, + 976, 983, 972, 982, 985, 978, 979, 982, 977, 980, + 973, 974, 981, 1024, 975, 977, 980, 986, 984, 981, + 976, 983, 977, 987, 985, 978, 979, 982, 983, 1026, + + 982, 985, 981, 984, 982, 977, 980, 986, 984, 981, + 1024, 991, 977, 987, 986, 984, 981, 988, 983, 988, + 987, 985, 990, 989, 982, 989, 1026, 992, 993, 981, + 984, 991, 0, 0, 986, 984, 990, 995, 991, 988, + 987, 0, 990, 0, 988, 989, 988, 992, 993, 990, + 989, 1027, 989, 994, 992, 993, 1000, 995, 991, 1001, + 994, 996, 999, 990, 995, 996, 988, 997, 998, 990, + 998, 997, 989, 994, 992, 993, 1000, 999, 1027, 1001, + 994, 1002, 999, 1000, 995, 996, 1001, 994, 996, 999, + 998, 997, 996, 1003, 997, 998, 0, 998, 997, 1030, + + 994, 1002, 1004, 1000, 999, 1005, 1001, 1005, 1002, 999, + 1031, 1034, 996, 1003, 1035, 1004, 1006, 998, 997, 1036, + 1003, 1037, 1004, 1006, 1042, 1005, 1030, 1043, 1002, 1004, + 0, 0, 1005, 1044, 1005, 1045, 1006, 1031, 1034, 1046, + 1003, 1035, 1004, 1006, 1042, 1047, 1036, 1043, 1037, 1004, + 1006, 1042, 1005, 1044, 1043, 1045, 1048, 1049, 1050, 1046, + 1044, 1049, 1045, 1006, 0, 1047, 1046, 1051, 0, 1052, + 0, 1042, 1047, 1054, 1043, 1053, 1048, 1055, 1050, 1056, + 1044, 1049, 1045, 1048, 1049, 1050, 1046, 1051, 1049, 1052, + 1053, 1057, 1047, 1054, 1051, 1053, 1052, 1055, 0, 1056, + + 1054, 1059, 1053, 1048, 1055, 1050, 1056, 1058, 1049, 1058, + 1060, 1057, 1061, 1062, 1051, 1063, 1052, 1053, 1057, 0, + 1054, 1059, 1053, 1060, 1055, 1066, 1056, 1076, 1059, 1058, + 1060, 1064, 1061, 1062, 1058, 1063, 1058, 1060, 1057, 1061, + 1062, 1065, 1063, 1067, 1078, 1066, 1064, 1065, 1059, 1071, + 1060, 1064, 1066, 0, 1076, 1081, 1058, 1060, 1064, 1061, + 1062, 1065, 1063, 1067, 1068, 1070, 1072, 1069, 1065, 1071, + 1067, 1078, 1066, 1064, 1065, 1069, 1071, 1068, 1064, 1073, + 1070, 1074, 1081, 1083, 1068, 1070, 1072, 1069, 1065, 1086, + 1067, 1068, 1070, 1072, 1069, 1087, 1071, 1088, 0, 1073, + + 1092, 1074, 1069, 0, 1068, 1091, 1073, 1070, 1074, 1094, + 1083, 1068, 1070, 1072, 1069, 1093, 1086, 1095, 1091, 1096, + 1092, 1097, 1087, 1099, 1088, 1091, 1073, 1092, 1074, 1094, + 1093, 0, 1091, 1100, 1096, 1093, 1094, 1095, 1098, 1096, + 0, 1097, 1093, 1099, 1095, 1091, 1096, 1092, 1097, 1101, + 1099, 1098, 1091, 1100, 1107, 1103, 1094, 1093, 1098, 1103, + 1100, 1096, 1093, 1102, 1095, 1098, 1096, 1104, 1097, 1101, + 1099, 1109, 1112, 1114, 1102, 1103, 1101, 1115, 1098, 1124, + 1100, 1107, 1103, 1102, 0, 1098, 1103, 1104, 1116, 1117, + 1102, 1118, 1119, 1114, 1104, 0, 1101, 1115, 1109, 1112, + + 1114, 1102, 1103, 1117, 1115, 1126, 1124, 1120, 1116, 1117, + 1102, 1118, 1119, 1127, 1104, 1116, 1117, 1120, 1118, 1119, + 1114, 1132, 1128, 0, 1115, 1126, 0, 1120, 0, 0, + 1117, 1128, 1126, 1127, 1120, 1116, 1117, 0, 1118, 1119, + 1127, 1132, 1128, 0, 1120, 0, 0, 0, 1132, 1128, + 0, 0, 1126, 0, 1120, 0, 0, 0, 1128, 0, + 1127, 0, 0, 0, 0, 0, 0, 0, 1132, 1128, + 1152, 1152, 1152, 1152, 1152, 1153, 0, 0, 1153, 1153, + 1155, 1155, 1155, 0, 1155, 1156, 0, 1156, 1156, 1156, + 1157, 0, 1157, 1157, 1157, 1158, 0, 1158, 1158, 1158, + + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, 1151, + 1151, 1151, 1151, 1151, 1151, 1151, 1151 + } ; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +#line 1 "flex_lexer.l" +/** + * lexer + * + * + */ +/*************************** + ** Section 1: Definitions + ***************************/ +#line 12 "flex_lexer.l" + +#include "../sql/Expr.h" +#include "bison_parser.h" +#include +#include +#include + +#define TOKEN(name) { return SQL_##name; } + +static thread_local std::stringstream strbuf; + +#line 2086 "flex_lexer.cpp" + +/*************************** + ** Section 2: Rules + ***************************/ +/* Define the output files */ +/* Make reentrant */ +/* performance tweeks */ +/* other flags */ +/* %option nodefault */ + +/*************************** + ** Section 3: Rules + ***************************/ +#line 2100 "flex_lexer.cpp" + +#define INITIAL 0 +#define singlequotedstring 1 +#define COMMENT 2 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +/* Holds the entire state of the reentrant scanner. */ +struct yyguts_t + { + + /* User-defined. Not touched by flex. */ + YY_EXTRA_TYPE yyextra_r; + + /* The rest are the same as the globals declared in the non-reentrant scanner. */ + FILE *yyin_r, *yyout_r; + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; + int yy_n_chars; + int yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; + int yy_did_buffer_switch_on_eof; + int yy_start_stack_ptr; + int yy_start_stack_depth; + int *yy_start_stack; + yy_state_type yy_last_accepting_state; + char* yy_last_accepting_cpos; + + int yylineno_r; + int yy_flex_debug_r; + + char *yytext_r; + int yy_more_flag; + int yy_more_len; + + YYSTYPE * yylval_r; + + YYLTYPE * yylloc_r; + + }; /* end struct yyguts_t */ + +static int yy_init_globals ( yyscan_t yyscanner ); + + /* This must go here because YYSTYPE and YYLTYPE are included + * from bison output in section 1.*/ + # define yylval yyg->yylval_r + + # define yylloc yyg->yylloc_r + +int yylex_init (yyscan_t* scanner); + +int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int yylex_destroy ( yyscan_t yyscanner ); + +int yyget_debug ( yyscan_t yyscanner ); + +void yyset_debug ( int debug_flag , yyscan_t yyscanner ); + +YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); + +void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); + +FILE *yyget_in ( yyscan_t yyscanner ); + +void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); + +FILE *yyget_out ( yyscan_t yyscanner ); + +void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); + + int yyget_leng ( yyscan_t yyscanner ); + +char *yyget_text ( yyscan_t yyscanner ); + +int yyget_lineno ( yyscan_t yyscanner ); + +void yyset_lineno ( int _line_number , yyscan_t yyscanner ); + +int yyget_column ( yyscan_t yyscanner ); + +void yyset_column ( int _column_no , yyscan_t yyscanner ); + +YYSTYPE * yyget_lval ( yyscan_t yyscanner ); + +void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); + + YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); + + void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int yywrap ( yyscan_t yyscanner ); +#else +extern int yywrap ( yyscan_t yyscanner ); +#endif +#endif + +#ifndef YY_NO_UNPUT + +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen ( const char * , yyscan_t yyscanner); +#endif + +#ifndef YY_NO_INPUT +#ifdef __cplusplus +static int yyinput ( yyscan_t yyscanner ); +#else +static int input ( yyscan_t yyscanner ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else +#define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + int n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); + +#define YY_DECL int yylex \ + (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK /*LINTED*/break; +#endif + +#define YY_RULE_SETUP \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + yylval = yylval_param; + + yylloc = yylloc_param; + + if ( !yyg->yy_init ) + { + yyg->yy_init = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! yyg->yy_start ) + yyg->yy_start = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); + } + + yy_load_buffer_state( yyscanner ); + } + + { +#line 57 "flex_lexer.l" + + +#line 2387 "flex_lexer.cpp" + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yyg->yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yyg->yy_start; +yy_match: + do + { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 1152 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + ++yy_cp; + } + while ( yy_current_state != 1151 ); + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yyg->yy_hold_char; + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + +case 1: +YY_RULE_SETUP +#line 59 "flex_lexer.l" +BEGIN(COMMENT); + YY_BREAK +case 2: +YY_RULE_SETUP +#line 60 "flex_lexer.l" +/* skipping comment content until a end of line is read */; + YY_BREAK +case 3: +/* rule 3 can match eol */ +YY_RULE_SETUP +#line 61 "flex_lexer.l" +BEGIN(INITIAL); + YY_BREAK +case 4: +/* rule 4 can match eol */ +YY_RULE_SETUP +#line 63 "flex_lexer.l" +/* skip whitespace */; + YY_BREAK +case 5: +YY_RULE_SETUP +#line 65 "flex_lexer.l" +TOKEN(DEALLOCATE) + YY_BREAK +case 6: +YY_RULE_SETUP +#line 66 "flex_lexer.l" +TOKEN(PARAMETERS) + YY_BREAK +case 7: +YY_RULE_SETUP +#line 67 "flex_lexer.l" +TOKEN(INTERSECT) + YY_BREAK +case 8: +YY_RULE_SETUP +#line 68 "flex_lexer.l" +TOKEN(TEMPORARY) + YY_BREAK +case 9: +YY_RULE_SETUP +#line 69 "flex_lexer.l" +TOKEN(TIMESTAMP) + YY_BREAK +case 10: +YY_RULE_SETUP +#line 70 "flex_lexer.l" +TOKEN(DESCRIBE) + YY_BREAK +case 11: +YY_RULE_SETUP +#line 71 "flex_lexer.l" +TOKEN(DISTINCT) + YY_BREAK +case 12: +YY_RULE_SETUP +#line 72 "flex_lexer.l" +TOKEN(NVARCHAR) + YY_BREAK +case 13: +YY_RULE_SETUP +#line 73 "flex_lexer.l" +TOKEN(RESTRICT) + YY_BREAK +case 14: +YY_RULE_SETUP +#line 74 "flex_lexer.l" +TOKEN(TRUNCATE) + YY_BREAK +case 15: +YY_RULE_SETUP +#line 75 "flex_lexer.l" +TOKEN(ANALYZE) + YY_BREAK +case 16: +YY_RULE_SETUP +#line 76 "flex_lexer.l" +TOKEN(BETWEEN) + YY_BREAK +case 17: +YY_RULE_SETUP +#line 77 "flex_lexer.l" +TOKEN(CASCADE) + YY_BREAK +case 18: +YY_RULE_SETUP +#line 78 "flex_lexer.l" +TOKEN(COLUMNS) + YY_BREAK +case 19: +YY_RULE_SETUP +#line 79 "flex_lexer.l" +TOKEN(CONTROL) + YY_BREAK +case 20: +YY_RULE_SETUP +#line 80 "flex_lexer.l" +TOKEN(DEFAULT) + YY_BREAK +case 21: +YY_RULE_SETUP +#line 81 "flex_lexer.l" +TOKEN(EXECUTE) + YY_BREAK +case 22: +YY_RULE_SETUP +#line 82 "flex_lexer.l" +TOKEN(EXPLAIN) + YY_BREAK +case 23: +YY_RULE_SETUP +#line 83 "flex_lexer.l" +TOKEN(INTEGER) + YY_BREAK +case 24: +YY_RULE_SETUP +#line 84 "flex_lexer.l" +TOKEN(NATURAL) + YY_BREAK +case 25: +YY_RULE_SETUP +#line 85 "flex_lexer.l" +TOKEN(PREPARE) + YY_BREAK +case 26: +YY_RULE_SETUP +#line 86 "flex_lexer.l" +TOKEN(PRIMARY) + YY_BREAK +case 27: +YY_RULE_SETUP +#line 87 "flex_lexer.l" +TOKEN(SCHEMAS) + YY_BREAK +case 28: +YY_RULE_SETUP +#line 88 "flex_lexer.l" +TOKEN(SPATIAL) + YY_BREAK +case 29: +YY_RULE_SETUP +#line 89 "flex_lexer.l" +TOKEN(VARCHAR) + YY_BREAK +case 30: +YY_RULE_SETUP +#line 90 "flex_lexer.l" +TOKEN(CHARACTER) + YY_BREAK +case 31: +YY_RULE_SETUP +#line 91 "flex_lexer.l" +TOKEN(VARYING) + YY_BREAK +case 32: +YY_RULE_SETUP +#line 92 "flex_lexer.l" +TOKEN(TIME) + YY_BREAK +case 33: +YY_RULE_SETUP +#line 93 "flex_lexer.l" +TOKEN(DECIMAL) + YY_BREAK +case 34: +YY_RULE_SETUP +#line 94 "flex_lexer.l" +TOKEN(REAL) + YY_BREAK +case 35: +YY_RULE_SETUP +#line 95 "flex_lexer.l" +TOKEN(VIRTUAL) + YY_BREAK +case 36: +YY_RULE_SETUP +#line 96 "flex_lexer.l" +TOKEN(BEFORE) + YY_BREAK +case 37: +YY_RULE_SETUP +#line 97 "flex_lexer.l" +TOKEN(COLUMN) + YY_BREAK +case 38: +YY_RULE_SETUP +#line 98 "flex_lexer.l" +TOKEN(CREATE) + YY_BREAK +case 39: +YY_RULE_SETUP +#line 99 "flex_lexer.l" +TOKEN(DELETE) + YY_BREAK +case 40: +YY_RULE_SETUP +#line 100 "flex_lexer.l" +TOKEN(DIRECT) + YY_BREAK +case 41: +YY_RULE_SETUP +#line 101 "flex_lexer.l" +TOKEN(DOUBLE) + YY_BREAK +case 42: +YY_RULE_SETUP +#line 102 "flex_lexer.l" +TOKEN(ESCAPE) + YY_BREAK +case 43: +YY_RULE_SETUP +#line 103 "flex_lexer.l" +TOKEN(EXCEPT) + YY_BREAK +case 44: +YY_RULE_SETUP +#line 104 "flex_lexer.l" +TOKEN(EXISTS) + YY_BREAK +case 45: +YY_RULE_SETUP +#line 105 "flex_lexer.l" +TOKEN(EXTRACT) + YY_BREAK +case 46: +YY_RULE_SETUP +#line 106 "flex_lexer.l" +TOKEN(CAST) + YY_BREAK +case 47: +YY_RULE_SETUP +#line 107 "flex_lexer.l" +TOKEN(FORMAT) + YY_BREAK +case 48: +YY_RULE_SETUP +#line 108 "flex_lexer.l" +TOKEN(GLOBAL) + YY_BREAK +case 49: +YY_RULE_SETUP +#line 109 "flex_lexer.l" +TOKEN(HAVING) + YY_BREAK +case 50: +YY_RULE_SETUP +#line 110 "flex_lexer.l" +TOKEN(IMPORT) + YY_BREAK +case 51: +YY_RULE_SETUP +#line 111 "flex_lexer.l" +TOKEN(INSERT) + YY_BREAK +case 52: +YY_RULE_SETUP +#line 112 "flex_lexer.l" +TOKEN(ISNULL) + YY_BREAK +case 53: +YY_RULE_SETUP +#line 113 "flex_lexer.l" +TOKEN(OFFSET) + YY_BREAK +case 54: +YY_RULE_SETUP +#line 114 "flex_lexer.l" +TOKEN(RENAME) + YY_BREAK +case 55: +YY_RULE_SETUP +#line 115 "flex_lexer.l" +TOKEN(SCHEMA) + YY_BREAK +case 56: +YY_RULE_SETUP +#line 116 "flex_lexer.l" +TOKEN(SELECT) + YY_BREAK +case 57: +YY_RULE_SETUP +#line 117 "flex_lexer.l" +TOKEN(SORTED) + YY_BREAK +case 58: +YY_RULE_SETUP +#line 118 "flex_lexer.l" +TOKEN(TABLES) + YY_BREAK +case 59: +YY_RULE_SETUP +#line 119 "flex_lexer.l" +TOKEN(UNIQUE) + YY_BREAK +case 60: +YY_RULE_SETUP +#line 120 "flex_lexer.l" +TOKEN(UNLOAD) + YY_BREAK +case 61: +YY_RULE_SETUP +#line 121 "flex_lexer.l" +TOKEN(UPDATE) + YY_BREAK +case 62: +YY_RULE_SETUP +#line 122 "flex_lexer.l" +TOKEN(VALUES) + YY_BREAK +case 63: +YY_RULE_SETUP +#line 123 "flex_lexer.l" +TOKEN(AFTER) + YY_BREAK +case 64: +YY_RULE_SETUP +#line 124 "flex_lexer.l" +TOKEN(ALTER) + YY_BREAK +case 65: +YY_RULE_SETUP +#line 125 "flex_lexer.l" +TOKEN(ARRAY) + YY_BREAK +case 66: +YY_RULE_SETUP +#line 126 "flex_lexer.l" +TOKEN(CROSS) + YY_BREAK +case 67: +YY_RULE_SETUP +#line 127 "flex_lexer.l" +TOKEN(DELTA) + YY_BREAK +case 68: +YY_RULE_SETUP +#line 128 "flex_lexer.l" +TOKEN(FLOAT) + YY_BREAK +case 69: +YY_RULE_SETUP +#line 129 "flex_lexer.l" +TOKEN(GROUP) + YY_BREAK +case 70: +YY_RULE_SETUP +#line 130 "flex_lexer.l" +TOKEN(INDEX) + YY_BREAK +case 71: +YY_RULE_SETUP +#line 131 "flex_lexer.l" +TOKEN(INNER) + YY_BREAK +case 72: +YY_RULE_SETUP +#line 132 "flex_lexer.l" +TOKEN(LIMIT) + YY_BREAK +case 73: +YY_RULE_SETUP +#line 133 "flex_lexer.l" +TOKEN(LOCAL) + YY_BREAK +case 74: +YY_RULE_SETUP +#line 134 "flex_lexer.l" +TOKEN(MERGE) + YY_BREAK +case 75: +YY_RULE_SETUP +#line 135 "flex_lexer.l" +TOKEN(MINUS) + YY_BREAK +case 76: +YY_RULE_SETUP +#line 136 "flex_lexer.l" +TOKEN(ORDER) + YY_BREAK +case 77: +YY_RULE_SETUP +#line 137 "flex_lexer.l" +TOKEN(OUTER) + YY_BREAK +case 78: +YY_RULE_SETUP +#line 138 "flex_lexer.l" +TOKEN(RIGHT) + YY_BREAK +case 79: +YY_RULE_SETUP +#line 139 "flex_lexer.l" +TOKEN(TABLE) + YY_BREAK +case 80: +YY_RULE_SETUP +#line 140 "flex_lexer.l" +TOKEN(UNION) + YY_BREAK +case 81: +YY_RULE_SETUP +#line 141 "flex_lexer.l" +TOKEN(USING) + YY_BREAK +case 82: +YY_RULE_SETUP +#line 142 "flex_lexer.l" +TOKEN(WHERE) + YY_BREAK +case 83: +YY_RULE_SETUP +#line 143 "flex_lexer.l" +TOKEN(CALL) + YY_BREAK +case 84: +YY_RULE_SETUP +#line 144 "flex_lexer.l" +TOKEN(CASE) + YY_BREAK +case 85: +YY_RULE_SETUP +#line 145 "flex_lexer.l" +TOKEN(CHAR) + YY_BREAK +case 86: +YY_RULE_SETUP +#line 146 "flex_lexer.l" +TOKEN(COPY) + YY_BREAK +case 87: +YY_RULE_SETUP +#line 147 "flex_lexer.l" +TOKEN(DATE) + YY_BREAK +case 88: +YY_RULE_SETUP +#line 148 "flex_lexer.l" +TOKEN(DATETIME) + YY_BREAK +case 89: +YY_RULE_SETUP +#line 149 "flex_lexer.l" +TOKEN(DESC) + YY_BREAK +case 90: +YY_RULE_SETUP +#line 150 "flex_lexer.l" +TOKEN(DROP) + YY_BREAK +case 91: +YY_RULE_SETUP +#line 151 "flex_lexer.l" +TOKEN(ELSE) + YY_BREAK +case 92: +YY_RULE_SETUP +#line 152 "flex_lexer.l" +TOKEN(FILE) + YY_BREAK +case 93: +YY_RULE_SETUP +#line 153 "flex_lexer.l" +TOKEN(FROM) + YY_BREAK +case 94: +YY_RULE_SETUP +#line 154 "flex_lexer.l" +TOKEN(FULL) + YY_BREAK +case 95: +YY_RULE_SETUP +#line 155 "flex_lexer.l" +TOKEN(HASH) + YY_BREAK +case 96: +YY_RULE_SETUP +#line 156 "flex_lexer.l" +TOKEN(HINT) + YY_BREAK +case 97: +YY_RULE_SETUP +#line 157 "flex_lexer.l" +TOKEN(INTO) + YY_BREAK +case 98: +YY_RULE_SETUP +#line 158 "flex_lexer.l" +TOKEN(JOIN) + YY_BREAK +case 99: +YY_RULE_SETUP +#line 159 "flex_lexer.l" +TOKEN(LEFT) + YY_BREAK +case 100: +YY_RULE_SETUP +#line 160 "flex_lexer.l" +TOKEN(LIKE) + YY_BREAK +case 101: +YY_RULE_SETUP +#line 161 "flex_lexer.l" +TOKEN(ILIKE) + YY_BREAK +case 102: +YY_RULE_SETUP +#line 162 "flex_lexer.l" +TOKEN(LOAD) + YY_BREAK +case 103: +YY_RULE_SETUP +#line 163 "flex_lexer.l" +TOKEN(LONG) + YY_BREAK +case 104: +YY_RULE_SETUP +#line 164 "flex_lexer.l" +TOKEN(NULL) + YY_BREAK +case 105: +YY_RULE_SETUP +#line 165 "flex_lexer.l" +TOKEN(PLAN) + YY_BREAK +case 106: +YY_RULE_SETUP +#line 166 "flex_lexer.l" +TOKEN(SHOW) + YY_BREAK +case 107: +YY_RULE_SETUP +#line 167 "flex_lexer.l" +TOKEN(TEXT) + YY_BREAK +case 108: +YY_RULE_SETUP +#line 168 "flex_lexer.l" +TOKEN(THEN) + YY_BREAK +case 109: +YY_RULE_SETUP +#line 169 "flex_lexer.l" +TOKEN(TIME) + YY_BREAK +case 110: +YY_RULE_SETUP +#line 170 "flex_lexer.l" +TOKEN(VIEW) + YY_BREAK +case 111: +YY_RULE_SETUP +#line 171 "flex_lexer.l" +TOKEN(WHEN) + YY_BREAK +case 112: +YY_RULE_SETUP +#line 172 "flex_lexer.l" +TOKEN(WITH) + YY_BREAK +case 113: +YY_RULE_SETUP +#line 173 "flex_lexer.l" +TOKEN(ADD) + YY_BREAK +case 114: +YY_RULE_SETUP +#line 174 "flex_lexer.l" +TOKEN(ALL) + YY_BREAK +case 115: +YY_RULE_SETUP +#line 175 "flex_lexer.l" +TOKEN(AND) + YY_BREAK +case 116: +YY_RULE_SETUP +#line 176 "flex_lexer.l" +TOKEN(ASC) + YY_BREAK +case 117: +YY_RULE_SETUP +#line 177 "flex_lexer.l" +TOKEN(END) + YY_BREAK +case 118: +YY_RULE_SETUP +#line 178 "flex_lexer.l" +TOKEN(FOR) + YY_BREAK +case 119: +YY_RULE_SETUP +#line 179 "flex_lexer.l" +TOKEN(INT) + YY_BREAK +case 120: +YY_RULE_SETUP +#line 180 "flex_lexer.l" +TOKEN(KEY) + YY_BREAK +case 121: +YY_RULE_SETUP +#line 181 "flex_lexer.l" +TOKEN(NOT) + YY_BREAK +case 122: +YY_RULE_SETUP +#line 182 "flex_lexer.l" +TOKEN(OFF) + YY_BREAK +case 123: +YY_RULE_SETUP +#line 183 "flex_lexer.l" +TOKEN(SET) + YY_BREAK +case 124: +YY_RULE_SETUP +#line 184 "flex_lexer.l" +TOKEN(TOP) + YY_BREAK +case 125: +YY_RULE_SETUP +#line 185 "flex_lexer.l" +TOKEN(AS) + YY_BREAK +case 126: +YY_RULE_SETUP +#line 186 "flex_lexer.l" +TOKEN(BY) + YY_BREAK +case 127: +YY_RULE_SETUP +#line 187 "flex_lexer.l" +TOKEN(IF) + YY_BREAK +case 128: +YY_RULE_SETUP +#line 188 "flex_lexer.l" +TOKEN(IN) + YY_BREAK +case 129: +YY_RULE_SETUP +#line 189 "flex_lexer.l" +TOKEN(IS) + YY_BREAK +case 130: +YY_RULE_SETUP +#line 190 "flex_lexer.l" +TOKEN(OF) + YY_BREAK +case 131: +YY_RULE_SETUP +#line 191 "flex_lexer.l" +TOKEN(ON) + YY_BREAK +case 132: +YY_RULE_SETUP +#line 192 "flex_lexer.l" +TOKEN(OR) + YY_BREAK +case 133: +YY_RULE_SETUP +#line 193 "flex_lexer.l" +TOKEN(TO) + YY_BREAK +case 134: +YY_RULE_SETUP +#line 194 "flex_lexer.l" +TOKEN(SECOND) + YY_BREAK +case 135: +YY_RULE_SETUP +#line 195 "flex_lexer.l" +TOKEN(MINUTE) + YY_BREAK +case 136: +YY_RULE_SETUP +#line 196 "flex_lexer.l" +TOKEN(HOUR) + YY_BREAK +case 137: +YY_RULE_SETUP +#line 197 "flex_lexer.l" +TOKEN(DAY) + YY_BREAK +case 138: +YY_RULE_SETUP +#line 198 "flex_lexer.l" +TOKEN(MONTH) + YY_BREAK +case 139: +YY_RULE_SETUP +#line 199 "flex_lexer.l" +TOKEN(YEAR) + YY_BREAK +case 140: +YY_RULE_SETUP +#line 200 "flex_lexer.l" +TOKEN(TRUE) + YY_BREAK +case 141: +YY_RULE_SETUP +#line 201 "flex_lexer.l" +TOKEN(FALSE) + YY_BREAK +case 142: +YY_RULE_SETUP +#line 202 "flex_lexer.l" +TOKEN(TRANSACTION) + YY_BREAK +case 143: +YY_RULE_SETUP +#line 203 "flex_lexer.l" +TOKEN(BEGIN) + YY_BREAK +case 144: +YY_RULE_SETUP +#line 204 "flex_lexer.l" +TOKEN(ROLLBACK) + YY_BREAK +case 145: +YY_RULE_SETUP +#line 205 "flex_lexer.l" +TOKEN(COMMIT) + YY_BREAK +/* Allow =/== see https://sqlite.org/lang_expr.html#collateop */ +case 146: +YY_RULE_SETUP +#line 208 "flex_lexer.l" +TOKEN(EQUALS) + YY_BREAK +case 147: +YY_RULE_SETUP +#line 209 "flex_lexer.l" +TOKEN(NOTEQUALS) + YY_BREAK +case 148: +YY_RULE_SETUP +#line 210 "flex_lexer.l" +TOKEN(NOTEQUALS) + YY_BREAK +case 149: +YY_RULE_SETUP +#line 211 "flex_lexer.l" +TOKEN(LESSEQ) + YY_BREAK +case 150: +YY_RULE_SETUP +#line 212 "flex_lexer.l" +TOKEN(GREATEREQ) + YY_BREAK +case 151: +YY_RULE_SETUP +#line 213 "flex_lexer.l" +TOKEN(CONCAT) + YY_BREAK +case 152: +YY_RULE_SETUP +#line 215 "flex_lexer.l" +{ return yytext[0]; } + YY_BREAK +case 153: +#line 218 "flex_lexer.l" +case 154: +YY_RULE_SETUP +#line 218 "flex_lexer.l" +{ + yylval->fval = atof(yytext); + return SQL_FLOATVAL; +} + YY_BREAK +/* + * Regularly, negative literals are treated as . This does not work for LLONG_MIN, as it has no + * positive equivalent. We thus match for LLONG_MIN specifically. This is not an issue for floats, where + * numeric_limits::lowest() == -numeric_limits::max(); + */ +case 155: +YY_RULE_SETUP +#line 228 "flex_lexer.l" +{ + yylval->ival = LLONG_MIN; + return SQL_INTVAL; +} + YY_BREAK +case 156: +YY_RULE_SETUP +#line 233 "flex_lexer.l" +{ + errno = 0; + yylval->ival = strtoll(yytext, nullptr, 0); + if (errno) { + return fprintf(stderr, "[SQL-Lexer-Error] Integer cannot be parsed - is it out of range?"); + return 0; + } + return SQL_INTVAL; +} + YY_BREAK +case 157: +YY_RULE_SETUP +#line 243 "flex_lexer.l" +{ + // Crop the leading and trailing quote char + yylval->sval = hsql::substr(yytext, 1, strlen(yytext)-1); + return SQL_IDENTIFIER; +} + YY_BREAK +case 158: +YY_RULE_SETUP +#line 249 "flex_lexer.l" +{ + yylval->sval = strdup(yytext); + return SQL_IDENTIFIER; +} + YY_BREAK +case 159: +YY_RULE_SETUP +#line 254 "flex_lexer.l" +{ BEGIN singlequotedstring; strbuf = std::stringstream{}; } + YY_BREAK +case 160: +YY_RULE_SETUP +#line 255 "flex_lexer.l" +{ strbuf << '\''; } + YY_BREAK +case 161: +/* rule 161 can match eol */ +YY_RULE_SETUP +#line 256 "flex_lexer.l" +{ strbuf << yytext; } + YY_BREAK +case 162: +YY_RULE_SETUP +#line 257 "flex_lexer.l" +{ BEGIN 0; yylval->sval = strdup(strbuf.str().c_str()); return SQL_STRING; } + YY_BREAK +case YY_STATE_EOF(singlequotedstring): +#line 258 "flex_lexer.l" +{ fprintf(stderr, "[SQL-Lexer-Error] Unterminated string\n"); return 0; } + YY_BREAK +case 163: +YY_RULE_SETUP +#line 260 "flex_lexer.l" +{ fprintf(stderr, "[SQL-Lexer-Error] Unknown Character: %c\n", yytext[0]); return 0; } + YY_BREAK +case 164: +YY_RULE_SETUP +#line 263 "flex_lexer.l" +ECHO; + YY_BREAK +#line 3291 "flex_lexer.cpp" +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(COMMENT): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yyg->yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); + + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yyg->yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_END_OF_FILE: + { + yyg->yy_did_buffer_switch_on_eof = 0; + + if ( yywrap( yyscanner ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = + yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yyg->yy_c_buf_p = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ +} /* end of yylex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = yyg->yytext_ptr; + int number_to_move, i; + int ret_val; + + if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) (yyg->yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + yyg->yy_n_chars, num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + if ( yyg->yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin , yyscanner); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); + } + + yyg->yy_n_chars += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + static yy_state_type yy_get_previous_state (yyscan_t yyscanner) +{ + yy_state_type yy_current_state; + char *yy_cp; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + yy_current_state = yyg->yy_start; + + for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) + { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 1152 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) +{ + int yy_is_jam; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ + char *yy_cp = yyg->yy_c_buf_p; + + YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 1152 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 1151); + + (void)yyg; + return yy_is_jam ? 0 : yy_current_state; +} + +#ifndef YY_NO_UNPUT + +#endif + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (yyscan_t yyscanner) +#else + static int input (yyscan_t yyscanner) +#endif + +{ + int c; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + *yyg->yy_c_buf_p = yyg->yy_hold_char; + + if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + /* This was really a NUL. */ + *yyg->yy_c_buf_p = '\0'; + + else + { /* need more input */ + int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr); + ++yyg->yy_c_buf_p; + + switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin , yyscanner); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( yyscanner ) ) + return 0; + + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(yyscanner); +#else + return input(yyscanner); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = yyg->yytext_ptr + offset; + break; + } + } + } + + c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ + *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ + yyg->yy_hold_char = *++yyg->yy_c_buf_p; + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * @param yyscanner The scanner object. + * @note This function does not reset the start condition to @c INITIAL . + */ + void yyrestart (FILE * input_file , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); + } + + yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); + yy_load_buffer_state( yyscanner ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * @param yyscanner The scanner object. + */ + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (yyscanner); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( yyscanner ); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yyg->yy_did_buffer_switch_on_eof = 1; +} + +static void yy_load_buffer_state (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyg->yy_hold_char = *yyg->yy_c_buf_p; +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * @param yyscanner The scanner object. + * @return the allocated buffer state. + */ + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + yy_init_buffer( b, file , yyscanner); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with yy_create_buffer() + * @param yyscanner The scanner object. + */ + void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + yyfree( (void *) b->yy_ch_buf , yyscanner ); + + yyfree( (void *) b , yyscanner ); +} + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a yyrestart() or at EOF. + */ + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) + +{ + int oerrno = errno; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + yy_flush_buffer( b , yyscanner); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * @param yyscanner The scanner object. + */ + void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( yyscanner ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * @param yyscanner The scanner object. + */ +void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(yyscanner); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + yyg->yy_buffer_stack_top++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * @param yyscanner The scanner object. + */ +void yypop_buffer_state (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + if (yyg->yy_buffer_stack_top > 0) + --yyg->yy_buffer_stack_top; + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void yyensure_buffer_stack (yyscan_t yyscanner) +{ + yy_size_t num_to_alloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (!yyg->yy_buffer_stack) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + yyg->yy_buffer_stack_max = num_to_alloc; + yyg->yy_buffer_stack_top = 0; + return; + } + + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = yyg->yy_buffer_stack_max + grow_size; + yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc + (yyg->yy_buffer_stack, + num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); + yyg->yy_buffer_stack_max = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer( b , yyscanner ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to yylex() will + * scan from a @e copy of @a str. + * @param yystr a NUL-terminated string to scan + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * yy_scan_bytes() instead. + */ +YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) +{ + + return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); +} + +/** Setup the input buffer state to scan the given bytes. The next call to yylex() will + * scan from a @e copy of @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t) (_yybytes_len + 2); + buf = (char *) yyalloc( n , yyscanner ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer( buf, n , yyscanner); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = yyg->yy_hold_char; \ + yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ + yyg->yy_hold_char = *yyg->yy_c_buf_p; \ + *yyg->yy_c_buf_p = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the user-defined data for this scanner. + * @param yyscanner The scanner object. + */ +YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyextra; +} + +/** Get the current line number. + * @param yyscanner The scanner object. + */ +int yyget_lineno (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (! YY_CURRENT_BUFFER) + return 0; + + return yylineno; +} + +/** Get the current column number. + * @param yyscanner The scanner object. + */ +int yyget_column (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (! YY_CURRENT_BUFFER) + return 0; + + return yycolumn; +} + +/** Get the input stream. + * @param yyscanner The scanner object. + */ +FILE *yyget_in (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyin; +} + +/** Get the output stream. + * @param yyscanner The scanner object. + */ +FILE *yyget_out (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyout; +} + +/** Get the length of the current token. + * @param yyscanner The scanner object. + */ +int yyget_leng (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyleng; +} + +/** Get the current token. + * @param yyscanner The scanner object. + */ + +char *yyget_text (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yytext; +} + +/** Set the user-defined data. This data is never touched by the scanner. + * @param user_defined The data to be associated with this scanner. + * @param yyscanner The scanner object. + */ +void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyextra = user_defined ; +} + +/** Set the current line number. + * @param _line_number line number + * @param yyscanner The scanner object. + */ +void yyset_lineno (int _line_number , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* lineno is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); + + yylineno = _line_number; +} + +/** Set the current column. + * @param _column_no column number + * @param yyscanner The scanner object. + */ +void yyset_column (int _column_no , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* column is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "yyset_column called with no buffer" ); + + yycolumn = _column_no; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param _in_str A readable stream. + * @param yyscanner The scanner object. + * @see yy_switch_to_buffer + */ +void yyset_in (FILE * _in_str , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyin = _in_str ; +} + +void yyset_out (FILE * _out_str , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyout = _out_str ; +} + +int yyget_debug (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yy_flex_debug; +} + +void yyset_debug (int _bdebug , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yy_flex_debug = _bdebug ; +} + +/* Accessor methods for yylval and yylloc */ + +YYSTYPE * yyget_lval (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yylval; +} + +void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yylval = yylval_param; +} + +YYLTYPE *yyget_lloc (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yylloc; +} + +void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yylloc = yylloc_param; +} + +/* User-visible API */ + +/* yylex_init is special because it creates the scanner itself, so it is + * the ONLY reentrant function that doesn't take the scanner as the last argument. + * That's why we explicitly handle the declaration, instead of using our macros. + */ +int yylex_init(yyscan_t* ptr_yy_globals) +{ + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } + + *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); + + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } + + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + + return yy_init_globals ( *ptr_yy_globals ); +} + +/* yylex_init_extra has the same functionality as yylex_init, but follows the + * convention of taking the scanner as the last argument. Note however, that + * this is a *pointer* to a scanner, as it will be allocated by this call (and + * is the reason, too, why this function also must handle its own declaration). + * The user defined value in the first argument will be available to yyalloc in + * the yyextra field. + */ +int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) +{ + struct yyguts_t dummy_yyguts; + + yyset_extra (yy_user_defined, &dummy_yyguts); + + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } + + *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); + + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } + + /* By setting to 0xAA, we expose bugs in + yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + + yyset_extra (yy_user_defined, *ptr_yy_globals); + + return yy_init_globals ( *ptr_yy_globals ); +} + +static int yy_init_globals (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ + + yyg->yy_buffer_stack = NULL; + yyg->yy_buffer_stack_top = 0; + yyg->yy_buffer_stack_max = 0; + yyg->yy_c_buf_p = NULL; + yyg->yy_init = 0; + yyg->yy_start = 0; + + yyg->yy_start_stack_ptr = 0; + yyg->yy_start_stack_depth = 0; + yyg->yy_start_stack = NULL; + +/* Defined in main.c */ +#ifdef YY_STDINIT + yyin = stdin; + yyout = stdout; +#else + yyin = NULL; + yyout = NULL; +#endif + + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; +} + +/* yylex_destroy is for both reentrant and non-reentrant scanners. */ +int yylex_destroy (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(yyscanner); + } + + /* Destroy the stack itself. */ + yyfree(yyg->yy_buffer_stack , yyscanner); + yyg->yy_buffer_stack = NULL; + + /* Destroy the start condition stack. */ + yyfree( yyg->yy_start_stack , yyscanner ); + yyg->yy_start_stack = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals( yyscanner); + + /* Destroy the main struct (reentrant only). */ + yyfree ( yyscanner , yyscanner ); + yyscanner = NULL; + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (const char * s , yyscan_t yyscanner) +{ + int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *yyalloc (yy_size_t size , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + return malloc(size); +} + +void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); +} + +void yyfree (void * ptr , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#line 263 "flex_lexer.l" + +/*************************** + ** Section 3: User code + ***************************/ + +int yyerror(const char *msg) { + fprintf(stderr, "[SQL-Lexer-Error] %s\n",msg); return 0; +} + From 3ca0ea1ba8652a5275091ba585215a79f01e5eb9 Mon Sep 17 00:00:00 2001 From: simonstadlinger Date: Sun, 29 Aug 2021 18:58:10 +0200 Subject: [PATCH 49/73] Implement destructor for alter statement --- src/sql/AlterStatement.h | 4 +++- src/sql/statements.cpp | 9 ++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/sql/AlterStatement.h b/src/sql/AlterStatement.h index a143357a..c48dc7f4 100755 --- a/src/sql/AlterStatement.h +++ b/src/sql/AlterStatement.h @@ -13,13 +13,15 @@ namespace hsql { struct AlterAction { AlterAction(ActionType type); ActionType type; - virtual ~AlterAction() = default; + virtual ~AlterAction(); }; struct DropColumnAction : AlterAction { DropColumnAction(char* column_name); char* columnName; bool ifExists; + + ~DropColumnAction() override; }; diff --git a/src/sql/statements.cpp b/src/sql/statements.cpp index 6fd0629c..d85b2abf 100755 --- a/src/sql/statements.cpp +++ b/src/sql/statements.cpp @@ -1,4 +1,5 @@ #include "statements.h" +#include "AlterStatement.h" namespace hsql { @@ -165,7 +166,9 @@ namespace hsql { // AlterStatement and supportive classes - AlterAction::AlterAction(ActionType type) : type(type){}; + AlterAction::AlterAction(ActionType type) : type(type){} + + AlterAction::~AlterAction() = default; DropColumnAction::DropColumnAction(char* column_name) : AlterAction(DROPCOLUMN), @@ -173,6 +176,10 @@ namespace hsql { ifExists(false) {}; + DropColumnAction::~DropColumnAction() { + free(columnName); + } + AlterStatement::AlterStatement(char* name, AlterAction* action) : SQLStatement(kStmtAlter), schema(nullptr), From e59eb2a25637eb702668083dfa1efa6aa6879e5f Mon Sep 17 00:00:00 2001 From: simonstadlinger Date: Mon, 30 Aug 2021 07:16:24 +0200 Subject: [PATCH 50/73] Remove explicit desctructor call for alter statement action --- src/sql/statements.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/sql/statements.cpp b/src/sql/statements.cpp index d85b2abf..d8eeb11e 100755 --- a/src/sql/statements.cpp +++ b/src/sql/statements.cpp @@ -190,7 +190,6 @@ namespace hsql { AlterStatement::~AlterStatement() { free(schema); free(name); - free(action); } // TransactionStatement From 6cb84914f26356bf6cedd8ef73fd7720a00e0436 Mon Sep 17 00:00:00 2001 From: mweisgut Date: Wed, 8 Sep 2021 20:28:05 +0200 Subject: [PATCH 51/73] fixed shift/reduce issue --- src/parser/bison_parser.cpp | 2623 ++++++++++++++++++----------------- src/parser/bison_parser.y | 8 +- 2 files changed, 1324 insertions(+), 1307 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index dfaa0b49..0f3a61ad 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -332,95 +332,96 @@ enum yysymbol_kind_t YYSYMBOL_opt_time_specification = 198, /* opt_time_specification */ YYSYMBOL_opt_decimal_specification = 199, /* opt_decimal_specification */ YYSYMBOL_opt_column_constraints = 200, /* opt_column_constraints */ - YYSYMBOL_column_constraint = 201, /* column_constraint */ - YYSYMBOL_table_constraint = 202, /* table_constraint */ - YYSYMBOL_drop_statement = 203, /* drop_statement */ - YYSYMBOL_opt_exists = 204, /* opt_exists */ - YYSYMBOL_alter_statement = 205, /* alter_statement */ - YYSYMBOL_alter_action = 206, /* alter_action */ - YYSYMBOL_drop_action = 207, /* drop_action */ - YYSYMBOL_delete_statement = 208, /* delete_statement */ - YYSYMBOL_truncate_statement = 209, /* truncate_statement */ - YYSYMBOL_insert_statement = 210, /* insert_statement */ - YYSYMBOL_opt_column_list = 211, /* opt_column_list */ - YYSYMBOL_update_statement = 212, /* update_statement */ - YYSYMBOL_update_clause_commalist = 213, /* update_clause_commalist */ - YYSYMBOL_update_clause = 214, /* update_clause */ - YYSYMBOL_select_statement = 215, /* select_statement */ - YYSYMBOL_select_within_set_operation = 216, /* select_within_set_operation */ - YYSYMBOL_select_within_set_operation_no_parentheses = 217, /* select_within_set_operation_no_parentheses */ - YYSYMBOL_select_with_paren = 218, /* select_with_paren */ - YYSYMBOL_select_no_paren = 219, /* select_no_paren */ - YYSYMBOL_set_operator = 220, /* set_operator */ - YYSYMBOL_set_type = 221, /* set_type */ - YYSYMBOL_opt_all = 222, /* opt_all */ - YYSYMBOL_select_clause = 223, /* select_clause */ - YYSYMBOL_opt_distinct = 224, /* opt_distinct */ - YYSYMBOL_select_list = 225, /* select_list */ - YYSYMBOL_opt_from_clause = 226, /* opt_from_clause */ - YYSYMBOL_from_clause = 227, /* from_clause */ - YYSYMBOL_opt_where = 228, /* opt_where */ - YYSYMBOL_opt_group = 229, /* opt_group */ - YYSYMBOL_opt_having = 230, /* opt_having */ - YYSYMBOL_opt_order = 231, /* opt_order */ - YYSYMBOL_order_list = 232, /* order_list */ - YYSYMBOL_order_desc = 233, /* order_desc */ - YYSYMBOL_opt_order_type = 234, /* opt_order_type */ - YYSYMBOL_opt_top = 235, /* opt_top */ - YYSYMBOL_opt_limit = 236, /* opt_limit */ - YYSYMBOL_expr_list = 237, /* expr_list */ - YYSYMBOL_opt_literal_list = 238, /* opt_literal_list */ - YYSYMBOL_literal_list = 239, /* literal_list */ - YYSYMBOL_expr_alias = 240, /* expr_alias */ - YYSYMBOL_expr = 241, /* expr */ - YYSYMBOL_operand = 242, /* operand */ - YYSYMBOL_scalar_expr = 243, /* scalar_expr */ - YYSYMBOL_unary_expr = 244, /* unary_expr */ - YYSYMBOL_binary_expr = 245, /* binary_expr */ - YYSYMBOL_logic_expr = 246, /* logic_expr */ - YYSYMBOL_in_expr = 247, /* in_expr */ - YYSYMBOL_case_expr = 248, /* case_expr */ - YYSYMBOL_case_list = 249, /* case_list */ - YYSYMBOL_exists_expr = 250, /* exists_expr */ - YYSYMBOL_comp_expr = 251, /* comp_expr */ - YYSYMBOL_function_expr = 252, /* function_expr */ - YYSYMBOL_extract_expr = 253, /* extract_expr */ - YYSYMBOL_cast_expr = 254, /* cast_expr */ - YYSYMBOL_datetime_field = 255, /* datetime_field */ - YYSYMBOL_array_expr = 256, /* array_expr */ - YYSYMBOL_array_index = 257, /* array_index */ - YYSYMBOL_between_expr = 258, /* between_expr */ - YYSYMBOL_column_name = 259, /* column_name */ - YYSYMBOL_literal = 260, /* literal */ - YYSYMBOL_string_literal = 261, /* string_literal */ - YYSYMBOL_bool_literal = 262, /* bool_literal */ - YYSYMBOL_num_literal = 263, /* num_literal */ - YYSYMBOL_int_literal = 264, /* int_literal */ - YYSYMBOL_null_literal = 265, /* null_literal */ - YYSYMBOL_date_literal = 266, /* date_literal */ - YYSYMBOL_param_expr = 267, /* param_expr */ - YYSYMBOL_table_ref = 268, /* table_ref */ - YYSYMBOL_table_ref_atomic = 269, /* table_ref_atomic */ - YYSYMBOL_nonjoin_table_ref_atomic = 270, /* nonjoin_table_ref_atomic */ - YYSYMBOL_table_ref_commalist = 271, /* table_ref_commalist */ - YYSYMBOL_table_ref_name = 272, /* table_ref_name */ - YYSYMBOL_table_ref_name_no_alias = 273, /* table_ref_name_no_alias */ - YYSYMBOL_table_name = 274, /* table_name */ - YYSYMBOL_opt_index_name = 275, /* opt_index_name */ - YYSYMBOL_index_name = 276, /* index_name */ - YYSYMBOL_table_alias = 277, /* table_alias */ - YYSYMBOL_opt_table_alias = 278, /* opt_table_alias */ - YYSYMBOL_alias = 279, /* alias */ - YYSYMBOL_opt_alias = 280, /* opt_alias */ - YYSYMBOL_opt_with_clause = 281, /* opt_with_clause */ - YYSYMBOL_with_clause = 282, /* with_clause */ - YYSYMBOL_with_description_list = 283, /* with_description_list */ - YYSYMBOL_with_description = 284, /* with_description */ - YYSYMBOL_join_clause = 285, /* join_clause */ - YYSYMBOL_opt_join_type = 286, /* opt_join_type */ - YYSYMBOL_join_condition = 287, /* join_condition */ - YYSYMBOL_opt_semicolon = 288, /* opt_semicolon */ - YYSYMBOL_ident_commalist = 289 /* ident_commalist */ + YYSYMBOL_column_constraint_list = 201, /* column_constraint_list */ + YYSYMBOL_column_constraint = 202, /* column_constraint */ + YYSYMBOL_table_constraint = 203, /* table_constraint */ + YYSYMBOL_drop_statement = 204, /* drop_statement */ + YYSYMBOL_opt_exists = 205, /* opt_exists */ + YYSYMBOL_alter_statement = 206, /* alter_statement */ + YYSYMBOL_alter_action = 207, /* alter_action */ + YYSYMBOL_drop_action = 208, /* drop_action */ + YYSYMBOL_delete_statement = 209, /* delete_statement */ + YYSYMBOL_truncate_statement = 210, /* truncate_statement */ + YYSYMBOL_insert_statement = 211, /* insert_statement */ + YYSYMBOL_opt_column_list = 212, /* opt_column_list */ + YYSYMBOL_update_statement = 213, /* update_statement */ + YYSYMBOL_update_clause_commalist = 214, /* update_clause_commalist */ + YYSYMBOL_update_clause = 215, /* update_clause */ + YYSYMBOL_select_statement = 216, /* select_statement */ + YYSYMBOL_select_within_set_operation = 217, /* select_within_set_operation */ + YYSYMBOL_select_within_set_operation_no_parentheses = 218, /* select_within_set_operation_no_parentheses */ + YYSYMBOL_select_with_paren = 219, /* select_with_paren */ + YYSYMBOL_select_no_paren = 220, /* select_no_paren */ + YYSYMBOL_set_operator = 221, /* set_operator */ + YYSYMBOL_set_type = 222, /* set_type */ + YYSYMBOL_opt_all = 223, /* opt_all */ + YYSYMBOL_select_clause = 224, /* select_clause */ + YYSYMBOL_opt_distinct = 225, /* opt_distinct */ + YYSYMBOL_select_list = 226, /* select_list */ + YYSYMBOL_opt_from_clause = 227, /* opt_from_clause */ + YYSYMBOL_from_clause = 228, /* from_clause */ + YYSYMBOL_opt_where = 229, /* opt_where */ + YYSYMBOL_opt_group = 230, /* opt_group */ + YYSYMBOL_opt_having = 231, /* opt_having */ + YYSYMBOL_opt_order = 232, /* opt_order */ + YYSYMBOL_order_list = 233, /* order_list */ + YYSYMBOL_order_desc = 234, /* order_desc */ + YYSYMBOL_opt_order_type = 235, /* opt_order_type */ + YYSYMBOL_opt_top = 236, /* opt_top */ + YYSYMBOL_opt_limit = 237, /* opt_limit */ + YYSYMBOL_expr_list = 238, /* expr_list */ + YYSYMBOL_opt_literal_list = 239, /* opt_literal_list */ + YYSYMBOL_literal_list = 240, /* literal_list */ + YYSYMBOL_expr_alias = 241, /* expr_alias */ + YYSYMBOL_expr = 242, /* expr */ + YYSYMBOL_operand = 243, /* operand */ + YYSYMBOL_scalar_expr = 244, /* scalar_expr */ + YYSYMBOL_unary_expr = 245, /* unary_expr */ + YYSYMBOL_binary_expr = 246, /* binary_expr */ + YYSYMBOL_logic_expr = 247, /* logic_expr */ + YYSYMBOL_in_expr = 248, /* in_expr */ + YYSYMBOL_case_expr = 249, /* case_expr */ + YYSYMBOL_case_list = 250, /* case_list */ + YYSYMBOL_exists_expr = 251, /* exists_expr */ + YYSYMBOL_comp_expr = 252, /* comp_expr */ + YYSYMBOL_function_expr = 253, /* function_expr */ + YYSYMBOL_extract_expr = 254, /* extract_expr */ + YYSYMBOL_cast_expr = 255, /* cast_expr */ + YYSYMBOL_datetime_field = 256, /* datetime_field */ + YYSYMBOL_array_expr = 257, /* array_expr */ + YYSYMBOL_array_index = 258, /* array_index */ + YYSYMBOL_between_expr = 259, /* between_expr */ + YYSYMBOL_column_name = 260, /* column_name */ + YYSYMBOL_literal = 261, /* literal */ + YYSYMBOL_string_literal = 262, /* string_literal */ + YYSYMBOL_bool_literal = 263, /* bool_literal */ + YYSYMBOL_num_literal = 264, /* num_literal */ + YYSYMBOL_int_literal = 265, /* int_literal */ + YYSYMBOL_null_literal = 266, /* null_literal */ + YYSYMBOL_date_literal = 267, /* date_literal */ + YYSYMBOL_param_expr = 268, /* param_expr */ + YYSYMBOL_table_ref = 269, /* table_ref */ + YYSYMBOL_table_ref_atomic = 270, /* table_ref_atomic */ + YYSYMBOL_nonjoin_table_ref_atomic = 271, /* nonjoin_table_ref_atomic */ + YYSYMBOL_table_ref_commalist = 272, /* table_ref_commalist */ + YYSYMBOL_table_ref_name = 273, /* table_ref_name */ + YYSYMBOL_table_ref_name_no_alias = 274, /* table_ref_name_no_alias */ + YYSYMBOL_table_name = 275, /* table_name */ + YYSYMBOL_opt_index_name = 276, /* opt_index_name */ + YYSYMBOL_index_name = 277, /* index_name */ + YYSYMBOL_table_alias = 278, /* table_alias */ + YYSYMBOL_opt_table_alias = 279, /* opt_table_alias */ + YYSYMBOL_alias = 280, /* alias */ + YYSYMBOL_opt_alias = 281, /* opt_alias */ + YYSYMBOL_opt_with_clause = 282, /* opt_with_clause */ + YYSYMBOL_with_clause = 283, /* with_clause */ + YYSYMBOL_with_description_list = 284, /* with_description_list */ + YYSYMBOL_with_description = 285, /* with_description */ + YYSYMBOL_join_clause = 286, /* join_clause */ + YYSYMBOL_opt_join_type = 287, /* opt_join_type */ + YYSYMBOL_join_condition = 288, /* join_condition */ + YYSYMBOL_opt_semicolon = 289, /* opt_semicolon */ + YYSYMBOL_ident_commalist = 290 /* ident_commalist */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -745,16 +746,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 67 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 819 +#define YYLAST 817 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 173 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 117 +#define YYNNTS 118 /* YYNRULES -- Number of rules. */ -#define YYNRULES 290 +#define YYNRULES 291 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 536 +#define YYNSTATES 537 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 410 @@ -819,36 +820,36 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 288, 288, 309, 315, 324, 328, 332, 335, 338, - 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 363, 364, 369, 370, 374, 378, 390, 393, 396, 402, - 403, 410, 417, 420, 424, 438, 444, 453, 470, 474, - 477, 486, 500, 503, 508, 522, 535, 542, 549, 556, - 567, 568, 572, 573, 577, 578, 582, 589, 590, 591, - 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, - 602, 606, 607, 611, 612, 613, 617, 618, 619, 623, - 624, 625, 626, 630, 631, 642, 648, 654, 660, 668, - 669, 678, 686, 689, 701, 710, 723, 730, 741, 742, - 752, 761, 762, 766, 778, 782, 786, 800, 801, 804, - 805, 816, 817, 821, 831, 844, 851, 855, 859, 866, - 869, 875, 887, 888, 892, 896, 897, 901, 906, 907, - 911, 916, 920, 921, 925, 926, 930, 931, 935, 939, - 940, 941, 947, 948, 952, 953, 954, 955, 956, 957, - 964, 965, 969, 970, 974, 975, 979, 989, 990, 991, - 992, 993, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, - 1005, 1006, 1007, 1011, 1012, 1016, 1017, 1018, 1019, 1020, - 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, - 1034, 1038, 1039, 1043, 1044, 1045, 1046, 1052, 1053, 1054, - 1055, 1059, 1060, 1064, 1065, 1069, 1070, 1071, 1072, 1073, - 1074, 1075, 1079, 1080, 1084, 1088, 1092, 1093, 1094, 1095, - 1096, 1097, 1101, 1105, 1109, 1113, 1114, 1115, 1116, 1120, - 1121, 1122, 1123, 1124, 1125, 1129, 1133, 1134, 1138, 1139, - 1143, 1147, 1151, 1164, 1176, 1177, 1187, 1188, 1192, 1193, - 1202, 1203, 1208, 1219, 1228, 1229, 1233, 1234, 1238, 1243, - 1244, 1249, 1250, 1255, 1256, 1261, 1262, 1271, 1272, 1276, - 1280, 1284, 1291, 1304, 1312, 1322, 1341, 1342, 1343, 1344, - 1345, 1346, 1347, 1348, 1349, 1350, 1355, 1364, 1365, 1370, - 1371 + 0, 289, 289, 310, 316, 325, 329, 333, 336, 339, + 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, + 364, 365, 370, 371, 375, 379, 391, 394, 397, 403, + 404, 411, 418, 421, 425, 439, 445, 454, 471, 475, + 478, 487, 501, 504, 509, 523, 536, 543, 550, 557, + 568, 569, 573, 574, 578, 579, 583, 590, 591, 592, + 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, + 603, 607, 608, 612, 613, 614, 618, 619, 623, 624, + 627, 628, 629, 630, 634, 635, 646, 652, 658, 664, + 672, 673, 682, 690, 693, 705, 714, 727, 734, 745, + 746, 756, 765, 766, 770, 782, 786, 790, 804, 805, + 808, 809, 820, 821, 825, 835, 848, 855, 859, 863, + 870, 873, 879, 891, 892, 896, 900, 901, 905, 910, + 911, 915, 920, 924, 925, 929, 930, 934, 935, 939, + 943, 944, 945, 951, 952, 956, 957, 958, 959, 960, + 961, 968, 969, 973, 974, 978, 979, 983, 993, 994, + 995, 996, 997, 1001, 1002, 1003, 1004, 1005, 1006, 1007, + 1008, 1009, 1010, 1011, 1015, 1016, 1020, 1021, 1022, 1023, + 1024, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, + 1037, 1038, 1042, 1043, 1047, 1048, 1049, 1050, 1056, 1057, + 1058, 1059, 1063, 1064, 1068, 1069, 1073, 1074, 1075, 1076, + 1077, 1078, 1079, 1083, 1084, 1088, 1092, 1096, 1097, 1098, + 1099, 1100, 1101, 1105, 1109, 1113, 1117, 1118, 1119, 1120, + 1124, 1125, 1126, 1127, 1128, 1129, 1133, 1137, 1138, 1142, + 1143, 1147, 1151, 1155, 1168, 1180, 1181, 1191, 1192, 1196, + 1197, 1206, 1207, 1212, 1223, 1232, 1233, 1237, 1238, 1242, + 1247, 1248, 1253, 1254, 1259, 1260, 1265, 1266, 1275, 1276, + 1280, 1284, 1288, 1295, 1308, 1316, 1326, 1345, 1346, 1347, + 1348, 1349, 1350, 1351, 1352, 1353, 1354, 1359, 1368, 1369, + 1374, 1375 }; #endif @@ -895,9 +896,9 @@ static const char *const yytname[] = "show_statement", "create_statement", "opt_not_exists", "table_elem_commalist", "table_elem", "column_def", "column_type", "opt_time_specification", "opt_decimal_specification", - "opt_column_constraints", "column_constraint", "table_constraint", - "drop_statement", "opt_exists", "alter_statement", "alter_action", - "drop_action", "delete_statement", "truncate_statement", + "opt_column_constraints", "column_constraint_list", "column_constraint", + "table_constraint", "drop_statement", "opt_exists", "alter_statement", + "alter_action", "drop_action", "delete_statement", "truncate_statement", "insert_statement", "opt_column_list", "update_statement", "update_clause_commalist", "update_clause", "select_statement", "select_within_set_operation", @@ -954,12 +955,12 @@ static const yytype_int16 yytoknum[] = }; #endif -#define YYPACT_NINF (-405) +#define YYPACT_NINF (-436) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF (-288) +#define YYTABLE_NINF (-289) #define yytable_value_is_error(Yyn) \ ((Yyn) == YYTABLE_NINF) @@ -968,60 +969,60 @@ static const yytype_int16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - 572, 85, 65, 133, 214, 65, 116, 130, 144, 147, - 65, 176, 65, 126, 24, 254, 122, 122, 122, 267, - 109, -405, 189, -405, 189, -405, -405, -405, -405, -405, - -405, -405, -405, -405, -405, -405, -405, -29, -405, 281, - 118, -405, 132, 209, -405, 178, 178, 178, 65, 303, - 65, 192, -405, 196, -61, 196, 196, 196, 65, -405, - 210, 180, -405, -405, -405, -405, -405, -405, 567, -405, - 251, -405, -405, 237, -29, 46, -405, 48, -405, 358, - 20, 362, 255, 371, 65, 65, 299, -405, 292, 220, - 385, 344, 65, 387, 387, 389, 65, 65, -405, 226, - 254, -405, 227, 390, 383, 229, 230, -405, -405, -405, - -29, 287, 276, -29, 60, -405, -405, -405, -405, 398, - -405, -405, -405, -405, 239, 240, -405, -405, -405, -405, - -405, -405, -405, -405, -405, -405, 365, -405, 284, -63, - 220, 270, -405, 387, 412, -15, 268, -55, -405, -405, - 328, 311, -405, 311, -405, -405, -405, -405, -405, -405, - 421, -405, -405, 270, -405, -405, 352, -405, -405, 46, - -405, -405, 270, 352, 270, 165, -405, -405, -405, 20, - -405, 65, 428, 321, 43, 310, 40, 269, 272, 286, - 266, 359, 290, 374, -405, 34, 149, 410, -405, -405, - -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, - -405, -405, -405, -405, 338, -405, -10, 297, -405, 270, - 385, -405, 418, -405, -405, 409, -405, -405, 300, 115, - -405, 366, 295, -405, 42, 60, -29, 298, -405, 99, - 60, 149, 414, -25, -405, 306, 378, -405, 701, 355, - 309, 123, -405, -405, -405, 321, 23, 14, 423, 190, - 270, 270, 128, -28, 314, 374, 603, 270, 158, 315, - -58, 270, 270, 374, -405, 374, -26, 317, 161, 374, - 374, 374, 374, 374, 374, 374, 374, 374, 374, 374, - 374, 374, 374, 374, 390, 65, -405, 475, 20, 149, - -405, 196, 303, 20, -405, 421, 15, 299, -405, 270, - -405, 479, -405, -405, -405, -405, 270, -405, -405, -405, - -405, 270, 270, 412, 387, -405, 455, -405, 319, 320, - -405, -405, 322, -405, -405, -405, -405, 323, -405, 69, - 324, 412, -405, 43, -405, -405, 270, -405, -405, 327, - -405, -405, -405, -405, -405, -405, 403, 3, -38, 108, - 270, 270, -405, 423, 397, -66, -405, -405, -405, 384, - 546, 622, 374, 332, 34, -405, 400, 335, 622, 622, - 622, 622, 289, 289, 289, 289, 158, 158, 66, 66, - 66, -68, 339, -405, -405, 167, 18, -405, 168, -405, - 321, -405, 162, -405, 333, -405, 33, -405, 437, -405, - -405, -405, 149, 149, 172, -405, 341, 503, -405, 505, - 506, 507, -405, 395, -405, -405, 417, 69, -405, 412, - 173, -405, 177, -405, 270, 701, 270, 270, -405, 131, - 120, 347, -405, 374, 622, 34, 353, 181, -405, -405, - -405, 354, -405, -405, 357, 424, -405, -405, -405, 450, - 451, 452, 434, 15, 532, -405, -405, -405, 411, -405, - -405, 533, 187, 372, 375, 379, -405, -405, -405, 188, - -405, -405, -56, 380, 149, 134, -405, 270, -405, 603, - 381, 199, -405, -405, 33, 15, -405, -405, -405, 15, - 211, 386, 270, 382, -405, 536, -405, -405, -405, -405, - -405, -405, -405, 149, -405, -405, -405, -405, 394, 412, - -6, -405, 388, 396, 270, 200, 270, -405, -405, 18, - 149, -405, -405, 149, 408, -405 + 533, 26, 41, 67, 169, 41, -42, 80, 102, 100, + 41, 127, 41, 144, 43, 207, 72, 72, 72, 233, + 65, -436, 147, -436, 147, -436, -436, -436, -436, -436, + -436, -436, -436, -436, -436, -436, -436, -32, -436, 259, + 106, -436, 97, 199, -436, 145, 145, 145, 41, 282, + 41, 177, -436, 167, -20, 167, 167, 167, 41, -436, + 179, 139, -436, -436, -436, -436, -436, -436, 502, -436, + 215, -436, -436, 193, -32, 47, -436, 33, -436, 319, + 75, 325, 210, 347, 41, 41, 277, -436, 272, 203, + 371, 330, 41, 372, 372, 379, 41, 41, -436, 218, + 207, -436, 220, 382, 378, 223, 224, -436, -436, -436, + -32, 284, 276, -32, -9, -436, -436, -436, -436, 398, + -436, -436, -436, -436, 235, 234, -436, -436, -436, -436, + -436, -436, -436, -436, -436, -436, 359, -436, 279, -66, + 203, 278, -436, 372, 403, -17, 260, -39, -436, -436, + 320, 302, -436, 302, -436, -436, -436, -436, -436, -436, + 411, -436, -436, 278, -436, -436, 339, -436, -436, 47, + -436, -436, 278, 339, 278, 79, -436, -436, -436, 75, + -436, 41, 415, 308, 44, 303, -119, 261, 263, 264, + 185, 309, 267, 419, -436, 274, -8, 336, -436, -436, + -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, + -436, -436, -436, -436, 329, -436, 36, 268, -436, 278, + 371, -436, 401, -436, -436, 392, -436, -436, 280, 118, + -436, 350, 273, -436, 113, -9, -32, 283, -436, -21, + -9, -8, 394, -24, -436, 286, 357, -436, 699, 338, + 288, 136, -436, -436, -436, 308, 6, 17, 402, 196, + 278, 278, 135, 77, 291, 419, 555, 278, 94, 292, + 82, 278, 278, 419, -436, 419, 11, 294, 105, 419, + 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, + 419, 419, 419, 419, 382, 41, -436, 459, 75, -8, + -436, 167, 282, 75, -436, 411, 16, 277, -436, 278, + -436, 464, -436, -436, -436, -436, 278, -436, -436, -436, + -436, 278, 278, 403, 372, -436, 443, -436, 307, 311, + -436, -436, 312, -436, -436, -436, -436, 313, -436, 14, + 315, 403, -436, 44, -436, -436, 278, -436, -436, 321, + -436, -436, -436, -436, -436, -436, 390, -16, 95, 151, + 278, 278, -436, 402, 375, 34, -436, -436, -436, 376, + 536, 466, 419, 326, 274, -436, 397, 340, 466, 466, + 466, 466, 593, 593, 593, 593, 94, 94, 2, 2, + 2, -1, 341, -436, -436, 138, 19, -436, 170, -436, + 308, -436, -2, -436, 333, -436, 18, -436, 439, -436, + -436, -436, -8, -8, 171, -436, 343, 505, -436, 506, + 507, 508, -436, 396, -436, -436, 413, -436, 14, -436, + 403, 172, -436, 178, -436, 278, 699, 278, 278, -436, + 160, 156, 352, -436, 419, 466, 274, 353, 180, -436, + -436, -436, 356, -436, -436, 358, 429, -436, -436, -436, + 454, 455, 457, 437, 16, 534, -436, -436, -436, 418, + -436, -436, 530, 192, 377, 381, 388, -436, -436, -436, + 198, -436, -436, 84, 389, -8, 186, -436, 278, -436, + 555, 395, 200, -436, -436, 18, 16, -436, -436, -436, + 16, 301, 380, 278, 400, -436, 538, -436, -436, -436, + -436, -436, -436, -436, -8, -436, -436, -436, -436, 452, + 403, -11, -436, 406, 383, 278, 212, 278, -436, -436, + 19, -8, -436, -436, -8, 407, -436 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -1029,77 +1030,77 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_int16 yydefact[] = { - 268, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 269, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 30, 30, 0, - 288, 3, 21, 19, 21, 18, 8, 9, 7, 11, - 16, 17, 13, 14, 12, 15, 10, 0, 267, 0, - 254, 95, 33, 0, 44, 51, 51, 51, 0, 0, - 0, 0, 253, 90, 0, 90, 90, 90, 0, 42, - 0, 269, 270, 29, 26, 28, 27, 1, 268, 2, - 0, 6, 5, 143, 0, 104, 105, 135, 87, 0, - 153, 0, 0, 257, 0, 0, 129, 37, 0, 99, + 289, 3, 21, 19, 21, 18, 8, 9, 7, 11, + 16, 17, 13, 14, 12, 15, 10, 0, 268, 0, + 255, 96, 33, 0, 44, 51, 51, 51, 0, 0, + 0, 0, 254, 91, 0, 91, 91, 91, 0, 42, + 0, 270, 271, 29, 26, 28, 27, 1, 269, 2, + 0, 6, 5, 144, 0, 105, 106, 136, 88, 0, + 154, 0, 0, 258, 0, 0, 130, 37, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, - 0, 4, 0, 0, 123, 0, 0, 117, 118, 116, - 0, 120, 0, 0, 149, 255, 235, 238, 240, 0, - 241, 236, 237, 243, 0, 152, 154, 229, 230, 231, - 239, 232, 233, 234, 32, 31, 0, 256, 0, 0, - 99, 0, 94, 0, 0, 0, 0, 129, 101, 89, - 0, 40, 38, 40, 258, 88, 85, 86, 272, 271, - 0, 142, 122, 0, 112, 111, 135, 108, 107, 109, - 119, 115, 0, 135, 0, 0, 113, 242, 34, 0, - 50, 0, 0, 268, 0, 0, 225, 0, 0, 0, - 0, 0, 0, 0, 227, 0, 128, 157, 164, 165, - 166, 159, 161, 167, 160, 180, 168, 169, 170, 171, - 163, 158, 173, 174, 0, 289, 0, 0, 97, 0, - 0, 100, 0, 91, 92, 0, 36, 41, 24, 0, - 22, 126, 124, 150, 266, 149, 0, 134, 136, 141, - 149, 145, 147, 144, 155, 0, 0, 47, 0, 0, - 0, 0, 52, 54, 55, 268, 123, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 176, 0, 175, 0, - 0, 0, 0, 0, 177, 0, 0, 0, 0, 0, + 0, 4, 0, 0, 124, 0, 0, 118, 119, 117, + 0, 121, 0, 0, 150, 256, 236, 239, 241, 0, + 242, 237, 238, 244, 0, 153, 155, 230, 231, 232, + 240, 233, 234, 235, 32, 31, 0, 257, 0, 0, + 100, 0, 95, 0, 0, 0, 0, 130, 102, 90, + 0, 40, 38, 40, 259, 89, 86, 87, 273, 272, + 0, 143, 123, 0, 113, 112, 136, 109, 108, 110, + 120, 116, 0, 136, 0, 0, 114, 243, 34, 0, + 50, 0, 0, 269, 0, 0, 226, 0, 0, 0, + 0, 0, 0, 0, 228, 0, 129, 158, 165, 166, + 167, 160, 162, 168, 161, 181, 169, 170, 171, 172, + 164, 159, 174, 175, 0, 290, 0, 0, 98, 0, + 0, 101, 0, 92, 93, 0, 36, 41, 24, 0, + 22, 127, 125, 151, 267, 150, 0, 135, 137, 142, + 150, 146, 148, 145, 156, 0, 0, 47, 0, 0, + 0, 0, 52, 54, 55, 269, 124, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 177, 0, 176, 0, + 0, 0, 0, 0, 178, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 98, 0, 0, 103, - 102, 90, 0, 0, 20, 0, 0, 129, 125, 0, - 264, 0, 265, 156, 106, 110, 0, 140, 139, 138, - 114, 0, 0, 0, 0, 58, 0, 63, 75, 0, - 62, 60, 0, 70, 69, 59, 67, 72, 57, 78, - 0, 0, 46, 0, 49, 212, 0, 226, 228, 0, - 216, 217, 218, 219, 220, 221, 0, 0, 0, 0, - 0, 0, 199, 0, 0, 0, 172, 162, 191, 192, - 0, 187, 0, 0, 0, 178, 0, 190, 189, 205, - 206, 207, 208, 209, 210, 211, 182, 181, 184, 183, - 185, 186, 0, 35, 290, 0, 0, 39, 0, 23, - 268, 127, 244, 246, 0, 248, 262, 247, 131, 151, - 263, 137, 148, 146, 0, 45, 0, 0, 61, 0, - 0, 0, 68, 0, 80, 81, 0, 56, 76, 0, - 0, 53, 0, 203, 0, 0, 0, 0, 197, 0, - 0, 0, 222, 0, 188, 0, 0, 0, 179, 223, - 96, 225, 93, 25, 0, 0, 284, 276, 282, 280, - 283, 278, 0, 0, 0, 261, 252, 259, 0, 121, - 48, 0, 0, 0, 0, 0, 79, 82, 77, 0, - 84, 213, 0, 0, 201, 0, 200, 0, 204, 224, - 0, 0, 195, 193, 262, 0, 279, 281, 277, 0, - 245, 263, 0, 0, 74, 0, 64, 66, 71, 83, - 214, 215, 198, 202, 196, 194, 249, 273, 285, 0, - 133, 65, 0, 0, 0, 0, 0, 130, 73, 0, - 286, 274, 260, 132, 0, 275 + 0, 0, 0, 0, 0, 0, 99, 0, 0, 104, + 103, 91, 0, 0, 20, 0, 0, 130, 126, 0, + 265, 0, 266, 157, 107, 111, 0, 141, 140, 139, + 115, 0, 0, 0, 0, 58, 0, 63, 75, 0, + 62, 60, 0, 70, 69, 59, 67, 72, 57, 77, + 0, 0, 46, 0, 49, 213, 0, 227, 229, 0, + 217, 218, 219, 220, 221, 222, 0, 0, 0, 0, + 0, 0, 200, 0, 0, 0, 173, 163, 192, 193, + 0, 188, 0, 0, 0, 179, 0, 191, 190, 206, + 207, 208, 209, 210, 211, 212, 183, 182, 185, 184, + 186, 187, 0, 35, 291, 0, 0, 39, 0, 23, + 269, 128, 245, 247, 0, 249, 263, 248, 132, 152, + 264, 138, 149, 147, 0, 45, 0, 0, 61, 0, + 0, 0, 68, 0, 81, 82, 0, 56, 76, 78, + 0, 0, 53, 0, 204, 0, 0, 0, 0, 198, + 0, 0, 0, 223, 0, 189, 0, 0, 0, 180, + 224, 97, 226, 94, 25, 0, 0, 285, 277, 283, + 281, 284, 279, 0, 0, 0, 262, 253, 260, 0, + 122, 48, 0, 0, 0, 0, 0, 80, 83, 79, + 0, 85, 214, 0, 0, 202, 0, 201, 0, 205, + 225, 0, 0, 196, 194, 263, 0, 280, 282, 278, + 0, 246, 264, 0, 0, 74, 0, 64, 66, 71, + 84, 215, 216, 199, 203, 197, 195, 250, 274, 286, + 0, 134, 65, 0, 0, 0, 0, 0, 131, 73, + 0, 287, 275, 261, 133, 0, 276 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -405, -405, -405, 483, -405, 528, -405, 249, -405, 142, - -405, -405, -405, -405, 253, -81, 404, -405, -405, -405, - 169, -405, 221, -405, 143, -405, -405, -405, 150, -405, - -405, -47, -405, -405, -405, -405, -405, -405, 440, -405, - -405, 361, -178, -72, -405, 10, -73, -54, -405, -405, - -46, 329, -405, -405, -405, -128, -405, -405, 31, -405, - 274, -405, -405, -32, -261, -405, -45, 275, -141, -140, - -405, -405, -405, -405, -405, -405, 326, -405, -405, -405, - -405, -405, -405, -405, -405, -405, -374, -77, -78, -405, - -405, -92, -405, -405, -405, -405, -404, 88, -405, -405, - -405, 2, -405, -405, -405, 92, 363, -405, -405, -405, - -405, 491, -405, -405, -405, -405, -321 + -436, -436, -436, 490, -436, 541, -436, 255, -436, 123, + -436, -436, -436, -436, 269, -83, 417, -436, -436, -436, + 124, -436, 237, -436, 140, -436, -436, -436, -436, 149, + -436, -436, -53, -436, -436, -436, -436, -436, -436, 441, + -436, -436, 363, -166, -77, -436, 29, -73, -51, -436, + -436, -75, 331, -436, -436, -436, -131, -436, -436, 28, + -436, 281, -436, -436, 25, -260, -436, -30, 287, -141, + -136, -436, -436, -436, -436, -436, -436, 328, -436, -436, + -436, -436, -436, -436, -436, -436, -436, -372, -74, -84, + -436, -436, -91, -436, -436, -436, -436, -435, 103, -436, + -436, -436, 3, -436, -436, -436, 98, 368, -436, -436, + -436, -436, 503, -436, -436, -436, -436, -309 }; /* YYDEFGOTO[NTERM-NUM]. */ @@ -1107,16 +1108,16 @@ static const yytype_int16 yydefgoto[] = { 0, 19, 20, 21, 22, 71, 229, 230, 23, 64, 24, 135, 25, 26, 88, 151, 226, 27, 28, 29, - 83, 251, 252, 253, 339, 422, 418, 427, 428, 254, - 30, 92, 31, 223, 224, 32, 33, 34, 145, 35, - 147, 148, 36, 166, 167, 168, 76, 110, 111, 171, - 77, 163, 231, 307, 308, 142, 469, 527, 114, 237, - 238, 319, 104, 176, 232, 124, 125, 233, 234, 197, - 198, 199, 200, 201, 202, 203, 263, 204, 205, 206, - 207, 208, 356, 209, 210, 211, 212, 213, 127, 128, - 129, 130, 131, 132, 133, 401, 402, 403, 404, 405, - 51, 406, 138, 155, 465, 466, 467, 313, 37, 38, - 61, 62, 407, 462, 531, 69, 216 + 83, 251, 252, 253, 339, 422, 418, 427, 428, 429, + 254, 30, 92, 31, 223, 224, 32, 33, 34, 145, + 35, 147, 148, 36, 166, 167, 168, 76, 110, 111, + 171, 77, 163, 231, 307, 308, 142, 470, 528, 114, + 237, 238, 319, 104, 176, 232, 124, 125, 233, 234, + 197, 198, 199, 200, 201, 202, 203, 263, 204, 205, + 206, 207, 208, 356, 209, 210, 211, 212, 213, 127, + 128, 129, 130, 131, 132, 133, 401, 402, 403, 404, + 405, 51, 406, 138, 155, 466, 467, 468, 313, 37, + 38, 61, 62, 407, 463, 532, 69, 216 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1124,174 +1125,174 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 196, 106, 414, 126, 41, 247, 365, 44, 95, 96, - 97, 161, 52, 153, 54, 152, 152, 347, 40, 221, - 430, 451, 452, 113, 116, 117, 118, 141, 73, 322, - 182, 239, 93, 241, 243, 162, 310, 186, 116, 117, - 118, 173, 73, 58, 526, 310, 248, 75, 217, 262, - 86, 266, 89, 268, 270, 107, 271, 107, 271, 500, - 98, 183, 214, 360, 169, 152, 279, 169, 40, 436, - 249, 94, 218, 272, 372, 272, 271, 344, 299, 187, - 188, 189, 361, 59, 105, 432, 139, 140, 362, 271, - 108, 73, 108, 272, 150, 518, 423, 294, 156, 157, - 442, 373, 244, 250, 184, 309, 272, 119, 479, 158, - 367, 39, 510, 447, 174, 236, 220, 271, 190, 357, - 358, 119, 269, 120, 112, 266, 109, 435, 109, 424, - 368, 369, 175, 370, 272, 371, 42, 120, 74, 377, - 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, - 388, 389, 390, 391, 191, 534, 271, 464, 296, 65, - 66, 297, 121, 122, 315, 309, 311, 192, 186, 116, - 117, 118, 425, 272, 348, 239, 121, 122, 194, 408, - 412, 413, 400, 245, 491, 349, 45, 455, 317, 426, - 169, 345, 123, 193, 194, 46, 55, 235, 525, 437, - 279, 195, 392, 314, 240, 56, 123, 256, 320, 257, - 187, 188, 189, 271, 318, 84, 85, 43, 361, 439, - 440, 126, 454, 48, 438, 47, 126, 487, 456, 293, - 272, 294, 444, 457, 271, 57, 455, 49, 261, 458, - 459, 520, 271, 415, 50, 271, 152, 486, 271, 190, - 512, 272, 119, 395, 396, 53, 460, 60, 398, 272, - -285, 461, 272, 271, 375, 272, 63, 67, 120, 186, - 116, 117, 118, 186, 116, 117, 118, 456, 242, 68, - 272, 376, 457, 304, 78, 191, 305, 79, 458, 459, - 441, 342, 279, 482, 343, 484, 485, 393, 192, 80, - 70, 446, 81, 489, 82, 460, 87, 121, 122, -285, - 461, 187, 188, 189, 90, 187, 188, 189, 290, 291, - 292, 293, 91, 294, 193, 194, 350, 351, 352, 353, - 354, 355, 195, -250, 99, 450, 453, 123, 179, 179, - 470, 480, 274, 297, 297, 481, 513, 102, 309, 493, - 190, 100, 309, 119, 190, 504, 509, 119, 505, 297, - 103, 115, 186, 116, 117, 118, 134, 515, 532, 120, - 309, 297, 490, 120, 137, 136, 261, 186, 116, 117, - 118, 141, -251, 530, 143, 533, 191, 144, 146, 149, - 191, 116, 154, 74, 160, 162, 118, 164, 165, 192, - 170, 172, 177, 192, 264, 188, 189, 178, 121, 122, - 180, 179, 121, 122, 181, 215, 219, 278, 222, 455, - 188, 189, 225, 279, 228, 193, 194, 273, 112, 193, - 194, 246, 15, 195, 255, 295, 258, 195, 123, 259, - -288, -288, 123, 190, -288, -288, 119, 288, 289, 290, - 291, 292, 293, 260, 294, 267, 301, 302, 190, 306, - 456, 119, 120, 274, 298, 457, 309, 303, 321, 316, - 324, 458, 459, 323, 340, 523, 341, 120, 394, 265, - 73, 363, 410, 366, 374, 416, 417, 419, 460, 420, - 421, 429, 192, 461, 265, 433, 434, 372, 271, 445, - 294, 121, 122, 448, 463, 449, 468, 192, 471, 472, - 275, 473, 474, 475, 476, 488, 121, 122, 193, 194, - 477, 492, 495, 257, 524, 494, 195, 496, 497, 498, - 276, 123, 499, 193, 194, 501, 502, 277, 278, 503, - 506, 195, 522, 507, 279, 280, 123, 508, 511, 514, - 521, 101, 72, 519, 399, 397, 528, 227, 281, 282, - 283, 284, 285, 529, 431, 286, 287, -287, 288, 289, - 290, 291, 292, 293, 1, 294, 535, 478, 483, 1, - 185, 300, 2, 517, 409, 346, 516, 2, 359, 3, - 411, 159, 0, 4, 3, 0, 0, 312, 4, 274, - 0, 0, 0, 5, 0, 0, 6, 7, 5, 0, - 0, 6, 7, 0, 0, 0, 0, 0, 8, 9, - 0, 0, 0, 8, 9, 0, 0, 0, 0, 10, - 0, 0, 11, 0, 10, 0, 0, 11, 0, 0, - 0, 0, 0, 0, 0, 0, 275, 0, 0, 0, - 0, 0, 0, 12, 0, 0, 274, 13, 12, 0, - 443, 0, 13, 0, 0, 0, 364, 0, 0, 0, - 0, 0, 14, 0, 278, 274, 0, 14, 15, 0, - 279, 280, 0, 15, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 281, 282, 283, 284, 285, 0, - 0, 286, 287, 275, 288, 289, 290, 291, 292, 293, - 0, 294, 16, 17, 18, 0, 0, 16, 17, 18, - 0, 0, -288, 364, 0, 325, 0, 0, 0, 0, - 326, 278, 327, 328, 0, 329, 0, 279, 280, 0, - 0, 0, 0, 330, 0, 0, 0, 0, 0, 0, - 278, 281, 282, 283, 284, 285, 279, -288, 286, 287, - 0, 288, 289, 290, 291, 292, 293, 0, 294, 331, - -288, -288, -288, 284, 285, 0, 0, 286, 287, 0, - 288, 289, 290, 291, 292, 293, 332, 294, 333, 334, + 196, 106, 95, 96, 97, 41, 126, 365, 44, 152, + 152, 153, 161, 52, 414, 54, 221, 247, 162, 40, + 347, 310, 452, 456, 453, 73, 113, 182, 45, 501, + 322, 239, 431, 241, 243, 169, 173, 46, 169, 527, + 73, 423, 107, 141, 40, 174, 217, 248, 256, 262, + 257, 86, 39, 89, 270, 266, 107, 268, 183, 152, + 214, 98, 58, 175, 457, 519, 75, 47, 317, 458, + 42, 249, 218, 93, 424, 459, 460, 108, 299, 116, + 117, 118, 186, 116, 117, 118, 433, 139, 140, 344, + 271, 108, 461, 271, 318, 150, -286, 462, 271, 156, + 157, 184, 59, 105, 250, 244, 271, 272, 436, 112, + 272, 372, 94, 109, 448, 272, 310, 425, 236, 357, + 358, 480, 269, 272, 187, 188, 189, 109, 158, 266, + 368, 369, 220, 279, 426, 74, 279, 370, 373, 371, + 65, 66, 465, 377, 378, 379, 380, 381, 382, 383, + 384, 385, 386, 387, 388, 389, 390, 391, 535, 315, + 309, 169, 119, 190, 294, 293, 119, 294, 360, -251, + 84, 85, 43, 48, 345, 239, 408, 348, 120, 194, + 412, 413, 120, 400, 245, 349, 492, 361, 186, 116, + 117, 118, 242, 362, 235, 49, 271, 50, 271, 191, + 443, 240, 437, 392, 296, 309, 53, 297, 375, 271, + 60, 526, 192, 272, 55, 272, 63, 121, 122, 440, + 441, 121, 122, 56, 126, 376, 272, 271, 279, 126, + 187, 188, 189, 67, 455, 68, 445, 311, 193, 194, + 152, 415, 438, 521, 272, 261, 195, 123, 396, 271, + 367, 123, 511, 57, 290, 291, 292, 293, 70, 294, + 314, 361, 78, 488, 80, 320, 272, 439, 395, 190, + 271, 82, 119, 398, 271, 79, 487, 186, 116, 117, + 118, 186, 116, 117, 118, 87, 304, 272, 120, 305, + 442, 272, 81, 91, 483, 261, 485, 486, 393, 90, + 271, 447, 513, 99, 342, 191, 451, 343, 490, 179, + 100, 102, 186, 116, 117, 118, 103, 272, 192, 187, + 188, 189, 115, 187, 188, 189, 456, 121, 122, 134, + 136, 73, 350, 351, 352, 353, 354, 355, 454, 471, + 481, 179, 297, 297, 193, 194, 482, 514, 494, 309, + 137, 309, 195, 273, 264, 188, 189, 123, 190, 141, + 505, 119, 190, 506, 143, 119, 510, 457, 516, 297, + 144, 309, 458, 491, 146, 149, 116, 120, 459, 460, + 533, 120, 154, 297, 531, 74, 534, 160, 118, 274, + 162, 164, 165, 190, 191, 461, 119, 170, 191, -286, + 462, 172, 177, 178, 180, 179, 215, 192, 219, 181, + 222, 192, 120, 225, 228, 112, 121, 122, 246, 15, + 121, 122, 186, 116, 117, 118, 295, 255, 258, 265, + 259, 260, 267, 193, 194, 298, 275, 193, 194, 301, + 302, 195, 192, 306, 309, 195, 123, 303, 321, 324, + 123, 121, 122, 323, 316, 341, 276, 340, 363, 73, + 366, 374, 394, 277, 278, 188, 189, 410, 193, 194, + 279, 280, -252, 416, 417, 372, 195, 456, 419, 420, + 421, 123, 430, 435, 281, 282, 283, 284, 285, 434, + 271, 286, 287, 446, 288, 289, 290, 291, 292, 293, + 449, 294, -288, 190, 464, 294, 119, 450, 469, 1, + 472, 473, 474, 475, 476, 477, 478, 2, 457, 274, + 489, 493, 120, 458, 3, 257, 495, 496, 4, 459, + 460, 497, 498, 524, 499, 500, 504, 502, 5, 265, + 1, 6, 7, 503, 523, 507, 461, 520, 2, 508, + 530, 462, 192, 8, 9, 3, 509, 512, 101, 4, + 399, 121, 122, 515, 10, 72, -289, 11, 522, 5, + 227, 397, 6, 7, 529, 536, 484, 479, 193, 194, + 432, 185, 525, 300, 8, 9, 195, 346, 12, 274, + 359, 123, 13, 517, 278, 10, 409, 411, 11, 518, + 279, -289, 312, 159, 0, 0, 0, 14, 274, 0, + 0, 0, 0, 15, -289, -289, -289, 284, 285, 12, + 0, 286, 287, 13, 288, 289, 290, 291, 292, 293, + 0, 294, 0, 0, 0, 0, 275, 0, 14, 0, + 0, 0, 0, 0, 15, 0, 274, 16, 17, 18, + 444, 0, 0, 0, 0, 275, 364, 0, 0, 0, + 0, 0, 0, 0, 278, 0, 0, 0, 0, 0, + 279, 280, 0, 0, 0, 364, 0, 0, 16, 17, + 18, 0, 0, 278, 281, 282, 283, 284, 285, 279, + 280, 286, 287, 0, 288, 289, 290, 291, 292, 293, + 0, 294, 0, 281, 282, 283, 284, 285, 0, 0, + 286, 287, 0, 288, 289, 290, 291, 292, 293, 0, + 294, 278, 0, 325, 0, 0, 0, 279, 326, 0, + 327, 328, 0, 329, 0, 0, 0, 0, 0, 0, + 0, 330, 0, 0, -289, -289, 0, 0, -289, -289, + 0, 288, 289, 290, 291, 292, 293, 0, 294, 0, + 0, 0, 0, 0, 0, 0, 0, 331, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 332, 0, 333, 334, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 335, 0, 0, 0, 336, 0, 337, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 338 + 0, 335, 0, 0, 0, 336, 0, 337, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 338 }; static const yytype_int16 yycheck[] = { - 141, 74, 323, 80, 2, 183, 267, 5, 55, 56, - 57, 103, 10, 94, 12, 93, 94, 3, 3, 147, - 341, 3, 396, 77, 4, 5, 6, 82, 57, 54, - 93, 172, 93, 174, 175, 12, 3, 3, 4, 5, - 6, 113, 57, 19, 50, 3, 3, 37, 63, 190, - 48, 191, 50, 193, 195, 9, 114, 9, 114, 463, - 58, 124, 143, 91, 110, 143, 134, 113, 3, 107, - 27, 132, 145, 131, 100, 131, 114, 255, 219, 45, - 46, 47, 110, 59, 74, 346, 84, 85, 116, 114, - 44, 57, 44, 131, 92, 499, 27, 165, 96, 97, - 166, 127, 179, 60, 167, 171, 131, 87, 429, 99, - 168, 26, 168, 374, 54, 169, 171, 114, 84, 260, - 261, 87, 195, 103, 76, 265, 80, 124, 80, 60, - 271, 272, 72, 273, 131, 275, 3, 103, 167, 279, - 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, - 290, 291, 292, 293, 120, 529, 114, 124, 168, 17, - 18, 171, 142, 143, 236, 171, 124, 133, 3, 4, - 5, 6, 103, 131, 160, 316, 142, 143, 160, 307, - 321, 322, 167, 181, 445, 258, 70, 25, 89, 120, - 236, 168, 172, 159, 160, 79, 70, 166, 519, 91, - 134, 167, 294, 235, 173, 79, 172, 167, 240, 169, - 45, 46, 47, 114, 115, 46, 47, 3, 110, 360, - 361, 298, 400, 93, 116, 109, 303, 107, 66, 163, - 131, 165, 372, 71, 114, 109, 25, 93, 110, 77, - 78, 502, 114, 324, 97, 114, 324, 116, 114, 84, - 116, 131, 87, 298, 301, 79, 94, 3, 303, 131, - 98, 99, 131, 114, 103, 131, 144, 0, 103, 3, - 4, 5, 6, 3, 4, 5, 6, 66, 113, 170, - 131, 120, 71, 168, 3, 120, 171, 169, 77, 78, - 363, 168, 134, 434, 171, 436, 437, 295, 133, 167, - 111, 374, 93, 443, 126, 94, 3, 142, 143, 98, - 99, 45, 46, 47, 122, 45, 46, 47, 160, 161, - 162, 163, 126, 165, 159, 160, 136, 137, 138, 139, - 140, 141, 167, 171, 124, 168, 168, 172, 171, 171, - 168, 168, 53, 171, 171, 168, 487, 96, 171, 168, - 84, 171, 171, 87, 84, 168, 168, 87, 171, 171, - 123, 3, 3, 4, 5, 6, 4, 168, 168, 103, - 171, 171, 445, 103, 3, 120, 110, 3, 4, 5, - 6, 82, 171, 524, 92, 526, 120, 167, 3, 45, - 120, 4, 3, 167, 167, 12, 6, 168, 168, 133, - 113, 125, 4, 133, 45, 46, 47, 168, 142, 143, - 45, 171, 142, 143, 130, 3, 148, 128, 90, 25, - 46, 47, 111, 134, 3, 159, 160, 17, 76, 159, - 160, 3, 111, 167, 124, 97, 167, 167, 172, 167, - 151, 152, 172, 84, 155, 156, 87, 158, 159, 160, - 161, 162, 163, 167, 165, 165, 38, 48, 84, 93, - 66, 87, 103, 53, 167, 71, 171, 167, 54, 171, - 92, 77, 78, 167, 119, 81, 167, 103, 3, 120, - 57, 167, 3, 168, 167, 30, 167, 167, 94, 167, - 167, 167, 133, 99, 120, 168, 93, 100, 114, 167, - 165, 142, 143, 103, 171, 166, 69, 133, 167, 6, - 100, 6, 6, 6, 119, 168, 142, 143, 159, 160, - 103, 168, 98, 169, 130, 168, 167, 77, 77, 77, - 120, 172, 98, 159, 160, 3, 125, 127, 128, 6, - 168, 167, 6, 168, 134, 135, 172, 168, 168, 168, - 168, 68, 24, 167, 305, 302, 168, 153, 148, 149, - 150, 151, 152, 167, 343, 155, 156, 0, 158, 159, - 160, 161, 162, 163, 7, 165, 168, 427, 435, 7, - 140, 220, 15, 495, 309, 256, 494, 15, 262, 22, - 316, 100, -1, 26, 22, -1, -1, 234, 26, 53, - -1, -1, -1, 36, -1, -1, 39, 40, 36, -1, - -1, 39, 40, -1, -1, -1, -1, -1, 51, 52, - -1, -1, -1, 51, 52, -1, -1, -1, -1, 62, - -1, -1, 65, -1, 62, -1, -1, 65, -1, -1, - -1, -1, -1, -1, -1, -1, 100, -1, -1, -1, - -1, -1, -1, 86, -1, -1, 53, 90, 86, -1, - 114, -1, 90, -1, -1, -1, 120, -1, -1, -1, - -1, -1, 105, -1, 128, 53, -1, 105, 111, -1, - 134, 135, -1, 111, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 148, 149, 150, 151, 152, -1, - -1, 155, 156, 100, 158, 159, 160, 161, 162, 163, - -1, 165, 145, 146, 147, -1, -1, 145, 146, 147, - -1, -1, 100, 120, -1, 24, -1, -1, -1, -1, - 29, 128, 31, 32, -1, 34, -1, 134, 135, -1, - -1, -1, -1, 42, -1, -1, -1, -1, -1, -1, - 128, 148, 149, 150, 151, 152, 134, 135, 155, 156, - -1, 158, 159, 160, 161, 162, 163, -1, 165, 68, - 148, 149, 150, 151, 152, -1, -1, 155, 156, -1, - 158, 159, 160, 161, 162, 163, 85, 165, 87, 88, + 141, 74, 55, 56, 57, 2, 80, 267, 5, 93, + 94, 94, 103, 10, 323, 12, 147, 183, 12, 3, + 3, 3, 3, 25, 396, 57, 77, 93, 70, 464, + 54, 172, 341, 174, 175, 110, 113, 79, 113, 50, + 57, 27, 9, 82, 3, 54, 63, 3, 167, 190, + 169, 48, 26, 50, 195, 191, 9, 193, 124, 143, + 143, 58, 19, 72, 66, 500, 37, 109, 89, 71, + 3, 27, 145, 93, 60, 77, 78, 44, 219, 4, + 5, 6, 3, 4, 5, 6, 346, 84, 85, 255, + 114, 44, 94, 114, 115, 92, 98, 99, 114, 96, + 97, 167, 59, 74, 60, 179, 114, 131, 124, 76, + 131, 100, 132, 80, 374, 131, 3, 103, 169, 260, + 261, 430, 195, 131, 45, 46, 47, 80, 99, 265, + 271, 272, 171, 134, 120, 167, 134, 273, 127, 275, + 17, 18, 124, 279, 280, 281, 282, 283, 284, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 530, 236, + 171, 236, 87, 84, 165, 163, 87, 165, 91, 171, + 46, 47, 3, 93, 168, 316, 307, 160, 103, 160, + 321, 322, 103, 167, 181, 258, 446, 110, 3, 4, + 5, 6, 113, 116, 166, 93, 114, 97, 114, 120, + 166, 173, 107, 294, 168, 171, 79, 171, 103, 114, + 3, 520, 133, 131, 70, 131, 144, 142, 143, 360, + 361, 142, 143, 79, 298, 120, 131, 114, 134, 303, + 45, 46, 47, 0, 400, 170, 372, 124, 159, 160, + 324, 324, 91, 503, 131, 110, 167, 172, 301, 114, + 168, 172, 168, 109, 160, 161, 162, 163, 111, 165, + 235, 110, 3, 107, 167, 240, 131, 116, 298, 84, + 114, 126, 87, 303, 114, 169, 116, 3, 4, 5, + 6, 3, 4, 5, 6, 3, 168, 131, 103, 171, + 363, 131, 93, 126, 435, 110, 437, 438, 295, 122, + 114, 374, 116, 124, 168, 120, 168, 171, 444, 171, + 171, 96, 3, 4, 5, 6, 123, 131, 133, 45, + 46, 47, 3, 45, 46, 47, 25, 142, 143, 4, + 120, 57, 136, 137, 138, 139, 140, 141, 168, 168, + 168, 171, 171, 171, 159, 160, 168, 488, 168, 171, + 3, 171, 167, 17, 45, 46, 47, 172, 84, 82, + 168, 87, 84, 171, 92, 87, 168, 66, 168, 171, + 167, 171, 71, 446, 3, 45, 4, 103, 77, 78, + 168, 103, 3, 171, 525, 167, 527, 167, 6, 53, + 12, 168, 168, 84, 120, 94, 87, 113, 120, 98, + 99, 125, 4, 168, 45, 171, 3, 133, 148, 130, + 90, 133, 103, 111, 3, 76, 142, 143, 3, 111, + 142, 143, 3, 4, 5, 6, 97, 124, 167, 120, + 167, 167, 165, 159, 160, 167, 100, 159, 160, 38, + 48, 167, 133, 93, 171, 167, 172, 167, 54, 92, + 172, 142, 143, 167, 171, 167, 120, 119, 167, 57, + 168, 167, 3, 127, 128, 46, 47, 3, 159, 160, + 134, 135, 171, 30, 167, 100, 167, 25, 167, 167, + 167, 172, 167, 93, 148, 149, 150, 151, 152, 168, + 114, 155, 156, 167, 158, 159, 160, 161, 162, 163, + 103, 165, 0, 84, 171, 165, 87, 166, 69, 7, + 167, 6, 6, 6, 6, 119, 103, 15, 66, 53, + 168, 168, 103, 71, 22, 169, 168, 98, 26, 77, + 78, 77, 77, 81, 77, 98, 6, 3, 36, 120, + 7, 39, 40, 125, 6, 168, 94, 167, 15, 168, + 167, 99, 133, 51, 52, 22, 168, 168, 68, 26, + 305, 142, 143, 168, 62, 24, 100, 65, 168, 36, + 153, 302, 39, 40, 168, 168, 436, 428, 159, 160, + 343, 140, 130, 220, 51, 52, 167, 256, 86, 53, + 262, 172, 90, 495, 128, 62, 309, 316, 65, 496, + 134, 135, 234, 100, -1, -1, -1, 105, 53, -1, + -1, -1, -1, 111, 148, 149, 150, 151, 152, 86, + -1, 155, 156, 90, 158, 159, 160, 161, 162, 163, + -1, 165, -1, -1, -1, -1, 100, -1, 105, -1, + -1, -1, -1, -1, 111, -1, 53, 145, 146, 147, + 114, -1, -1, -1, -1, 100, 120, -1, -1, -1, + -1, -1, -1, -1, 128, -1, -1, -1, -1, -1, + 134, 135, -1, -1, -1, 120, -1, -1, 145, 146, + 147, -1, -1, 128, 148, 149, 150, 151, 152, 134, + 135, 155, 156, -1, 158, 159, 160, 161, 162, 163, + -1, 165, -1, 148, 149, 150, 151, 152, -1, -1, + 155, 156, -1, 158, 159, 160, 161, 162, 163, -1, + 165, 128, -1, 24, -1, -1, -1, 134, 29, -1, + 31, 32, -1, 34, -1, -1, -1, -1, -1, -1, + -1, 42, -1, -1, 151, 152, -1, -1, 155, 156, + -1, 158, 159, 160, 161, 162, 163, -1, 165, -1, + -1, -1, -1, -1, -1, -1, -1, 68, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 102, -1, -1, -1, 106, -1, 108, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 118 + -1, -1, -1, -1, 85, -1, 87, 88, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 102, -1, -1, -1, 106, -1, 108, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 118 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1301,57 +1302,57 @@ static const yytype_int16 yystos[] = 0, 7, 15, 22, 26, 36, 39, 40, 51, 52, 62, 65, 86, 90, 105, 111, 145, 146, 147, 174, 175, 176, 177, 181, 183, 185, 186, 190, 191, 192, - 203, 205, 208, 209, 210, 212, 215, 281, 282, 26, - 3, 274, 3, 3, 274, 70, 79, 109, 93, 93, - 97, 273, 274, 79, 274, 70, 79, 109, 19, 59, - 3, 283, 284, 144, 182, 182, 182, 0, 170, 288, - 111, 178, 178, 57, 167, 218, 219, 223, 3, 169, - 167, 93, 126, 193, 193, 193, 274, 3, 187, 274, - 122, 126, 204, 93, 132, 204, 204, 204, 274, 124, - 171, 176, 96, 123, 235, 218, 219, 9, 44, 80, - 220, 221, 76, 220, 231, 3, 4, 5, 6, 87, - 103, 142, 143, 172, 238, 239, 260, 261, 262, 263, - 264, 265, 266, 267, 4, 184, 120, 3, 275, 274, - 274, 82, 228, 92, 167, 211, 3, 213, 214, 45, - 274, 188, 261, 188, 3, 276, 274, 274, 218, 284, - 167, 264, 12, 224, 168, 168, 216, 217, 218, 223, - 113, 222, 125, 216, 54, 72, 236, 4, 168, 171, - 45, 130, 93, 124, 167, 211, 3, 45, 46, 47, - 84, 120, 133, 159, 160, 167, 241, 242, 243, 244, - 245, 246, 247, 248, 250, 251, 252, 253, 254, 256, - 257, 258, 259, 260, 188, 3, 289, 63, 219, 148, - 171, 228, 90, 206, 207, 111, 189, 189, 3, 179, - 180, 225, 237, 240, 241, 231, 220, 232, 233, 241, - 231, 241, 113, 241, 260, 274, 3, 215, 3, 27, - 60, 194, 195, 196, 202, 124, 167, 169, 167, 167, - 167, 110, 241, 249, 45, 120, 242, 165, 242, 219, - 241, 114, 131, 17, 53, 100, 120, 127, 128, 134, + 204, 206, 209, 210, 211, 213, 216, 282, 283, 26, + 3, 275, 3, 3, 275, 70, 79, 109, 93, 93, + 97, 274, 275, 79, 275, 70, 79, 109, 19, 59, + 3, 284, 285, 144, 182, 182, 182, 0, 170, 289, + 111, 178, 178, 57, 167, 219, 220, 224, 3, 169, + 167, 93, 126, 193, 193, 193, 275, 3, 187, 275, + 122, 126, 205, 93, 132, 205, 205, 205, 275, 124, + 171, 176, 96, 123, 236, 219, 220, 9, 44, 80, + 221, 222, 76, 221, 232, 3, 4, 5, 6, 87, + 103, 142, 143, 172, 239, 240, 261, 262, 263, 264, + 265, 266, 267, 268, 4, 184, 120, 3, 276, 275, + 275, 82, 229, 92, 167, 212, 3, 214, 215, 45, + 275, 188, 262, 188, 3, 277, 275, 275, 219, 285, + 167, 265, 12, 225, 168, 168, 217, 218, 219, 224, + 113, 223, 125, 217, 54, 72, 237, 4, 168, 171, + 45, 130, 93, 124, 167, 212, 3, 45, 46, 47, + 84, 120, 133, 159, 160, 167, 242, 243, 244, 245, + 246, 247, 248, 249, 251, 252, 253, 254, 255, 257, + 258, 259, 260, 261, 188, 3, 290, 63, 220, 148, + 171, 229, 90, 207, 208, 111, 189, 189, 3, 179, + 180, 226, 238, 241, 242, 232, 221, 233, 234, 242, + 232, 242, 113, 242, 261, 275, 3, 216, 3, 27, + 60, 194, 195, 196, 203, 124, 167, 169, 167, 167, + 167, 110, 242, 250, 45, 120, 243, 165, 243, 220, + 242, 114, 131, 17, 53, 100, 120, 127, 128, 134, 135, 148, 149, 150, 151, 152, 155, 156, 158, 159, - 160, 161, 162, 163, 165, 97, 168, 171, 167, 241, - 214, 38, 48, 167, 168, 171, 93, 226, 227, 171, - 3, 124, 279, 280, 236, 216, 171, 89, 115, 234, - 236, 54, 54, 167, 92, 24, 29, 31, 32, 34, + 160, 161, 162, 163, 165, 97, 168, 171, 167, 242, + 215, 38, 48, 167, 168, 171, 93, 227, 228, 171, + 3, 124, 280, 281, 237, 217, 171, 89, 115, 235, + 237, 54, 54, 167, 92, 24, 29, 31, 32, 34, 42, 68, 85, 87, 88, 102, 106, 108, 118, 197, - 119, 167, 168, 171, 215, 168, 224, 3, 160, 219, - 136, 137, 138, 139, 140, 141, 255, 241, 241, 249, - 91, 110, 116, 167, 120, 237, 168, 168, 241, 241, - 242, 242, 100, 127, 167, 103, 120, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 264, 274, 3, 239, 204, 187, 239, 180, - 167, 268, 269, 270, 271, 272, 274, 285, 228, 240, - 3, 233, 241, 241, 289, 188, 30, 167, 199, 167, - 167, 167, 198, 27, 60, 103, 120, 200, 201, 167, - 289, 195, 237, 168, 93, 124, 107, 91, 116, 241, - 241, 219, 166, 114, 242, 167, 219, 237, 103, 166, - 168, 3, 259, 168, 215, 25, 66, 71, 77, 78, - 94, 99, 286, 171, 124, 277, 278, 279, 69, 229, - 168, 167, 6, 6, 6, 6, 119, 103, 201, 289, - 168, 168, 241, 197, 241, 241, 116, 107, 168, 242, - 219, 237, 168, 168, 168, 98, 77, 77, 77, 98, - 269, 3, 125, 6, 168, 171, 168, 168, 168, 168, - 168, 168, 116, 241, 168, 168, 278, 270, 269, 167, - 237, 168, 6, 81, 130, 289, 50, 230, 168, 167, - 241, 287, 168, 241, 259, 168 + 119, 167, 168, 171, 216, 168, 225, 3, 160, 220, + 136, 137, 138, 139, 140, 141, 256, 242, 242, 250, + 91, 110, 116, 167, 120, 238, 168, 168, 242, 242, + 243, 243, 100, 127, 167, 103, 120, 243, 243, 243, + 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, + 243, 243, 265, 275, 3, 240, 205, 187, 240, 180, + 167, 269, 270, 271, 272, 273, 275, 286, 229, 241, + 3, 234, 242, 242, 290, 188, 30, 167, 199, 167, + 167, 167, 198, 27, 60, 103, 120, 200, 201, 202, + 167, 290, 195, 238, 168, 93, 124, 107, 91, 116, + 242, 242, 220, 166, 114, 243, 167, 220, 238, 103, + 166, 168, 3, 260, 168, 216, 25, 66, 71, 77, + 78, 94, 99, 287, 171, 124, 278, 279, 280, 69, + 230, 168, 167, 6, 6, 6, 6, 119, 103, 202, + 290, 168, 168, 242, 197, 242, 242, 116, 107, 168, + 243, 220, 238, 168, 168, 168, 98, 77, 77, 77, + 98, 270, 3, 125, 6, 168, 171, 168, 168, 168, + 168, 168, 168, 116, 242, 168, 168, 279, 271, 270, + 167, 238, 168, 6, 81, 130, 290, 50, 231, 168, + 167, 242, 288, 168, 242, 260, 168 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ @@ -1364,29 +1365,29 @@ static const yytype_int16 yyr1[] = 189, 190, 191, 191, 191, 192, 192, 192, 192, 192, 193, 193, 194, 194, 195, 195, 196, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 198, 198, 199, 199, 199, 200, 200, 200, 201, - 201, 201, 201, 202, 202, 203, 203, 203, 203, 204, - 204, 205, 206, 207, 208, 209, 210, 210, 211, 211, - 212, 213, 213, 214, 215, 215, 215, 216, 216, 217, - 217, 218, 218, 219, 219, 220, 221, 221, 221, 222, - 222, 223, 224, 224, 225, 226, 226, 227, 228, 228, - 229, 229, 230, 230, 231, 231, 232, 232, 233, 234, - 234, 234, 235, 235, 236, 236, 236, 236, 236, 236, - 237, 237, 238, 238, 239, 239, 240, 241, 241, 241, - 241, 241, 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 243, 243, 244, 244, 244, 244, 244, - 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, - 245, 246, 246, 247, 247, 247, 247, 248, 248, 248, - 248, 249, 249, 250, 250, 251, 251, 251, 251, 251, - 251, 251, 252, 252, 253, 254, 255, 255, 255, 255, - 255, 255, 256, 257, 258, 259, 259, 259, 259, 260, - 260, 260, 260, 260, 260, 261, 262, 262, 263, 263, - 264, 265, 266, 267, 268, 268, 269, 269, 270, 270, - 271, 271, 272, 273, 274, 274, 275, 275, 276, 277, - 277, 278, 278, 279, 279, 280, 280, 281, 281, 282, - 283, 283, 284, 285, 285, 285, 286, 286, 286, 286, - 286, 286, 286, 286, 286, 286, 287, 288, 288, 289, - 289 + 197, 198, 198, 199, 199, 199, 200, 200, 201, 201, + 202, 202, 202, 202, 203, 203, 204, 204, 204, 204, + 205, 205, 206, 207, 208, 209, 210, 211, 211, 212, + 212, 213, 214, 214, 215, 216, 216, 216, 217, 217, + 218, 218, 219, 219, 220, 220, 221, 222, 222, 222, + 223, 223, 224, 225, 225, 226, 227, 227, 228, 229, + 229, 230, 230, 231, 231, 232, 232, 233, 233, 234, + 235, 235, 235, 236, 236, 237, 237, 237, 237, 237, + 237, 238, 238, 239, 239, 240, 240, 241, 242, 242, + 242, 242, 242, 243, 243, 243, 243, 243, 243, 243, + 243, 243, 243, 243, 244, 244, 245, 245, 245, 245, + 245, 246, 246, 246, 246, 246, 246, 246, 246, 246, + 246, 246, 247, 247, 248, 248, 248, 248, 249, 249, + 249, 249, 250, 250, 251, 251, 252, 252, 252, 252, + 252, 252, 252, 253, 253, 254, 255, 256, 256, 256, + 256, 256, 256, 257, 258, 259, 260, 260, 260, 260, + 261, 261, 261, 261, 261, 261, 262, 263, 263, 264, + 264, 265, 266, 267, 268, 269, 269, 270, 270, 271, + 271, 272, 272, 273, 274, 275, 275, 276, 276, 277, + 278, 278, 279, 279, 280, 280, 281, 281, 282, 282, + 283, 284, 284, 285, 286, 286, 286, 287, 287, 287, + 287, 287, 287, 287, 287, 287, 287, 288, 289, 289, + 290, 290 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -1399,29 +1400,29 @@ static const yytype_int8 yyr2[] = 0, 5, 2, 3, 2, 8, 7, 6, 9, 7, 3, 0, 1, 3, 1, 1, 3, 1, 1, 1, 1, 2, 1, 1, 4, 5, 4, 1, 2, 1, - 1, 3, 0, 5, 3, 0, 1, 2, 0, 2, - 1, 1, 2, 5, 4, 4, 4, 3, 4, 2, - 0, 5, 1, 4, 4, 2, 8, 5, 3, 0, - 5, 1, 3, 3, 2, 2, 6, 1, 1, 1, - 3, 3, 3, 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, 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, 6, 1, 1, 1, 1, - 1, 1, 4, 4, 5, 1, 3, 1, 3, 1, + 1, 3, 0, 5, 3, 0, 1, 0, 1, 2, + 2, 1, 1, 2, 5, 4, 4, 4, 3, 4, + 2, 0, 5, 1, 4, 4, 2, 8, 5, 3, + 0, 5, 1, 3, 3, 2, 2, 6, 1, 1, + 1, 3, 3, 3, 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, 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, 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, 2, 1, 1, 3, 1, 1, 1, 4, - 1, 3, 2, 1, 1, 3, 1, 0, 1, 1, - 5, 1, 0, 2, 1, 1, 0, 1, 0, 2, - 1, 3, 3, 4, 6, 8, 1, 2, 1, 2, - 1, 2, 1, 1, 1, 0, 1, 1, 0, 1, - 3 + 1, 1, 1, 2, 1, 1, 3, 1, 1, 1, + 4, 1, 3, 2, 1, 1, 3, 1, 0, 1, + 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 }; @@ -1975,25 +1976,25 @@ yydestruct (const char *yymsg, case YYSYMBOL_IDENTIFIER: /* IDENTIFIER */ #line 157 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1979 "bison_parser.cpp" +#line 1980 "bison_parser.cpp" break; case YYSYMBOL_STRING: /* STRING */ #line 157 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1985 "bison_parser.cpp" +#line 1986 "bison_parser.cpp" break; case YYSYMBOL_FLOATVAL: /* FLOATVAL */ #line 155 "bison_parser.y" { } -#line 1991 "bison_parser.cpp" +#line 1992 "bison_parser.cpp" break; case YYSYMBOL_INTVAL: /* INTVAL */ #line 155 "bison_parser.y" { } -#line 1997 "bison_parser.cpp" +#line 1998 "bison_parser.cpp" break; case YYSYMBOL_statement_list: /* statement_list */ @@ -2006,19 +2007,19 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).stmt_vec)); } -#line 2010 "bison_parser.cpp" +#line 2011 "bison_parser.cpp" break; case YYSYMBOL_statement: /* statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 2016 "bison_parser.cpp" +#line 2017 "bison_parser.cpp" break; case YYSYMBOL_preparable_statement: /* preparable_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 2022 "bison_parser.cpp" +#line 2023 "bison_parser.cpp" break; case YYSYMBOL_opt_hints: /* opt_hints */ @@ -2031,7 +2032,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2035 "bison_parser.cpp" +#line 2036 "bison_parser.cpp" break; case YYSYMBOL_hint_list: /* hint_list */ @@ -2044,85 +2045,85 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2048 "bison_parser.cpp" +#line 2049 "bison_parser.cpp" break; case YYSYMBOL_hint: /* hint */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2054 "bison_parser.cpp" +#line 2055 "bison_parser.cpp" break; case YYSYMBOL_transaction_statement: /* transaction_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).transaction_stmt)); } -#line 2060 "bison_parser.cpp" +#line 2061 "bison_parser.cpp" break; case YYSYMBOL_prepare_statement: /* prepare_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).prep_stmt)); } -#line 2066 "bison_parser.cpp" +#line 2067 "bison_parser.cpp" break; case YYSYMBOL_prepare_target_query: /* prepare_target_query */ #line 157 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2072 "bison_parser.cpp" +#line 2073 "bison_parser.cpp" break; case YYSYMBOL_execute_statement: /* execute_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).exec_stmt)); } -#line 2078 "bison_parser.cpp" +#line 2079 "bison_parser.cpp" break; case YYSYMBOL_import_statement: /* import_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).import_stmt)); } -#line 2084 "bison_parser.cpp" +#line 2085 "bison_parser.cpp" break; case YYSYMBOL_file_type: /* file_type */ #line 155 "bison_parser.y" { } -#line 2090 "bison_parser.cpp" +#line 2091 "bison_parser.cpp" break; case YYSYMBOL_file_path: /* file_path */ #line 157 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2096 "bison_parser.cpp" +#line 2097 "bison_parser.cpp" break; case YYSYMBOL_opt_file_type: /* opt_file_type */ #line 155 "bison_parser.y" { } -#line 2102 "bison_parser.cpp" +#line 2103 "bison_parser.cpp" break; case YYSYMBOL_export_statement: /* export_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).export_stmt)); } -#line 2108 "bison_parser.cpp" +#line 2109 "bison_parser.cpp" break; case YYSYMBOL_show_statement: /* show_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).show_stmt)); } -#line 2114 "bison_parser.cpp" +#line 2115 "bison_parser.cpp" break; case YYSYMBOL_create_statement: /* create_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).create_stmt)); } -#line 2120 "bison_parser.cpp" +#line 2121 "bison_parser.cpp" break; case YYSYMBOL_opt_not_exists: /* opt_not_exists */ #line 155 "bison_parser.y" { } -#line 2126 "bison_parser.cpp" +#line 2127 "bison_parser.cpp" break; case YYSYMBOL_table_elem_commalist: /* table_elem_commalist */ @@ -2135,103 +2136,109 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).table_element_vec)); } -#line 2139 "bison_parser.cpp" +#line 2140 "bison_parser.cpp" break; case YYSYMBOL_table_elem: /* table_elem */ #line 166 "bison_parser.y" { delete (((*yyvaluep).table_element_t)); } -#line 2145 "bison_parser.cpp" +#line 2146 "bison_parser.cpp" break; case YYSYMBOL_column_def: /* column_def */ #line 166 "bison_parser.y" { delete (((*yyvaluep).column_t)); } -#line 2151 "bison_parser.cpp" +#line 2152 "bison_parser.cpp" break; case YYSYMBOL_column_type: /* column_type */ #line 155 "bison_parser.y" { } -#line 2157 "bison_parser.cpp" +#line 2158 "bison_parser.cpp" break; case YYSYMBOL_opt_time_specification: /* opt_time_specification */ #line 155 "bison_parser.y" { } -#line 2163 "bison_parser.cpp" +#line 2164 "bison_parser.cpp" break; case YYSYMBOL_opt_decimal_specification: /* opt_decimal_specification */ #line 155 "bison_parser.y" { } -#line 2169 "bison_parser.cpp" +#line 2170 "bison_parser.cpp" break; case YYSYMBOL_opt_column_constraints: /* opt_column_constraints */ #line 155 "bison_parser.y" { } -#line 2175 "bison_parser.cpp" +#line 2176 "bison_parser.cpp" + break; + + case YYSYMBOL_column_constraint_list: /* column_constraint_list */ +#line 155 "bison_parser.y" + { } +#line 2182 "bison_parser.cpp" break; case YYSYMBOL_column_constraint: /* column_constraint */ #line 155 "bison_parser.y" { } -#line 2181 "bison_parser.cpp" +#line 2188 "bison_parser.cpp" break; case YYSYMBOL_table_constraint: /* table_constraint */ #line 166 "bison_parser.y" { delete (((*yyvaluep).table_constraint_t)); } -#line 2187 "bison_parser.cpp" +#line 2194 "bison_parser.cpp" break; case YYSYMBOL_drop_statement: /* drop_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).drop_stmt)); } -#line 2193 "bison_parser.cpp" +#line 2200 "bison_parser.cpp" break; case YYSYMBOL_opt_exists: /* opt_exists */ #line 155 "bison_parser.y" { } -#line 2199 "bison_parser.cpp" +#line 2206 "bison_parser.cpp" break; case YYSYMBOL_alter_statement: /* alter_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).alter_stmt)); } -#line 2205 "bison_parser.cpp" +#line 2212 "bison_parser.cpp" break; case YYSYMBOL_alter_action: /* alter_action */ #line 166 "bison_parser.y" { delete (((*yyvaluep).alter_action_t)); } -#line 2211 "bison_parser.cpp" +#line 2218 "bison_parser.cpp" break; case YYSYMBOL_drop_action: /* drop_action */ #line 166 "bison_parser.y" { delete (((*yyvaluep).drop_action_t)); } -#line 2217 "bison_parser.cpp" +#line 2224 "bison_parser.cpp" break; case YYSYMBOL_delete_statement: /* delete_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2223 "bison_parser.cpp" +#line 2230 "bison_parser.cpp" break; case YYSYMBOL_truncate_statement: /* truncate_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2229 "bison_parser.cpp" +#line 2236 "bison_parser.cpp" break; case YYSYMBOL_insert_statement: /* insert_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).insert_stmt)); } -#line 2235 "bison_parser.cpp" +#line 2242 "bison_parser.cpp" break; case YYSYMBOL_opt_column_list: /* opt_column_list */ @@ -2244,13 +2251,13 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2248 "bison_parser.cpp" +#line 2255 "bison_parser.cpp" break; case YYSYMBOL_update_statement: /* update_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).update_stmt)); } -#line 2254 "bison_parser.cpp" +#line 2261 "bison_parser.cpp" break; case YYSYMBOL_update_clause_commalist: /* update_clause_commalist */ @@ -2263,73 +2270,73 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).update_vec)); } -#line 2267 "bison_parser.cpp" +#line 2274 "bison_parser.cpp" break; case YYSYMBOL_update_clause: /* update_clause */ #line 166 "bison_parser.y" { delete (((*yyvaluep).update_t)); } -#line 2273 "bison_parser.cpp" +#line 2280 "bison_parser.cpp" break; case YYSYMBOL_select_statement: /* select_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2279 "bison_parser.cpp" +#line 2286 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation: /* select_within_set_operation */ #line 166 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2285 "bison_parser.cpp" +#line 2292 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation_no_parentheses: /* select_within_set_operation_no_parentheses */ #line 166 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2291 "bison_parser.cpp" +#line 2298 "bison_parser.cpp" break; case YYSYMBOL_select_with_paren: /* select_with_paren */ #line 166 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2297 "bison_parser.cpp" +#line 2304 "bison_parser.cpp" break; case YYSYMBOL_select_no_paren: /* select_no_paren */ #line 166 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2303 "bison_parser.cpp" +#line 2310 "bison_parser.cpp" break; case YYSYMBOL_set_operator: /* set_operator */ #line 166 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2309 "bison_parser.cpp" +#line 2316 "bison_parser.cpp" break; case YYSYMBOL_set_type: /* set_type */ #line 166 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2315 "bison_parser.cpp" +#line 2322 "bison_parser.cpp" break; case YYSYMBOL_opt_all: /* opt_all */ #line 155 "bison_parser.y" { } -#line 2321 "bison_parser.cpp" +#line 2328 "bison_parser.cpp" break; case YYSYMBOL_select_clause: /* select_clause */ #line 166 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2327 "bison_parser.cpp" +#line 2334 "bison_parser.cpp" break; case YYSYMBOL_opt_distinct: /* opt_distinct */ #line 155 "bison_parser.y" { } -#line 2333 "bison_parser.cpp" +#line 2340 "bison_parser.cpp" break; case YYSYMBOL_select_list: /* select_list */ @@ -2342,37 +2349,37 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2346 "bison_parser.cpp" +#line 2353 "bison_parser.cpp" break; case YYSYMBOL_opt_from_clause: /* opt_from_clause */ #line 166 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2352 "bison_parser.cpp" +#line 2359 "bison_parser.cpp" break; case YYSYMBOL_from_clause: /* from_clause */ #line 166 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2358 "bison_parser.cpp" +#line 2365 "bison_parser.cpp" break; case YYSYMBOL_opt_where: /* opt_where */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2364 "bison_parser.cpp" +#line 2371 "bison_parser.cpp" break; case YYSYMBOL_opt_group: /* opt_group */ #line 166 "bison_parser.y" { delete (((*yyvaluep).group_t)); } -#line 2370 "bison_parser.cpp" +#line 2377 "bison_parser.cpp" break; case YYSYMBOL_opt_having: /* opt_having */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2376 "bison_parser.cpp" +#line 2383 "bison_parser.cpp" break; case YYSYMBOL_opt_order: /* opt_order */ @@ -2385,7 +2392,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2389 "bison_parser.cpp" +#line 2396 "bison_parser.cpp" break; case YYSYMBOL_order_list: /* order_list */ @@ -2398,31 +2405,31 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2402 "bison_parser.cpp" +#line 2409 "bison_parser.cpp" break; case YYSYMBOL_order_desc: /* order_desc */ #line 166 "bison_parser.y" { delete (((*yyvaluep).order)); } -#line 2408 "bison_parser.cpp" +#line 2415 "bison_parser.cpp" break; case YYSYMBOL_opt_order_type: /* opt_order_type */ #line 155 "bison_parser.y" { } -#line 2414 "bison_parser.cpp" +#line 2421 "bison_parser.cpp" break; case YYSYMBOL_opt_top: /* opt_top */ #line 166 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2420 "bison_parser.cpp" +#line 2427 "bison_parser.cpp" break; case YYSYMBOL_opt_limit: /* opt_limit */ #line 166 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2426 "bison_parser.cpp" +#line 2433 "bison_parser.cpp" break; case YYSYMBOL_expr_list: /* expr_list */ @@ -2435,7 +2442,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2439 "bison_parser.cpp" +#line 2446 "bison_parser.cpp" break; case YYSYMBOL_opt_literal_list: /* opt_literal_list */ @@ -2448,7 +2455,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2452 "bison_parser.cpp" +#line 2459 "bison_parser.cpp" break; case YYSYMBOL_literal_list: /* literal_list */ @@ -2461,193 +2468,193 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2465 "bison_parser.cpp" +#line 2472 "bison_parser.cpp" break; case YYSYMBOL_expr_alias: /* expr_alias */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2471 "bison_parser.cpp" +#line 2478 "bison_parser.cpp" break; case YYSYMBOL_expr: /* expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2477 "bison_parser.cpp" +#line 2484 "bison_parser.cpp" break; case YYSYMBOL_operand: /* operand */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2483 "bison_parser.cpp" +#line 2490 "bison_parser.cpp" break; case YYSYMBOL_scalar_expr: /* scalar_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2489 "bison_parser.cpp" +#line 2496 "bison_parser.cpp" break; case YYSYMBOL_unary_expr: /* unary_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2495 "bison_parser.cpp" +#line 2502 "bison_parser.cpp" break; case YYSYMBOL_binary_expr: /* binary_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2501 "bison_parser.cpp" +#line 2508 "bison_parser.cpp" break; case YYSYMBOL_logic_expr: /* logic_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2507 "bison_parser.cpp" +#line 2514 "bison_parser.cpp" break; case YYSYMBOL_in_expr: /* in_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2513 "bison_parser.cpp" +#line 2520 "bison_parser.cpp" break; case YYSYMBOL_case_expr: /* case_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2519 "bison_parser.cpp" +#line 2526 "bison_parser.cpp" break; case YYSYMBOL_case_list: /* case_list */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2525 "bison_parser.cpp" +#line 2532 "bison_parser.cpp" break; case YYSYMBOL_exists_expr: /* exists_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2531 "bison_parser.cpp" +#line 2538 "bison_parser.cpp" break; case YYSYMBOL_comp_expr: /* comp_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2537 "bison_parser.cpp" +#line 2544 "bison_parser.cpp" break; case YYSYMBOL_function_expr: /* function_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2543 "bison_parser.cpp" +#line 2550 "bison_parser.cpp" break; case YYSYMBOL_extract_expr: /* extract_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2549 "bison_parser.cpp" +#line 2556 "bison_parser.cpp" break; case YYSYMBOL_cast_expr: /* cast_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2555 "bison_parser.cpp" +#line 2562 "bison_parser.cpp" break; case YYSYMBOL_datetime_field: /* datetime_field */ #line 155 "bison_parser.y" { } -#line 2561 "bison_parser.cpp" +#line 2568 "bison_parser.cpp" break; case YYSYMBOL_array_expr: /* array_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2567 "bison_parser.cpp" +#line 2574 "bison_parser.cpp" break; case YYSYMBOL_array_index: /* array_index */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2573 "bison_parser.cpp" +#line 2580 "bison_parser.cpp" break; case YYSYMBOL_between_expr: /* between_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2579 "bison_parser.cpp" +#line 2586 "bison_parser.cpp" break; case YYSYMBOL_column_name: /* column_name */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2585 "bison_parser.cpp" +#line 2592 "bison_parser.cpp" break; case YYSYMBOL_literal: /* literal */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2591 "bison_parser.cpp" +#line 2598 "bison_parser.cpp" break; case YYSYMBOL_string_literal: /* string_literal */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2597 "bison_parser.cpp" +#line 2604 "bison_parser.cpp" break; case YYSYMBOL_bool_literal: /* bool_literal */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2603 "bison_parser.cpp" +#line 2610 "bison_parser.cpp" break; case YYSYMBOL_num_literal: /* num_literal */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2609 "bison_parser.cpp" +#line 2616 "bison_parser.cpp" break; case YYSYMBOL_int_literal: /* int_literal */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2615 "bison_parser.cpp" +#line 2622 "bison_parser.cpp" break; case YYSYMBOL_null_literal: /* null_literal */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2621 "bison_parser.cpp" +#line 2628 "bison_parser.cpp" break; case YYSYMBOL_date_literal: /* date_literal */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2627 "bison_parser.cpp" +#line 2634 "bison_parser.cpp" break; case YYSYMBOL_param_expr: /* param_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2633 "bison_parser.cpp" +#line 2640 "bison_parser.cpp" break; case YYSYMBOL_table_ref: /* table_ref */ #line 166 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2639 "bison_parser.cpp" +#line 2646 "bison_parser.cpp" break; case YYSYMBOL_table_ref_atomic: /* table_ref_atomic */ #line 166 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2645 "bison_parser.cpp" +#line 2652 "bison_parser.cpp" break; case YYSYMBOL_nonjoin_table_ref_atomic: /* nonjoin_table_ref_atomic */ #line 166 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2651 "bison_parser.cpp" +#line 2658 "bison_parser.cpp" break; case YYSYMBOL_table_ref_commalist: /* table_ref_commalist */ @@ -2660,103 +2667,103 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).table_vec)); } -#line 2664 "bison_parser.cpp" +#line 2671 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name: /* table_ref_name */ #line 166 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2670 "bison_parser.cpp" +#line 2677 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name_no_alias: /* table_ref_name_no_alias */ #line 166 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2676 "bison_parser.cpp" +#line 2683 "bison_parser.cpp" break; case YYSYMBOL_table_name: /* table_name */ #line 156 "bison_parser.y" { free( (((*yyvaluep).table_name).name) ); free( (((*yyvaluep).table_name).schema) ); } -#line 2682 "bison_parser.cpp" +#line 2689 "bison_parser.cpp" break; case YYSYMBOL_opt_index_name: /* opt_index_name */ #line 157 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2688 "bison_parser.cpp" +#line 2695 "bison_parser.cpp" break; case YYSYMBOL_index_name: /* index_name */ #line 157 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2694 "bison_parser.cpp" +#line 2701 "bison_parser.cpp" break; case YYSYMBOL_table_alias: /* table_alias */ #line 166 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2700 "bison_parser.cpp" +#line 2707 "bison_parser.cpp" break; case YYSYMBOL_opt_table_alias: /* opt_table_alias */ #line 166 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2706 "bison_parser.cpp" +#line 2713 "bison_parser.cpp" break; case YYSYMBOL_alias: /* alias */ #line 166 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2712 "bison_parser.cpp" +#line 2719 "bison_parser.cpp" break; case YYSYMBOL_opt_alias: /* opt_alias */ #line 166 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2718 "bison_parser.cpp" +#line 2725 "bison_parser.cpp" break; case YYSYMBOL_opt_with_clause: /* opt_with_clause */ #line 166 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2724 "bison_parser.cpp" +#line 2731 "bison_parser.cpp" break; case YYSYMBOL_with_clause: /* with_clause */ #line 166 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2730 "bison_parser.cpp" +#line 2737 "bison_parser.cpp" break; case YYSYMBOL_with_description_list: /* with_description_list */ #line 166 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2736 "bison_parser.cpp" +#line 2743 "bison_parser.cpp" break; case YYSYMBOL_with_description: /* with_description */ #line 166 "bison_parser.y" { delete (((*yyvaluep).with_description_t)); } -#line 2742 "bison_parser.cpp" +#line 2749 "bison_parser.cpp" break; case YYSYMBOL_join_clause: /* join_clause */ #line 166 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2748 "bison_parser.cpp" +#line 2755 "bison_parser.cpp" break; case YYSYMBOL_opt_join_type: /* opt_join_type */ #line 155 "bison_parser.y" { } -#line 2754 "bison_parser.cpp" +#line 2761 "bison_parser.cpp" break; case YYSYMBOL_join_condition: /* join_condition */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2760 "bison_parser.cpp" +#line 2767 "bison_parser.cpp" break; case YYSYMBOL_ident_commalist: /* ident_commalist */ @@ -2769,7 +2776,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2773 "bison_parser.cpp" +#line 2780 "bison_parser.cpp" break; default: @@ -2876,7 +2883,7 @@ YYLTYPE yylloc = yyloc_default; yylloc.string_length = 0; } -#line 2880 "bison_parser.cpp" +#line 2887 "bison_parser.cpp" yylsp[0] = yylloc; goto yysetstate; @@ -3086,7 +3093,7 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* input: statement_list opt_semicolon */ -#line 288 "bison_parser.y" +#line 289 "bison_parser.y" { for (SQLStatement* stmt : *(yyvsp[-1].stmt_vec)) { // Transfers ownership of the statement. @@ -3104,253 +3111,253 @@ YYLTYPE yylloc = yyloc_default; } delete (yyvsp[-1].stmt_vec); } -#line 3108 "bison_parser.cpp" +#line 3115 "bison_parser.cpp" break; case 3: /* statement_list: statement */ -#line 309 "bison_parser.y" +#line 310 "bison_parser.y" { (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 3119 "bison_parser.cpp" +#line 3126 "bison_parser.cpp" break; case 4: /* statement_list: statement_list ';' statement */ -#line 315 "bison_parser.y" +#line 316 "bison_parser.y" { (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 3130 "bison_parser.cpp" +#line 3137 "bison_parser.cpp" break; case 5: /* statement: prepare_statement opt_hints */ -#line 324 "bison_parser.y" +#line 325 "bison_parser.y" { (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3139 "bison_parser.cpp" +#line 3146 "bison_parser.cpp" break; case 6: /* statement: preparable_statement opt_hints */ -#line 328 "bison_parser.y" +#line 329 "bison_parser.y" { (yyval.statement) = (yyvsp[-1].statement); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3148 "bison_parser.cpp" +#line 3155 "bison_parser.cpp" break; case 7: /* statement: show_statement */ -#line 332 "bison_parser.y" +#line 333 "bison_parser.y" { (yyval.statement) = (yyvsp[0].show_stmt); } -#line 3156 "bison_parser.cpp" +#line 3163 "bison_parser.cpp" break; case 8: /* statement: import_statement */ -#line 335 "bison_parser.y" +#line 336 "bison_parser.y" { (yyval.statement) = (yyvsp[0].import_stmt); } -#line 3164 "bison_parser.cpp" +#line 3171 "bison_parser.cpp" break; case 9: /* statement: export_statement */ -#line 338 "bison_parser.y" +#line 339 "bison_parser.y" { (yyval.statement) = (yyvsp[0].export_stmt); } -#line 3172 "bison_parser.cpp" +#line 3179 "bison_parser.cpp" break; case 10: /* preparable_statement: select_statement */ -#line 345 "bison_parser.y" +#line 346 "bison_parser.y" { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 3178 "bison_parser.cpp" +#line 3185 "bison_parser.cpp" break; case 11: /* preparable_statement: create_statement */ -#line 346 "bison_parser.y" +#line 347 "bison_parser.y" { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 3184 "bison_parser.cpp" +#line 3191 "bison_parser.cpp" break; case 12: /* preparable_statement: insert_statement */ -#line 347 "bison_parser.y" +#line 348 "bison_parser.y" { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 3190 "bison_parser.cpp" +#line 3197 "bison_parser.cpp" break; case 13: /* preparable_statement: delete_statement */ -#line 348 "bison_parser.y" +#line 349 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3196 "bison_parser.cpp" +#line 3203 "bison_parser.cpp" break; case 14: /* preparable_statement: truncate_statement */ -#line 349 "bison_parser.y" +#line 350 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3202 "bison_parser.cpp" +#line 3209 "bison_parser.cpp" break; case 15: /* preparable_statement: update_statement */ -#line 350 "bison_parser.y" +#line 351 "bison_parser.y" { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 3208 "bison_parser.cpp" +#line 3215 "bison_parser.cpp" break; case 16: /* preparable_statement: drop_statement */ -#line 351 "bison_parser.y" +#line 352 "bison_parser.y" { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 3214 "bison_parser.cpp" +#line 3221 "bison_parser.cpp" break; case 17: /* preparable_statement: alter_statement */ -#line 352 "bison_parser.y" +#line 353 "bison_parser.y" { (yyval.statement) = (yyvsp[0].alter_stmt); } -#line 3220 "bison_parser.cpp" +#line 3227 "bison_parser.cpp" break; case 18: /* preparable_statement: execute_statement */ -#line 353 "bison_parser.y" +#line 354 "bison_parser.y" { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 3226 "bison_parser.cpp" +#line 3233 "bison_parser.cpp" break; case 19: /* preparable_statement: transaction_statement */ -#line 354 "bison_parser.y" +#line 355 "bison_parser.y" { (yyval.statement) = (yyvsp[0].transaction_stmt); } -#line 3232 "bison_parser.cpp" +#line 3239 "bison_parser.cpp" break; case 20: /* opt_hints: WITH HINT '(' hint_list ')' */ -#line 363 "bison_parser.y" +#line 364 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 3238 "bison_parser.cpp" +#line 3245 "bison_parser.cpp" break; case 21: /* opt_hints: %empty */ -#line 364 "bison_parser.y" +#line 365 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 3244 "bison_parser.cpp" +#line 3251 "bison_parser.cpp" break; case 22: /* hint_list: hint */ -#line 369 "bison_parser.y" +#line 370 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3250 "bison_parser.cpp" +#line 3257 "bison_parser.cpp" break; case 23: /* hint_list: hint_list ',' hint */ -#line 370 "bison_parser.y" +#line 371 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3256 "bison_parser.cpp" +#line 3263 "bison_parser.cpp" break; case 24: /* hint: IDENTIFIER */ -#line 374 "bison_parser.y" +#line 375 "bison_parser.y" { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[0].sval); } -#line 3265 "bison_parser.cpp" +#line 3272 "bison_parser.cpp" break; case 25: /* hint: IDENTIFIER '(' literal_list ')' */ -#line 378 "bison_parser.y" +#line 379 "bison_parser.y" { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[-3].sval); (yyval.expr)->exprList = (yyvsp[-1].expr_vec); } -#line 3275 "bison_parser.cpp" +#line 3282 "bison_parser.cpp" break; case 26: /* transaction_statement: BEGIN opt_transaction_keyword */ -#line 390 "bison_parser.y" +#line 391 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kBeginTransaction); } -#line 3283 "bison_parser.cpp" +#line 3290 "bison_parser.cpp" break; case 27: /* transaction_statement: ROLLBACK opt_transaction_keyword */ -#line 393 "bison_parser.y" +#line 394 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kRollbackTransaction); } -#line 3291 "bison_parser.cpp" +#line 3298 "bison_parser.cpp" break; case 28: /* transaction_statement: COMMIT opt_transaction_keyword */ -#line 396 "bison_parser.y" +#line 397 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kCommitTransaction); } -#line 3299 "bison_parser.cpp" +#line 3306 "bison_parser.cpp" break; case 31: /* prepare_statement: PREPARE IDENTIFIER FROM prepare_target_query */ -#line 410 "bison_parser.y" +#line 411 "bison_parser.y" { (yyval.prep_stmt) = new PrepareStatement(); (yyval.prep_stmt)->name = (yyvsp[-2].sval); (yyval.prep_stmt)->query = (yyvsp[0].sval); } -#line 3309 "bison_parser.cpp" +#line 3316 "bison_parser.cpp" break; case 33: /* execute_statement: EXECUTE IDENTIFIER */ -#line 420 "bison_parser.y" +#line 421 "bison_parser.y" { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[0].sval); } -#line 3318 "bison_parser.cpp" +#line 3325 "bison_parser.cpp" break; case 34: /* execute_statement: EXECUTE IDENTIFIER '(' opt_literal_list ')' */ -#line 424 "bison_parser.y" +#line 425 "bison_parser.y" { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[-3].sval); (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); } -#line 3328 "bison_parser.cpp" +#line 3335 "bison_parser.cpp" break; case 35: /* import_statement: IMPORT FROM file_type FILE file_path INTO table_name */ -#line 438 "bison_parser.y" +#line 439 "bison_parser.y" { (yyval.import_stmt) = new ImportStatement((yyvsp[-4].import_type_t)); (yyval.import_stmt)->filePath = (yyvsp[-2].sval); (yyval.import_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3339 "bison_parser.cpp" +#line 3346 "bison_parser.cpp" break; case 36: /* import_statement: COPY table_name FROM file_path opt_file_type */ -#line 444 "bison_parser.y" +#line 445 "bison_parser.y" { (yyval.import_stmt) = new ImportStatement((yyvsp[0].import_type_t)); (yyval.import_stmt)->filePath = (yyvsp[-1].sval); (yyval.import_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3350 "bison_parser.cpp" +#line 3357 "bison_parser.cpp" break; case 37: /* file_type: IDENTIFIER */ -#line 453 "bison_parser.y" +#line 454 "bison_parser.y" { if (strcasecmp((yyvsp[0].sval), "csv") == 0) { (yyval.import_type_t) = kImportCSV; @@ -3365,70 +3372,70 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[0].sval)); } -#line 3369 "bison_parser.cpp" +#line 3376 "bison_parser.cpp" break; case 38: /* file_path: string_literal */ -#line 470 "bison_parser.y" +#line 471 "bison_parser.y" { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 3375 "bison_parser.cpp" +#line 3382 "bison_parser.cpp" break; case 39: /* opt_file_type: WITH FORMAT file_type */ -#line 474 "bison_parser.y" +#line 475 "bison_parser.y" { (yyval.import_type_t) = (yyvsp[0].import_type_t); } -#line 3383 "bison_parser.cpp" +#line 3390 "bison_parser.cpp" break; case 40: /* opt_file_type: %empty */ -#line 477 "bison_parser.y" +#line 478 "bison_parser.y" { (yyval.import_type_t) = kImportAuto; } -#line 3389 "bison_parser.cpp" +#line 3396 "bison_parser.cpp" break; case 41: /* export_statement: COPY table_name TO file_path opt_file_type */ -#line 486 "bison_parser.y" +#line 487 "bison_parser.y" { (yyval.export_stmt) = new ExportStatement((yyvsp[0].import_type_t)); (yyval.export_stmt)->filePath = (yyvsp[-1].sval); (yyval.export_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.export_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3400 "bison_parser.cpp" +#line 3407 "bison_parser.cpp" break; case 42: /* show_statement: SHOW TABLES */ -#line 500 "bison_parser.y" +#line 501 "bison_parser.y" { (yyval.show_stmt) = new ShowStatement(kShowTables); } -#line 3408 "bison_parser.cpp" +#line 3415 "bison_parser.cpp" break; case 43: /* show_statement: SHOW COLUMNS table_name */ -#line 503 "bison_parser.y" +#line 504 "bison_parser.y" { (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 3418 "bison_parser.cpp" +#line 3425 "bison_parser.cpp" break; case 44: /* show_statement: DESCRIBE table_name */ -#line 508 "bison_parser.y" +#line 509 "bison_parser.y" { (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 3428 "bison_parser.cpp" +#line 3435 "bison_parser.cpp" break; case 45: /* create_statement: CREATE TABLE opt_not_exists table_name FROM IDENTIFIER FILE file_path */ -#line 522 "bison_parser.y" +#line 523 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTableFromTbl); (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); @@ -3442,11 +3449,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].sval)); (yyval.create_stmt)->filePath = (yyvsp[0].sval); } -#line 3446 "bison_parser.cpp" +#line 3453 "bison_parser.cpp" break; case 46: /* create_statement: CREATE TABLE opt_not_exists table_name '(' table_elem_commalist ')' */ -#line 535 "bison_parser.y" +#line 536 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -3454,11 +3461,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->setColumnDefsAndConstraints((yyvsp[-1].table_element_vec)); } -#line 3458 "bison_parser.cpp" +#line 3465 "bison_parser.cpp" break; case 47: /* create_statement: CREATE TABLE opt_not_exists table_name AS select_statement */ -#line 542 "bison_parser.y" +#line 543 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-3].bval); @@ -3466,11 +3473,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-2].table_name).name; (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3470 "bison_parser.cpp" +#line 3477 "bison_parser.cpp" break; case 48: /* create_statement: CREATE INDEX opt_not_exists opt_index_name ON table_name '(' ident_commalist ')' */ -#line 549 "bison_parser.y" +#line 550 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateIndex); (yyval.create_stmt)->indexName = (yyvsp[-5].sval); @@ -3478,11 +3485,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->indexColumns = (yyvsp[-1].str_vec); } -#line 3482 "bison_parser.cpp" +#line 3489 "bison_parser.cpp" break; case 49: /* create_statement: CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement */ -#line 556 "bison_parser.y" +#line 557 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateView); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -3491,324 +3498,330 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3495 "bison_parser.cpp" +#line 3502 "bison_parser.cpp" break; case 50: /* opt_not_exists: IF NOT EXISTS */ -#line 567 "bison_parser.y" +#line 568 "bison_parser.y" { (yyval.bval) = true; } -#line 3501 "bison_parser.cpp" +#line 3508 "bison_parser.cpp" break; case 51: /* opt_not_exists: %empty */ -#line 568 "bison_parser.y" +#line 569 "bison_parser.y" { (yyval.bval) = false; } -#line 3507 "bison_parser.cpp" +#line 3514 "bison_parser.cpp" break; case 52: /* table_elem_commalist: table_elem */ -#line 572 "bison_parser.y" +#line 573 "bison_parser.y" { (yyval.table_element_vec) = new std::vector(); (yyval.table_element_vec)->push_back((yyvsp[0].table_element_t)); } -#line 3513 "bison_parser.cpp" +#line 3520 "bison_parser.cpp" break; case 53: /* table_elem_commalist: table_elem_commalist ',' table_elem */ -#line 573 "bison_parser.y" +#line 574 "bison_parser.y" { (yyvsp[-2].table_element_vec)->push_back((yyvsp[0].table_element_t)); (yyval.table_element_vec) = (yyvsp[-2].table_element_vec); } -#line 3519 "bison_parser.cpp" +#line 3526 "bison_parser.cpp" break; case 54: /* table_elem: column_def */ -#line 577 "bison_parser.y" +#line 578 "bison_parser.y" { (yyval.table_element_t) = (yyvsp[0].column_t); } -#line 3525 "bison_parser.cpp" +#line 3532 "bison_parser.cpp" break; case 55: /* table_elem: table_constraint */ -#line 578 "bison_parser.y" +#line 579 "bison_parser.y" { (yyval.table_element_t) = (yyvsp[0].table_constraint_t); } -#line 3531 "bison_parser.cpp" +#line 3538 "bison_parser.cpp" break; case 56: /* column_def: IDENTIFIER column_type opt_column_constraints */ -#line 582 "bison_parser.y" +#line 583 "bison_parser.y" { (yyval.column_t) = new ColumnDefinition((yyvsp[-2].sval), (yyvsp[-1].column_type_t), (yyvsp[0].column_constraint_vec)); (yyval.column_t)->setNullableExplicit(); } -#line 3540 "bison_parser.cpp" +#line 3547 "bison_parser.cpp" break; case 57: /* column_type: INT */ -#line 589 "bison_parser.y" +#line 590 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3546 "bison_parser.cpp" +#line 3553 "bison_parser.cpp" break; case 58: /* column_type: INTEGER */ -#line 590 "bison_parser.y" +#line 591 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3552 "bison_parser.cpp" +#line 3559 "bison_parser.cpp" break; case 59: /* column_type: LONG */ -#line 591 "bison_parser.y" +#line 592 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::LONG}; } -#line 3558 "bison_parser.cpp" +#line 3565 "bison_parser.cpp" break; case 60: /* column_type: FLOAT */ -#line 592 "bison_parser.y" +#line 593 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3564 "bison_parser.cpp" +#line 3571 "bison_parser.cpp" break; case 61: /* column_type: DECIMAL opt_decimal_specification */ -#line 593 "bison_parser.y" +#line 594 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DECIMAL, 0, (yyvsp[0].column_specification_t)}; } -#line 3570 "bison_parser.cpp" +#line 3577 "bison_parser.cpp" break; case 62: /* column_type: DOUBLE */ -#line 594 "bison_parser.y" +#line 595 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } -#line 3576 "bison_parser.cpp" +#line 3583 "bison_parser.cpp" break; case 63: /* column_type: REAL */ -#line 595 "bison_parser.y" +#line 596 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::REAL}; } -#line 3582 "bison_parser.cpp" +#line 3589 "bison_parser.cpp" break; case 64: /* column_type: VARCHAR '(' INTVAL ')' */ -#line 596 "bison_parser.y" +#line 597 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3588 "bison_parser.cpp" +#line 3595 "bison_parser.cpp" break; case 65: /* column_type: CHARACTER VARYING '(' INTVAL ')' */ -#line 597 "bison_parser.y" +#line 598 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR_VARYING, (yyvsp[-1].ival)}; } -#line 3594 "bison_parser.cpp" +#line 3601 "bison_parser.cpp" break; case 66: /* column_type: CHAR '(' INTVAL ')' */ -#line 598 "bison_parser.y" +#line 599 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } -#line 3600 "bison_parser.cpp" +#line 3607 "bison_parser.cpp" break; case 67: /* column_type: TEXT */ -#line 599 "bison_parser.y" +#line 600 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } -#line 3606 "bison_parser.cpp" +#line 3613 "bison_parser.cpp" break; case 68: /* column_type: TIME opt_time_specification */ -#line 600 "bison_parser.y" +#line 601 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TIME, 0, (yyvsp[0].column_specification_t) }; } -#line 3612 "bison_parser.cpp" +#line 3619 "bison_parser.cpp" break; case 69: /* column_type: DATETIME */ -#line 601 "bison_parser.y" +#line 602 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } -#line 3618 "bison_parser.cpp" +#line 3625 "bison_parser.cpp" break; case 70: /* column_type: DATE */ -#line 602 "bison_parser.y" +#line 603 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATE}; } -#line 3624 "bison_parser.cpp" +#line 3631 "bison_parser.cpp" break; case 71: /* opt_time_specification: '(' INTVAL ')' */ -#line 606 "bison_parser.y" +#line 607 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-1].ival)}; } -#line 3630 "bison_parser.cpp" +#line 3637 "bison_parser.cpp" break; case 72: /* opt_time_specification: %empty */ -#line 607 "bison_parser.y" +#line 608 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{}; } -#line 3636 "bison_parser.cpp" +#line 3643 "bison_parser.cpp" break; case 73: /* opt_decimal_specification: '(' INTVAL ',' INTVAL ')' */ -#line 611 "bison_parser.y" +#line 612 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-3].ival), (yyvsp[-1].ival)}; } -#line 3642 "bison_parser.cpp" +#line 3649 "bison_parser.cpp" break; case 74: /* opt_decimal_specification: '(' INTVAL ')' */ -#line 612 "bison_parser.y" +#line 613 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-1].ival)}; } -#line 3648 "bison_parser.cpp" +#line 3655 "bison_parser.cpp" break; case 75: /* opt_decimal_specification: %empty */ -#line 613 "bison_parser.y" +#line 614 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{}; } -#line 3654 "bison_parser.cpp" +#line 3661 "bison_parser.cpp" break; - case 76: /* opt_column_constraints: column_constraint */ -#line 617 "bison_parser.y" - { (yyval.column_constraint_vec) = new std::vector(); (yyval.column_constraint_vec)->push_back((yyvsp[0].column_constraint_t)); } -#line 3660 "bison_parser.cpp" - break; - - case 77: /* opt_column_constraints: opt_column_constraints column_constraint */ + case 76: /* opt_column_constraints: column_constraint_list */ #line 618 "bison_parser.y" - { (yyvsp[-1].column_constraint_vec)->push_back((yyvsp[0].column_constraint_t)); (yyval.column_constraint_vec) = (yyvsp[-1].column_constraint_vec); } -#line 3666 "bison_parser.cpp" + { (yyval.column_constraint_vec) = (yyvsp[0].column_constraint_vec); } +#line 3667 "bison_parser.cpp" break; - case 78: /* opt_column_constraints: %empty */ + case 77: /* opt_column_constraints: %empty */ #line 619 "bison_parser.y" { (yyval.column_constraint_vec) = new std::vector(); } -#line 3672 "bison_parser.cpp" +#line 3673 "bison_parser.cpp" break; - case 79: /* column_constraint: PRIMARY KEY */ + case 78: /* column_constraint_list: column_constraint */ #line 623 "bison_parser.y" - { (yyval.column_constraint_t) = ConstraintType::PRIMARY_KEY; } -#line 3678 "bison_parser.cpp" + { (yyval.column_constraint_vec) = new std::vector(); (yyval.column_constraint_vec)->push_back((yyvsp[0].column_constraint_t)); } +#line 3679 "bison_parser.cpp" break; - case 80: /* column_constraint: UNIQUE */ + case 79: /* column_constraint_list: column_constraint_list column_constraint */ #line 624 "bison_parser.y" + { (yyvsp[-1].column_constraint_vec)->push_back((yyvsp[0].column_constraint_t)); (yyval.column_constraint_vec) = (yyvsp[-1].column_constraint_vec); } +#line 3685 "bison_parser.cpp" + break; + + case 80: /* column_constraint: PRIMARY KEY */ +#line 627 "bison_parser.y" + { (yyval.column_constraint_t) = ConstraintType::PRIMARY_KEY; } +#line 3691 "bison_parser.cpp" + break; + + case 81: /* column_constraint: UNIQUE */ +#line 628 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::UNIQUE; } -#line 3684 "bison_parser.cpp" +#line 3697 "bison_parser.cpp" break; - case 81: /* column_constraint: NULL */ -#line 625 "bison_parser.y" + case 82: /* column_constraint: NULL */ +#line 629 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::_NULL; } -#line 3690 "bison_parser.cpp" +#line 3703 "bison_parser.cpp" break; - case 82: /* column_constraint: NOT NULL */ -#line 626 "bison_parser.y" + case 83: /* column_constraint: NOT NULL */ +#line 630 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::NOTNULL; } -#line 3696 "bison_parser.cpp" +#line 3709 "bison_parser.cpp" break; - case 83: /* table_constraint: PRIMARY KEY '(' ident_commalist ')' */ -#line 630 "bison_parser.y" + case 84: /* table_constraint: PRIMARY KEY '(' ident_commalist ')' */ +#line 634 "bison_parser.y" { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::PRIMARY_KEY, (yyvsp[-1].str_vec)); } -#line 3702 "bison_parser.cpp" +#line 3715 "bison_parser.cpp" break; - case 84: /* table_constraint: UNIQUE '(' ident_commalist ')' */ -#line 631 "bison_parser.y" + case 85: /* table_constraint: UNIQUE '(' ident_commalist ')' */ +#line 635 "bison_parser.y" { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::UNIQUE, (yyvsp[-1].str_vec)); } -#line 3708 "bison_parser.cpp" +#line 3721 "bison_parser.cpp" break; - case 85: /* drop_statement: DROP TABLE opt_exists table_name */ -#line 642 "bison_parser.y" + case 86: /* drop_statement: DROP TABLE opt_exists table_name */ +#line 646 "bison_parser.y" { (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 3719 "bison_parser.cpp" +#line 3732 "bison_parser.cpp" break; - case 86: /* drop_statement: DROP VIEW opt_exists table_name */ -#line 648 "bison_parser.y" + case 87: /* drop_statement: DROP VIEW opt_exists table_name */ +#line 652 "bison_parser.y" { (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 3730 "bison_parser.cpp" +#line 3743 "bison_parser.cpp" break; - case 87: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ -#line 654 "bison_parser.y" + case 88: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ +#line 658 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); (yyval.drop_stmt)->ifExists = false; (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 3740 "bison_parser.cpp" +#line 3753 "bison_parser.cpp" break; - case 88: /* drop_statement: DROP INDEX opt_exists index_name */ -#line 660 "bison_parser.y" + case 89: /* drop_statement: DROP INDEX opt_exists index_name */ +#line 664 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropIndex); (yyval.drop_stmt)->ifExists = (yyvsp[-1].bval); (yyval.drop_stmt)->indexName = (yyvsp[0].sval); } -#line 3750 "bison_parser.cpp" +#line 3763 "bison_parser.cpp" break; - case 89: /* opt_exists: IF EXISTS */ -#line 668 "bison_parser.y" + case 90: /* opt_exists: IF EXISTS */ +#line 672 "bison_parser.y" { (yyval.bval) = true; } -#line 3756 "bison_parser.cpp" +#line 3769 "bison_parser.cpp" break; - case 90: /* opt_exists: %empty */ -#line 669 "bison_parser.y" + case 91: /* opt_exists: %empty */ +#line 673 "bison_parser.y" { (yyval.bval) = false; } -#line 3762 "bison_parser.cpp" +#line 3775 "bison_parser.cpp" break; - case 91: /* alter_statement: ALTER TABLE opt_exists table_name alter_action */ -#line 678 "bison_parser.y" + case 92: /* alter_statement: ALTER TABLE opt_exists table_name alter_action */ +#line 682 "bison_parser.y" { (yyval.alter_stmt) = new AlterStatement((yyvsp[-1].table_name).name, (yyvsp[0].alter_action_t)); (yyval.alter_stmt)->ifTableExists = (yyvsp[-2].bval); (yyval.alter_stmt)->schema = (yyvsp[-1].table_name).schema; } -#line 3772 "bison_parser.cpp" +#line 3785 "bison_parser.cpp" break; - case 92: /* alter_action: drop_action */ -#line 686 "bison_parser.y" + case 93: /* alter_action: drop_action */ +#line 690 "bison_parser.y" {(yyval.alter_action_t) = (yyvsp[0].drop_action_t);} -#line 3778 "bison_parser.cpp" +#line 3791 "bison_parser.cpp" break; - case 93: /* drop_action: DROP COLUMN opt_exists column_name */ -#line 689 "bison_parser.y" + case 94: /* drop_action: DROP COLUMN opt_exists column_name */ +#line 693 "bison_parser.y" { (yyval.drop_action_t) = new DropColumnAction((yyvsp[0].expr)->name); (yyval.drop_action_t)->ifExists = (yyvsp[-1].bval); } -#line 3787 "bison_parser.cpp" +#line 3800 "bison_parser.cpp" break; - case 94: /* delete_statement: DELETE FROM table_name opt_where */ -#line 701 "bison_parser.y" + case 95: /* delete_statement: DELETE FROM table_name opt_where */ +#line 705 "bison_parser.y" { (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 3798 "bison_parser.cpp" +#line 3811 "bison_parser.cpp" break; - case 95: /* truncate_statement: TRUNCATE table_name */ -#line 710 "bison_parser.y" + case 96: /* truncate_statement: TRUNCATE table_name */ +#line 714 "bison_parser.y" { (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3808 "bison_parser.cpp" +#line 3821 "bison_parser.cpp" break; - case 96: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ -#line 723 "bison_parser.y" + case 97: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ +#line 727 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertValues); (yyval.insert_stmt)->schema = (yyvsp[-5].table_name).schema; @@ -3816,11 +3829,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } -#line 3820 "bison_parser.cpp" +#line 3833 "bison_parser.cpp" break; - case 97: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ -#line 730 "bison_parser.y" + case 98: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ +#line 734 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertSelect); (yyval.insert_stmt)->schema = (yyvsp[-2].table_name).schema; @@ -3828,74 +3841,74 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } -#line 3832 "bison_parser.cpp" +#line 3845 "bison_parser.cpp" break; - case 98: /* opt_column_list: '(' ident_commalist ')' */ -#line 741 "bison_parser.y" + case 99: /* opt_column_list: '(' ident_commalist ')' */ +#line 745 "bison_parser.y" { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 3838 "bison_parser.cpp" +#line 3851 "bison_parser.cpp" break; - case 99: /* opt_column_list: %empty */ -#line 742 "bison_parser.y" + case 100: /* opt_column_list: %empty */ +#line 746 "bison_parser.y" { (yyval.str_vec) = nullptr; } -#line 3844 "bison_parser.cpp" +#line 3857 "bison_parser.cpp" break; - case 100: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ -#line 752 "bison_parser.y" + case 101: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ +#line 756 "bison_parser.y" { (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 3855 "bison_parser.cpp" +#line 3868 "bison_parser.cpp" break; - case 101: /* update_clause_commalist: update_clause */ -#line 761 "bison_parser.y" + case 102: /* update_clause_commalist: update_clause */ +#line 765 "bison_parser.y" { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 3861 "bison_parser.cpp" +#line 3874 "bison_parser.cpp" break; - case 102: /* update_clause_commalist: update_clause_commalist ',' update_clause */ -#line 762 "bison_parser.y" + case 103: /* update_clause_commalist: update_clause_commalist ',' update_clause */ +#line 766 "bison_parser.y" { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 3867 "bison_parser.cpp" +#line 3880 "bison_parser.cpp" break; - case 103: /* update_clause: IDENTIFIER '=' expr */ -#line 766 "bison_parser.y" + case 104: /* update_clause: IDENTIFIER '=' expr */ +#line 770 "bison_parser.y" { (yyval.update_t) = new UpdateClause(); (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 3877 "bison_parser.cpp" +#line 3890 "bison_parser.cpp" break; - case 104: /* select_statement: opt_with_clause select_with_paren */ -#line 778 "bison_parser.y" + case 105: /* select_statement: opt_with_clause select_with_paren */ +#line 782 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3886 "bison_parser.cpp" +#line 3899 "bison_parser.cpp" break; - case 105: /* select_statement: opt_with_clause select_no_paren */ -#line 782 "bison_parser.y" + case 106: /* select_statement: opt_with_clause select_no_paren */ +#line 786 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3895 "bison_parser.cpp" +#line 3908 "bison_parser.cpp" break; - case 106: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ -#line 786 "bison_parser.y" + case 107: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ +#line 790 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3907,17 +3920,17 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); (yyval.select_stmt)->withDescriptions = (yyvsp[-5].with_description_vec); } -#line 3911 "bison_parser.cpp" +#line 3924 "bison_parser.cpp" break; - case 109: /* select_within_set_operation_no_parentheses: select_clause */ -#line 804 "bison_parser.y" + case 110: /* select_within_set_operation_no_parentheses: select_clause */ +#line 808 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); } -#line 3917 "bison_parser.cpp" +#line 3930 "bison_parser.cpp" break; - case 110: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ -#line 805 "bison_parser.y" + case 111: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ +#line 809 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3926,23 +3939,23 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->push_back((yyvsp[-1].set_operator_t)); (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[0].select_stmt); } -#line 3930 "bison_parser.cpp" +#line 3943 "bison_parser.cpp" break; - case 111: /* select_with_paren: '(' select_no_paren ')' */ -#line 816 "bison_parser.y" + case 112: /* select_with_paren: '(' select_no_paren ')' */ +#line 820 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3936 "bison_parser.cpp" +#line 3949 "bison_parser.cpp" break; - case 112: /* select_with_paren: '(' select_with_paren ')' */ -#line 817 "bison_parser.y" + case 113: /* select_with_paren: '(' select_with_paren ')' */ +#line 821 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3942 "bison_parser.cpp" +#line 3955 "bison_parser.cpp" break; - case 113: /* select_no_paren: select_clause opt_order opt_limit */ -#line 821 "bison_parser.y" + case 114: /* select_no_paren: select_clause opt_order opt_limit */ +#line 825 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); (yyval.select_stmt)->order = (yyvsp[-1].order_vec); @@ -3953,11 +3966,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3957 "bison_parser.cpp" +#line 3970 "bison_parser.cpp" break; - case 114: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ -#line 831 "bison_parser.y" + case 115: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ +#line 835 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3968,63 +3981,63 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); } -#line 3972 "bison_parser.cpp" +#line 3985 "bison_parser.cpp" break; - case 115: /* set_operator: set_type opt_all */ -#line 844 "bison_parser.y" + case 116: /* set_operator: set_type opt_all */ +#line 848 "bison_parser.y" { (yyval.set_operator_t) = (yyvsp[-1].set_operator_t); (yyval.set_operator_t)->isAll = (yyvsp[0].bval); } -#line 3981 "bison_parser.cpp" +#line 3994 "bison_parser.cpp" break; - case 116: /* set_type: UNION */ -#line 851 "bison_parser.y" + case 117: /* set_type: UNION */ +#line 855 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetUnion; } -#line 3990 "bison_parser.cpp" +#line 4003 "bison_parser.cpp" break; - case 117: /* set_type: INTERSECT */ -#line 855 "bison_parser.y" + case 118: /* set_type: INTERSECT */ +#line 859 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetIntersect; } -#line 3999 "bison_parser.cpp" +#line 4012 "bison_parser.cpp" break; - case 118: /* set_type: EXCEPT */ -#line 859 "bison_parser.y" + case 119: /* set_type: EXCEPT */ +#line 863 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetExcept; } -#line 4008 "bison_parser.cpp" +#line 4021 "bison_parser.cpp" break; - case 119: /* opt_all: ALL */ -#line 866 "bison_parser.y" + case 120: /* opt_all: ALL */ +#line 870 "bison_parser.y" { (yyval.bval) = true; } -#line 4016 "bison_parser.cpp" +#line 4029 "bison_parser.cpp" break; - case 120: /* opt_all: %empty */ -#line 869 "bison_parser.y" + case 121: /* opt_all: %empty */ +#line 873 "bison_parser.y" { (yyval.bval) = false; } -#line 4024 "bison_parser.cpp" +#line 4037 "bison_parser.cpp" break; - case 121: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ -#line 875 "bison_parser.y" + case 122: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ +#line 879 "bison_parser.y" { (yyval.select_stmt) = new SelectStatement(); (yyval.select_stmt)->limit = (yyvsp[-5].limit); @@ -4034,213 +4047,213 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 4038 "bison_parser.cpp" +#line 4051 "bison_parser.cpp" break; - case 122: /* opt_distinct: DISTINCT */ -#line 887 "bison_parser.y" + case 123: /* opt_distinct: DISTINCT */ +#line 891 "bison_parser.y" { (yyval.bval) = true; } -#line 4044 "bison_parser.cpp" +#line 4057 "bison_parser.cpp" break; - case 123: /* opt_distinct: %empty */ -#line 888 "bison_parser.y" + case 124: /* opt_distinct: %empty */ +#line 892 "bison_parser.y" { (yyval.bval) = false; } -#line 4050 "bison_parser.cpp" +#line 4063 "bison_parser.cpp" break; - case 125: /* opt_from_clause: from_clause */ -#line 896 "bison_parser.y" + case 126: /* opt_from_clause: from_clause */ +#line 900 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 4056 "bison_parser.cpp" +#line 4069 "bison_parser.cpp" break; - case 126: /* opt_from_clause: %empty */ -#line 897 "bison_parser.y" + case 127: /* opt_from_clause: %empty */ +#line 901 "bison_parser.y" { (yyval.table) = nullptr; } -#line 4062 "bison_parser.cpp" +#line 4075 "bison_parser.cpp" break; - case 127: /* from_clause: FROM table_ref */ -#line 901 "bison_parser.y" + case 128: /* from_clause: FROM table_ref */ +#line 905 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 4068 "bison_parser.cpp" +#line 4081 "bison_parser.cpp" break; - case 128: /* opt_where: WHERE expr */ -#line 906 "bison_parser.y" + case 129: /* opt_where: WHERE expr */ +#line 910 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 4074 "bison_parser.cpp" +#line 4087 "bison_parser.cpp" break; - case 129: /* opt_where: %empty */ -#line 907 "bison_parser.y" + case 130: /* opt_where: %empty */ +#line 911 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 4080 "bison_parser.cpp" +#line 4093 "bison_parser.cpp" break; - case 130: /* opt_group: GROUP BY expr_list opt_having */ -#line 911 "bison_parser.y" + case 131: /* opt_group: GROUP BY expr_list opt_having */ +#line 915 "bison_parser.y" { (yyval.group_t) = new GroupByDescription(); (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 4090 "bison_parser.cpp" +#line 4103 "bison_parser.cpp" break; - case 131: /* opt_group: %empty */ -#line 916 "bison_parser.y" + case 132: /* opt_group: %empty */ +#line 920 "bison_parser.y" { (yyval.group_t) = nullptr; } -#line 4096 "bison_parser.cpp" +#line 4109 "bison_parser.cpp" break; - case 132: /* opt_having: HAVING expr */ -#line 920 "bison_parser.y" + case 133: /* opt_having: HAVING expr */ +#line 924 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 4102 "bison_parser.cpp" +#line 4115 "bison_parser.cpp" break; - case 133: /* opt_having: %empty */ -#line 921 "bison_parser.y" + case 134: /* opt_having: %empty */ +#line 925 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 4108 "bison_parser.cpp" +#line 4121 "bison_parser.cpp" break; - case 134: /* opt_order: ORDER BY order_list */ -#line 925 "bison_parser.y" + case 135: /* opt_order: ORDER BY order_list */ +#line 929 "bison_parser.y" { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 4114 "bison_parser.cpp" +#line 4127 "bison_parser.cpp" break; - case 135: /* opt_order: %empty */ -#line 926 "bison_parser.y" + case 136: /* opt_order: %empty */ +#line 930 "bison_parser.y" { (yyval.order_vec) = nullptr; } -#line 4120 "bison_parser.cpp" +#line 4133 "bison_parser.cpp" break; - case 136: /* order_list: order_desc */ -#line 930 "bison_parser.y" + case 137: /* order_list: order_desc */ +#line 934 "bison_parser.y" { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 4126 "bison_parser.cpp" +#line 4139 "bison_parser.cpp" break; - case 137: /* order_list: order_list ',' order_desc */ -#line 931 "bison_parser.y" + case 138: /* order_list: order_list ',' order_desc */ +#line 935 "bison_parser.y" { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 4132 "bison_parser.cpp" +#line 4145 "bison_parser.cpp" break; - case 138: /* order_desc: expr opt_order_type */ -#line 935 "bison_parser.y" + case 139: /* order_desc: expr opt_order_type */ +#line 939 "bison_parser.y" { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 4138 "bison_parser.cpp" +#line 4151 "bison_parser.cpp" break; - case 139: /* opt_order_type: ASC */ -#line 939 "bison_parser.y" + case 140: /* opt_order_type: ASC */ +#line 943 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 4144 "bison_parser.cpp" +#line 4157 "bison_parser.cpp" break; - case 140: /* opt_order_type: DESC */ -#line 940 "bison_parser.y" + case 141: /* opt_order_type: DESC */ +#line 944 "bison_parser.y" { (yyval.order_type) = kOrderDesc; } -#line 4150 "bison_parser.cpp" +#line 4163 "bison_parser.cpp" break; - case 141: /* opt_order_type: %empty */ -#line 941 "bison_parser.y" + case 142: /* opt_order_type: %empty */ +#line 945 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 4156 "bison_parser.cpp" +#line 4169 "bison_parser.cpp" break; - case 142: /* opt_top: TOP int_literal */ -#line 947 "bison_parser.y" + case 143: /* opt_top: TOP int_literal */ +#line 951 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 4162 "bison_parser.cpp" +#line 4175 "bison_parser.cpp" break; - case 143: /* opt_top: %empty */ -#line 948 "bison_parser.y" + case 144: /* opt_top: %empty */ +#line 952 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 4168 "bison_parser.cpp" +#line 4181 "bison_parser.cpp" break; - case 144: /* opt_limit: LIMIT expr */ -#line 952 "bison_parser.y" + case 145: /* opt_limit: LIMIT expr */ +#line 956 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 4174 "bison_parser.cpp" +#line 4187 "bison_parser.cpp" break; - case 145: /* opt_limit: OFFSET expr */ -#line 953 "bison_parser.y" + case 146: /* opt_limit: OFFSET expr */ +#line 957 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 4180 "bison_parser.cpp" +#line 4193 "bison_parser.cpp" break; - case 146: /* opt_limit: LIMIT expr OFFSET expr */ -#line 954 "bison_parser.y" + case 147: /* opt_limit: LIMIT expr OFFSET expr */ +#line 958 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4186 "bison_parser.cpp" +#line 4199 "bison_parser.cpp" break; - case 147: /* opt_limit: LIMIT ALL */ -#line 955 "bison_parser.y" + case 148: /* opt_limit: LIMIT ALL */ +#line 959 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, nullptr); } -#line 4192 "bison_parser.cpp" +#line 4205 "bison_parser.cpp" break; - case 148: /* opt_limit: LIMIT ALL OFFSET expr */ -#line 956 "bison_parser.y" + case 149: /* opt_limit: LIMIT ALL OFFSET expr */ +#line 960 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 4198 "bison_parser.cpp" +#line 4211 "bison_parser.cpp" break; - case 149: /* opt_limit: %empty */ -#line 957 "bison_parser.y" + case 150: /* opt_limit: %empty */ +#line 961 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 4204 "bison_parser.cpp" +#line 4217 "bison_parser.cpp" break; - case 150: /* expr_list: expr_alias */ -#line 964 "bison_parser.y" + case 151: /* expr_list: expr_alias */ +#line 968 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4210 "bison_parser.cpp" +#line 4223 "bison_parser.cpp" break; - case 151: /* expr_list: expr_list ',' expr_alias */ -#line 965 "bison_parser.y" + case 152: /* expr_list: expr_list ',' expr_alias */ +#line 969 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4216 "bison_parser.cpp" +#line 4229 "bison_parser.cpp" break; - case 152: /* opt_literal_list: literal_list */ -#line 969 "bison_parser.y" + case 153: /* opt_literal_list: literal_list */ +#line 973 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[0].expr_vec); } -#line 4222 "bison_parser.cpp" +#line 4235 "bison_parser.cpp" break; - case 153: /* opt_literal_list: %empty */ -#line 970 "bison_parser.y" + case 154: /* opt_literal_list: %empty */ +#line 974 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 4228 "bison_parser.cpp" +#line 4241 "bison_parser.cpp" break; - case 154: /* literal_list: literal */ -#line 974 "bison_parser.y" + case 155: /* literal_list: literal */ +#line 978 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4234 "bison_parser.cpp" +#line 4247 "bison_parser.cpp" break; - case 155: /* literal_list: literal_list ',' literal */ -#line 975 "bison_parser.y" + case 156: /* literal_list: literal_list ',' literal */ +#line 979 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4240 "bison_parser.cpp" +#line 4253 "bison_parser.cpp" break; - case 156: /* expr_alias: expr opt_alias */ -#line 979 "bison_parser.y" + case 157: /* expr_alias: expr opt_alias */ +#line 983 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); if ((yyvsp[0].alias_t)) { @@ -4248,377 +4261,377 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].alias_t); } } -#line 4252 "bison_parser.cpp" +#line 4265 "bison_parser.cpp" break; - case 162: /* operand: '(' expr ')' */ -#line 997 "bison_parser.y" + case 163: /* operand: '(' expr ')' */ +#line 1001 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); } -#line 4258 "bison_parser.cpp" +#line 4271 "bison_parser.cpp" break; - case 172: /* operand: '(' select_no_paren ')' */ -#line 1007 "bison_parser.y" + case 173: /* operand: '(' select_no_paren ')' */ +#line 1011 "bison_parser.y" { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 4264 "bison_parser.cpp" +#line 4277 "bison_parser.cpp" break; - case 175: /* unary_expr: '-' operand */ -#line 1016 "bison_parser.y" + case 176: /* unary_expr: '-' operand */ +#line 1020 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 4270 "bison_parser.cpp" +#line 4283 "bison_parser.cpp" break; - case 176: /* unary_expr: NOT operand */ -#line 1017 "bison_parser.y" + case 177: /* unary_expr: NOT operand */ +#line 1021 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 4276 "bison_parser.cpp" +#line 4289 "bison_parser.cpp" break; - case 177: /* unary_expr: operand ISNULL */ -#line 1018 "bison_parser.y" + case 178: /* unary_expr: operand ISNULL */ +#line 1022 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 4282 "bison_parser.cpp" +#line 4295 "bison_parser.cpp" break; - case 178: /* unary_expr: operand IS NULL */ -#line 1019 "bison_parser.y" + case 179: /* unary_expr: operand IS NULL */ +#line 1023 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 4288 "bison_parser.cpp" +#line 4301 "bison_parser.cpp" break; - case 179: /* unary_expr: operand IS NOT NULL */ -#line 1020 "bison_parser.y" + case 180: /* unary_expr: operand IS NOT NULL */ +#line 1024 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 4294 "bison_parser.cpp" +#line 4307 "bison_parser.cpp" break; - case 181: /* binary_expr: operand '-' operand */ -#line 1025 "bison_parser.y" + case 182: /* binary_expr: operand '-' operand */ +#line 1029 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 4300 "bison_parser.cpp" +#line 4313 "bison_parser.cpp" break; - case 182: /* binary_expr: operand '+' operand */ -#line 1026 "bison_parser.y" + case 183: /* binary_expr: operand '+' operand */ +#line 1030 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 4306 "bison_parser.cpp" +#line 4319 "bison_parser.cpp" break; - case 183: /* binary_expr: operand '/' operand */ -#line 1027 "bison_parser.y" + case 184: /* binary_expr: operand '/' operand */ +#line 1031 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 4312 "bison_parser.cpp" +#line 4325 "bison_parser.cpp" break; - case 184: /* binary_expr: operand '*' operand */ -#line 1028 "bison_parser.y" + case 185: /* binary_expr: operand '*' operand */ +#line 1032 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 4318 "bison_parser.cpp" +#line 4331 "bison_parser.cpp" break; - case 185: /* binary_expr: operand '%' operand */ -#line 1029 "bison_parser.y" + case 186: /* binary_expr: operand '%' operand */ +#line 1033 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 4324 "bison_parser.cpp" +#line 4337 "bison_parser.cpp" break; - case 186: /* binary_expr: operand '^' operand */ -#line 1030 "bison_parser.y" + case 187: /* binary_expr: operand '^' operand */ +#line 1034 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 4330 "bison_parser.cpp" +#line 4343 "bison_parser.cpp" break; - case 187: /* binary_expr: operand LIKE operand */ -#line 1031 "bison_parser.y" + case 188: /* binary_expr: operand LIKE operand */ +#line 1035 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 4336 "bison_parser.cpp" +#line 4349 "bison_parser.cpp" break; - case 188: /* binary_expr: operand NOT LIKE operand */ -#line 1032 "bison_parser.y" + case 189: /* binary_expr: operand NOT LIKE operand */ +#line 1036 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 4342 "bison_parser.cpp" +#line 4355 "bison_parser.cpp" break; - case 189: /* binary_expr: operand ILIKE operand */ -#line 1033 "bison_parser.y" + case 190: /* binary_expr: operand ILIKE operand */ +#line 1037 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 4348 "bison_parser.cpp" +#line 4361 "bison_parser.cpp" break; - case 190: /* binary_expr: operand CONCAT operand */ -#line 1034 "bison_parser.y" + case 191: /* binary_expr: operand CONCAT operand */ +#line 1038 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 4354 "bison_parser.cpp" +#line 4367 "bison_parser.cpp" break; - case 191: /* logic_expr: expr AND expr */ -#line 1038 "bison_parser.y" + case 192: /* logic_expr: expr AND expr */ +#line 1042 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 4360 "bison_parser.cpp" +#line 4373 "bison_parser.cpp" break; - case 192: /* logic_expr: expr OR expr */ -#line 1039 "bison_parser.y" + case 193: /* logic_expr: expr OR expr */ +#line 1043 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 4366 "bison_parser.cpp" +#line 4379 "bison_parser.cpp" break; - case 193: /* in_expr: operand IN '(' expr_list ')' */ -#line 1043 "bison_parser.y" + case 194: /* in_expr: operand IN '(' expr_list ')' */ +#line 1047 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 4372 "bison_parser.cpp" +#line 4385 "bison_parser.cpp" break; - case 194: /* in_expr: operand NOT IN '(' expr_list ')' */ -#line 1044 "bison_parser.y" + case 195: /* in_expr: operand NOT IN '(' expr_list ')' */ +#line 1048 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 4378 "bison_parser.cpp" +#line 4391 "bison_parser.cpp" break; - case 195: /* in_expr: operand IN '(' select_no_paren ')' */ -#line 1045 "bison_parser.y" + case 196: /* in_expr: operand IN '(' select_no_paren ')' */ +#line 1049 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 4384 "bison_parser.cpp" +#line 4397 "bison_parser.cpp" break; - case 196: /* in_expr: operand NOT IN '(' select_no_paren ')' */ -#line 1046 "bison_parser.y" + case 197: /* in_expr: operand NOT IN '(' select_no_paren ')' */ +#line 1050 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 4390 "bison_parser.cpp" +#line 4403 "bison_parser.cpp" break; - case 197: /* case_expr: CASE expr case_list END */ -#line 1052 "bison_parser.y" + case 198: /* case_expr: CASE expr case_list END */ +#line 1056 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } -#line 4396 "bison_parser.cpp" +#line 4409 "bison_parser.cpp" break; - case 198: /* case_expr: CASE expr case_list ELSE expr END */ -#line 1053 "bison_parser.y" + case 199: /* case_expr: CASE expr case_list ELSE expr END */ +#line 1057 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4402 "bison_parser.cpp" +#line 4415 "bison_parser.cpp" break; - case 199: /* case_expr: CASE case_list END */ -#line 1054 "bison_parser.y" + case 200: /* case_expr: CASE case_list END */ +#line 1058 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } -#line 4408 "bison_parser.cpp" +#line 4421 "bison_parser.cpp" break; - case 200: /* case_expr: CASE case_list ELSE expr END */ -#line 1055 "bison_parser.y" + case 201: /* case_expr: CASE case_list ELSE expr END */ +#line 1059 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4414 "bison_parser.cpp" +#line 4427 "bison_parser.cpp" break; - case 201: /* case_list: WHEN expr THEN expr */ -#line 1059 "bison_parser.y" + case 202: /* case_list: WHEN expr THEN expr */ +#line 1063 "bison_parser.y" { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4420 "bison_parser.cpp" +#line 4433 "bison_parser.cpp" break; - case 202: /* case_list: case_list WHEN expr THEN expr */ -#line 1060 "bison_parser.y" + case 203: /* case_list: case_list WHEN expr THEN expr */ +#line 1064 "bison_parser.y" { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4426 "bison_parser.cpp" +#line 4439 "bison_parser.cpp" break; - case 203: /* exists_expr: EXISTS '(' select_no_paren ')' */ -#line 1064 "bison_parser.y" + case 204: /* exists_expr: EXISTS '(' select_no_paren ')' */ +#line 1068 "bison_parser.y" { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 4432 "bison_parser.cpp" +#line 4445 "bison_parser.cpp" break; - case 204: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ -#line 1065 "bison_parser.y" + case 205: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ +#line 1069 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 4438 "bison_parser.cpp" +#line 4451 "bison_parser.cpp" break; - case 205: /* comp_expr: operand '=' operand */ -#line 1069 "bison_parser.y" + case 206: /* comp_expr: operand '=' operand */ +#line 1073 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4444 "bison_parser.cpp" +#line 4457 "bison_parser.cpp" break; - case 206: /* comp_expr: operand EQUALS operand */ -#line 1070 "bison_parser.y" + case 207: /* comp_expr: operand EQUALS operand */ +#line 1074 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4450 "bison_parser.cpp" +#line 4463 "bison_parser.cpp" break; - case 207: /* comp_expr: operand NOTEQUALS operand */ -#line 1071 "bison_parser.y" + case 208: /* comp_expr: operand NOTEQUALS operand */ +#line 1075 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 4456 "bison_parser.cpp" +#line 4469 "bison_parser.cpp" break; - case 208: /* comp_expr: operand '<' operand */ -#line 1072 "bison_parser.y" + case 209: /* comp_expr: operand '<' operand */ +#line 1076 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 4462 "bison_parser.cpp" +#line 4475 "bison_parser.cpp" break; - case 209: /* comp_expr: operand '>' operand */ -#line 1073 "bison_parser.y" + case 210: /* comp_expr: operand '>' operand */ +#line 1077 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 4468 "bison_parser.cpp" +#line 4481 "bison_parser.cpp" break; - case 210: /* comp_expr: operand LESSEQ operand */ -#line 1074 "bison_parser.y" + case 211: /* comp_expr: operand LESSEQ operand */ +#line 1078 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 4474 "bison_parser.cpp" +#line 4487 "bison_parser.cpp" break; - case 211: /* comp_expr: operand GREATEREQ operand */ -#line 1075 "bison_parser.y" + case 212: /* comp_expr: operand GREATEREQ operand */ +#line 1079 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 4480 "bison_parser.cpp" +#line 4493 "bison_parser.cpp" break; - case 212: /* function_expr: IDENTIFIER '(' ')' */ -#line 1079 "bison_parser.y" + case 213: /* function_expr: IDENTIFIER '(' ')' */ +#line 1083 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 4486 "bison_parser.cpp" +#line 4499 "bison_parser.cpp" break; - case 213: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ -#line 1080 "bison_parser.y" + case 214: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ +#line 1084 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 4492 "bison_parser.cpp" +#line 4505 "bison_parser.cpp" break; - case 214: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ -#line 1084 "bison_parser.y" + case 215: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ +#line 1088 "bison_parser.y" { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } -#line 4498 "bison_parser.cpp" +#line 4511 "bison_parser.cpp" break; - case 215: /* cast_expr: CAST '(' expr AS column_type ')' */ -#line 1088 "bison_parser.y" + case 216: /* cast_expr: CAST '(' expr AS column_type ')' */ +#line 1092 "bison_parser.y" { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } -#line 4504 "bison_parser.cpp" +#line 4517 "bison_parser.cpp" break; - case 216: /* datetime_field: SECOND */ -#line 1092 "bison_parser.y" + case 217: /* datetime_field: SECOND */ +#line 1096 "bison_parser.y" { (yyval.datetime_field) = kDatetimeSecond; } -#line 4510 "bison_parser.cpp" +#line 4523 "bison_parser.cpp" break; - case 217: /* datetime_field: MINUTE */ -#line 1093 "bison_parser.y" + case 218: /* datetime_field: MINUTE */ +#line 1097 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMinute; } -#line 4516 "bison_parser.cpp" +#line 4529 "bison_parser.cpp" break; - case 218: /* datetime_field: HOUR */ -#line 1094 "bison_parser.y" + case 219: /* datetime_field: HOUR */ +#line 1098 "bison_parser.y" { (yyval.datetime_field) = kDatetimeHour; } -#line 4522 "bison_parser.cpp" +#line 4535 "bison_parser.cpp" break; - case 219: /* datetime_field: DAY */ -#line 1095 "bison_parser.y" + case 220: /* datetime_field: DAY */ +#line 1099 "bison_parser.y" { (yyval.datetime_field) = kDatetimeDay; } -#line 4528 "bison_parser.cpp" +#line 4541 "bison_parser.cpp" break; - case 220: /* datetime_field: MONTH */ -#line 1096 "bison_parser.y" + case 221: /* datetime_field: MONTH */ +#line 1100 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMonth; } -#line 4534 "bison_parser.cpp" +#line 4547 "bison_parser.cpp" break; - case 221: /* datetime_field: YEAR */ -#line 1097 "bison_parser.y" + case 222: /* datetime_field: YEAR */ +#line 1101 "bison_parser.y" { (yyval.datetime_field) = kDatetimeYear; } -#line 4540 "bison_parser.cpp" +#line 4553 "bison_parser.cpp" break; - case 222: /* array_expr: ARRAY '[' expr_list ']' */ -#line 1101 "bison_parser.y" + case 223: /* array_expr: ARRAY '[' expr_list ']' */ +#line 1105 "bison_parser.y" { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 4546 "bison_parser.cpp" +#line 4559 "bison_parser.cpp" break; - case 223: /* array_index: operand '[' int_literal ']' */ -#line 1105 "bison_parser.y" + case 224: /* array_index: operand '[' int_literal ']' */ +#line 1109 "bison_parser.y" { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 4552 "bison_parser.cpp" +#line 4565 "bison_parser.cpp" break; - case 224: /* between_expr: operand BETWEEN operand AND operand */ -#line 1109 "bison_parser.y" + case 225: /* between_expr: operand BETWEEN operand AND operand */ +#line 1113 "bison_parser.y" { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4558 "bison_parser.cpp" +#line 4571 "bison_parser.cpp" break; - case 225: /* column_name: IDENTIFIER */ -#line 1113 "bison_parser.y" + case 226: /* column_name: IDENTIFIER */ +#line 1117 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 4564 "bison_parser.cpp" +#line 4577 "bison_parser.cpp" break; - case 226: /* column_name: IDENTIFIER '.' IDENTIFIER */ -#line 1114 "bison_parser.y" + case 227: /* column_name: IDENTIFIER '.' IDENTIFIER */ +#line 1118 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 4570 "bison_parser.cpp" +#line 4583 "bison_parser.cpp" break; - case 227: /* column_name: '*' */ -#line 1115 "bison_parser.y" + case 228: /* column_name: '*' */ +#line 1119 "bison_parser.y" { (yyval.expr) = Expr::makeStar(); } -#line 4576 "bison_parser.cpp" +#line 4589 "bison_parser.cpp" break; - case 228: /* column_name: IDENTIFIER '.' '*' */ -#line 1116 "bison_parser.y" + case 229: /* column_name: IDENTIFIER '.' '*' */ +#line 1120 "bison_parser.y" { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 4582 "bison_parser.cpp" +#line 4595 "bison_parser.cpp" break; - case 235: /* string_literal: STRING */ -#line 1129 "bison_parser.y" + case 236: /* string_literal: STRING */ +#line 1133 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 4588 "bison_parser.cpp" +#line 4601 "bison_parser.cpp" break; - case 236: /* bool_literal: TRUE */ -#line 1133 "bison_parser.y" + case 237: /* bool_literal: TRUE */ +#line 1137 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(true); } -#line 4594 "bison_parser.cpp" +#line 4607 "bison_parser.cpp" break; - case 237: /* bool_literal: FALSE */ -#line 1134 "bison_parser.y" + case 238: /* bool_literal: FALSE */ +#line 1138 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(false); } -#line 4600 "bison_parser.cpp" +#line 4613 "bison_parser.cpp" break; - case 238: /* num_literal: FLOATVAL */ -#line 1138 "bison_parser.y" + case 239: /* num_literal: FLOATVAL */ +#line 1142 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 4606 "bison_parser.cpp" +#line 4619 "bison_parser.cpp" break; - case 240: /* int_literal: INTVAL */ -#line 1143 "bison_parser.y" + case 241: /* int_literal: INTVAL */ +#line 1147 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 4612 "bison_parser.cpp" +#line 4625 "bison_parser.cpp" break; - case 241: /* null_literal: NULL */ -#line 1147 "bison_parser.y" + case 242: /* null_literal: NULL */ +#line 1151 "bison_parser.y" { (yyval.expr) = Expr::makeNullLiteral(); } -#line 4618 "bison_parser.cpp" +#line 4631 "bison_parser.cpp" break; - case 242: /* date_literal: DATE STRING */ -#line 1151 "bison_parser.y" + case 243: /* date_literal: DATE STRING */ +#line 1155 "bison_parser.y" { int day{0}, month{0}, year{0}, chars_parsed{0}; // If the whole string is parsed, chars_parsed points to the terminating null byte after the last character @@ -4629,55 +4642,55 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expr) = Expr::makeDateLiteral((yyvsp[0].sval)); } -#line 4633 "bison_parser.cpp" +#line 4646 "bison_parser.cpp" break; - case 243: /* param_expr: '?' */ -#line 1164 "bison_parser.y" + case 244: /* param_expr: '?' */ +#line 1168 "bison_parser.y" { (yyval.expr) = Expr::makeParameter(yylloc.total_column); (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 4643 "bison_parser.cpp" +#line 4656 "bison_parser.cpp" break; - case 245: /* table_ref: table_ref_commalist ',' table_ref_atomic */ -#line 1177 "bison_parser.y" + case 246: /* table_ref: table_ref_commalist ',' table_ref_atomic */ +#line 1181 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); auto tbl = new TableRef(kTableCrossProduct); tbl->list = (yyvsp[-2].table_vec); (yyval.table) = tbl; } -#line 4654 "bison_parser.cpp" +#line 4667 "bison_parser.cpp" break; - case 249: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ -#line 1193 "bison_parser.y" + case 250: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ +#line 1197 "bison_parser.y" { auto tbl = new TableRef(kTableSelect); tbl->select = (yyvsp[-2].select_stmt); tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4665 "bison_parser.cpp" +#line 4678 "bison_parser.cpp" break; - case 250: /* table_ref_commalist: table_ref_atomic */ -#line 1202 "bison_parser.y" + case 251: /* table_ref_commalist: table_ref_atomic */ +#line 1206 "bison_parser.y" { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 4671 "bison_parser.cpp" +#line 4684 "bison_parser.cpp" break; - case 251: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ -#line 1203 "bison_parser.y" + case 252: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ +#line 1207 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 4677 "bison_parser.cpp" +#line 4690 "bison_parser.cpp" break; - case 252: /* table_ref_name: table_name opt_table_alias */ -#line 1208 "bison_parser.y" + case 253: /* table_ref_name: table_name opt_table_alias */ +#line 1212 "bison_parser.y" { auto tbl = new TableRef(kTableName); tbl->schema = (yyvsp[-1].table_name).schema; @@ -4685,121 +4698,121 @@ YYLTYPE yylloc = yyloc_default; tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4689 "bison_parser.cpp" +#line 4702 "bison_parser.cpp" break; - case 253: /* table_ref_name_no_alias: table_name */ -#line 1219 "bison_parser.y" + case 254: /* table_ref_name_no_alias: table_name */ +#line 1223 "bison_parser.y" { (yyval.table) = new TableRef(kTableName); (yyval.table)->schema = (yyvsp[0].table_name).schema; (yyval.table)->name = (yyvsp[0].table_name).name; } -#line 4699 "bison_parser.cpp" +#line 4712 "bison_parser.cpp" break; - case 254: /* table_name: IDENTIFIER */ -#line 1228 "bison_parser.y" + case 255: /* table_name: IDENTIFIER */ +#line 1232 "bison_parser.y" { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} -#line 4705 "bison_parser.cpp" +#line 4718 "bison_parser.cpp" break; - case 255: /* table_name: IDENTIFIER '.' IDENTIFIER */ -#line 1229 "bison_parser.y" + case 256: /* table_name: IDENTIFIER '.' IDENTIFIER */ +#line 1233 "bison_parser.y" { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } -#line 4711 "bison_parser.cpp" +#line 4724 "bison_parser.cpp" break; - case 256: /* opt_index_name: IDENTIFIER */ -#line 1233 "bison_parser.y" + case 257: /* opt_index_name: IDENTIFIER */ +#line 1237 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4717 "bison_parser.cpp" +#line 4730 "bison_parser.cpp" break; - case 257: /* opt_index_name: %empty */ -#line 1234 "bison_parser.y" + case 258: /* opt_index_name: %empty */ +#line 1238 "bison_parser.y" { (yyval.sval) = nullptr;} -#line 4723 "bison_parser.cpp" +#line 4736 "bison_parser.cpp" break; - case 258: /* index_name: IDENTIFIER */ -#line 1238 "bison_parser.y" + case 259: /* index_name: IDENTIFIER */ +#line 1242 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4729 "bison_parser.cpp" +#line 4742 "bison_parser.cpp" break; - case 260: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ -#line 1244 "bison_parser.y" + case 261: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ +#line 1248 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } -#line 4735 "bison_parser.cpp" +#line 4748 "bison_parser.cpp" break; - case 262: /* opt_table_alias: %empty */ -#line 1250 "bison_parser.y" + case 263: /* opt_table_alias: %empty */ +#line 1254 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4741 "bison_parser.cpp" +#line 4754 "bison_parser.cpp" break; - case 263: /* alias: AS IDENTIFIER */ -#line 1255 "bison_parser.y" + case 264: /* alias: AS IDENTIFIER */ +#line 1259 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4747 "bison_parser.cpp" +#line 4760 "bison_parser.cpp" break; - case 264: /* alias: IDENTIFIER */ -#line 1256 "bison_parser.y" + case 265: /* alias: IDENTIFIER */ +#line 1260 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4753 "bison_parser.cpp" +#line 4766 "bison_parser.cpp" break; - case 266: /* opt_alias: %empty */ -#line 1262 "bison_parser.y" + case 267: /* opt_alias: %empty */ +#line 1266 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4759 "bison_parser.cpp" +#line 4772 "bison_parser.cpp" break; - case 268: /* opt_with_clause: %empty */ -#line 1272 "bison_parser.y" + case 269: /* opt_with_clause: %empty */ +#line 1276 "bison_parser.y" { (yyval.with_description_vec) = nullptr; } -#line 4765 "bison_parser.cpp" +#line 4778 "bison_parser.cpp" break; - case 269: /* with_clause: WITH with_description_list */ -#line 1276 "bison_parser.y" + case 270: /* with_clause: WITH with_description_list */ +#line 1280 "bison_parser.y" { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } -#line 4771 "bison_parser.cpp" +#line 4784 "bison_parser.cpp" break; - case 270: /* with_description_list: with_description */ -#line 1280 "bison_parser.y" + case 271: /* with_description_list: with_description */ +#line 1284 "bison_parser.y" { (yyval.with_description_vec) = new std::vector(); (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); } -#line 4780 "bison_parser.cpp" +#line 4793 "bison_parser.cpp" break; - case 271: /* with_description_list: with_description_list ',' with_description */ -#line 1284 "bison_parser.y" + case 272: /* with_description_list: with_description_list ',' with_description */ +#line 1288 "bison_parser.y" { (yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t)); (yyval.with_description_vec) = (yyvsp[-2].with_description_vec); } -#line 4789 "bison_parser.cpp" +#line 4802 "bison_parser.cpp" break; - case 272: /* with_description: IDENTIFIER AS select_with_paren */ -#line 1291 "bison_parser.y" + case 273: /* with_description: IDENTIFIER AS select_with_paren */ +#line 1295 "bison_parser.y" { (yyval.with_description_t) = new WithDescription(); (yyval.with_description_t)->alias = (yyvsp[-2].sval); (yyval.with_description_t)->select = (yyvsp[0].select_stmt); } -#line 4799 "bison_parser.cpp" +#line 4812 "bison_parser.cpp" break; - case 273: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ -#line 1305 "bison_parser.y" + case 274: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ +#line 1309 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4807,11 +4820,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 4811 "bison_parser.cpp" +#line 4824 "bison_parser.cpp" break; - case 274: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ -#line 1313 "bison_parser.y" + case 275: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ +#line 1317 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4820,11 +4833,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 4824 "bison_parser.cpp" +#line 4837 "bison_parser.cpp" break; - case 275: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ -#line 1323 "bison_parser.y" + case 276: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ +#line 1327 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4840,83 +4853,83 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } -#line 4844 "bison_parser.cpp" +#line 4857 "bison_parser.cpp" break; - case 276: /* opt_join_type: INNER */ -#line 1341 "bison_parser.y" + case 277: /* opt_join_type: INNER */ +#line 1345 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4850 "bison_parser.cpp" +#line 4863 "bison_parser.cpp" break; - case 277: /* opt_join_type: LEFT OUTER */ -#line 1342 "bison_parser.y" + case 278: /* opt_join_type: LEFT OUTER */ +#line 1346 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4856 "bison_parser.cpp" +#line 4869 "bison_parser.cpp" break; - case 278: /* opt_join_type: LEFT */ -#line 1343 "bison_parser.y" + case 279: /* opt_join_type: LEFT */ +#line 1347 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4862 "bison_parser.cpp" +#line 4875 "bison_parser.cpp" break; - case 279: /* opt_join_type: RIGHT OUTER */ -#line 1344 "bison_parser.y" + case 280: /* opt_join_type: RIGHT OUTER */ +#line 1348 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4868 "bison_parser.cpp" +#line 4881 "bison_parser.cpp" break; - case 280: /* opt_join_type: RIGHT */ -#line 1345 "bison_parser.y" + case 281: /* opt_join_type: RIGHT */ +#line 1349 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4874 "bison_parser.cpp" +#line 4887 "bison_parser.cpp" break; - case 281: /* opt_join_type: FULL OUTER */ -#line 1346 "bison_parser.y" + case 282: /* opt_join_type: FULL OUTER */ +#line 1350 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4880 "bison_parser.cpp" +#line 4893 "bison_parser.cpp" break; - case 282: /* opt_join_type: OUTER */ -#line 1347 "bison_parser.y" + case 283: /* opt_join_type: OUTER */ +#line 1351 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4886 "bison_parser.cpp" +#line 4899 "bison_parser.cpp" break; - case 283: /* opt_join_type: FULL */ -#line 1348 "bison_parser.y" + case 284: /* opt_join_type: FULL */ +#line 1352 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4892 "bison_parser.cpp" +#line 4905 "bison_parser.cpp" break; - case 284: /* opt_join_type: CROSS */ -#line 1349 "bison_parser.y" + case 285: /* opt_join_type: CROSS */ +#line 1353 "bison_parser.y" { (yyval.uval) = kJoinCross; } -#line 4898 "bison_parser.cpp" +#line 4911 "bison_parser.cpp" break; - case 285: /* opt_join_type: %empty */ -#line 1350 "bison_parser.y" + case 286: /* opt_join_type: %empty */ +#line 1354 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4904 "bison_parser.cpp" +#line 4917 "bison_parser.cpp" break; - case 289: /* ident_commalist: IDENTIFIER */ -#line 1370 "bison_parser.y" + case 290: /* ident_commalist: IDENTIFIER */ +#line 1374 "bison_parser.y" { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 4910 "bison_parser.cpp" +#line 4923 "bison_parser.cpp" break; - case 290: /* ident_commalist: ident_commalist ',' IDENTIFIER */ -#line 1371 "bison_parser.y" + case 291: /* ident_commalist: ident_commalist ',' IDENTIFIER */ +#line 1375 "bison_parser.y" { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 4916 "bison_parser.cpp" +#line 4929 "bison_parser.cpp" break; -#line 4920 "bison_parser.cpp" +#line 4933 "bison_parser.cpp" default: break; } @@ -5146,7 +5159,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 1374 "bison_parser.y" +#line 1378 "bison_parser.y" /********************************* ** Section 4: Additional C code diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 2cbbcb21..51af28dd 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -239,6 +239,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha %type with_description %type set_operator set_type %type column_constraint +%type column_constraint_list %type opt_column_constraints %type alter_action %type drop_action @@ -614,11 +615,14 @@ opt_decimal_specification: ; opt_column_constraints: - column_constraint { $$ = new std::vector(); $$->push_back($1); } - | opt_column_constraints column_constraint { $1->push_back($2); $$ = $1; } + column_constraint_list { $$ = $1; } | /* empty */ { $$ = new std::vector(); } ; +column_constraint_list: + column_constraint { $$ = new std::vector(); $$->push_back($1); } + | column_constraint_list column_constraint { $1->push_back($2); $$ = $1; } + column_constraint: PRIMARY KEY { $$ = ConstraintType::PRIMARY_KEY; } | UNIQUE { $$ = ConstraintType::UNIQUE; } From 17bfa163dd74f6a6b3f20b373fba7bdab7d370ec Mon Sep 17 00:00:00 2001 From: mweisgut Date: Wed, 8 Sep 2021 21:23:08 +0200 Subject: [PATCH 52/73] test --- src/sql/statements.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sql/statements.cpp b/src/sql/statements.cpp index d8eeb11e..afabc639 100755 --- a/src/sql/statements.cpp +++ b/src/sql/statements.cpp @@ -9,9 +9,9 @@ namespace hsql { columnNames(columnNames) {}; TableConstraint::~TableConstraint() { - for (char* def : *columnNames) { - delete def; - } + //for (char* def : *columnNames) { + //delete def; + //} delete columnNames; } From 3ce774e6a17ef9c106a70708872096954cd5c2da Mon Sep 17 00:00:00 2001 From: mweisgut Date: Thu, 9 Sep 2021 10:07:15 +0200 Subject: [PATCH 53/73] fix --- test/test.sh | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/test/test.sh b/test/test.sh index bb1f34d4..bf4a7740 100755 --- a/test/test.sh +++ b/test/test.sh @@ -30,18 +30,22 @@ fi ################################################# # Running memory leak checks. printf "\n${GREEN}Running memory leak checks...${NC}\n" -valgrind --leak-check=full --error-exitcode=200 --log-fd=3 \ +if valgrind --leak-check=full --error-exitcode=200 --log-fd=3 \ bin/tests -f "test/queries/queries-good.sql" -f "test/queries/queries-bad.sql" \ - 3>&1 >/dev/null 2>/dev/null -MEM_LEAK_RET=$? - -if [ $MEM_LEAK_RET -ne 200 ]; then - printf "${GREEN}Memory leak check succeeded!${NC}\n" - MEM_LEAK_RET=0 + 3>&1>/dev/null; +then + MEM_LEAK_RET=$? + if [ $MEM_LEAK_RET -ne 200 ]; then + printf "${GREEN}Memory leak check succeeded!${NC}\n" + MEM_LEAK_RET=0 + else + MEM_LEAK_RET=1 + RET=1 + printf "${RED}Memory leak check failed!${NC}\n" + fi else - MEM_LEAK_RET=1 - RET=1 - printf "${RED}Memory leak check failed!${NC}\n" + MEM_LEAK_RET=1 + printf "${RED}Memory leak check could not be executed!${NC}\n" fi ################################################# From 1ca3802fa3be182072b534ef134fb77c198e3300 Mon Sep 17 00:00:00 2001 From: mweisgut Date: Thu, 9 Sep 2021 10:09:30 +0200 Subject: [PATCH 54/73] RETURN 1 if valgrind check could not be executed --- test/test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test.sh b/test/test.sh index bf4a7740..7bea89f8 100755 --- a/test/test.sh +++ b/test/test.sh @@ -45,6 +45,7 @@ then fi else MEM_LEAK_RET=1 + RET=1 printf "${RED}Memory leak check could not be executed!${NC}\n" fi From 7b752038b878b4c22efc881f7cc40d0f732aacc3 Mon Sep 17 00:00:00 2001 From: mweisgut Date: Thu, 9 Sep 2021 10:31:04 +0200 Subject: [PATCH 55/73] fix --- test/test.sh | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/test/test.sh b/test/test.sh index 7bea89f8..a960350b 100755 --- a/test/test.sh +++ b/test/test.sh @@ -30,25 +30,31 @@ fi ################################################# # Running memory leak checks. printf "\n${GREEN}Running memory leak checks...${NC}\n" -if valgrind --leak-check=full --error-exitcode=200 --log-fd=3 \ +valgrind --leak-check=full --error-exitcode=200 --log-fd=3 \ bin/tests -f "test/queries/queries-good.sql" -f "test/queries/queries-bad.sql" \ 3>&1>/dev/null; -then - MEM_LEAK_RET=$? - if [ $MEM_LEAK_RET -ne 200 ]; then - printf "${GREEN}Memory leak check succeeded!${NC}\n" - MEM_LEAK_RET=0 - else - MEM_LEAK_RET=1 - RET=1 - printf "${RED}Memory leak check failed!${NC}\n" - fi + +MEM_LEAK_RET=$? +RET=1 + +if [ $MEM_LEAK_RET -eq 0 ]; then + printf "${RED}Memory leak check succeeded!${NC}\n" + MEM_LEAK_RET=0 + RET=0 +elif [ $MEM_LEAK_RET -eq 200 ]; then + printf "${RED}Memory leak check failed!${NC}\n" +elif [ $MEM_LEAK_RET -eq 127 ]; then + printf "${RED}Memory leak check failed: command 'valgrind' not found!${NC}\n" else - MEM_LEAK_RET=1 - RET=1 - printf "${RED}Memory leak check could not be executed!${NC}\n" + printf "${RED}Memory leak check failes: error code ${MEM_LEAK_RET}!${NC}\n" fi +#else +# MEM_LEAK_RET=1 +# RET=1 +# printf "${RED}Memory leak check could not be executed!${NC}\n" +#fi + ################################################# # Checking if the grammar is conflict free. printf "\n${GREEN}Checking for conflicts in the grammar...${NC}\n" From ff5f2f21e083e8d856a475bf87a43c3e9cbdd087 Mon Sep 17 00:00:00 2001 From: mweisgut Date: Thu, 9 Sep 2021 10:32:48 +0200 Subject: [PATCH 56/73] ../.. --- test/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test.sh b/test/test.sh index a960350b..05f6223e 100755 --- a/test/test.sh +++ b/test/test.sh @@ -38,7 +38,7 @@ MEM_LEAK_RET=$? RET=1 if [ $MEM_LEAK_RET -eq 0 ]; then - printf "${RED}Memory leak check succeeded!${NC}\n" + printf "${GREEN}Memory leak check succeeded!${NC}\n" MEM_LEAK_RET=0 RET=0 elif [ $MEM_LEAK_RET -eq 200 ]; then From 66dcb8793051bc0d724ae4bc81ea3363a08f5c8d Mon Sep 17 00:00:00 2001 From: mweisgut Date: Thu, 9 Sep 2021 10:36:42 +0200 Subject: [PATCH 57/73] ;;: --- test/test.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test.sh b/test/test.sh index 05f6223e..6f64941a 100755 --- a/test/test.sh +++ b/test/test.sh @@ -42,11 +42,11 @@ if [ $MEM_LEAK_RET -eq 0 ]; then MEM_LEAK_RET=0 RET=0 elif [ $MEM_LEAK_RET -eq 200 ]; then - printf "${RED}Memory leak check failed!${NC}\n" + printf "${RED}Memory leak check failed!${NC}\n" elif [ $MEM_LEAK_RET -eq 127 ]; then - printf "${RED}Memory leak check failed: command 'valgrind' not found!${NC}\n" + printf "${RED}Memory leak check failed: command 'valgrind' not found!${NC}\n" else - printf "${RED}Memory leak check failes: error code ${MEM_LEAK_RET}!${NC}\n" + printf "${RED}Memory leak check failes: error code ${MEM_LEAK_RET}!${NC}\n" fi #else From 36963531621057a7b82b33a711a179ab8cd6eee7 Mon Sep 17 00:00:00 2001 From: Marcel Weisgut Date: Thu, 9 Sep 2021 15:21:55 +0200 Subject: [PATCH 58/73] fix memory allocations, next: fix Mismatched free() / delete / delete --- src/parser/bison_parser.cpp | 1687 ++++++++++++++++++----------------- src/parser/bison_parser.y | 5 +- src/sql/CreateStatement.h | 4 +- src/sql/statements.cpp | 39 +- 4 files changed, 883 insertions(+), 852 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 0f3a61ad..307974a5 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -746,7 +746,7 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 67 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 817 +#define YYLAST 857 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 173 @@ -824,32 +824,32 @@ static const yytype_int16 yyrline[] = 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 364, 365, 370, 371, 375, 379, 391, 394, 397, 403, 404, 411, 418, 421, 425, 439, 445, 454, 471, 475, - 478, 487, 501, 504, 509, 523, 536, 543, 550, 557, - 568, 569, 573, 574, 578, 579, 583, 590, 591, 592, - 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, - 603, 607, 608, 612, 613, 614, 618, 619, 623, 624, - 627, 628, 629, 630, 634, 635, 646, 652, 658, 664, - 672, 673, 682, 690, 693, 705, 714, 727, 734, 745, - 746, 756, 765, 766, 770, 782, 786, 790, 804, 805, - 808, 809, 820, 821, 825, 835, 848, 855, 859, 863, - 870, 873, 879, 891, 892, 896, 900, 901, 905, 910, - 911, 915, 920, 924, 925, 929, 930, 934, 935, 939, - 943, 944, 945, 951, 952, 956, 957, 958, 959, 960, - 961, 968, 969, 973, 974, 978, 979, 983, 993, 994, - 995, 996, 997, 1001, 1002, 1003, 1004, 1005, 1006, 1007, - 1008, 1009, 1010, 1011, 1015, 1016, 1020, 1021, 1022, 1023, - 1024, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, - 1037, 1038, 1042, 1043, 1047, 1048, 1049, 1050, 1056, 1057, - 1058, 1059, 1063, 1064, 1068, 1069, 1073, 1074, 1075, 1076, - 1077, 1078, 1079, 1083, 1084, 1088, 1092, 1096, 1097, 1098, - 1099, 1100, 1101, 1105, 1109, 1113, 1117, 1118, 1119, 1120, - 1124, 1125, 1126, 1127, 1128, 1129, 1133, 1137, 1138, 1142, - 1143, 1147, 1151, 1155, 1168, 1180, 1181, 1191, 1192, 1196, - 1197, 1206, 1207, 1212, 1223, 1232, 1233, 1237, 1238, 1242, - 1247, 1248, 1253, 1254, 1259, 1260, 1265, 1266, 1275, 1276, - 1280, 1284, 1288, 1295, 1308, 1316, 1326, 1345, 1346, 1347, - 1348, 1349, 1350, 1351, 1352, 1353, 1354, 1359, 1368, 1369, - 1374, 1375 + 478, 487, 501, 504, 509, 523, 536, 544, 551, 558, + 569, 570, 574, 575, 579, 580, 584, 591, 592, 593, + 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, + 604, 608, 609, 613, 614, 615, 619, 620, 624, 625, + 628, 629, 630, 631, 635, 636, 647, 653, 659, 665, + 673, 674, 683, 691, 694, 706, 715, 728, 735, 746, + 747, 757, 766, 767, 771, 783, 787, 791, 805, 806, + 809, 810, 821, 822, 826, 836, 849, 856, 860, 864, + 871, 874, 880, 892, 893, 897, 901, 902, 906, 911, + 912, 916, 921, 925, 926, 930, 931, 935, 936, 940, + 944, 945, 946, 952, 953, 957, 958, 959, 960, 961, + 962, 969, 970, 974, 975, 979, 980, 984, 994, 995, + 996, 997, 998, 1002, 1003, 1004, 1005, 1006, 1007, 1008, + 1009, 1010, 1011, 1012, 1016, 1017, 1021, 1022, 1023, 1024, + 1025, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, + 1038, 1039, 1043, 1044, 1048, 1049, 1050, 1051, 1057, 1058, + 1059, 1060, 1064, 1065, 1069, 1070, 1074, 1075, 1076, 1077, + 1078, 1079, 1080, 1084, 1085, 1089, 1093, 1097, 1098, 1099, + 1100, 1101, 1102, 1106, 1110, 1114, 1118, 1119, 1120, 1121, + 1125, 1126, 1127, 1128, 1129, 1130, 1134, 1138, 1139, 1143, + 1144, 1148, 1152, 1156, 1169, 1181, 1182, 1192, 1193, 1197, + 1198, 1207, 1208, 1213, 1224, 1233, 1234, 1238, 1239, 1243, + 1248, 1249, 1254, 1255, 1260, 1261, 1266, 1267, 1276, 1277, + 1281, 1285, 1289, 1296, 1309, 1317, 1327, 1346, 1347, 1348, + 1349, 1350, 1351, 1352, 1353, 1354, 1355, 1360, 1369, 1370, + 1375, 1376 }; #endif @@ -955,7 +955,7 @@ static const yytype_int16 yytoknum[] = }; #endif -#define YYPACT_NINF (-436) +#define YYPACT_NINF (-437) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -969,60 +969,60 @@ static const yytype_int16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - 533, 26, 41, 67, 169, 41, -42, 80, 102, 100, - 41, 127, 41, 144, 43, 207, 72, 72, 72, 233, - 65, -436, 147, -436, 147, -436, -436, -436, -436, -436, - -436, -436, -436, -436, -436, -436, -436, -32, -436, 259, - 106, -436, 97, 199, -436, 145, 145, 145, 41, 282, - 41, 177, -436, 167, -20, 167, 167, 167, 41, -436, - 179, 139, -436, -436, -436, -436, -436, -436, 502, -436, - 215, -436, -436, 193, -32, 47, -436, 33, -436, 319, - 75, 325, 210, 347, 41, 41, 277, -436, 272, 203, - 371, 330, 41, 372, 372, 379, 41, 41, -436, 218, - 207, -436, 220, 382, 378, 223, 224, -436, -436, -436, - -32, 284, 276, -32, -9, -436, -436, -436, -436, 398, - -436, -436, -436, -436, 235, 234, -436, -436, -436, -436, - -436, -436, -436, -436, -436, -436, 359, -436, 279, -66, - 203, 278, -436, 372, 403, -17, 260, -39, -436, -436, - 320, 302, -436, 302, -436, -436, -436, -436, -436, -436, - 411, -436, -436, 278, -436, -436, 339, -436, -436, 47, - -436, -436, 278, 339, 278, 79, -436, -436, -436, 75, - -436, 41, 415, 308, 44, 303, -119, 261, 263, 264, - 185, 309, 267, 419, -436, 274, -8, 336, -436, -436, - -436, -436, -436, -436, -436, -436, -436, -436, -436, -436, - -436, -436, -436, -436, 329, -436, 36, 268, -436, 278, - 371, -436, 401, -436, -436, 392, -436, -436, 280, 118, - -436, 350, 273, -436, 113, -9, -32, 283, -436, -21, - -9, -8, 394, -24, -436, 286, 357, -436, 699, 338, - 288, 136, -436, -436, -436, 308, 6, 17, 402, 196, - 278, 278, 135, 77, 291, 419, 555, 278, 94, 292, - 82, 278, 278, 419, -436, 419, 11, 294, 105, 419, - 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, - 419, 419, 419, 419, 382, 41, -436, 459, 75, -8, - -436, 167, 282, 75, -436, 411, 16, 277, -436, 278, - -436, 464, -436, -436, -436, -436, 278, -436, -436, -436, - -436, 278, 278, 403, 372, -436, 443, -436, 307, 311, - -436, -436, 312, -436, -436, -436, -436, 313, -436, 14, - 315, 403, -436, 44, -436, -436, 278, -436, -436, 321, - -436, -436, -436, -436, -436, -436, 390, -16, 95, 151, - 278, 278, -436, 402, 375, 34, -436, -436, -436, 376, - 536, 466, 419, 326, 274, -436, 397, 340, 466, 466, - 466, 466, 593, 593, 593, 593, 94, 94, 2, 2, - 2, -1, 341, -436, -436, 138, 19, -436, 170, -436, - 308, -436, -2, -436, 333, -436, 18, -436, 439, -436, - -436, -436, -8, -8, 171, -436, 343, 505, -436, 506, - 507, 508, -436, 396, -436, -436, 413, -436, 14, -436, - 403, 172, -436, 178, -436, 278, 699, 278, 278, -436, - 160, 156, 352, -436, 419, 466, 274, 353, 180, -436, - -436, -436, 356, -436, -436, 358, 429, -436, -436, -436, - 454, 455, 457, 437, 16, 534, -436, -436, -436, 418, - -436, -436, 530, 192, 377, 381, 388, -436, -436, -436, - 198, -436, -436, 84, 389, -8, 186, -436, 278, -436, - 555, 395, 200, -436, -436, 18, 16, -436, -436, -436, - 16, 301, 380, 278, 400, -436, 538, -436, -436, -436, - -436, -436, -436, -436, -8, -436, -436, -436, -436, 452, - 403, -11, -436, 406, 383, 278, 212, 278, -436, -436, - 19, -8, -436, -436, -8, 407, -436 + 533, 40, 67, 91, 93, 67, 33, -19, 5, 9, + 67, 31, 67, 89, 10, 135, 53, 53, 53, 173, + 39, -437, 96, -437, 96, -437, -437, -437, -437, -437, + -437, -437, -437, -437, -437, -437, -437, -35, -437, 202, + 46, -437, 56, 142, -437, 139, 139, 139, 67, 225, + 67, 153, -437, 167, -51, 167, 167, 167, 67, -437, + 134, 128, -437, -437, -437, -437, -437, -437, 502, -437, + 206, -437, -437, 184, -35, 35, -437, 47, -437, 308, + 71, 318, 209, 327, 67, 67, 269, -437, 261, 203, + 356, 329, 67, 372, 372, 377, 67, 67, -437, 208, + 135, -437, 215, 386, 385, 233, 234, -437, -437, -437, + -35, 290, 279, -35, -26, -437, -437, -437, -437, 401, + -437, -437, -437, -437, 238, 237, -437, -437, -437, -437, + -437, -437, -437, -437, -437, -437, 364, -437, 280, -56, + 203, 278, -437, 372, 410, 107, 266, -58, -437, -437, + 325, 307, -437, 307, -437, -437, -437, -437, -437, -437, + 416, -437, -437, 278, -437, -437, 346, -437, -437, 35, + -437, -437, 278, 346, 278, 79, -437, -437, -437, 71, + -437, 67, 420, 314, 37, 302, -117, 260, 263, 265, + 185, 309, 271, 344, -437, 274, 102, 371, -437, -437, + -437, -437, -437, -437, -437, -437, -437, -437, -437, -437, + -437, -437, -437, -437, 338, -437, 95, 272, -437, 278, + 356, -437, 402, -437, -437, 395, -437, -437, 281, 105, + -437, 360, 283, -437, 113, -26, -35, 284, -437, -22, + -26, 102, 403, -24, -437, 282, 366, -437, 739, 337, + 292, 118, -437, -437, -437, 314, 11, 17, 404, 196, + 278, 278, 94, 158, 293, 344, 561, 278, 92, 294, + -88, 278, 278, 344, -437, 344, 69, 296, 14, 344, + 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, + 344, 344, 344, 344, 386, 67, -437, 462, 71, 102, + -437, 167, 225, 71, -437, 416, 16, 269, -437, 278, + -437, 463, -437, -437, -437, -437, 278, -437, -437, -437, + -437, 278, 278, 410, 372, -437, 437, -437, 303, 306, + -437, -437, 311, -437, -437, -437, -437, 312, -437, -2, + 313, 410, -437, 37, -437, -437, 278, -437, -437, 315, + -437, -437, -437, -437, -437, -437, 381, 136, 80, 194, + 278, 278, -437, 404, 375, -31, -437, -437, -437, 368, + 508, 597, 344, 317, 274, -437, 389, 323, 597, 597, + 597, 597, 633, 633, 633, 633, 92, 92, 2, 2, + 2, -61, 328, -437, -437, 132, 486, -437, 138, -437, + 314, -437, 193, -437, 322, -437, 36, -437, 426, -437, + -437, -437, 102, 102, 170, -437, 334, 501, -437, 504, + 506, 509, -437, 406, -437, -437, 405, -437, -2, -437, + 410, 171, -437, 172, -437, 278, 739, 278, 278, -437, + -69, 86, 367, -437, 344, 597, 274, 369, 192, -437, + -437, -437, -437, -437, 376, 441, -437, -437, -437, 466, + 468, 469, 449, 16, 511, -437, -437, -437, 425, -437, + -437, 545, 198, 384, 388, 390, -437, -437, -437, 200, + -437, -437, -66, 392, 102, 131, -437, 278, -437, 561, + 394, 216, -437, -437, 36, 16, -437, -437, -437, 16, + 301, 396, 278, 397, -437, 551, -437, -437, -437, -437, + -437, -437, -437, 102, -437, -437, -437, -437, 419, 410, + -9, -437, 398, 407, 278, 218, 278, -437, -437, 18, + 102, -437, -437, 102, 399, 408, -437 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -1075,32 +1075,32 @@ static const yytype_int16 yydefact[] = 0, 0, 68, 0, 81, 82, 0, 56, 76, 78, 0, 0, 53, 0, 204, 0, 0, 0, 0, 198, 0, 0, 0, 223, 0, 189, 0, 0, 0, 180, - 224, 97, 226, 94, 25, 0, 0, 285, 277, 283, - 281, 284, 279, 0, 0, 0, 262, 253, 260, 0, - 122, 48, 0, 0, 0, 0, 0, 80, 83, 79, - 0, 85, 214, 0, 0, 202, 0, 201, 0, 205, - 225, 0, 0, 196, 194, 263, 0, 280, 282, 278, - 0, 246, 264, 0, 0, 74, 0, 64, 66, 71, - 84, 215, 216, 199, 203, 197, 195, 250, 274, 286, - 0, 134, 65, 0, 0, 0, 0, 0, 131, 73, - 0, 287, 275, 261, 133, 0, 276 + 224, 97, 94, 25, 0, 0, 285, 277, 283, 281, + 284, 279, 0, 0, 0, 262, 253, 260, 0, 122, + 48, 0, 0, 0, 0, 0, 80, 83, 79, 0, + 85, 214, 0, 0, 202, 0, 201, 0, 205, 225, + 0, 0, 196, 194, 263, 0, 280, 282, 278, 0, + 246, 264, 0, 0, 74, 0, 64, 66, 71, 84, + 215, 216, 199, 203, 197, 195, 250, 274, 286, 0, + 134, 65, 0, 0, 0, 0, 0, 131, 73, 0, + 287, 275, 261, 133, 226, 0, 276 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -436, -436, -436, 490, -436, 541, -436, 255, -436, 123, - -436, -436, -436, -436, 269, -83, 417, -436, -436, -436, - 124, -436, 237, -436, 140, -436, -436, -436, -436, 149, - -436, -436, -53, -436, -436, -436, -436, -436, -436, 441, - -436, -436, 363, -166, -77, -436, 29, -73, -51, -436, - -436, -75, 331, -436, -436, -436, -131, -436, -436, 28, - -436, 281, -436, -436, 25, -260, -436, -30, 287, -141, - -136, -436, -436, -436, -436, -436, -436, 328, -436, -436, - -436, -436, -436, -436, -436, -436, -436, -372, -74, -84, - -436, -436, -91, -436, -436, -436, -436, -435, 103, -436, - -436, -436, 3, -436, -436, -436, 98, 368, -436, -436, - -436, -436, 503, -436, -436, -436, -436, -309 + -437, -437, -437, 503, -437, 546, -437, 273, -437, 154, + -437, -437, -437, -437, 275, -83, 422, -437, -437, -437, + 270, -437, 236, -437, 144, -437, -437, -437, -437, 155, + -437, -437, -53, -437, -437, -437, -437, -437, -437, 442, + -437, -437, 361, -166, -95, -437, 34, -73, -41, -437, + -437, -75, 330, -437, -437, -437, -131, -437, -437, 29, + -437, 277, -437, -437, -34, -260, -437, -42, 285, -141, + -136, -437, -437, -437, -437, -437, -437, 335, -437, -437, + -437, -437, -437, -437, -437, -437, -437, 58, -74, -84, + -437, -437, -91, -437, -437, -437, -437, -436, 101, -437, + -437, -437, 3, -437, -437, -437, 97, 355, -437, -437, + -437, -437, 490, -437, -437, -437, -437, -309 }; /* YYDEFGOTO[NTERM-NUM]. */ @@ -1111,13 +1111,13 @@ static const yytype_int16 yydefgoto[] = 83, 251, 252, 253, 339, 422, 418, 427, 428, 429, 254, 30, 92, 31, 223, 224, 32, 33, 34, 145, 35, 147, 148, 36, 166, 167, 168, 76, 110, 111, - 171, 77, 163, 231, 307, 308, 142, 470, 528, 114, + 171, 77, 163, 231, 307, 308, 142, 469, 527, 114, 237, 238, 319, 104, 176, 232, 124, 125, 233, 234, 197, 198, 199, 200, 201, 202, 203, 263, 204, 205, 206, 207, 208, 356, 209, 210, 211, 212, 213, 127, 128, 129, 130, 131, 132, 133, 401, 402, 403, 404, - 405, 51, 406, 138, 155, 466, 467, 468, 313, 37, - 38, 61, 62, 407, 463, 532, 69, 216 + 405, 51, 406, 138, 155, 465, 466, 467, 313, 37, + 38, 61, 62, 407, 462, 531, 69, 216 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1126,78 +1126,82 @@ static const yytype_int16 yydefgoto[] = static const yytype_int16 yytable[] = { 196, 106, 95, 96, 97, 41, 126, 365, 44, 152, - 152, 153, 161, 52, 414, 54, 221, 247, 162, 40, - 347, 310, 452, 456, 453, 73, 113, 182, 45, 501, - 322, 239, 431, 241, 243, 169, 173, 46, 169, 527, - 73, 423, 107, 141, 40, 174, 217, 248, 256, 262, - 257, 86, 39, 89, 270, 266, 107, 268, 183, 152, - 214, 98, 58, 175, 457, 519, 75, 47, 317, 458, - 42, 249, 218, 93, 424, 459, 460, 108, 299, 116, - 117, 118, 186, 116, 117, 118, 433, 139, 140, 344, - 271, 108, 461, 271, 318, 150, -286, 462, 271, 156, - 157, 184, 59, 105, 250, 244, 271, 272, 436, 112, - 272, 372, 94, 109, 448, 272, 310, 425, 236, 357, - 358, 480, 269, 272, 187, 188, 189, 109, 158, 266, - 368, 369, 220, 279, 426, 74, 279, 370, 373, 371, - 65, 66, 465, 377, 378, 379, 380, 381, 382, 383, - 384, 385, 386, 387, 388, 389, 390, 391, 535, 315, - 309, 169, 119, 190, 294, 293, 119, 294, 360, -251, - 84, 85, 43, 48, 345, 239, 408, 348, 120, 194, - 412, 413, 120, 400, 245, 349, 492, 361, 186, 116, - 117, 118, 242, 362, 235, 49, 271, 50, 271, 191, - 443, 240, 437, 392, 296, 309, 53, 297, 375, 271, - 60, 526, 192, 272, 55, 272, 63, 121, 122, 440, - 441, 121, 122, 56, 126, 376, 272, 271, 279, 126, - 187, 188, 189, 67, 455, 68, 445, 311, 193, 194, - 152, 415, 438, 521, 272, 261, 195, 123, 396, 271, - 367, 123, 511, 57, 290, 291, 292, 293, 70, 294, - 314, 361, 78, 488, 80, 320, 272, 439, 395, 190, - 271, 82, 119, 398, 271, 79, 487, 186, 116, 117, - 118, 186, 116, 117, 118, 87, 304, 272, 120, 305, - 442, 272, 81, 91, 483, 261, 485, 486, 393, 90, - 271, 447, 513, 99, 342, 191, 451, 343, 490, 179, - 100, 102, 186, 116, 117, 118, 103, 272, 192, 187, - 188, 189, 115, 187, 188, 189, 456, 121, 122, 134, - 136, 73, 350, 351, 352, 353, 354, 355, 454, 471, - 481, 179, 297, 297, 193, 194, 482, 514, 494, 309, - 137, 309, 195, 273, 264, 188, 189, 123, 190, 141, - 505, 119, 190, 506, 143, 119, 510, 457, 516, 297, - 144, 309, 458, 491, 146, 149, 116, 120, 459, 460, - 533, 120, 154, 297, 531, 74, 534, 160, 118, 274, - 162, 164, 165, 190, 191, 461, 119, 170, 191, -286, - 462, 172, 177, 178, 180, 179, 215, 192, 219, 181, - 222, 192, 120, 225, 228, 112, 121, 122, 246, 15, - 121, 122, 186, 116, 117, 118, 295, 255, 258, 265, - 259, 260, 267, 193, 194, 298, 275, 193, 194, 301, - 302, 195, 192, 306, 309, 195, 123, 303, 321, 324, - 123, 121, 122, 323, 316, 341, 276, 340, 363, 73, - 366, 374, 394, 277, 278, 188, 189, 410, 193, 194, - 279, 280, -252, 416, 417, 372, 195, 456, 419, 420, - 421, 123, 430, 435, 281, 282, 283, 284, 285, 434, - 271, 286, 287, 446, 288, 289, 290, 291, 292, 293, - 449, 294, -288, 190, 464, 294, 119, 450, 469, 1, - 472, 473, 474, 475, 476, 477, 478, 2, 457, 274, - 489, 493, 120, 458, 3, 257, 495, 496, 4, 459, - 460, 497, 498, 524, 499, 500, 504, 502, 5, 265, - 1, 6, 7, 503, 523, 507, 461, 520, 2, 508, - 530, 462, 192, 8, 9, 3, 509, 512, 101, 4, - 399, 121, 122, 515, 10, 72, -289, 11, 522, 5, - 227, 397, 6, 7, 529, 536, 484, 479, 193, 194, - 432, 185, 525, 300, 8, 9, 195, 346, 12, 274, - 359, 123, 13, 517, 278, 10, 409, 411, 11, 518, - 279, -289, 312, 159, 0, 0, 0, 14, 274, 0, - 0, 0, 0, 15, -289, -289, -289, 284, 285, 12, - 0, 286, 287, 13, 288, 289, 290, 291, 292, 293, - 0, 294, 0, 0, 0, 0, 275, 0, 14, 0, - 0, 0, 0, 0, 15, 0, 274, 16, 17, 18, - 444, 0, 0, 0, 0, 275, 364, 0, 0, 0, - 0, 0, 0, 0, 278, 0, 0, 0, 0, 0, - 279, 280, 0, 0, 0, 364, 0, 0, 16, 17, - 18, 0, 0, 278, 281, 282, 283, 284, 285, 279, - 280, 286, 287, 0, 288, 289, 290, 291, 292, 293, - 0, 294, 0, 281, 282, 283, 284, 285, 0, 0, - 286, 287, 0, 288, 289, 290, 291, 292, 293, 0, - 294, 278, 0, 325, 0, 0, 0, 279, 326, 0, + 152, 153, 161, 52, 414, 54, 221, 247, 173, 40, + 347, 534, 73, 162, 141, 423, 271, 500, 174, 58, + 322, 239, 431, 241, 243, 169, 113, 182, 169, 310, + 248, 526, 93, 272, 107, 271, 175, 486, 271, 262, + 256, 86, 257, 89, 270, 266, 107, 268, 424, 152, + 214, 98, 272, 518, 249, 272, 39, 317, 183, 59, + 40, 75, 218, 279, 48, 116, 117, 118, 299, 108, + 367, 94, 186, 116, 117, 118, 433, 139, 140, 344, + 271, 108, 271, 318, 42, 150, 43, 250, 49, 156, + 157, 425, 510, 45, 294, 244, 50, 272, 105, 272, + 53, 184, 46, 220, 448, 109, 310, 375, 426, 357, + 358, 479, 269, 112, 187, 188, 189, 109, 236, 266, + 368, 369, 74, 158, 376, 443, 279, 370, 60, 371, + 309, 315, 47, 377, 378, 379, 380, 381, 382, 383, + 384, 385, 386, 387, 388, 389, 390, 391, 119, 55, + 464, 169, 309, 190, 73, 293, 119, 294, 56, 372, + 217, 65, 66, 67, 120, 239, 408, 348, 194, 345, + 412, 413, 120, 400, 245, 349, 491, 437, 186, 116, + 117, 118, 242, 487, 271, 235, 373, 63, 57, 191, + 271, 314, 240, 392, 261, 78, 320, 70, 271, 68, + 525, 272, 192, 121, 122, 79, 271, 272, 455, 440, + 441, 121, 122, 80, 126, 272, 279, 271, 87, 126, + 187, 188, 189, 272, 454, 81, 445, 311, 193, 194, + 152, 415, 520, 123, 272, 271, 195, 512, 396, 360, + 271, 123, 290, 291, 292, 293, 395, 294, 99, 456, + 436, 398, 272, 296, 457, 82, 297, 272, 361, 190, + 458, 459, 119, 304, 362, 90, 305, 186, 116, 117, + 118, 186, 116, 117, 118, 438, 342, 460, 120, 343, + 442, -286, 461, 91, 482, 261, 484, 485, 393, 100, + 451, 447, 102, 179, 361, 191, 453, 103, 489, 179, + 439, 115, 186, 116, 117, 118, 84, 85, 192, 187, + 188, 189, 134, 187, 188, 189, 455, 121, 122, 136, + 137, 73, 350, 351, 352, 353, 354, 355, 470, 480, + 481, 297, 297, 309, 193, 194, 513, 186, 116, 117, + 118, 141, 195, 143, 264, 188, 189, 123, 190, 146, + 493, 119, 190, 309, -251, 119, 504, 456, 509, 505, + 144, 297, 457, 490, 149, 74, 116, 120, 458, 459, + 154, 120, 160, 530, 515, 533, 532, 309, 273, 297, + 188, 189, 118, 190, 191, 460, 119, 162, 191, -286, + 461, 164, 165, 170, 172, 177, 178, 192, 179, 180, + 181, 192, 120, 215, 219, 222, 121, 122, 225, 228, + 121, 122, 112, 246, 274, 15, 255, 258, 190, 265, + 259, 119, 260, 193, 194, 295, 267, 193, 194, 298, + 301, 195, 192, 302, 455, 195, 123, 120, 303, 323, + 123, 121, 122, 306, 309, 316, 340, 321, 324, 341, + 363, 73, 366, 374, 265, 394, 410, 416, 193, 194, + 417, 275, -252, 419, 435, 372, 195, 192, 420, 421, + 430, 123, 271, 434, 446, 456, 121, 122, 294, 452, + 457, 276, 449, 463, 450, 468, 458, 459, 277, 278, + 523, 471, -288, 193, 194, 279, 280, 472, 477, 1, + 473, 195, 474, 460, 501, 475, 123, 2, 461, 281, + 282, 283, 284, 285, 3, 476, 286, 287, 4, 288, + 289, 290, 291, 292, 293, 488, 294, 492, 5, 495, + 1, 6, 7, 496, 494, 497, 498, 499, 2, 524, + 502, 503, 506, 8, 9, 3, 507, 522, 508, 4, + 511, 274, 514, 519, 10, 521, 528, 11, 257, 5, + 72, 101, 6, 7, 529, 227, 536, 397, 399, 432, + 483, 300, 185, 478, 8, 9, 346, 535, 12, 312, + 159, 516, 13, 411, 409, 10, 517, 359, 11, 0, + 0, 0, 0, 0, 0, 0, 0, 14, 275, 0, + 0, 0, 0, 15, 274, 0, 0, 0, 0, 12, + 0, 0, 444, 13, 0, 0, 0, 0, 364, 0, + 0, 0, 0, 0, 0, 0, 278, 0, 14, 0, + 0, 0, 279, 280, 15, 0, 0, 16, 17, 18, + 274, 0, 0, 0, 0, 0, 281, 282, 283, 284, + 285, 275, 0, 286, 287, 0, 288, 289, 290, 291, + 292, 293, 0, 294, 0, 0, 0, 0, 16, 17, + 18, 364, 0, 0, 0, 0, 274, 0, 0, 278, + 0, 0, 0, 0, 0, 279, 280, -289, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 281, + 282, 283, 284, 285, 0, 0, 286, 287, 0, 288, + 289, 290, 291, 292, 293, 278, 294, 0, 0, 0, + 0, 279, -289, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -289, -289, -289, 284, 285, + 0, 0, 286, 287, 0, 288, 289, 290, 291, 292, + 293, 278, 294, 325, 0, 0, 0, 279, 326, 0, 327, 328, 0, 329, 0, 0, 0, 0, 0, 0, 0, 330, 0, 0, -289, -289, 0, 0, -289, -289, 0, 288, 289, 290, 291, 292, 293, 0, 294, 0, @@ -1212,78 +1216,82 @@ static const yytype_int16 yytable[] = static const yytype_int16 yycheck[] = { 141, 74, 55, 56, 57, 2, 80, 267, 5, 93, - 94, 94, 103, 10, 323, 12, 147, 183, 12, 3, - 3, 3, 3, 25, 396, 57, 77, 93, 70, 464, - 54, 172, 341, 174, 175, 110, 113, 79, 113, 50, - 57, 27, 9, 82, 3, 54, 63, 3, 167, 190, - 169, 48, 26, 50, 195, 191, 9, 193, 124, 143, - 143, 58, 19, 72, 66, 500, 37, 109, 89, 71, - 3, 27, 145, 93, 60, 77, 78, 44, 219, 4, - 5, 6, 3, 4, 5, 6, 346, 84, 85, 255, - 114, 44, 94, 114, 115, 92, 98, 99, 114, 96, - 97, 167, 59, 74, 60, 179, 114, 131, 124, 76, - 131, 100, 132, 80, 374, 131, 3, 103, 169, 260, - 261, 430, 195, 131, 45, 46, 47, 80, 99, 265, - 271, 272, 171, 134, 120, 167, 134, 273, 127, 275, - 17, 18, 124, 279, 280, 281, 282, 283, 284, 285, - 286, 287, 288, 289, 290, 291, 292, 293, 530, 236, - 171, 236, 87, 84, 165, 163, 87, 165, 91, 171, - 46, 47, 3, 93, 168, 316, 307, 160, 103, 160, - 321, 322, 103, 167, 181, 258, 446, 110, 3, 4, - 5, 6, 113, 116, 166, 93, 114, 97, 114, 120, - 166, 173, 107, 294, 168, 171, 79, 171, 103, 114, - 3, 520, 133, 131, 70, 131, 144, 142, 143, 360, - 361, 142, 143, 79, 298, 120, 131, 114, 134, 303, - 45, 46, 47, 0, 400, 170, 372, 124, 159, 160, - 324, 324, 91, 503, 131, 110, 167, 172, 301, 114, - 168, 172, 168, 109, 160, 161, 162, 163, 111, 165, - 235, 110, 3, 107, 167, 240, 131, 116, 298, 84, - 114, 126, 87, 303, 114, 169, 116, 3, 4, 5, - 6, 3, 4, 5, 6, 3, 168, 131, 103, 171, - 363, 131, 93, 126, 435, 110, 437, 438, 295, 122, - 114, 374, 116, 124, 168, 120, 168, 171, 444, 171, - 171, 96, 3, 4, 5, 6, 123, 131, 133, 45, - 46, 47, 3, 45, 46, 47, 25, 142, 143, 4, - 120, 57, 136, 137, 138, 139, 140, 141, 168, 168, - 168, 171, 171, 171, 159, 160, 168, 488, 168, 171, - 3, 171, 167, 17, 45, 46, 47, 172, 84, 82, - 168, 87, 84, 171, 92, 87, 168, 66, 168, 171, - 167, 171, 71, 446, 3, 45, 4, 103, 77, 78, - 168, 103, 3, 171, 525, 167, 527, 167, 6, 53, - 12, 168, 168, 84, 120, 94, 87, 113, 120, 98, - 99, 125, 4, 168, 45, 171, 3, 133, 148, 130, - 90, 133, 103, 111, 3, 76, 142, 143, 3, 111, - 142, 143, 3, 4, 5, 6, 97, 124, 167, 120, - 167, 167, 165, 159, 160, 167, 100, 159, 160, 38, - 48, 167, 133, 93, 171, 167, 172, 167, 54, 92, - 172, 142, 143, 167, 171, 167, 120, 119, 167, 57, - 168, 167, 3, 127, 128, 46, 47, 3, 159, 160, - 134, 135, 171, 30, 167, 100, 167, 25, 167, 167, - 167, 172, 167, 93, 148, 149, 150, 151, 152, 168, - 114, 155, 156, 167, 158, 159, 160, 161, 162, 163, - 103, 165, 0, 84, 171, 165, 87, 166, 69, 7, - 167, 6, 6, 6, 6, 119, 103, 15, 66, 53, - 168, 168, 103, 71, 22, 169, 168, 98, 26, 77, - 78, 77, 77, 81, 77, 98, 6, 3, 36, 120, - 7, 39, 40, 125, 6, 168, 94, 167, 15, 168, - 167, 99, 133, 51, 52, 22, 168, 168, 68, 26, - 305, 142, 143, 168, 62, 24, 100, 65, 168, 36, - 153, 302, 39, 40, 168, 168, 436, 428, 159, 160, - 343, 140, 130, 220, 51, 52, 167, 256, 86, 53, - 262, 172, 90, 495, 128, 62, 309, 316, 65, 496, - 134, 135, 234, 100, -1, -1, -1, 105, 53, -1, - -1, -1, -1, 111, 148, 149, 150, 151, 152, 86, - -1, 155, 156, 90, 158, 159, 160, 161, 162, 163, - -1, 165, -1, -1, -1, -1, 100, -1, 105, -1, - -1, -1, -1, -1, 111, -1, 53, 145, 146, 147, - 114, -1, -1, -1, -1, 100, 120, -1, -1, -1, - -1, -1, -1, -1, 128, -1, -1, -1, -1, -1, - 134, 135, -1, -1, -1, 120, -1, -1, 145, 146, - 147, -1, -1, 128, 148, 149, 150, 151, 152, 134, - 135, 155, 156, -1, 158, 159, 160, 161, 162, 163, - -1, 165, -1, 148, 149, 150, 151, 152, -1, -1, - 155, 156, -1, 158, 159, 160, 161, 162, 163, -1, - 165, 128, -1, 24, -1, -1, -1, 134, 29, -1, + 94, 94, 103, 10, 323, 12, 147, 183, 113, 3, + 3, 3, 57, 12, 82, 27, 114, 463, 54, 19, + 54, 172, 341, 174, 175, 110, 77, 93, 113, 3, + 3, 50, 93, 131, 9, 114, 72, 116, 114, 190, + 167, 48, 169, 50, 195, 191, 9, 193, 60, 143, + 143, 58, 131, 499, 27, 131, 26, 89, 124, 59, + 3, 37, 145, 134, 93, 4, 5, 6, 219, 44, + 168, 132, 3, 4, 5, 6, 346, 84, 85, 255, + 114, 44, 114, 115, 3, 92, 3, 60, 93, 96, + 97, 103, 168, 70, 165, 179, 97, 131, 74, 131, + 79, 167, 79, 171, 374, 80, 3, 103, 120, 260, + 261, 430, 195, 76, 45, 46, 47, 80, 169, 265, + 271, 272, 167, 99, 120, 166, 134, 273, 3, 275, + 171, 236, 109, 279, 280, 281, 282, 283, 284, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 87, 70, + 124, 236, 171, 84, 57, 163, 87, 165, 79, 100, + 63, 17, 18, 0, 103, 316, 307, 160, 160, 168, + 321, 322, 103, 167, 181, 258, 446, 107, 3, 4, + 5, 6, 113, 107, 114, 166, 127, 144, 109, 120, + 114, 235, 173, 294, 110, 3, 240, 111, 114, 170, + 519, 131, 133, 142, 143, 169, 114, 131, 25, 360, + 361, 142, 143, 167, 298, 131, 134, 114, 3, 303, + 45, 46, 47, 131, 400, 93, 372, 124, 159, 160, + 324, 324, 502, 172, 131, 114, 167, 116, 301, 91, + 114, 172, 160, 161, 162, 163, 298, 165, 124, 66, + 124, 303, 131, 168, 71, 126, 171, 131, 110, 84, + 77, 78, 87, 168, 116, 122, 171, 3, 4, 5, + 6, 3, 4, 5, 6, 91, 168, 94, 103, 171, + 363, 98, 99, 126, 435, 110, 437, 438, 295, 171, + 168, 374, 96, 171, 110, 120, 168, 123, 444, 171, + 116, 3, 3, 4, 5, 6, 46, 47, 133, 45, + 46, 47, 4, 45, 46, 47, 25, 142, 143, 120, + 3, 57, 136, 137, 138, 139, 140, 141, 168, 168, + 168, 171, 171, 171, 159, 160, 487, 3, 4, 5, + 6, 82, 167, 92, 45, 46, 47, 172, 84, 3, + 168, 87, 84, 171, 171, 87, 168, 66, 168, 171, + 167, 171, 71, 446, 45, 167, 4, 103, 77, 78, + 3, 103, 167, 524, 168, 526, 168, 171, 17, 171, + 46, 47, 6, 84, 120, 94, 87, 12, 120, 98, + 99, 168, 168, 113, 125, 4, 168, 133, 171, 45, + 130, 133, 103, 3, 148, 90, 142, 143, 111, 3, + 142, 143, 76, 3, 53, 111, 124, 167, 84, 120, + 167, 87, 167, 159, 160, 97, 165, 159, 160, 167, + 38, 167, 133, 48, 25, 167, 172, 103, 167, 167, + 172, 142, 143, 93, 171, 171, 119, 54, 92, 167, + 167, 57, 168, 167, 120, 3, 3, 30, 159, 160, + 167, 100, 171, 167, 93, 100, 167, 133, 167, 167, + 167, 172, 114, 168, 167, 66, 142, 143, 165, 3, + 71, 120, 103, 171, 166, 69, 77, 78, 127, 128, + 81, 167, 0, 159, 160, 134, 135, 6, 103, 7, + 6, 167, 6, 94, 3, 6, 172, 15, 99, 148, + 149, 150, 151, 152, 22, 119, 155, 156, 26, 158, + 159, 160, 161, 162, 163, 168, 165, 168, 36, 98, + 7, 39, 40, 77, 168, 77, 77, 98, 15, 130, + 125, 6, 168, 51, 52, 22, 168, 6, 168, 26, + 168, 53, 168, 167, 62, 168, 168, 65, 169, 36, + 24, 68, 39, 40, 167, 153, 168, 302, 305, 343, + 436, 220, 140, 428, 51, 52, 256, 529, 86, 234, + 100, 494, 90, 316, 309, 62, 495, 262, 65, -1, + -1, -1, -1, -1, -1, -1, -1, 105, 100, -1, + -1, -1, -1, 111, 53, -1, -1, -1, -1, 86, + -1, -1, 114, 90, -1, -1, -1, -1, 120, -1, + -1, -1, -1, -1, -1, -1, 128, -1, 105, -1, + -1, -1, 134, 135, 111, -1, -1, 145, 146, 147, + 53, -1, -1, -1, -1, -1, 148, 149, 150, 151, + 152, 100, -1, 155, 156, -1, 158, 159, 160, 161, + 162, 163, -1, 165, -1, -1, -1, -1, 145, 146, + 147, 120, -1, -1, -1, -1, 53, -1, -1, 128, + -1, -1, -1, -1, -1, 134, 135, 100, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 148, + 149, 150, 151, 152, -1, -1, 155, 156, -1, 158, + 159, 160, 161, 162, 163, 128, 165, -1, -1, -1, + -1, 134, 135, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 148, 149, 150, 151, 152, + -1, -1, 155, 156, -1, 158, 159, 160, 161, 162, + 163, 128, 165, 24, -1, -1, -1, 134, 29, -1, 31, 32, -1, 34, -1, -1, -1, -1, -1, -1, -1, 42, -1, -1, 151, 152, -1, -1, 155, 156, -1, 158, 159, 160, 161, 162, 163, -1, 165, -1, @@ -1344,15 +1352,15 @@ static const yytype_int16 yystos[] = 167, 167, 198, 27, 60, 103, 120, 200, 201, 202, 167, 290, 195, 238, 168, 93, 124, 107, 91, 116, 242, 242, 220, 166, 114, 243, 167, 220, 238, 103, - 166, 168, 3, 260, 168, 216, 25, 66, 71, 77, - 78, 94, 99, 287, 171, 124, 278, 279, 280, 69, - 230, 168, 167, 6, 6, 6, 6, 119, 103, 202, - 290, 168, 168, 242, 197, 242, 242, 116, 107, 168, - 243, 220, 238, 168, 168, 168, 98, 77, 77, 77, - 98, 270, 3, 125, 6, 168, 171, 168, 168, 168, - 168, 168, 168, 116, 242, 168, 168, 279, 271, 270, - 167, 238, 168, 6, 81, 130, 290, 50, 231, 168, - 167, 242, 288, 168, 242, 260, 168 + 166, 168, 3, 168, 216, 25, 66, 71, 77, 78, + 94, 99, 287, 171, 124, 278, 279, 280, 69, 230, + 168, 167, 6, 6, 6, 6, 119, 103, 202, 290, + 168, 168, 242, 197, 242, 242, 116, 107, 168, 243, + 220, 238, 168, 168, 168, 98, 77, 77, 77, 98, + 270, 3, 125, 6, 168, 171, 168, 168, 168, 168, + 168, 168, 116, 242, 168, 168, 279, 271, 270, 167, + 238, 168, 6, 81, 130, 290, 50, 231, 168, 167, + 242, 288, 168, 242, 3, 260, 168 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ @@ -1976,25 +1984,25 @@ yydestruct (const char *yymsg, case YYSYMBOL_IDENTIFIER: /* IDENTIFIER */ #line 157 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1980 "bison_parser.cpp" +#line 1988 "bison_parser.cpp" break; case YYSYMBOL_STRING: /* STRING */ #line 157 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1986 "bison_parser.cpp" +#line 1994 "bison_parser.cpp" break; case YYSYMBOL_FLOATVAL: /* FLOATVAL */ #line 155 "bison_parser.y" { } -#line 1992 "bison_parser.cpp" +#line 2000 "bison_parser.cpp" break; case YYSYMBOL_INTVAL: /* INTVAL */ #line 155 "bison_parser.y" { } -#line 1998 "bison_parser.cpp" +#line 2006 "bison_parser.cpp" break; case YYSYMBOL_statement_list: /* statement_list */ @@ -2007,19 +2015,19 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).stmt_vec)); } -#line 2011 "bison_parser.cpp" +#line 2019 "bison_parser.cpp" break; case YYSYMBOL_statement: /* statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 2017 "bison_parser.cpp" +#line 2025 "bison_parser.cpp" break; case YYSYMBOL_preparable_statement: /* preparable_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 2023 "bison_parser.cpp" +#line 2031 "bison_parser.cpp" break; case YYSYMBOL_opt_hints: /* opt_hints */ @@ -2032,7 +2040,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2036 "bison_parser.cpp" +#line 2044 "bison_parser.cpp" break; case YYSYMBOL_hint_list: /* hint_list */ @@ -2045,85 +2053,85 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2049 "bison_parser.cpp" +#line 2057 "bison_parser.cpp" break; case YYSYMBOL_hint: /* hint */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2055 "bison_parser.cpp" +#line 2063 "bison_parser.cpp" break; case YYSYMBOL_transaction_statement: /* transaction_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).transaction_stmt)); } -#line 2061 "bison_parser.cpp" +#line 2069 "bison_parser.cpp" break; case YYSYMBOL_prepare_statement: /* prepare_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).prep_stmt)); } -#line 2067 "bison_parser.cpp" +#line 2075 "bison_parser.cpp" break; case YYSYMBOL_prepare_target_query: /* prepare_target_query */ #line 157 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2073 "bison_parser.cpp" +#line 2081 "bison_parser.cpp" break; case YYSYMBOL_execute_statement: /* execute_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).exec_stmt)); } -#line 2079 "bison_parser.cpp" +#line 2087 "bison_parser.cpp" break; case YYSYMBOL_import_statement: /* import_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).import_stmt)); } -#line 2085 "bison_parser.cpp" +#line 2093 "bison_parser.cpp" break; case YYSYMBOL_file_type: /* file_type */ #line 155 "bison_parser.y" { } -#line 2091 "bison_parser.cpp" +#line 2099 "bison_parser.cpp" break; case YYSYMBOL_file_path: /* file_path */ #line 157 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2097 "bison_parser.cpp" +#line 2105 "bison_parser.cpp" break; case YYSYMBOL_opt_file_type: /* opt_file_type */ #line 155 "bison_parser.y" { } -#line 2103 "bison_parser.cpp" +#line 2111 "bison_parser.cpp" break; case YYSYMBOL_export_statement: /* export_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).export_stmt)); } -#line 2109 "bison_parser.cpp" +#line 2117 "bison_parser.cpp" break; case YYSYMBOL_show_statement: /* show_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).show_stmt)); } -#line 2115 "bison_parser.cpp" +#line 2123 "bison_parser.cpp" break; case YYSYMBOL_create_statement: /* create_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).create_stmt)); } -#line 2121 "bison_parser.cpp" +#line 2129 "bison_parser.cpp" break; case YYSYMBOL_opt_not_exists: /* opt_not_exists */ #line 155 "bison_parser.y" { } -#line 2127 "bison_parser.cpp" +#line 2135 "bison_parser.cpp" break; case YYSYMBOL_table_elem_commalist: /* table_elem_commalist */ @@ -2136,109 +2144,109 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).table_element_vec)); } -#line 2140 "bison_parser.cpp" +#line 2148 "bison_parser.cpp" break; case YYSYMBOL_table_elem: /* table_elem */ #line 166 "bison_parser.y" { delete (((*yyvaluep).table_element_t)); } -#line 2146 "bison_parser.cpp" +#line 2154 "bison_parser.cpp" break; case YYSYMBOL_column_def: /* column_def */ #line 166 "bison_parser.y" { delete (((*yyvaluep).column_t)); } -#line 2152 "bison_parser.cpp" +#line 2160 "bison_parser.cpp" break; case YYSYMBOL_column_type: /* column_type */ #line 155 "bison_parser.y" { } -#line 2158 "bison_parser.cpp" +#line 2166 "bison_parser.cpp" break; case YYSYMBOL_opt_time_specification: /* opt_time_specification */ #line 155 "bison_parser.y" { } -#line 2164 "bison_parser.cpp" +#line 2172 "bison_parser.cpp" break; case YYSYMBOL_opt_decimal_specification: /* opt_decimal_specification */ #line 155 "bison_parser.y" { } -#line 2170 "bison_parser.cpp" +#line 2178 "bison_parser.cpp" break; case YYSYMBOL_opt_column_constraints: /* opt_column_constraints */ #line 155 "bison_parser.y" { } -#line 2176 "bison_parser.cpp" +#line 2184 "bison_parser.cpp" break; case YYSYMBOL_column_constraint_list: /* column_constraint_list */ #line 155 "bison_parser.y" { } -#line 2182 "bison_parser.cpp" +#line 2190 "bison_parser.cpp" break; case YYSYMBOL_column_constraint: /* column_constraint */ #line 155 "bison_parser.y" { } -#line 2188 "bison_parser.cpp" +#line 2196 "bison_parser.cpp" break; case YYSYMBOL_table_constraint: /* table_constraint */ #line 166 "bison_parser.y" { delete (((*yyvaluep).table_constraint_t)); } -#line 2194 "bison_parser.cpp" +#line 2202 "bison_parser.cpp" break; case YYSYMBOL_drop_statement: /* drop_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).drop_stmt)); } -#line 2200 "bison_parser.cpp" +#line 2208 "bison_parser.cpp" break; case YYSYMBOL_opt_exists: /* opt_exists */ #line 155 "bison_parser.y" { } -#line 2206 "bison_parser.cpp" +#line 2214 "bison_parser.cpp" break; case YYSYMBOL_alter_statement: /* alter_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).alter_stmt)); } -#line 2212 "bison_parser.cpp" +#line 2220 "bison_parser.cpp" break; case YYSYMBOL_alter_action: /* alter_action */ #line 166 "bison_parser.y" { delete (((*yyvaluep).alter_action_t)); } -#line 2218 "bison_parser.cpp" +#line 2226 "bison_parser.cpp" break; case YYSYMBOL_drop_action: /* drop_action */ #line 166 "bison_parser.y" { delete (((*yyvaluep).drop_action_t)); } -#line 2224 "bison_parser.cpp" +#line 2232 "bison_parser.cpp" break; case YYSYMBOL_delete_statement: /* delete_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2230 "bison_parser.cpp" +#line 2238 "bison_parser.cpp" break; case YYSYMBOL_truncate_statement: /* truncate_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2236 "bison_parser.cpp" +#line 2244 "bison_parser.cpp" break; case YYSYMBOL_insert_statement: /* insert_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).insert_stmt)); } -#line 2242 "bison_parser.cpp" +#line 2250 "bison_parser.cpp" break; case YYSYMBOL_opt_column_list: /* opt_column_list */ @@ -2251,13 +2259,13 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2255 "bison_parser.cpp" +#line 2263 "bison_parser.cpp" break; case YYSYMBOL_update_statement: /* update_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).update_stmt)); } -#line 2261 "bison_parser.cpp" +#line 2269 "bison_parser.cpp" break; case YYSYMBOL_update_clause_commalist: /* update_clause_commalist */ @@ -2270,73 +2278,73 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).update_vec)); } -#line 2274 "bison_parser.cpp" +#line 2282 "bison_parser.cpp" break; case YYSYMBOL_update_clause: /* update_clause */ #line 166 "bison_parser.y" { delete (((*yyvaluep).update_t)); } -#line 2280 "bison_parser.cpp" +#line 2288 "bison_parser.cpp" break; case YYSYMBOL_select_statement: /* select_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2286 "bison_parser.cpp" +#line 2294 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation: /* select_within_set_operation */ #line 166 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2292 "bison_parser.cpp" +#line 2300 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation_no_parentheses: /* select_within_set_operation_no_parentheses */ #line 166 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2298 "bison_parser.cpp" +#line 2306 "bison_parser.cpp" break; case YYSYMBOL_select_with_paren: /* select_with_paren */ #line 166 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2304 "bison_parser.cpp" +#line 2312 "bison_parser.cpp" break; case YYSYMBOL_select_no_paren: /* select_no_paren */ #line 166 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2310 "bison_parser.cpp" +#line 2318 "bison_parser.cpp" break; case YYSYMBOL_set_operator: /* set_operator */ #line 166 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2316 "bison_parser.cpp" +#line 2324 "bison_parser.cpp" break; case YYSYMBOL_set_type: /* set_type */ #line 166 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2322 "bison_parser.cpp" +#line 2330 "bison_parser.cpp" break; case YYSYMBOL_opt_all: /* opt_all */ #line 155 "bison_parser.y" { } -#line 2328 "bison_parser.cpp" +#line 2336 "bison_parser.cpp" break; case YYSYMBOL_select_clause: /* select_clause */ #line 166 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2334 "bison_parser.cpp" +#line 2342 "bison_parser.cpp" break; case YYSYMBOL_opt_distinct: /* opt_distinct */ #line 155 "bison_parser.y" { } -#line 2340 "bison_parser.cpp" +#line 2348 "bison_parser.cpp" break; case YYSYMBOL_select_list: /* select_list */ @@ -2349,37 +2357,37 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2353 "bison_parser.cpp" +#line 2361 "bison_parser.cpp" break; case YYSYMBOL_opt_from_clause: /* opt_from_clause */ #line 166 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2359 "bison_parser.cpp" +#line 2367 "bison_parser.cpp" break; case YYSYMBOL_from_clause: /* from_clause */ #line 166 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2365 "bison_parser.cpp" +#line 2373 "bison_parser.cpp" break; case YYSYMBOL_opt_where: /* opt_where */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2371 "bison_parser.cpp" +#line 2379 "bison_parser.cpp" break; case YYSYMBOL_opt_group: /* opt_group */ #line 166 "bison_parser.y" { delete (((*yyvaluep).group_t)); } -#line 2377 "bison_parser.cpp" +#line 2385 "bison_parser.cpp" break; case YYSYMBOL_opt_having: /* opt_having */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2383 "bison_parser.cpp" +#line 2391 "bison_parser.cpp" break; case YYSYMBOL_opt_order: /* opt_order */ @@ -2392,7 +2400,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2396 "bison_parser.cpp" +#line 2404 "bison_parser.cpp" break; case YYSYMBOL_order_list: /* order_list */ @@ -2405,31 +2413,31 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2409 "bison_parser.cpp" +#line 2417 "bison_parser.cpp" break; case YYSYMBOL_order_desc: /* order_desc */ #line 166 "bison_parser.y" { delete (((*yyvaluep).order)); } -#line 2415 "bison_parser.cpp" +#line 2423 "bison_parser.cpp" break; case YYSYMBOL_opt_order_type: /* opt_order_type */ #line 155 "bison_parser.y" { } -#line 2421 "bison_parser.cpp" +#line 2429 "bison_parser.cpp" break; case YYSYMBOL_opt_top: /* opt_top */ #line 166 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2427 "bison_parser.cpp" +#line 2435 "bison_parser.cpp" break; case YYSYMBOL_opt_limit: /* opt_limit */ #line 166 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2433 "bison_parser.cpp" +#line 2441 "bison_parser.cpp" break; case YYSYMBOL_expr_list: /* expr_list */ @@ -2442,7 +2450,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2446 "bison_parser.cpp" +#line 2454 "bison_parser.cpp" break; case YYSYMBOL_opt_literal_list: /* opt_literal_list */ @@ -2455,7 +2463,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2459 "bison_parser.cpp" +#line 2467 "bison_parser.cpp" break; case YYSYMBOL_literal_list: /* literal_list */ @@ -2468,193 +2476,193 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2472 "bison_parser.cpp" +#line 2480 "bison_parser.cpp" break; case YYSYMBOL_expr_alias: /* expr_alias */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2478 "bison_parser.cpp" +#line 2486 "bison_parser.cpp" break; case YYSYMBOL_expr: /* expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2484 "bison_parser.cpp" +#line 2492 "bison_parser.cpp" break; case YYSYMBOL_operand: /* operand */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2490 "bison_parser.cpp" +#line 2498 "bison_parser.cpp" break; case YYSYMBOL_scalar_expr: /* scalar_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2496 "bison_parser.cpp" +#line 2504 "bison_parser.cpp" break; case YYSYMBOL_unary_expr: /* unary_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2502 "bison_parser.cpp" +#line 2510 "bison_parser.cpp" break; case YYSYMBOL_binary_expr: /* binary_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2508 "bison_parser.cpp" +#line 2516 "bison_parser.cpp" break; case YYSYMBOL_logic_expr: /* logic_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2514 "bison_parser.cpp" +#line 2522 "bison_parser.cpp" break; case YYSYMBOL_in_expr: /* in_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2520 "bison_parser.cpp" +#line 2528 "bison_parser.cpp" break; case YYSYMBOL_case_expr: /* case_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2526 "bison_parser.cpp" +#line 2534 "bison_parser.cpp" break; case YYSYMBOL_case_list: /* case_list */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2532 "bison_parser.cpp" +#line 2540 "bison_parser.cpp" break; case YYSYMBOL_exists_expr: /* exists_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2538 "bison_parser.cpp" +#line 2546 "bison_parser.cpp" break; case YYSYMBOL_comp_expr: /* comp_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2544 "bison_parser.cpp" +#line 2552 "bison_parser.cpp" break; case YYSYMBOL_function_expr: /* function_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2550 "bison_parser.cpp" +#line 2558 "bison_parser.cpp" break; case YYSYMBOL_extract_expr: /* extract_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2556 "bison_parser.cpp" +#line 2564 "bison_parser.cpp" break; case YYSYMBOL_cast_expr: /* cast_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2562 "bison_parser.cpp" +#line 2570 "bison_parser.cpp" break; case YYSYMBOL_datetime_field: /* datetime_field */ #line 155 "bison_parser.y" { } -#line 2568 "bison_parser.cpp" +#line 2576 "bison_parser.cpp" break; case YYSYMBOL_array_expr: /* array_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2574 "bison_parser.cpp" +#line 2582 "bison_parser.cpp" break; case YYSYMBOL_array_index: /* array_index */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2580 "bison_parser.cpp" +#line 2588 "bison_parser.cpp" break; case YYSYMBOL_between_expr: /* between_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2586 "bison_parser.cpp" +#line 2594 "bison_parser.cpp" break; case YYSYMBOL_column_name: /* column_name */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2592 "bison_parser.cpp" +#line 2600 "bison_parser.cpp" break; case YYSYMBOL_literal: /* literal */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2598 "bison_parser.cpp" +#line 2606 "bison_parser.cpp" break; case YYSYMBOL_string_literal: /* string_literal */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2604 "bison_parser.cpp" +#line 2612 "bison_parser.cpp" break; case YYSYMBOL_bool_literal: /* bool_literal */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2610 "bison_parser.cpp" +#line 2618 "bison_parser.cpp" break; case YYSYMBOL_num_literal: /* num_literal */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2616 "bison_parser.cpp" +#line 2624 "bison_parser.cpp" break; case YYSYMBOL_int_literal: /* int_literal */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2622 "bison_parser.cpp" +#line 2630 "bison_parser.cpp" break; case YYSYMBOL_null_literal: /* null_literal */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2628 "bison_parser.cpp" +#line 2636 "bison_parser.cpp" break; case YYSYMBOL_date_literal: /* date_literal */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2634 "bison_parser.cpp" +#line 2642 "bison_parser.cpp" break; case YYSYMBOL_param_expr: /* param_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2640 "bison_parser.cpp" +#line 2648 "bison_parser.cpp" break; case YYSYMBOL_table_ref: /* table_ref */ #line 166 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2646 "bison_parser.cpp" +#line 2654 "bison_parser.cpp" break; case YYSYMBOL_table_ref_atomic: /* table_ref_atomic */ #line 166 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2652 "bison_parser.cpp" +#line 2660 "bison_parser.cpp" break; case YYSYMBOL_nonjoin_table_ref_atomic: /* nonjoin_table_ref_atomic */ #line 166 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2658 "bison_parser.cpp" +#line 2666 "bison_parser.cpp" break; case YYSYMBOL_table_ref_commalist: /* table_ref_commalist */ @@ -2667,103 +2675,103 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).table_vec)); } -#line 2671 "bison_parser.cpp" +#line 2679 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name: /* table_ref_name */ #line 166 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2677 "bison_parser.cpp" +#line 2685 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name_no_alias: /* table_ref_name_no_alias */ #line 166 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2683 "bison_parser.cpp" +#line 2691 "bison_parser.cpp" break; case YYSYMBOL_table_name: /* table_name */ #line 156 "bison_parser.y" { free( (((*yyvaluep).table_name).name) ); free( (((*yyvaluep).table_name).schema) ); } -#line 2689 "bison_parser.cpp" +#line 2697 "bison_parser.cpp" break; case YYSYMBOL_opt_index_name: /* opt_index_name */ #line 157 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2695 "bison_parser.cpp" +#line 2703 "bison_parser.cpp" break; case YYSYMBOL_index_name: /* index_name */ #line 157 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2701 "bison_parser.cpp" +#line 2709 "bison_parser.cpp" break; case YYSYMBOL_table_alias: /* table_alias */ #line 166 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2707 "bison_parser.cpp" +#line 2715 "bison_parser.cpp" break; case YYSYMBOL_opt_table_alias: /* opt_table_alias */ #line 166 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2713 "bison_parser.cpp" +#line 2721 "bison_parser.cpp" break; case YYSYMBOL_alias: /* alias */ #line 166 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2719 "bison_parser.cpp" +#line 2727 "bison_parser.cpp" break; case YYSYMBOL_opt_alias: /* opt_alias */ #line 166 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2725 "bison_parser.cpp" +#line 2733 "bison_parser.cpp" break; case YYSYMBOL_opt_with_clause: /* opt_with_clause */ #line 166 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2731 "bison_parser.cpp" +#line 2739 "bison_parser.cpp" break; case YYSYMBOL_with_clause: /* with_clause */ #line 166 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2737 "bison_parser.cpp" +#line 2745 "bison_parser.cpp" break; case YYSYMBOL_with_description_list: /* with_description_list */ #line 166 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2743 "bison_parser.cpp" +#line 2751 "bison_parser.cpp" break; case YYSYMBOL_with_description: /* with_description */ #line 166 "bison_parser.y" { delete (((*yyvaluep).with_description_t)); } -#line 2749 "bison_parser.cpp" +#line 2757 "bison_parser.cpp" break; case YYSYMBOL_join_clause: /* join_clause */ #line 166 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2755 "bison_parser.cpp" +#line 2763 "bison_parser.cpp" break; case YYSYMBOL_opt_join_type: /* opt_join_type */ #line 155 "bison_parser.y" { } -#line 2761 "bison_parser.cpp" +#line 2769 "bison_parser.cpp" break; case YYSYMBOL_join_condition: /* join_condition */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2767 "bison_parser.cpp" +#line 2775 "bison_parser.cpp" break; case YYSYMBOL_ident_commalist: /* ident_commalist */ @@ -2776,7 +2784,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2780 "bison_parser.cpp" +#line 2788 "bison_parser.cpp" break; default: @@ -2883,7 +2891,7 @@ YYLTYPE yylloc = yyloc_default; yylloc.string_length = 0; } -#line 2887 "bison_parser.cpp" +#line 2895 "bison_parser.cpp" yylsp[0] = yylloc; goto yysetstate; @@ -3111,7 +3119,7 @@ YYLTYPE yylloc = yyloc_default; } delete (yyvsp[-1].stmt_vec); } -#line 3115 "bison_parser.cpp" +#line 3123 "bison_parser.cpp" break; case 3: /* statement_list: statement */ @@ -3122,7 +3130,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.stmt_vec) = new std::vector(); (yyval.stmt_vec)->push_back((yyvsp[0].statement)); } -#line 3126 "bison_parser.cpp" +#line 3134 "bison_parser.cpp" break; case 4: /* statement_list: statement_list ';' statement */ @@ -3133,7 +3141,7 @@ YYLTYPE yylloc = yyloc_default; (yyvsp[-2].stmt_vec)->push_back((yyvsp[0].statement)); (yyval.stmt_vec) = (yyvsp[-2].stmt_vec); } -#line 3137 "bison_parser.cpp" +#line 3145 "bison_parser.cpp" break; case 5: /* statement: prepare_statement opt_hints */ @@ -3142,7 +3150,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3146 "bison_parser.cpp" +#line 3154 "bison_parser.cpp" break; case 6: /* statement: preparable_statement opt_hints */ @@ -3151,7 +3159,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.statement) = (yyvsp[-1].statement); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3155 "bison_parser.cpp" +#line 3163 "bison_parser.cpp" break; case 7: /* statement: show_statement */ @@ -3159,7 +3167,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.statement) = (yyvsp[0].show_stmt); } -#line 3163 "bison_parser.cpp" +#line 3171 "bison_parser.cpp" break; case 8: /* statement: import_statement */ @@ -3167,7 +3175,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.statement) = (yyvsp[0].import_stmt); } -#line 3171 "bison_parser.cpp" +#line 3179 "bison_parser.cpp" break; case 9: /* statement: export_statement */ @@ -3175,91 +3183,91 @@ YYLTYPE yylloc = yyloc_default; { (yyval.statement) = (yyvsp[0].export_stmt); } -#line 3179 "bison_parser.cpp" +#line 3187 "bison_parser.cpp" break; case 10: /* preparable_statement: select_statement */ #line 346 "bison_parser.y" { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 3185 "bison_parser.cpp" +#line 3193 "bison_parser.cpp" break; case 11: /* preparable_statement: create_statement */ #line 347 "bison_parser.y" { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 3191 "bison_parser.cpp" +#line 3199 "bison_parser.cpp" break; case 12: /* preparable_statement: insert_statement */ #line 348 "bison_parser.y" { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 3197 "bison_parser.cpp" +#line 3205 "bison_parser.cpp" break; case 13: /* preparable_statement: delete_statement */ #line 349 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3203 "bison_parser.cpp" +#line 3211 "bison_parser.cpp" break; case 14: /* preparable_statement: truncate_statement */ #line 350 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3209 "bison_parser.cpp" +#line 3217 "bison_parser.cpp" break; case 15: /* preparable_statement: update_statement */ #line 351 "bison_parser.y" { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 3215 "bison_parser.cpp" +#line 3223 "bison_parser.cpp" break; case 16: /* preparable_statement: drop_statement */ #line 352 "bison_parser.y" { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 3221 "bison_parser.cpp" +#line 3229 "bison_parser.cpp" break; case 17: /* preparable_statement: alter_statement */ #line 353 "bison_parser.y" { (yyval.statement) = (yyvsp[0].alter_stmt); } -#line 3227 "bison_parser.cpp" +#line 3235 "bison_parser.cpp" break; case 18: /* preparable_statement: execute_statement */ #line 354 "bison_parser.y" { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 3233 "bison_parser.cpp" +#line 3241 "bison_parser.cpp" break; case 19: /* preparable_statement: transaction_statement */ #line 355 "bison_parser.y" { (yyval.statement) = (yyvsp[0].transaction_stmt); } -#line 3239 "bison_parser.cpp" +#line 3247 "bison_parser.cpp" break; case 20: /* opt_hints: WITH HINT '(' hint_list ')' */ #line 364 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 3245 "bison_parser.cpp" +#line 3253 "bison_parser.cpp" break; case 21: /* opt_hints: %empty */ #line 365 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 3251 "bison_parser.cpp" +#line 3259 "bison_parser.cpp" break; case 22: /* hint_list: hint */ #line 370 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3257 "bison_parser.cpp" +#line 3265 "bison_parser.cpp" break; case 23: /* hint_list: hint_list ',' hint */ #line 371 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3263 "bison_parser.cpp" +#line 3271 "bison_parser.cpp" break; case 24: /* hint: IDENTIFIER */ @@ -3268,7 +3276,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[0].sval); } -#line 3272 "bison_parser.cpp" +#line 3280 "bison_parser.cpp" break; case 25: /* hint: IDENTIFIER '(' literal_list ')' */ @@ -3278,7 +3286,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expr)->name = (yyvsp[-3].sval); (yyval.expr)->exprList = (yyvsp[-1].expr_vec); } -#line 3282 "bison_parser.cpp" +#line 3290 "bison_parser.cpp" break; case 26: /* transaction_statement: BEGIN opt_transaction_keyword */ @@ -3286,7 +3294,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.transaction_stmt) = new TransactionStatement(kBeginTransaction); } -#line 3290 "bison_parser.cpp" +#line 3298 "bison_parser.cpp" break; case 27: /* transaction_statement: ROLLBACK opt_transaction_keyword */ @@ -3294,7 +3302,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.transaction_stmt) = new TransactionStatement(kRollbackTransaction); } -#line 3298 "bison_parser.cpp" +#line 3306 "bison_parser.cpp" break; case 28: /* transaction_statement: COMMIT opt_transaction_keyword */ @@ -3302,7 +3310,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.transaction_stmt) = new TransactionStatement(kCommitTransaction); } -#line 3306 "bison_parser.cpp" +#line 3314 "bison_parser.cpp" break; case 31: /* prepare_statement: PREPARE IDENTIFIER FROM prepare_target_query */ @@ -3312,7 +3320,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.prep_stmt)->name = (yyvsp[-2].sval); (yyval.prep_stmt)->query = (yyvsp[0].sval); } -#line 3316 "bison_parser.cpp" +#line 3324 "bison_parser.cpp" break; case 33: /* execute_statement: EXECUTE IDENTIFIER */ @@ -3321,7 +3329,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[0].sval); } -#line 3325 "bison_parser.cpp" +#line 3333 "bison_parser.cpp" break; case 34: /* execute_statement: EXECUTE IDENTIFIER '(' opt_literal_list ')' */ @@ -3331,7 +3339,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.exec_stmt)->name = (yyvsp[-3].sval); (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); } -#line 3335 "bison_parser.cpp" +#line 3343 "bison_parser.cpp" break; case 35: /* import_statement: IMPORT FROM file_type FILE file_path INTO table_name */ @@ -3342,7 +3350,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.import_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3346 "bison_parser.cpp" +#line 3354 "bison_parser.cpp" break; case 36: /* import_statement: COPY table_name FROM file_path opt_file_type */ @@ -3353,7 +3361,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.import_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3357 "bison_parser.cpp" +#line 3365 "bison_parser.cpp" break; case 37: /* file_type: IDENTIFIER */ @@ -3372,13 +3380,13 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[0].sval)); } -#line 3376 "bison_parser.cpp" +#line 3384 "bison_parser.cpp" break; case 38: /* file_path: string_literal */ #line 471 "bison_parser.y" { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 3382 "bison_parser.cpp" +#line 3390 "bison_parser.cpp" break; case 39: /* opt_file_type: WITH FORMAT file_type */ @@ -3386,13 +3394,13 @@ YYLTYPE yylloc = yyloc_default; { (yyval.import_type_t) = (yyvsp[0].import_type_t); } -#line 3390 "bison_parser.cpp" +#line 3398 "bison_parser.cpp" break; case 40: /* opt_file_type: %empty */ #line 478 "bison_parser.y" { (yyval.import_type_t) = kImportAuto; } -#line 3396 "bison_parser.cpp" +#line 3404 "bison_parser.cpp" break; case 41: /* export_statement: COPY table_name TO file_path opt_file_type */ @@ -3403,7 +3411,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.export_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.export_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3407 "bison_parser.cpp" +#line 3415 "bison_parser.cpp" break; case 42: /* show_statement: SHOW TABLES */ @@ -3411,7 +3419,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.show_stmt) = new ShowStatement(kShowTables); } -#line 3415 "bison_parser.cpp" +#line 3423 "bison_parser.cpp" break; case 43: /* show_statement: SHOW COLUMNS table_name */ @@ -3421,7 +3429,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.show_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.show_stmt)->name = (yyvsp[0].table_name).name; } -#line 3425 "bison_parser.cpp" +#line 3433 "bison_parser.cpp" break; case 44: /* show_statement: DESCRIBE table_name */ @@ -3431,7 +3439,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.show_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.show_stmt)->name = (yyvsp[0].table_name).name; } -#line 3435 "bison_parser.cpp" +#line 3443 "bison_parser.cpp" break; case 45: /* create_statement: CREATE TABLE opt_not_exists table_name FROM IDENTIFIER FILE file_path */ @@ -3449,7 +3457,7 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].sval)); (yyval.create_stmt)->filePath = (yyvsp[0].sval); } -#line 3453 "bison_parser.cpp" +#line 3461 "bison_parser.cpp" break; case 46: /* create_statement: CREATE TABLE opt_not_exists table_name '(' table_elem_commalist ')' */ @@ -3460,12 +3468,13 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->setColumnDefsAndConstraints((yyvsp[-1].table_element_vec)); + delete (yyvsp[-1].table_element_vec); } -#line 3465 "bison_parser.cpp" +#line 3474 "bison_parser.cpp" break; case 47: /* create_statement: CREATE TABLE opt_not_exists table_name AS select_statement */ -#line 543 "bison_parser.y" +#line 544 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-3].bval); @@ -3473,11 +3482,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-2].table_name).name; (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3477 "bison_parser.cpp" +#line 3486 "bison_parser.cpp" break; case 48: /* create_statement: CREATE INDEX opt_not_exists opt_index_name ON table_name '(' ident_commalist ')' */ -#line 550 "bison_parser.y" +#line 551 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateIndex); (yyval.create_stmt)->indexName = (yyvsp[-5].sval); @@ -3485,11 +3494,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->indexColumns = (yyvsp[-1].str_vec); } -#line 3489 "bison_parser.cpp" +#line 3498 "bison_parser.cpp" break; case 49: /* create_statement: CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement */ -#line 557 "bison_parser.y" +#line 558 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateView); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -3498,330 +3507,330 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3502 "bison_parser.cpp" +#line 3511 "bison_parser.cpp" break; case 50: /* opt_not_exists: IF NOT EXISTS */ -#line 568 "bison_parser.y" +#line 569 "bison_parser.y" { (yyval.bval) = true; } -#line 3508 "bison_parser.cpp" +#line 3517 "bison_parser.cpp" break; case 51: /* opt_not_exists: %empty */ -#line 569 "bison_parser.y" +#line 570 "bison_parser.y" { (yyval.bval) = false; } -#line 3514 "bison_parser.cpp" +#line 3523 "bison_parser.cpp" break; case 52: /* table_elem_commalist: table_elem */ -#line 573 "bison_parser.y" +#line 574 "bison_parser.y" { (yyval.table_element_vec) = new std::vector(); (yyval.table_element_vec)->push_back((yyvsp[0].table_element_t)); } -#line 3520 "bison_parser.cpp" +#line 3529 "bison_parser.cpp" break; case 53: /* table_elem_commalist: table_elem_commalist ',' table_elem */ -#line 574 "bison_parser.y" +#line 575 "bison_parser.y" { (yyvsp[-2].table_element_vec)->push_back((yyvsp[0].table_element_t)); (yyval.table_element_vec) = (yyvsp[-2].table_element_vec); } -#line 3526 "bison_parser.cpp" +#line 3535 "bison_parser.cpp" break; case 54: /* table_elem: column_def */ -#line 578 "bison_parser.y" +#line 579 "bison_parser.y" { (yyval.table_element_t) = (yyvsp[0].column_t); } -#line 3532 "bison_parser.cpp" +#line 3541 "bison_parser.cpp" break; case 55: /* table_elem: table_constraint */ -#line 579 "bison_parser.y" +#line 580 "bison_parser.y" { (yyval.table_element_t) = (yyvsp[0].table_constraint_t); } -#line 3538 "bison_parser.cpp" +#line 3547 "bison_parser.cpp" break; case 56: /* column_def: IDENTIFIER column_type opt_column_constraints */ -#line 583 "bison_parser.y" +#line 584 "bison_parser.y" { (yyval.column_t) = new ColumnDefinition((yyvsp[-2].sval), (yyvsp[-1].column_type_t), (yyvsp[0].column_constraint_vec)); (yyval.column_t)->setNullableExplicit(); } -#line 3547 "bison_parser.cpp" +#line 3556 "bison_parser.cpp" break; case 57: /* column_type: INT */ -#line 590 "bison_parser.y" +#line 591 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3553 "bison_parser.cpp" +#line 3562 "bison_parser.cpp" break; case 58: /* column_type: INTEGER */ -#line 591 "bison_parser.y" +#line 592 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3559 "bison_parser.cpp" +#line 3568 "bison_parser.cpp" break; case 59: /* column_type: LONG */ -#line 592 "bison_parser.y" +#line 593 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::LONG}; } -#line 3565 "bison_parser.cpp" +#line 3574 "bison_parser.cpp" break; case 60: /* column_type: FLOAT */ -#line 593 "bison_parser.y" +#line 594 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3571 "bison_parser.cpp" +#line 3580 "bison_parser.cpp" break; case 61: /* column_type: DECIMAL opt_decimal_specification */ -#line 594 "bison_parser.y" +#line 595 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DECIMAL, 0, (yyvsp[0].column_specification_t)}; } -#line 3577 "bison_parser.cpp" +#line 3586 "bison_parser.cpp" break; case 62: /* column_type: DOUBLE */ -#line 595 "bison_parser.y" +#line 596 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } -#line 3583 "bison_parser.cpp" +#line 3592 "bison_parser.cpp" break; case 63: /* column_type: REAL */ -#line 596 "bison_parser.y" +#line 597 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::REAL}; } -#line 3589 "bison_parser.cpp" +#line 3598 "bison_parser.cpp" break; case 64: /* column_type: VARCHAR '(' INTVAL ')' */ -#line 597 "bison_parser.y" +#line 598 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3595 "bison_parser.cpp" +#line 3604 "bison_parser.cpp" break; case 65: /* column_type: CHARACTER VARYING '(' INTVAL ')' */ -#line 598 "bison_parser.y" +#line 599 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR_VARYING, (yyvsp[-1].ival)}; } -#line 3601 "bison_parser.cpp" +#line 3610 "bison_parser.cpp" break; case 66: /* column_type: CHAR '(' INTVAL ')' */ -#line 599 "bison_parser.y" +#line 600 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } -#line 3607 "bison_parser.cpp" +#line 3616 "bison_parser.cpp" break; case 67: /* column_type: TEXT */ -#line 600 "bison_parser.y" +#line 601 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } -#line 3613 "bison_parser.cpp" +#line 3622 "bison_parser.cpp" break; case 68: /* column_type: TIME opt_time_specification */ -#line 601 "bison_parser.y" +#line 602 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TIME, 0, (yyvsp[0].column_specification_t) }; } -#line 3619 "bison_parser.cpp" +#line 3628 "bison_parser.cpp" break; case 69: /* column_type: DATETIME */ -#line 602 "bison_parser.y" +#line 603 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } -#line 3625 "bison_parser.cpp" +#line 3634 "bison_parser.cpp" break; case 70: /* column_type: DATE */ -#line 603 "bison_parser.y" +#line 604 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATE}; } -#line 3631 "bison_parser.cpp" +#line 3640 "bison_parser.cpp" break; case 71: /* opt_time_specification: '(' INTVAL ')' */ -#line 607 "bison_parser.y" +#line 608 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-1].ival)}; } -#line 3637 "bison_parser.cpp" +#line 3646 "bison_parser.cpp" break; case 72: /* opt_time_specification: %empty */ -#line 608 "bison_parser.y" +#line 609 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{}; } -#line 3643 "bison_parser.cpp" +#line 3652 "bison_parser.cpp" break; case 73: /* opt_decimal_specification: '(' INTVAL ',' INTVAL ')' */ -#line 612 "bison_parser.y" +#line 613 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-3].ival), (yyvsp[-1].ival)}; } -#line 3649 "bison_parser.cpp" +#line 3658 "bison_parser.cpp" break; case 74: /* opt_decimal_specification: '(' INTVAL ')' */ -#line 613 "bison_parser.y" +#line 614 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-1].ival)}; } -#line 3655 "bison_parser.cpp" +#line 3664 "bison_parser.cpp" break; case 75: /* opt_decimal_specification: %empty */ -#line 614 "bison_parser.y" +#line 615 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{}; } -#line 3661 "bison_parser.cpp" +#line 3670 "bison_parser.cpp" break; case 76: /* opt_column_constraints: column_constraint_list */ -#line 618 "bison_parser.y" +#line 619 "bison_parser.y" { (yyval.column_constraint_vec) = (yyvsp[0].column_constraint_vec); } -#line 3667 "bison_parser.cpp" +#line 3676 "bison_parser.cpp" break; case 77: /* opt_column_constraints: %empty */ -#line 619 "bison_parser.y" +#line 620 "bison_parser.y" { (yyval.column_constraint_vec) = new std::vector(); } -#line 3673 "bison_parser.cpp" +#line 3682 "bison_parser.cpp" break; case 78: /* column_constraint_list: column_constraint */ -#line 623 "bison_parser.y" +#line 624 "bison_parser.y" { (yyval.column_constraint_vec) = new std::vector(); (yyval.column_constraint_vec)->push_back((yyvsp[0].column_constraint_t)); } -#line 3679 "bison_parser.cpp" +#line 3688 "bison_parser.cpp" break; case 79: /* column_constraint_list: column_constraint_list column_constraint */ -#line 624 "bison_parser.y" +#line 625 "bison_parser.y" { (yyvsp[-1].column_constraint_vec)->push_back((yyvsp[0].column_constraint_t)); (yyval.column_constraint_vec) = (yyvsp[-1].column_constraint_vec); } -#line 3685 "bison_parser.cpp" +#line 3694 "bison_parser.cpp" break; case 80: /* column_constraint: PRIMARY KEY */ -#line 627 "bison_parser.y" +#line 628 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::PRIMARY_KEY; } -#line 3691 "bison_parser.cpp" +#line 3700 "bison_parser.cpp" break; case 81: /* column_constraint: UNIQUE */ -#line 628 "bison_parser.y" +#line 629 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::UNIQUE; } -#line 3697 "bison_parser.cpp" +#line 3706 "bison_parser.cpp" break; case 82: /* column_constraint: NULL */ -#line 629 "bison_parser.y" +#line 630 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::_NULL; } -#line 3703 "bison_parser.cpp" +#line 3712 "bison_parser.cpp" break; case 83: /* column_constraint: NOT NULL */ -#line 630 "bison_parser.y" +#line 631 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::NOTNULL; } -#line 3709 "bison_parser.cpp" +#line 3718 "bison_parser.cpp" break; case 84: /* table_constraint: PRIMARY KEY '(' ident_commalist ')' */ -#line 634 "bison_parser.y" +#line 635 "bison_parser.y" { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::PRIMARY_KEY, (yyvsp[-1].str_vec)); } -#line 3715 "bison_parser.cpp" +#line 3724 "bison_parser.cpp" break; case 85: /* table_constraint: UNIQUE '(' ident_commalist ')' */ -#line 635 "bison_parser.y" +#line 636 "bison_parser.y" { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::UNIQUE, (yyvsp[-1].str_vec)); } -#line 3721 "bison_parser.cpp" +#line 3730 "bison_parser.cpp" break; case 86: /* drop_statement: DROP TABLE opt_exists table_name */ -#line 646 "bison_parser.y" +#line 647 "bison_parser.y" { (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 3732 "bison_parser.cpp" +#line 3741 "bison_parser.cpp" break; case 87: /* drop_statement: DROP VIEW opt_exists table_name */ -#line 652 "bison_parser.y" +#line 653 "bison_parser.y" { (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 3743 "bison_parser.cpp" +#line 3752 "bison_parser.cpp" break; case 88: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ -#line 658 "bison_parser.y" +#line 659 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); (yyval.drop_stmt)->ifExists = false; (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 3753 "bison_parser.cpp" +#line 3762 "bison_parser.cpp" break; case 89: /* drop_statement: DROP INDEX opt_exists index_name */ -#line 664 "bison_parser.y" +#line 665 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropIndex); (yyval.drop_stmt)->ifExists = (yyvsp[-1].bval); (yyval.drop_stmt)->indexName = (yyvsp[0].sval); } -#line 3763 "bison_parser.cpp" +#line 3772 "bison_parser.cpp" break; case 90: /* opt_exists: IF EXISTS */ -#line 672 "bison_parser.y" +#line 673 "bison_parser.y" { (yyval.bval) = true; } -#line 3769 "bison_parser.cpp" +#line 3778 "bison_parser.cpp" break; case 91: /* opt_exists: %empty */ -#line 673 "bison_parser.y" +#line 674 "bison_parser.y" { (yyval.bval) = false; } -#line 3775 "bison_parser.cpp" +#line 3784 "bison_parser.cpp" break; case 92: /* alter_statement: ALTER TABLE opt_exists table_name alter_action */ -#line 682 "bison_parser.y" +#line 683 "bison_parser.y" { (yyval.alter_stmt) = new AlterStatement((yyvsp[-1].table_name).name, (yyvsp[0].alter_action_t)); (yyval.alter_stmt)->ifTableExists = (yyvsp[-2].bval); (yyval.alter_stmt)->schema = (yyvsp[-1].table_name).schema; } -#line 3785 "bison_parser.cpp" +#line 3794 "bison_parser.cpp" break; case 93: /* alter_action: drop_action */ -#line 690 "bison_parser.y" +#line 691 "bison_parser.y" {(yyval.alter_action_t) = (yyvsp[0].drop_action_t);} -#line 3791 "bison_parser.cpp" +#line 3800 "bison_parser.cpp" break; - case 94: /* drop_action: DROP COLUMN opt_exists column_name */ -#line 693 "bison_parser.y" - { - (yyval.drop_action_t) = new DropColumnAction((yyvsp[0].expr)->name); + case 94: /* drop_action: DROP COLUMN opt_exists IDENTIFIER */ +#line 694 "bison_parser.y" + { + (yyval.drop_action_t) = new DropColumnAction((yyvsp[0].sval)); (yyval.drop_action_t)->ifExists = (yyvsp[-1].bval); } -#line 3800 "bison_parser.cpp" +#line 3809 "bison_parser.cpp" break; case 95: /* delete_statement: DELETE FROM table_name opt_where */ -#line 705 "bison_parser.y" +#line 706 "bison_parser.y" { (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 3811 "bison_parser.cpp" +#line 3820 "bison_parser.cpp" break; case 96: /* truncate_statement: TRUNCATE table_name */ -#line 714 "bison_parser.y" +#line 715 "bison_parser.y" { (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3821 "bison_parser.cpp" +#line 3830 "bison_parser.cpp" break; case 97: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ -#line 727 "bison_parser.y" +#line 728 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertValues); (yyval.insert_stmt)->schema = (yyvsp[-5].table_name).schema; @@ -3829,11 +3838,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } -#line 3833 "bison_parser.cpp" +#line 3842 "bison_parser.cpp" break; case 98: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ -#line 734 "bison_parser.y" +#line 735 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertSelect); (yyval.insert_stmt)->schema = (yyvsp[-2].table_name).schema; @@ -3841,74 +3850,74 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } -#line 3845 "bison_parser.cpp" +#line 3854 "bison_parser.cpp" break; case 99: /* opt_column_list: '(' ident_commalist ')' */ -#line 745 "bison_parser.y" +#line 746 "bison_parser.y" { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 3851 "bison_parser.cpp" +#line 3860 "bison_parser.cpp" break; case 100: /* opt_column_list: %empty */ -#line 746 "bison_parser.y" +#line 747 "bison_parser.y" { (yyval.str_vec) = nullptr; } -#line 3857 "bison_parser.cpp" +#line 3866 "bison_parser.cpp" break; case 101: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ -#line 756 "bison_parser.y" +#line 757 "bison_parser.y" { (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 3868 "bison_parser.cpp" +#line 3877 "bison_parser.cpp" break; case 102: /* update_clause_commalist: update_clause */ -#line 765 "bison_parser.y" +#line 766 "bison_parser.y" { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 3874 "bison_parser.cpp" +#line 3883 "bison_parser.cpp" break; case 103: /* update_clause_commalist: update_clause_commalist ',' update_clause */ -#line 766 "bison_parser.y" +#line 767 "bison_parser.y" { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 3880 "bison_parser.cpp" +#line 3889 "bison_parser.cpp" break; case 104: /* update_clause: IDENTIFIER '=' expr */ -#line 770 "bison_parser.y" +#line 771 "bison_parser.y" { (yyval.update_t) = new UpdateClause(); (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 3890 "bison_parser.cpp" +#line 3899 "bison_parser.cpp" break; case 105: /* select_statement: opt_with_clause select_with_paren */ -#line 782 "bison_parser.y" +#line 783 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3899 "bison_parser.cpp" +#line 3908 "bison_parser.cpp" break; case 106: /* select_statement: opt_with_clause select_no_paren */ -#line 786 "bison_parser.y" +#line 787 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3908 "bison_parser.cpp" +#line 3917 "bison_parser.cpp" break; case 107: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ -#line 790 "bison_parser.y" +#line 791 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3920,17 +3929,17 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); (yyval.select_stmt)->withDescriptions = (yyvsp[-5].with_description_vec); } -#line 3924 "bison_parser.cpp" +#line 3933 "bison_parser.cpp" break; case 110: /* select_within_set_operation_no_parentheses: select_clause */ -#line 808 "bison_parser.y" +#line 809 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); } -#line 3930 "bison_parser.cpp" +#line 3939 "bison_parser.cpp" break; case 111: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ -#line 809 "bison_parser.y" +#line 810 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3939,23 +3948,23 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->push_back((yyvsp[-1].set_operator_t)); (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[0].select_stmt); } -#line 3943 "bison_parser.cpp" +#line 3952 "bison_parser.cpp" break; case 112: /* select_with_paren: '(' select_no_paren ')' */ -#line 820 "bison_parser.y" +#line 821 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3949 "bison_parser.cpp" +#line 3958 "bison_parser.cpp" break; case 113: /* select_with_paren: '(' select_with_paren ')' */ -#line 821 "bison_parser.y" +#line 822 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3955 "bison_parser.cpp" +#line 3964 "bison_parser.cpp" break; case 114: /* select_no_paren: select_clause opt_order opt_limit */ -#line 825 "bison_parser.y" +#line 826 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); (yyval.select_stmt)->order = (yyvsp[-1].order_vec); @@ -3966,11 +3975,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3970 "bison_parser.cpp" +#line 3979 "bison_parser.cpp" break; case 115: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ -#line 835 "bison_parser.y" +#line 836 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3981,63 +3990,63 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); } -#line 3985 "bison_parser.cpp" +#line 3994 "bison_parser.cpp" break; case 116: /* set_operator: set_type opt_all */ -#line 848 "bison_parser.y" +#line 849 "bison_parser.y" { (yyval.set_operator_t) = (yyvsp[-1].set_operator_t); (yyval.set_operator_t)->isAll = (yyvsp[0].bval); } -#line 3994 "bison_parser.cpp" +#line 4003 "bison_parser.cpp" break; case 117: /* set_type: UNION */ -#line 855 "bison_parser.y" +#line 856 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetUnion; } -#line 4003 "bison_parser.cpp" +#line 4012 "bison_parser.cpp" break; case 118: /* set_type: INTERSECT */ -#line 859 "bison_parser.y" +#line 860 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetIntersect; } -#line 4012 "bison_parser.cpp" +#line 4021 "bison_parser.cpp" break; case 119: /* set_type: EXCEPT */ -#line 863 "bison_parser.y" +#line 864 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetExcept; } -#line 4021 "bison_parser.cpp" +#line 4030 "bison_parser.cpp" break; case 120: /* opt_all: ALL */ -#line 870 "bison_parser.y" +#line 871 "bison_parser.y" { (yyval.bval) = true; } -#line 4029 "bison_parser.cpp" +#line 4038 "bison_parser.cpp" break; case 121: /* opt_all: %empty */ -#line 873 "bison_parser.y" +#line 874 "bison_parser.y" { (yyval.bval) = false; } -#line 4037 "bison_parser.cpp" +#line 4046 "bison_parser.cpp" break; case 122: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ -#line 879 "bison_parser.y" +#line 880 "bison_parser.y" { (yyval.select_stmt) = new SelectStatement(); (yyval.select_stmt)->limit = (yyvsp[-5].limit); @@ -4047,213 +4056,213 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 4051 "bison_parser.cpp" +#line 4060 "bison_parser.cpp" break; case 123: /* opt_distinct: DISTINCT */ -#line 891 "bison_parser.y" +#line 892 "bison_parser.y" { (yyval.bval) = true; } -#line 4057 "bison_parser.cpp" +#line 4066 "bison_parser.cpp" break; case 124: /* opt_distinct: %empty */ -#line 892 "bison_parser.y" +#line 893 "bison_parser.y" { (yyval.bval) = false; } -#line 4063 "bison_parser.cpp" +#line 4072 "bison_parser.cpp" break; case 126: /* opt_from_clause: from_clause */ -#line 900 "bison_parser.y" +#line 901 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 4069 "bison_parser.cpp" +#line 4078 "bison_parser.cpp" break; case 127: /* opt_from_clause: %empty */ -#line 901 "bison_parser.y" +#line 902 "bison_parser.y" { (yyval.table) = nullptr; } -#line 4075 "bison_parser.cpp" +#line 4084 "bison_parser.cpp" break; case 128: /* from_clause: FROM table_ref */ -#line 905 "bison_parser.y" +#line 906 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 4081 "bison_parser.cpp" +#line 4090 "bison_parser.cpp" break; case 129: /* opt_where: WHERE expr */ -#line 910 "bison_parser.y" +#line 911 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 4087 "bison_parser.cpp" +#line 4096 "bison_parser.cpp" break; case 130: /* opt_where: %empty */ -#line 911 "bison_parser.y" +#line 912 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 4093 "bison_parser.cpp" +#line 4102 "bison_parser.cpp" break; case 131: /* opt_group: GROUP BY expr_list opt_having */ -#line 915 "bison_parser.y" +#line 916 "bison_parser.y" { (yyval.group_t) = new GroupByDescription(); (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 4103 "bison_parser.cpp" +#line 4112 "bison_parser.cpp" break; case 132: /* opt_group: %empty */ -#line 920 "bison_parser.y" +#line 921 "bison_parser.y" { (yyval.group_t) = nullptr; } -#line 4109 "bison_parser.cpp" +#line 4118 "bison_parser.cpp" break; case 133: /* opt_having: HAVING expr */ -#line 924 "bison_parser.y" +#line 925 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 4115 "bison_parser.cpp" +#line 4124 "bison_parser.cpp" break; case 134: /* opt_having: %empty */ -#line 925 "bison_parser.y" +#line 926 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 4121 "bison_parser.cpp" +#line 4130 "bison_parser.cpp" break; case 135: /* opt_order: ORDER BY order_list */ -#line 929 "bison_parser.y" +#line 930 "bison_parser.y" { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 4127 "bison_parser.cpp" +#line 4136 "bison_parser.cpp" break; case 136: /* opt_order: %empty */ -#line 930 "bison_parser.y" +#line 931 "bison_parser.y" { (yyval.order_vec) = nullptr; } -#line 4133 "bison_parser.cpp" +#line 4142 "bison_parser.cpp" break; case 137: /* order_list: order_desc */ -#line 934 "bison_parser.y" +#line 935 "bison_parser.y" { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 4139 "bison_parser.cpp" +#line 4148 "bison_parser.cpp" break; case 138: /* order_list: order_list ',' order_desc */ -#line 935 "bison_parser.y" +#line 936 "bison_parser.y" { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 4145 "bison_parser.cpp" +#line 4154 "bison_parser.cpp" break; case 139: /* order_desc: expr opt_order_type */ -#line 939 "bison_parser.y" +#line 940 "bison_parser.y" { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 4151 "bison_parser.cpp" +#line 4160 "bison_parser.cpp" break; case 140: /* opt_order_type: ASC */ -#line 943 "bison_parser.y" +#line 944 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 4157 "bison_parser.cpp" +#line 4166 "bison_parser.cpp" break; case 141: /* opt_order_type: DESC */ -#line 944 "bison_parser.y" +#line 945 "bison_parser.y" { (yyval.order_type) = kOrderDesc; } -#line 4163 "bison_parser.cpp" +#line 4172 "bison_parser.cpp" break; case 142: /* opt_order_type: %empty */ -#line 945 "bison_parser.y" +#line 946 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 4169 "bison_parser.cpp" +#line 4178 "bison_parser.cpp" break; case 143: /* opt_top: TOP int_literal */ -#line 951 "bison_parser.y" +#line 952 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 4175 "bison_parser.cpp" +#line 4184 "bison_parser.cpp" break; case 144: /* opt_top: %empty */ -#line 952 "bison_parser.y" +#line 953 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 4181 "bison_parser.cpp" +#line 4190 "bison_parser.cpp" break; case 145: /* opt_limit: LIMIT expr */ -#line 956 "bison_parser.y" +#line 957 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 4187 "bison_parser.cpp" +#line 4196 "bison_parser.cpp" break; case 146: /* opt_limit: OFFSET expr */ -#line 957 "bison_parser.y" +#line 958 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 4193 "bison_parser.cpp" +#line 4202 "bison_parser.cpp" break; case 147: /* opt_limit: LIMIT expr OFFSET expr */ -#line 958 "bison_parser.y" +#line 959 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4199 "bison_parser.cpp" +#line 4208 "bison_parser.cpp" break; case 148: /* opt_limit: LIMIT ALL */ -#line 959 "bison_parser.y" +#line 960 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, nullptr); } -#line 4205 "bison_parser.cpp" +#line 4214 "bison_parser.cpp" break; case 149: /* opt_limit: LIMIT ALL OFFSET expr */ -#line 960 "bison_parser.y" +#line 961 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 4211 "bison_parser.cpp" +#line 4220 "bison_parser.cpp" break; case 150: /* opt_limit: %empty */ -#line 961 "bison_parser.y" +#line 962 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 4217 "bison_parser.cpp" +#line 4226 "bison_parser.cpp" break; case 151: /* expr_list: expr_alias */ -#line 968 "bison_parser.y" +#line 969 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4223 "bison_parser.cpp" +#line 4232 "bison_parser.cpp" break; case 152: /* expr_list: expr_list ',' expr_alias */ -#line 969 "bison_parser.y" +#line 970 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4229 "bison_parser.cpp" +#line 4238 "bison_parser.cpp" break; case 153: /* opt_literal_list: literal_list */ -#line 973 "bison_parser.y" +#line 974 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[0].expr_vec); } -#line 4235 "bison_parser.cpp" +#line 4244 "bison_parser.cpp" break; case 154: /* opt_literal_list: %empty */ -#line 974 "bison_parser.y" +#line 975 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 4241 "bison_parser.cpp" +#line 4250 "bison_parser.cpp" break; case 155: /* literal_list: literal */ -#line 978 "bison_parser.y" +#line 979 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4247 "bison_parser.cpp" +#line 4256 "bison_parser.cpp" break; case 156: /* literal_list: literal_list ',' literal */ -#line 979 "bison_parser.y" +#line 980 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4253 "bison_parser.cpp" +#line 4262 "bison_parser.cpp" break; case 157: /* expr_alias: expr opt_alias */ -#line 983 "bison_parser.y" +#line 984 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); if ((yyvsp[0].alias_t)) { @@ -4261,377 +4270,377 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].alias_t); } } -#line 4265 "bison_parser.cpp" +#line 4274 "bison_parser.cpp" break; case 163: /* operand: '(' expr ')' */ -#line 1001 "bison_parser.y" +#line 1002 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); } -#line 4271 "bison_parser.cpp" +#line 4280 "bison_parser.cpp" break; case 173: /* operand: '(' select_no_paren ')' */ -#line 1011 "bison_parser.y" +#line 1012 "bison_parser.y" { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 4277 "bison_parser.cpp" +#line 4286 "bison_parser.cpp" break; case 176: /* unary_expr: '-' operand */ -#line 1020 "bison_parser.y" +#line 1021 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 4283 "bison_parser.cpp" +#line 4292 "bison_parser.cpp" break; case 177: /* unary_expr: NOT operand */ -#line 1021 "bison_parser.y" +#line 1022 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 4289 "bison_parser.cpp" +#line 4298 "bison_parser.cpp" break; case 178: /* unary_expr: operand ISNULL */ -#line 1022 "bison_parser.y" +#line 1023 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 4295 "bison_parser.cpp" +#line 4304 "bison_parser.cpp" break; case 179: /* unary_expr: operand IS NULL */ -#line 1023 "bison_parser.y" +#line 1024 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 4301 "bison_parser.cpp" +#line 4310 "bison_parser.cpp" break; case 180: /* unary_expr: operand IS NOT NULL */ -#line 1024 "bison_parser.y" +#line 1025 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 4307 "bison_parser.cpp" +#line 4316 "bison_parser.cpp" break; case 182: /* binary_expr: operand '-' operand */ -#line 1029 "bison_parser.y" +#line 1030 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 4313 "bison_parser.cpp" +#line 4322 "bison_parser.cpp" break; case 183: /* binary_expr: operand '+' operand */ -#line 1030 "bison_parser.y" +#line 1031 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 4319 "bison_parser.cpp" +#line 4328 "bison_parser.cpp" break; case 184: /* binary_expr: operand '/' operand */ -#line 1031 "bison_parser.y" +#line 1032 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 4325 "bison_parser.cpp" +#line 4334 "bison_parser.cpp" break; case 185: /* binary_expr: operand '*' operand */ -#line 1032 "bison_parser.y" +#line 1033 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 4331 "bison_parser.cpp" +#line 4340 "bison_parser.cpp" break; case 186: /* binary_expr: operand '%' operand */ -#line 1033 "bison_parser.y" +#line 1034 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 4337 "bison_parser.cpp" +#line 4346 "bison_parser.cpp" break; case 187: /* binary_expr: operand '^' operand */ -#line 1034 "bison_parser.y" +#line 1035 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 4343 "bison_parser.cpp" +#line 4352 "bison_parser.cpp" break; case 188: /* binary_expr: operand LIKE operand */ -#line 1035 "bison_parser.y" +#line 1036 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 4349 "bison_parser.cpp" +#line 4358 "bison_parser.cpp" break; case 189: /* binary_expr: operand NOT LIKE operand */ -#line 1036 "bison_parser.y" +#line 1037 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 4355 "bison_parser.cpp" +#line 4364 "bison_parser.cpp" break; case 190: /* binary_expr: operand ILIKE operand */ -#line 1037 "bison_parser.y" +#line 1038 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 4361 "bison_parser.cpp" +#line 4370 "bison_parser.cpp" break; case 191: /* binary_expr: operand CONCAT operand */ -#line 1038 "bison_parser.y" +#line 1039 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 4367 "bison_parser.cpp" +#line 4376 "bison_parser.cpp" break; case 192: /* logic_expr: expr AND expr */ -#line 1042 "bison_parser.y" +#line 1043 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 4373 "bison_parser.cpp" +#line 4382 "bison_parser.cpp" break; case 193: /* logic_expr: expr OR expr */ -#line 1043 "bison_parser.y" +#line 1044 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 4379 "bison_parser.cpp" +#line 4388 "bison_parser.cpp" break; case 194: /* in_expr: operand IN '(' expr_list ')' */ -#line 1047 "bison_parser.y" +#line 1048 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 4385 "bison_parser.cpp" +#line 4394 "bison_parser.cpp" break; case 195: /* in_expr: operand NOT IN '(' expr_list ')' */ -#line 1048 "bison_parser.y" +#line 1049 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 4391 "bison_parser.cpp" +#line 4400 "bison_parser.cpp" break; case 196: /* in_expr: operand IN '(' select_no_paren ')' */ -#line 1049 "bison_parser.y" +#line 1050 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 4397 "bison_parser.cpp" +#line 4406 "bison_parser.cpp" break; case 197: /* in_expr: operand NOT IN '(' select_no_paren ')' */ -#line 1050 "bison_parser.y" +#line 1051 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 4403 "bison_parser.cpp" +#line 4412 "bison_parser.cpp" break; case 198: /* case_expr: CASE expr case_list END */ -#line 1056 "bison_parser.y" +#line 1057 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } -#line 4409 "bison_parser.cpp" +#line 4418 "bison_parser.cpp" break; case 199: /* case_expr: CASE expr case_list ELSE expr END */ -#line 1057 "bison_parser.y" +#line 1058 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4415 "bison_parser.cpp" +#line 4424 "bison_parser.cpp" break; case 200: /* case_expr: CASE case_list END */ -#line 1058 "bison_parser.y" +#line 1059 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } -#line 4421 "bison_parser.cpp" +#line 4430 "bison_parser.cpp" break; case 201: /* case_expr: CASE case_list ELSE expr END */ -#line 1059 "bison_parser.y" +#line 1060 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4427 "bison_parser.cpp" +#line 4436 "bison_parser.cpp" break; case 202: /* case_list: WHEN expr THEN expr */ -#line 1063 "bison_parser.y" +#line 1064 "bison_parser.y" { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4433 "bison_parser.cpp" +#line 4442 "bison_parser.cpp" break; case 203: /* case_list: case_list WHEN expr THEN expr */ -#line 1064 "bison_parser.y" +#line 1065 "bison_parser.y" { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4439 "bison_parser.cpp" +#line 4448 "bison_parser.cpp" break; case 204: /* exists_expr: EXISTS '(' select_no_paren ')' */ -#line 1068 "bison_parser.y" +#line 1069 "bison_parser.y" { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 4445 "bison_parser.cpp" +#line 4454 "bison_parser.cpp" break; case 205: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ -#line 1069 "bison_parser.y" +#line 1070 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 4451 "bison_parser.cpp" +#line 4460 "bison_parser.cpp" break; case 206: /* comp_expr: operand '=' operand */ -#line 1073 "bison_parser.y" +#line 1074 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4457 "bison_parser.cpp" +#line 4466 "bison_parser.cpp" break; case 207: /* comp_expr: operand EQUALS operand */ -#line 1074 "bison_parser.y" +#line 1075 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4463 "bison_parser.cpp" +#line 4472 "bison_parser.cpp" break; case 208: /* comp_expr: operand NOTEQUALS operand */ -#line 1075 "bison_parser.y" +#line 1076 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 4469 "bison_parser.cpp" +#line 4478 "bison_parser.cpp" break; case 209: /* comp_expr: operand '<' operand */ -#line 1076 "bison_parser.y" +#line 1077 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 4475 "bison_parser.cpp" +#line 4484 "bison_parser.cpp" break; case 210: /* comp_expr: operand '>' operand */ -#line 1077 "bison_parser.y" +#line 1078 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 4481 "bison_parser.cpp" +#line 4490 "bison_parser.cpp" break; case 211: /* comp_expr: operand LESSEQ operand */ -#line 1078 "bison_parser.y" +#line 1079 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 4487 "bison_parser.cpp" +#line 4496 "bison_parser.cpp" break; case 212: /* comp_expr: operand GREATEREQ operand */ -#line 1079 "bison_parser.y" +#line 1080 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 4493 "bison_parser.cpp" +#line 4502 "bison_parser.cpp" break; case 213: /* function_expr: IDENTIFIER '(' ')' */ -#line 1083 "bison_parser.y" +#line 1084 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 4499 "bison_parser.cpp" +#line 4508 "bison_parser.cpp" break; case 214: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ -#line 1084 "bison_parser.y" +#line 1085 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 4505 "bison_parser.cpp" +#line 4514 "bison_parser.cpp" break; case 215: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ -#line 1088 "bison_parser.y" +#line 1089 "bison_parser.y" { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } -#line 4511 "bison_parser.cpp" +#line 4520 "bison_parser.cpp" break; case 216: /* cast_expr: CAST '(' expr AS column_type ')' */ -#line 1092 "bison_parser.y" +#line 1093 "bison_parser.y" { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } -#line 4517 "bison_parser.cpp" +#line 4526 "bison_parser.cpp" break; case 217: /* datetime_field: SECOND */ -#line 1096 "bison_parser.y" +#line 1097 "bison_parser.y" { (yyval.datetime_field) = kDatetimeSecond; } -#line 4523 "bison_parser.cpp" +#line 4532 "bison_parser.cpp" break; case 218: /* datetime_field: MINUTE */ -#line 1097 "bison_parser.y" +#line 1098 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMinute; } -#line 4529 "bison_parser.cpp" +#line 4538 "bison_parser.cpp" break; case 219: /* datetime_field: HOUR */ -#line 1098 "bison_parser.y" +#line 1099 "bison_parser.y" { (yyval.datetime_field) = kDatetimeHour; } -#line 4535 "bison_parser.cpp" +#line 4544 "bison_parser.cpp" break; case 220: /* datetime_field: DAY */ -#line 1099 "bison_parser.y" +#line 1100 "bison_parser.y" { (yyval.datetime_field) = kDatetimeDay; } -#line 4541 "bison_parser.cpp" +#line 4550 "bison_parser.cpp" break; case 221: /* datetime_field: MONTH */ -#line 1100 "bison_parser.y" +#line 1101 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMonth; } -#line 4547 "bison_parser.cpp" +#line 4556 "bison_parser.cpp" break; case 222: /* datetime_field: YEAR */ -#line 1101 "bison_parser.y" +#line 1102 "bison_parser.y" { (yyval.datetime_field) = kDatetimeYear; } -#line 4553 "bison_parser.cpp" +#line 4562 "bison_parser.cpp" break; case 223: /* array_expr: ARRAY '[' expr_list ']' */ -#line 1105 "bison_parser.y" +#line 1106 "bison_parser.y" { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 4559 "bison_parser.cpp" +#line 4568 "bison_parser.cpp" break; case 224: /* array_index: operand '[' int_literal ']' */ -#line 1109 "bison_parser.y" +#line 1110 "bison_parser.y" { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 4565 "bison_parser.cpp" +#line 4574 "bison_parser.cpp" break; case 225: /* between_expr: operand BETWEEN operand AND operand */ -#line 1113 "bison_parser.y" +#line 1114 "bison_parser.y" { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4571 "bison_parser.cpp" +#line 4580 "bison_parser.cpp" break; case 226: /* column_name: IDENTIFIER */ -#line 1117 "bison_parser.y" +#line 1118 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 4577 "bison_parser.cpp" +#line 4586 "bison_parser.cpp" break; case 227: /* column_name: IDENTIFIER '.' IDENTIFIER */ -#line 1118 "bison_parser.y" +#line 1119 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 4583 "bison_parser.cpp" +#line 4592 "bison_parser.cpp" break; case 228: /* column_name: '*' */ -#line 1119 "bison_parser.y" +#line 1120 "bison_parser.y" { (yyval.expr) = Expr::makeStar(); } -#line 4589 "bison_parser.cpp" +#line 4598 "bison_parser.cpp" break; case 229: /* column_name: IDENTIFIER '.' '*' */ -#line 1120 "bison_parser.y" +#line 1121 "bison_parser.y" { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 4595 "bison_parser.cpp" +#line 4604 "bison_parser.cpp" break; case 236: /* string_literal: STRING */ -#line 1133 "bison_parser.y" +#line 1134 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 4601 "bison_parser.cpp" +#line 4610 "bison_parser.cpp" break; case 237: /* bool_literal: TRUE */ -#line 1137 "bison_parser.y" +#line 1138 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(true); } -#line 4607 "bison_parser.cpp" +#line 4616 "bison_parser.cpp" break; case 238: /* bool_literal: FALSE */ -#line 1138 "bison_parser.y" +#line 1139 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(false); } -#line 4613 "bison_parser.cpp" +#line 4622 "bison_parser.cpp" break; case 239: /* num_literal: FLOATVAL */ -#line 1142 "bison_parser.y" +#line 1143 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 4619 "bison_parser.cpp" +#line 4628 "bison_parser.cpp" break; case 241: /* int_literal: INTVAL */ -#line 1147 "bison_parser.y" +#line 1148 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 4625 "bison_parser.cpp" +#line 4634 "bison_parser.cpp" break; case 242: /* null_literal: NULL */ -#line 1151 "bison_parser.y" +#line 1152 "bison_parser.y" { (yyval.expr) = Expr::makeNullLiteral(); } -#line 4631 "bison_parser.cpp" +#line 4640 "bison_parser.cpp" break; case 243: /* date_literal: DATE STRING */ -#line 1155 "bison_parser.y" +#line 1156 "bison_parser.y" { int day{0}, month{0}, year{0}, chars_parsed{0}; // If the whole string is parsed, chars_parsed points to the terminating null byte after the last character @@ -4642,55 +4651,55 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expr) = Expr::makeDateLiteral((yyvsp[0].sval)); } -#line 4646 "bison_parser.cpp" +#line 4655 "bison_parser.cpp" break; case 244: /* param_expr: '?' */ -#line 1168 "bison_parser.y" +#line 1169 "bison_parser.y" { (yyval.expr) = Expr::makeParameter(yylloc.total_column); (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 4656 "bison_parser.cpp" +#line 4665 "bison_parser.cpp" break; case 246: /* table_ref: table_ref_commalist ',' table_ref_atomic */ -#line 1181 "bison_parser.y" +#line 1182 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); auto tbl = new TableRef(kTableCrossProduct); tbl->list = (yyvsp[-2].table_vec); (yyval.table) = tbl; } -#line 4667 "bison_parser.cpp" +#line 4676 "bison_parser.cpp" break; case 250: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ -#line 1197 "bison_parser.y" +#line 1198 "bison_parser.y" { auto tbl = new TableRef(kTableSelect); tbl->select = (yyvsp[-2].select_stmt); tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4678 "bison_parser.cpp" +#line 4687 "bison_parser.cpp" break; case 251: /* table_ref_commalist: table_ref_atomic */ -#line 1206 "bison_parser.y" +#line 1207 "bison_parser.y" { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 4684 "bison_parser.cpp" +#line 4693 "bison_parser.cpp" break; case 252: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ -#line 1207 "bison_parser.y" +#line 1208 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 4690 "bison_parser.cpp" +#line 4699 "bison_parser.cpp" break; case 253: /* table_ref_name: table_name opt_table_alias */ -#line 1212 "bison_parser.y" +#line 1213 "bison_parser.y" { auto tbl = new TableRef(kTableName); tbl->schema = (yyvsp[-1].table_name).schema; @@ -4698,121 +4707,121 @@ YYLTYPE yylloc = yyloc_default; tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4702 "bison_parser.cpp" +#line 4711 "bison_parser.cpp" break; case 254: /* table_ref_name_no_alias: table_name */ -#line 1223 "bison_parser.y" +#line 1224 "bison_parser.y" { (yyval.table) = new TableRef(kTableName); (yyval.table)->schema = (yyvsp[0].table_name).schema; (yyval.table)->name = (yyvsp[0].table_name).name; } -#line 4712 "bison_parser.cpp" +#line 4721 "bison_parser.cpp" break; case 255: /* table_name: IDENTIFIER */ -#line 1232 "bison_parser.y" +#line 1233 "bison_parser.y" { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} -#line 4718 "bison_parser.cpp" +#line 4727 "bison_parser.cpp" break; case 256: /* table_name: IDENTIFIER '.' IDENTIFIER */ -#line 1233 "bison_parser.y" +#line 1234 "bison_parser.y" { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } -#line 4724 "bison_parser.cpp" +#line 4733 "bison_parser.cpp" break; case 257: /* opt_index_name: IDENTIFIER */ -#line 1237 "bison_parser.y" +#line 1238 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4730 "bison_parser.cpp" +#line 4739 "bison_parser.cpp" break; case 258: /* opt_index_name: %empty */ -#line 1238 "bison_parser.y" +#line 1239 "bison_parser.y" { (yyval.sval) = nullptr;} -#line 4736 "bison_parser.cpp" +#line 4745 "bison_parser.cpp" break; case 259: /* index_name: IDENTIFIER */ -#line 1242 "bison_parser.y" +#line 1243 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4742 "bison_parser.cpp" +#line 4751 "bison_parser.cpp" break; case 261: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ -#line 1248 "bison_parser.y" +#line 1249 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } -#line 4748 "bison_parser.cpp" +#line 4757 "bison_parser.cpp" break; case 263: /* opt_table_alias: %empty */ -#line 1254 "bison_parser.y" +#line 1255 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4754 "bison_parser.cpp" +#line 4763 "bison_parser.cpp" break; case 264: /* alias: AS IDENTIFIER */ -#line 1259 "bison_parser.y" +#line 1260 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4760 "bison_parser.cpp" +#line 4769 "bison_parser.cpp" break; case 265: /* alias: IDENTIFIER */ -#line 1260 "bison_parser.y" +#line 1261 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4766 "bison_parser.cpp" +#line 4775 "bison_parser.cpp" break; case 267: /* opt_alias: %empty */ -#line 1266 "bison_parser.y" +#line 1267 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4772 "bison_parser.cpp" +#line 4781 "bison_parser.cpp" break; case 269: /* opt_with_clause: %empty */ -#line 1276 "bison_parser.y" +#line 1277 "bison_parser.y" { (yyval.with_description_vec) = nullptr; } -#line 4778 "bison_parser.cpp" +#line 4787 "bison_parser.cpp" break; case 270: /* with_clause: WITH with_description_list */ -#line 1280 "bison_parser.y" +#line 1281 "bison_parser.y" { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } -#line 4784 "bison_parser.cpp" +#line 4793 "bison_parser.cpp" break; case 271: /* with_description_list: with_description */ -#line 1284 "bison_parser.y" +#line 1285 "bison_parser.y" { (yyval.with_description_vec) = new std::vector(); (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); } -#line 4793 "bison_parser.cpp" +#line 4802 "bison_parser.cpp" break; case 272: /* with_description_list: with_description_list ',' with_description */ -#line 1288 "bison_parser.y" +#line 1289 "bison_parser.y" { (yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t)); (yyval.with_description_vec) = (yyvsp[-2].with_description_vec); } -#line 4802 "bison_parser.cpp" +#line 4811 "bison_parser.cpp" break; case 273: /* with_description: IDENTIFIER AS select_with_paren */ -#line 1295 "bison_parser.y" +#line 1296 "bison_parser.y" { (yyval.with_description_t) = new WithDescription(); (yyval.with_description_t)->alias = (yyvsp[-2].sval); (yyval.with_description_t)->select = (yyvsp[0].select_stmt); } -#line 4812 "bison_parser.cpp" +#line 4821 "bison_parser.cpp" break; case 274: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ -#line 1309 "bison_parser.y" +#line 1310 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4820,11 +4829,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 4824 "bison_parser.cpp" +#line 4833 "bison_parser.cpp" break; case 275: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ -#line 1317 "bison_parser.y" +#line 1318 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4833,11 +4842,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 4837 "bison_parser.cpp" +#line 4846 "bison_parser.cpp" break; case 276: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ -#line 1327 "bison_parser.y" +#line 1328 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4853,83 +4862,83 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } -#line 4857 "bison_parser.cpp" +#line 4866 "bison_parser.cpp" break; case 277: /* opt_join_type: INNER */ -#line 1345 "bison_parser.y" +#line 1346 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4863 "bison_parser.cpp" +#line 4872 "bison_parser.cpp" break; case 278: /* opt_join_type: LEFT OUTER */ -#line 1346 "bison_parser.y" +#line 1347 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4869 "bison_parser.cpp" +#line 4878 "bison_parser.cpp" break; case 279: /* opt_join_type: LEFT */ -#line 1347 "bison_parser.y" +#line 1348 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4875 "bison_parser.cpp" +#line 4884 "bison_parser.cpp" break; case 280: /* opt_join_type: RIGHT OUTER */ -#line 1348 "bison_parser.y" +#line 1349 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4881 "bison_parser.cpp" +#line 4890 "bison_parser.cpp" break; case 281: /* opt_join_type: RIGHT */ -#line 1349 "bison_parser.y" +#line 1350 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4887 "bison_parser.cpp" +#line 4896 "bison_parser.cpp" break; case 282: /* opt_join_type: FULL OUTER */ -#line 1350 "bison_parser.y" +#line 1351 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4893 "bison_parser.cpp" +#line 4902 "bison_parser.cpp" break; case 283: /* opt_join_type: OUTER */ -#line 1351 "bison_parser.y" +#line 1352 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4899 "bison_parser.cpp" +#line 4908 "bison_parser.cpp" break; case 284: /* opt_join_type: FULL */ -#line 1352 "bison_parser.y" +#line 1353 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4905 "bison_parser.cpp" +#line 4914 "bison_parser.cpp" break; case 285: /* opt_join_type: CROSS */ -#line 1353 "bison_parser.y" +#line 1354 "bison_parser.y" { (yyval.uval) = kJoinCross; } -#line 4911 "bison_parser.cpp" +#line 4920 "bison_parser.cpp" break; case 286: /* opt_join_type: %empty */ -#line 1354 "bison_parser.y" +#line 1355 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4917 "bison_parser.cpp" +#line 4926 "bison_parser.cpp" break; case 290: /* ident_commalist: IDENTIFIER */ -#line 1374 "bison_parser.y" +#line 1375 "bison_parser.y" { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 4923 "bison_parser.cpp" +#line 4932 "bison_parser.cpp" break; case 291: /* ident_commalist: ident_commalist ',' IDENTIFIER */ -#line 1375 "bison_parser.y" +#line 1376 "bison_parser.y" { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 4929 "bison_parser.cpp" +#line 4938 "bison_parser.cpp" break; -#line 4933 "bison_parser.cpp" +#line 4942 "bison_parser.cpp" default: break; } @@ -5159,7 +5168,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 1378 "bison_parser.y" +#line 1379 "bison_parser.y" /********************************* ** Section 4: Additional C code diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 51af28dd..f1e73e72 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -539,6 +539,7 @@ create_statement: $$->schema = $4.schema; $$->tableName = $4.name; $$->setColumnDefsAndConstraints($6); + delete $6; } | CREATE TABLE opt_not_exists table_name AS select_statement { $$ = new CreateStatement(kCreateTable); @@ -690,8 +691,8 @@ alter_action: drop_action {$$ = $1;} drop_action: - DROP COLUMN opt_exists column_name { - $$ = new DropColumnAction($4->name); + DROP COLUMN opt_exists IDENTIFIER { + $$ = new DropColumnAction($4); $$->ifExists = $3; } ; diff --git a/src/sql/CreateStatement.h b/src/sql/CreateStatement.h index 28755b0d..4c1be22d 100755 --- a/src/sql/CreateStatement.h +++ b/src/sql/CreateStatement.h @@ -31,6 +31,8 @@ namespace hsql { struct ColumnDefinition: TableElement { ColumnDefinition(char* name, ColumnType type, std::vector* column_constraints); + ~ColumnDefinition() override; + void setNullableExplicit() { nullable = false; @@ -82,7 +84,7 @@ namespace hsql { char* schema; // default: nullptr char* tableName; // default: nullptr char* indexName; // default: nullptr - std::vector* indexColumns; + std::vector* indexColumns; // default: nullptr std::vector* columns; // default: nullptr std::vector* tableConstraints; // default: nullptr std::vector* viewColumns; diff --git a/src/sql/statements.cpp b/src/sql/statements.cpp index afabc639..c274afe0 100755 --- a/src/sql/statements.cpp +++ b/src/sql/statements.cpp @@ -9,19 +9,23 @@ namespace hsql { columnNames(columnNames) {}; TableConstraint::~TableConstraint() { - //for (char* def : *columnNames) { - //delete def; - //} + for (char* def : *columnNames) { + delete def; + } delete columnNames; } // ColumnDefinition ColumnDefinition::ColumnDefinition(char* name, ColumnType type, std::vector* column_constraints) : - column_constraints(column_constraints), - name(name), - type(type), - nullable(false) - {}; + column_constraints(column_constraints), + name(name), + type(type), + nullable(false) {}; + + ColumnDefinition::~ColumnDefinition() { + delete name; + delete column_constraints; + } ColumnType::ColumnType(DataType data_type, int64_t length, ColumnSpecification column_specification) : data_type(data_type), @@ -106,6 +110,8 @@ namespace hsql { filePath(nullptr), schema(nullptr), tableName(nullptr), + indexName(nullptr), + indexColumns(nullptr), columns(nullptr), tableConstraints(nullptr), viewColumns(nullptr), @@ -115,6 +121,7 @@ namespace hsql { free(filePath); free(schema); free(tableName); + free(indexName); delete select; if (columns != nullptr) { @@ -131,9 +138,16 @@ namespace hsql { delete tableConstraints; } + if (indexColumns != nullptr) { + for (char* column : *indexColumns) { + delete column; + } + delete indexColumns; + } + if (viewColumns != nullptr) { for (char* column : *viewColumns) { - free(column); + delete column; } delete viewColumns; } @@ -157,11 +171,15 @@ namespace hsql { SQLStatement(kStmtDrop), type(type), schema(nullptr), - name(nullptr) {} + name(nullptr), + indexName(nullptr) {} DropStatement::~DropStatement() { free(schema); free(name); + if (indexName != nullptr) { + delete indexName; + } } // AlterStatement and supportive classes @@ -190,6 +208,7 @@ namespace hsql { AlterStatement::~AlterStatement() { free(schema); free(name); + delete action; } // TransactionStatement From c542723fb84807a4559232736e3825485cf4c78e Mon Sep 17 00:00:00 2001 From: Marcel Weisgut Date: Thu, 9 Sep 2021 16:58:43 +0200 Subject: [PATCH 59/73] resolve mismatch free / delete errors --- src/sql/statements.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/sql/statements.cpp b/src/sql/statements.cpp index c274afe0..8ecd4745 100755 --- a/src/sql/statements.cpp +++ b/src/sql/statements.cpp @@ -10,7 +10,7 @@ namespace hsql { TableConstraint::~TableConstraint() { for (char* def : *columnNames) { - delete def; + free(def); } delete columnNames; } @@ -23,7 +23,7 @@ namespace hsql { nullable(false) {}; ColumnDefinition::~ColumnDefinition() { - delete name; + free(name); delete column_constraints; } @@ -140,14 +140,14 @@ namespace hsql { if (indexColumns != nullptr) { for (char* column : *indexColumns) { - delete column; + free(column); } delete indexColumns; } if (viewColumns != nullptr) { for (char* column : *viewColumns) { - delete column; + free(column); } delete viewColumns; } @@ -177,9 +177,7 @@ namespace hsql { DropStatement::~DropStatement() { free(schema); free(name); - if (indexName != nullptr) { - delete indexName; - } + free(indexName); } // AlterStatement and supportive classes From 4301e1c04efea1d639e2b01cbcc3b6695742362a Mon Sep 17 00:00:00 2001 From: Marcel Weisgut Date: Thu, 9 Sep 2021 17:02:00 +0200 Subject: [PATCH 60/73] reset test.sh --- test/test.sh | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/test/test.sh b/test/test.sh index 6f64941a..bb1f34d4 100755 --- a/test/test.sh +++ b/test/test.sh @@ -32,29 +32,18 @@ fi printf "\n${GREEN}Running memory leak checks...${NC}\n" valgrind --leak-check=full --error-exitcode=200 --log-fd=3 \ bin/tests -f "test/queries/queries-good.sql" -f "test/queries/queries-bad.sql" \ - 3>&1>/dev/null; - + 3>&1 >/dev/null 2>/dev/null MEM_LEAK_RET=$? -RET=1 -if [ $MEM_LEAK_RET -eq 0 ]; then - printf "${GREEN}Memory leak check succeeded!${NC}\n" - MEM_LEAK_RET=0 - RET=0 -elif [ $MEM_LEAK_RET -eq 200 ]; then - printf "${RED}Memory leak check failed!${NC}\n" -elif [ $MEM_LEAK_RET -eq 127 ]; then - printf "${RED}Memory leak check failed: command 'valgrind' not found!${NC}\n" +if [ $MEM_LEAK_RET -ne 200 ]; then + printf "${GREEN}Memory leak check succeeded!${NC}\n" + MEM_LEAK_RET=0 else - printf "${RED}Memory leak check failes: error code ${MEM_LEAK_RET}!${NC}\n" + MEM_LEAK_RET=1 + RET=1 + printf "${RED}Memory leak check failed!${NC}\n" fi -#else -# MEM_LEAK_RET=1 -# RET=1 -# printf "${RED}Memory leak check could not be executed!${NC}\n" -#fi - ################################################# # Checking if the grammar is conflict free. printf "\n${GREEN}Checking for conflicts in the grammar...${NC}\n" From ab64b8d73233c58edd374c745938372fcff5b1dc Mon Sep 17 00:00:00 2001 From: mweisgut Date: Thu, 9 Sep 2021 18:28:01 +0200 Subject: [PATCH 61/73] delete parser/Makefile changes --- src/parser/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser/Makefile b/src/parser/Makefile index f2c5cf13..af0baed6 100644 --- a/src/parser/Makefile +++ b/src/parser/Makefile @@ -17,7 +17,7 @@ endif all: bison_parser.cpp flex_lexer.cpp bison_parser.cpp: bison_parser.y - $(BISON) bison_parser.y --output=bison_parser.cpp --defines=bison_parser.h --verbose -Wcounterexamples + $(BISON) bison_parser.y --output=bison_parser.cpp --defines=bison_parser.h --verbose flex_lexer.cpp: flex_lexer.l $(FLEX) flex_lexer.l From dfd31f2b3b1428a86d9e2908e663a31b7a7194d5 Mon Sep 17 00:00:00 2001 From: mweisgut Date: Thu, 23 Sep 2021 11:35:39 +0200 Subject: [PATCH 62/73] change enum naming --- src/parser/bison_parser.cpp | 893 ++++++++++++++++++------------------ src/parser/bison_parser.h | 4 +- src/parser/bison_parser.y | 12 +- src/sql/CreateStatement.h | 12 +- 4 files changed, 461 insertions(+), 460 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 307974a5..54f9f235 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -1,4 +1,4 @@ -/* A Bison parser, made by GNU Bison 3.7.6. */ +/* A Bison parser, made by GNU Bison 3.8.1. */ /* Bison implementation for Yacc-like parsers in C @@ -46,10 +46,10 @@ USER NAME SPACE" below. */ /* Identify Bison output, and Bison version. */ -#define YYBISON 30706 +#define YYBISON 30801 /* Bison version string. */ -#define YYBISON_VERSION "3.7.6" +#define YYBISON_VERSION "3.8.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -579,12 +579,18 @@ typedef int yy_state_fast_t; # define YY_USE(E) /* empty */ #endif -#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ +#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ +# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") +# else +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# endif # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else @@ -817,7 +823,7 @@ static const yytype_uint8 yytranslate[] = }; #if HSQL_DEBUG - /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ +/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { 0, 289, 289, 310, 316, 325, 329, 333, 336, 339, @@ -929,32 +935,6 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#ifdef YYPRINT -/* YYTOKNUM[NUM] -- (External) token number corresponding to the - (internal) symbol number NUM (which must be that of a token). */ -static const yytype_int16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, - 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, - 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, - 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, - 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, - 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, - 395, 396, 397, 398, 399, 400, 401, 402, 61, 403, - 404, 60, 62, 405, 406, 407, 408, 409, 43, 45, - 42, 47, 37, 94, 410, 91, 93, 40, 41, 46, - 59, 44, 63 -}; -#endif - #define YYPACT_NINF (-437) #define yypact_value_is_default(Yyn) \ @@ -965,8 +945,8 @@ static const yytype_int16 yytoknum[] = #define yytable_value_is_error(Yyn) \ ((Yyn) == YYTABLE_NINF) - /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ static const yytype_int16 yypact[] = { 533, 40, 67, 91, 93, 67, 33, -19, 5, 9, @@ -1025,9 +1005,9 @@ static const yytype_int16 yypact[] = 102, -437, -437, 102, 399, 408, -437 }; - /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE does not specify something else to do. Zero - means the default is an error. */ +/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ static const yytype_int16 yydefact[] = { 269, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1086,7 +1066,7 @@ static const yytype_int16 yydefact[] = 287, 275, 261, 133, 226, 0, 276 }; - /* YYPGOTO[NTERM-NUM]. */ +/* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { -437, -437, -437, 503, -437, 546, -437, 273, -437, 154, @@ -1103,7 +1083,7 @@ static const yytype_int16 yypgoto[] = -437, -437, 490, -437, -437, -437, -437, -309 }; - /* YYDEFGOTO[NTERM-NUM]. */ +/* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { 0, 19, 20, 21, 22, 71, 229, 230, 23, 64, @@ -1120,9 +1100,9 @@ static const yytype_int16 yydefgoto[] = 38, 61, 62, 407, 462, 531, 69, 216 }; - /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule whose - number is the opposite. If YYTABLE_NINF, syntax error. */ +/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { 196, 106, 95, 96, 97, 41, 126, 365, 44, 152, @@ -1303,8 +1283,8 @@ static const yytype_int16 yycheck[] = -1, -1, -1, -1, -1, -1, -1, 118 }; - /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ +/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of + state STATE-NUM. */ static const yytype_int16 yystos[] = { 0, 7, 15, 22, 26, 36, 39, 40, 51, 52, @@ -1363,7 +1343,7 @@ static const yytype_int16 yystos[] = 242, 288, 168, 242, 3, 260, 168 }; - /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_int16 yyr1[] = { 0, 173, 174, 175, 175, 176, 176, 176, 176, 176, @@ -1398,7 +1378,7 @@ static const yytype_int16 yyr1[] = 290, 290 }; - /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ static const yytype_int8 yyr2[] = { 0, 2, 2, 1, 3, 2, 2, 1, 1, 1, @@ -1442,6 +1422,7 @@ enum { YYENOMEM = -2 }; #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab +#define YYNOMEM goto yyexhaustedlab #define YYRECOVERING() (!!yyerrstatus) @@ -1509,12 +1490,19 @@ do { \ } while (0) -/* YY_LOCATION_PRINT -- Print the location on the stream. +/* YYLOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ -# ifndef YY_LOCATION_PRINT -# if defined HSQL_LTYPE_IS_TRIVIAL && HSQL_LTYPE_IS_TRIVIAL +# ifndef YYLOCATION_PRINT + +# if defined YY_LOCATION_PRINT + + /* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +# define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc)) + +# elif defined HSQL_LTYPE_IS_TRIVIAL && HSQL_LTYPE_IS_TRIVIAL /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ @@ -1542,15 +1530,23 @@ yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) res += YYFPRINTF (yyo, "-%d", end_col); } return res; - } +} + +# define YYLOCATION_PRINT yy_location_print_ -# define YY_LOCATION_PRINT(File, Loc) \ - yy_location_print_ (File, &(Loc)) + /* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +# define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc)) # else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) + +# define YYLOCATION_PRINT(File, Loc) ((void) 0) + /* Temporary convenience wrapper in case some people defined the + undocumented and private YY_LOCATION_PRINT macros. */ +# define YY_LOCATION_PRINT YYLOCATION_PRINT + # endif -# endif /* !defined YY_LOCATION_PRINT */ +# endif /* !defined YYLOCATION_PRINT */ # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ @@ -1580,10 +1576,6 @@ yy_symbol_value_print (FILE *yyo, YY_USE (scanner); if (!yyvaluep) return; -# ifdef YYPRINT - if (yykind < YYNTOKENS) - YYPRINT (yyo, yytoknum[yykind], *yyvaluep); -# endif YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END @@ -1601,7 +1593,7 @@ yy_symbol_print (FILE *yyo, YYFPRINTF (yyo, "%s %s (", yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); - YY_LOCATION_PRINT (yyo, *yylocationp); + YYLOCATION_PRINT (yyo, yylocationp); YYFPRINTF (yyo, ": "); yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, result, scanner); YYFPRINTF (yyo, ")"); @@ -1984,25 +1976,25 @@ yydestruct (const char *yymsg, case YYSYMBOL_IDENTIFIER: /* IDENTIFIER */ #line 157 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1988 "bison_parser.cpp" +#line 1980 "bison_parser.cpp" break; case YYSYMBOL_STRING: /* STRING */ #line 157 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 1994 "bison_parser.cpp" +#line 1986 "bison_parser.cpp" break; case YYSYMBOL_FLOATVAL: /* FLOATVAL */ #line 155 "bison_parser.y" { } -#line 2000 "bison_parser.cpp" +#line 1992 "bison_parser.cpp" break; case YYSYMBOL_INTVAL: /* INTVAL */ #line 155 "bison_parser.y" { } -#line 2006 "bison_parser.cpp" +#line 1998 "bison_parser.cpp" break; case YYSYMBOL_statement_list: /* statement_list */ @@ -2015,19 +2007,19 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).stmt_vec)); } -#line 2019 "bison_parser.cpp" +#line 2011 "bison_parser.cpp" break; case YYSYMBOL_statement: /* statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 2025 "bison_parser.cpp" +#line 2017 "bison_parser.cpp" break; case YYSYMBOL_preparable_statement: /* preparable_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 2031 "bison_parser.cpp" +#line 2023 "bison_parser.cpp" break; case YYSYMBOL_opt_hints: /* opt_hints */ @@ -2040,7 +2032,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2044 "bison_parser.cpp" +#line 2036 "bison_parser.cpp" break; case YYSYMBOL_hint_list: /* hint_list */ @@ -2053,85 +2045,85 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2057 "bison_parser.cpp" +#line 2049 "bison_parser.cpp" break; case YYSYMBOL_hint: /* hint */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2063 "bison_parser.cpp" +#line 2055 "bison_parser.cpp" break; case YYSYMBOL_transaction_statement: /* transaction_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).transaction_stmt)); } -#line 2069 "bison_parser.cpp" +#line 2061 "bison_parser.cpp" break; case YYSYMBOL_prepare_statement: /* prepare_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).prep_stmt)); } -#line 2075 "bison_parser.cpp" +#line 2067 "bison_parser.cpp" break; case YYSYMBOL_prepare_target_query: /* prepare_target_query */ #line 157 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2081 "bison_parser.cpp" +#line 2073 "bison_parser.cpp" break; case YYSYMBOL_execute_statement: /* execute_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).exec_stmt)); } -#line 2087 "bison_parser.cpp" +#line 2079 "bison_parser.cpp" break; case YYSYMBOL_import_statement: /* import_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).import_stmt)); } -#line 2093 "bison_parser.cpp" +#line 2085 "bison_parser.cpp" break; case YYSYMBOL_file_type: /* file_type */ #line 155 "bison_parser.y" { } -#line 2099 "bison_parser.cpp" +#line 2091 "bison_parser.cpp" break; case YYSYMBOL_file_path: /* file_path */ #line 157 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2105 "bison_parser.cpp" +#line 2097 "bison_parser.cpp" break; case YYSYMBOL_opt_file_type: /* opt_file_type */ #line 155 "bison_parser.y" { } -#line 2111 "bison_parser.cpp" +#line 2103 "bison_parser.cpp" break; case YYSYMBOL_export_statement: /* export_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).export_stmt)); } -#line 2117 "bison_parser.cpp" +#line 2109 "bison_parser.cpp" break; case YYSYMBOL_show_statement: /* show_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).show_stmt)); } -#line 2123 "bison_parser.cpp" +#line 2115 "bison_parser.cpp" break; case YYSYMBOL_create_statement: /* create_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).create_stmt)); } -#line 2129 "bison_parser.cpp" +#line 2121 "bison_parser.cpp" break; case YYSYMBOL_opt_not_exists: /* opt_not_exists */ #line 155 "bison_parser.y" { } -#line 2135 "bison_parser.cpp" +#line 2127 "bison_parser.cpp" break; case YYSYMBOL_table_elem_commalist: /* table_elem_commalist */ @@ -2144,109 +2136,109 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).table_element_vec)); } -#line 2148 "bison_parser.cpp" +#line 2140 "bison_parser.cpp" break; case YYSYMBOL_table_elem: /* table_elem */ #line 166 "bison_parser.y" { delete (((*yyvaluep).table_element_t)); } -#line 2154 "bison_parser.cpp" +#line 2146 "bison_parser.cpp" break; case YYSYMBOL_column_def: /* column_def */ #line 166 "bison_parser.y" { delete (((*yyvaluep).column_t)); } -#line 2160 "bison_parser.cpp" +#line 2152 "bison_parser.cpp" break; case YYSYMBOL_column_type: /* column_type */ #line 155 "bison_parser.y" { } -#line 2166 "bison_parser.cpp" +#line 2158 "bison_parser.cpp" break; case YYSYMBOL_opt_time_specification: /* opt_time_specification */ #line 155 "bison_parser.y" { } -#line 2172 "bison_parser.cpp" +#line 2164 "bison_parser.cpp" break; case YYSYMBOL_opt_decimal_specification: /* opt_decimal_specification */ #line 155 "bison_parser.y" { } -#line 2178 "bison_parser.cpp" +#line 2170 "bison_parser.cpp" break; case YYSYMBOL_opt_column_constraints: /* opt_column_constraints */ #line 155 "bison_parser.y" { } -#line 2184 "bison_parser.cpp" +#line 2176 "bison_parser.cpp" break; case YYSYMBOL_column_constraint_list: /* column_constraint_list */ #line 155 "bison_parser.y" { } -#line 2190 "bison_parser.cpp" +#line 2182 "bison_parser.cpp" break; case YYSYMBOL_column_constraint: /* column_constraint */ #line 155 "bison_parser.y" { } -#line 2196 "bison_parser.cpp" +#line 2188 "bison_parser.cpp" break; case YYSYMBOL_table_constraint: /* table_constraint */ #line 166 "bison_parser.y" { delete (((*yyvaluep).table_constraint_t)); } -#line 2202 "bison_parser.cpp" +#line 2194 "bison_parser.cpp" break; case YYSYMBOL_drop_statement: /* drop_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).drop_stmt)); } -#line 2208 "bison_parser.cpp" +#line 2200 "bison_parser.cpp" break; case YYSYMBOL_opt_exists: /* opt_exists */ #line 155 "bison_parser.y" { } -#line 2214 "bison_parser.cpp" +#line 2206 "bison_parser.cpp" break; case YYSYMBOL_alter_statement: /* alter_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).alter_stmt)); } -#line 2220 "bison_parser.cpp" +#line 2212 "bison_parser.cpp" break; case YYSYMBOL_alter_action: /* alter_action */ #line 166 "bison_parser.y" { delete (((*yyvaluep).alter_action_t)); } -#line 2226 "bison_parser.cpp" +#line 2218 "bison_parser.cpp" break; case YYSYMBOL_drop_action: /* drop_action */ #line 166 "bison_parser.y" { delete (((*yyvaluep).drop_action_t)); } -#line 2232 "bison_parser.cpp" +#line 2224 "bison_parser.cpp" break; case YYSYMBOL_delete_statement: /* delete_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2238 "bison_parser.cpp" +#line 2230 "bison_parser.cpp" break; case YYSYMBOL_truncate_statement: /* truncate_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2244 "bison_parser.cpp" +#line 2236 "bison_parser.cpp" break; case YYSYMBOL_insert_statement: /* insert_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).insert_stmt)); } -#line 2250 "bison_parser.cpp" +#line 2242 "bison_parser.cpp" break; case YYSYMBOL_opt_column_list: /* opt_column_list */ @@ -2259,13 +2251,13 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2263 "bison_parser.cpp" +#line 2255 "bison_parser.cpp" break; case YYSYMBOL_update_statement: /* update_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).update_stmt)); } -#line 2269 "bison_parser.cpp" +#line 2261 "bison_parser.cpp" break; case YYSYMBOL_update_clause_commalist: /* update_clause_commalist */ @@ -2278,73 +2270,73 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).update_vec)); } -#line 2282 "bison_parser.cpp" +#line 2274 "bison_parser.cpp" break; case YYSYMBOL_update_clause: /* update_clause */ #line 166 "bison_parser.y" { delete (((*yyvaluep).update_t)); } -#line 2288 "bison_parser.cpp" +#line 2280 "bison_parser.cpp" break; case YYSYMBOL_select_statement: /* select_statement */ #line 166 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2294 "bison_parser.cpp" +#line 2286 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation: /* select_within_set_operation */ #line 166 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2300 "bison_parser.cpp" +#line 2292 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation_no_parentheses: /* select_within_set_operation_no_parentheses */ #line 166 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2306 "bison_parser.cpp" +#line 2298 "bison_parser.cpp" break; case YYSYMBOL_select_with_paren: /* select_with_paren */ #line 166 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2312 "bison_parser.cpp" +#line 2304 "bison_parser.cpp" break; case YYSYMBOL_select_no_paren: /* select_no_paren */ #line 166 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2318 "bison_parser.cpp" +#line 2310 "bison_parser.cpp" break; case YYSYMBOL_set_operator: /* set_operator */ #line 166 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2324 "bison_parser.cpp" +#line 2316 "bison_parser.cpp" break; case YYSYMBOL_set_type: /* set_type */ #line 166 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2330 "bison_parser.cpp" +#line 2322 "bison_parser.cpp" break; case YYSYMBOL_opt_all: /* opt_all */ #line 155 "bison_parser.y" { } -#line 2336 "bison_parser.cpp" +#line 2328 "bison_parser.cpp" break; case YYSYMBOL_select_clause: /* select_clause */ #line 166 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2342 "bison_parser.cpp" +#line 2334 "bison_parser.cpp" break; case YYSYMBOL_opt_distinct: /* opt_distinct */ #line 155 "bison_parser.y" { } -#line 2348 "bison_parser.cpp" +#line 2340 "bison_parser.cpp" break; case YYSYMBOL_select_list: /* select_list */ @@ -2357,37 +2349,37 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2361 "bison_parser.cpp" +#line 2353 "bison_parser.cpp" break; case YYSYMBOL_opt_from_clause: /* opt_from_clause */ #line 166 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2367 "bison_parser.cpp" +#line 2359 "bison_parser.cpp" break; case YYSYMBOL_from_clause: /* from_clause */ #line 166 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2373 "bison_parser.cpp" +#line 2365 "bison_parser.cpp" break; case YYSYMBOL_opt_where: /* opt_where */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2379 "bison_parser.cpp" +#line 2371 "bison_parser.cpp" break; case YYSYMBOL_opt_group: /* opt_group */ #line 166 "bison_parser.y" { delete (((*yyvaluep).group_t)); } -#line 2385 "bison_parser.cpp" +#line 2377 "bison_parser.cpp" break; case YYSYMBOL_opt_having: /* opt_having */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2391 "bison_parser.cpp" +#line 2383 "bison_parser.cpp" break; case YYSYMBOL_opt_order: /* opt_order */ @@ -2400,7 +2392,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2404 "bison_parser.cpp" +#line 2396 "bison_parser.cpp" break; case YYSYMBOL_order_list: /* order_list */ @@ -2413,31 +2405,31 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2417 "bison_parser.cpp" +#line 2409 "bison_parser.cpp" break; case YYSYMBOL_order_desc: /* order_desc */ #line 166 "bison_parser.y" { delete (((*yyvaluep).order)); } -#line 2423 "bison_parser.cpp" +#line 2415 "bison_parser.cpp" break; case YYSYMBOL_opt_order_type: /* opt_order_type */ #line 155 "bison_parser.y" { } -#line 2429 "bison_parser.cpp" +#line 2421 "bison_parser.cpp" break; case YYSYMBOL_opt_top: /* opt_top */ #line 166 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2435 "bison_parser.cpp" +#line 2427 "bison_parser.cpp" break; case YYSYMBOL_opt_limit: /* opt_limit */ #line 166 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2441 "bison_parser.cpp" +#line 2433 "bison_parser.cpp" break; case YYSYMBOL_expr_list: /* expr_list */ @@ -2450,7 +2442,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2454 "bison_parser.cpp" +#line 2446 "bison_parser.cpp" break; case YYSYMBOL_opt_literal_list: /* opt_literal_list */ @@ -2463,7 +2455,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2467 "bison_parser.cpp" +#line 2459 "bison_parser.cpp" break; case YYSYMBOL_literal_list: /* literal_list */ @@ -2476,193 +2468,193 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2480 "bison_parser.cpp" +#line 2472 "bison_parser.cpp" break; case YYSYMBOL_expr_alias: /* expr_alias */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2486 "bison_parser.cpp" +#line 2478 "bison_parser.cpp" break; case YYSYMBOL_expr: /* expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2492 "bison_parser.cpp" +#line 2484 "bison_parser.cpp" break; case YYSYMBOL_operand: /* operand */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2498 "bison_parser.cpp" +#line 2490 "bison_parser.cpp" break; case YYSYMBOL_scalar_expr: /* scalar_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2504 "bison_parser.cpp" +#line 2496 "bison_parser.cpp" break; case YYSYMBOL_unary_expr: /* unary_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2510 "bison_parser.cpp" +#line 2502 "bison_parser.cpp" break; case YYSYMBOL_binary_expr: /* binary_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2516 "bison_parser.cpp" +#line 2508 "bison_parser.cpp" break; case YYSYMBOL_logic_expr: /* logic_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2522 "bison_parser.cpp" +#line 2514 "bison_parser.cpp" break; case YYSYMBOL_in_expr: /* in_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2528 "bison_parser.cpp" +#line 2520 "bison_parser.cpp" break; case YYSYMBOL_case_expr: /* case_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2534 "bison_parser.cpp" +#line 2526 "bison_parser.cpp" break; case YYSYMBOL_case_list: /* case_list */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2540 "bison_parser.cpp" +#line 2532 "bison_parser.cpp" break; case YYSYMBOL_exists_expr: /* exists_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2546 "bison_parser.cpp" +#line 2538 "bison_parser.cpp" break; case YYSYMBOL_comp_expr: /* comp_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2552 "bison_parser.cpp" +#line 2544 "bison_parser.cpp" break; case YYSYMBOL_function_expr: /* function_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2558 "bison_parser.cpp" +#line 2550 "bison_parser.cpp" break; case YYSYMBOL_extract_expr: /* extract_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2564 "bison_parser.cpp" +#line 2556 "bison_parser.cpp" break; case YYSYMBOL_cast_expr: /* cast_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2570 "bison_parser.cpp" +#line 2562 "bison_parser.cpp" break; case YYSYMBOL_datetime_field: /* datetime_field */ #line 155 "bison_parser.y" { } -#line 2576 "bison_parser.cpp" +#line 2568 "bison_parser.cpp" break; case YYSYMBOL_array_expr: /* array_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2582 "bison_parser.cpp" +#line 2574 "bison_parser.cpp" break; case YYSYMBOL_array_index: /* array_index */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2588 "bison_parser.cpp" +#line 2580 "bison_parser.cpp" break; case YYSYMBOL_between_expr: /* between_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2594 "bison_parser.cpp" +#line 2586 "bison_parser.cpp" break; case YYSYMBOL_column_name: /* column_name */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2600 "bison_parser.cpp" +#line 2592 "bison_parser.cpp" break; case YYSYMBOL_literal: /* literal */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2606 "bison_parser.cpp" +#line 2598 "bison_parser.cpp" break; case YYSYMBOL_string_literal: /* string_literal */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2612 "bison_parser.cpp" +#line 2604 "bison_parser.cpp" break; case YYSYMBOL_bool_literal: /* bool_literal */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2618 "bison_parser.cpp" +#line 2610 "bison_parser.cpp" break; case YYSYMBOL_num_literal: /* num_literal */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2624 "bison_parser.cpp" +#line 2616 "bison_parser.cpp" break; case YYSYMBOL_int_literal: /* int_literal */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2630 "bison_parser.cpp" +#line 2622 "bison_parser.cpp" break; case YYSYMBOL_null_literal: /* null_literal */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2636 "bison_parser.cpp" +#line 2628 "bison_parser.cpp" break; case YYSYMBOL_date_literal: /* date_literal */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2642 "bison_parser.cpp" +#line 2634 "bison_parser.cpp" break; case YYSYMBOL_param_expr: /* param_expr */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2648 "bison_parser.cpp" +#line 2640 "bison_parser.cpp" break; case YYSYMBOL_table_ref: /* table_ref */ #line 166 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2654 "bison_parser.cpp" +#line 2646 "bison_parser.cpp" break; case YYSYMBOL_table_ref_atomic: /* table_ref_atomic */ #line 166 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2660 "bison_parser.cpp" +#line 2652 "bison_parser.cpp" break; case YYSYMBOL_nonjoin_table_ref_atomic: /* nonjoin_table_ref_atomic */ #line 166 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2666 "bison_parser.cpp" +#line 2658 "bison_parser.cpp" break; case YYSYMBOL_table_ref_commalist: /* table_ref_commalist */ @@ -2675,103 +2667,103 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).table_vec)); } -#line 2679 "bison_parser.cpp" +#line 2671 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name: /* table_ref_name */ #line 166 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2685 "bison_parser.cpp" +#line 2677 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name_no_alias: /* table_ref_name_no_alias */ #line 166 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2691 "bison_parser.cpp" +#line 2683 "bison_parser.cpp" break; case YYSYMBOL_table_name: /* table_name */ #line 156 "bison_parser.y" { free( (((*yyvaluep).table_name).name) ); free( (((*yyvaluep).table_name).schema) ); } -#line 2697 "bison_parser.cpp" +#line 2689 "bison_parser.cpp" break; case YYSYMBOL_opt_index_name: /* opt_index_name */ #line 157 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2703 "bison_parser.cpp" +#line 2695 "bison_parser.cpp" break; case YYSYMBOL_index_name: /* index_name */ #line 157 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2709 "bison_parser.cpp" +#line 2701 "bison_parser.cpp" break; case YYSYMBOL_table_alias: /* table_alias */ #line 166 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2715 "bison_parser.cpp" +#line 2707 "bison_parser.cpp" break; case YYSYMBOL_opt_table_alias: /* opt_table_alias */ #line 166 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2721 "bison_parser.cpp" +#line 2713 "bison_parser.cpp" break; case YYSYMBOL_alias: /* alias */ #line 166 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2727 "bison_parser.cpp" +#line 2719 "bison_parser.cpp" break; case YYSYMBOL_opt_alias: /* opt_alias */ #line 166 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2733 "bison_parser.cpp" +#line 2725 "bison_parser.cpp" break; case YYSYMBOL_opt_with_clause: /* opt_with_clause */ #line 166 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2739 "bison_parser.cpp" +#line 2731 "bison_parser.cpp" break; case YYSYMBOL_with_clause: /* with_clause */ #line 166 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2745 "bison_parser.cpp" +#line 2737 "bison_parser.cpp" break; case YYSYMBOL_with_description_list: /* with_description_list */ #line 166 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2751 "bison_parser.cpp" +#line 2743 "bison_parser.cpp" break; case YYSYMBOL_with_description: /* with_description */ #line 166 "bison_parser.y" { delete (((*yyvaluep).with_description_t)); } -#line 2757 "bison_parser.cpp" +#line 2749 "bison_parser.cpp" break; case YYSYMBOL_join_clause: /* join_clause */ #line 166 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2763 "bison_parser.cpp" +#line 2755 "bison_parser.cpp" break; case YYSYMBOL_opt_join_type: /* opt_join_type */ #line 155 "bison_parser.y" { } -#line 2769 "bison_parser.cpp" +#line 2761 "bison_parser.cpp" break; case YYSYMBOL_join_condition: /* join_condition */ #line 166 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2775 "bison_parser.cpp" +#line 2767 "bison_parser.cpp" break; case YYSYMBOL_ident_commalist: /* ident_commalist */ @@ -2784,7 +2776,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2788 "bison_parser.cpp" +#line 2780 "bison_parser.cpp" break; default: @@ -2879,6 +2871,7 @@ YYLTYPE yylloc = yyloc_default; yychar = SQL_HSQL_EMPTY; /* Cause a token to be read. */ + /* User initialization code. */ #line 73 "bison_parser.y" { @@ -2891,7 +2884,7 @@ YYLTYPE yylloc = yyloc_default; yylloc.string_length = 0; } -#line 2895 "bison_parser.cpp" +#line 2888 "bison_parser.cpp" yylsp[0] = yylloc; goto yysetstate; @@ -2919,7 +2912,7 @@ YYLTYPE yylloc = yyloc_default; if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE - goto yyexhaustedlab; + YYNOMEM; #else { /* Get the current used size of the three stacks, in elements. */ @@ -2950,7 +2943,7 @@ YYLTYPE yylloc = yyloc_default; # else /* defined YYSTACK_RELOCATE */ /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + YYNOMEM; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; @@ -2961,7 +2954,7 @@ YYLTYPE yylloc = yyloc_default; YY_CAST (union yyalloc *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); if (! yyptr) - goto yyexhaustedlab; + YYNOMEM; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); YYSTACK_RELOCATE (yyls_alloc, yyls); @@ -2985,6 +2978,7 @@ YYLTYPE yylloc = yyloc_default; } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ + if (yystate == YYFINAL) YYACCEPT; @@ -3119,7 +3113,7 @@ YYLTYPE yylloc = yyloc_default; } delete (yyvsp[-1].stmt_vec); } -#line 3123 "bison_parser.cpp" +#line 3117 "bison_parser.cpp" break; case 3: /* statement_list: statement */ @@ -3130,7 +3124,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.stmt_vec) = new std::vector(); (yyval.stmt_vec)->push_back((yyvsp[0].statement)); } -#line 3134 "bison_parser.cpp" +#line 3128 "bison_parser.cpp" break; case 4: /* statement_list: statement_list ';' statement */ @@ -3141,7 +3135,7 @@ YYLTYPE yylloc = yyloc_default; (yyvsp[-2].stmt_vec)->push_back((yyvsp[0].statement)); (yyval.stmt_vec) = (yyvsp[-2].stmt_vec); } -#line 3145 "bison_parser.cpp" +#line 3139 "bison_parser.cpp" break; case 5: /* statement: prepare_statement opt_hints */ @@ -3150,7 +3144,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3154 "bison_parser.cpp" +#line 3148 "bison_parser.cpp" break; case 6: /* statement: preparable_statement opt_hints */ @@ -3159,7 +3153,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.statement) = (yyvsp[-1].statement); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3163 "bison_parser.cpp" +#line 3157 "bison_parser.cpp" break; case 7: /* statement: show_statement */ @@ -3167,7 +3161,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.statement) = (yyvsp[0].show_stmt); } -#line 3171 "bison_parser.cpp" +#line 3165 "bison_parser.cpp" break; case 8: /* statement: import_statement */ @@ -3175,7 +3169,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.statement) = (yyvsp[0].import_stmt); } -#line 3179 "bison_parser.cpp" +#line 3173 "bison_parser.cpp" break; case 9: /* statement: export_statement */ @@ -3183,91 +3177,91 @@ YYLTYPE yylloc = yyloc_default; { (yyval.statement) = (yyvsp[0].export_stmt); } -#line 3187 "bison_parser.cpp" +#line 3181 "bison_parser.cpp" break; case 10: /* preparable_statement: select_statement */ #line 346 "bison_parser.y" { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 3193 "bison_parser.cpp" +#line 3187 "bison_parser.cpp" break; case 11: /* preparable_statement: create_statement */ #line 347 "bison_parser.y" { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 3199 "bison_parser.cpp" +#line 3193 "bison_parser.cpp" break; case 12: /* preparable_statement: insert_statement */ #line 348 "bison_parser.y" { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 3205 "bison_parser.cpp" +#line 3199 "bison_parser.cpp" break; case 13: /* preparable_statement: delete_statement */ #line 349 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3211 "bison_parser.cpp" +#line 3205 "bison_parser.cpp" break; case 14: /* preparable_statement: truncate_statement */ #line 350 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3217 "bison_parser.cpp" +#line 3211 "bison_parser.cpp" break; case 15: /* preparable_statement: update_statement */ #line 351 "bison_parser.y" { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 3223 "bison_parser.cpp" +#line 3217 "bison_parser.cpp" break; case 16: /* preparable_statement: drop_statement */ #line 352 "bison_parser.y" { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 3229 "bison_parser.cpp" +#line 3223 "bison_parser.cpp" break; case 17: /* preparable_statement: alter_statement */ #line 353 "bison_parser.y" { (yyval.statement) = (yyvsp[0].alter_stmt); } -#line 3235 "bison_parser.cpp" +#line 3229 "bison_parser.cpp" break; case 18: /* preparable_statement: execute_statement */ #line 354 "bison_parser.y" { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 3241 "bison_parser.cpp" +#line 3235 "bison_parser.cpp" break; case 19: /* preparable_statement: transaction_statement */ #line 355 "bison_parser.y" { (yyval.statement) = (yyvsp[0].transaction_stmt); } -#line 3247 "bison_parser.cpp" +#line 3241 "bison_parser.cpp" break; case 20: /* opt_hints: WITH HINT '(' hint_list ')' */ #line 364 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 3253 "bison_parser.cpp" +#line 3247 "bison_parser.cpp" break; case 21: /* opt_hints: %empty */ #line 365 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 3259 "bison_parser.cpp" +#line 3253 "bison_parser.cpp" break; case 22: /* hint_list: hint */ #line 370 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3265 "bison_parser.cpp" +#line 3259 "bison_parser.cpp" break; case 23: /* hint_list: hint_list ',' hint */ #line 371 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3271 "bison_parser.cpp" +#line 3265 "bison_parser.cpp" break; case 24: /* hint: IDENTIFIER */ @@ -3276,7 +3270,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[0].sval); } -#line 3280 "bison_parser.cpp" +#line 3274 "bison_parser.cpp" break; case 25: /* hint: IDENTIFIER '(' literal_list ')' */ @@ -3286,7 +3280,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expr)->name = (yyvsp[-3].sval); (yyval.expr)->exprList = (yyvsp[-1].expr_vec); } -#line 3290 "bison_parser.cpp" +#line 3284 "bison_parser.cpp" break; case 26: /* transaction_statement: BEGIN opt_transaction_keyword */ @@ -3294,7 +3288,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.transaction_stmt) = new TransactionStatement(kBeginTransaction); } -#line 3298 "bison_parser.cpp" +#line 3292 "bison_parser.cpp" break; case 27: /* transaction_statement: ROLLBACK opt_transaction_keyword */ @@ -3302,7 +3296,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.transaction_stmt) = new TransactionStatement(kRollbackTransaction); } -#line 3306 "bison_parser.cpp" +#line 3300 "bison_parser.cpp" break; case 28: /* transaction_statement: COMMIT opt_transaction_keyword */ @@ -3310,7 +3304,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.transaction_stmt) = new TransactionStatement(kCommitTransaction); } -#line 3314 "bison_parser.cpp" +#line 3308 "bison_parser.cpp" break; case 31: /* prepare_statement: PREPARE IDENTIFIER FROM prepare_target_query */ @@ -3320,7 +3314,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.prep_stmt)->name = (yyvsp[-2].sval); (yyval.prep_stmt)->query = (yyvsp[0].sval); } -#line 3324 "bison_parser.cpp" +#line 3318 "bison_parser.cpp" break; case 33: /* execute_statement: EXECUTE IDENTIFIER */ @@ -3329,7 +3323,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[0].sval); } -#line 3333 "bison_parser.cpp" +#line 3327 "bison_parser.cpp" break; case 34: /* execute_statement: EXECUTE IDENTIFIER '(' opt_literal_list ')' */ @@ -3339,7 +3333,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.exec_stmt)->name = (yyvsp[-3].sval); (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); } -#line 3343 "bison_parser.cpp" +#line 3337 "bison_parser.cpp" break; case 35: /* import_statement: IMPORT FROM file_type FILE file_path INTO table_name */ @@ -3350,7 +3344,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.import_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3354 "bison_parser.cpp" +#line 3348 "bison_parser.cpp" break; case 36: /* import_statement: COPY table_name FROM file_path opt_file_type */ @@ -3361,7 +3355,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.import_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3365 "bison_parser.cpp" +#line 3359 "bison_parser.cpp" break; case 37: /* file_type: IDENTIFIER */ @@ -3380,13 +3374,13 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[0].sval)); } -#line 3384 "bison_parser.cpp" +#line 3378 "bison_parser.cpp" break; case 38: /* file_path: string_literal */ #line 471 "bison_parser.y" { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 3390 "bison_parser.cpp" +#line 3384 "bison_parser.cpp" break; case 39: /* opt_file_type: WITH FORMAT file_type */ @@ -3394,13 +3388,13 @@ YYLTYPE yylloc = yyloc_default; { (yyval.import_type_t) = (yyvsp[0].import_type_t); } -#line 3398 "bison_parser.cpp" +#line 3392 "bison_parser.cpp" break; case 40: /* opt_file_type: %empty */ #line 478 "bison_parser.y" { (yyval.import_type_t) = kImportAuto; } -#line 3404 "bison_parser.cpp" +#line 3398 "bison_parser.cpp" break; case 41: /* export_statement: COPY table_name TO file_path opt_file_type */ @@ -3411,7 +3405,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.export_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.export_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3415 "bison_parser.cpp" +#line 3409 "bison_parser.cpp" break; case 42: /* show_statement: SHOW TABLES */ @@ -3419,7 +3413,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.show_stmt) = new ShowStatement(kShowTables); } -#line 3423 "bison_parser.cpp" +#line 3417 "bison_parser.cpp" break; case 43: /* show_statement: SHOW COLUMNS table_name */ @@ -3429,7 +3423,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.show_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.show_stmt)->name = (yyvsp[0].table_name).name; } -#line 3433 "bison_parser.cpp" +#line 3427 "bison_parser.cpp" break; case 44: /* show_statement: DESCRIBE table_name */ @@ -3439,7 +3433,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.show_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.show_stmt)->name = (yyvsp[0].table_name).name; } -#line 3443 "bison_parser.cpp" +#line 3437 "bison_parser.cpp" break; case 45: /* create_statement: CREATE TABLE opt_not_exists table_name FROM IDENTIFIER FILE file_path */ @@ -3457,7 +3451,7 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].sval)); (yyval.create_stmt)->filePath = (yyvsp[0].sval); } -#line 3461 "bison_parser.cpp" +#line 3455 "bison_parser.cpp" break; case 46: /* create_statement: CREATE TABLE opt_not_exists table_name '(' table_elem_commalist ')' */ @@ -3470,7 +3464,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->setColumnDefsAndConstraints((yyvsp[-1].table_element_vec)); delete (yyvsp[-1].table_element_vec); } -#line 3474 "bison_parser.cpp" +#line 3468 "bison_parser.cpp" break; case 47: /* create_statement: CREATE TABLE opt_not_exists table_name AS select_statement */ @@ -3482,7 +3476,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-2].table_name).name; (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3486 "bison_parser.cpp" +#line 3480 "bison_parser.cpp" break; case 48: /* create_statement: CREATE INDEX opt_not_exists opt_index_name ON table_name '(' ident_commalist ')' */ @@ -3494,7 +3488,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->indexColumns = (yyvsp[-1].str_vec); } -#line 3498 "bison_parser.cpp" +#line 3492 "bison_parser.cpp" break; case 49: /* create_statement: CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement */ @@ -3507,43 +3501,43 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3511 "bison_parser.cpp" +#line 3505 "bison_parser.cpp" break; case 50: /* opt_not_exists: IF NOT EXISTS */ #line 569 "bison_parser.y" { (yyval.bval) = true; } -#line 3517 "bison_parser.cpp" +#line 3511 "bison_parser.cpp" break; case 51: /* opt_not_exists: %empty */ #line 570 "bison_parser.y" { (yyval.bval) = false; } -#line 3523 "bison_parser.cpp" +#line 3517 "bison_parser.cpp" break; case 52: /* table_elem_commalist: table_elem */ #line 574 "bison_parser.y" { (yyval.table_element_vec) = new std::vector(); (yyval.table_element_vec)->push_back((yyvsp[0].table_element_t)); } -#line 3529 "bison_parser.cpp" +#line 3523 "bison_parser.cpp" break; case 53: /* table_elem_commalist: table_elem_commalist ',' table_elem */ #line 575 "bison_parser.y" { (yyvsp[-2].table_element_vec)->push_back((yyvsp[0].table_element_t)); (yyval.table_element_vec) = (yyvsp[-2].table_element_vec); } -#line 3535 "bison_parser.cpp" +#line 3529 "bison_parser.cpp" break; case 54: /* table_elem: column_def */ #line 579 "bison_parser.y" { (yyval.table_element_t) = (yyvsp[0].column_t); } -#line 3541 "bison_parser.cpp" +#line 3535 "bison_parser.cpp" break; case 55: /* table_elem: table_constraint */ #line 580 "bison_parser.y" { (yyval.table_element_t) = (yyvsp[0].table_constraint_t); } -#line 3547 "bison_parser.cpp" +#line 3541 "bison_parser.cpp" break; case 56: /* column_def: IDENTIFIER column_type opt_column_constraints */ @@ -3552,181 +3546,181 @@ YYLTYPE yylloc = yyloc_default; (yyval.column_t) = new ColumnDefinition((yyvsp[-2].sval), (yyvsp[-1].column_type_t), (yyvsp[0].column_constraint_vec)); (yyval.column_t)->setNullableExplicit(); } -#line 3556 "bison_parser.cpp" +#line 3550 "bison_parser.cpp" break; case 57: /* column_type: INT */ #line 591 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3562 "bison_parser.cpp" +#line 3556 "bison_parser.cpp" break; case 58: /* column_type: INTEGER */ #line 592 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3568 "bison_parser.cpp" +#line 3562 "bison_parser.cpp" break; case 59: /* column_type: LONG */ #line 593 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::LONG}; } -#line 3574 "bison_parser.cpp" +#line 3568 "bison_parser.cpp" break; case 60: /* column_type: FLOAT */ #line 594 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3580 "bison_parser.cpp" +#line 3574 "bison_parser.cpp" break; case 61: /* column_type: DECIMAL opt_decimal_specification */ #line 595 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DECIMAL, 0, (yyvsp[0].column_specification_t)}; } -#line 3586 "bison_parser.cpp" +#line 3580 "bison_parser.cpp" break; case 62: /* column_type: DOUBLE */ #line 596 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } -#line 3592 "bison_parser.cpp" +#line 3586 "bison_parser.cpp" break; case 63: /* column_type: REAL */ #line 597 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::REAL}; } -#line 3598 "bison_parser.cpp" +#line 3592 "bison_parser.cpp" break; case 64: /* column_type: VARCHAR '(' INTVAL ')' */ #line 598 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3604 "bison_parser.cpp" +#line 3598 "bison_parser.cpp" break; case 65: /* column_type: CHARACTER VARYING '(' INTVAL ')' */ #line 599 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR_VARYING, (yyvsp[-1].ival)}; } -#line 3610 "bison_parser.cpp" +#line 3604 "bison_parser.cpp" break; case 66: /* column_type: CHAR '(' INTVAL ')' */ #line 600 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } -#line 3616 "bison_parser.cpp" +#line 3610 "bison_parser.cpp" break; case 67: /* column_type: TEXT */ #line 601 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } -#line 3622 "bison_parser.cpp" +#line 3616 "bison_parser.cpp" break; case 68: /* column_type: TIME opt_time_specification */ #line 602 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TIME, 0, (yyvsp[0].column_specification_t) }; } -#line 3628 "bison_parser.cpp" +#line 3622 "bison_parser.cpp" break; case 69: /* column_type: DATETIME */ #line 603 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } -#line 3634 "bison_parser.cpp" +#line 3628 "bison_parser.cpp" break; case 70: /* column_type: DATE */ #line 604 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATE}; } -#line 3640 "bison_parser.cpp" +#line 3634 "bison_parser.cpp" break; case 71: /* opt_time_specification: '(' INTVAL ')' */ #line 608 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-1].ival)}; } -#line 3646 "bison_parser.cpp" +#line 3640 "bison_parser.cpp" break; case 72: /* opt_time_specification: %empty */ #line 609 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{}; } -#line 3652 "bison_parser.cpp" +#line 3646 "bison_parser.cpp" break; case 73: /* opt_decimal_specification: '(' INTVAL ',' INTVAL ')' */ #line 613 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-3].ival), (yyvsp[-1].ival)}; } -#line 3658 "bison_parser.cpp" +#line 3652 "bison_parser.cpp" break; case 74: /* opt_decimal_specification: '(' INTVAL ')' */ #line 614 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-1].ival)}; } -#line 3664 "bison_parser.cpp" +#line 3658 "bison_parser.cpp" break; case 75: /* opt_decimal_specification: %empty */ #line 615 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{}; } -#line 3670 "bison_parser.cpp" +#line 3664 "bison_parser.cpp" break; case 76: /* opt_column_constraints: column_constraint_list */ #line 619 "bison_parser.y" { (yyval.column_constraint_vec) = (yyvsp[0].column_constraint_vec); } -#line 3676 "bison_parser.cpp" +#line 3670 "bison_parser.cpp" break; case 77: /* opt_column_constraints: %empty */ #line 620 "bison_parser.y" { (yyval.column_constraint_vec) = new std::vector(); } -#line 3682 "bison_parser.cpp" +#line 3676 "bison_parser.cpp" break; case 78: /* column_constraint_list: column_constraint */ #line 624 "bison_parser.y" { (yyval.column_constraint_vec) = new std::vector(); (yyval.column_constraint_vec)->push_back((yyvsp[0].column_constraint_t)); } -#line 3688 "bison_parser.cpp" +#line 3682 "bison_parser.cpp" break; case 79: /* column_constraint_list: column_constraint_list column_constraint */ #line 625 "bison_parser.y" { (yyvsp[-1].column_constraint_vec)->push_back((yyvsp[0].column_constraint_t)); (yyval.column_constraint_vec) = (yyvsp[-1].column_constraint_vec); } -#line 3694 "bison_parser.cpp" +#line 3688 "bison_parser.cpp" break; case 80: /* column_constraint: PRIMARY KEY */ #line 628 "bison_parser.y" - { (yyval.column_constraint_t) = ConstraintType::PRIMARY_KEY; } -#line 3700 "bison_parser.cpp" + { (yyval.column_constraint_t) = ConstraintType::PrimaryKey; } +#line 3694 "bison_parser.cpp" break; case 81: /* column_constraint: UNIQUE */ #line 629 "bison_parser.y" - { (yyval.column_constraint_t) = ConstraintType::UNIQUE; } -#line 3706 "bison_parser.cpp" + { (yyval.column_constraint_t) = ConstraintType::Unique; } +#line 3700 "bison_parser.cpp" break; case 82: /* column_constraint: NULL */ #line 630 "bison_parser.y" - { (yyval.column_constraint_t) = ConstraintType::_NULL; } -#line 3712 "bison_parser.cpp" + { (yyval.column_constraint_t) = ConstraintType::Null; } +#line 3706 "bison_parser.cpp" break; case 83: /* column_constraint: NOT NULL */ #line 631 "bison_parser.y" - { (yyval.column_constraint_t) = ConstraintType::NOTNULL; } -#line 3718 "bison_parser.cpp" + { (yyval.column_constraint_t) = ConstraintType::NotNull; } +#line 3712 "bison_parser.cpp" break; case 84: /* table_constraint: PRIMARY KEY '(' ident_commalist ')' */ #line 635 "bison_parser.y" - { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::PRIMARY_KEY, (yyvsp[-1].str_vec)); } -#line 3724 "bison_parser.cpp" + { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::PrimaryKey, (yyvsp[-1].str_vec)); } +#line 3718 "bison_parser.cpp" break; case 85: /* table_constraint: UNIQUE '(' ident_commalist ')' */ #line 636 "bison_parser.y" - { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::UNIQUE, (yyvsp[-1].str_vec)); } -#line 3730 "bison_parser.cpp" + { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::Unique, (yyvsp[-1].str_vec)); } +#line 3724 "bison_parser.cpp" break; case 86: /* drop_statement: DROP TABLE opt_exists table_name */ @@ -3737,7 +3731,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.drop_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; } -#line 3741 "bison_parser.cpp" +#line 3735 "bison_parser.cpp" break; case 87: /* drop_statement: DROP VIEW opt_exists table_name */ @@ -3748,7 +3742,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.drop_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; } -#line 3752 "bison_parser.cpp" +#line 3746 "bison_parser.cpp" break; case 88: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ @@ -3758,7 +3752,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.drop_stmt)->ifExists = false; (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 3762 "bison_parser.cpp" +#line 3756 "bison_parser.cpp" break; case 89: /* drop_statement: DROP INDEX opt_exists index_name */ @@ -3768,19 +3762,19 @@ YYLTYPE yylloc = yyloc_default; (yyval.drop_stmt)->ifExists = (yyvsp[-1].bval); (yyval.drop_stmt)->indexName = (yyvsp[0].sval); } -#line 3772 "bison_parser.cpp" +#line 3766 "bison_parser.cpp" break; case 90: /* opt_exists: IF EXISTS */ #line 673 "bison_parser.y" { (yyval.bval) = true; } -#line 3778 "bison_parser.cpp" +#line 3772 "bison_parser.cpp" break; case 91: /* opt_exists: %empty */ #line 674 "bison_parser.y" { (yyval.bval) = false; } -#line 3784 "bison_parser.cpp" +#line 3778 "bison_parser.cpp" break; case 92: /* alter_statement: ALTER TABLE opt_exists table_name alter_action */ @@ -3790,13 +3784,13 @@ YYLTYPE yylloc = yyloc_default; (yyval.alter_stmt)->ifTableExists = (yyvsp[-2].bval); (yyval.alter_stmt)->schema = (yyvsp[-1].table_name).schema; } -#line 3794 "bison_parser.cpp" +#line 3788 "bison_parser.cpp" break; case 93: /* alter_action: drop_action */ #line 691 "bison_parser.y" {(yyval.alter_action_t) = (yyvsp[0].drop_action_t);} -#line 3800 "bison_parser.cpp" +#line 3794 "bison_parser.cpp" break; case 94: /* drop_action: DROP COLUMN opt_exists IDENTIFIER */ @@ -3805,7 +3799,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.drop_action_t) = new DropColumnAction((yyvsp[0].sval)); (yyval.drop_action_t)->ifExists = (yyvsp[-1].bval); } -#line 3809 "bison_parser.cpp" +#line 3803 "bison_parser.cpp" break; case 95: /* delete_statement: DELETE FROM table_name opt_where */ @@ -3816,7 +3810,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.delete_stmt)->tableName = (yyvsp[-1].table_name).name; (yyval.delete_stmt)->expr = (yyvsp[0].expr); } -#line 3820 "bison_parser.cpp" +#line 3814 "bison_parser.cpp" break; case 96: /* truncate_statement: TRUNCATE table_name */ @@ -3826,7 +3820,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3830 "bison_parser.cpp" +#line 3824 "bison_parser.cpp" break; case 97: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ @@ -3838,7 +3832,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } -#line 3842 "bison_parser.cpp" +#line 3836 "bison_parser.cpp" break; case 98: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ @@ -3850,19 +3844,19 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } -#line 3854 "bison_parser.cpp" +#line 3848 "bison_parser.cpp" break; case 99: /* opt_column_list: '(' ident_commalist ')' */ #line 746 "bison_parser.y" { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 3860 "bison_parser.cpp" +#line 3854 "bison_parser.cpp" break; case 100: /* opt_column_list: %empty */ #line 747 "bison_parser.y" { (yyval.str_vec) = nullptr; } -#line 3866 "bison_parser.cpp" +#line 3860 "bison_parser.cpp" break; case 101: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ @@ -3873,19 +3867,19 @@ YYLTYPE yylloc = yyloc_default; (yyval.update_stmt)->updates = (yyvsp[-1].update_vec); (yyval.update_stmt)->where = (yyvsp[0].expr); } -#line 3877 "bison_parser.cpp" +#line 3871 "bison_parser.cpp" break; case 102: /* update_clause_commalist: update_clause */ #line 766 "bison_parser.y" { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 3883 "bison_parser.cpp" +#line 3877 "bison_parser.cpp" break; case 103: /* update_clause_commalist: update_clause_commalist ',' update_clause */ #line 767 "bison_parser.y" { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 3889 "bison_parser.cpp" +#line 3883 "bison_parser.cpp" break; case 104: /* update_clause: IDENTIFIER '=' expr */ @@ -3895,7 +3889,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 3899 "bison_parser.cpp" +#line 3893 "bison_parser.cpp" break; case 105: /* select_statement: opt_with_clause select_with_paren */ @@ -3904,7 +3898,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3908 "bison_parser.cpp" +#line 3902 "bison_parser.cpp" break; case 106: /* select_statement: opt_with_clause select_no_paren */ @@ -3913,7 +3907,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3917 "bison_parser.cpp" +#line 3911 "bison_parser.cpp" break; case 107: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ @@ -3929,13 +3923,13 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); (yyval.select_stmt)->withDescriptions = (yyvsp[-5].with_description_vec); } -#line 3933 "bison_parser.cpp" +#line 3927 "bison_parser.cpp" break; case 110: /* select_within_set_operation_no_parentheses: select_clause */ #line 809 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); } -#line 3939 "bison_parser.cpp" +#line 3933 "bison_parser.cpp" break; case 111: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ @@ -3948,19 +3942,19 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->push_back((yyvsp[-1].set_operator_t)); (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[0].select_stmt); } -#line 3952 "bison_parser.cpp" +#line 3946 "bison_parser.cpp" break; case 112: /* select_with_paren: '(' select_no_paren ')' */ #line 821 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3958 "bison_parser.cpp" +#line 3952 "bison_parser.cpp" break; case 113: /* select_with_paren: '(' select_with_paren ')' */ #line 822 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3964 "bison_parser.cpp" +#line 3958 "bison_parser.cpp" break; case 114: /* select_no_paren: select_clause opt_order opt_limit */ @@ -3975,7 +3969,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3979 "bison_parser.cpp" +#line 3973 "bison_parser.cpp" break; case 115: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ @@ -3990,7 +3984,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); } -#line 3994 "bison_parser.cpp" +#line 3988 "bison_parser.cpp" break; case 116: /* set_operator: set_type opt_all */ @@ -3999,7 +3993,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.set_operator_t) = (yyvsp[-1].set_operator_t); (yyval.set_operator_t)->isAll = (yyvsp[0].bval); } -#line 4003 "bison_parser.cpp" +#line 3997 "bison_parser.cpp" break; case 117: /* set_type: UNION */ @@ -4008,7 +4002,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetUnion; } -#line 4012 "bison_parser.cpp" +#line 4006 "bison_parser.cpp" break; case 118: /* set_type: INTERSECT */ @@ -4017,7 +4011,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetIntersect; } -#line 4021 "bison_parser.cpp" +#line 4015 "bison_parser.cpp" break; case 119: /* set_type: EXCEPT */ @@ -4026,7 +4020,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetExcept; } -#line 4030 "bison_parser.cpp" +#line 4024 "bison_parser.cpp" break; case 120: /* opt_all: ALL */ @@ -4034,7 +4028,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.bval) = true; } -#line 4038 "bison_parser.cpp" +#line 4032 "bison_parser.cpp" break; case 121: /* opt_all: %empty */ @@ -4042,7 +4036,7 @@ YYLTYPE yylloc = yyloc_default; { (yyval.bval) = false; } -#line 4046 "bison_parser.cpp" +#line 4040 "bison_parser.cpp" break; case 122: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ @@ -4056,49 +4050,49 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 4060 "bison_parser.cpp" +#line 4054 "bison_parser.cpp" break; case 123: /* opt_distinct: DISTINCT */ #line 892 "bison_parser.y" { (yyval.bval) = true; } -#line 4066 "bison_parser.cpp" +#line 4060 "bison_parser.cpp" break; case 124: /* opt_distinct: %empty */ #line 893 "bison_parser.y" { (yyval.bval) = false; } -#line 4072 "bison_parser.cpp" +#line 4066 "bison_parser.cpp" break; case 126: /* opt_from_clause: from_clause */ #line 901 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 4078 "bison_parser.cpp" +#line 4072 "bison_parser.cpp" break; case 127: /* opt_from_clause: %empty */ #line 902 "bison_parser.y" { (yyval.table) = nullptr; } -#line 4084 "bison_parser.cpp" +#line 4078 "bison_parser.cpp" break; case 128: /* from_clause: FROM table_ref */ #line 906 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 4090 "bison_parser.cpp" +#line 4084 "bison_parser.cpp" break; case 129: /* opt_where: WHERE expr */ #line 911 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 4096 "bison_parser.cpp" +#line 4090 "bison_parser.cpp" break; case 130: /* opt_where: %empty */ #line 912 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 4102 "bison_parser.cpp" +#line 4096 "bison_parser.cpp" break; case 131: /* opt_group: GROUP BY expr_list opt_having */ @@ -4108,157 +4102,157 @@ YYLTYPE yylloc = yyloc_default; (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 4112 "bison_parser.cpp" +#line 4106 "bison_parser.cpp" break; case 132: /* opt_group: %empty */ #line 921 "bison_parser.y" { (yyval.group_t) = nullptr; } -#line 4118 "bison_parser.cpp" +#line 4112 "bison_parser.cpp" break; case 133: /* opt_having: HAVING expr */ #line 925 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 4124 "bison_parser.cpp" +#line 4118 "bison_parser.cpp" break; case 134: /* opt_having: %empty */ #line 926 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 4130 "bison_parser.cpp" +#line 4124 "bison_parser.cpp" break; case 135: /* opt_order: ORDER BY order_list */ #line 930 "bison_parser.y" { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 4136 "bison_parser.cpp" +#line 4130 "bison_parser.cpp" break; case 136: /* opt_order: %empty */ #line 931 "bison_parser.y" { (yyval.order_vec) = nullptr; } -#line 4142 "bison_parser.cpp" +#line 4136 "bison_parser.cpp" break; case 137: /* order_list: order_desc */ #line 935 "bison_parser.y" { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 4148 "bison_parser.cpp" +#line 4142 "bison_parser.cpp" break; case 138: /* order_list: order_list ',' order_desc */ #line 936 "bison_parser.y" { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 4154 "bison_parser.cpp" +#line 4148 "bison_parser.cpp" break; case 139: /* order_desc: expr opt_order_type */ #line 940 "bison_parser.y" { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 4160 "bison_parser.cpp" +#line 4154 "bison_parser.cpp" break; case 140: /* opt_order_type: ASC */ #line 944 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 4166 "bison_parser.cpp" +#line 4160 "bison_parser.cpp" break; case 141: /* opt_order_type: DESC */ #line 945 "bison_parser.y" { (yyval.order_type) = kOrderDesc; } -#line 4172 "bison_parser.cpp" +#line 4166 "bison_parser.cpp" break; case 142: /* opt_order_type: %empty */ #line 946 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 4178 "bison_parser.cpp" +#line 4172 "bison_parser.cpp" break; case 143: /* opt_top: TOP int_literal */ #line 952 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 4184 "bison_parser.cpp" +#line 4178 "bison_parser.cpp" break; case 144: /* opt_top: %empty */ #line 953 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 4190 "bison_parser.cpp" +#line 4184 "bison_parser.cpp" break; case 145: /* opt_limit: LIMIT expr */ #line 957 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 4196 "bison_parser.cpp" +#line 4190 "bison_parser.cpp" break; case 146: /* opt_limit: OFFSET expr */ #line 958 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 4202 "bison_parser.cpp" +#line 4196 "bison_parser.cpp" break; case 147: /* opt_limit: LIMIT expr OFFSET expr */ #line 959 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4208 "bison_parser.cpp" +#line 4202 "bison_parser.cpp" break; case 148: /* opt_limit: LIMIT ALL */ #line 960 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, nullptr); } -#line 4214 "bison_parser.cpp" +#line 4208 "bison_parser.cpp" break; case 149: /* opt_limit: LIMIT ALL OFFSET expr */ #line 961 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 4220 "bison_parser.cpp" +#line 4214 "bison_parser.cpp" break; case 150: /* opt_limit: %empty */ #line 962 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 4226 "bison_parser.cpp" +#line 4220 "bison_parser.cpp" break; case 151: /* expr_list: expr_alias */ #line 969 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4232 "bison_parser.cpp" +#line 4226 "bison_parser.cpp" break; case 152: /* expr_list: expr_list ',' expr_alias */ #line 970 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4238 "bison_parser.cpp" +#line 4232 "bison_parser.cpp" break; case 153: /* opt_literal_list: literal_list */ #line 974 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[0].expr_vec); } -#line 4244 "bison_parser.cpp" +#line 4238 "bison_parser.cpp" break; case 154: /* opt_literal_list: %empty */ #line 975 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 4250 "bison_parser.cpp" +#line 4244 "bison_parser.cpp" break; case 155: /* literal_list: literal */ #line 979 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4256 "bison_parser.cpp" +#line 4250 "bison_parser.cpp" break; case 156: /* literal_list: literal_list ',' literal */ #line 980 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4262 "bison_parser.cpp" +#line 4256 "bison_parser.cpp" break; case 157: /* expr_alias: expr opt_alias */ @@ -4270,373 +4264,373 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].alias_t); } } -#line 4274 "bison_parser.cpp" +#line 4268 "bison_parser.cpp" break; case 163: /* operand: '(' expr ')' */ #line 1002 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); } -#line 4280 "bison_parser.cpp" +#line 4274 "bison_parser.cpp" break; case 173: /* operand: '(' select_no_paren ')' */ #line 1012 "bison_parser.y" { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 4286 "bison_parser.cpp" +#line 4280 "bison_parser.cpp" break; case 176: /* unary_expr: '-' operand */ #line 1021 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 4292 "bison_parser.cpp" +#line 4286 "bison_parser.cpp" break; case 177: /* unary_expr: NOT operand */ #line 1022 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 4298 "bison_parser.cpp" +#line 4292 "bison_parser.cpp" break; case 178: /* unary_expr: operand ISNULL */ #line 1023 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 4304 "bison_parser.cpp" +#line 4298 "bison_parser.cpp" break; case 179: /* unary_expr: operand IS NULL */ #line 1024 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 4310 "bison_parser.cpp" +#line 4304 "bison_parser.cpp" break; case 180: /* unary_expr: operand IS NOT NULL */ #line 1025 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 4316 "bison_parser.cpp" +#line 4310 "bison_parser.cpp" break; case 182: /* binary_expr: operand '-' operand */ #line 1030 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 4322 "bison_parser.cpp" +#line 4316 "bison_parser.cpp" break; case 183: /* binary_expr: operand '+' operand */ #line 1031 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 4328 "bison_parser.cpp" +#line 4322 "bison_parser.cpp" break; case 184: /* binary_expr: operand '/' operand */ #line 1032 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 4334 "bison_parser.cpp" +#line 4328 "bison_parser.cpp" break; case 185: /* binary_expr: operand '*' operand */ #line 1033 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 4340 "bison_parser.cpp" +#line 4334 "bison_parser.cpp" break; case 186: /* binary_expr: operand '%' operand */ #line 1034 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 4346 "bison_parser.cpp" +#line 4340 "bison_parser.cpp" break; case 187: /* binary_expr: operand '^' operand */ #line 1035 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 4352 "bison_parser.cpp" +#line 4346 "bison_parser.cpp" break; case 188: /* binary_expr: operand LIKE operand */ #line 1036 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 4358 "bison_parser.cpp" +#line 4352 "bison_parser.cpp" break; case 189: /* binary_expr: operand NOT LIKE operand */ #line 1037 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 4364 "bison_parser.cpp" +#line 4358 "bison_parser.cpp" break; case 190: /* binary_expr: operand ILIKE operand */ #line 1038 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 4370 "bison_parser.cpp" +#line 4364 "bison_parser.cpp" break; case 191: /* binary_expr: operand CONCAT operand */ #line 1039 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 4376 "bison_parser.cpp" +#line 4370 "bison_parser.cpp" break; case 192: /* logic_expr: expr AND expr */ #line 1043 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 4382 "bison_parser.cpp" +#line 4376 "bison_parser.cpp" break; case 193: /* logic_expr: expr OR expr */ #line 1044 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 4388 "bison_parser.cpp" +#line 4382 "bison_parser.cpp" break; case 194: /* in_expr: operand IN '(' expr_list ')' */ #line 1048 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 4394 "bison_parser.cpp" +#line 4388 "bison_parser.cpp" break; case 195: /* in_expr: operand NOT IN '(' expr_list ')' */ #line 1049 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 4400 "bison_parser.cpp" +#line 4394 "bison_parser.cpp" break; case 196: /* in_expr: operand IN '(' select_no_paren ')' */ #line 1050 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 4406 "bison_parser.cpp" +#line 4400 "bison_parser.cpp" break; case 197: /* in_expr: operand NOT IN '(' select_no_paren ')' */ #line 1051 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 4412 "bison_parser.cpp" +#line 4406 "bison_parser.cpp" break; case 198: /* case_expr: CASE expr case_list END */ #line 1057 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } -#line 4418 "bison_parser.cpp" +#line 4412 "bison_parser.cpp" break; case 199: /* case_expr: CASE expr case_list ELSE expr END */ #line 1058 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4424 "bison_parser.cpp" +#line 4418 "bison_parser.cpp" break; case 200: /* case_expr: CASE case_list END */ #line 1059 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } -#line 4430 "bison_parser.cpp" +#line 4424 "bison_parser.cpp" break; case 201: /* case_expr: CASE case_list ELSE expr END */ #line 1060 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4436 "bison_parser.cpp" +#line 4430 "bison_parser.cpp" break; case 202: /* case_list: WHEN expr THEN expr */ #line 1064 "bison_parser.y" { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4442 "bison_parser.cpp" +#line 4436 "bison_parser.cpp" break; case 203: /* case_list: case_list WHEN expr THEN expr */ #line 1065 "bison_parser.y" { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4448 "bison_parser.cpp" +#line 4442 "bison_parser.cpp" break; case 204: /* exists_expr: EXISTS '(' select_no_paren ')' */ #line 1069 "bison_parser.y" { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 4454 "bison_parser.cpp" +#line 4448 "bison_parser.cpp" break; case 205: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ #line 1070 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 4460 "bison_parser.cpp" +#line 4454 "bison_parser.cpp" break; case 206: /* comp_expr: operand '=' operand */ #line 1074 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4466 "bison_parser.cpp" +#line 4460 "bison_parser.cpp" break; case 207: /* comp_expr: operand EQUALS operand */ #line 1075 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4472 "bison_parser.cpp" +#line 4466 "bison_parser.cpp" break; case 208: /* comp_expr: operand NOTEQUALS operand */ #line 1076 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 4478 "bison_parser.cpp" +#line 4472 "bison_parser.cpp" break; case 209: /* comp_expr: operand '<' operand */ #line 1077 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 4484 "bison_parser.cpp" +#line 4478 "bison_parser.cpp" break; case 210: /* comp_expr: operand '>' operand */ #line 1078 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 4490 "bison_parser.cpp" +#line 4484 "bison_parser.cpp" break; case 211: /* comp_expr: operand LESSEQ operand */ #line 1079 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 4496 "bison_parser.cpp" +#line 4490 "bison_parser.cpp" break; case 212: /* comp_expr: operand GREATEREQ operand */ #line 1080 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 4502 "bison_parser.cpp" +#line 4496 "bison_parser.cpp" break; case 213: /* function_expr: IDENTIFIER '(' ')' */ #line 1084 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 4508 "bison_parser.cpp" +#line 4502 "bison_parser.cpp" break; case 214: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ #line 1085 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 4514 "bison_parser.cpp" +#line 4508 "bison_parser.cpp" break; case 215: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ #line 1089 "bison_parser.y" { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } -#line 4520 "bison_parser.cpp" +#line 4514 "bison_parser.cpp" break; case 216: /* cast_expr: CAST '(' expr AS column_type ')' */ #line 1093 "bison_parser.y" { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } -#line 4526 "bison_parser.cpp" +#line 4520 "bison_parser.cpp" break; case 217: /* datetime_field: SECOND */ #line 1097 "bison_parser.y" { (yyval.datetime_field) = kDatetimeSecond; } -#line 4532 "bison_parser.cpp" +#line 4526 "bison_parser.cpp" break; case 218: /* datetime_field: MINUTE */ #line 1098 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMinute; } -#line 4538 "bison_parser.cpp" +#line 4532 "bison_parser.cpp" break; case 219: /* datetime_field: HOUR */ #line 1099 "bison_parser.y" { (yyval.datetime_field) = kDatetimeHour; } -#line 4544 "bison_parser.cpp" +#line 4538 "bison_parser.cpp" break; case 220: /* datetime_field: DAY */ #line 1100 "bison_parser.y" { (yyval.datetime_field) = kDatetimeDay; } -#line 4550 "bison_parser.cpp" +#line 4544 "bison_parser.cpp" break; case 221: /* datetime_field: MONTH */ #line 1101 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMonth; } -#line 4556 "bison_parser.cpp" +#line 4550 "bison_parser.cpp" break; case 222: /* datetime_field: YEAR */ #line 1102 "bison_parser.y" { (yyval.datetime_field) = kDatetimeYear; } -#line 4562 "bison_parser.cpp" +#line 4556 "bison_parser.cpp" break; case 223: /* array_expr: ARRAY '[' expr_list ']' */ #line 1106 "bison_parser.y" { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 4568 "bison_parser.cpp" +#line 4562 "bison_parser.cpp" break; case 224: /* array_index: operand '[' int_literal ']' */ #line 1110 "bison_parser.y" { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 4574 "bison_parser.cpp" +#line 4568 "bison_parser.cpp" break; case 225: /* between_expr: operand BETWEEN operand AND operand */ #line 1114 "bison_parser.y" { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4580 "bison_parser.cpp" +#line 4574 "bison_parser.cpp" break; case 226: /* column_name: IDENTIFIER */ #line 1118 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 4586 "bison_parser.cpp" +#line 4580 "bison_parser.cpp" break; case 227: /* column_name: IDENTIFIER '.' IDENTIFIER */ #line 1119 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 4592 "bison_parser.cpp" +#line 4586 "bison_parser.cpp" break; case 228: /* column_name: '*' */ #line 1120 "bison_parser.y" { (yyval.expr) = Expr::makeStar(); } -#line 4598 "bison_parser.cpp" +#line 4592 "bison_parser.cpp" break; case 229: /* column_name: IDENTIFIER '.' '*' */ #line 1121 "bison_parser.y" { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 4604 "bison_parser.cpp" +#line 4598 "bison_parser.cpp" break; case 236: /* string_literal: STRING */ #line 1134 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 4610 "bison_parser.cpp" +#line 4604 "bison_parser.cpp" break; case 237: /* bool_literal: TRUE */ #line 1138 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(true); } -#line 4616 "bison_parser.cpp" +#line 4610 "bison_parser.cpp" break; case 238: /* bool_literal: FALSE */ #line 1139 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(false); } -#line 4622 "bison_parser.cpp" +#line 4616 "bison_parser.cpp" break; case 239: /* num_literal: FLOATVAL */ #line 1143 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 4628 "bison_parser.cpp" +#line 4622 "bison_parser.cpp" break; case 241: /* int_literal: INTVAL */ #line 1148 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 4634 "bison_parser.cpp" +#line 4628 "bison_parser.cpp" break; case 242: /* null_literal: NULL */ #line 1152 "bison_parser.y" { (yyval.expr) = Expr::makeNullLiteral(); } -#line 4640 "bison_parser.cpp" +#line 4634 "bison_parser.cpp" break; case 243: /* date_literal: DATE STRING */ @@ -4651,7 +4645,7 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expr) = Expr::makeDateLiteral((yyvsp[0].sval)); } -#line 4655 "bison_parser.cpp" +#line 4649 "bison_parser.cpp" break; case 244: /* param_expr: '?' */ @@ -4661,7 +4655,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 4665 "bison_parser.cpp" +#line 4659 "bison_parser.cpp" break; case 246: /* table_ref: table_ref_commalist ',' table_ref_atomic */ @@ -4672,7 +4666,7 @@ YYLTYPE yylloc = yyloc_default; tbl->list = (yyvsp[-2].table_vec); (yyval.table) = tbl; } -#line 4676 "bison_parser.cpp" +#line 4670 "bison_parser.cpp" break; case 250: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ @@ -4683,19 +4677,19 @@ YYLTYPE yylloc = yyloc_default; tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4687 "bison_parser.cpp" +#line 4681 "bison_parser.cpp" break; case 251: /* table_ref_commalist: table_ref_atomic */ #line 1207 "bison_parser.y" { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 4693 "bison_parser.cpp" +#line 4687 "bison_parser.cpp" break; case 252: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ #line 1208 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 4699 "bison_parser.cpp" +#line 4693 "bison_parser.cpp" break; case 253: /* table_ref_name: table_name opt_table_alias */ @@ -4707,7 +4701,7 @@ YYLTYPE yylloc = yyloc_default; tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4711 "bison_parser.cpp" +#line 4705 "bison_parser.cpp" break; case 254: /* table_ref_name_no_alias: table_name */ @@ -4717,79 +4711,79 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->schema = (yyvsp[0].table_name).schema; (yyval.table)->name = (yyvsp[0].table_name).name; } -#line 4721 "bison_parser.cpp" +#line 4715 "bison_parser.cpp" break; case 255: /* table_name: IDENTIFIER */ #line 1233 "bison_parser.y" { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} -#line 4727 "bison_parser.cpp" +#line 4721 "bison_parser.cpp" break; case 256: /* table_name: IDENTIFIER '.' IDENTIFIER */ #line 1234 "bison_parser.y" { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } -#line 4733 "bison_parser.cpp" +#line 4727 "bison_parser.cpp" break; case 257: /* opt_index_name: IDENTIFIER */ #line 1238 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4739 "bison_parser.cpp" +#line 4733 "bison_parser.cpp" break; case 258: /* opt_index_name: %empty */ #line 1239 "bison_parser.y" { (yyval.sval) = nullptr;} -#line 4745 "bison_parser.cpp" +#line 4739 "bison_parser.cpp" break; case 259: /* index_name: IDENTIFIER */ #line 1243 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4751 "bison_parser.cpp" +#line 4745 "bison_parser.cpp" break; case 261: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ #line 1249 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } -#line 4757 "bison_parser.cpp" +#line 4751 "bison_parser.cpp" break; case 263: /* opt_table_alias: %empty */ #line 1255 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4763 "bison_parser.cpp" +#line 4757 "bison_parser.cpp" break; case 264: /* alias: AS IDENTIFIER */ #line 1260 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4769 "bison_parser.cpp" +#line 4763 "bison_parser.cpp" break; case 265: /* alias: IDENTIFIER */ #line 1261 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4775 "bison_parser.cpp" +#line 4769 "bison_parser.cpp" break; case 267: /* opt_alias: %empty */ #line 1267 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4781 "bison_parser.cpp" +#line 4775 "bison_parser.cpp" break; case 269: /* opt_with_clause: %empty */ #line 1277 "bison_parser.y" { (yyval.with_description_vec) = nullptr; } -#line 4787 "bison_parser.cpp" +#line 4781 "bison_parser.cpp" break; case 270: /* with_clause: WITH with_description_list */ #line 1281 "bison_parser.y" { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } -#line 4793 "bison_parser.cpp" +#line 4787 "bison_parser.cpp" break; case 271: /* with_description_list: with_description */ @@ -4798,7 +4792,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.with_description_vec) = new std::vector(); (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); } -#line 4802 "bison_parser.cpp" +#line 4796 "bison_parser.cpp" break; case 272: /* with_description_list: with_description_list ',' with_description */ @@ -4807,7 +4801,7 @@ YYLTYPE yylloc = yyloc_default; (yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t)); (yyval.with_description_vec) = (yyvsp[-2].with_description_vec); } -#line 4811 "bison_parser.cpp" +#line 4805 "bison_parser.cpp" break; case 273: /* with_description: IDENTIFIER AS select_with_paren */ @@ -4817,7 +4811,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.with_description_t)->alias = (yyvsp[-2].sval); (yyval.with_description_t)->select = (yyvsp[0].select_stmt); } -#line 4821 "bison_parser.cpp" +#line 4815 "bison_parser.cpp" break; case 274: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ @@ -4829,7 +4823,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 4833 "bison_parser.cpp" +#line 4827 "bison_parser.cpp" break; case 275: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ @@ -4842,7 +4836,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 4846 "bison_parser.cpp" +#line 4840 "bison_parser.cpp" break; case 276: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ @@ -4862,83 +4856,83 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } -#line 4866 "bison_parser.cpp" +#line 4860 "bison_parser.cpp" break; case 277: /* opt_join_type: INNER */ #line 1346 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4872 "bison_parser.cpp" +#line 4866 "bison_parser.cpp" break; case 278: /* opt_join_type: LEFT OUTER */ #line 1347 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4878 "bison_parser.cpp" +#line 4872 "bison_parser.cpp" break; case 279: /* opt_join_type: LEFT */ #line 1348 "bison_parser.y" { (yyval.uval) = kJoinLeft; } -#line 4884 "bison_parser.cpp" +#line 4878 "bison_parser.cpp" break; case 280: /* opt_join_type: RIGHT OUTER */ #line 1349 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4890 "bison_parser.cpp" +#line 4884 "bison_parser.cpp" break; case 281: /* opt_join_type: RIGHT */ #line 1350 "bison_parser.y" { (yyval.uval) = kJoinRight; } -#line 4896 "bison_parser.cpp" +#line 4890 "bison_parser.cpp" break; case 282: /* opt_join_type: FULL OUTER */ #line 1351 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4902 "bison_parser.cpp" +#line 4896 "bison_parser.cpp" break; case 283: /* opt_join_type: OUTER */ #line 1352 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4908 "bison_parser.cpp" +#line 4902 "bison_parser.cpp" break; case 284: /* opt_join_type: FULL */ #line 1353 "bison_parser.y" { (yyval.uval) = kJoinFull; } -#line 4914 "bison_parser.cpp" +#line 4908 "bison_parser.cpp" break; case 285: /* opt_join_type: CROSS */ #line 1354 "bison_parser.y" { (yyval.uval) = kJoinCross; } -#line 4920 "bison_parser.cpp" +#line 4914 "bison_parser.cpp" break; case 286: /* opt_join_type: %empty */ #line 1355 "bison_parser.y" { (yyval.uval) = kJoinInner; } -#line 4926 "bison_parser.cpp" +#line 4920 "bison_parser.cpp" break; case 290: /* ident_commalist: IDENTIFIER */ #line 1375 "bison_parser.y" { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 4932 "bison_parser.cpp" +#line 4926 "bison_parser.cpp" break; case 291: /* ident_commalist: ident_commalist ',' IDENTIFIER */ #line 1376 "bison_parser.y" { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 4938 "bison_parser.cpp" +#line 4932 "bison_parser.cpp" break; -#line 4942 "bison_parser.cpp" +#line 4936 "bison_parser.cpp" default: break; } @@ -5015,7 +5009,7 @@ YYLTYPE yylloc = yyloc_default; } yyerror (&yylloc, result, scanner, yymsgp); if (yysyntax_error_status == YYENOMEM) - goto yyexhaustedlab; + YYNOMEM; } } @@ -5052,6 +5046,7 @@ YYLTYPE yylloc = yyloc_default; label yyerrorlab therefore never appears in user code. */ if (0) YYERROR; + ++yynerrs; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ @@ -5115,7 +5110,7 @@ YYLTYPE yylloc = yyloc_default; `-------------------------------------*/ yyacceptlab: yyresult = 0; - goto yyreturn; + goto yyreturnlab; /*-----------------------------------. @@ -5123,24 +5118,22 @@ YYLTYPE yylloc = yyloc_default; `-----------------------------------*/ yyabortlab: yyresult = 1; - goto yyreturn; + goto yyreturnlab; -#if 1 -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ +/*-----------------------------------------------------------. +| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | +`-----------------------------------------------------------*/ yyexhaustedlab: yyerror (&yylloc, result, scanner, YY_("memory exhausted")); yyresult = 2; - goto yyreturn; -#endif + goto yyreturnlab; -/*-------------------------------------------------------. -| yyreturn -- parsing is finished, clean up and return. | -`-------------------------------------------------------*/ -yyreturn: +/*----------------------------------------------------------. +| yyreturnlab -- parsing is finished, clean up and return. | +`----------------------------------------------------------*/ +yyreturnlab: if (yychar != SQL_HSQL_EMPTY) { /* Make sure we have latest lookahead translation. See comments at diff --git a/src/parser/bison_parser.h b/src/parser/bison_parser.h index d307947d..d61212de 100644 --- a/src/parser/bison_parser.h +++ b/src/parser/bison_parser.h @@ -1,4 +1,4 @@ -/* A Bison parser, made by GNU Bison 3.7.6. */ +/* A Bison parser, made by GNU Bison 3.8.1. */ /* Bison interface for Yacc-like parsers in C @@ -329,6 +329,8 @@ struct HSQL_LTYPE + int hsql_parse (hsql::SQLParserResult* result, yyscan_t scanner); + #endif /* !YY_HSQL_BISON_PARSER_H_INCLUDED */ diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index f1e73e72..71f0de2f 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -625,15 +625,15 @@ column_constraint_list: | column_constraint_list column_constraint { $1->push_back($2); $$ = $1; } column_constraint: - PRIMARY KEY { $$ = ConstraintType::PRIMARY_KEY; } - | UNIQUE { $$ = ConstraintType::UNIQUE; } - | NULL { $$ = ConstraintType::_NULL; } - | NOT NULL { $$ = ConstraintType::NOTNULL; } + PRIMARY KEY { $$ = ConstraintType::PrimaryKey; } + | UNIQUE { $$ = ConstraintType::Unique; } + | NULL { $$ = ConstraintType::Null; } + | NOT NULL { $$ = ConstraintType::NotNull; } ; table_constraint: - PRIMARY KEY '(' ident_commalist ')' { $$ = new TableConstraint(ConstraintType::PRIMARY_KEY, $4); } - | UNIQUE '(' ident_commalist ')' { $$ = new TableConstraint(ConstraintType::UNIQUE, $3); } + PRIMARY KEY '(' ident_commalist ')' { $$ = new TableConstraint(ConstraintType::PrimaryKey, $4); } + | UNIQUE '(' ident_commalist ')' { $$ = new TableConstraint(ConstraintType::Unique, $3); } ; diff --git a/src/sql/CreateStatement.h b/src/sql/CreateStatement.h index 4c1be22d..0086da57 100755 --- a/src/sql/CreateStatement.h +++ b/src/sql/CreateStatement.h @@ -10,7 +10,13 @@ namespace hsql { struct SelectStatement; - enum struct ConstraintType {PRIMARY_KEY, UNIQUE, NOTNULL, NOT_SET, _NULL}; + enum struct ConstraintType { + None, + NotNull, + Null, + PrimaryKey, + Unique + }; // Superclass for both TableConstraint and Column Definition struct TableElement { @@ -37,10 +43,10 @@ namespace hsql { nullable = false; for(unsigned long constraint_index = 0; constraint_index < column_constraints->size(); constraint_index++) { - if(column_constraints->at(constraint_index) == ConstraintType::_NULL) { + if(column_constraints->at(constraint_index) == ConstraintType::Null) { nullable = true; column_constraints->erase(column_constraints->cbegin() + constraint_index); - } else if(column_constraints->at(constraint_index) == ConstraintType::NOTNULL) { + } else if(column_constraints->at(constraint_index) == ConstraintType::NotNull) { column_constraints->erase(column_constraints->cbegin() + constraint_index); } } From 6ab035aae1c422094c9c9c3b881258cb8d94b26c Mon Sep 17 00:00:00 2001 From: mweisgut Date: Thu, 23 Sep 2021 12:13:38 +0200 Subject: [PATCH 63/73] remove comment about standard --- test/queries/queries-bad.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/queries/queries-bad.sql b/test/queries/queries-bad.sql index 70e6ec14..8bd20936 100644 --- a/test/queries/queries-bad.sql +++ b/test/queries/queries-bad.sql @@ -38,4 +38,4 @@ !SELECT * FROM t WHERE a = DATE '2000-01-01' + x DAYS; !SELECT * FROM t WHERE a = DATE '2000-01-01' + INTERVAL 'x' DAY; !SELECT * FROM t WHERE a = DATE '2000-01-01' + INTERVAL '3.3 DAYS'; -!DROP INDEX myindex ON mytable; # ON is not supported by postgres TODO(Mrcl) verify that the standard does not support it and change "postgres" to "the sql standard" +!DROP INDEX myindex ON mytable; # ON is not supported by postgres From 9a81b39949c630bbce1d4f45df6b517b1a9416a9 Mon Sep 17 00:00:00 2001 From: mweisgut Date: Thu, 23 Sep 2021 12:31:46 +0200 Subject: [PATCH 64/73] update comment about ON in DROP INDEX --- test/queries/queries-bad.sql | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/queries/queries-bad.sql b/test/queries/queries-bad.sql index 8bd20936..4dc53aee 100644 --- a/test/queries/queries-bad.sql +++ b/test/queries/queries-bad.sql @@ -38,4 +38,6 @@ !SELECT * FROM t WHERE a = DATE '2000-01-01' + x DAYS; !SELECT * FROM t WHERE a = DATE '2000-01-01' + INTERVAL 'x' DAY; !SELECT * FROM t WHERE a = DATE '2000-01-01' + INTERVAL '3.3 DAYS'; -!DROP INDEX myindex ON mytable; # ON is not supported by postgres +# ON is not supported by postgres. We follow postgres here since the sql-92 standard does not specify index +# implementation details. +!DROP INDEX myindex ON mytable; From a390c6fe64110516a74c85241d0bc3ad93c6a06b Mon Sep 17 00:00:00 2001 From: mweisgut Date: Thu, 23 Sep 2021 12:41:05 +0200 Subject: [PATCH 65/73] formatting --- src/parser/bison_parser.y | 110 +++++++++++++++++++------------------- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 9fc46a9e..ac8d1907 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -196,71 +196,71 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha /********************************* ** Non-Terminal types (http://www.gnu.org/software/bison/manual/html_node/Type-Decl.html) *********************************/ -%type statement_list -%type statement preparable_statement -%type execute_statement -%type transaction_statement -%type prepare_statement -%type select_statement select_with_paren select_no_paren select_clause select_within_set_operation select_within_set_operation_no_parentheses -%type import_statement -%type export_statement -%type create_statement -%type insert_statement -%type delete_statement truncate_statement -%type update_statement -%type drop_statement -%type alter_statement -%type show_statement -%type table_name -%type opt_index_name -%type index_name -%type file_path prepare_target_query -%type opt_not_exists opt_exists opt_distinct opt_all +%type statement_list +%type statement preparable_statement +%type execute_statement +%type transaction_statement +%type prepare_statement +%type select_statement select_with_paren select_no_paren select_clause select_within_set_operation select_within_set_operation_no_parentheses +%type import_statement +%type export_statement +%type create_statement +%type insert_statement +%type delete_statement truncate_statement +%type update_statement +%type drop_statement +%type alter_statement +%type show_statement +%type table_name +%type opt_index_name +%type index_name +%type file_path prepare_target_query +%type opt_not_exists opt_exists opt_distinct opt_all %type opt_decimal_specification %type opt_time_specification -%type opt_join_type -%type
opt_from_clause from_clause table_ref table_ref_atomic table_ref_name nonjoin_table_ref_atomic -%type
join_clause table_ref_name_no_alias -%type expr operand scalar_expr unary_expr binary_expr logic_expr exists_expr extract_expr cast_expr -%type function_expr between_expr expr_alias param_expr -%type column_name literal int_literal num_literal string_literal bool_literal date_literal interval_literal -%type comp_expr opt_where join_condition opt_having case_expr case_list in_expr hint -%type array_expr array_index null_literal -%type opt_limit opt_top -%type order_desc -%type opt_order_type -%type datetime_field datetime_field_plural duration_field -%type column_def -%type table_elem -%type column_type -%type table_constraint -%type update_clause -%type opt_group -%type opt_table_alias table_alias opt_alias alias -%type with_description -%type set_operator set_type -%type column_constraint -%type column_constraint_list -%type opt_column_constraints -%type alter_action -%type drop_action +%type opt_join_type +%type
opt_from_clause from_clause table_ref table_ref_atomic table_ref_name nonjoin_table_ref_atomic +%type
join_clause table_ref_name_no_alias +%type expr operand scalar_expr unary_expr binary_expr logic_expr exists_expr extract_expr cast_expr +%type function_expr between_expr expr_alias param_expr +%type column_name literal int_literal num_literal string_literal bool_literal date_literal interval_literal +%type comp_expr opt_where join_condition opt_having case_expr case_list in_expr hint +%type array_expr array_index null_literal +%type opt_limit opt_top +%type order_desc +%type opt_order_type +%type datetime_field datetime_field_plural duration_field +%type column_def +%type table_elem +%type column_type +%type table_constraint +%type update_clause +%type opt_group +%type opt_table_alias table_alias opt_alias alias +%type with_description +%type set_operator set_type +%type column_constraint +%type column_constraint_list +%type opt_column_constraints +%type alter_action +%type drop_action // ImportType is used for compatibility reasons -%type opt_file_type file_type +%type opt_file_type file_type -%type ident_commalist opt_column_list -%type expr_list select_list opt_literal_list literal_list hint_list opt_hints -%type table_ref_commalist -%type opt_order order_list -%type opt_with_clause with_clause with_description_list -%type update_clause_commalist -%type table_elem_commalist +%type ident_commalist opt_column_list +%type expr_list select_list opt_literal_list literal_list hint_list opt_hints +%type table_ref_commalist +%type opt_order order_list +%type opt_with_clause with_clause with_description_list +%type update_clause_commalist +%type table_elem_commalist /****************************** ** Token Precedence and Associativity ** Precedence: lowest to highest ******************************/ -%left OR +%left OR %left AND %right NOT %nonassoc '=' EQUALS NOTEQUALS LIKE ILIKE From 2ddd374cef0cc79f6e08fcdc8a2cbf6ac5d3af69 Mon Sep 17 00:00:00 2001 From: mweisgut Date: Thu, 23 Sep 2021 13:47:43 +0200 Subject: [PATCH 66/73] formatting --- src/parser/bison_parser.y | 86 +++++++++++++++++++-------------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index ac8d1907..6fec6ff7 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -93,59 +93,59 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha ** Define all data-types (http://www.gnu.org/software/bison/manual/html_node/Union-Decl.html) *********************************/ %union { - double fval; - int64_t ival; - char* sval; + bool bval; + char* sval; + double fval; + int64_t ival; uintmax_t uval; - bool bval; - hsql::SQLStatement* statement; - hsql::SelectStatement* select_stmt; - hsql::ImportStatement* import_stmt; - hsql::ExportStatement* export_stmt; + // statements + hsql::AlterStatement* alter_stmt; hsql::CreateStatement* create_stmt; - hsql::InsertStatement* insert_stmt; hsql::DeleteStatement* delete_stmt; - hsql::UpdateStatement* update_stmt; hsql::DropStatement* drop_stmt; - hsql::AlterStatement* alter_stmt; - hsql::PrepareStatement* prep_stmt; hsql::ExecuteStatement* exec_stmt; + hsql::ExportStatement* export_stmt; + hsql::ImportStatement* import_stmt; + hsql::InsertStatement* insert_stmt; + hsql::PrepareStatement* prep_stmt; + hsql::SelectStatement* select_stmt; hsql::ShowStatement* show_stmt; + hsql::SQLStatement* statement; hsql::TransactionStatement* transaction_stmt; - - hsql::TableName table_name; - hsql::TableRef* table; - hsql::Expr* expr; - hsql::OrderDescription* order; - hsql::OrderType order_type; - hsql::WithDescription* with_description_t; - hsql::DatetimeField datetime_field; - hsql::LimitDescription* limit; - hsql::ColumnDefinition* column_t; - hsql::TableConstraint* table_constraint_t; - hsql::TableElement* table_element_t; - hsql::ConstraintType column_constraint_t; - hsql::ColumnType column_type_t; - hsql::ImportType import_type_t; - hsql::GroupByDescription* group_t; - hsql::UpdateClause* update_t; - hsql::Alias* alias_t; - hsql::SetOperation* set_operator_t; + hsql::UpdateStatement* update_stmt; + + hsql::Alias* alias_t; + hsql::AlterAction* alter_action_t; + hsql::ColumnDefinition* column_t; hsql::ColumnSpecification column_specification_t; - hsql::AlterAction* alter_action_t; - hsql::DropColumnAction* drop_action_t; - - std::vector* stmt_vec; - - std::vector* str_vec; - std::vector* table_vec; - std::vector* update_vec; - std::vector* expr_vec; + hsql::ColumnType column_type_t; + hsql::ConstraintType column_constraint_t; + hsql::DatetimeField datetime_field; + hsql::DropColumnAction* drop_action_t; + hsql::Expr* expr; + hsql::GroupByDescription* group_t; + hsql::ImportType import_type_t; + hsql::LimitDescription* limit; + hsql::OrderDescription* order; + hsql::OrderType order_type; + hsql::SetOperation* set_operator_t; + hsql::TableConstraint* table_constraint_t; + hsql::TableElement* table_element_t; + hsql::TableName table_name; + hsql::TableRef* table; + hsql::UpdateClause* update_t; + hsql::WithDescription* with_description_t; + + std::vector* str_vec; + std::vector* column_constraint_vec; + std::vector* expr_vec; std::vector* order_vec; - std::vector* with_description_vec; - std::vector* table_element_vec; - std::vector* column_constraint_vec; + std::vector* stmt_vec; + std::vector* table_element_vec; + std::vector* table_vec; + std::vector* update_vec; + std::vector* with_description_vec; } From b6fe4b8c3371f5cf9fa0080dfc5fe9c7fcfba549 Mon Sep 17 00:00:00 2001 From: mweisgut Date: Thu, 23 Sep 2021 13:52:36 +0200 Subject: [PATCH 67/73] formatting --- src/parser/flex_lexer.l | 308 ++++++++++++++++++++-------------------- 1 file changed, 154 insertions(+), 154 deletions(-) diff --git a/src/parser/flex_lexer.l b/src/parser/flex_lexer.l index 45f0b654..df79153e 100644 --- a/src/parser/flex_lexer.l +++ b/src/parser/flex_lexer.l @@ -56,170 +56,170 @@ static thread_local std::stringstream strbuf; ***************************/ %% --- BEGIN(COMMENT); -[^\n]* /* skipping comment content until a end of line is read */; -\n BEGIN(INITIAL); +-- BEGIN(COMMENT); +[^\n]* /* skipping comment content until a end of line is read */; +\n BEGIN(INITIAL); -[ \t\n]+ /* skip whitespace */; +[ \t\n]+ /* skip whitespace */; -DEALLOCATE TOKEN(DEALLOCATE) -PARAMETERS TOKEN(PARAMETERS) -INTERSECT TOKEN(INTERSECT) -TEMPORARY TOKEN(TEMPORARY) -TIMESTAMP TOKEN(TIMESTAMP) -DESCRIBE TOKEN(DESCRIBE) -DISTINCT TOKEN(DISTINCT) -NVARCHAR TOKEN(NVARCHAR) -RESTRICT TOKEN(RESTRICT) -TRUNCATE TOKEN(TRUNCATE) -ANALYZE TOKEN(ANALYZE) -BETWEEN TOKEN(BETWEEN) -CASCADE TOKEN(CASCADE) -COLUMNS TOKEN(COLUMNS) -CONTROL TOKEN(CONTROL) -DEFAULT TOKEN(DEFAULT) -EXECUTE TOKEN(EXECUTE) -EXPLAIN TOKEN(EXPLAIN) -INTEGER TOKEN(INTEGER) -NATURAL TOKEN(NATURAL) -PREPARE TOKEN(PREPARE) -PRIMARY TOKEN(PRIMARY) -SCHEMAS TOKEN(SCHEMAS) -SPATIAL TOKEN(SPATIAL) -VARCHAR TOKEN(VARCHAR) +DEALLOCATE TOKEN(DEALLOCATE) +PARAMETERS TOKEN(PARAMETERS) +INTERSECT TOKEN(INTERSECT) +TEMPORARY TOKEN(TEMPORARY) +TIMESTAMP TOKEN(TIMESTAMP) +DESCRIBE TOKEN(DESCRIBE) +DISTINCT TOKEN(DISTINCT) +NVARCHAR TOKEN(NVARCHAR) +RESTRICT TOKEN(RESTRICT) +TRUNCATE TOKEN(TRUNCATE) +ANALYZE TOKEN(ANALYZE) +BETWEEN TOKEN(BETWEEN) +CASCADE TOKEN(CASCADE) +COLUMNS TOKEN(COLUMNS) +CONTROL TOKEN(CONTROL) +DEFAULT TOKEN(DEFAULT) +EXECUTE TOKEN(EXECUTE) +EXPLAIN TOKEN(EXPLAIN) +INTEGER TOKEN(INTEGER) +NATURAL TOKEN(NATURAL) +PREPARE TOKEN(PREPARE) +PRIMARY TOKEN(PRIMARY) +SCHEMAS TOKEN(SCHEMAS) +SPATIAL TOKEN(SPATIAL) +VARCHAR TOKEN(VARCHAR) CHARACTER TOKEN(CHARACTER) VARYING TOKEN(VARYING) TIME TOKEN(TIME) DECIMAL TOKEN(DECIMAL) REAL TOKEN(REAL) -VIRTUAL TOKEN(VIRTUAL) -BEFORE TOKEN(BEFORE) -COLUMN TOKEN(COLUMN) -CREATE TOKEN(CREATE) -DELETE TOKEN(DELETE) -DIRECT TOKEN(DIRECT) -DOUBLE TOKEN(DOUBLE) -ESCAPE TOKEN(ESCAPE) -EXCEPT TOKEN(EXCEPT) -EXISTS TOKEN(EXISTS) -EXTRACT TOKEN(EXTRACT) -CAST TOKEN(CAST) -FORMAT TOKEN(FORMAT) -GLOBAL TOKEN(GLOBAL) -HAVING TOKEN(HAVING) -IMPORT TOKEN(IMPORT) -INSERT TOKEN(INSERT) -ISNULL TOKEN(ISNULL) -OFFSET TOKEN(OFFSET) -RENAME TOKEN(RENAME) -SCHEMA TOKEN(SCHEMA) -SELECT TOKEN(SELECT) -SORTED TOKEN(SORTED) -TABLES TOKEN(TABLES) -UNIQUE TOKEN(UNIQUE) -UNLOAD TOKEN(UNLOAD) -UPDATE TOKEN(UPDATE) -VALUES TOKEN(VALUES) -AFTER TOKEN(AFTER) -ALTER TOKEN(ALTER) -ARRAY TOKEN(ARRAY) -CROSS TOKEN(CROSS) -DELTA TOKEN(DELTA) -FLOAT TOKEN(FLOAT) -GROUP TOKEN(GROUP) -INDEX TOKEN(INDEX) -INNER TOKEN(INNER) -LIMIT TOKEN(LIMIT) -LOCAL TOKEN(LOCAL) -MERGE TOKEN(MERGE) -MINUS TOKEN(MINUS) -ORDER TOKEN(ORDER) -OUTER TOKEN(OUTER) -RIGHT TOKEN(RIGHT) -TABLE TOKEN(TABLE) -UNION TOKEN(UNION) -USING TOKEN(USING) -WHERE TOKEN(WHERE) -CALL TOKEN(CALL) -CASE TOKEN(CASE) -CHAR TOKEN(CHAR) -COPY TOKEN(COPY) -DATE TOKEN(DATE) -DATETIME TOKEN(DATETIME) -DESC TOKEN(DESC) -DROP TOKEN(DROP) -ELSE TOKEN(ELSE) -FILE TOKEN(FILE) -FROM TOKEN(FROM) -FULL TOKEN(FULL) -HASH TOKEN(HASH) -HINT TOKEN(HINT) -INTO TOKEN(INTO) -JOIN TOKEN(JOIN) -LEFT TOKEN(LEFT) -LIKE TOKEN(LIKE) -ILIKE TOKEN(ILIKE) -LOAD TOKEN(LOAD) -LONG TOKEN(LONG) -NULL TOKEN(NULL) -PLAN TOKEN(PLAN) -SHOW TOKEN(SHOW) -TEXT TOKEN(TEXT) -THEN TOKEN(THEN) -TIME TOKEN(TIME) -VIEW TOKEN(VIEW) -WHEN TOKEN(WHEN) -WITH TOKEN(WITH) -ADD TOKEN(ADD) -ALL TOKEN(ALL) -AND TOKEN(AND) -ASC TOKEN(ASC) -END TOKEN(END) -FOR TOKEN(FOR) -INT TOKEN(INT) -KEY TOKEN(KEY) -NOT TOKEN(NOT) -OFF TOKEN(OFF) -SET TOKEN(SET) -TOP TOKEN(TOP) -AS TOKEN(AS) -BY TOKEN(BY) -IF TOKEN(IF) -IN TOKEN(IN) -IS TOKEN(IS) -OF TOKEN(OF) -ON TOKEN(ON) -OR TOKEN(OR) -TO TOKEN(TO) -SECOND TOKEN(SECOND) -MINUTE TOKEN(MINUTE) -HOUR TOKEN(HOUR) -DAY TOKEN(DAY) -MONTH TOKEN(MONTH) -YEAR TOKEN(YEAR) -SECONDS TOKEN(SECONDS) -MINUTES TOKEN(MINUTES) -HOURS TOKEN(HOURS) -DAYS TOKEN(DAYS) -MONTHS TOKEN(MONTHS) -YEARS TOKEN(YEARS) -TRUE TOKEN(TRUE) -FALSE TOKEN(FALSE) +VIRTUAL TOKEN(VIRTUAL) +BEFORE TOKEN(BEFORE) +COLUMN TOKEN(COLUMN) +CREATE TOKEN(CREATE) +DELETE TOKEN(DELETE) +DIRECT TOKEN(DIRECT) +DOUBLE TOKEN(DOUBLE) +ESCAPE TOKEN(ESCAPE) +EXCEPT TOKEN(EXCEPT) +EXISTS TOKEN(EXISTS) +EXTRACT TOKEN(EXTRACT) +CAST TOKEN(CAST) +FORMAT TOKEN(FORMAT) +GLOBAL TOKEN(GLOBAL) +HAVING TOKEN(HAVING) +IMPORT TOKEN(IMPORT) +INSERT TOKEN(INSERT) +ISNULL TOKEN(ISNULL) +OFFSET TOKEN(OFFSET) +RENAME TOKEN(RENAME) +SCHEMA TOKEN(SCHEMA) +SELECT TOKEN(SELECT) +SORTED TOKEN(SORTED) +TABLES TOKEN(TABLES) +UNIQUE TOKEN(UNIQUE) +UNLOAD TOKEN(UNLOAD) +UPDATE TOKEN(UPDATE) +VALUES TOKEN(VALUES) +AFTER TOKEN(AFTER) +ALTER TOKEN(ALTER) +ARRAY TOKEN(ARRAY) +CROSS TOKEN(CROSS) +DELTA TOKEN(DELTA) +FLOAT TOKEN(FLOAT) +GROUP TOKEN(GROUP) +INDEX TOKEN(INDEX) +INNER TOKEN(INNER) +LIMIT TOKEN(LIMIT) +LOCAL TOKEN(LOCAL) +MERGE TOKEN(MERGE) +MINUS TOKEN(MINUS) +ORDER TOKEN(ORDER) +OUTER TOKEN(OUTER) +RIGHT TOKEN(RIGHT) +TABLE TOKEN(TABLE) +UNION TOKEN(UNION) +USING TOKEN(USING) +WHERE TOKEN(WHERE) +CALL TOKEN(CALL) +CASE TOKEN(CASE) +CHAR TOKEN(CHAR) +COPY TOKEN(COPY) +DATE TOKEN(DATE) +DATETIME TOKEN(DATETIME) +DESC TOKEN(DESC) +DROP TOKEN(DROP) +ELSE TOKEN(ELSE) +FILE TOKEN(FILE) +FROM TOKEN(FROM) +FULL TOKEN(FULL) +HASH TOKEN(HASH) +HINT TOKEN(HINT) +INTO TOKEN(INTO) +JOIN TOKEN(JOIN) +LEFT TOKEN(LEFT) +LIKE TOKEN(LIKE) +ILIKE TOKEN(ILIKE) +LOAD TOKEN(LOAD) +LONG TOKEN(LONG) +NULL TOKEN(NULL) +PLAN TOKEN(PLAN) +SHOW TOKEN(SHOW) +TEXT TOKEN(TEXT) +THEN TOKEN(THEN) +TIME TOKEN(TIME) +VIEW TOKEN(VIEW) +WHEN TOKEN(WHEN) +WITH TOKEN(WITH) +ADD TOKEN(ADD) +ALL TOKEN(ALL) +AND TOKEN(AND) +ASC TOKEN(ASC) +END TOKEN(END) +FOR TOKEN(FOR) +INT TOKEN(INT) +KEY TOKEN(KEY) +NOT TOKEN(NOT) +OFF TOKEN(OFF) +SET TOKEN(SET) +TOP TOKEN(TOP) +AS TOKEN(AS) +BY TOKEN(BY) +IF TOKEN(IF) +IN TOKEN(IN) +IS TOKEN(IS) +OF TOKEN(OF) +ON TOKEN(ON) +OR TOKEN(OR) +TO TOKEN(TO) +SECOND TOKEN(SECOND) +MINUTE TOKEN(MINUTE) +HOUR TOKEN(HOUR) +DAY TOKEN(DAY) +MONTH TOKEN(MONTH) +YEAR TOKEN(YEAR) +SECONDS TOKEN(SECONDS) +MINUTES TOKEN(MINUTES) +HOURS TOKEN(HOURS) +DAYS TOKEN(DAYS) +MONTHS TOKEN(MONTHS) +YEARS TOKEN(YEARS) +TRUE TOKEN(TRUE) +FALSE TOKEN(FALSE) TRANSACTION TOKEN(TRANSACTION) -BEGIN TOKEN(BEGIN) -ROLLBACK TOKEN(ROLLBACK) -COMMIT TOKEN(COMMIT) -INTERVAL TOKEN(INTERVAL) +BEGIN TOKEN(BEGIN) +ROLLBACK TOKEN(ROLLBACK) +COMMIT TOKEN(COMMIT) +INTERVAL TOKEN(INTERVAL) - /* Allow =/== see https://sqlite.org/lang_expr.html#collateop */ -"==" TOKEN(EQUALS) -"!=" TOKEN(NOTEQUALS) -"<>" TOKEN(NOTEQUALS) -"<=" TOKEN(LESSEQ) -">=" TOKEN(GREATEREQ) -"||" TOKEN(CONCAT) + /* Allow =/== see https://sqlite.org/lang_expr.html#collateop */ +"==" TOKEN(EQUALS) +"!=" TOKEN(NOTEQUALS) +"<>" TOKEN(NOTEQUALS) +"<=" TOKEN(LESSEQ) +">=" TOKEN(GREATEREQ) +"||" TOKEN(CONCAT) -[-+*/(){},.;<>=^%:?[\]|] { return yytext[0]; } +[-+*/(){},.;<>=^%:?[\]|] { return yytext[0]; } [0-9]+"."[0-9]* | "."[0-9]* { From 1ed4dd28d74024856c7c941a3c9f536d5df3db1e Mon Sep 17 00:00:00 2001 From: mweisgut Date: Mon, 11 Oct 2021 14:33:09 +0200 Subject: [PATCH 68/73] use join_type --- src/parser/bison_parser.cpp | 846 ++++++++++++++++++------------------ src/parser/bison_parser.h | 87 ++-- src/parser/bison_parser.y | 5 +- 3 files changed, 470 insertions(+), 468 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 3acbf237..e67e25c6 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -836,37 +836,37 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 290, 290, 311, 317, 326, 330, 334, 337, 340, - 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, - 365, 366, 371, 372, 376, 380, 392, 395, 398, 404, - 405, 412, 419, 422, 426, 440, 446, 455, 472, 476, - 479, 488, 502, 505, 510, 524, 537, 545, 552, 559, - 570, 571, 575, 576, 580, 581, 585, 592, 593, 594, - 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, - 605, 609, 610, 614, 615, 616, 620, 621, 625, 626, - 629, 630, 631, 632, 636, 637, 648, 654, 660, 666, - 674, 675, 684, 692, 695, 707, 716, 729, 736, 747, - 748, 758, 767, 768, 772, 784, 788, 792, 806, 807, - 810, 811, 822, 823, 827, 837, 850, 857, 861, 865, - 872, 875, 881, 893, 894, 898, 902, 903, 907, 912, - 913, 917, 922, 926, 927, 931, 932, 936, 937, 941, - 945, 946, 947, 953, 954, 958, 959, 960, 961, 962, - 963, 970, 971, 975, 976, 980, 981, 985, 995, 996, - 997, 998, 999, 1003, 1004, 1005, 1006, 1007, 1008, 1009, - 1010, 1011, 1012, 1013, 1017, 1018, 1022, 1023, 1024, 1025, - 1026, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, - 1039, 1040, 1044, 1045, 1049, 1050, 1051, 1052, 1058, 1059, - 1060, 1061, 1065, 1066, 1070, 1071, 1075, 1076, 1077, 1078, - 1079, 1080, 1081, 1085, 1086, 1090, 1094, 1098, 1099, 1100, - 1101, 1102, 1103, 1107, 1108, 1109, 1110, 1111, 1112, 1116, - 1117, 1121, 1125, 1129, 1133, 1134, 1135, 1136, 1140, 1141, - 1142, 1143, 1144, 1145, 1146, 1150, 1154, 1155, 1159, 1160, - 1164, 1168, 1172, 1185, 1186, 1197, 1231, 1243, 1244, 1254, - 1255, 1259, 1260, 1269, 1270, 1275, 1286, 1295, 1296, 1300, - 1301, 1305, 1310, 1311, 1316, 1317, 1322, 1323, 1328, 1329, - 1338, 1339, 1343, 1347, 1351, 1358, 1371, 1379, 1389, 1408, - 1409, 1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1422, - 1431, 1432, 1437, 1438 + 0, 291, 291, 312, 318, 327, 331, 335, 338, 341, + 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, + 366, 367, 372, 373, 377, 381, 393, 396, 399, 405, + 406, 413, 420, 423, 427, 441, 447, 456, 473, 477, + 480, 489, 503, 506, 511, 525, 538, 546, 553, 560, + 571, 572, 576, 577, 581, 582, 586, 593, 594, 595, + 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, + 606, 610, 611, 615, 616, 617, 621, 622, 626, 627, + 630, 631, 632, 633, 637, 638, 649, 655, 661, 667, + 675, 676, 685, 693, 696, 708, 717, 730, 737, 748, + 749, 759, 768, 769, 773, 785, 789, 793, 807, 808, + 811, 812, 823, 824, 828, 838, 851, 858, 862, 866, + 873, 876, 882, 894, 895, 899, 903, 904, 908, 913, + 914, 918, 923, 927, 928, 932, 933, 937, 938, 942, + 946, 947, 948, 954, 955, 959, 960, 961, 962, 963, + 964, 971, 972, 976, 977, 981, 982, 986, 996, 997, + 998, 999, 1000, 1004, 1005, 1006, 1007, 1008, 1009, 1010, + 1011, 1012, 1013, 1014, 1018, 1019, 1023, 1024, 1025, 1026, + 1027, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, + 1040, 1041, 1045, 1046, 1050, 1051, 1052, 1053, 1059, 1060, + 1061, 1062, 1066, 1067, 1071, 1072, 1076, 1077, 1078, 1079, + 1080, 1081, 1082, 1086, 1087, 1091, 1095, 1099, 1100, 1101, + 1102, 1103, 1104, 1108, 1109, 1110, 1111, 1112, 1113, 1117, + 1118, 1122, 1126, 1130, 1134, 1135, 1136, 1137, 1141, 1142, + 1143, 1144, 1145, 1146, 1147, 1151, 1155, 1156, 1160, 1161, + 1165, 1169, 1173, 1186, 1187, 1198, 1232, 1244, 1245, 1255, + 1256, 1260, 1261, 1270, 1271, 1276, 1287, 1296, 1297, 1301, + 1302, 1306, 1311, 1312, 1317, 1318, 1323, 1324, 1329, 1330, + 1339, 1340, 1344, 1348, 1352, 1359, 1372, 1380, 1390, 1409, + 1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1423, + 1432, 1433, 1438, 1439 }; #endif @@ -2002,31 +2002,31 @@ yydestruct (const char *yymsg, switch (yykind) { case YYSYMBOL_IDENTIFIER: /* IDENTIFIER */ -#line 157 "bison_parser.y" +#line 158 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } #line 2008 "bison_parser.cpp" break; case YYSYMBOL_STRING: /* STRING */ -#line 157 "bison_parser.y" +#line 158 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } #line 2014 "bison_parser.cpp" break; case YYSYMBOL_FLOATVAL: /* FLOATVAL */ -#line 155 "bison_parser.y" +#line 156 "bison_parser.y" { } #line 2020 "bison_parser.cpp" break; case YYSYMBOL_INTVAL: /* INTVAL */ -#line 155 "bison_parser.y" +#line 156 "bison_parser.y" { } #line 2026 "bison_parser.cpp" break; case YYSYMBOL_statement_list: /* statement_list */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { if ((((*yyvaluep).stmt_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).stmt_vec))) { @@ -2039,19 +2039,19 @@ yydestruct (const char *yymsg, break; case YYSYMBOL_statement: /* statement */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).statement)); } #line 2045 "bison_parser.cpp" break; case YYSYMBOL_preparable_statement: /* preparable_statement */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).statement)); } #line 2051 "bison_parser.cpp" break; case YYSYMBOL_opt_hints: /* opt_hints */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2064,7 +2064,7 @@ yydestruct (const char *yymsg, break; case YYSYMBOL_hint_list: /* hint_list */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2077,85 +2077,85 @@ yydestruct (const char *yymsg, break; case YYSYMBOL_hint: /* hint */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2083 "bison_parser.cpp" break; case YYSYMBOL_transaction_statement: /* transaction_statement */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).transaction_stmt)); } #line 2089 "bison_parser.cpp" break; case YYSYMBOL_prepare_statement: /* prepare_statement */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).prep_stmt)); } #line 2095 "bison_parser.cpp" break; case YYSYMBOL_prepare_target_query: /* prepare_target_query */ -#line 157 "bison_parser.y" +#line 158 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } #line 2101 "bison_parser.cpp" break; case YYSYMBOL_execute_statement: /* execute_statement */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).exec_stmt)); } #line 2107 "bison_parser.cpp" break; case YYSYMBOL_import_statement: /* import_statement */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).import_stmt)); } #line 2113 "bison_parser.cpp" break; case YYSYMBOL_file_type: /* file_type */ -#line 155 "bison_parser.y" +#line 156 "bison_parser.y" { } #line 2119 "bison_parser.cpp" break; case YYSYMBOL_file_path: /* file_path */ -#line 157 "bison_parser.y" +#line 158 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } #line 2125 "bison_parser.cpp" break; case YYSYMBOL_opt_file_type: /* opt_file_type */ -#line 155 "bison_parser.y" +#line 156 "bison_parser.y" { } #line 2131 "bison_parser.cpp" break; case YYSYMBOL_export_statement: /* export_statement */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).export_stmt)); } #line 2137 "bison_parser.cpp" break; case YYSYMBOL_show_statement: /* show_statement */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).show_stmt)); } #line 2143 "bison_parser.cpp" break; case YYSYMBOL_create_statement: /* create_statement */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).create_stmt)); } #line 2149 "bison_parser.cpp" break; case YYSYMBOL_opt_not_exists: /* opt_not_exists */ -#line 155 "bison_parser.y" +#line 156 "bison_parser.y" { } #line 2155 "bison_parser.cpp" break; case YYSYMBOL_table_elem_commalist: /* table_elem_commalist */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { if ((((*yyvaluep).table_element_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).table_element_vec))) { @@ -2168,109 +2168,109 @@ yydestruct (const char *yymsg, break; case YYSYMBOL_table_elem: /* table_elem */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).table_element_t)); } #line 2174 "bison_parser.cpp" break; case YYSYMBOL_column_def: /* column_def */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).column_t)); } #line 2180 "bison_parser.cpp" break; case YYSYMBOL_column_type: /* column_type */ -#line 155 "bison_parser.y" +#line 156 "bison_parser.y" { } #line 2186 "bison_parser.cpp" break; case YYSYMBOL_opt_time_specification: /* opt_time_specification */ -#line 155 "bison_parser.y" +#line 156 "bison_parser.y" { } #line 2192 "bison_parser.cpp" break; case YYSYMBOL_opt_decimal_specification: /* opt_decimal_specification */ -#line 155 "bison_parser.y" +#line 156 "bison_parser.y" { } #line 2198 "bison_parser.cpp" break; case YYSYMBOL_opt_column_constraints: /* opt_column_constraints */ -#line 155 "bison_parser.y" +#line 156 "bison_parser.y" { } #line 2204 "bison_parser.cpp" break; case YYSYMBOL_column_constraint_list: /* column_constraint_list */ -#line 155 "bison_parser.y" +#line 156 "bison_parser.y" { } #line 2210 "bison_parser.cpp" break; case YYSYMBOL_column_constraint: /* column_constraint */ -#line 155 "bison_parser.y" +#line 156 "bison_parser.y" { } #line 2216 "bison_parser.cpp" break; case YYSYMBOL_table_constraint: /* table_constraint */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).table_constraint_t)); } #line 2222 "bison_parser.cpp" break; case YYSYMBOL_drop_statement: /* drop_statement */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).drop_stmt)); } #line 2228 "bison_parser.cpp" break; case YYSYMBOL_opt_exists: /* opt_exists */ -#line 155 "bison_parser.y" +#line 156 "bison_parser.y" { } #line 2234 "bison_parser.cpp" break; case YYSYMBOL_alter_statement: /* alter_statement */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).alter_stmt)); } #line 2240 "bison_parser.cpp" break; case YYSYMBOL_alter_action: /* alter_action */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).alter_action_t)); } #line 2246 "bison_parser.cpp" break; case YYSYMBOL_drop_action: /* drop_action */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).drop_action_t)); } #line 2252 "bison_parser.cpp" break; case YYSYMBOL_delete_statement: /* delete_statement */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } #line 2258 "bison_parser.cpp" break; case YYSYMBOL_truncate_statement: /* truncate_statement */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } #line 2264 "bison_parser.cpp" break; case YYSYMBOL_insert_statement: /* insert_statement */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).insert_stmt)); } #line 2270 "bison_parser.cpp" break; case YYSYMBOL_opt_column_list: /* opt_column_list */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { if ((((*yyvaluep).str_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).str_vec))) { @@ -2283,13 +2283,13 @@ yydestruct (const char *yymsg, break; case YYSYMBOL_update_statement: /* update_statement */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).update_stmt)); } #line 2289 "bison_parser.cpp" break; case YYSYMBOL_update_clause_commalist: /* update_clause_commalist */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { if ((((*yyvaluep).update_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).update_vec))) { @@ -2302,73 +2302,73 @@ yydestruct (const char *yymsg, break; case YYSYMBOL_update_clause: /* update_clause */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).update_t)); } #line 2308 "bison_parser.cpp" break; case YYSYMBOL_select_statement: /* select_statement */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } #line 2314 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation: /* select_within_set_operation */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } #line 2320 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation_no_parentheses: /* select_within_set_operation_no_parentheses */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } #line 2326 "bison_parser.cpp" break; case YYSYMBOL_select_with_paren: /* select_with_paren */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } #line 2332 "bison_parser.cpp" break; case YYSYMBOL_select_no_paren: /* select_no_paren */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } #line 2338 "bison_parser.cpp" break; case YYSYMBOL_set_operator: /* set_operator */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } #line 2344 "bison_parser.cpp" break; case YYSYMBOL_set_type: /* set_type */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } #line 2350 "bison_parser.cpp" break; case YYSYMBOL_opt_all: /* opt_all */ -#line 155 "bison_parser.y" +#line 156 "bison_parser.y" { } #line 2356 "bison_parser.cpp" break; case YYSYMBOL_select_clause: /* select_clause */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } #line 2362 "bison_parser.cpp" break; case YYSYMBOL_opt_distinct: /* opt_distinct */ -#line 155 "bison_parser.y" +#line 156 "bison_parser.y" { } #line 2368 "bison_parser.cpp" break; case YYSYMBOL_select_list: /* select_list */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2381,37 +2381,37 @@ yydestruct (const char *yymsg, break; case YYSYMBOL_opt_from_clause: /* opt_from_clause */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).table)); } #line 2387 "bison_parser.cpp" break; case YYSYMBOL_from_clause: /* from_clause */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).table)); } #line 2393 "bison_parser.cpp" break; case YYSYMBOL_opt_where: /* opt_where */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2399 "bison_parser.cpp" break; case YYSYMBOL_opt_group: /* opt_group */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).group_t)); } #line 2405 "bison_parser.cpp" break; case YYSYMBOL_opt_having: /* opt_having */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2411 "bison_parser.cpp" break; case YYSYMBOL_opt_order: /* opt_order */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { if ((((*yyvaluep).order_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).order_vec))) { @@ -2424,7 +2424,7 @@ yydestruct (const char *yymsg, break; case YYSYMBOL_order_list: /* order_list */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { if ((((*yyvaluep).order_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).order_vec))) { @@ -2437,31 +2437,31 @@ yydestruct (const char *yymsg, break; case YYSYMBOL_order_desc: /* order_desc */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).order)); } #line 2443 "bison_parser.cpp" break; case YYSYMBOL_opt_order_type: /* opt_order_type */ -#line 155 "bison_parser.y" +#line 156 "bison_parser.y" { } #line 2449 "bison_parser.cpp" break; case YYSYMBOL_opt_top: /* opt_top */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).limit)); } #line 2455 "bison_parser.cpp" break; case YYSYMBOL_opt_limit: /* opt_limit */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).limit)); } #line 2461 "bison_parser.cpp" break; case YYSYMBOL_expr_list: /* expr_list */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2474,7 +2474,7 @@ yydestruct (const char *yymsg, break; case YYSYMBOL_opt_literal_list: /* opt_literal_list */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2487,7 +2487,7 @@ yydestruct (const char *yymsg, break; case YYSYMBOL_literal_list: /* literal_list */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2500,211 +2500,211 @@ yydestruct (const char *yymsg, break; case YYSYMBOL_expr_alias: /* expr_alias */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2506 "bison_parser.cpp" break; case YYSYMBOL_expr: /* expr */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2512 "bison_parser.cpp" break; case YYSYMBOL_operand: /* operand */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2518 "bison_parser.cpp" break; case YYSYMBOL_scalar_expr: /* scalar_expr */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2524 "bison_parser.cpp" break; case YYSYMBOL_unary_expr: /* unary_expr */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2530 "bison_parser.cpp" break; case YYSYMBOL_binary_expr: /* binary_expr */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2536 "bison_parser.cpp" break; case YYSYMBOL_logic_expr: /* logic_expr */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2542 "bison_parser.cpp" break; case YYSYMBOL_in_expr: /* in_expr */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2548 "bison_parser.cpp" break; case YYSYMBOL_case_expr: /* case_expr */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2554 "bison_parser.cpp" break; case YYSYMBOL_case_list: /* case_list */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2560 "bison_parser.cpp" break; case YYSYMBOL_exists_expr: /* exists_expr */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2566 "bison_parser.cpp" break; case YYSYMBOL_comp_expr: /* comp_expr */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2572 "bison_parser.cpp" break; case YYSYMBOL_function_expr: /* function_expr */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2578 "bison_parser.cpp" break; case YYSYMBOL_extract_expr: /* extract_expr */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2584 "bison_parser.cpp" break; case YYSYMBOL_cast_expr: /* cast_expr */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2590 "bison_parser.cpp" break; case YYSYMBOL_datetime_field: /* datetime_field */ -#line 155 "bison_parser.y" +#line 156 "bison_parser.y" { } #line 2596 "bison_parser.cpp" break; case YYSYMBOL_datetime_field_plural: /* datetime_field_plural */ -#line 155 "bison_parser.y" +#line 156 "bison_parser.y" { } #line 2602 "bison_parser.cpp" break; case YYSYMBOL_duration_field: /* duration_field */ -#line 155 "bison_parser.y" +#line 156 "bison_parser.y" { } #line 2608 "bison_parser.cpp" break; case YYSYMBOL_array_expr: /* array_expr */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2614 "bison_parser.cpp" break; case YYSYMBOL_array_index: /* array_index */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2620 "bison_parser.cpp" break; case YYSYMBOL_between_expr: /* between_expr */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2626 "bison_parser.cpp" break; case YYSYMBOL_column_name: /* column_name */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2632 "bison_parser.cpp" break; case YYSYMBOL_literal: /* literal */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2638 "bison_parser.cpp" break; case YYSYMBOL_string_literal: /* string_literal */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2644 "bison_parser.cpp" break; case YYSYMBOL_bool_literal: /* bool_literal */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2650 "bison_parser.cpp" break; case YYSYMBOL_num_literal: /* num_literal */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2656 "bison_parser.cpp" break; case YYSYMBOL_int_literal: /* int_literal */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2662 "bison_parser.cpp" break; case YYSYMBOL_null_literal: /* null_literal */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2668 "bison_parser.cpp" break; case YYSYMBOL_date_literal: /* date_literal */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2674 "bison_parser.cpp" break; case YYSYMBOL_interval_literal: /* interval_literal */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2680 "bison_parser.cpp" break; case YYSYMBOL_param_expr: /* param_expr */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2686 "bison_parser.cpp" break; case YYSYMBOL_table_ref: /* table_ref */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).table)); } #line 2692 "bison_parser.cpp" break; case YYSYMBOL_table_ref_atomic: /* table_ref_atomic */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).table)); } #line 2698 "bison_parser.cpp" break; case YYSYMBOL_nonjoin_table_ref_atomic: /* nonjoin_table_ref_atomic */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).table)); } #line 2704 "bison_parser.cpp" break; case YYSYMBOL_table_ref_commalist: /* table_ref_commalist */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { if ((((*yyvaluep).table_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).table_vec))) { @@ -2717,103 +2717,103 @@ yydestruct (const char *yymsg, break; case YYSYMBOL_table_ref_name: /* table_ref_name */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).table)); } #line 2723 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name_no_alias: /* table_ref_name_no_alias */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).table)); } #line 2729 "bison_parser.cpp" break; case YYSYMBOL_table_name: /* table_name */ -#line 156 "bison_parser.y" +#line 157 "bison_parser.y" { free( (((*yyvaluep).table_name).name) ); free( (((*yyvaluep).table_name).schema) ); } #line 2735 "bison_parser.cpp" break; case YYSYMBOL_opt_index_name: /* opt_index_name */ -#line 157 "bison_parser.y" +#line 158 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } #line 2741 "bison_parser.cpp" break; case YYSYMBOL_index_name: /* index_name */ -#line 157 "bison_parser.y" +#line 158 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } #line 2747 "bison_parser.cpp" break; case YYSYMBOL_table_alias: /* table_alias */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } #line 2753 "bison_parser.cpp" break; case YYSYMBOL_opt_table_alias: /* opt_table_alias */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } #line 2759 "bison_parser.cpp" break; case YYSYMBOL_alias: /* alias */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } #line 2765 "bison_parser.cpp" break; case YYSYMBOL_opt_alias: /* opt_alias */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } #line 2771 "bison_parser.cpp" break; case YYSYMBOL_opt_with_clause: /* opt_with_clause */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } #line 2777 "bison_parser.cpp" break; case YYSYMBOL_with_clause: /* with_clause */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } #line 2783 "bison_parser.cpp" break; case YYSYMBOL_with_description_list: /* with_description_list */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } #line 2789 "bison_parser.cpp" break; case YYSYMBOL_with_description: /* with_description */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).with_description_t)); } #line 2795 "bison_parser.cpp" break; case YYSYMBOL_join_clause: /* join_clause */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).table)); } #line 2801 "bison_parser.cpp" break; case YYSYMBOL_opt_join_type: /* opt_join_type */ -#line 155 "bison_parser.y" +#line 156 "bison_parser.y" { } #line 2807 "bison_parser.cpp" break; case YYSYMBOL_join_condition: /* join_condition */ -#line 166 "bison_parser.y" +#line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } #line 2813 "bison_parser.cpp" break; case YYSYMBOL_ident_commalist: /* ident_commalist */ -#line 158 "bison_parser.y" +#line 159 "bison_parser.y" { if ((((*yyvaluep).str_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).str_vec))) { @@ -3141,7 +3141,7 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* input: statement_list opt_semicolon */ -#line 290 "bison_parser.y" +#line 291 "bison_parser.y" { for (SQLStatement* stmt : *(yyvsp[-1].stmt_vec)) { // Transfers ownership of the statement. @@ -3163,7 +3163,7 @@ YYLTYPE yylloc = yyloc_default; break; case 3: /* statement_list: statement */ -#line 311 "bison_parser.y" +#line 312 "bison_parser.y" { (yyvsp[0].statement)->stringLength = yylloc.string_length; yylloc.string_length = 0; @@ -3174,7 +3174,7 @@ YYLTYPE yylloc = yyloc_default; break; case 4: /* statement_list: statement_list ';' statement */ -#line 317 "bison_parser.y" +#line 318 "bison_parser.y" { (yyvsp[0].statement)->stringLength = yylloc.string_length; yylloc.string_length = 0; @@ -3185,7 +3185,7 @@ YYLTYPE yylloc = yyloc_default; break; case 5: /* statement: prepare_statement opt_hints */ -#line 326 "bison_parser.y" +#line 327 "bison_parser.y" { (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); @@ -3194,7 +3194,7 @@ YYLTYPE yylloc = yyloc_default; break; case 6: /* statement: preparable_statement opt_hints */ -#line 330 "bison_parser.y" +#line 331 "bison_parser.y" { (yyval.statement) = (yyvsp[-1].statement); (yyval.statement)->hints = (yyvsp[0].expr_vec); @@ -3203,7 +3203,7 @@ YYLTYPE yylloc = yyloc_default; break; case 7: /* statement: show_statement */ -#line 334 "bison_parser.y" +#line 335 "bison_parser.y" { (yyval.statement) = (yyvsp[0].show_stmt); } @@ -3211,7 +3211,7 @@ YYLTYPE yylloc = yyloc_default; break; case 8: /* statement: import_statement */ -#line 337 "bison_parser.y" +#line 338 "bison_parser.y" { (yyval.statement) = (yyvsp[0].import_stmt); } @@ -3219,7 +3219,7 @@ YYLTYPE yylloc = yyloc_default; break; case 9: /* statement: export_statement */ -#line 340 "bison_parser.y" +#line 341 "bison_parser.y" { (yyval.statement) = (yyvsp[0].export_stmt); } @@ -3227,91 +3227,91 @@ YYLTYPE yylloc = yyloc_default; break; case 10: /* preparable_statement: select_statement */ -#line 347 "bison_parser.y" +#line 348 "bison_parser.y" { (yyval.statement) = (yyvsp[0].select_stmt); } #line 3233 "bison_parser.cpp" break; case 11: /* preparable_statement: create_statement */ -#line 348 "bison_parser.y" +#line 349 "bison_parser.y" { (yyval.statement) = (yyvsp[0].create_stmt); } #line 3239 "bison_parser.cpp" break; case 12: /* preparable_statement: insert_statement */ -#line 349 "bison_parser.y" +#line 350 "bison_parser.y" { (yyval.statement) = (yyvsp[0].insert_stmt); } #line 3245 "bison_parser.cpp" break; case 13: /* preparable_statement: delete_statement */ -#line 350 "bison_parser.y" +#line 351 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } #line 3251 "bison_parser.cpp" break; case 14: /* preparable_statement: truncate_statement */ -#line 351 "bison_parser.y" +#line 352 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } #line 3257 "bison_parser.cpp" break; case 15: /* preparable_statement: update_statement */ -#line 352 "bison_parser.y" +#line 353 "bison_parser.y" { (yyval.statement) = (yyvsp[0].update_stmt); } #line 3263 "bison_parser.cpp" break; case 16: /* preparable_statement: drop_statement */ -#line 353 "bison_parser.y" +#line 354 "bison_parser.y" { (yyval.statement) = (yyvsp[0].drop_stmt); } #line 3269 "bison_parser.cpp" break; case 17: /* preparable_statement: alter_statement */ -#line 354 "bison_parser.y" +#line 355 "bison_parser.y" { (yyval.statement) = (yyvsp[0].alter_stmt); } #line 3275 "bison_parser.cpp" break; case 18: /* preparable_statement: execute_statement */ -#line 355 "bison_parser.y" +#line 356 "bison_parser.y" { (yyval.statement) = (yyvsp[0].exec_stmt); } #line 3281 "bison_parser.cpp" break; case 19: /* preparable_statement: transaction_statement */ -#line 356 "bison_parser.y" +#line 357 "bison_parser.y" { (yyval.statement) = (yyvsp[0].transaction_stmt); } #line 3287 "bison_parser.cpp" break; case 20: /* opt_hints: WITH HINT '(' hint_list ')' */ -#line 365 "bison_parser.y" +#line 366 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } #line 3293 "bison_parser.cpp" break; case 21: /* opt_hints: %empty */ -#line 366 "bison_parser.y" +#line 367 "bison_parser.y" { (yyval.expr_vec) = nullptr; } #line 3299 "bison_parser.cpp" break; case 22: /* hint_list: hint */ -#line 371 "bison_parser.y" +#line 372 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } #line 3305 "bison_parser.cpp" break; case 23: /* hint_list: hint_list ',' hint */ -#line 372 "bison_parser.y" +#line 373 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } #line 3311 "bison_parser.cpp" break; case 24: /* hint: IDENTIFIER */ -#line 376 "bison_parser.y" +#line 377 "bison_parser.y" { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[0].sval); @@ -3320,7 +3320,7 @@ YYLTYPE yylloc = yyloc_default; break; case 25: /* hint: IDENTIFIER '(' literal_list ')' */ -#line 380 "bison_parser.y" +#line 381 "bison_parser.y" { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[-3].sval); @@ -3330,7 +3330,7 @@ YYLTYPE yylloc = yyloc_default; break; case 26: /* transaction_statement: BEGIN opt_transaction_keyword */ -#line 392 "bison_parser.y" +#line 393 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kBeginTransaction); } @@ -3338,7 +3338,7 @@ YYLTYPE yylloc = yyloc_default; break; case 27: /* transaction_statement: ROLLBACK opt_transaction_keyword */ -#line 395 "bison_parser.y" +#line 396 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kRollbackTransaction); } @@ -3346,7 +3346,7 @@ YYLTYPE yylloc = yyloc_default; break; case 28: /* transaction_statement: COMMIT opt_transaction_keyword */ -#line 398 "bison_parser.y" +#line 399 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kCommitTransaction); } @@ -3354,7 +3354,7 @@ YYLTYPE yylloc = yyloc_default; break; case 31: /* prepare_statement: PREPARE IDENTIFIER FROM prepare_target_query */ -#line 412 "bison_parser.y" +#line 413 "bison_parser.y" { (yyval.prep_stmt) = new PrepareStatement(); (yyval.prep_stmt)->name = (yyvsp[-2].sval); @@ -3364,7 +3364,7 @@ YYLTYPE yylloc = yyloc_default; break; case 33: /* execute_statement: EXECUTE IDENTIFIER */ -#line 422 "bison_parser.y" +#line 423 "bison_parser.y" { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[0].sval); @@ -3373,7 +3373,7 @@ YYLTYPE yylloc = yyloc_default; break; case 34: /* execute_statement: EXECUTE IDENTIFIER '(' opt_literal_list ')' */ -#line 426 "bison_parser.y" +#line 427 "bison_parser.y" { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[-3].sval); @@ -3383,7 +3383,7 @@ YYLTYPE yylloc = yyloc_default; break; case 35: /* import_statement: IMPORT FROM file_type FILE file_path INTO table_name */ -#line 440 "bison_parser.y" +#line 441 "bison_parser.y" { (yyval.import_stmt) = new ImportStatement((yyvsp[-4].import_type_t)); (yyval.import_stmt)->filePath = (yyvsp[-2].sval); @@ -3394,7 +3394,7 @@ YYLTYPE yylloc = yyloc_default; break; case 36: /* import_statement: COPY table_name FROM file_path opt_file_type */ -#line 446 "bison_parser.y" +#line 447 "bison_parser.y" { (yyval.import_stmt) = new ImportStatement((yyvsp[0].import_type_t)); (yyval.import_stmt)->filePath = (yyvsp[-1].sval); @@ -3405,7 +3405,7 @@ YYLTYPE yylloc = yyloc_default; break; case 37: /* file_type: IDENTIFIER */ -#line 455 "bison_parser.y" +#line 456 "bison_parser.y" { if (strcasecmp((yyvsp[0].sval), "csv") == 0) { (yyval.import_type_t) = kImportCSV; @@ -3424,13 +3424,13 @@ YYLTYPE yylloc = yyloc_default; break; case 38: /* file_path: string_literal */ -#line 472 "bison_parser.y" +#line 473 "bison_parser.y" { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } #line 3430 "bison_parser.cpp" break; case 39: /* opt_file_type: WITH FORMAT file_type */ -#line 476 "bison_parser.y" +#line 477 "bison_parser.y" { (yyval.import_type_t) = (yyvsp[0].import_type_t); } @@ -3438,13 +3438,13 @@ YYLTYPE yylloc = yyloc_default; break; case 40: /* opt_file_type: %empty */ -#line 479 "bison_parser.y" +#line 480 "bison_parser.y" { (yyval.import_type_t) = kImportAuto; } #line 3444 "bison_parser.cpp" break; case 41: /* export_statement: COPY table_name TO file_path opt_file_type */ -#line 488 "bison_parser.y" +#line 489 "bison_parser.y" { (yyval.export_stmt) = new ExportStatement((yyvsp[0].import_type_t)); (yyval.export_stmt)->filePath = (yyvsp[-1].sval); @@ -3455,7 +3455,7 @@ YYLTYPE yylloc = yyloc_default; break; case 42: /* show_statement: SHOW TABLES */ -#line 502 "bison_parser.y" +#line 503 "bison_parser.y" { (yyval.show_stmt) = new ShowStatement(kShowTables); } @@ -3463,7 +3463,7 @@ YYLTYPE yylloc = yyloc_default; break; case 43: /* show_statement: SHOW COLUMNS table_name */ -#line 505 "bison_parser.y" +#line 506 "bison_parser.y" { (yyval.show_stmt) = new ShowStatement(kShowColumns); (yyval.show_stmt)->schema = (yyvsp[0].table_name).schema; @@ -3473,7 +3473,7 @@ YYLTYPE yylloc = yyloc_default; break; case 44: /* show_statement: DESCRIBE table_name */ -#line 510 "bison_parser.y" +#line 511 "bison_parser.y" { (yyval.show_stmt) = new ShowStatement(kShowColumns); (yyval.show_stmt)->schema = (yyvsp[0].table_name).schema; @@ -3483,7 +3483,7 @@ YYLTYPE yylloc = yyloc_default; break; case 45: /* create_statement: CREATE TABLE opt_not_exists table_name FROM IDENTIFIER FILE file_path */ -#line 524 "bison_parser.y" +#line 525 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTableFromTbl); (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); @@ -3501,7 +3501,7 @@ YYLTYPE yylloc = yyloc_default; break; case 46: /* create_statement: CREATE TABLE opt_not_exists table_name '(' table_elem_commalist ')' */ -#line 537 "bison_parser.y" +#line 538 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -3514,7 +3514,7 @@ YYLTYPE yylloc = yyloc_default; break; case 47: /* create_statement: CREATE TABLE opt_not_exists table_name AS select_statement */ -#line 545 "bison_parser.y" +#line 546 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-3].bval); @@ -3526,7 +3526,7 @@ YYLTYPE yylloc = yyloc_default; break; case 48: /* create_statement: CREATE INDEX opt_not_exists opt_index_name ON table_name '(' ident_commalist ')' */ -#line 552 "bison_parser.y" +#line 553 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateIndex); (yyval.create_stmt)->indexName = (yyvsp[-5].sval); @@ -3538,7 +3538,7 @@ YYLTYPE yylloc = yyloc_default; break; case 49: /* create_statement: CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement */ -#line 559 "bison_parser.y" +#line 560 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateView); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -3551,43 +3551,43 @@ YYLTYPE yylloc = yyloc_default; break; case 50: /* opt_not_exists: IF NOT EXISTS */ -#line 570 "bison_parser.y" +#line 571 "bison_parser.y" { (yyval.bval) = true; } #line 3557 "bison_parser.cpp" break; case 51: /* opt_not_exists: %empty */ -#line 571 "bison_parser.y" +#line 572 "bison_parser.y" { (yyval.bval) = false; } #line 3563 "bison_parser.cpp" break; case 52: /* table_elem_commalist: table_elem */ -#line 575 "bison_parser.y" +#line 576 "bison_parser.y" { (yyval.table_element_vec) = new std::vector(); (yyval.table_element_vec)->push_back((yyvsp[0].table_element_t)); } #line 3569 "bison_parser.cpp" break; case 53: /* table_elem_commalist: table_elem_commalist ',' table_elem */ -#line 576 "bison_parser.y" +#line 577 "bison_parser.y" { (yyvsp[-2].table_element_vec)->push_back((yyvsp[0].table_element_t)); (yyval.table_element_vec) = (yyvsp[-2].table_element_vec); } #line 3575 "bison_parser.cpp" break; case 54: /* table_elem: column_def */ -#line 580 "bison_parser.y" +#line 581 "bison_parser.y" { (yyval.table_element_t) = (yyvsp[0].column_t); } #line 3581 "bison_parser.cpp" break; case 55: /* table_elem: table_constraint */ -#line 581 "bison_parser.y" +#line 582 "bison_parser.y" { (yyval.table_element_t) = (yyvsp[0].table_constraint_t); } #line 3587 "bison_parser.cpp" break; case 56: /* column_def: IDENTIFIER column_type opt_column_constraints */ -#line 585 "bison_parser.y" +#line 586 "bison_parser.y" { (yyval.column_t) = new ColumnDefinition((yyvsp[-2].sval), (yyvsp[-1].column_type_t), (yyvsp[0].column_constraint_vec)); (yyval.column_t)->setNullableExplicit(); @@ -3596,181 +3596,181 @@ YYLTYPE yylloc = yyloc_default; break; case 57: /* column_type: INT */ -#line 592 "bison_parser.y" +#line 593 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } #line 3602 "bison_parser.cpp" break; case 58: /* column_type: INTEGER */ -#line 593 "bison_parser.y" +#line 594 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } #line 3608 "bison_parser.cpp" break; case 59: /* column_type: LONG */ -#line 594 "bison_parser.y" +#line 595 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::LONG}; } #line 3614 "bison_parser.cpp" break; case 60: /* column_type: FLOAT */ -#line 595 "bison_parser.y" +#line 596 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } #line 3620 "bison_parser.cpp" break; case 61: /* column_type: DECIMAL opt_decimal_specification */ -#line 596 "bison_parser.y" +#line 597 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DECIMAL, 0, (yyvsp[0].column_specification_t)}; } #line 3626 "bison_parser.cpp" break; case 62: /* column_type: DOUBLE */ -#line 597 "bison_parser.y" +#line 598 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } #line 3632 "bison_parser.cpp" break; case 63: /* column_type: REAL */ -#line 598 "bison_parser.y" +#line 599 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::REAL}; } #line 3638 "bison_parser.cpp" break; case 64: /* column_type: VARCHAR '(' INTVAL ')' */ -#line 599 "bison_parser.y" +#line 600 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } #line 3644 "bison_parser.cpp" break; case 65: /* column_type: CHARACTER VARYING '(' INTVAL ')' */ -#line 600 "bison_parser.y" +#line 601 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR_VARYING, (yyvsp[-1].ival)}; } #line 3650 "bison_parser.cpp" break; case 66: /* column_type: CHAR '(' INTVAL ')' */ -#line 601 "bison_parser.y" +#line 602 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } #line 3656 "bison_parser.cpp" break; case 67: /* column_type: TEXT */ -#line 602 "bison_parser.y" +#line 603 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } #line 3662 "bison_parser.cpp" break; case 68: /* column_type: TIME opt_time_specification */ -#line 603 "bison_parser.y" +#line 604 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TIME, 0, (yyvsp[0].column_specification_t) }; } #line 3668 "bison_parser.cpp" break; case 69: /* column_type: DATETIME */ -#line 604 "bison_parser.y" +#line 605 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } #line 3674 "bison_parser.cpp" break; case 70: /* column_type: DATE */ -#line 605 "bison_parser.y" +#line 606 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATE}; } #line 3680 "bison_parser.cpp" break; case 71: /* opt_time_specification: '(' INTVAL ')' */ -#line 609 "bison_parser.y" +#line 610 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-1].ival)}; } #line 3686 "bison_parser.cpp" break; case 72: /* opt_time_specification: %empty */ -#line 610 "bison_parser.y" +#line 611 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{}; } #line 3692 "bison_parser.cpp" break; case 73: /* opt_decimal_specification: '(' INTVAL ',' INTVAL ')' */ -#line 614 "bison_parser.y" +#line 615 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-3].ival), (yyvsp[-1].ival)}; } #line 3698 "bison_parser.cpp" break; case 74: /* opt_decimal_specification: '(' INTVAL ')' */ -#line 615 "bison_parser.y" +#line 616 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-1].ival)}; } #line 3704 "bison_parser.cpp" break; case 75: /* opt_decimal_specification: %empty */ -#line 616 "bison_parser.y" +#line 617 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{}; } #line 3710 "bison_parser.cpp" break; case 76: /* opt_column_constraints: column_constraint_list */ -#line 620 "bison_parser.y" +#line 621 "bison_parser.y" { (yyval.column_constraint_vec) = (yyvsp[0].column_constraint_vec); } #line 3716 "bison_parser.cpp" break; case 77: /* opt_column_constraints: %empty */ -#line 621 "bison_parser.y" +#line 622 "bison_parser.y" { (yyval.column_constraint_vec) = new std::vector(); } #line 3722 "bison_parser.cpp" break; case 78: /* column_constraint_list: column_constraint */ -#line 625 "bison_parser.y" +#line 626 "bison_parser.y" { (yyval.column_constraint_vec) = new std::vector(); (yyval.column_constraint_vec)->push_back((yyvsp[0].column_constraint_t)); } #line 3728 "bison_parser.cpp" break; case 79: /* column_constraint_list: column_constraint_list column_constraint */ -#line 626 "bison_parser.y" +#line 627 "bison_parser.y" { (yyvsp[-1].column_constraint_vec)->push_back((yyvsp[0].column_constraint_t)); (yyval.column_constraint_vec) = (yyvsp[-1].column_constraint_vec); } #line 3734 "bison_parser.cpp" break; case 80: /* column_constraint: PRIMARY KEY */ -#line 629 "bison_parser.y" +#line 630 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::PrimaryKey; } #line 3740 "bison_parser.cpp" break; case 81: /* column_constraint: UNIQUE */ -#line 630 "bison_parser.y" +#line 631 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::Unique; } #line 3746 "bison_parser.cpp" break; case 82: /* column_constraint: NULL */ -#line 631 "bison_parser.y" +#line 632 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::Null; } #line 3752 "bison_parser.cpp" break; case 83: /* column_constraint: NOT NULL */ -#line 632 "bison_parser.y" +#line 633 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::NotNull; } #line 3758 "bison_parser.cpp" break; case 84: /* table_constraint: PRIMARY KEY '(' ident_commalist ')' */ -#line 636 "bison_parser.y" +#line 637 "bison_parser.y" { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::PrimaryKey, (yyvsp[-1].str_vec)); } #line 3764 "bison_parser.cpp" break; case 85: /* table_constraint: UNIQUE '(' ident_commalist ')' */ -#line 637 "bison_parser.y" +#line 638 "bison_parser.y" { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::Unique, (yyvsp[-1].str_vec)); } #line 3770 "bison_parser.cpp" break; case 86: /* drop_statement: DROP TABLE opt_exists table_name */ -#line 648 "bison_parser.y" +#line 649 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropTable); (yyval.drop_stmt)->ifExists = (yyvsp[-1].bval); @@ -3781,7 +3781,7 @@ YYLTYPE yylloc = yyloc_default; break; case 87: /* drop_statement: DROP VIEW opt_exists table_name */ -#line 654 "bison_parser.y" +#line 655 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropView); (yyval.drop_stmt)->ifExists = (yyvsp[-1].bval); @@ -3792,7 +3792,7 @@ YYLTYPE yylloc = yyloc_default; break; case 88: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ -#line 660 "bison_parser.y" +#line 661 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); (yyval.drop_stmt)->ifExists = false; @@ -3802,7 +3802,7 @@ YYLTYPE yylloc = yyloc_default; break; case 89: /* drop_statement: DROP INDEX opt_exists index_name */ -#line 666 "bison_parser.y" +#line 667 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropIndex); (yyval.drop_stmt)->ifExists = (yyvsp[-1].bval); @@ -3812,19 +3812,19 @@ YYLTYPE yylloc = yyloc_default; break; case 90: /* opt_exists: IF EXISTS */ -#line 674 "bison_parser.y" +#line 675 "bison_parser.y" { (yyval.bval) = true; } #line 3818 "bison_parser.cpp" break; case 91: /* opt_exists: %empty */ -#line 675 "bison_parser.y" +#line 676 "bison_parser.y" { (yyval.bval) = false; } #line 3824 "bison_parser.cpp" break; case 92: /* alter_statement: ALTER TABLE opt_exists table_name alter_action */ -#line 684 "bison_parser.y" +#line 685 "bison_parser.y" { (yyval.alter_stmt) = new AlterStatement((yyvsp[-1].table_name).name, (yyvsp[0].alter_action_t)); (yyval.alter_stmt)->ifTableExists = (yyvsp[-2].bval); @@ -3834,13 +3834,13 @@ YYLTYPE yylloc = yyloc_default; break; case 93: /* alter_action: drop_action */ -#line 692 "bison_parser.y" +#line 693 "bison_parser.y" {(yyval.alter_action_t) = (yyvsp[0].drop_action_t);} #line 3840 "bison_parser.cpp" break; case 94: /* drop_action: DROP COLUMN opt_exists IDENTIFIER */ -#line 695 "bison_parser.y" +#line 696 "bison_parser.y" { (yyval.drop_action_t) = new DropColumnAction((yyvsp[0].sval)); (yyval.drop_action_t)->ifExists = (yyvsp[-1].bval); @@ -3849,7 +3849,7 @@ YYLTYPE yylloc = yyloc_default; break; case 95: /* delete_statement: DELETE FROM table_name opt_where */ -#line 707 "bison_parser.y" +#line 708 "bison_parser.y" { (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->schema = (yyvsp[-1].table_name).schema; @@ -3860,7 +3860,7 @@ YYLTYPE yylloc = yyloc_default; break; case 96: /* truncate_statement: TRUNCATE table_name */ -#line 716 "bison_parser.y" +#line 717 "bison_parser.y" { (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; @@ -3870,7 +3870,7 @@ YYLTYPE yylloc = yyloc_default; break; case 97: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ -#line 729 "bison_parser.y" +#line 730 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertValues); (yyval.insert_stmt)->schema = (yyvsp[-5].table_name).schema; @@ -3882,7 +3882,7 @@ YYLTYPE yylloc = yyloc_default; break; case 98: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ -#line 736 "bison_parser.y" +#line 737 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertSelect); (yyval.insert_stmt)->schema = (yyvsp[-2].table_name).schema; @@ -3894,19 +3894,19 @@ YYLTYPE yylloc = yyloc_default; break; case 99: /* opt_column_list: '(' ident_commalist ')' */ -#line 747 "bison_parser.y" +#line 748 "bison_parser.y" { (yyval.str_vec) = (yyvsp[-1].str_vec); } #line 3900 "bison_parser.cpp" break; case 100: /* opt_column_list: %empty */ -#line 748 "bison_parser.y" +#line 749 "bison_parser.y" { (yyval.str_vec) = nullptr; } #line 3906 "bison_parser.cpp" break; case 101: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ -#line 758 "bison_parser.y" +#line 759 "bison_parser.y" { (yyval.update_stmt) = new UpdateStatement(); (yyval.update_stmt)->table = (yyvsp[-3].table); @@ -3917,19 +3917,19 @@ YYLTYPE yylloc = yyloc_default; break; case 102: /* update_clause_commalist: update_clause */ -#line 767 "bison_parser.y" +#line 768 "bison_parser.y" { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } #line 3923 "bison_parser.cpp" break; case 103: /* update_clause_commalist: update_clause_commalist ',' update_clause */ -#line 768 "bison_parser.y" +#line 769 "bison_parser.y" { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } #line 3929 "bison_parser.cpp" break; case 104: /* update_clause: IDENTIFIER '=' expr */ -#line 772 "bison_parser.y" +#line 773 "bison_parser.y" { (yyval.update_t) = new UpdateClause(); (yyval.update_t)->column = (yyvsp[-2].sval); @@ -3939,7 +3939,7 @@ YYLTYPE yylloc = yyloc_default; break; case 105: /* select_statement: opt_with_clause select_with_paren */ -#line 784 "bison_parser.y" +#line 785 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); @@ -3948,7 +3948,7 @@ YYLTYPE yylloc = yyloc_default; break; case 106: /* select_statement: opt_with_clause select_no_paren */ -#line 788 "bison_parser.y" +#line 789 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); @@ -3957,7 +3957,7 @@ YYLTYPE yylloc = yyloc_default; break; case 107: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ -#line 792 "bison_parser.y" +#line 793 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3973,13 +3973,13 @@ YYLTYPE yylloc = yyloc_default; break; case 110: /* select_within_set_operation_no_parentheses: select_clause */ -#line 810 "bison_parser.y" +#line 811 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); } #line 3979 "bison_parser.cpp" break; case 111: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ -#line 811 "bison_parser.y" +#line 812 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3992,19 +3992,19 @@ YYLTYPE yylloc = yyloc_default; break; case 112: /* select_with_paren: '(' select_no_paren ')' */ -#line 822 "bison_parser.y" +#line 823 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } #line 3998 "bison_parser.cpp" break; case 113: /* select_with_paren: '(' select_with_paren ')' */ -#line 823 "bison_parser.y" +#line 824 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } #line 4004 "bison_parser.cpp" break; case 114: /* select_no_paren: select_clause opt_order opt_limit */ -#line 827 "bison_parser.y" +#line 828 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); (yyval.select_stmt)->order = (yyvsp[-1].order_vec); @@ -4019,7 +4019,7 @@ YYLTYPE yylloc = yyloc_default; break; case 115: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ -#line 837 "bison_parser.y" +#line 838 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -4034,7 +4034,7 @@ YYLTYPE yylloc = yyloc_default; break; case 116: /* set_operator: set_type opt_all */ -#line 850 "bison_parser.y" +#line 851 "bison_parser.y" { (yyval.set_operator_t) = (yyvsp[-1].set_operator_t); (yyval.set_operator_t)->isAll = (yyvsp[0].bval); @@ -4043,7 +4043,7 @@ YYLTYPE yylloc = yyloc_default; break; case 117: /* set_type: UNION */ -#line 857 "bison_parser.y" +#line 858 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetUnion; @@ -4052,7 +4052,7 @@ YYLTYPE yylloc = yyloc_default; break; case 118: /* set_type: INTERSECT */ -#line 861 "bison_parser.y" +#line 862 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetIntersect; @@ -4061,7 +4061,7 @@ YYLTYPE yylloc = yyloc_default; break; case 119: /* set_type: EXCEPT */ -#line 865 "bison_parser.y" +#line 866 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetExcept; @@ -4070,7 +4070,7 @@ YYLTYPE yylloc = yyloc_default; break; case 120: /* opt_all: ALL */ -#line 872 "bison_parser.y" +#line 873 "bison_parser.y" { (yyval.bval) = true; } @@ -4078,7 +4078,7 @@ YYLTYPE yylloc = yyloc_default; break; case 121: /* opt_all: %empty */ -#line 875 "bison_parser.y" +#line 876 "bison_parser.y" { (yyval.bval) = false; } @@ -4086,7 +4086,7 @@ YYLTYPE yylloc = yyloc_default; break; case 122: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ -#line 881 "bison_parser.y" +#line 882 "bison_parser.y" { (yyval.select_stmt) = new SelectStatement(); (yyval.select_stmt)->limit = (yyvsp[-5].limit); @@ -4100,49 +4100,49 @@ YYLTYPE yylloc = yyloc_default; break; case 123: /* opt_distinct: DISTINCT */ -#line 893 "bison_parser.y" +#line 894 "bison_parser.y" { (yyval.bval) = true; } #line 4106 "bison_parser.cpp" break; case 124: /* opt_distinct: %empty */ -#line 894 "bison_parser.y" +#line 895 "bison_parser.y" { (yyval.bval) = false; } #line 4112 "bison_parser.cpp" break; case 126: /* opt_from_clause: from_clause */ -#line 902 "bison_parser.y" +#line 903 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } #line 4118 "bison_parser.cpp" break; case 127: /* opt_from_clause: %empty */ -#line 903 "bison_parser.y" +#line 904 "bison_parser.y" { (yyval.table) = nullptr; } #line 4124 "bison_parser.cpp" break; case 128: /* from_clause: FROM table_ref */ -#line 907 "bison_parser.y" +#line 908 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } #line 4130 "bison_parser.cpp" break; case 129: /* opt_where: WHERE expr */ -#line 912 "bison_parser.y" +#line 913 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } #line 4136 "bison_parser.cpp" break; case 130: /* opt_where: %empty */ -#line 913 "bison_parser.y" +#line 914 "bison_parser.y" { (yyval.expr) = nullptr; } #line 4142 "bison_parser.cpp" break; case 131: /* opt_group: GROUP BY expr_list opt_having */ -#line 917 "bison_parser.y" +#line 918 "bison_parser.y" { (yyval.group_t) = new GroupByDescription(); (yyval.group_t)->columns = (yyvsp[-1].expr_vec); @@ -4152,157 +4152,157 @@ YYLTYPE yylloc = yyloc_default; break; case 132: /* opt_group: %empty */ -#line 922 "bison_parser.y" +#line 923 "bison_parser.y" { (yyval.group_t) = nullptr; } #line 4158 "bison_parser.cpp" break; case 133: /* opt_having: HAVING expr */ -#line 926 "bison_parser.y" +#line 927 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } #line 4164 "bison_parser.cpp" break; case 134: /* opt_having: %empty */ -#line 927 "bison_parser.y" +#line 928 "bison_parser.y" { (yyval.expr) = nullptr; } #line 4170 "bison_parser.cpp" break; case 135: /* opt_order: ORDER BY order_list */ -#line 931 "bison_parser.y" +#line 932 "bison_parser.y" { (yyval.order_vec) = (yyvsp[0].order_vec); } #line 4176 "bison_parser.cpp" break; case 136: /* opt_order: %empty */ -#line 932 "bison_parser.y" +#line 933 "bison_parser.y" { (yyval.order_vec) = nullptr; } #line 4182 "bison_parser.cpp" break; case 137: /* order_list: order_desc */ -#line 936 "bison_parser.y" +#line 937 "bison_parser.y" { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } #line 4188 "bison_parser.cpp" break; case 138: /* order_list: order_list ',' order_desc */ -#line 937 "bison_parser.y" +#line 938 "bison_parser.y" { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } #line 4194 "bison_parser.cpp" break; case 139: /* order_desc: expr opt_order_type */ -#line 941 "bison_parser.y" +#line 942 "bison_parser.y" { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } #line 4200 "bison_parser.cpp" break; case 140: /* opt_order_type: ASC */ -#line 945 "bison_parser.y" +#line 946 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } #line 4206 "bison_parser.cpp" break; case 141: /* opt_order_type: DESC */ -#line 946 "bison_parser.y" +#line 947 "bison_parser.y" { (yyval.order_type) = kOrderDesc; } #line 4212 "bison_parser.cpp" break; case 142: /* opt_order_type: %empty */ -#line 947 "bison_parser.y" +#line 948 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } #line 4218 "bison_parser.cpp" break; case 143: /* opt_top: TOP int_literal */ -#line 953 "bison_parser.y" +#line 954 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } #line 4224 "bison_parser.cpp" break; case 144: /* opt_top: %empty */ -#line 954 "bison_parser.y" +#line 955 "bison_parser.y" { (yyval.limit) = nullptr; } #line 4230 "bison_parser.cpp" break; case 145: /* opt_limit: LIMIT expr */ -#line 958 "bison_parser.y" +#line 959 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } #line 4236 "bison_parser.cpp" break; case 146: /* opt_limit: OFFSET expr */ -#line 959 "bison_parser.y" +#line 960 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } #line 4242 "bison_parser.cpp" break; case 147: /* opt_limit: LIMIT expr OFFSET expr */ -#line 960 "bison_parser.y" +#line 961 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } #line 4248 "bison_parser.cpp" break; case 148: /* opt_limit: LIMIT ALL */ -#line 961 "bison_parser.y" +#line 962 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, nullptr); } #line 4254 "bison_parser.cpp" break; case 149: /* opt_limit: LIMIT ALL OFFSET expr */ -#line 962 "bison_parser.y" +#line 963 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } #line 4260 "bison_parser.cpp" break; case 150: /* opt_limit: %empty */ -#line 963 "bison_parser.y" +#line 964 "bison_parser.y" { (yyval.limit) = nullptr; } #line 4266 "bison_parser.cpp" break; case 151: /* expr_list: expr_alias */ -#line 970 "bison_parser.y" +#line 971 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } #line 4272 "bison_parser.cpp" break; case 152: /* expr_list: expr_list ',' expr_alias */ -#line 971 "bison_parser.y" +#line 972 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } #line 4278 "bison_parser.cpp" break; case 153: /* opt_literal_list: literal_list */ -#line 975 "bison_parser.y" +#line 976 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[0].expr_vec); } #line 4284 "bison_parser.cpp" break; case 154: /* opt_literal_list: %empty */ -#line 976 "bison_parser.y" +#line 977 "bison_parser.y" { (yyval.expr_vec) = nullptr; } #line 4290 "bison_parser.cpp" break; case 155: /* literal_list: literal */ -#line 980 "bison_parser.y" +#line 981 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } #line 4296 "bison_parser.cpp" break; case 156: /* literal_list: literal_list ',' literal */ -#line 981 "bison_parser.y" +#line 982 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } #line 4302 "bison_parser.cpp" break; case 157: /* expr_alias: expr opt_alias */ -#line 985 "bison_parser.y" +#line 986 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); if ((yyvsp[0].alias_t)) { @@ -4314,409 +4314,409 @@ YYLTYPE yylloc = yyloc_default; break; case 163: /* operand: '(' expr ')' */ -#line 1003 "bison_parser.y" +#line 1004 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); } #line 4320 "bison_parser.cpp" break; case 173: /* operand: '(' select_no_paren ')' */ -#line 1013 "bison_parser.y" +#line 1014 "bison_parser.y" { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } #line 4326 "bison_parser.cpp" break; case 176: /* unary_expr: '-' operand */ -#line 1022 "bison_parser.y" +#line 1023 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } #line 4332 "bison_parser.cpp" break; case 177: /* unary_expr: NOT operand */ -#line 1023 "bison_parser.y" +#line 1024 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } #line 4338 "bison_parser.cpp" break; case 178: /* unary_expr: operand ISNULL */ -#line 1024 "bison_parser.y" +#line 1025 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } #line 4344 "bison_parser.cpp" break; case 179: /* unary_expr: operand IS NULL */ -#line 1025 "bison_parser.y" +#line 1026 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } #line 4350 "bison_parser.cpp" break; case 180: /* unary_expr: operand IS NOT NULL */ -#line 1026 "bison_parser.y" +#line 1027 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } #line 4356 "bison_parser.cpp" break; case 182: /* binary_expr: operand '-' operand */ -#line 1031 "bison_parser.y" +#line 1032 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } #line 4362 "bison_parser.cpp" break; case 183: /* binary_expr: operand '+' operand */ -#line 1032 "bison_parser.y" +#line 1033 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } #line 4368 "bison_parser.cpp" break; case 184: /* binary_expr: operand '/' operand */ -#line 1033 "bison_parser.y" +#line 1034 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } #line 4374 "bison_parser.cpp" break; case 185: /* binary_expr: operand '*' operand */ -#line 1034 "bison_parser.y" +#line 1035 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } #line 4380 "bison_parser.cpp" break; case 186: /* binary_expr: operand '%' operand */ -#line 1035 "bison_parser.y" +#line 1036 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } #line 4386 "bison_parser.cpp" break; case 187: /* binary_expr: operand '^' operand */ -#line 1036 "bison_parser.y" +#line 1037 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } #line 4392 "bison_parser.cpp" break; case 188: /* binary_expr: operand LIKE operand */ -#line 1037 "bison_parser.y" +#line 1038 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } #line 4398 "bison_parser.cpp" break; case 189: /* binary_expr: operand NOT LIKE operand */ -#line 1038 "bison_parser.y" +#line 1039 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } #line 4404 "bison_parser.cpp" break; case 190: /* binary_expr: operand ILIKE operand */ -#line 1039 "bison_parser.y" +#line 1040 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } #line 4410 "bison_parser.cpp" break; case 191: /* binary_expr: operand CONCAT operand */ -#line 1040 "bison_parser.y" +#line 1041 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } #line 4416 "bison_parser.cpp" break; case 192: /* logic_expr: expr AND expr */ -#line 1044 "bison_parser.y" +#line 1045 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } #line 4422 "bison_parser.cpp" break; case 193: /* logic_expr: expr OR expr */ -#line 1045 "bison_parser.y" +#line 1046 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } #line 4428 "bison_parser.cpp" break; case 194: /* in_expr: operand IN '(' expr_list ')' */ -#line 1049 "bison_parser.y" +#line 1050 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } #line 4434 "bison_parser.cpp" break; case 195: /* in_expr: operand NOT IN '(' expr_list ')' */ -#line 1050 "bison_parser.y" +#line 1051 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } #line 4440 "bison_parser.cpp" break; case 196: /* in_expr: operand IN '(' select_no_paren ')' */ -#line 1051 "bison_parser.y" +#line 1052 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } #line 4446 "bison_parser.cpp" break; case 197: /* in_expr: operand NOT IN '(' select_no_paren ')' */ -#line 1052 "bison_parser.y" +#line 1053 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } #line 4452 "bison_parser.cpp" break; case 198: /* case_expr: CASE expr case_list END */ -#line 1058 "bison_parser.y" +#line 1059 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } #line 4458 "bison_parser.cpp" break; case 199: /* case_expr: CASE expr case_list ELSE expr END */ -#line 1059 "bison_parser.y" +#line 1060 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } #line 4464 "bison_parser.cpp" break; case 200: /* case_expr: CASE case_list END */ -#line 1060 "bison_parser.y" +#line 1061 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } #line 4470 "bison_parser.cpp" break; case 201: /* case_expr: CASE case_list ELSE expr END */ -#line 1061 "bison_parser.y" +#line 1062 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } #line 4476 "bison_parser.cpp" break; case 202: /* case_list: WHEN expr THEN expr */ -#line 1065 "bison_parser.y" +#line 1066 "bison_parser.y" { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } #line 4482 "bison_parser.cpp" break; case 203: /* case_list: case_list WHEN expr THEN expr */ -#line 1066 "bison_parser.y" +#line 1067 "bison_parser.y" { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } #line 4488 "bison_parser.cpp" break; case 204: /* exists_expr: EXISTS '(' select_no_paren ')' */ -#line 1070 "bison_parser.y" +#line 1071 "bison_parser.y" { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } #line 4494 "bison_parser.cpp" break; case 205: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ -#line 1071 "bison_parser.y" +#line 1072 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } #line 4500 "bison_parser.cpp" break; case 206: /* comp_expr: operand '=' operand */ -#line 1075 "bison_parser.y" +#line 1076 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } #line 4506 "bison_parser.cpp" break; case 207: /* comp_expr: operand EQUALS operand */ -#line 1076 "bison_parser.y" +#line 1077 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } #line 4512 "bison_parser.cpp" break; case 208: /* comp_expr: operand NOTEQUALS operand */ -#line 1077 "bison_parser.y" +#line 1078 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } #line 4518 "bison_parser.cpp" break; case 209: /* comp_expr: operand '<' operand */ -#line 1078 "bison_parser.y" +#line 1079 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } #line 4524 "bison_parser.cpp" break; case 210: /* comp_expr: operand '>' operand */ -#line 1079 "bison_parser.y" +#line 1080 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } #line 4530 "bison_parser.cpp" break; case 211: /* comp_expr: operand LESSEQ operand */ -#line 1080 "bison_parser.y" +#line 1081 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } #line 4536 "bison_parser.cpp" break; case 212: /* comp_expr: operand GREATEREQ operand */ -#line 1081 "bison_parser.y" +#line 1082 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } #line 4542 "bison_parser.cpp" break; case 213: /* function_expr: IDENTIFIER '(' ')' */ -#line 1085 "bison_parser.y" +#line 1086 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } #line 4548 "bison_parser.cpp" break; case 214: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ -#line 1086 "bison_parser.y" +#line 1087 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } #line 4554 "bison_parser.cpp" break; case 215: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ -#line 1090 "bison_parser.y" +#line 1091 "bison_parser.y" { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } #line 4560 "bison_parser.cpp" break; case 216: /* cast_expr: CAST '(' expr AS column_type ')' */ -#line 1094 "bison_parser.y" +#line 1095 "bison_parser.y" { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } #line 4566 "bison_parser.cpp" break; case 217: /* datetime_field: SECOND */ -#line 1098 "bison_parser.y" +#line 1099 "bison_parser.y" { (yyval.datetime_field) = kDatetimeSecond; } #line 4572 "bison_parser.cpp" break; case 218: /* datetime_field: MINUTE */ -#line 1099 "bison_parser.y" +#line 1100 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMinute; } #line 4578 "bison_parser.cpp" break; case 219: /* datetime_field: HOUR */ -#line 1100 "bison_parser.y" +#line 1101 "bison_parser.y" { (yyval.datetime_field) = kDatetimeHour; } #line 4584 "bison_parser.cpp" break; case 220: /* datetime_field: DAY */ -#line 1101 "bison_parser.y" +#line 1102 "bison_parser.y" { (yyval.datetime_field) = kDatetimeDay; } #line 4590 "bison_parser.cpp" break; case 221: /* datetime_field: MONTH */ -#line 1102 "bison_parser.y" +#line 1103 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMonth; } #line 4596 "bison_parser.cpp" break; case 222: /* datetime_field: YEAR */ -#line 1103 "bison_parser.y" +#line 1104 "bison_parser.y" { (yyval.datetime_field) = kDatetimeYear; } #line 4602 "bison_parser.cpp" break; case 223: /* datetime_field_plural: SECONDS */ -#line 1107 "bison_parser.y" +#line 1108 "bison_parser.y" { (yyval.datetime_field) = kDatetimeSecond; } #line 4608 "bison_parser.cpp" break; case 224: /* datetime_field_plural: MINUTES */ -#line 1108 "bison_parser.y" +#line 1109 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMinute; } #line 4614 "bison_parser.cpp" break; case 225: /* datetime_field_plural: HOURS */ -#line 1109 "bison_parser.y" +#line 1110 "bison_parser.y" { (yyval.datetime_field) = kDatetimeHour; } #line 4620 "bison_parser.cpp" break; case 226: /* datetime_field_plural: DAYS */ -#line 1110 "bison_parser.y" +#line 1111 "bison_parser.y" { (yyval.datetime_field) = kDatetimeDay; } #line 4626 "bison_parser.cpp" break; case 227: /* datetime_field_plural: MONTHS */ -#line 1111 "bison_parser.y" +#line 1112 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMonth; } #line 4632 "bison_parser.cpp" break; case 228: /* datetime_field_plural: YEARS */ -#line 1112 "bison_parser.y" +#line 1113 "bison_parser.y" { (yyval.datetime_field) = kDatetimeYear; } #line 4638 "bison_parser.cpp" break; case 231: /* array_expr: ARRAY '[' expr_list ']' */ -#line 1121 "bison_parser.y" +#line 1122 "bison_parser.y" { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } #line 4644 "bison_parser.cpp" break; case 232: /* array_index: operand '[' int_literal ']' */ -#line 1125 "bison_parser.y" +#line 1126 "bison_parser.y" { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } #line 4650 "bison_parser.cpp" break; case 233: /* between_expr: operand BETWEEN operand AND operand */ -#line 1129 "bison_parser.y" +#line 1130 "bison_parser.y" { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } #line 4656 "bison_parser.cpp" break; case 234: /* column_name: IDENTIFIER */ -#line 1133 "bison_parser.y" +#line 1134 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } #line 4662 "bison_parser.cpp" break; case 235: /* column_name: IDENTIFIER '.' IDENTIFIER */ -#line 1134 "bison_parser.y" +#line 1135 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } #line 4668 "bison_parser.cpp" break; case 236: /* column_name: '*' */ -#line 1135 "bison_parser.y" +#line 1136 "bison_parser.y" { (yyval.expr) = Expr::makeStar(); } #line 4674 "bison_parser.cpp" break; case 237: /* column_name: IDENTIFIER '.' '*' */ -#line 1136 "bison_parser.y" +#line 1137 "bison_parser.y" { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } #line 4680 "bison_parser.cpp" break; case 245: /* string_literal: STRING */ -#line 1150 "bison_parser.y" +#line 1151 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } #line 4686 "bison_parser.cpp" break; case 246: /* bool_literal: TRUE */ -#line 1154 "bison_parser.y" +#line 1155 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(true); } #line 4692 "bison_parser.cpp" break; case 247: /* bool_literal: FALSE */ -#line 1155 "bison_parser.y" +#line 1156 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(false); } #line 4698 "bison_parser.cpp" break; case 248: /* num_literal: FLOATVAL */ -#line 1159 "bison_parser.y" +#line 1160 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } #line 4704 "bison_parser.cpp" break; case 250: /* int_literal: INTVAL */ -#line 1164 "bison_parser.y" +#line 1165 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } #line 4710 "bison_parser.cpp" break; case 251: /* null_literal: NULL */ -#line 1168 "bison_parser.y" +#line 1169 "bison_parser.y" { (yyval.expr) = Expr::makeNullLiteral(); } #line 4716 "bison_parser.cpp" break; case 252: /* date_literal: DATE STRING */ -#line 1172 "bison_parser.y" +#line 1173 "bison_parser.y" { int day{0}, month{0}, year{0}, chars_parsed{0}; // If the whole string is parsed, chars_parsed points to the terminating null byte after the last character @@ -4731,13 +4731,13 @@ YYLTYPE yylloc = yyloc_default; break; case 253: /* interval_literal: int_literal duration_field */ -#line 1185 "bison_parser.y" +#line 1186 "bison_parser.y" { (yyval.expr) = Expr::makeIntervalLiteral((yyvsp[-1].expr)->ival, (yyvsp[0].datetime_field)); delete (yyvsp[-1].expr); } #line 4737 "bison_parser.cpp" break; case 254: /* interval_literal: INTERVAL STRING datetime_field */ -#line 1186 "bison_parser.y" +#line 1187 "bison_parser.y" { int duration{0}, chars_parsed{0}; // If the whole string is parsed, chars_parsed points to the terminating null byte after the last character @@ -4753,7 +4753,7 @@ YYLTYPE yylloc = yyloc_default; break; case 255: /* interval_literal: INTERVAL STRING */ -#line 1197 "bison_parser.y" +#line 1198 "bison_parser.y" { int duration{0}, chars_parsed{0}; // 'seconds' and 'minutes' are the longest accepted interval qualifiers (7 chars) + null byte @@ -4789,7 +4789,7 @@ YYLTYPE yylloc = yyloc_default; break; case 256: /* param_expr: '?' */ -#line 1231 "bison_parser.y" +#line 1232 "bison_parser.y" { (yyval.expr) = Expr::makeParameter(yylloc.total_column); (yyval.expr)->ival2 = yyloc.param_list.size(); @@ -4799,7 +4799,7 @@ YYLTYPE yylloc = yyloc_default; break; case 258: /* table_ref: table_ref_commalist ',' table_ref_atomic */ -#line 1244 "bison_parser.y" +#line 1245 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); auto tbl = new TableRef(kTableCrossProduct); @@ -4810,7 +4810,7 @@ YYLTYPE yylloc = yyloc_default; break; case 262: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ -#line 1260 "bison_parser.y" +#line 1261 "bison_parser.y" { auto tbl = new TableRef(kTableSelect); tbl->select = (yyvsp[-2].select_stmt); @@ -4821,19 +4821,19 @@ YYLTYPE yylloc = yyloc_default; break; case 263: /* table_ref_commalist: table_ref_atomic */ -#line 1269 "bison_parser.y" +#line 1270 "bison_parser.y" { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } #line 4827 "bison_parser.cpp" break; case 264: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ -#line 1270 "bison_parser.y" +#line 1271 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } #line 4833 "bison_parser.cpp" break; case 265: /* table_ref_name: table_name opt_table_alias */ -#line 1275 "bison_parser.y" +#line 1276 "bison_parser.y" { auto tbl = new TableRef(kTableName); tbl->schema = (yyvsp[-1].table_name).schema; @@ -4845,7 +4845,7 @@ YYLTYPE yylloc = yyloc_default; break; case 266: /* table_ref_name_no_alias: table_name */ -#line 1286 "bison_parser.y" +#line 1287 "bison_parser.y" { (yyval.table) = new TableRef(kTableName); (yyval.table)->schema = (yyvsp[0].table_name).schema; @@ -4855,79 +4855,79 @@ YYLTYPE yylloc = yyloc_default; break; case 267: /* table_name: IDENTIFIER */ -#line 1295 "bison_parser.y" +#line 1296 "bison_parser.y" { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} #line 4861 "bison_parser.cpp" break; case 268: /* table_name: IDENTIFIER '.' IDENTIFIER */ -#line 1296 "bison_parser.y" +#line 1297 "bison_parser.y" { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } #line 4867 "bison_parser.cpp" break; case 269: /* opt_index_name: IDENTIFIER */ -#line 1300 "bison_parser.y" +#line 1301 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} #line 4873 "bison_parser.cpp" break; case 270: /* opt_index_name: %empty */ -#line 1301 "bison_parser.y" +#line 1302 "bison_parser.y" { (yyval.sval) = nullptr;} #line 4879 "bison_parser.cpp" break; case 271: /* index_name: IDENTIFIER */ -#line 1305 "bison_parser.y" +#line 1306 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} #line 4885 "bison_parser.cpp" break; case 273: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ -#line 1311 "bison_parser.y" +#line 1312 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } #line 4891 "bison_parser.cpp" break; case 275: /* opt_table_alias: %empty */ -#line 1317 "bison_parser.y" +#line 1318 "bison_parser.y" { (yyval.alias_t) = nullptr; } #line 4897 "bison_parser.cpp" break; case 276: /* alias: AS IDENTIFIER */ -#line 1322 "bison_parser.y" +#line 1323 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } #line 4903 "bison_parser.cpp" break; case 277: /* alias: IDENTIFIER */ -#line 1323 "bison_parser.y" +#line 1324 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } #line 4909 "bison_parser.cpp" break; case 279: /* opt_alias: %empty */ -#line 1329 "bison_parser.y" +#line 1330 "bison_parser.y" { (yyval.alias_t) = nullptr; } #line 4915 "bison_parser.cpp" break; case 281: /* opt_with_clause: %empty */ -#line 1339 "bison_parser.y" +#line 1340 "bison_parser.y" { (yyval.with_description_vec) = nullptr; } #line 4921 "bison_parser.cpp" break; case 282: /* with_clause: WITH with_description_list */ -#line 1343 "bison_parser.y" +#line 1344 "bison_parser.y" { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } #line 4927 "bison_parser.cpp" break; case 283: /* with_description_list: with_description */ -#line 1347 "bison_parser.y" +#line 1348 "bison_parser.y" { (yyval.with_description_vec) = new std::vector(); (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); @@ -4936,7 +4936,7 @@ YYLTYPE yylloc = yyloc_default; break; case 284: /* with_description_list: with_description_list ',' with_description */ -#line 1351 "bison_parser.y" +#line 1352 "bison_parser.y" { (yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t)); (yyval.with_description_vec) = (yyvsp[-2].with_description_vec); @@ -4945,7 +4945,7 @@ YYLTYPE yylloc = yyloc_default; break; case 285: /* with_description: IDENTIFIER AS select_with_paren */ -#line 1358 "bison_parser.y" +#line 1359 "bison_parser.y" { (yyval.with_description_t) = new WithDescription(); (yyval.with_description_t)->alias = (yyvsp[-2].sval); @@ -4955,7 +4955,7 @@ YYLTYPE yylloc = yyloc_default; break; case 286: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ -#line 1372 "bison_parser.y" +#line 1373 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4967,11 +4967,11 @@ YYLTYPE yylloc = yyloc_default; break; case 287: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ -#line 1380 "bison_parser.y" +#line 1381 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); - (yyval.table)->join->type = (JoinType) (yyvsp[-4].uval); + (yyval.table)->join->type = (JoinType) (yyvsp[-4].join_type); (yyval.table)->join->left = (yyvsp[-5].table); (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); @@ -4980,11 +4980,11 @@ YYLTYPE yylloc = yyloc_default; break; case 288: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ -#line 1390 "bison_parser.y" +#line 1391 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); - (yyval.table)->join->type = (JoinType) (yyvsp[-6].uval); + (yyval.table)->join->type = (JoinType) (yyvsp[-6].join_type); (yyval.table)->join->left = (yyvsp[-7].table); (yyval.table)->join->right = (yyvsp[-4].table); auto left_col = Expr::makeColumnRef(strdup((yyvsp[-1].expr)->name)); @@ -5000,73 +5000,73 @@ YYLTYPE yylloc = yyloc_default; break; case 289: /* opt_join_type: INNER */ -#line 1408 "bison_parser.y" - { (yyval.uval) = kJoinInner; } +#line 1409 "bison_parser.y" + { (yyval.join_type) = kJoinInner; } #line 5006 "bison_parser.cpp" break; case 290: /* opt_join_type: LEFT OUTER */ -#line 1409 "bison_parser.y" - { (yyval.uval) = kJoinLeft; } +#line 1410 "bison_parser.y" + { (yyval.join_type) = kJoinLeft; } #line 5012 "bison_parser.cpp" break; case 291: /* opt_join_type: LEFT */ -#line 1410 "bison_parser.y" - { (yyval.uval) = kJoinLeft; } +#line 1411 "bison_parser.y" + { (yyval.join_type) = kJoinLeft; } #line 5018 "bison_parser.cpp" break; case 292: /* opt_join_type: RIGHT OUTER */ -#line 1411 "bison_parser.y" - { (yyval.uval) = kJoinRight; } +#line 1412 "bison_parser.y" + { (yyval.join_type) = kJoinRight; } #line 5024 "bison_parser.cpp" break; case 293: /* opt_join_type: RIGHT */ -#line 1412 "bison_parser.y" - { (yyval.uval) = kJoinRight; } +#line 1413 "bison_parser.y" + { (yyval.join_type) = kJoinRight; } #line 5030 "bison_parser.cpp" break; case 294: /* opt_join_type: FULL OUTER */ -#line 1413 "bison_parser.y" - { (yyval.uval) = kJoinFull; } +#line 1414 "bison_parser.y" + { (yyval.join_type) = kJoinFull; } #line 5036 "bison_parser.cpp" break; case 295: /* opt_join_type: OUTER */ -#line 1414 "bison_parser.y" - { (yyval.uval) = kJoinFull; } +#line 1415 "bison_parser.y" + { (yyval.join_type) = kJoinFull; } #line 5042 "bison_parser.cpp" break; case 296: /* opt_join_type: FULL */ -#line 1415 "bison_parser.y" - { (yyval.uval) = kJoinFull; } +#line 1416 "bison_parser.y" + { (yyval.join_type) = kJoinFull; } #line 5048 "bison_parser.cpp" break; case 297: /* opt_join_type: CROSS */ -#line 1416 "bison_parser.y" - { (yyval.uval) = kJoinCross; } +#line 1417 "bison_parser.y" + { (yyval.join_type) = kJoinCross; } #line 5054 "bison_parser.cpp" break; case 298: /* opt_join_type: %empty */ -#line 1417 "bison_parser.y" - { (yyval.uval) = kJoinInner; } +#line 1418 "bison_parser.y" + { (yyval.join_type) = kJoinInner; } #line 5060 "bison_parser.cpp" break; case 302: /* ident_commalist: IDENTIFIER */ -#line 1437 "bison_parser.y" +#line 1438 "bison_parser.y" { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } #line 5066 "bison_parser.cpp" break; case 303: /* ident_commalist: ident_commalist ',' IDENTIFIER */ -#line 1438 "bison_parser.y" +#line 1439 "bison_parser.y" { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } #line 5072 "bison_parser.cpp" break; @@ -5301,7 +5301,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 1441 "bison_parser.y" +#line 1442 "bison_parser.y" /********************************* ** Section 4: Additional C code diff --git a/src/parser/bison_parser.h b/src/parser/bison_parser.h index 7a6ffaad..25b2ed33 100644 --- a/src/parser/bison_parser.h +++ b/src/parser/bison_parser.h @@ -258,61 +258,62 @@ union HSQL_STYPE { #line 95 "bison_parser.y" - double fval; - int64_t ival; - char* sval; + bool bval; + char* sval; + double fval; + int64_t ival; uintmax_t uval; - bool bval; - hsql::SQLStatement* statement; - hsql::SelectStatement* select_stmt; - hsql::ImportStatement* import_stmt; - hsql::ExportStatement* export_stmt; + // statements + hsql::AlterStatement* alter_stmt; hsql::CreateStatement* create_stmt; - hsql::InsertStatement* insert_stmt; hsql::DeleteStatement* delete_stmt; - hsql::UpdateStatement* update_stmt; hsql::DropStatement* drop_stmt; - hsql::AlterStatement* alter_stmt; - hsql::PrepareStatement* prep_stmt; hsql::ExecuteStatement* exec_stmt; + hsql::ExportStatement* export_stmt; + hsql::ImportStatement* import_stmt; + hsql::InsertStatement* insert_stmt; + hsql::PrepareStatement* prep_stmt; + hsql::SelectStatement* select_stmt; hsql::ShowStatement* show_stmt; + hsql::SQLStatement* statement; hsql::TransactionStatement* transaction_stmt; - - hsql::TableName table_name; - hsql::TableRef* table; - hsql::Expr* expr; - hsql::OrderDescription* order; - hsql::OrderType order_type; - hsql::WithDescription* with_description_t; - hsql::DatetimeField datetime_field; - hsql::LimitDescription* limit; - hsql::ColumnDefinition* column_t; - hsql::TableConstraint* table_constraint_t; - hsql::TableElement* table_element_t; - hsql::ConstraintType column_constraint_t; - hsql::ColumnType column_type_t; - hsql::ImportType import_type_t; - hsql::GroupByDescription* group_t; - hsql::UpdateClause* update_t; - hsql::Alias* alias_t; - hsql::SetOperation* set_operator_t; + hsql::UpdateStatement* update_stmt; + + hsql::Alias* alias_t; + hsql::AlterAction* alter_action_t; + hsql::ColumnDefinition* column_t; hsql::ColumnSpecification column_specification_t; - hsql::AlterAction* alter_action_t; - hsql::DropColumnAction* drop_action_t; - - std::vector* stmt_vec; + hsql::ColumnType column_type_t; + hsql::ConstraintType column_constraint_t; + hsql::DatetimeField datetime_field; + hsql::DropColumnAction* drop_action_t; + hsql::Expr* expr; + hsql::GroupByDescription* group_t; + hsql::ImportType import_type_t; + hsql::JoinType join_type; + hsql::LimitDescription* limit; + hsql::OrderDescription* order; + hsql::OrderType order_type; + hsql::SetOperation* set_operator_t; + hsql::TableConstraint* table_constraint_t; + hsql::TableElement* table_element_t; + hsql::TableName table_name; + hsql::TableRef* table; + hsql::UpdateClause* update_t; + hsql::WithDescription* with_description_t; - std::vector* str_vec; - std::vector* table_vec; - std::vector* update_vec; - std::vector* expr_vec; + std::vector* str_vec; + std::vector* column_constraint_vec; + std::vector* expr_vec; std::vector* order_vec; - std::vector* with_description_vec; - std::vector* table_element_vec; - std::vector* column_constraint_vec; + std::vector* stmt_vec; + std::vector* table_element_vec; + std::vector* table_vec; + std::vector* update_vec; + std::vector* with_description_vec; -#line 316 "bison_parser.h" +#line 317 "bison_parser.h" }; typedef union HSQL_STYPE HSQL_STYPE; diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 6fec6ff7..05fdb0e5 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -126,6 +126,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha hsql::Expr* expr; hsql::GroupByDescription* group_t; hsql::ImportType import_type_t; + hsql::JoinType join_type; hsql::LimitDescription* limit; hsql::OrderDescription* order; hsql::OrderType order_type; @@ -152,7 +153,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha /********************************* ** Destructor symbols *********************************/ -%destructor { } +%destructor { } %destructor { free( ($$.name) ); free( ($$.schema) ); } %destructor { free( ($$) ); } %destructor { @@ -218,7 +219,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha %type opt_not_exists opt_exists opt_distinct opt_all %type opt_decimal_specification %type opt_time_specification -%type opt_join_type +%type opt_join_type %type
opt_from_clause from_clause table_ref table_ref_atomic table_ref_name nonjoin_table_ref_atomic %type
join_clause table_ref_name_no_alias %type expr operand scalar_expr unary_expr binary_expr logic_expr exists_expr extract_expr cast_expr From e8b0b711b47d922f408b3d7623093df2e1697412 Mon Sep 17 00:00:00 2001 From: mweisgut Date: Mon, 11 Oct 2021 14:52:54 +0200 Subject: [PATCH 69/73] eliminate VARCHAR_VARYING --- src/parser/bison_parser.cpp | 2 +- src/parser/bison_parser.y | 2 +- src/sql/ColumnType.h | 1 - src/sql/statements.cpp | 3 --- 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index e67e25c6..81171c0f 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -3645,7 +3645,7 @@ YYLTYPE yylloc = yyloc_default; case 65: /* column_type: CHARACTER VARYING '(' INTVAL ')' */ #line 601 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::VARCHAR_VARYING, (yyvsp[-1].ival)}; } + { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } #line 3650 "bison_parser.cpp" break; diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 05fdb0e5..8d048237 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -598,7 +598,7 @@ column_type: | DOUBLE { $$ = ColumnType{DataType::DOUBLE}; } | REAL { $$ = ColumnType{DataType::REAL}; } | VARCHAR '(' INTVAL ')' { $$ = ColumnType{DataType::VARCHAR, $3}; } - | CHARACTER VARYING'(' INTVAL ')' { $$ = ColumnType{DataType::VARCHAR_VARYING, $4}; } + | CHARACTER VARYING'(' INTVAL ')' { $$ = ColumnType{DataType::VARCHAR, $4}; } | CHAR '(' INTVAL ')' { $$ = ColumnType{DataType::CHAR, $3}; } | TEXT { $$ = ColumnType{DataType::TEXT}; } | TIME opt_time_specification { $$ = ColumnType{DataType::TIME, 0, $2 }; } diff --git a/src/sql/ColumnType.h b/src/sql/ColumnType.h index 308060c5..2800b8ac 100755 --- a/src/sql/ColumnType.h +++ b/src/sql/ColumnType.h @@ -14,7 +14,6 @@ namespace hsql { REAL, CHAR, VARCHAR, - VARCHAR_VARYING, TEXT, DATETIME, DATE, diff --git a/src/sql/statements.cpp b/src/sql/statements.cpp index 8ecd4745..02e9df8f 100755 --- a/src/sql/statements.cpp +++ b/src/sql/statements.cpp @@ -70,9 +70,6 @@ namespace hsql { case DataType::REAL: stream << "REAL"; break; - case DataType::VARCHAR_VARYING: - stream << "VARCHAR_VARYING(" << column_type.length << ")"; - break; case DataType::CHAR: stream << "CHAR(" << column_type.length << ")"; break; From 05e789b10eeb41bf247fefbab4b4712bd51bfb4e Mon Sep 17 00:00:00 2001 From: mweisgut Date: Mon, 11 Oct 2021 14:58:27 +0200 Subject: [PATCH 70/73] remove index_name --- src/parser/bison_parser.cpp | 2145 +++++++++++++++++------------------ src/parser/bison_parser.y | 8 +- 2 files changed, 1065 insertions(+), 1088 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 81171c0f..f68bbe28 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -418,20 +418,19 @@ enum yysymbol_kind_t YYSYMBOL_table_ref_name_no_alias = 284, /* table_ref_name_no_alias */ YYSYMBOL_table_name = 285, /* table_name */ YYSYMBOL_opt_index_name = 286, /* opt_index_name */ - YYSYMBOL_index_name = 287, /* index_name */ - YYSYMBOL_table_alias = 288, /* table_alias */ - YYSYMBOL_opt_table_alias = 289, /* opt_table_alias */ - YYSYMBOL_alias = 290, /* alias */ - YYSYMBOL_opt_alias = 291, /* opt_alias */ - YYSYMBOL_opt_with_clause = 292, /* opt_with_clause */ - YYSYMBOL_with_clause = 293, /* with_clause */ - YYSYMBOL_with_description_list = 294, /* with_description_list */ - YYSYMBOL_with_description = 295, /* with_description */ - YYSYMBOL_join_clause = 296, /* join_clause */ - YYSYMBOL_opt_join_type = 297, /* opt_join_type */ - YYSYMBOL_join_condition = 298, /* join_condition */ - YYSYMBOL_opt_semicolon = 299, /* opt_semicolon */ - YYSYMBOL_ident_commalist = 300 /* ident_commalist */ + YYSYMBOL_table_alias = 287, /* table_alias */ + YYSYMBOL_opt_table_alias = 288, /* opt_table_alias */ + YYSYMBOL_alias = 289, /* alias */ + YYSYMBOL_opt_alias = 290, /* opt_alias */ + YYSYMBOL_opt_with_clause = 291, /* opt_with_clause */ + YYSYMBOL_with_clause = 292, /* with_clause */ + YYSYMBOL_with_description_list = 293, /* with_description_list */ + YYSYMBOL_with_description = 294, /* with_description */ + YYSYMBOL_join_clause = 295, /* join_clause */ + YYSYMBOL_opt_join_type = 296, /* opt_join_type */ + YYSYMBOL_join_condition = 297, /* join_condition */ + YYSYMBOL_opt_semicolon = 298, /* opt_semicolon */ + YYSYMBOL_ident_commalist = 299 /* ident_commalist */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -762,16 +761,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 67 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 891 +#define YYLAST 886 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 180 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 121 +#define YYNNTS 120 /* YYNRULES -- Number of rules. */ -#define YYNRULES 303 +#define YYNRULES 302 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 550 +#define YYNSTATES 549 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 417 @@ -836,37 +835,37 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 291, 291, 312, 318, 327, 331, 335, 338, 341, - 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, - 366, 367, 372, 373, 377, 381, 393, 396, 399, 405, - 406, 413, 420, 423, 427, 441, 447, 456, 473, 477, - 480, 489, 503, 506, 511, 525, 538, 546, 553, 560, - 571, 572, 576, 577, 581, 582, 586, 593, 594, 595, - 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, - 606, 610, 611, 615, 616, 617, 621, 622, 626, 627, - 630, 631, 632, 633, 637, 638, 649, 655, 661, 667, - 675, 676, 685, 693, 696, 708, 717, 730, 737, 748, - 749, 759, 768, 769, 773, 785, 789, 793, 807, 808, - 811, 812, 823, 824, 828, 838, 851, 858, 862, 866, - 873, 876, 882, 894, 895, 899, 903, 904, 908, 913, - 914, 918, 923, 927, 928, 932, 933, 937, 938, 942, - 946, 947, 948, 954, 955, 959, 960, 961, 962, 963, - 964, 971, 972, 976, 977, 981, 982, 986, 996, 997, - 998, 999, 1000, 1004, 1005, 1006, 1007, 1008, 1009, 1010, - 1011, 1012, 1013, 1014, 1018, 1019, 1023, 1024, 1025, 1026, - 1027, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, - 1040, 1041, 1045, 1046, 1050, 1051, 1052, 1053, 1059, 1060, - 1061, 1062, 1066, 1067, 1071, 1072, 1076, 1077, 1078, 1079, - 1080, 1081, 1082, 1086, 1087, 1091, 1095, 1099, 1100, 1101, - 1102, 1103, 1104, 1108, 1109, 1110, 1111, 1112, 1113, 1117, - 1118, 1122, 1126, 1130, 1134, 1135, 1136, 1137, 1141, 1142, - 1143, 1144, 1145, 1146, 1147, 1151, 1155, 1156, 1160, 1161, - 1165, 1169, 1173, 1186, 1187, 1198, 1232, 1244, 1245, 1255, - 1256, 1260, 1261, 1270, 1271, 1276, 1287, 1296, 1297, 1301, - 1302, 1306, 1311, 1312, 1317, 1318, 1323, 1324, 1329, 1330, - 1339, 1340, 1344, 1348, 1352, 1359, 1372, 1380, 1390, 1409, - 1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1423, - 1432, 1433, 1438, 1439 + 0, 290, 290, 311, 317, 326, 330, 334, 337, 340, + 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + 365, 366, 371, 372, 376, 380, 392, 395, 398, 404, + 405, 412, 419, 422, 426, 440, 446, 455, 472, 476, + 479, 488, 502, 505, 510, 524, 537, 545, 552, 559, + 570, 571, 575, 576, 580, 581, 585, 592, 593, 594, + 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, + 605, 609, 610, 614, 615, 616, 620, 621, 625, 626, + 629, 630, 631, 632, 636, 637, 648, 654, 660, 666, + 674, 675, 684, 692, 695, 707, 716, 729, 736, 747, + 748, 758, 767, 768, 772, 784, 788, 792, 806, 807, + 810, 811, 822, 823, 827, 837, 850, 857, 861, 865, + 872, 875, 881, 893, 894, 898, 902, 903, 907, 912, + 913, 917, 922, 926, 927, 931, 932, 936, 937, 941, + 945, 946, 947, 953, 954, 958, 959, 960, 961, 962, + 963, 970, 971, 975, 976, 980, 981, 985, 995, 996, + 997, 998, 999, 1003, 1004, 1005, 1006, 1007, 1008, 1009, + 1010, 1011, 1012, 1013, 1017, 1018, 1022, 1023, 1024, 1025, + 1026, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, + 1039, 1040, 1044, 1045, 1049, 1050, 1051, 1052, 1058, 1059, + 1060, 1061, 1065, 1066, 1070, 1071, 1075, 1076, 1077, 1078, + 1079, 1080, 1081, 1085, 1086, 1090, 1094, 1098, 1099, 1100, + 1101, 1102, 1103, 1107, 1108, 1109, 1110, 1111, 1112, 1116, + 1117, 1121, 1125, 1129, 1133, 1134, 1135, 1136, 1140, 1141, + 1142, 1143, 1144, 1145, 1146, 1150, 1154, 1155, 1159, 1160, + 1164, 1168, 1172, 1185, 1186, 1197, 1231, 1243, 1244, 1254, + 1255, 1259, 1260, 1269, 1270, 1275, 1286, 1295, 1296, 1300, + 1301, 1305, 1306, 1311, 1312, 1317, 1318, 1323, 1324, 1333, + 1334, 1338, 1342, 1346, 1353, 1366, 1374, 1384, 1403, 1404, + 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1412, 1417, 1426, + 1427, 1432, 1433 }; #endif @@ -935,10 +934,10 @@ static const char *const yytname[] = "date_literal", "interval_literal", "param_expr", "table_ref", "table_ref_atomic", "nonjoin_table_ref_atomic", "table_ref_commalist", "table_ref_name", "table_ref_name_no_alias", "table_name", - "opt_index_name", "index_name", "table_alias", "opt_table_alias", - "alias", "opt_alias", "opt_with_clause", "with_clause", - "with_description_list", "with_description", "join_clause", - "opt_join_type", "join_condition", "opt_semicolon", "ident_commalist", YY_NULLPTR + "opt_index_name", "table_alias", "opt_table_alias", "alias", "opt_alias", + "opt_with_clause", "with_clause", "with_description_list", + "with_description", "join_clause", "opt_join_type", "join_condition", + "opt_semicolon", "ident_commalist", YY_NULLPTR }; static const char * @@ -948,12 +947,12 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-432) +#define YYPACT_NINF (-321) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF (-301) +#define YYTABLE_NINF (-300) #define yytable_value_is_error(Yyn) \ ((Yyn) == YYTABLE_NINF) @@ -962,61 +961,61 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int16 yypact[] = { - 623, 36, 81, 131, 140, 81, -31, 52, 77, 86, - 81, 102, 81, -27, 18, 199, 70, 70, 70, 240, - 90, -432, 164, -432, 164, -432, -432, -432, -432, -432, - -432, -432, -432, -432, -432, -432, -432, -22, -432, 273, - 136, -432, 103, 198, -432, 180, 180, 180, 81, 310, - 81, 202, -432, 200, -6, 200, 200, 200, 81, -432, - 201, 156, -432, -432, -432, -432, -432, -432, 592, -432, - 243, -432, -432, 220, -22, 51, -432, 129, -432, 342, - 84, 346, 236, 355, 81, 81, 277, -432, 268, 190, - 364, 323, 81, 370, 370, 372, 81, 81, -432, 203, - 199, -432, 204, 378, 373, 214, 215, -432, -432, -432, - -22, 263, 266, -22, 19, -432, -432, -432, -432, 384, - -432, 389, -432, -432, -432, 222, 217, -432, -432, -432, - -432, 294, -432, -432, -432, -432, -432, -432, 353, -432, - 275, -49, 190, 326, -432, 370, 403, 133, 253, -50, - -432, -432, 319, 300, -432, 300, -432, -432, -432, -432, - -432, -432, 411, -432, -432, 326, -432, -432, 339, -432, - -432, 51, -432, -432, 326, 339, 326, 161, -432, -432, - 146, -432, 84, -432, -432, -432, -432, -432, -432, -432, - -432, -432, -432, -432, -432, -432, -432, -432, -432, 81, - 413, 306, 69, 295, -105, 244, 246, 247, 213, 398, - 254, 419, -432, 233, 43, 454, -432, -432, -432, -432, - -432, -432, -432, -432, -432, -432, -432, -432, -432, -432, - -432, -432, 330, -432, -120, 274, -432, 326, 364, -432, - 390, -432, -432, 394, -432, -432, 278, 16, -432, 354, - 276, -432, 27, 19, -22, 283, -432, 112, 19, 43, - 397, 47, -432, -432, 279, 371, -432, 426, 343, 290, - 75, -432, -432, -432, 306, 9, 13, 410, 146, 326, - 326, -64, 44, 296, 419, 651, 326, 101, 297, -51, - 326, 326, 419, -432, 419, -59, 299, 121, 419, 419, - 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, - 419, 419, 419, 378, 81, -432, 466, 84, 43, -432, - 200, 310, 84, -432, 411, 11, 277, -432, 326, -432, - 474, -432, -432, -432, -432, 326, -432, -432, -432, -432, - 326, 326, 403, 370, -432, 448, -432, 305, 307, -432, - -432, 309, -432, -432, -432, -432, 312, -432, 39, 313, - 403, -432, 69, -432, -432, 326, -432, -432, 314, 387, - -67, 32, 104, 326, 326, -432, 410, 388, 37, -432, - -432, -432, 376, 598, 669, 419, 317, 233, -432, 381, - 324, 669, 669, 669, 669, 719, 719, 719, 719, 101, - 101, 41, 41, 41, -96, 322, -432, -432, 114, 495, - -432, 120, -432, 306, -432, 78, -432, 321, -432, 26, - -432, 435, -432, -432, -432, 43, 43, 124, -432, 336, - 509, -432, 510, 511, 513, -432, 401, -432, -432, 418, - -432, 39, -432, 403, 126, -432, 143, -432, 326, 426, - 326, 326, -432, 72, 135, 348, -432, 419, 669, 233, - 349, 144, -432, -432, -432, -432, -432, 351, 429, -432, - -432, -432, 452, 456, 458, 438, 11, 534, -432, -432, - -432, 415, -432, -432, 532, 163, 366, 367, 368, -432, - -432, -432, 169, -432, -432, 48, 374, 43, 130, -432, - 326, -432, 651, 375, 176, -432, -432, 26, 11, -432, - -432, -432, 11, 271, 377, 326, 380, -432, 539, -432, - -432, -432, -432, -432, -432, -432, 43, -432, -432, -432, - -432, 431, 403, -25, -432, 382, 379, 326, 177, 326, - -432, -432, 15, 43, -432, -432, 43, 383, 385, -432 + 618, 65, 87, 127, 142, 87, 104, 68, 95, 60, + 87, 138, 87, 122, 18, 201, 51, 51, 51, 225, + 71, -321, 126, -321, 126, -321, -321, -321, -321, -321, + -321, -321, -321, -321, -321, -321, -321, -23, -321, 246, + 74, -321, 86, 185, -321, 153, 153, 153, 87, 288, + 87, 170, -321, 171, -49, 171, 171, 171, 87, -321, + 179, 133, -321, -321, -321, -321, -321, -321, 587, -321, + 204, -321, -321, 189, -23, 129, -321, 61, -321, 302, + 37, 314, 200, 318, 87, 87, 255, -321, 236, 164, + 341, 308, 87, 355, 355, 358, 87, 87, -321, 202, + 201, -321, 214, 360, 363, 207, 219, -321, -321, -321, + -23, 290, 280, -23, 24, -321, -321, -321, -321, 402, + -321, 403, -321, -321, -321, 233, 234, -321, -321, -321, + -321, 713, -321, -321, -321, -321, -321, -321, 369, -321, + 285, -40, 164, 326, -321, 355, 413, 66, 262, -46, + -321, -321, 328, 309, -321, 309, -321, -321, -321, -321, + -321, 416, -321, -321, 326, -321, -321, 345, -321, -321, + 129, -321, -321, 326, 345, 326, 160, -321, -321, 130, + -321, 37, -321, -321, -321, -321, -321, -321, -321, -321, + -321, -321, -321, -321, -321, -321, -321, -321, 87, 419, + 312, 35, 300, 8, 251, 256, 260, 230, 386, 263, + 396, -321, 278, -68, 449, -321, -321, -321, -321, -321, + -321, -321, -321, -321, -321, -321, -321, -321, -321, -321, + -321, 339, -321, 121, 264, -321, 326, 341, -321, 399, + -321, -321, 391, -321, -321, 266, 123, -321, 348, 269, + -321, 19, 24, -23, 271, -321, -34, 24, -68, 397, + 17, -321, -321, 276, 361, -321, 453, 335, 281, 141, + -321, -321, -321, 312, 6, 12, 401, 130, 326, 326, + 109, -43, 282, 396, 646, 326, 118, 286, -74, 326, + 326, 396, -321, 396, -55, 289, -44, 396, 396, 396, + 396, 396, 396, 396, 396, 396, 396, 396, 396, 396, + 396, 396, 360, 87, -321, 457, 37, -68, -321, 171, + 288, 37, -321, 416, 20, 255, -321, 326, -321, 459, + -321, -321, -321, -321, 326, -321, -321, -321, -321, 326, + 326, 413, 355, -321, 434, -321, 291, 293, -321, -321, + 294, -321, -321, -321, -321, 295, -321, 22, 297, 413, + -321, 35, -321, -321, 326, -321, -321, 303, 379, 131, + -56, 148, 326, 326, -321, 401, 381, 54, -321, -321, + -321, 365, 593, 664, 396, 316, 278, -321, 383, 319, + 664, 664, 664, 664, 714, 714, 714, 714, 118, 118, + 56, 56, 56, -87, 315, -321, -321, 167, 491, -321, + 168, -321, 312, -321, 144, -321, 320, -321, 28, -321, + 427, -321, -321, -321, -68, -68, 174, -321, 323, 495, + -321, 497, 498, 501, -321, 389, -321, -321, 406, -321, + 22, -321, 413, 176, -321, 180, -321, 326, 453, 326, + 326, -321, 44, 64, 336, -321, 396, 664, 278, 337, + 182, -321, -321, -321, -321, -321, 338, 412, -321, -321, + -321, 437, 438, 440, 420, 20, 517, -321, -321, -321, + 398, -321, -321, 516, 192, 349, 350, 351, -321, -321, + -321, 199, -321, -321, 39, 352, -68, 143, -321, 326, + -321, 646, 353, 208, -321, -321, 28, 20, -321, -321, + -321, 20, 270, 356, 326, 357, -321, 525, -321, -321, + -321, -321, -321, -321, -321, -68, -321, -321, -321, -321, + 78, 413, -24, -321, 362, 359, 326, 209, 326, -321, + -321, 13, -68, -321, -321, -68, 366, 364, -321 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -1024,13 +1023,13 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_int16 yydefact[] = { - 281, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 280, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 30, 30, 0, - 301, 3, 21, 19, 21, 18, 8, 9, 7, 11, - 16, 17, 13, 14, 12, 15, 10, 0, 280, 0, + 300, 3, 21, 19, 21, 18, 8, 9, 7, 11, + 16, 17, 13, 14, 12, 15, 10, 0, 279, 0, 267, 96, 33, 0, 44, 51, 51, 51, 0, 0, 0, 0, 266, 91, 0, 91, 91, 91, 0, 42, - 0, 282, 283, 29, 26, 28, 27, 1, 281, 2, + 0, 281, 282, 29, 26, 28, 27, 1, 280, 2, 0, 6, 5, 144, 0, 105, 106, 136, 88, 0, 154, 0, 0, 270, 0, 0, 130, 37, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, @@ -1039,82 +1038,80 @@ static const yytype_int16 yydefact[] = 251, 0, 246, 247, 256, 0, 153, 155, 238, 239, 240, 249, 241, 242, 243, 244, 32, 31, 0, 269, 0, 0, 100, 0, 95, 0, 0, 0, 0, 130, - 102, 90, 0, 40, 38, 40, 271, 89, 86, 87, - 285, 284, 0, 143, 123, 0, 113, 112, 136, 109, - 108, 110, 120, 116, 0, 136, 0, 0, 114, 252, - 255, 34, 0, 217, 218, 219, 220, 221, 222, 223, - 224, 225, 226, 227, 228, 229, 230, 253, 50, 0, - 0, 281, 0, 0, 234, 0, 0, 0, 0, 0, - 0, 0, 236, 0, 129, 158, 165, 166, 167, 160, - 162, 168, 161, 181, 169, 170, 171, 172, 164, 159, - 174, 175, 0, 302, 0, 0, 98, 0, 0, 101, - 0, 92, 93, 0, 36, 41, 24, 0, 22, 127, - 125, 151, 279, 150, 0, 135, 137, 142, 150, 146, - 148, 145, 254, 156, 0, 0, 47, 0, 0, 0, - 0, 52, 54, 55, 281, 124, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 177, 0, 176, 0, 0, - 0, 0, 0, 178, 0, 0, 0, 0, 0, 0, + 102, 90, 0, 40, 38, 40, 89, 86, 87, 284, + 283, 0, 143, 123, 0, 113, 112, 136, 109, 108, + 110, 120, 116, 0, 136, 0, 0, 114, 252, 255, + 34, 0, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 253, 50, 0, 0, + 280, 0, 0, 234, 0, 0, 0, 0, 0, 0, + 0, 236, 0, 129, 158, 165, 166, 167, 160, 162, + 168, 161, 181, 169, 170, 171, 172, 164, 159, 174, + 175, 0, 301, 0, 0, 98, 0, 0, 101, 0, + 92, 93, 0, 36, 41, 24, 0, 22, 127, 125, + 151, 278, 150, 0, 135, 137, 142, 150, 146, 148, + 145, 254, 156, 0, 0, 47, 0, 0, 0, 0, + 52, 54, 55, 280, 124, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 177, 0, 176, 0, 0, 0, + 0, 0, 178, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 99, 0, 0, 104, 103, - 91, 0, 0, 20, 0, 0, 130, 126, 0, 277, - 0, 278, 157, 107, 111, 0, 141, 140, 139, 115, - 0, 0, 0, 0, 58, 0, 63, 75, 0, 62, - 60, 0, 70, 69, 59, 67, 72, 57, 77, 0, - 0, 46, 0, 49, 213, 0, 235, 237, 0, 0, - 0, 0, 0, 0, 0, 200, 0, 0, 0, 173, - 163, 192, 193, 0, 188, 0, 0, 0, 179, 0, - 191, 190, 206, 207, 208, 209, 210, 211, 212, 183, - 182, 185, 184, 186, 187, 0, 35, 303, 0, 0, - 39, 0, 23, 281, 128, 257, 259, 0, 261, 275, - 260, 132, 152, 276, 138, 149, 147, 0, 45, 0, - 0, 61, 0, 0, 0, 68, 0, 81, 82, 0, - 56, 76, 78, 0, 0, 53, 0, 204, 0, 0, - 0, 0, 198, 0, 0, 0, 231, 0, 189, 0, - 0, 0, 180, 232, 97, 94, 25, 0, 0, 297, - 289, 295, 293, 296, 291, 0, 0, 0, 274, 265, - 272, 0, 122, 48, 0, 0, 0, 0, 0, 80, - 83, 79, 0, 85, 214, 0, 0, 202, 0, 201, - 0, 205, 233, 0, 0, 196, 194, 275, 0, 292, - 294, 290, 0, 258, 276, 0, 0, 74, 0, 64, - 66, 71, 84, 215, 216, 199, 203, 197, 195, 262, - 286, 298, 0, 134, 65, 0, 0, 0, 0, 0, - 131, 73, 0, 299, 287, 273, 133, 234, 0, 288 + 0, 0, 0, 0, 99, 0, 0, 104, 103, 91, + 0, 0, 20, 0, 0, 130, 126, 0, 276, 0, + 277, 157, 107, 111, 0, 141, 140, 139, 115, 0, + 0, 0, 0, 58, 0, 63, 75, 0, 62, 60, + 0, 70, 69, 59, 67, 72, 57, 77, 0, 0, + 46, 0, 49, 213, 0, 235, 237, 0, 0, 0, + 0, 0, 0, 0, 200, 0, 0, 0, 173, 163, + 192, 193, 0, 188, 0, 0, 0, 179, 0, 191, + 190, 206, 207, 208, 209, 210, 211, 212, 183, 182, + 185, 184, 186, 187, 0, 35, 302, 0, 0, 39, + 0, 23, 280, 128, 257, 259, 0, 261, 274, 260, + 132, 152, 275, 138, 149, 147, 0, 45, 0, 0, + 61, 0, 0, 0, 68, 0, 81, 82, 0, 56, + 76, 78, 0, 0, 53, 0, 204, 0, 0, 0, + 0, 198, 0, 0, 0, 231, 0, 189, 0, 0, + 0, 180, 232, 97, 94, 25, 0, 0, 296, 288, + 294, 292, 295, 290, 0, 0, 0, 273, 265, 271, + 0, 122, 48, 0, 0, 0, 0, 0, 80, 83, + 79, 0, 85, 214, 0, 0, 202, 0, 201, 0, + 205, 233, 0, 0, 196, 194, 274, 0, 291, 293, + 289, 0, 258, 275, 0, 0, 74, 0, 64, 66, + 71, 84, 215, 216, 199, 203, 197, 195, 262, 285, + 297, 0, 134, 65, 0, 0, 0, 0, 0, 131, + 73, 0, 298, 286, 272, 133, 234, 0, 287 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -432, -432, -432, 488, -432, 538, -432, 234, -432, 115, - -432, -432, -432, -432, 242, -92, 416, -432, -432, -432, - 182, -432, 208, -432, 117, -432, -432, -432, -432, 132, - -432, -432, -48, -432, -432, -432, -432, -432, -432, 433, - -432, -432, 338, -191, -85, -432, 5, -73, -41, -432, - -432, -86, 303, -432, -432, -432, -137, -432, -432, -114, - -432, 245, -432, -432, 35, -260, -432, -70, 251, -143, - -192, -432, -432, -432, -432, -432, -432, 302, -432, -432, - -432, -432, -432, -157, -432, -432, -432, -432, -432, 42, - -60, -89, -432, -432, -88, -432, -432, -432, -432, -432, - -431, 79, -432, -432, -432, 1, -432, -432, -432, 83, - 344, -432, -432, -432, -432, 491, -432, -432, -432, -432, - -320 + -321, -321, -321, 475, -321, 523, -321, 227, -321, 48, + -321, -321, -321, -321, 228, -89, 409, -321, -321, -321, + 42, -321, 190, -321, 106, -321, -321, -321, -321, 116, + -321, -321, -47, -321, -321, -321, -321, -321, -321, 415, + -321, -321, 321, -194, -85, -321, 125, -73, -42, -321, + -321, -86, 292, -321, -321, -321, -136, -321, -321, -106, + -321, 238, -321, -321, -11, -260, -321, -27, 240, -143, + -191, -321, -321, -321, -321, -321, -321, 298, -321, -321, + -321, -321, -321, -150, -321, -321, -321, -321, -321, 27, + -60, -91, -321, -321, -92, -321, -321, -321, -321, -321, + -299, 67, -321, -321, -321, 2, -321, -321, 73, 322, + -321, -321, -321, -321, 480, -321, -321, -321, -321, -320 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - 0, 19, 20, 21, 22, 71, 247, 248, 23, 64, - 24, 137, 25, 26, 88, 153, 244, 27, 28, 29, - 83, 270, 271, 272, 358, 435, 431, 440, 441, 442, - 273, 30, 92, 31, 241, 242, 32, 33, 34, 147, - 35, 149, 150, 36, 168, 169, 170, 76, 110, 111, - 173, 77, 165, 249, 326, 327, 144, 482, 540, 114, - 255, 256, 338, 104, 178, 250, 125, 126, 251, 252, - 215, 216, 217, 218, 219, 220, 221, 282, 222, 223, - 224, 225, 226, 195, 196, 197, 227, 228, 229, 230, - 231, 128, 129, 130, 131, 132, 133, 134, 135, 414, - 415, 416, 417, 418, 51, 419, 140, 157, 478, 479, - 480, 332, 37, 38, 61, 62, 420, 475, 544, 69, - 234 + 0, 19, 20, 21, 22, 71, 246, 247, 23, 64, + 24, 137, 25, 26, 88, 153, 243, 27, 28, 29, + 83, 269, 270, 271, 357, 434, 430, 439, 440, 441, + 272, 30, 92, 31, 240, 241, 32, 33, 34, 147, + 35, 149, 150, 36, 167, 168, 169, 76, 110, 111, + 172, 77, 164, 248, 325, 326, 144, 481, 539, 114, + 254, 255, 337, 104, 177, 249, 125, 126, 250, 251, + 214, 215, 216, 217, 218, 219, 220, 281, 221, 222, + 223, 224, 225, 194, 195, 196, 226, 227, 228, 229, + 230, 128, 129, 130, 131, 132, 133, 134, 135, 413, + 414, 415, 416, 417, 51, 418, 140, 477, 478, 479, + 331, 37, 38, 61, 62, 419, 474, 543, 69, 233 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1122,190 +1119,188 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 214, 106, 155, 41, 154, 154, 44, 95, 96, 97, - 266, 52, 239, 54, 40, 163, 366, 285, 547, 287, - 127, 164, 427, 262, 171, 539, 378, 171, 175, 329, - 329, 257, 143, 259, 261, 73, 113, 58, 298, 45, - 444, 385, 75, 55, 200, 513, 280, 290, 46, 86, - 290, 89, 56, 232, 253, 315, 154, 449, 316, 98, - 107, 258, 39, 290, 291, 281, 436, 291, 386, 275, - 289, 276, 267, 176, 236, 201, 313, 59, 47, 105, - 291, 531, 57, 363, 40, 141, 142, 93, 116, 117, - 118, 177, 285, 152, 318, 108, 268, 158, 159, 437, - 383, 341, 384, 468, 160, 446, 390, 391, 392, 393, - 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, - 404, 369, 263, 492, 380, 202, 94, 461, 238, 269, - 254, 109, 65, 66, 42, 373, 370, 371, 107, 450, - 288, 290, 438, 43, 469, 48, 290, 381, 382, 470, - 477, 330, 74, 328, 374, 471, 472, 290, 291, 439, - 375, 290, 290, 291, 204, 116, 117, 118, 171, 334, - 49, 119, 473, 108, 291, 298, -298, 474, 291, 291, - 367, 53, 212, 50, 364, 413, 290, 120, 499, 421, - 73, 323, 257, 458, 324, 451, 235, 425, 426, 504, - 264, 336, 60, 291, 368, 112, 205, 206, 207, 109, - 456, 312, 538, 313, 374, 328, 204, 116, 117, 118, - 452, 63, 467, 523, 388, 405, 290, 337, 84, 85, - 453, 454, 121, 122, 123, 298, 204, 116, 117, 118, - 67, 389, 500, 291, 290, 208, 525, 408, 119, 290, - 361, 428, 411, 362, 154, 533, -263, 127, 205, 206, - 207, 291, 127, 124, 120, 502, 291, 68, 309, 310, - 311, 312, 409, 313, 260, 70, 78, 80, 205, 206, - 207, 209, 183, 184, 185, 186, 187, 188, 333, 464, - 73, 81, 182, 339, 210, 466, 468, 208, 182, 483, - 119, 493, 316, 455, 316, 495, 82, 497, 498, 121, - 122, 123, 79, 87, 460, 406, 120, 208, 494, 506, - 119, 328, 328, 280, 90, 99, 91, 211, 212, 204, - 116, 117, 118, 209, 100, 213, 120, 469, 517, 102, - 124, 518, 470, 103, 522, 115, 210, 316, 471, 472, - 136, 528, 545, 209, 328, 316, 138, 526, 139, 143, - 145, 121, 122, 123, 146, 473, 210, 148, 151, -298, - 474, 205, 206, 207, 116, 156, 172, 74, 162, 211, - 212, 121, 122, 123, 118, 164, 503, 213, 179, 166, - 167, 174, 124, 180, 543, 182, 546, 181, 198, 211, - 212, 204, 116, 117, 118, 199, 233, 213, 237, 240, - 208, 243, 124, 119, 246, 112, 265, 15, 277, 274, - 278, 279, 204, 116, 117, 118, 286, 314, 320, 120, + 213, 106, 154, 154, 41, 155, 265, 44, 95, 96, + 97, 162, 52, 238, 54, 365, 546, 284, 163, 286, + 127, 426, 328, 40, 170, 377, 538, 170, 174, 261, + 256, 328, 258, 260, 73, 113, 143, 58, 266, 443, + 289, 116, 117, 118, 93, 384, 289, 297, 372, 435, + 86, 449, 89, 199, 154, 335, 231, 290, 289, 387, + 98, 252, 267, 290, 280, 65, 66, 373, 257, 288, + 107, 340, 385, 374, 235, 290, 388, 59, 175, 362, + 289, 336, 436, 94, 200, 312, 141, 142, 84, 85, + 40, 39, 284, 317, 152, 268, 176, 290, 157, 158, + 382, 379, 383, 467, 445, 108, 389, 390, 391, 392, + 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, + 403, 262, 491, 73, 119, 437, 460, 368, 253, 234, + 42, 289, 237, 289, 201, 369, 370, 112, 107, 287, + 120, 109, 438, 329, 468, 43, 380, 381, 290, 469, + 290, 74, 476, 289, 327, 470, 471, 50, 289, 535, + 498, 48, 75, 203, 116, 117, 118, 170, 333, 467, + 290, 499, 472, 108, 45, 290, 512, 473, 289, 366, + 211, 363, 274, 46, 275, 121, 122, 123, 49, 420, + 297, 256, 55, 457, 412, 290, 424, 425, 503, 105, + 263, 56, 63, 367, 60, 204, 205, 206, 536, 109, + 468, 537, 530, 47, 522, 469, 124, 53, 466, 279, + 404, 470, 471, 289, 159, 67, 311, 455, 312, 452, + 453, 57, 327, 203, 116, 117, 118, 70, 472, 450, + 290, 332, -297, 473, 207, 289, 338, 119, 68, 78, + 79, 154, 297, 427, 532, 448, 127, 289, 373, 524, + 80, 127, 290, 120, 451, 501, 182, 183, 184, 185, + 186, 187, 408, 259, 290, 204, 205, 206, 81, 82, + 208, 203, 116, 117, 118, 308, 309, 310, 311, 407, + 312, 87, 90, 209, 410, 467, 314, 91, 322, 315, + 102, 323, 454, 99, 494, 115, 496, 497, 121, 122, + 123, 100, 103, 459, 207, 405, 360, 119, 136, 361, + 138, 139, -263, 204, 205, 206, 210, 211, 145, 203, + 116, 117, 118, 120, 212, 73, 468, 143, 146, 124, + 279, 469, 463, 465, 148, 181, 181, 470, 471, 482, + 208, 492, 315, 151, 315, 493, 525, 505, 327, 116, + 327, 156, 207, 209, 472, 119, 118, 516, -297, 473, + 517, 204, 205, 206, 521, 163, 74, 315, 121, 122, + 123, 120, 165, 527, 544, 502, 327, 315, 161, 203, + 116, 117, 118, 542, 166, 545, 210, 211, 208, 203, + 116, 117, 118, 171, 212, 173, 178, 179, 180, 124, + 207, 209, 181, 119, 197, 198, 232, 236, 239, 245, + 242, 112, 264, 15, 273, 276, 121, 122, 123, 120, + 277, 282, 205, 206, 278, 285, 313, 319, 316, 320, + 321, 324, 205, 206, 210, 211, 208, 327, -264, 334, + 341, 339, 212, 342, 358, 359, 375, 124, 73, 209, + 406, 378, 422, 386, 428, 429, 291, 431, 432, 433, + 207, 442, 447, 119, 121, 122, 123, 343, 446, 289, + 207, 384, 344, 119, 345, 346, 461, 347, 462, 120, + 458, 312, 210, 211, 464, 348, 480, 483, 475, 120, + 212, 484, 292, 485, 486, 124, 283, 487, 488, 489, + 507, 500, 504, 506, 508, 509, 283, 510, 511, 209, + 513, 349, 515, 514, 518, 519, 520, 523, 526, 209, + 531, 534, 533, 541, 121, 122, 123, 540, 350, 548, + 351, 352, 275, 101, 121, 122, 123, 72, 409, 293, + 411, 444, 210, 211, 495, 353, 490, 202, 318, 354, + 212, 355, 210, 211, 244, 124, 364, 421, 547, 294, + 212, 356, 423, 330, 529, 124, 295, 296, 371, 528, + 160, 0, 0, 297, 298, 0, 0, -299, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 2, 0, 299, 300, 301, 302, 303, 3, + 0, 304, 305, 4, 306, 307, 308, 309, 310, 311, + 0, 312, 0, 5, 0, 1, 6, 7, 0, 0, + 0, 0, 0, 2, 0, 0, 0, 0, 8, 9, + 3, 0, 0, 0, 4, 0, 292, 0, 0, 10, + 0, 0, 11, 0, 5, 0, 0, 6, 7, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, + 9, 0, 0, 12, 0, 0, 0, 13, 0, 0, + 10, 0, 0, 11, 0, 0, 0, 0, 0, 0, + 0, 0, 14, 293, 0, 0, 0, 0, 15, 292, + 0, 0, 0, 0, 12, 0, 0, 456, 13, 0, + 0, 0, 0, 376, 0, 0, 0, 292, 0, 0, + 0, 296, 0, 14, 0, 0, 0, 297, 298, 15, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, + 17, 18, 0, 0, 0, 0, 293, 0, 299, 300, + 301, 302, 303, 0, 0, 304, 305, 0, 306, 307, + 308, 309, 310, 311, -300, 312, 376, 292, 0, 0, + 16, 17, 18, 0, 296, 0, 0, 0, 0, 0, + 297, 298, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 296, 0, 0, 0, 0, 0, 297, -300, + 0, 299, 300, 301, 302, 303, 0, 0, 304, 305, + 0, 306, 307, 308, 309, 310, 311, 0, 312, -300, + -300, -300, 302, 303, 0, 0, 304, 305, 0, 306, + 307, 308, 309, 310, 311, 0, 312, 0, 0, 0, + 0, 0, 296, 0, 0, 0, 0, 0, 297, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, - 193, 194, 321, 283, 206, 207, 209, 325, 317, -264, - 344, 340, 322, 342, 328, 345, 468, 346, 347, 210, - 348, 335, 359, 343, 360, 206, 207, 73, 349, 407, - 376, 292, 379, 387, 121, 122, 123, 423, 429, 430, - 448, 432, 208, 433, 462, 119, 434, 443, 385, 447, - 290, 459, 211, 212, 350, 463, 313, 469, 465, 476, - 213, 120, 470, 208, 481, 124, 119, 293, 471, 472, - 484, 351, 536, 352, 353, 485, 486, 487, 284, 488, - 489, 490, 120, 501, 505, 473, 507, 508, 354, 509, - 474, 210, 355, 510, 356, 511, 512, 514, 516, 284, - 515, 519, 520, 521, 357, 535, 121, 122, 123, 524, - 527, 532, 210, 542, 294, 534, 101, 541, 412, 276, - 549, 537, 72, 410, 211, 212, 496, 121, 122, 123, - 445, 245, 213, 491, 295, 203, 319, 124, 365, 422, - 424, 296, 297, 372, 548, 211, 212, 530, 298, 299, - 529, 161, -300, 213, 0, 0, 331, 0, 124, 1, - 0, 0, 0, 0, 0, 0, 0, 2, 0, 300, - 301, 302, 303, 304, 3, 0, 305, 306, 4, 307, - 308, 309, 310, 311, 312, 0, 313, 0, 5, 0, - 1, 6, 7, 0, 0, 0, 0, 0, 2, 0, - 0, 0, 0, 8, 9, 3, 0, 0, 0, 4, - 0, 293, 0, 0, 10, 0, 0, 11, 0, 5, - 0, 0, 6, 7, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 8, 9, 0, 0, 12, 0, - 0, 0, 13, 0, 0, 10, 0, 0, 11, 0, - 0, 0, 0, 0, 0, 0, 0, 14, 294, 0, - 0, 0, 0, 15, 293, 0, 0, 0, 0, 12, - 0, 0, 457, 13, 0, 0, 0, 0, 377, 0, - 0, 0, 293, 0, 0, 0, 297, 0, 14, 0, - 0, 0, 298, 299, 15, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 16, 17, 18, 0, 0, 0, - 0, 294, 0, 300, 301, 302, 303, 304, 0, 0, - 305, 306, 0, 307, 308, 309, 310, 311, 312, -301, - 313, 377, 293, 0, 0, 16, 17, 18, 0, 297, - 0, 0, 0, 0, 0, 298, 299, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 297, 0, 0, - 0, 0, 0, 298, -301, 0, 300, 301, 302, 303, - 304, 0, 0, 305, 306, 0, 307, 308, 309, 310, - 311, 312, 0, 313, -301, -301, -301, 303, 304, 0, - 0, 305, 306, 0, 307, 308, 309, 310, 311, 312, - 0, 313, 0, 0, 0, 0, 0, 297, 0, 0, - 0, 0, 0, 298, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, -301, -301, 0, - 0, -301, -301, 0, 307, 308, 309, 310, 311, 312, - 0, 313 + 193, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -300, -300, 0, 0, -300, -300, 0, 306, + 307, 308, 309, 310, 311, 0, 312 }; static const yytype_int16 yycheck[] = { - 143, 74, 94, 2, 93, 94, 5, 55, 56, 57, - 201, 10, 149, 12, 3, 103, 3, 209, 3, 211, - 80, 12, 342, 180, 110, 50, 286, 113, 113, 3, - 3, 174, 82, 176, 177, 57, 77, 19, 134, 70, - 360, 100, 37, 70, 93, 476, 110, 114, 79, 48, - 114, 50, 79, 145, 168, 175, 145, 124, 178, 58, - 9, 175, 26, 114, 131, 208, 27, 131, 127, 174, - 213, 176, 3, 54, 147, 124, 172, 59, 109, 74, - 131, 512, 109, 274, 3, 84, 85, 93, 4, 5, - 6, 72, 284, 92, 237, 44, 27, 96, 97, 60, - 292, 54, 294, 25, 99, 365, 298, 299, 300, 301, - 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, - 312, 278, 182, 443, 175, 174, 132, 387, 178, 60, - 171, 80, 17, 18, 3, 91, 279, 280, 9, 107, - 213, 114, 103, 3, 66, 93, 114, 290, 291, 71, - 124, 124, 174, 178, 110, 77, 78, 114, 131, 120, - 116, 114, 114, 131, 3, 4, 5, 6, 254, 254, - 93, 87, 94, 44, 131, 134, 98, 99, 131, 131, - 167, 79, 167, 97, 175, 174, 114, 103, 116, 326, - 57, 175, 335, 385, 178, 91, 63, 340, 341, 459, - 199, 89, 3, 131, 277, 76, 45, 46, 47, 80, - 173, 170, 532, 172, 110, 178, 3, 4, 5, 6, - 116, 151, 413, 175, 103, 313, 114, 115, 46, 47, - 373, 374, 148, 149, 150, 134, 3, 4, 5, 6, - 0, 120, 107, 131, 114, 84, 116, 317, 87, 114, - 175, 343, 322, 178, 343, 515, 178, 317, 45, 46, - 47, 131, 322, 179, 103, 457, 131, 177, 167, 168, - 169, 170, 320, 172, 113, 111, 3, 174, 45, 46, - 47, 120, 136, 137, 138, 139, 140, 141, 253, 175, - 57, 93, 178, 258, 133, 175, 25, 84, 178, 175, - 87, 175, 178, 376, 178, 448, 126, 450, 451, 148, - 149, 150, 176, 3, 387, 314, 103, 84, 175, 175, - 87, 178, 178, 110, 122, 124, 126, 166, 167, 3, - 4, 5, 6, 120, 178, 174, 103, 66, 175, 96, - 179, 178, 71, 123, 175, 3, 133, 178, 77, 78, - 4, 175, 175, 120, 178, 178, 120, 500, 3, 82, - 92, 148, 149, 150, 174, 94, 133, 3, 45, 98, - 99, 45, 46, 47, 4, 3, 113, 174, 174, 166, - 167, 148, 149, 150, 6, 12, 459, 174, 4, 175, - 175, 125, 179, 4, 537, 178, 539, 175, 45, 166, - 167, 3, 4, 5, 6, 130, 3, 174, 155, 90, - 84, 111, 179, 87, 3, 76, 3, 111, 174, 124, - 174, 174, 3, 4, 5, 6, 172, 97, 38, 103, - 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, - 146, 147, 48, 45, 46, 47, 120, 93, 174, 178, - 24, 54, 174, 174, 178, 29, 25, 31, 32, 133, - 34, 178, 119, 92, 174, 46, 47, 57, 42, 3, - 174, 17, 175, 174, 148, 149, 150, 3, 30, 174, - 93, 174, 84, 174, 103, 87, 174, 174, 100, 175, - 114, 174, 166, 167, 68, 173, 172, 66, 3, 178, - 174, 103, 71, 84, 69, 179, 87, 53, 77, 78, - 174, 85, 81, 87, 88, 6, 6, 6, 120, 6, - 119, 103, 103, 175, 175, 94, 175, 98, 102, 77, - 99, 133, 106, 77, 108, 77, 98, 3, 6, 120, - 125, 175, 175, 175, 118, 6, 148, 149, 150, 175, - 175, 174, 133, 174, 100, 175, 68, 175, 324, 176, - 175, 130, 24, 321, 166, 167, 449, 148, 149, 150, - 362, 155, 174, 441, 120, 142, 238, 179, 275, 328, - 335, 127, 128, 281, 542, 166, 167, 508, 134, 135, - 507, 100, 0, 174, -1, -1, 252, -1, 179, 7, - -1, -1, -1, -1, -1, -1, -1, 15, -1, 155, - 156, 157, 158, 159, 22, -1, 162, 163, 26, 165, - 166, 167, 168, 169, 170, -1, 172, -1, 36, -1, - 7, 39, 40, -1, -1, -1, -1, -1, 15, -1, - -1, -1, -1, 51, 52, 22, -1, -1, -1, 26, - -1, 53, -1, -1, 62, -1, -1, 65, -1, 36, - -1, -1, 39, 40, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 51, 52, -1, -1, 86, -1, - -1, -1, 90, -1, -1, 62, -1, -1, 65, -1, - -1, -1, -1, -1, -1, -1, -1, 105, 100, -1, - -1, -1, -1, 111, 53, -1, -1, -1, -1, 86, - -1, -1, 114, 90, -1, -1, -1, -1, 120, -1, - -1, -1, 53, -1, -1, -1, 128, -1, 105, -1, - -1, -1, 134, 135, 111, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 152, 153, 154, -1, -1, -1, - -1, 100, -1, 155, 156, 157, 158, 159, -1, -1, - 162, 163, -1, 165, 166, 167, 168, 169, 170, 100, - 172, 120, 53, -1, -1, 152, 153, 154, -1, 128, - -1, -1, -1, -1, -1, 134, 135, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 128, -1, -1, - -1, -1, -1, 134, 135, -1, 155, 156, 157, 158, - 159, -1, -1, 162, 163, -1, 165, 166, 167, 168, - 169, 170, -1, 172, 155, 156, 157, 158, 159, -1, - -1, 162, 163, -1, 165, 166, 167, 168, 169, 170, - -1, 172, -1, -1, -1, -1, -1, 128, -1, -1, - -1, -1, -1, 134, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 158, 159, -1, - -1, 162, 163, -1, 165, 166, 167, 168, 169, 170, - -1, 172 + 143, 74, 93, 94, 2, 94, 200, 5, 55, 56, + 57, 103, 10, 149, 12, 3, 3, 208, 12, 210, + 80, 341, 3, 3, 110, 285, 50, 113, 113, 179, + 173, 3, 175, 176, 57, 77, 82, 19, 3, 359, + 114, 4, 5, 6, 93, 100, 114, 134, 91, 27, + 48, 107, 50, 93, 145, 89, 145, 131, 114, 103, + 58, 167, 27, 131, 207, 17, 18, 110, 174, 212, + 9, 54, 127, 116, 147, 131, 120, 59, 54, 273, + 114, 115, 60, 132, 124, 172, 84, 85, 46, 47, + 3, 26, 283, 236, 92, 60, 72, 131, 96, 97, + 291, 175, 293, 25, 364, 44, 297, 298, 299, 300, + 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, + 311, 181, 442, 57, 87, 103, 386, 277, 170, 63, + 3, 114, 178, 114, 174, 278, 279, 76, 9, 212, + 103, 80, 120, 124, 66, 3, 289, 290, 131, 71, + 131, 174, 124, 114, 178, 77, 78, 97, 114, 81, + 116, 93, 37, 3, 4, 5, 6, 253, 253, 25, + 131, 107, 94, 44, 70, 131, 475, 99, 114, 167, + 167, 175, 174, 79, 176, 148, 149, 150, 93, 325, + 134, 334, 70, 384, 174, 131, 339, 340, 458, 74, + 198, 79, 151, 276, 3, 45, 46, 47, 130, 80, + 66, 531, 511, 109, 175, 71, 179, 79, 412, 110, + 312, 77, 78, 114, 99, 0, 170, 173, 172, 372, + 373, 109, 178, 3, 4, 5, 6, 111, 94, 91, + 131, 252, 98, 99, 84, 114, 257, 87, 177, 3, + 176, 342, 134, 342, 514, 124, 316, 114, 110, 116, + 174, 321, 131, 103, 116, 456, 136, 137, 138, 139, + 140, 141, 319, 113, 131, 45, 46, 47, 93, 126, + 120, 3, 4, 5, 6, 167, 168, 169, 170, 316, + 172, 3, 122, 133, 321, 25, 175, 126, 175, 178, + 96, 178, 375, 124, 447, 3, 449, 450, 148, 149, + 150, 178, 123, 386, 84, 313, 175, 87, 4, 178, + 120, 3, 178, 45, 46, 47, 166, 167, 92, 3, + 4, 5, 6, 103, 174, 57, 66, 82, 174, 179, + 110, 71, 175, 175, 3, 178, 178, 77, 78, 175, + 120, 175, 178, 45, 178, 175, 499, 175, 178, 4, + 178, 3, 84, 133, 94, 87, 6, 175, 98, 99, + 178, 45, 46, 47, 175, 12, 174, 178, 148, 149, + 150, 103, 175, 175, 175, 458, 178, 178, 174, 3, + 4, 5, 6, 536, 175, 538, 166, 167, 120, 3, + 4, 5, 6, 113, 174, 125, 4, 4, 175, 179, + 84, 133, 178, 87, 45, 130, 3, 155, 90, 3, + 111, 76, 3, 111, 124, 174, 148, 149, 150, 103, + 174, 45, 46, 47, 174, 172, 97, 38, 174, 48, + 174, 93, 46, 47, 166, 167, 120, 178, 178, 178, + 174, 54, 174, 92, 119, 174, 174, 179, 57, 133, + 3, 175, 3, 174, 30, 174, 17, 174, 174, 174, + 84, 174, 93, 87, 148, 149, 150, 24, 175, 114, + 84, 100, 29, 87, 31, 32, 103, 34, 173, 103, + 174, 172, 166, 167, 3, 42, 69, 174, 178, 103, + 174, 6, 53, 6, 6, 179, 120, 6, 119, 103, + 98, 175, 175, 175, 77, 77, 120, 77, 98, 133, + 3, 68, 6, 125, 175, 175, 175, 175, 175, 133, + 174, 6, 175, 174, 148, 149, 150, 175, 85, 175, + 87, 88, 176, 68, 148, 149, 150, 24, 320, 100, + 323, 361, 166, 167, 448, 102, 440, 142, 237, 106, + 174, 108, 166, 167, 155, 179, 274, 327, 541, 120, + 174, 118, 334, 251, 507, 179, 127, 128, 280, 506, + 100, -1, -1, 134, 135, -1, -1, 0, -1, -1, + -1, -1, -1, -1, 7, -1, -1, -1, -1, -1, + -1, -1, 15, -1, 155, 156, 157, 158, 159, 22, + -1, 162, 163, 26, 165, 166, 167, 168, 169, 170, + -1, 172, -1, 36, -1, 7, 39, 40, -1, -1, + -1, -1, -1, 15, -1, -1, -1, -1, 51, 52, + 22, -1, -1, -1, 26, -1, 53, -1, -1, 62, + -1, -1, 65, -1, 36, -1, -1, 39, 40, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 51, + 52, -1, -1, 86, -1, -1, -1, 90, -1, -1, + 62, -1, -1, 65, -1, -1, -1, -1, -1, -1, + -1, -1, 105, 100, -1, -1, -1, -1, 111, 53, + -1, -1, -1, -1, 86, -1, -1, 114, 90, -1, + -1, -1, -1, 120, -1, -1, -1, 53, -1, -1, + -1, 128, -1, 105, -1, -1, -1, 134, 135, 111, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 152, + 153, 154, -1, -1, -1, -1, 100, -1, 155, 156, + 157, 158, 159, -1, -1, 162, 163, -1, 165, 166, + 167, 168, 169, 170, 100, 172, 120, 53, -1, -1, + 152, 153, 154, -1, 128, -1, -1, -1, -1, -1, + 134, 135, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 128, -1, -1, -1, -1, -1, 134, 135, + -1, 155, 156, 157, 158, 159, -1, -1, 162, 163, + -1, 165, 166, 167, 168, 169, 170, -1, 172, 155, + 156, 157, 158, 159, -1, -1, 162, 163, -1, 165, + 166, 167, 168, 169, 170, -1, 172, -1, -1, -1, + -1, -1, 128, -1, -1, -1, -1, -1, 134, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 158, 159, -1, -1, 162, 163, -1, 165, + 166, 167, 168, 169, 170, -1, 172 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -1315,10 +1310,10 @@ static const yytype_int16 yystos[] = 0, 7, 15, 22, 26, 36, 39, 40, 51, 52, 62, 65, 86, 90, 105, 111, 152, 153, 154, 181, 182, 183, 184, 188, 190, 192, 193, 197, 198, 199, - 211, 213, 216, 217, 218, 220, 223, 292, 293, 26, + 211, 213, 216, 217, 218, 220, 223, 291, 292, 26, 3, 285, 3, 3, 285, 70, 79, 109, 93, 93, 97, 284, 285, 79, 285, 70, 79, 109, 19, 59, - 3, 294, 295, 151, 189, 189, 189, 0, 177, 299, + 3, 293, 294, 151, 189, 189, 189, 0, 177, 298, 111, 185, 185, 57, 174, 226, 227, 231, 3, 176, 174, 93, 126, 200, 200, 200, 285, 3, 194, 285, 122, 126, 212, 93, 132, 212, 212, 212, 285, 124, @@ -1327,46 +1322,46 @@ static const yytype_int16 yystos[] = 103, 148, 149, 150, 179, 246, 247, 270, 271, 272, 273, 274, 275, 276, 277, 278, 4, 191, 120, 3, 286, 285, 285, 82, 236, 92, 174, 219, 3, 221, - 222, 45, 285, 195, 271, 195, 3, 287, 285, 285, - 226, 295, 174, 274, 12, 232, 175, 175, 224, 225, - 226, 231, 113, 230, 125, 224, 54, 72, 244, 4, - 4, 175, 178, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, 263, 264, 265, 45, 130, - 93, 124, 174, 219, 3, 45, 46, 47, 84, 120, - 133, 166, 167, 174, 249, 250, 251, 252, 253, 254, - 255, 256, 258, 259, 260, 261, 262, 266, 267, 268, - 269, 270, 195, 3, 300, 63, 227, 155, 178, 236, - 90, 214, 215, 111, 196, 196, 3, 186, 187, 233, - 245, 248, 249, 239, 228, 240, 241, 249, 239, 249, - 113, 249, 263, 270, 285, 3, 223, 3, 27, 60, - 201, 202, 203, 210, 124, 174, 176, 174, 174, 174, - 110, 249, 257, 45, 120, 250, 172, 250, 227, 249, - 114, 131, 17, 53, 100, 120, 127, 128, 134, 135, - 155, 156, 157, 158, 159, 162, 163, 165, 166, 167, - 168, 169, 170, 172, 97, 175, 178, 174, 249, 222, - 38, 48, 174, 175, 178, 93, 234, 235, 178, 3, - 124, 290, 291, 244, 224, 178, 89, 115, 242, 244, - 54, 54, 174, 92, 24, 29, 31, 32, 34, 42, - 68, 85, 87, 88, 102, 106, 108, 118, 204, 119, - 174, 175, 178, 223, 175, 232, 3, 167, 227, 263, - 249, 249, 257, 91, 110, 116, 174, 120, 245, 175, - 175, 249, 249, 250, 250, 100, 127, 174, 103, 120, + 222, 45, 285, 195, 271, 195, 3, 285, 285, 226, + 294, 174, 274, 12, 232, 175, 175, 224, 225, 226, + 231, 113, 230, 125, 224, 54, 72, 244, 4, 4, + 175, 178, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 263, 264, 265, 45, 130, 93, + 124, 174, 219, 3, 45, 46, 47, 84, 120, 133, + 166, 167, 174, 249, 250, 251, 252, 253, 254, 255, + 256, 258, 259, 260, 261, 262, 266, 267, 268, 269, + 270, 195, 3, 299, 63, 227, 155, 178, 236, 90, + 214, 215, 111, 196, 196, 3, 186, 187, 233, 245, + 248, 249, 239, 228, 240, 241, 249, 239, 249, 113, + 249, 263, 270, 285, 3, 223, 3, 27, 60, 201, + 202, 203, 210, 124, 174, 176, 174, 174, 174, 110, + 249, 257, 45, 120, 250, 172, 250, 227, 249, 114, + 131, 17, 53, 100, 120, 127, 128, 134, 135, 155, + 156, 157, 158, 159, 162, 163, 165, 166, 167, 168, + 169, 170, 172, 97, 175, 178, 174, 249, 222, 38, + 48, 174, 175, 178, 93, 234, 235, 178, 3, 124, + 289, 290, 244, 224, 178, 89, 115, 242, 244, 54, + 54, 174, 92, 24, 29, 31, 32, 34, 42, 68, + 85, 87, 88, 102, 106, 108, 118, 204, 119, 174, + 175, 178, 223, 175, 232, 3, 167, 227, 263, 249, + 249, 257, 91, 110, 116, 174, 120, 245, 175, 175, + 249, 249, 250, 250, 100, 127, 174, 103, 120, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, - 250, 250, 250, 250, 250, 274, 285, 3, 247, 212, - 194, 247, 187, 174, 279, 280, 281, 282, 283, 285, - 296, 236, 248, 3, 241, 249, 249, 300, 195, 30, - 174, 206, 174, 174, 174, 205, 27, 60, 103, 120, - 207, 208, 209, 174, 300, 202, 245, 175, 93, 124, - 107, 91, 116, 249, 249, 227, 173, 114, 250, 174, - 227, 245, 103, 173, 175, 3, 175, 223, 25, 66, - 71, 77, 78, 94, 99, 297, 178, 124, 288, 289, - 290, 69, 237, 175, 174, 6, 6, 6, 6, 119, - 103, 209, 300, 175, 175, 249, 204, 249, 249, 116, - 107, 175, 250, 227, 245, 175, 175, 175, 98, 77, - 77, 77, 98, 280, 3, 125, 6, 175, 178, 175, - 175, 175, 175, 175, 175, 116, 249, 175, 175, 289, - 281, 280, 174, 245, 175, 6, 81, 130, 300, 50, - 238, 175, 174, 249, 298, 175, 249, 3, 269, 175 + 250, 250, 250, 250, 274, 285, 3, 247, 212, 194, + 247, 187, 174, 279, 280, 281, 282, 283, 285, 295, + 236, 248, 3, 241, 249, 249, 299, 195, 30, 174, + 206, 174, 174, 174, 205, 27, 60, 103, 120, 207, + 208, 209, 174, 299, 202, 245, 175, 93, 124, 107, + 91, 116, 249, 249, 227, 173, 114, 250, 174, 227, + 245, 103, 173, 175, 3, 175, 223, 25, 66, 71, + 77, 78, 94, 99, 296, 178, 124, 287, 288, 289, + 69, 237, 175, 174, 6, 6, 6, 6, 119, 103, + 209, 299, 175, 175, 249, 204, 249, 249, 116, 107, + 175, 250, 227, 245, 175, 175, 175, 98, 77, 77, + 77, 98, 280, 3, 125, 6, 175, 178, 175, 175, + 175, 175, 175, 175, 116, 249, 175, 175, 288, 281, + 280, 174, 245, 175, 6, 81, 130, 299, 50, 238, + 175, 174, 249, 297, 175, 249, 3, 269, 175 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ @@ -1399,10 +1394,10 @@ static const yytype_int16 yyr1[] = 270, 270, 270, 270, 270, 271, 272, 272, 273, 273, 274, 275, 276, 277, 277, 277, 278, 279, 279, 280, 280, 281, 281, 282, 282, 283, 284, 285, 285, 286, - 286, 287, 288, 288, 289, 289, 290, 290, 291, 291, - 292, 292, 293, 294, 294, 295, 296, 296, 296, 297, - 297, 297, 297, 297, 297, 297, 297, 297, 297, 298, - 299, 299, 300, 300 + 286, 287, 287, 288, 288, 289, 289, 290, 290, 291, + 291, 292, 293, 293, 294, 295, 295, 295, 296, 296, + 296, 296, 296, 296, 296, 296, 296, 296, 297, 298, + 298, 299, 299 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -1435,10 +1430,10 @@ static const yytype_int8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 2, 1, 1, 3, 1, 1, 1, 4, 1, 3, 2, 1, 1, 3, 1, - 0, 1, 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 + 0, 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 }; @@ -2004,25 +1999,25 @@ yydestruct (const char *yymsg, case YYSYMBOL_IDENTIFIER: /* IDENTIFIER */ #line 158 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2008 "bison_parser.cpp" +#line 2003 "bison_parser.cpp" break; case YYSYMBOL_STRING: /* STRING */ #line 158 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2014 "bison_parser.cpp" +#line 2009 "bison_parser.cpp" break; case YYSYMBOL_FLOATVAL: /* FLOATVAL */ #line 156 "bison_parser.y" { } -#line 2020 "bison_parser.cpp" +#line 2015 "bison_parser.cpp" break; case YYSYMBOL_INTVAL: /* INTVAL */ #line 156 "bison_parser.y" { } -#line 2026 "bison_parser.cpp" +#line 2021 "bison_parser.cpp" break; case YYSYMBOL_statement_list: /* statement_list */ @@ -2035,19 +2030,19 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).stmt_vec)); } -#line 2039 "bison_parser.cpp" +#line 2034 "bison_parser.cpp" break; case YYSYMBOL_statement: /* statement */ #line 167 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 2045 "bison_parser.cpp" +#line 2040 "bison_parser.cpp" break; case YYSYMBOL_preparable_statement: /* preparable_statement */ #line 167 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 2051 "bison_parser.cpp" +#line 2046 "bison_parser.cpp" break; case YYSYMBOL_opt_hints: /* opt_hints */ @@ -2060,7 +2055,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2064 "bison_parser.cpp" +#line 2059 "bison_parser.cpp" break; case YYSYMBOL_hint_list: /* hint_list */ @@ -2073,85 +2068,85 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2077 "bison_parser.cpp" +#line 2072 "bison_parser.cpp" break; case YYSYMBOL_hint: /* hint */ #line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2083 "bison_parser.cpp" +#line 2078 "bison_parser.cpp" break; case YYSYMBOL_transaction_statement: /* transaction_statement */ #line 167 "bison_parser.y" { delete (((*yyvaluep).transaction_stmt)); } -#line 2089 "bison_parser.cpp" +#line 2084 "bison_parser.cpp" break; case YYSYMBOL_prepare_statement: /* prepare_statement */ #line 167 "bison_parser.y" { delete (((*yyvaluep).prep_stmt)); } -#line 2095 "bison_parser.cpp" +#line 2090 "bison_parser.cpp" break; case YYSYMBOL_prepare_target_query: /* prepare_target_query */ #line 158 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2101 "bison_parser.cpp" +#line 2096 "bison_parser.cpp" break; case YYSYMBOL_execute_statement: /* execute_statement */ #line 167 "bison_parser.y" { delete (((*yyvaluep).exec_stmt)); } -#line 2107 "bison_parser.cpp" +#line 2102 "bison_parser.cpp" break; case YYSYMBOL_import_statement: /* import_statement */ #line 167 "bison_parser.y" { delete (((*yyvaluep).import_stmt)); } -#line 2113 "bison_parser.cpp" +#line 2108 "bison_parser.cpp" break; case YYSYMBOL_file_type: /* file_type */ #line 156 "bison_parser.y" { } -#line 2119 "bison_parser.cpp" +#line 2114 "bison_parser.cpp" break; case YYSYMBOL_file_path: /* file_path */ #line 158 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2125 "bison_parser.cpp" +#line 2120 "bison_parser.cpp" break; case YYSYMBOL_opt_file_type: /* opt_file_type */ #line 156 "bison_parser.y" { } -#line 2131 "bison_parser.cpp" +#line 2126 "bison_parser.cpp" break; case YYSYMBOL_export_statement: /* export_statement */ #line 167 "bison_parser.y" { delete (((*yyvaluep).export_stmt)); } -#line 2137 "bison_parser.cpp" +#line 2132 "bison_parser.cpp" break; case YYSYMBOL_show_statement: /* show_statement */ #line 167 "bison_parser.y" { delete (((*yyvaluep).show_stmt)); } -#line 2143 "bison_parser.cpp" +#line 2138 "bison_parser.cpp" break; case YYSYMBOL_create_statement: /* create_statement */ #line 167 "bison_parser.y" { delete (((*yyvaluep).create_stmt)); } -#line 2149 "bison_parser.cpp" +#line 2144 "bison_parser.cpp" break; case YYSYMBOL_opt_not_exists: /* opt_not_exists */ #line 156 "bison_parser.y" { } -#line 2155 "bison_parser.cpp" +#line 2150 "bison_parser.cpp" break; case YYSYMBOL_table_elem_commalist: /* table_elem_commalist */ @@ -2164,109 +2159,109 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).table_element_vec)); } -#line 2168 "bison_parser.cpp" +#line 2163 "bison_parser.cpp" break; case YYSYMBOL_table_elem: /* table_elem */ #line 167 "bison_parser.y" { delete (((*yyvaluep).table_element_t)); } -#line 2174 "bison_parser.cpp" +#line 2169 "bison_parser.cpp" break; case YYSYMBOL_column_def: /* column_def */ #line 167 "bison_parser.y" { delete (((*yyvaluep).column_t)); } -#line 2180 "bison_parser.cpp" +#line 2175 "bison_parser.cpp" break; case YYSYMBOL_column_type: /* column_type */ #line 156 "bison_parser.y" { } -#line 2186 "bison_parser.cpp" +#line 2181 "bison_parser.cpp" break; case YYSYMBOL_opt_time_specification: /* opt_time_specification */ #line 156 "bison_parser.y" { } -#line 2192 "bison_parser.cpp" +#line 2187 "bison_parser.cpp" break; case YYSYMBOL_opt_decimal_specification: /* opt_decimal_specification */ #line 156 "bison_parser.y" { } -#line 2198 "bison_parser.cpp" +#line 2193 "bison_parser.cpp" break; case YYSYMBOL_opt_column_constraints: /* opt_column_constraints */ #line 156 "bison_parser.y" { } -#line 2204 "bison_parser.cpp" +#line 2199 "bison_parser.cpp" break; case YYSYMBOL_column_constraint_list: /* column_constraint_list */ #line 156 "bison_parser.y" { } -#line 2210 "bison_parser.cpp" +#line 2205 "bison_parser.cpp" break; case YYSYMBOL_column_constraint: /* column_constraint */ #line 156 "bison_parser.y" { } -#line 2216 "bison_parser.cpp" +#line 2211 "bison_parser.cpp" break; case YYSYMBOL_table_constraint: /* table_constraint */ #line 167 "bison_parser.y" { delete (((*yyvaluep).table_constraint_t)); } -#line 2222 "bison_parser.cpp" +#line 2217 "bison_parser.cpp" break; case YYSYMBOL_drop_statement: /* drop_statement */ #line 167 "bison_parser.y" { delete (((*yyvaluep).drop_stmt)); } -#line 2228 "bison_parser.cpp" +#line 2223 "bison_parser.cpp" break; case YYSYMBOL_opt_exists: /* opt_exists */ #line 156 "bison_parser.y" { } -#line 2234 "bison_parser.cpp" +#line 2229 "bison_parser.cpp" break; case YYSYMBOL_alter_statement: /* alter_statement */ #line 167 "bison_parser.y" { delete (((*yyvaluep).alter_stmt)); } -#line 2240 "bison_parser.cpp" +#line 2235 "bison_parser.cpp" break; case YYSYMBOL_alter_action: /* alter_action */ #line 167 "bison_parser.y" { delete (((*yyvaluep).alter_action_t)); } -#line 2246 "bison_parser.cpp" +#line 2241 "bison_parser.cpp" break; case YYSYMBOL_drop_action: /* drop_action */ #line 167 "bison_parser.y" { delete (((*yyvaluep).drop_action_t)); } -#line 2252 "bison_parser.cpp" +#line 2247 "bison_parser.cpp" break; case YYSYMBOL_delete_statement: /* delete_statement */ #line 167 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2258 "bison_parser.cpp" +#line 2253 "bison_parser.cpp" break; case YYSYMBOL_truncate_statement: /* truncate_statement */ #line 167 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2264 "bison_parser.cpp" +#line 2259 "bison_parser.cpp" break; case YYSYMBOL_insert_statement: /* insert_statement */ #line 167 "bison_parser.y" { delete (((*yyvaluep).insert_stmt)); } -#line 2270 "bison_parser.cpp" +#line 2265 "bison_parser.cpp" break; case YYSYMBOL_opt_column_list: /* opt_column_list */ @@ -2279,13 +2274,13 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2283 "bison_parser.cpp" +#line 2278 "bison_parser.cpp" break; case YYSYMBOL_update_statement: /* update_statement */ #line 167 "bison_parser.y" { delete (((*yyvaluep).update_stmt)); } -#line 2289 "bison_parser.cpp" +#line 2284 "bison_parser.cpp" break; case YYSYMBOL_update_clause_commalist: /* update_clause_commalist */ @@ -2298,73 +2293,73 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).update_vec)); } -#line 2302 "bison_parser.cpp" +#line 2297 "bison_parser.cpp" break; case YYSYMBOL_update_clause: /* update_clause */ #line 167 "bison_parser.y" { delete (((*yyvaluep).update_t)); } -#line 2308 "bison_parser.cpp" +#line 2303 "bison_parser.cpp" break; case YYSYMBOL_select_statement: /* select_statement */ #line 167 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2314 "bison_parser.cpp" +#line 2309 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation: /* select_within_set_operation */ #line 167 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2320 "bison_parser.cpp" +#line 2315 "bison_parser.cpp" break; case YYSYMBOL_select_within_set_operation_no_parentheses: /* select_within_set_operation_no_parentheses */ #line 167 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2326 "bison_parser.cpp" +#line 2321 "bison_parser.cpp" break; case YYSYMBOL_select_with_paren: /* select_with_paren */ #line 167 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2332 "bison_parser.cpp" +#line 2327 "bison_parser.cpp" break; case YYSYMBOL_select_no_paren: /* select_no_paren */ #line 167 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2338 "bison_parser.cpp" +#line 2333 "bison_parser.cpp" break; case YYSYMBOL_set_operator: /* set_operator */ #line 167 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2344 "bison_parser.cpp" +#line 2339 "bison_parser.cpp" break; case YYSYMBOL_set_type: /* set_type */ #line 167 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2350 "bison_parser.cpp" +#line 2345 "bison_parser.cpp" break; case YYSYMBOL_opt_all: /* opt_all */ #line 156 "bison_parser.y" { } -#line 2356 "bison_parser.cpp" +#line 2351 "bison_parser.cpp" break; case YYSYMBOL_select_clause: /* select_clause */ #line 167 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2362 "bison_parser.cpp" +#line 2357 "bison_parser.cpp" break; case YYSYMBOL_opt_distinct: /* opt_distinct */ #line 156 "bison_parser.y" { } -#line 2368 "bison_parser.cpp" +#line 2363 "bison_parser.cpp" break; case YYSYMBOL_select_list: /* select_list */ @@ -2377,37 +2372,37 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2381 "bison_parser.cpp" +#line 2376 "bison_parser.cpp" break; case YYSYMBOL_opt_from_clause: /* opt_from_clause */ #line 167 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2387 "bison_parser.cpp" +#line 2382 "bison_parser.cpp" break; case YYSYMBOL_from_clause: /* from_clause */ #line 167 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2393 "bison_parser.cpp" +#line 2388 "bison_parser.cpp" break; case YYSYMBOL_opt_where: /* opt_where */ #line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2399 "bison_parser.cpp" +#line 2394 "bison_parser.cpp" break; case YYSYMBOL_opt_group: /* opt_group */ #line 167 "bison_parser.y" { delete (((*yyvaluep).group_t)); } -#line 2405 "bison_parser.cpp" +#line 2400 "bison_parser.cpp" break; case YYSYMBOL_opt_having: /* opt_having */ #line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2411 "bison_parser.cpp" +#line 2406 "bison_parser.cpp" break; case YYSYMBOL_opt_order: /* opt_order */ @@ -2420,7 +2415,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2424 "bison_parser.cpp" +#line 2419 "bison_parser.cpp" break; case YYSYMBOL_order_list: /* order_list */ @@ -2433,31 +2428,31 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2437 "bison_parser.cpp" +#line 2432 "bison_parser.cpp" break; case YYSYMBOL_order_desc: /* order_desc */ #line 167 "bison_parser.y" { delete (((*yyvaluep).order)); } -#line 2443 "bison_parser.cpp" +#line 2438 "bison_parser.cpp" break; case YYSYMBOL_opt_order_type: /* opt_order_type */ #line 156 "bison_parser.y" { } -#line 2449 "bison_parser.cpp" +#line 2444 "bison_parser.cpp" break; case YYSYMBOL_opt_top: /* opt_top */ #line 167 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2455 "bison_parser.cpp" +#line 2450 "bison_parser.cpp" break; case YYSYMBOL_opt_limit: /* opt_limit */ #line 167 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2461 "bison_parser.cpp" +#line 2456 "bison_parser.cpp" break; case YYSYMBOL_expr_list: /* expr_list */ @@ -2470,7 +2465,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2474 "bison_parser.cpp" +#line 2469 "bison_parser.cpp" break; case YYSYMBOL_opt_literal_list: /* opt_literal_list */ @@ -2483,7 +2478,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2487 "bison_parser.cpp" +#line 2482 "bison_parser.cpp" break; case YYSYMBOL_literal_list: /* literal_list */ @@ -2496,211 +2491,211 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2500 "bison_parser.cpp" +#line 2495 "bison_parser.cpp" break; case YYSYMBOL_expr_alias: /* expr_alias */ #line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2506 "bison_parser.cpp" +#line 2501 "bison_parser.cpp" break; case YYSYMBOL_expr: /* expr */ #line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2512 "bison_parser.cpp" +#line 2507 "bison_parser.cpp" break; case YYSYMBOL_operand: /* operand */ #line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2518 "bison_parser.cpp" +#line 2513 "bison_parser.cpp" break; case YYSYMBOL_scalar_expr: /* scalar_expr */ #line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2524 "bison_parser.cpp" +#line 2519 "bison_parser.cpp" break; case YYSYMBOL_unary_expr: /* unary_expr */ #line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2530 "bison_parser.cpp" +#line 2525 "bison_parser.cpp" break; case YYSYMBOL_binary_expr: /* binary_expr */ #line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2536 "bison_parser.cpp" +#line 2531 "bison_parser.cpp" break; case YYSYMBOL_logic_expr: /* logic_expr */ #line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2542 "bison_parser.cpp" +#line 2537 "bison_parser.cpp" break; case YYSYMBOL_in_expr: /* in_expr */ #line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2548 "bison_parser.cpp" +#line 2543 "bison_parser.cpp" break; case YYSYMBOL_case_expr: /* case_expr */ #line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2554 "bison_parser.cpp" +#line 2549 "bison_parser.cpp" break; case YYSYMBOL_case_list: /* case_list */ #line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2560 "bison_parser.cpp" +#line 2555 "bison_parser.cpp" break; case YYSYMBOL_exists_expr: /* exists_expr */ #line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2566 "bison_parser.cpp" +#line 2561 "bison_parser.cpp" break; case YYSYMBOL_comp_expr: /* comp_expr */ #line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2572 "bison_parser.cpp" +#line 2567 "bison_parser.cpp" break; case YYSYMBOL_function_expr: /* function_expr */ #line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2578 "bison_parser.cpp" +#line 2573 "bison_parser.cpp" break; case YYSYMBOL_extract_expr: /* extract_expr */ #line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2584 "bison_parser.cpp" +#line 2579 "bison_parser.cpp" break; case YYSYMBOL_cast_expr: /* cast_expr */ #line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2590 "bison_parser.cpp" +#line 2585 "bison_parser.cpp" break; case YYSYMBOL_datetime_field: /* datetime_field */ #line 156 "bison_parser.y" { } -#line 2596 "bison_parser.cpp" +#line 2591 "bison_parser.cpp" break; case YYSYMBOL_datetime_field_plural: /* datetime_field_plural */ #line 156 "bison_parser.y" { } -#line 2602 "bison_parser.cpp" +#line 2597 "bison_parser.cpp" break; case YYSYMBOL_duration_field: /* duration_field */ #line 156 "bison_parser.y" { } -#line 2608 "bison_parser.cpp" +#line 2603 "bison_parser.cpp" break; case YYSYMBOL_array_expr: /* array_expr */ #line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2614 "bison_parser.cpp" +#line 2609 "bison_parser.cpp" break; case YYSYMBOL_array_index: /* array_index */ #line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2620 "bison_parser.cpp" +#line 2615 "bison_parser.cpp" break; case YYSYMBOL_between_expr: /* between_expr */ #line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2626 "bison_parser.cpp" +#line 2621 "bison_parser.cpp" break; case YYSYMBOL_column_name: /* column_name */ #line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2632 "bison_parser.cpp" +#line 2627 "bison_parser.cpp" break; case YYSYMBOL_literal: /* literal */ #line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2638 "bison_parser.cpp" +#line 2633 "bison_parser.cpp" break; case YYSYMBOL_string_literal: /* string_literal */ #line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2644 "bison_parser.cpp" +#line 2639 "bison_parser.cpp" break; case YYSYMBOL_bool_literal: /* bool_literal */ #line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2650 "bison_parser.cpp" +#line 2645 "bison_parser.cpp" break; case YYSYMBOL_num_literal: /* num_literal */ #line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2656 "bison_parser.cpp" +#line 2651 "bison_parser.cpp" break; case YYSYMBOL_int_literal: /* int_literal */ #line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2662 "bison_parser.cpp" +#line 2657 "bison_parser.cpp" break; case YYSYMBOL_null_literal: /* null_literal */ #line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2668 "bison_parser.cpp" +#line 2663 "bison_parser.cpp" break; case YYSYMBOL_date_literal: /* date_literal */ #line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2674 "bison_parser.cpp" +#line 2669 "bison_parser.cpp" break; case YYSYMBOL_interval_literal: /* interval_literal */ #line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2680 "bison_parser.cpp" +#line 2675 "bison_parser.cpp" break; case YYSYMBOL_param_expr: /* param_expr */ #line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2686 "bison_parser.cpp" +#line 2681 "bison_parser.cpp" break; case YYSYMBOL_table_ref: /* table_ref */ #line 167 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2692 "bison_parser.cpp" +#line 2687 "bison_parser.cpp" break; case YYSYMBOL_table_ref_atomic: /* table_ref_atomic */ #line 167 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2698 "bison_parser.cpp" +#line 2693 "bison_parser.cpp" break; case YYSYMBOL_nonjoin_table_ref_atomic: /* nonjoin_table_ref_atomic */ #line 167 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2704 "bison_parser.cpp" +#line 2699 "bison_parser.cpp" break; case YYSYMBOL_table_ref_commalist: /* table_ref_commalist */ @@ -2713,103 +2708,97 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).table_vec)); } -#line 2717 "bison_parser.cpp" +#line 2712 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name: /* table_ref_name */ #line 167 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2723 "bison_parser.cpp" +#line 2718 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name_no_alias: /* table_ref_name_no_alias */ #line 167 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2729 "bison_parser.cpp" +#line 2724 "bison_parser.cpp" break; case YYSYMBOL_table_name: /* table_name */ #line 157 "bison_parser.y" { free( (((*yyvaluep).table_name).name) ); free( (((*yyvaluep).table_name).schema) ); } -#line 2735 "bison_parser.cpp" +#line 2730 "bison_parser.cpp" break; case YYSYMBOL_opt_index_name: /* opt_index_name */ #line 158 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2741 "bison_parser.cpp" - break; - - case YYSYMBOL_index_name: /* index_name */ -#line 158 "bison_parser.y" - { free( (((*yyvaluep).sval)) ); } -#line 2747 "bison_parser.cpp" +#line 2736 "bison_parser.cpp" break; case YYSYMBOL_table_alias: /* table_alias */ #line 167 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2753 "bison_parser.cpp" +#line 2742 "bison_parser.cpp" break; case YYSYMBOL_opt_table_alias: /* opt_table_alias */ #line 167 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2759 "bison_parser.cpp" +#line 2748 "bison_parser.cpp" break; case YYSYMBOL_alias: /* alias */ #line 167 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2765 "bison_parser.cpp" +#line 2754 "bison_parser.cpp" break; case YYSYMBOL_opt_alias: /* opt_alias */ #line 167 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2771 "bison_parser.cpp" +#line 2760 "bison_parser.cpp" break; case YYSYMBOL_opt_with_clause: /* opt_with_clause */ #line 167 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2777 "bison_parser.cpp" +#line 2766 "bison_parser.cpp" break; case YYSYMBOL_with_clause: /* with_clause */ #line 167 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2783 "bison_parser.cpp" +#line 2772 "bison_parser.cpp" break; case YYSYMBOL_with_description_list: /* with_description_list */ #line 167 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2789 "bison_parser.cpp" +#line 2778 "bison_parser.cpp" break; case YYSYMBOL_with_description: /* with_description */ #line 167 "bison_parser.y" { delete (((*yyvaluep).with_description_t)); } -#line 2795 "bison_parser.cpp" +#line 2784 "bison_parser.cpp" break; case YYSYMBOL_join_clause: /* join_clause */ #line 167 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2801 "bison_parser.cpp" +#line 2790 "bison_parser.cpp" break; case YYSYMBOL_opt_join_type: /* opt_join_type */ #line 156 "bison_parser.y" { } -#line 2807 "bison_parser.cpp" +#line 2796 "bison_parser.cpp" break; case YYSYMBOL_join_condition: /* join_condition */ #line 167 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2813 "bison_parser.cpp" +#line 2802 "bison_parser.cpp" break; case YYSYMBOL_ident_commalist: /* ident_commalist */ @@ -2822,7 +2811,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2826 "bison_parser.cpp" +#line 2815 "bison_parser.cpp" break; default: @@ -2930,7 +2919,7 @@ YYLTYPE yylloc = yyloc_default; yylloc.string_length = 0; } -#line 2934 "bison_parser.cpp" +#line 2923 "bison_parser.cpp" yylsp[0] = yylloc; goto yysetstate; @@ -3141,7 +3130,7 @@ YYLTYPE yylloc = yyloc_default; switch (yyn) { case 2: /* input: statement_list opt_semicolon */ -#line 291 "bison_parser.y" +#line 290 "bison_parser.y" { for (SQLStatement* stmt : *(yyvsp[-1].stmt_vec)) { // Transfers ownership of the statement. @@ -3159,253 +3148,253 @@ YYLTYPE yylloc = yyloc_default; } delete (yyvsp[-1].stmt_vec); } -#line 3163 "bison_parser.cpp" +#line 3152 "bison_parser.cpp" break; case 3: /* statement_list: statement */ -#line 312 "bison_parser.y" +#line 311 "bison_parser.y" { (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 3174 "bison_parser.cpp" +#line 3163 "bison_parser.cpp" break; case 4: /* statement_list: statement_list ';' statement */ -#line 318 "bison_parser.y" +#line 317 "bison_parser.y" { (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 3185 "bison_parser.cpp" +#line 3174 "bison_parser.cpp" break; case 5: /* statement: prepare_statement opt_hints */ -#line 327 "bison_parser.y" +#line 326 "bison_parser.y" { (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3194 "bison_parser.cpp" +#line 3183 "bison_parser.cpp" break; case 6: /* statement: preparable_statement opt_hints */ -#line 331 "bison_parser.y" +#line 330 "bison_parser.y" { (yyval.statement) = (yyvsp[-1].statement); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3203 "bison_parser.cpp" +#line 3192 "bison_parser.cpp" break; case 7: /* statement: show_statement */ -#line 335 "bison_parser.y" +#line 334 "bison_parser.y" { (yyval.statement) = (yyvsp[0].show_stmt); } -#line 3211 "bison_parser.cpp" +#line 3200 "bison_parser.cpp" break; case 8: /* statement: import_statement */ -#line 338 "bison_parser.y" +#line 337 "bison_parser.y" { (yyval.statement) = (yyvsp[0].import_stmt); } -#line 3219 "bison_parser.cpp" +#line 3208 "bison_parser.cpp" break; case 9: /* statement: export_statement */ -#line 341 "bison_parser.y" +#line 340 "bison_parser.y" { (yyval.statement) = (yyvsp[0].export_stmt); } -#line 3227 "bison_parser.cpp" +#line 3216 "bison_parser.cpp" break; case 10: /* preparable_statement: select_statement */ -#line 348 "bison_parser.y" +#line 347 "bison_parser.y" { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 3233 "bison_parser.cpp" +#line 3222 "bison_parser.cpp" break; case 11: /* preparable_statement: create_statement */ -#line 349 "bison_parser.y" +#line 348 "bison_parser.y" { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 3239 "bison_parser.cpp" +#line 3228 "bison_parser.cpp" break; case 12: /* preparable_statement: insert_statement */ -#line 350 "bison_parser.y" +#line 349 "bison_parser.y" { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 3245 "bison_parser.cpp" +#line 3234 "bison_parser.cpp" break; case 13: /* preparable_statement: delete_statement */ -#line 351 "bison_parser.y" +#line 350 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3251 "bison_parser.cpp" +#line 3240 "bison_parser.cpp" break; case 14: /* preparable_statement: truncate_statement */ -#line 352 "bison_parser.y" +#line 351 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3257 "bison_parser.cpp" +#line 3246 "bison_parser.cpp" break; case 15: /* preparable_statement: update_statement */ -#line 353 "bison_parser.y" +#line 352 "bison_parser.y" { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 3263 "bison_parser.cpp" +#line 3252 "bison_parser.cpp" break; case 16: /* preparable_statement: drop_statement */ -#line 354 "bison_parser.y" +#line 353 "bison_parser.y" { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 3269 "bison_parser.cpp" +#line 3258 "bison_parser.cpp" break; case 17: /* preparable_statement: alter_statement */ -#line 355 "bison_parser.y" +#line 354 "bison_parser.y" { (yyval.statement) = (yyvsp[0].alter_stmt); } -#line 3275 "bison_parser.cpp" +#line 3264 "bison_parser.cpp" break; case 18: /* preparable_statement: execute_statement */ -#line 356 "bison_parser.y" +#line 355 "bison_parser.y" { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 3281 "bison_parser.cpp" +#line 3270 "bison_parser.cpp" break; case 19: /* preparable_statement: transaction_statement */ -#line 357 "bison_parser.y" +#line 356 "bison_parser.y" { (yyval.statement) = (yyvsp[0].transaction_stmt); } -#line 3287 "bison_parser.cpp" +#line 3276 "bison_parser.cpp" break; case 20: /* opt_hints: WITH HINT '(' hint_list ')' */ -#line 366 "bison_parser.y" +#line 365 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 3293 "bison_parser.cpp" +#line 3282 "bison_parser.cpp" break; case 21: /* opt_hints: %empty */ -#line 367 "bison_parser.y" +#line 366 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 3299 "bison_parser.cpp" +#line 3288 "bison_parser.cpp" break; case 22: /* hint_list: hint */ -#line 372 "bison_parser.y" +#line 371 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3305 "bison_parser.cpp" +#line 3294 "bison_parser.cpp" break; case 23: /* hint_list: hint_list ',' hint */ -#line 373 "bison_parser.y" +#line 372 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3311 "bison_parser.cpp" +#line 3300 "bison_parser.cpp" break; case 24: /* hint: IDENTIFIER */ -#line 377 "bison_parser.y" +#line 376 "bison_parser.y" { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[0].sval); } -#line 3320 "bison_parser.cpp" +#line 3309 "bison_parser.cpp" break; case 25: /* hint: IDENTIFIER '(' literal_list ')' */ -#line 381 "bison_parser.y" +#line 380 "bison_parser.y" { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[-3].sval); (yyval.expr)->exprList = (yyvsp[-1].expr_vec); } -#line 3330 "bison_parser.cpp" +#line 3319 "bison_parser.cpp" break; case 26: /* transaction_statement: BEGIN opt_transaction_keyword */ -#line 393 "bison_parser.y" +#line 392 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kBeginTransaction); } -#line 3338 "bison_parser.cpp" +#line 3327 "bison_parser.cpp" break; case 27: /* transaction_statement: ROLLBACK opt_transaction_keyword */ -#line 396 "bison_parser.y" +#line 395 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kRollbackTransaction); } -#line 3346 "bison_parser.cpp" +#line 3335 "bison_parser.cpp" break; case 28: /* transaction_statement: COMMIT opt_transaction_keyword */ -#line 399 "bison_parser.y" +#line 398 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kCommitTransaction); } -#line 3354 "bison_parser.cpp" +#line 3343 "bison_parser.cpp" break; case 31: /* prepare_statement: PREPARE IDENTIFIER FROM prepare_target_query */ -#line 413 "bison_parser.y" +#line 412 "bison_parser.y" { (yyval.prep_stmt) = new PrepareStatement(); (yyval.prep_stmt)->name = (yyvsp[-2].sval); (yyval.prep_stmt)->query = (yyvsp[0].sval); } -#line 3364 "bison_parser.cpp" +#line 3353 "bison_parser.cpp" break; case 33: /* execute_statement: EXECUTE IDENTIFIER */ -#line 423 "bison_parser.y" +#line 422 "bison_parser.y" { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[0].sval); } -#line 3373 "bison_parser.cpp" +#line 3362 "bison_parser.cpp" break; case 34: /* execute_statement: EXECUTE IDENTIFIER '(' opt_literal_list ')' */ -#line 427 "bison_parser.y" +#line 426 "bison_parser.y" { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[-3].sval); (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); } -#line 3383 "bison_parser.cpp" +#line 3372 "bison_parser.cpp" break; case 35: /* import_statement: IMPORT FROM file_type FILE file_path INTO table_name */ -#line 441 "bison_parser.y" +#line 440 "bison_parser.y" { (yyval.import_stmt) = new ImportStatement((yyvsp[-4].import_type_t)); (yyval.import_stmt)->filePath = (yyvsp[-2].sval); (yyval.import_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3394 "bison_parser.cpp" +#line 3383 "bison_parser.cpp" break; case 36: /* import_statement: COPY table_name FROM file_path opt_file_type */ -#line 447 "bison_parser.y" +#line 446 "bison_parser.y" { (yyval.import_stmt) = new ImportStatement((yyvsp[0].import_type_t)); (yyval.import_stmt)->filePath = (yyvsp[-1].sval); (yyval.import_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3405 "bison_parser.cpp" +#line 3394 "bison_parser.cpp" break; case 37: /* file_type: IDENTIFIER */ -#line 456 "bison_parser.y" +#line 455 "bison_parser.y" { if (strcasecmp((yyvsp[0].sval), "csv") == 0) { (yyval.import_type_t) = kImportCSV; @@ -3420,70 +3409,70 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[0].sval)); } -#line 3424 "bison_parser.cpp" +#line 3413 "bison_parser.cpp" break; case 38: /* file_path: string_literal */ -#line 473 "bison_parser.y" +#line 472 "bison_parser.y" { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 3430 "bison_parser.cpp" +#line 3419 "bison_parser.cpp" break; case 39: /* opt_file_type: WITH FORMAT file_type */ -#line 477 "bison_parser.y" +#line 476 "bison_parser.y" { (yyval.import_type_t) = (yyvsp[0].import_type_t); } -#line 3438 "bison_parser.cpp" +#line 3427 "bison_parser.cpp" break; case 40: /* opt_file_type: %empty */ -#line 480 "bison_parser.y" +#line 479 "bison_parser.y" { (yyval.import_type_t) = kImportAuto; } -#line 3444 "bison_parser.cpp" +#line 3433 "bison_parser.cpp" break; case 41: /* export_statement: COPY table_name TO file_path opt_file_type */ -#line 489 "bison_parser.y" +#line 488 "bison_parser.y" { (yyval.export_stmt) = new ExportStatement((yyvsp[0].import_type_t)); (yyval.export_stmt)->filePath = (yyvsp[-1].sval); (yyval.export_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.export_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3455 "bison_parser.cpp" +#line 3444 "bison_parser.cpp" break; case 42: /* show_statement: SHOW TABLES */ -#line 503 "bison_parser.y" +#line 502 "bison_parser.y" { (yyval.show_stmt) = new ShowStatement(kShowTables); } -#line 3463 "bison_parser.cpp" +#line 3452 "bison_parser.cpp" break; case 43: /* show_statement: SHOW COLUMNS table_name */ -#line 506 "bison_parser.y" +#line 505 "bison_parser.y" { (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 3473 "bison_parser.cpp" +#line 3462 "bison_parser.cpp" break; case 44: /* show_statement: DESCRIBE table_name */ -#line 511 "bison_parser.y" +#line 510 "bison_parser.y" { (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 3483 "bison_parser.cpp" +#line 3472 "bison_parser.cpp" break; case 45: /* create_statement: CREATE TABLE opt_not_exists table_name FROM IDENTIFIER FILE file_path */ -#line 525 "bison_parser.y" +#line 524 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTableFromTbl); (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); @@ -3497,11 +3486,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].sval)); (yyval.create_stmt)->filePath = (yyvsp[0].sval); } -#line 3501 "bison_parser.cpp" +#line 3490 "bison_parser.cpp" break; case 46: /* create_statement: CREATE TABLE opt_not_exists table_name '(' table_elem_commalist ')' */ -#line 538 "bison_parser.y" +#line 537 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -3510,11 +3499,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->setColumnDefsAndConstraints((yyvsp[-1].table_element_vec)); delete (yyvsp[-1].table_element_vec); } -#line 3514 "bison_parser.cpp" +#line 3503 "bison_parser.cpp" break; case 47: /* create_statement: CREATE TABLE opt_not_exists table_name AS select_statement */ -#line 546 "bison_parser.y" +#line 545 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-3].bval); @@ -3522,11 +3511,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-2].table_name).name; (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3526 "bison_parser.cpp" +#line 3515 "bison_parser.cpp" break; case 48: /* create_statement: CREATE INDEX opt_not_exists opt_index_name ON table_name '(' ident_commalist ')' */ -#line 553 "bison_parser.y" +#line 552 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateIndex); (yyval.create_stmt)->indexName = (yyvsp[-5].sval); @@ -3534,11 +3523,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->indexColumns = (yyvsp[-1].str_vec); } -#line 3538 "bison_parser.cpp" +#line 3527 "bison_parser.cpp" break; case 49: /* create_statement: CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement */ -#line 560 "bison_parser.y" +#line 559 "bison_parser.y" { (yyval.create_stmt) = new CreateStatement(kCreateView); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -3547,330 +3536,330 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3551 "bison_parser.cpp" +#line 3540 "bison_parser.cpp" break; case 50: /* opt_not_exists: IF NOT EXISTS */ -#line 571 "bison_parser.y" +#line 570 "bison_parser.y" { (yyval.bval) = true; } -#line 3557 "bison_parser.cpp" +#line 3546 "bison_parser.cpp" break; case 51: /* opt_not_exists: %empty */ -#line 572 "bison_parser.y" +#line 571 "bison_parser.y" { (yyval.bval) = false; } -#line 3563 "bison_parser.cpp" +#line 3552 "bison_parser.cpp" break; case 52: /* table_elem_commalist: table_elem */ -#line 576 "bison_parser.y" +#line 575 "bison_parser.y" { (yyval.table_element_vec) = new std::vector(); (yyval.table_element_vec)->push_back((yyvsp[0].table_element_t)); } -#line 3569 "bison_parser.cpp" +#line 3558 "bison_parser.cpp" break; case 53: /* table_elem_commalist: table_elem_commalist ',' table_elem */ -#line 577 "bison_parser.y" +#line 576 "bison_parser.y" { (yyvsp[-2].table_element_vec)->push_back((yyvsp[0].table_element_t)); (yyval.table_element_vec) = (yyvsp[-2].table_element_vec); } -#line 3575 "bison_parser.cpp" +#line 3564 "bison_parser.cpp" break; case 54: /* table_elem: column_def */ -#line 581 "bison_parser.y" +#line 580 "bison_parser.y" { (yyval.table_element_t) = (yyvsp[0].column_t); } -#line 3581 "bison_parser.cpp" +#line 3570 "bison_parser.cpp" break; case 55: /* table_elem: table_constraint */ -#line 582 "bison_parser.y" +#line 581 "bison_parser.y" { (yyval.table_element_t) = (yyvsp[0].table_constraint_t); } -#line 3587 "bison_parser.cpp" +#line 3576 "bison_parser.cpp" break; case 56: /* column_def: IDENTIFIER column_type opt_column_constraints */ -#line 586 "bison_parser.y" +#line 585 "bison_parser.y" { (yyval.column_t) = new ColumnDefinition((yyvsp[-2].sval), (yyvsp[-1].column_type_t), (yyvsp[0].column_constraint_vec)); (yyval.column_t)->setNullableExplicit(); } -#line 3596 "bison_parser.cpp" +#line 3585 "bison_parser.cpp" break; case 57: /* column_type: INT */ -#line 593 "bison_parser.y" +#line 592 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3602 "bison_parser.cpp" +#line 3591 "bison_parser.cpp" break; case 58: /* column_type: INTEGER */ -#line 594 "bison_parser.y" +#line 593 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3608 "bison_parser.cpp" +#line 3597 "bison_parser.cpp" break; case 59: /* column_type: LONG */ -#line 595 "bison_parser.y" +#line 594 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::LONG}; } -#line 3614 "bison_parser.cpp" +#line 3603 "bison_parser.cpp" break; case 60: /* column_type: FLOAT */ -#line 596 "bison_parser.y" +#line 595 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3620 "bison_parser.cpp" +#line 3609 "bison_parser.cpp" break; case 61: /* column_type: DECIMAL opt_decimal_specification */ -#line 597 "bison_parser.y" +#line 596 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DECIMAL, 0, (yyvsp[0].column_specification_t)}; } -#line 3626 "bison_parser.cpp" +#line 3615 "bison_parser.cpp" break; case 62: /* column_type: DOUBLE */ -#line 598 "bison_parser.y" +#line 597 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } -#line 3632 "bison_parser.cpp" +#line 3621 "bison_parser.cpp" break; case 63: /* column_type: REAL */ -#line 599 "bison_parser.y" +#line 598 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::REAL}; } -#line 3638 "bison_parser.cpp" +#line 3627 "bison_parser.cpp" break; case 64: /* column_type: VARCHAR '(' INTVAL ')' */ -#line 600 "bison_parser.y" +#line 599 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3644 "bison_parser.cpp" +#line 3633 "bison_parser.cpp" break; case 65: /* column_type: CHARACTER VARYING '(' INTVAL ')' */ -#line 601 "bison_parser.y" +#line 600 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3650 "bison_parser.cpp" +#line 3639 "bison_parser.cpp" break; case 66: /* column_type: CHAR '(' INTVAL ')' */ -#line 602 "bison_parser.y" +#line 601 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } -#line 3656 "bison_parser.cpp" +#line 3645 "bison_parser.cpp" break; case 67: /* column_type: TEXT */ -#line 603 "bison_parser.y" +#line 602 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } -#line 3662 "bison_parser.cpp" +#line 3651 "bison_parser.cpp" break; case 68: /* column_type: TIME opt_time_specification */ -#line 604 "bison_parser.y" +#line 603 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TIME, 0, (yyvsp[0].column_specification_t) }; } -#line 3668 "bison_parser.cpp" +#line 3657 "bison_parser.cpp" break; case 69: /* column_type: DATETIME */ -#line 605 "bison_parser.y" +#line 604 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } -#line 3674 "bison_parser.cpp" +#line 3663 "bison_parser.cpp" break; case 70: /* column_type: DATE */ -#line 606 "bison_parser.y" +#line 605 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATE}; } -#line 3680 "bison_parser.cpp" +#line 3669 "bison_parser.cpp" break; case 71: /* opt_time_specification: '(' INTVAL ')' */ -#line 610 "bison_parser.y" +#line 609 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-1].ival)}; } -#line 3686 "bison_parser.cpp" +#line 3675 "bison_parser.cpp" break; case 72: /* opt_time_specification: %empty */ -#line 611 "bison_parser.y" +#line 610 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{}; } -#line 3692 "bison_parser.cpp" +#line 3681 "bison_parser.cpp" break; case 73: /* opt_decimal_specification: '(' INTVAL ',' INTVAL ')' */ -#line 615 "bison_parser.y" +#line 614 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-3].ival), (yyvsp[-1].ival)}; } -#line 3698 "bison_parser.cpp" +#line 3687 "bison_parser.cpp" break; case 74: /* opt_decimal_specification: '(' INTVAL ')' */ -#line 616 "bison_parser.y" +#line 615 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{(yyvsp[-1].ival)}; } -#line 3704 "bison_parser.cpp" +#line 3693 "bison_parser.cpp" break; case 75: /* opt_decimal_specification: %empty */ -#line 617 "bison_parser.y" +#line 616 "bison_parser.y" { (yyval.column_specification_t) = ColumnSpecification{}; } -#line 3710 "bison_parser.cpp" +#line 3699 "bison_parser.cpp" break; case 76: /* opt_column_constraints: column_constraint_list */ -#line 621 "bison_parser.y" +#line 620 "bison_parser.y" { (yyval.column_constraint_vec) = (yyvsp[0].column_constraint_vec); } -#line 3716 "bison_parser.cpp" +#line 3705 "bison_parser.cpp" break; case 77: /* opt_column_constraints: %empty */ -#line 622 "bison_parser.y" +#line 621 "bison_parser.y" { (yyval.column_constraint_vec) = new std::vector(); } -#line 3722 "bison_parser.cpp" +#line 3711 "bison_parser.cpp" break; case 78: /* column_constraint_list: column_constraint */ -#line 626 "bison_parser.y" +#line 625 "bison_parser.y" { (yyval.column_constraint_vec) = new std::vector(); (yyval.column_constraint_vec)->push_back((yyvsp[0].column_constraint_t)); } -#line 3728 "bison_parser.cpp" +#line 3717 "bison_parser.cpp" break; case 79: /* column_constraint_list: column_constraint_list column_constraint */ -#line 627 "bison_parser.y" +#line 626 "bison_parser.y" { (yyvsp[-1].column_constraint_vec)->push_back((yyvsp[0].column_constraint_t)); (yyval.column_constraint_vec) = (yyvsp[-1].column_constraint_vec); } -#line 3734 "bison_parser.cpp" +#line 3723 "bison_parser.cpp" break; case 80: /* column_constraint: PRIMARY KEY */ -#line 630 "bison_parser.y" +#line 629 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::PrimaryKey; } -#line 3740 "bison_parser.cpp" +#line 3729 "bison_parser.cpp" break; case 81: /* column_constraint: UNIQUE */ -#line 631 "bison_parser.y" +#line 630 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::Unique; } -#line 3746 "bison_parser.cpp" +#line 3735 "bison_parser.cpp" break; case 82: /* column_constraint: NULL */ -#line 632 "bison_parser.y" +#line 631 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::Null; } -#line 3752 "bison_parser.cpp" +#line 3741 "bison_parser.cpp" break; case 83: /* column_constraint: NOT NULL */ -#line 633 "bison_parser.y" +#line 632 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::NotNull; } -#line 3758 "bison_parser.cpp" +#line 3747 "bison_parser.cpp" break; case 84: /* table_constraint: PRIMARY KEY '(' ident_commalist ')' */ -#line 637 "bison_parser.y" +#line 636 "bison_parser.y" { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::PrimaryKey, (yyvsp[-1].str_vec)); } -#line 3764 "bison_parser.cpp" +#line 3753 "bison_parser.cpp" break; case 85: /* table_constraint: UNIQUE '(' ident_commalist ')' */ -#line 638 "bison_parser.y" +#line 637 "bison_parser.y" { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::Unique, (yyvsp[-1].str_vec)); } -#line 3770 "bison_parser.cpp" +#line 3759 "bison_parser.cpp" break; case 86: /* drop_statement: DROP TABLE opt_exists table_name */ -#line 649 "bison_parser.y" +#line 648 "bison_parser.y" { (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 3781 "bison_parser.cpp" +#line 3770 "bison_parser.cpp" break; case 87: /* drop_statement: DROP VIEW opt_exists table_name */ -#line 655 "bison_parser.y" +#line 654 "bison_parser.y" { (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 3792 "bison_parser.cpp" +#line 3781 "bison_parser.cpp" break; case 88: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ -#line 661 "bison_parser.y" +#line 660 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); (yyval.drop_stmt)->ifExists = false; (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 3802 "bison_parser.cpp" +#line 3791 "bison_parser.cpp" break; - case 89: /* drop_statement: DROP INDEX opt_exists index_name */ -#line 667 "bison_parser.y" + case 89: /* drop_statement: DROP INDEX opt_exists IDENTIFIER */ +#line 666 "bison_parser.y" { (yyval.drop_stmt) = new DropStatement(kDropIndex); (yyval.drop_stmt)->ifExists = (yyvsp[-1].bval); (yyval.drop_stmt)->indexName = (yyvsp[0].sval); } -#line 3812 "bison_parser.cpp" +#line 3801 "bison_parser.cpp" break; case 90: /* opt_exists: IF EXISTS */ -#line 675 "bison_parser.y" +#line 674 "bison_parser.y" { (yyval.bval) = true; } -#line 3818 "bison_parser.cpp" +#line 3807 "bison_parser.cpp" break; case 91: /* opt_exists: %empty */ -#line 676 "bison_parser.y" +#line 675 "bison_parser.y" { (yyval.bval) = false; } -#line 3824 "bison_parser.cpp" +#line 3813 "bison_parser.cpp" break; case 92: /* alter_statement: ALTER TABLE opt_exists table_name alter_action */ -#line 685 "bison_parser.y" +#line 684 "bison_parser.y" { (yyval.alter_stmt) = new AlterStatement((yyvsp[-1].table_name).name, (yyvsp[0].alter_action_t)); (yyval.alter_stmt)->ifTableExists = (yyvsp[-2].bval); (yyval.alter_stmt)->schema = (yyvsp[-1].table_name).schema; } -#line 3834 "bison_parser.cpp" +#line 3823 "bison_parser.cpp" break; case 93: /* alter_action: drop_action */ -#line 693 "bison_parser.y" +#line 692 "bison_parser.y" {(yyval.alter_action_t) = (yyvsp[0].drop_action_t);} -#line 3840 "bison_parser.cpp" +#line 3829 "bison_parser.cpp" break; case 94: /* drop_action: DROP COLUMN opt_exists IDENTIFIER */ -#line 696 "bison_parser.y" +#line 695 "bison_parser.y" { (yyval.drop_action_t) = new DropColumnAction((yyvsp[0].sval)); (yyval.drop_action_t)->ifExists = (yyvsp[-1].bval); } -#line 3849 "bison_parser.cpp" +#line 3838 "bison_parser.cpp" break; case 95: /* delete_statement: DELETE FROM table_name opt_where */ -#line 708 "bison_parser.y" +#line 707 "bison_parser.y" { (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 3860 "bison_parser.cpp" +#line 3849 "bison_parser.cpp" break; case 96: /* truncate_statement: TRUNCATE table_name */ -#line 717 "bison_parser.y" +#line 716 "bison_parser.y" { (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3870 "bison_parser.cpp" +#line 3859 "bison_parser.cpp" break; case 97: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */ -#line 730 "bison_parser.y" +#line 729 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertValues); (yyval.insert_stmt)->schema = (yyvsp[-5].table_name).schema; @@ -3878,11 +3867,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } -#line 3882 "bison_parser.cpp" +#line 3871 "bison_parser.cpp" break; case 98: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */ -#line 737 "bison_parser.y" +#line 736 "bison_parser.y" { (yyval.insert_stmt) = new InsertStatement(kInsertSelect); (yyval.insert_stmt)->schema = (yyvsp[-2].table_name).schema; @@ -3890,74 +3879,74 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } -#line 3894 "bison_parser.cpp" +#line 3883 "bison_parser.cpp" break; case 99: /* opt_column_list: '(' ident_commalist ')' */ -#line 748 "bison_parser.y" +#line 747 "bison_parser.y" { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 3900 "bison_parser.cpp" +#line 3889 "bison_parser.cpp" break; case 100: /* opt_column_list: %empty */ -#line 749 "bison_parser.y" +#line 748 "bison_parser.y" { (yyval.str_vec) = nullptr; } -#line 3906 "bison_parser.cpp" +#line 3895 "bison_parser.cpp" break; case 101: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ -#line 759 "bison_parser.y" +#line 758 "bison_parser.y" { (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 3917 "bison_parser.cpp" +#line 3906 "bison_parser.cpp" break; case 102: /* update_clause_commalist: update_clause */ -#line 768 "bison_parser.y" +#line 767 "bison_parser.y" { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 3923 "bison_parser.cpp" +#line 3912 "bison_parser.cpp" break; case 103: /* update_clause_commalist: update_clause_commalist ',' update_clause */ -#line 769 "bison_parser.y" +#line 768 "bison_parser.y" { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 3929 "bison_parser.cpp" +#line 3918 "bison_parser.cpp" break; case 104: /* update_clause: IDENTIFIER '=' expr */ -#line 773 "bison_parser.y" +#line 772 "bison_parser.y" { (yyval.update_t) = new UpdateClause(); (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 3939 "bison_parser.cpp" +#line 3928 "bison_parser.cpp" break; case 105: /* select_statement: opt_with_clause select_with_paren */ -#line 785 "bison_parser.y" +#line 784 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3948 "bison_parser.cpp" +#line 3937 "bison_parser.cpp" break; case 106: /* select_statement: opt_with_clause select_no_paren */ -#line 789 "bison_parser.y" +#line 788 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3957 "bison_parser.cpp" +#line 3946 "bison_parser.cpp" break; case 107: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */ -#line 793 "bison_parser.y" +#line 792 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3969,17 +3958,17 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); (yyval.select_stmt)->withDescriptions = (yyvsp[-5].with_description_vec); } -#line 3973 "bison_parser.cpp" +#line 3962 "bison_parser.cpp" break; case 110: /* select_within_set_operation_no_parentheses: select_clause */ -#line 811 "bison_parser.y" +#line 810 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[0].select_stmt); } -#line 3979 "bison_parser.cpp" +#line 3968 "bison_parser.cpp" break; case 111: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */ -#line 812 "bison_parser.y" +#line 811 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -3988,23 +3977,23 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->push_back((yyvsp[-1].set_operator_t)); (yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[0].select_stmt); } -#line 3992 "bison_parser.cpp" +#line 3981 "bison_parser.cpp" break; case 112: /* select_with_paren: '(' select_no_paren ')' */ -#line 823 "bison_parser.y" +#line 822 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3998 "bison_parser.cpp" +#line 3987 "bison_parser.cpp" break; case 113: /* select_with_paren: '(' select_with_paren ')' */ -#line 824 "bison_parser.y" +#line 823 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 4004 "bison_parser.cpp" +#line 3993 "bison_parser.cpp" break; case 114: /* select_no_paren: select_clause opt_order opt_limit */ -#line 828 "bison_parser.y" +#line 827 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-2].select_stmt); (yyval.select_stmt)->order = (yyvsp[-1].order_vec); @@ -4015,11 +4004,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 4019 "bison_parser.cpp" +#line 4008 "bison_parser.cpp" break; case 115: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */ -#line 838 "bison_parser.y" +#line 837 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-4].select_stmt); if ((yyval.select_stmt)->setOperations == nullptr) { @@ -4030,63 +4019,63 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec); (yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit); } -#line 4034 "bison_parser.cpp" +#line 4023 "bison_parser.cpp" break; case 116: /* set_operator: set_type opt_all */ -#line 851 "bison_parser.y" +#line 850 "bison_parser.y" { (yyval.set_operator_t) = (yyvsp[-1].set_operator_t); (yyval.set_operator_t)->isAll = (yyvsp[0].bval); } -#line 4043 "bison_parser.cpp" +#line 4032 "bison_parser.cpp" break; case 117: /* set_type: UNION */ -#line 858 "bison_parser.y" +#line 857 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetUnion; } -#line 4052 "bison_parser.cpp" +#line 4041 "bison_parser.cpp" break; case 118: /* set_type: INTERSECT */ -#line 862 "bison_parser.y" +#line 861 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetIntersect; } -#line 4061 "bison_parser.cpp" +#line 4050 "bison_parser.cpp" break; case 119: /* set_type: EXCEPT */ -#line 866 "bison_parser.y" +#line 865 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetExcept; } -#line 4070 "bison_parser.cpp" +#line 4059 "bison_parser.cpp" break; case 120: /* opt_all: ALL */ -#line 873 "bison_parser.y" +#line 872 "bison_parser.y" { (yyval.bval) = true; } -#line 4078 "bison_parser.cpp" +#line 4067 "bison_parser.cpp" break; case 121: /* opt_all: %empty */ -#line 876 "bison_parser.y" +#line 875 "bison_parser.y" { (yyval.bval) = false; } -#line 4086 "bison_parser.cpp" +#line 4075 "bison_parser.cpp" break; case 122: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ -#line 882 "bison_parser.y" +#line 881 "bison_parser.y" { (yyval.select_stmt) = new SelectStatement(); (yyval.select_stmt)->limit = (yyvsp[-5].limit); @@ -4096,213 +4085,213 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 4100 "bison_parser.cpp" +#line 4089 "bison_parser.cpp" break; case 123: /* opt_distinct: DISTINCT */ -#line 894 "bison_parser.y" +#line 893 "bison_parser.y" { (yyval.bval) = true; } -#line 4106 "bison_parser.cpp" +#line 4095 "bison_parser.cpp" break; case 124: /* opt_distinct: %empty */ -#line 895 "bison_parser.y" +#line 894 "bison_parser.y" { (yyval.bval) = false; } -#line 4112 "bison_parser.cpp" +#line 4101 "bison_parser.cpp" break; case 126: /* opt_from_clause: from_clause */ -#line 903 "bison_parser.y" +#line 902 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 4118 "bison_parser.cpp" +#line 4107 "bison_parser.cpp" break; case 127: /* opt_from_clause: %empty */ -#line 904 "bison_parser.y" +#line 903 "bison_parser.y" { (yyval.table) = nullptr; } -#line 4124 "bison_parser.cpp" +#line 4113 "bison_parser.cpp" break; case 128: /* from_clause: FROM table_ref */ -#line 908 "bison_parser.y" +#line 907 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 4130 "bison_parser.cpp" +#line 4119 "bison_parser.cpp" break; case 129: /* opt_where: WHERE expr */ -#line 913 "bison_parser.y" +#line 912 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 4136 "bison_parser.cpp" +#line 4125 "bison_parser.cpp" break; case 130: /* opt_where: %empty */ -#line 914 "bison_parser.y" +#line 913 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 4142 "bison_parser.cpp" +#line 4131 "bison_parser.cpp" break; case 131: /* opt_group: GROUP BY expr_list opt_having */ -#line 918 "bison_parser.y" +#line 917 "bison_parser.y" { (yyval.group_t) = new GroupByDescription(); (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 4152 "bison_parser.cpp" +#line 4141 "bison_parser.cpp" break; case 132: /* opt_group: %empty */ -#line 923 "bison_parser.y" +#line 922 "bison_parser.y" { (yyval.group_t) = nullptr; } -#line 4158 "bison_parser.cpp" +#line 4147 "bison_parser.cpp" break; case 133: /* opt_having: HAVING expr */ -#line 927 "bison_parser.y" +#line 926 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 4164 "bison_parser.cpp" +#line 4153 "bison_parser.cpp" break; case 134: /* opt_having: %empty */ -#line 928 "bison_parser.y" +#line 927 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 4170 "bison_parser.cpp" +#line 4159 "bison_parser.cpp" break; case 135: /* opt_order: ORDER BY order_list */ -#line 932 "bison_parser.y" +#line 931 "bison_parser.y" { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 4176 "bison_parser.cpp" +#line 4165 "bison_parser.cpp" break; case 136: /* opt_order: %empty */ -#line 933 "bison_parser.y" +#line 932 "bison_parser.y" { (yyval.order_vec) = nullptr; } -#line 4182 "bison_parser.cpp" +#line 4171 "bison_parser.cpp" break; case 137: /* order_list: order_desc */ -#line 937 "bison_parser.y" +#line 936 "bison_parser.y" { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 4188 "bison_parser.cpp" +#line 4177 "bison_parser.cpp" break; case 138: /* order_list: order_list ',' order_desc */ -#line 938 "bison_parser.y" +#line 937 "bison_parser.y" { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 4194 "bison_parser.cpp" +#line 4183 "bison_parser.cpp" break; case 139: /* order_desc: expr opt_order_type */ -#line 942 "bison_parser.y" +#line 941 "bison_parser.y" { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 4200 "bison_parser.cpp" +#line 4189 "bison_parser.cpp" break; case 140: /* opt_order_type: ASC */ -#line 946 "bison_parser.y" +#line 945 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 4206 "bison_parser.cpp" +#line 4195 "bison_parser.cpp" break; case 141: /* opt_order_type: DESC */ -#line 947 "bison_parser.y" +#line 946 "bison_parser.y" { (yyval.order_type) = kOrderDesc; } -#line 4212 "bison_parser.cpp" +#line 4201 "bison_parser.cpp" break; case 142: /* opt_order_type: %empty */ -#line 948 "bison_parser.y" +#line 947 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 4218 "bison_parser.cpp" +#line 4207 "bison_parser.cpp" break; case 143: /* opt_top: TOP int_literal */ -#line 954 "bison_parser.y" +#line 953 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 4224 "bison_parser.cpp" +#line 4213 "bison_parser.cpp" break; case 144: /* opt_top: %empty */ -#line 955 "bison_parser.y" +#line 954 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 4230 "bison_parser.cpp" +#line 4219 "bison_parser.cpp" break; case 145: /* opt_limit: LIMIT expr */ -#line 959 "bison_parser.y" +#line 958 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 4236 "bison_parser.cpp" +#line 4225 "bison_parser.cpp" break; case 146: /* opt_limit: OFFSET expr */ -#line 960 "bison_parser.y" +#line 959 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 4242 "bison_parser.cpp" +#line 4231 "bison_parser.cpp" break; case 147: /* opt_limit: LIMIT expr OFFSET expr */ -#line 961 "bison_parser.y" +#line 960 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4248 "bison_parser.cpp" +#line 4237 "bison_parser.cpp" break; case 148: /* opt_limit: LIMIT ALL */ -#line 962 "bison_parser.y" +#line 961 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, nullptr); } -#line 4254 "bison_parser.cpp" +#line 4243 "bison_parser.cpp" break; case 149: /* opt_limit: LIMIT ALL OFFSET expr */ -#line 963 "bison_parser.y" +#line 962 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 4260 "bison_parser.cpp" +#line 4249 "bison_parser.cpp" break; case 150: /* opt_limit: %empty */ -#line 964 "bison_parser.y" +#line 963 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 4266 "bison_parser.cpp" +#line 4255 "bison_parser.cpp" break; case 151: /* expr_list: expr_alias */ -#line 971 "bison_parser.y" +#line 970 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4272 "bison_parser.cpp" +#line 4261 "bison_parser.cpp" break; case 152: /* expr_list: expr_list ',' expr_alias */ -#line 972 "bison_parser.y" +#line 971 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4278 "bison_parser.cpp" +#line 4267 "bison_parser.cpp" break; case 153: /* opt_literal_list: literal_list */ -#line 976 "bison_parser.y" +#line 975 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[0].expr_vec); } -#line 4284 "bison_parser.cpp" +#line 4273 "bison_parser.cpp" break; case 154: /* opt_literal_list: %empty */ -#line 977 "bison_parser.y" +#line 976 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 4290 "bison_parser.cpp" +#line 4279 "bison_parser.cpp" break; case 155: /* literal_list: literal */ -#line 981 "bison_parser.y" +#line 980 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4296 "bison_parser.cpp" +#line 4285 "bison_parser.cpp" break; case 156: /* literal_list: literal_list ',' literal */ -#line 982 "bison_parser.y" +#line 981 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4302 "bison_parser.cpp" +#line 4291 "bison_parser.cpp" break; case 157: /* expr_alias: expr opt_alias */ -#line 986 "bison_parser.y" +#line 985 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); if ((yyvsp[0].alias_t)) { @@ -4310,413 +4299,413 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].alias_t); } } -#line 4314 "bison_parser.cpp" +#line 4303 "bison_parser.cpp" break; case 163: /* operand: '(' expr ')' */ -#line 1004 "bison_parser.y" +#line 1003 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); } -#line 4320 "bison_parser.cpp" +#line 4309 "bison_parser.cpp" break; case 173: /* operand: '(' select_no_paren ')' */ -#line 1014 "bison_parser.y" +#line 1013 "bison_parser.y" { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 4326 "bison_parser.cpp" +#line 4315 "bison_parser.cpp" break; case 176: /* unary_expr: '-' operand */ -#line 1023 "bison_parser.y" +#line 1022 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 4332 "bison_parser.cpp" +#line 4321 "bison_parser.cpp" break; case 177: /* unary_expr: NOT operand */ -#line 1024 "bison_parser.y" +#line 1023 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 4338 "bison_parser.cpp" +#line 4327 "bison_parser.cpp" break; case 178: /* unary_expr: operand ISNULL */ -#line 1025 "bison_parser.y" +#line 1024 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 4344 "bison_parser.cpp" +#line 4333 "bison_parser.cpp" break; case 179: /* unary_expr: operand IS NULL */ -#line 1026 "bison_parser.y" +#line 1025 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 4350 "bison_parser.cpp" +#line 4339 "bison_parser.cpp" break; case 180: /* unary_expr: operand IS NOT NULL */ -#line 1027 "bison_parser.y" +#line 1026 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 4356 "bison_parser.cpp" +#line 4345 "bison_parser.cpp" break; case 182: /* binary_expr: operand '-' operand */ -#line 1032 "bison_parser.y" +#line 1031 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 4362 "bison_parser.cpp" +#line 4351 "bison_parser.cpp" break; case 183: /* binary_expr: operand '+' operand */ -#line 1033 "bison_parser.y" +#line 1032 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 4368 "bison_parser.cpp" +#line 4357 "bison_parser.cpp" break; case 184: /* binary_expr: operand '/' operand */ -#line 1034 "bison_parser.y" +#line 1033 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 4374 "bison_parser.cpp" +#line 4363 "bison_parser.cpp" break; case 185: /* binary_expr: operand '*' operand */ -#line 1035 "bison_parser.y" +#line 1034 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 4380 "bison_parser.cpp" +#line 4369 "bison_parser.cpp" break; case 186: /* binary_expr: operand '%' operand */ -#line 1036 "bison_parser.y" +#line 1035 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 4386 "bison_parser.cpp" +#line 4375 "bison_parser.cpp" break; case 187: /* binary_expr: operand '^' operand */ -#line 1037 "bison_parser.y" +#line 1036 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 4392 "bison_parser.cpp" +#line 4381 "bison_parser.cpp" break; case 188: /* binary_expr: operand LIKE operand */ -#line 1038 "bison_parser.y" +#line 1037 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 4398 "bison_parser.cpp" +#line 4387 "bison_parser.cpp" break; case 189: /* binary_expr: operand NOT LIKE operand */ -#line 1039 "bison_parser.y" +#line 1038 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 4404 "bison_parser.cpp" +#line 4393 "bison_parser.cpp" break; case 190: /* binary_expr: operand ILIKE operand */ -#line 1040 "bison_parser.y" +#line 1039 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 4410 "bison_parser.cpp" +#line 4399 "bison_parser.cpp" break; case 191: /* binary_expr: operand CONCAT operand */ -#line 1041 "bison_parser.y" +#line 1040 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 4416 "bison_parser.cpp" +#line 4405 "bison_parser.cpp" break; case 192: /* logic_expr: expr AND expr */ -#line 1045 "bison_parser.y" +#line 1044 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 4422 "bison_parser.cpp" +#line 4411 "bison_parser.cpp" break; case 193: /* logic_expr: expr OR expr */ -#line 1046 "bison_parser.y" +#line 1045 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 4428 "bison_parser.cpp" +#line 4417 "bison_parser.cpp" break; case 194: /* in_expr: operand IN '(' expr_list ')' */ -#line 1050 "bison_parser.y" +#line 1049 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 4434 "bison_parser.cpp" +#line 4423 "bison_parser.cpp" break; case 195: /* in_expr: operand NOT IN '(' expr_list ')' */ -#line 1051 "bison_parser.y" +#line 1050 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 4440 "bison_parser.cpp" +#line 4429 "bison_parser.cpp" break; case 196: /* in_expr: operand IN '(' select_no_paren ')' */ -#line 1052 "bison_parser.y" +#line 1051 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 4446 "bison_parser.cpp" +#line 4435 "bison_parser.cpp" break; case 197: /* in_expr: operand NOT IN '(' select_no_paren ')' */ -#line 1053 "bison_parser.y" +#line 1052 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 4452 "bison_parser.cpp" +#line 4441 "bison_parser.cpp" break; case 198: /* case_expr: CASE expr case_list END */ -#line 1059 "bison_parser.y" +#line 1058 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } -#line 4458 "bison_parser.cpp" +#line 4447 "bison_parser.cpp" break; case 199: /* case_expr: CASE expr case_list ELSE expr END */ -#line 1060 "bison_parser.y" +#line 1059 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4464 "bison_parser.cpp" +#line 4453 "bison_parser.cpp" break; case 200: /* case_expr: CASE case_list END */ -#line 1061 "bison_parser.y" +#line 1060 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } -#line 4470 "bison_parser.cpp" +#line 4459 "bison_parser.cpp" break; case 201: /* case_expr: CASE case_list ELSE expr END */ -#line 1062 "bison_parser.y" +#line 1061 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4476 "bison_parser.cpp" +#line 4465 "bison_parser.cpp" break; case 202: /* case_list: WHEN expr THEN expr */ -#line 1066 "bison_parser.y" +#line 1065 "bison_parser.y" { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4482 "bison_parser.cpp" +#line 4471 "bison_parser.cpp" break; case 203: /* case_list: case_list WHEN expr THEN expr */ -#line 1067 "bison_parser.y" +#line 1066 "bison_parser.y" { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4488 "bison_parser.cpp" +#line 4477 "bison_parser.cpp" break; case 204: /* exists_expr: EXISTS '(' select_no_paren ')' */ -#line 1071 "bison_parser.y" +#line 1070 "bison_parser.y" { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 4494 "bison_parser.cpp" +#line 4483 "bison_parser.cpp" break; case 205: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */ -#line 1072 "bison_parser.y" +#line 1071 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 4500 "bison_parser.cpp" +#line 4489 "bison_parser.cpp" break; case 206: /* comp_expr: operand '=' operand */ -#line 1076 "bison_parser.y" +#line 1075 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4506 "bison_parser.cpp" +#line 4495 "bison_parser.cpp" break; case 207: /* comp_expr: operand EQUALS operand */ -#line 1077 "bison_parser.y" +#line 1076 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4512 "bison_parser.cpp" +#line 4501 "bison_parser.cpp" break; case 208: /* comp_expr: operand NOTEQUALS operand */ -#line 1078 "bison_parser.y" +#line 1077 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 4518 "bison_parser.cpp" +#line 4507 "bison_parser.cpp" break; case 209: /* comp_expr: operand '<' operand */ -#line 1079 "bison_parser.y" +#line 1078 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 4524 "bison_parser.cpp" +#line 4513 "bison_parser.cpp" break; case 210: /* comp_expr: operand '>' operand */ -#line 1080 "bison_parser.y" +#line 1079 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 4530 "bison_parser.cpp" +#line 4519 "bison_parser.cpp" break; case 211: /* comp_expr: operand LESSEQ operand */ -#line 1081 "bison_parser.y" +#line 1080 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 4536 "bison_parser.cpp" +#line 4525 "bison_parser.cpp" break; case 212: /* comp_expr: operand GREATEREQ operand */ -#line 1082 "bison_parser.y" +#line 1081 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 4542 "bison_parser.cpp" +#line 4531 "bison_parser.cpp" break; case 213: /* function_expr: IDENTIFIER '(' ')' */ -#line 1086 "bison_parser.y" +#line 1085 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 4548 "bison_parser.cpp" +#line 4537 "bison_parser.cpp" break; case 214: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */ -#line 1087 "bison_parser.y" +#line 1086 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 4554 "bison_parser.cpp" +#line 4543 "bison_parser.cpp" break; case 215: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ -#line 1091 "bison_parser.y" +#line 1090 "bison_parser.y" { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } -#line 4560 "bison_parser.cpp" +#line 4549 "bison_parser.cpp" break; case 216: /* cast_expr: CAST '(' expr AS column_type ')' */ -#line 1095 "bison_parser.y" +#line 1094 "bison_parser.y" { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } -#line 4566 "bison_parser.cpp" +#line 4555 "bison_parser.cpp" break; case 217: /* datetime_field: SECOND */ -#line 1099 "bison_parser.y" +#line 1098 "bison_parser.y" { (yyval.datetime_field) = kDatetimeSecond; } -#line 4572 "bison_parser.cpp" +#line 4561 "bison_parser.cpp" break; case 218: /* datetime_field: MINUTE */ -#line 1100 "bison_parser.y" +#line 1099 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMinute; } -#line 4578 "bison_parser.cpp" +#line 4567 "bison_parser.cpp" break; case 219: /* datetime_field: HOUR */ -#line 1101 "bison_parser.y" +#line 1100 "bison_parser.y" { (yyval.datetime_field) = kDatetimeHour; } -#line 4584 "bison_parser.cpp" +#line 4573 "bison_parser.cpp" break; case 220: /* datetime_field: DAY */ -#line 1102 "bison_parser.y" +#line 1101 "bison_parser.y" { (yyval.datetime_field) = kDatetimeDay; } -#line 4590 "bison_parser.cpp" +#line 4579 "bison_parser.cpp" break; case 221: /* datetime_field: MONTH */ -#line 1103 "bison_parser.y" +#line 1102 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMonth; } -#line 4596 "bison_parser.cpp" +#line 4585 "bison_parser.cpp" break; case 222: /* datetime_field: YEAR */ -#line 1104 "bison_parser.y" +#line 1103 "bison_parser.y" { (yyval.datetime_field) = kDatetimeYear; } -#line 4602 "bison_parser.cpp" +#line 4591 "bison_parser.cpp" break; case 223: /* datetime_field_plural: SECONDS */ -#line 1108 "bison_parser.y" +#line 1107 "bison_parser.y" { (yyval.datetime_field) = kDatetimeSecond; } -#line 4608 "bison_parser.cpp" +#line 4597 "bison_parser.cpp" break; case 224: /* datetime_field_plural: MINUTES */ -#line 1109 "bison_parser.y" +#line 1108 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMinute; } -#line 4614 "bison_parser.cpp" +#line 4603 "bison_parser.cpp" break; case 225: /* datetime_field_plural: HOURS */ -#line 1110 "bison_parser.y" +#line 1109 "bison_parser.y" { (yyval.datetime_field) = kDatetimeHour; } -#line 4620 "bison_parser.cpp" +#line 4609 "bison_parser.cpp" break; case 226: /* datetime_field_plural: DAYS */ -#line 1111 "bison_parser.y" +#line 1110 "bison_parser.y" { (yyval.datetime_field) = kDatetimeDay; } -#line 4626 "bison_parser.cpp" +#line 4615 "bison_parser.cpp" break; case 227: /* datetime_field_plural: MONTHS */ -#line 1112 "bison_parser.y" +#line 1111 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMonth; } -#line 4632 "bison_parser.cpp" +#line 4621 "bison_parser.cpp" break; case 228: /* datetime_field_plural: YEARS */ -#line 1113 "bison_parser.y" +#line 1112 "bison_parser.y" { (yyval.datetime_field) = kDatetimeYear; } -#line 4638 "bison_parser.cpp" +#line 4627 "bison_parser.cpp" break; case 231: /* array_expr: ARRAY '[' expr_list ']' */ -#line 1122 "bison_parser.y" +#line 1121 "bison_parser.y" { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 4644 "bison_parser.cpp" +#line 4633 "bison_parser.cpp" break; case 232: /* array_index: operand '[' int_literal ']' */ -#line 1126 "bison_parser.y" +#line 1125 "bison_parser.y" { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 4650 "bison_parser.cpp" +#line 4639 "bison_parser.cpp" break; case 233: /* between_expr: operand BETWEEN operand AND operand */ -#line 1130 "bison_parser.y" +#line 1129 "bison_parser.y" { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4656 "bison_parser.cpp" +#line 4645 "bison_parser.cpp" break; case 234: /* column_name: IDENTIFIER */ -#line 1134 "bison_parser.y" +#line 1133 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 4662 "bison_parser.cpp" +#line 4651 "bison_parser.cpp" break; case 235: /* column_name: IDENTIFIER '.' IDENTIFIER */ -#line 1135 "bison_parser.y" +#line 1134 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 4668 "bison_parser.cpp" +#line 4657 "bison_parser.cpp" break; case 236: /* column_name: '*' */ -#line 1136 "bison_parser.y" +#line 1135 "bison_parser.y" { (yyval.expr) = Expr::makeStar(); } -#line 4674 "bison_parser.cpp" +#line 4663 "bison_parser.cpp" break; case 237: /* column_name: IDENTIFIER '.' '*' */ -#line 1137 "bison_parser.y" +#line 1136 "bison_parser.y" { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 4680 "bison_parser.cpp" +#line 4669 "bison_parser.cpp" break; case 245: /* string_literal: STRING */ -#line 1151 "bison_parser.y" +#line 1150 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 4686 "bison_parser.cpp" +#line 4675 "bison_parser.cpp" break; case 246: /* bool_literal: TRUE */ -#line 1155 "bison_parser.y" +#line 1154 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(true); } -#line 4692 "bison_parser.cpp" +#line 4681 "bison_parser.cpp" break; case 247: /* bool_literal: FALSE */ -#line 1156 "bison_parser.y" +#line 1155 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(false); } -#line 4698 "bison_parser.cpp" +#line 4687 "bison_parser.cpp" break; case 248: /* num_literal: FLOATVAL */ -#line 1160 "bison_parser.y" +#line 1159 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 4704 "bison_parser.cpp" +#line 4693 "bison_parser.cpp" break; case 250: /* int_literal: INTVAL */ -#line 1165 "bison_parser.y" +#line 1164 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 4710 "bison_parser.cpp" +#line 4699 "bison_parser.cpp" break; case 251: /* null_literal: NULL */ -#line 1169 "bison_parser.y" +#line 1168 "bison_parser.y" { (yyval.expr) = Expr::makeNullLiteral(); } -#line 4716 "bison_parser.cpp" +#line 4705 "bison_parser.cpp" break; case 252: /* date_literal: DATE STRING */ -#line 1173 "bison_parser.y" +#line 1172 "bison_parser.y" { int day{0}, month{0}, year{0}, chars_parsed{0}; // If the whole string is parsed, chars_parsed points to the terminating null byte after the last character @@ -4727,17 +4716,17 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expr) = Expr::makeDateLiteral((yyvsp[0].sval)); } -#line 4731 "bison_parser.cpp" +#line 4720 "bison_parser.cpp" break; case 253: /* interval_literal: int_literal duration_field */ -#line 1186 "bison_parser.y" +#line 1185 "bison_parser.y" { (yyval.expr) = Expr::makeIntervalLiteral((yyvsp[-1].expr)->ival, (yyvsp[0].datetime_field)); delete (yyvsp[-1].expr); } -#line 4737 "bison_parser.cpp" +#line 4726 "bison_parser.cpp" break; case 254: /* interval_literal: INTERVAL STRING datetime_field */ -#line 1187 "bison_parser.y" +#line 1186 "bison_parser.y" { int duration{0}, chars_parsed{0}; // If the whole string is parsed, chars_parsed points to the terminating null byte after the last character @@ -4749,11 +4738,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-1].sval)); (yyval.expr) = Expr::makeIntervalLiteral(duration, (yyvsp[0].datetime_field)); } -#line 4753 "bison_parser.cpp" +#line 4742 "bison_parser.cpp" break; case 255: /* interval_literal: INTERVAL STRING */ -#line 1198 "bison_parser.y" +#line 1197 "bison_parser.y" { int duration{0}, chars_parsed{0}; // 'seconds' and 'minutes' are the longest accepted interval qualifiers (7 chars) + null byte @@ -4785,55 +4774,55 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expr) = Expr::makeIntervalLiteral(duration, unit); } -#line 4789 "bison_parser.cpp" +#line 4778 "bison_parser.cpp" break; case 256: /* param_expr: '?' */ -#line 1232 "bison_parser.y" +#line 1231 "bison_parser.y" { (yyval.expr) = Expr::makeParameter(yylloc.total_column); (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 4799 "bison_parser.cpp" +#line 4788 "bison_parser.cpp" break; case 258: /* table_ref: table_ref_commalist ',' table_ref_atomic */ -#line 1245 "bison_parser.y" +#line 1244 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); auto tbl = new TableRef(kTableCrossProduct); tbl->list = (yyvsp[-2].table_vec); (yyval.table) = tbl; } -#line 4810 "bison_parser.cpp" +#line 4799 "bison_parser.cpp" break; case 262: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ -#line 1261 "bison_parser.y" +#line 1260 "bison_parser.y" { auto tbl = new TableRef(kTableSelect); tbl->select = (yyvsp[-2].select_stmt); tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4821 "bison_parser.cpp" +#line 4810 "bison_parser.cpp" break; case 263: /* table_ref_commalist: table_ref_atomic */ -#line 1270 "bison_parser.y" +#line 1269 "bison_parser.y" { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 4827 "bison_parser.cpp" +#line 4816 "bison_parser.cpp" break; case 264: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ -#line 1271 "bison_parser.y" +#line 1270 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 4833 "bison_parser.cpp" +#line 4822 "bison_parser.cpp" break; case 265: /* table_ref_name: table_name opt_table_alias */ -#line 1276 "bison_parser.y" +#line 1275 "bison_parser.y" { auto tbl = new TableRef(kTableName); tbl->schema = (yyvsp[-1].table_name).schema; @@ -4841,121 +4830,115 @@ YYLTYPE yylloc = yyloc_default; tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 4845 "bison_parser.cpp" +#line 4834 "bison_parser.cpp" break; case 266: /* table_ref_name_no_alias: table_name */ -#line 1287 "bison_parser.y" +#line 1286 "bison_parser.y" { (yyval.table) = new TableRef(kTableName); (yyval.table)->schema = (yyvsp[0].table_name).schema; (yyval.table)->name = (yyvsp[0].table_name).name; } -#line 4855 "bison_parser.cpp" +#line 4844 "bison_parser.cpp" break; case 267: /* table_name: IDENTIFIER */ -#line 1296 "bison_parser.y" +#line 1295 "bison_parser.y" { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} -#line 4861 "bison_parser.cpp" +#line 4850 "bison_parser.cpp" break; case 268: /* table_name: IDENTIFIER '.' IDENTIFIER */ -#line 1297 "bison_parser.y" +#line 1296 "bison_parser.y" { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } -#line 4867 "bison_parser.cpp" +#line 4856 "bison_parser.cpp" break; case 269: /* opt_index_name: IDENTIFIER */ -#line 1301 "bison_parser.y" +#line 1300 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval);} -#line 4873 "bison_parser.cpp" +#line 4862 "bison_parser.cpp" break; case 270: /* opt_index_name: %empty */ -#line 1302 "bison_parser.y" +#line 1301 "bison_parser.y" { (yyval.sval) = nullptr;} -#line 4879 "bison_parser.cpp" +#line 4868 "bison_parser.cpp" break; - case 271: /* index_name: IDENTIFIER */ + case 272: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ #line 1306 "bison_parser.y" - { (yyval.sval) = (yyvsp[0].sval);} -#line 4885 "bison_parser.cpp" - break; - - case 273: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ -#line 1312 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } -#line 4891 "bison_parser.cpp" +#line 4874 "bison_parser.cpp" break; - case 275: /* opt_table_alias: %empty */ -#line 1318 "bison_parser.y" + case 274: /* opt_table_alias: %empty */ +#line 1312 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4897 "bison_parser.cpp" +#line 4880 "bison_parser.cpp" break; - case 276: /* alias: AS IDENTIFIER */ -#line 1323 "bison_parser.y" + case 275: /* alias: AS IDENTIFIER */ +#line 1317 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4903 "bison_parser.cpp" +#line 4886 "bison_parser.cpp" break; - case 277: /* alias: IDENTIFIER */ -#line 1324 "bison_parser.y" + case 276: /* alias: IDENTIFIER */ +#line 1318 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 4909 "bison_parser.cpp" +#line 4892 "bison_parser.cpp" break; - case 279: /* opt_alias: %empty */ -#line 1330 "bison_parser.y" + case 278: /* opt_alias: %empty */ +#line 1324 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 4915 "bison_parser.cpp" +#line 4898 "bison_parser.cpp" break; - case 281: /* opt_with_clause: %empty */ -#line 1340 "bison_parser.y" + case 280: /* opt_with_clause: %empty */ +#line 1334 "bison_parser.y" { (yyval.with_description_vec) = nullptr; } -#line 4921 "bison_parser.cpp" +#line 4904 "bison_parser.cpp" break; - case 282: /* with_clause: WITH with_description_list */ -#line 1344 "bison_parser.y" + case 281: /* with_clause: WITH with_description_list */ +#line 1338 "bison_parser.y" { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } -#line 4927 "bison_parser.cpp" +#line 4910 "bison_parser.cpp" break; - case 283: /* with_description_list: with_description */ -#line 1348 "bison_parser.y" + case 282: /* with_description_list: with_description */ +#line 1342 "bison_parser.y" { (yyval.with_description_vec) = new std::vector(); (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); } -#line 4936 "bison_parser.cpp" +#line 4919 "bison_parser.cpp" break; - case 284: /* with_description_list: with_description_list ',' with_description */ -#line 1352 "bison_parser.y" + case 283: /* with_description_list: with_description_list ',' with_description */ +#line 1346 "bison_parser.y" { (yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t)); (yyval.with_description_vec) = (yyvsp[-2].with_description_vec); } -#line 4945 "bison_parser.cpp" +#line 4928 "bison_parser.cpp" break; - case 285: /* with_description: IDENTIFIER AS select_with_paren */ -#line 1359 "bison_parser.y" + case 284: /* with_description: IDENTIFIER AS select_with_paren */ +#line 1353 "bison_parser.y" { (yyval.with_description_t) = new WithDescription(); (yyval.with_description_t)->alias = (yyvsp[-2].sval); (yyval.with_description_t)->select = (yyvsp[0].select_stmt); } -#line 4955 "bison_parser.cpp" +#line 4938 "bison_parser.cpp" break; - case 286: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ -#line 1373 "bison_parser.y" + case 285: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ +#line 1367 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4963,11 +4946,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 4967 "bison_parser.cpp" +#line 4950 "bison_parser.cpp" break; - case 287: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ -#line 1381 "bison_parser.y" + case 286: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ +#line 1375 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4976,11 +4959,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 4980 "bison_parser.cpp" +#line 4963 "bison_parser.cpp" break; - case 288: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ -#line 1391 "bison_parser.y" + case 287: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */ +#line 1385 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4996,83 +4979,83 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } -#line 5000 "bison_parser.cpp" +#line 4983 "bison_parser.cpp" break; - case 289: /* opt_join_type: INNER */ -#line 1409 "bison_parser.y" + case 288: /* opt_join_type: INNER */ +#line 1403 "bison_parser.y" { (yyval.join_type) = kJoinInner; } -#line 5006 "bison_parser.cpp" +#line 4989 "bison_parser.cpp" break; - case 290: /* opt_join_type: LEFT OUTER */ -#line 1410 "bison_parser.y" + case 289: /* opt_join_type: LEFT OUTER */ +#line 1404 "bison_parser.y" { (yyval.join_type) = kJoinLeft; } -#line 5012 "bison_parser.cpp" +#line 4995 "bison_parser.cpp" break; - case 291: /* opt_join_type: LEFT */ -#line 1411 "bison_parser.y" + case 290: /* opt_join_type: LEFT */ +#line 1405 "bison_parser.y" { (yyval.join_type) = kJoinLeft; } -#line 5018 "bison_parser.cpp" +#line 5001 "bison_parser.cpp" break; - case 292: /* opt_join_type: RIGHT OUTER */ -#line 1412 "bison_parser.y" + case 291: /* opt_join_type: RIGHT OUTER */ +#line 1406 "bison_parser.y" { (yyval.join_type) = kJoinRight; } -#line 5024 "bison_parser.cpp" +#line 5007 "bison_parser.cpp" break; - case 293: /* opt_join_type: RIGHT */ -#line 1413 "bison_parser.y" + case 292: /* opt_join_type: RIGHT */ +#line 1407 "bison_parser.y" { (yyval.join_type) = kJoinRight; } -#line 5030 "bison_parser.cpp" +#line 5013 "bison_parser.cpp" break; - case 294: /* opt_join_type: FULL OUTER */ -#line 1414 "bison_parser.y" + case 293: /* opt_join_type: FULL OUTER */ +#line 1408 "bison_parser.y" { (yyval.join_type) = kJoinFull; } -#line 5036 "bison_parser.cpp" +#line 5019 "bison_parser.cpp" break; - case 295: /* opt_join_type: OUTER */ -#line 1415 "bison_parser.y" + case 294: /* opt_join_type: OUTER */ +#line 1409 "bison_parser.y" { (yyval.join_type) = kJoinFull; } -#line 5042 "bison_parser.cpp" +#line 5025 "bison_parser.cpp" break; - case 296: /* opt_join_type: FULL */ -#line 1416 "bison_parser.y" + case 295: /* opt_join_type: FULL */ +#line 1410 "bison_parser.y" { (yyval.join_type) = kJoinFull; } -#line 5048 "bison_parser.cpp" +#line 5031 "bison_parser.cpp" break; - case 297: /* opt_join_type: CROSS */ -#line 1417 "bison_parser.y" + case 296: /* opt_join_type: CROSS */ +#line 1411 "bison_parser.y" { (yyval.join_type) = kJoinCross; } -#line 5054 "bison_parser.cpp" +#line 5037 "bison_parser.cpp" break; - case 298: /* opt_join_type: %empty */ -#line 1418 "bison_parser.y" + case 297: /* opt_join_type: %empty */ +#line 1412 "bison_parser.y" { (yyval.join_type) = kJoinInner; } -#line 5060 "bison_parser.cpp" +#line 5043 "bison_parser.cpp" break; - case 302: /* ident_commalist: IDENTIFIER */ -#line 1438 "bison_parser.y" + case 301: /* ident_commalist: IDENTIFIER */ +#line 1432 "bison_parser.y" { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 5066 "bison_parser.cpp" +#line 5049 "bison_parser.cpp" break; - case 303: /* ident_commalist: ident_commalist ',' IDENTIFIER */ -#line 1439 "bison_parser.y" + case 302: /* ident_commalist: ident_commalist ',' IDENTIFIER */ +#line 1433 "bison_parser.y" { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 5072 "bison_parser.cpp" +#line 5055 "bison_parser.cpp" break; -#line 5076 "bison_parser.cpp" +#line 5059 "bison_parser.cpp" default: break; } @@ -5301,7 +5284,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 1442 "bison_parser.y" +#line 1436 "bison_parser.y" /********************************* ** Section 4: Additional C code diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 8d048237..f831d80b 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -214,7 +214,6 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha %type show_statement %type table_name %type opt_index_name -%type index_name %type file_path prepare_target_query %type opt_not_exists opt_exists opt_distinct opt_all %type opt_decimal_specification @@ -664,7 +663,7 @@ drop_statement: $$->name = $3; } - | DROP INDEX opt_exists index_name { + | DROP INDEX opt_exists IDENTIFIER { $$ = new DropStatement(kDropIndex); $$->ifExists = $3; $$->indexName = $4; @@ -1302,11 +1301,6 @@ opt_index_name: | /* empty */ { $$ = nullptr;} ; -index_name: - IDENTIFIER { $$ = $1;} - ; - - table_alias: alias | AS IDENTIFIER '(' ident_commalist ')' { $$ = new Alias($2, $4); } From b7732c000cf899860993e843dcc996098c06be53 Mon Sep 17 00:00:00 2001 From: mweisgut Date: Mon, 11 Oct 2021 15:01:32 +0200 Subject: [PATCH 71/73] formatting --- src/parser/bison_parser.cpp | 28 ++++++++++++++-------------- src/parser/bison_parser.y | 30 +++++++++++++++--------------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index f68bbe28..a650db06 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -3586,85 +3586,85 @@ YYLTYPE yylloc = yyloc_default; case 57: /* column_type: INT */ #line 592 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::INT}; } + { (yyval.column_type_t) = ColumnType{DataType::INT}; } #line 3591 "bison_parser.cpp" break; case 58: /* column_type: INTEGER */ #line 593 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::INT}; } + { (yyval.column_type_t) = ColumnType{DataType::INT}; } #line 3597 "bison_parser.cpp" break; case 59: /* column_type: LONG */ #line 594 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::LONG}; } + { (yyval.column_type_t) = ColumnType{DataType::LONG}; } #line 3603 "bison_parser.cpp" break; case 60: /* column_type: FLOAT */ #line 595 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } + { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } #line 3609 "bison_parser.cpp" break; case 61: /* column_type: DECIMAL opt_decimal_specification */ #line 596 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::DECIMAL, 0, (yyvsp[0].column_specification_t)}; } + { (yyval.column_type_t) = ColumnType{DataType::DECIMAL, 0, (yyvsp[0].column_specification_t)}; } #line 3615 "bison_parser.cpp" break; case 62: /* column_type: DOUBLE */ #line 597 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } + { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } #line 3621 "bison_parser.cpp" break; case 63: /* column_type: REAL */ #line 598 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::REAL}; } + { (yyval.column_type_t) = ColumnType{DataType::REAL}; } #line 3627 "bison_parser.cpp" break; case 64: /* column_type: VARCHAR '(' INTVAL ')' */ #line 599 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } + { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } #line 3633 "bison_parser.cpp" break; case 65: /* column_type: CHARACTER VARYING '(' INTVAL ')' */ #line 600 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } + { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } #line 3639 "bison_parser.cpp" break; case 66: /* column_type: CHAR '(' INTVAL ')' */ #line 601 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } + { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } #line 3645 "bison_parser.cpp" break; case 67: /* column_type: TEXT */ #line 602 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } + { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } #line 3651 "bison_parser.cpp" break; case 68: /* column_type: TIME opt_time_specification */ #line 603 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::TIME, 0, (yyvsp[0].column_specification_t) }; } + { (yyval.column_type_t) = ColumnType{DataType::TIME, 0, (yyvsp[0].column_specification_t) }; } #line 3657 "bison_parser.cpp" break; case 69: /* column_type: DATETIME */ #line 604 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } + { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } #line 3663 "bison_parser.cpp" break; case 70: /* column_type: DATE */ #line 605 "bison_parser.y" - { (yyval.column_type_t) = ColumnType{DataType::DATE}; } + { (yyval.column_type_t) = ColumnType{DataType::DATE}; } #line 3669 "bison_parser.cpp" break; diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index f831d80b..5eef32cd 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -589,21 +589,21 @@ column_def: ; column_type: - INT { $$ = ColumnType{DataType::INT}; } - | INTEGER { $$ = ColumnType{DataType::INT}; } - | LONG { $$ = ColumnType{DataType::LONG}; } - | FLOAT { $$ = ColumnType{DataType::FLOAT}; } - | DECIMAL opt_decimal_specification { $$ = ColumnType{DataType::DECIMAL, 0, $2}; } - | DOUBLE { $$ = ColumnType{DataType::DOUBLE}; } - | REAL { $$ = ColumnType{DataType::REAL}; } - | VARCHAR '(' INTVAL ')' { $$ = ColumnType{DataType::VARCHAR, $3}; } - | CHARACTER VARYING'(' INTVAL ')' { $$ = ColumnType{DataType::VARCHAR, $4}; } - | CHAR '(' INTVAL ')' { $$ = ColumnType{DataType::CHAR, $3}; } - | TEXT { $$ = ColumnType{DataType::TEXT}; } - | TIME opt_time_specification { $$ = ColumnType{DataType::TIME, 0, $2 }; } - | DATETIME { $$ = ColumnType{DataType::DATETIME}; } - | DATE { $$ = ColumnType{DataType::DATE}; } - ; + INT { $$ = ColumnType{DataType::INT}; } + | INTEGER { $$ = ColumnType{DataType::INT}; } + | LONG { $$ = ColumnType{DataType::LONG}; } + | FLOAT { $$ = ColumnType{DataType::FLOAT}; } + | DECIMAL opt_decimal_specification { $$ = ColumnType{DataType::DECIMAL, 0, $2}; } + | DOUBLE { $$ = ColumnType{DataType::DOUBLE}; } + | REAL { $$ = ColumnType{DataType::REAL}; } + | VARCHAR '(' INTVAL ')' { $$ = ColumnType{DataType::VARCHAR, $3}; } + | CHARACTER VARYING'(' INTVAL ')' { $$ = ColumnType{DataType::VARCHAR, $4}; } + | CHAR '(' INTVAL ')' { $$ = ColumnType{DataType::CHAR, $3}; } + | TEXT { $$ = ColumnType{DataType::TEXT}; } + | TIME opt_time_specification { $$ = ColumnType{DataType::TIME, 0, $2 }; } + | DATETIME { $$ = ColumnType{DataType::DATETIME}; } + | DATE { $$ = ColumnType{DataType::DATE}; } + ; opt_time_specification: '(' INTVAL ')' { $$ = ColumnSpecification{$2}; } From 5d21bcad287067af8716d04c34a990cd7d303037 Mon Sep 17 00:00:00 2001 From: mweisgut Date: Mon, 11 Oct 2021 15:06:56 +0200 Subject: [PATCH 72/73] enum naming --- src/sql/AlterStatement.h | 2 +- src/sql/statements.cpp | 2 +- test/sql_tests.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sql/AlterStatement.h b/src/sql/AlterStatement.h index c48dc7f4..9e3dd37b 100755 --- a/src/sql/AlterStatement.h +++ b/src/sql/AlterStatement.h @@ -7,7 +7,7 @@ namespace hsql { enum ActionType { - DROPCOLUMN, + DropColumn, }; struct AlterAction { diff --git a/src/sql/statements.cpp b/src/sql/statements.cpp index 02e9df8f..c7b0c284 100755 --- a/src/sql/statements.cpp +++ b/src/sql/statements.cpp @@ -184,7 +184,7 @@ namespace hsql { AlterAction::~AlterAction() = default; DropColumnAction::DropColumnAction(char* column_name) : - AlterAction(DROPCOLUMN), + AlterAction(ActionType::DropColumn), columnName(column_name), ifExists(false) {}; diff --git a/test/sql_tests.cpp b/test/sql_tests.cpp index 4908f69f..16934b40 100644 --- a/test/sql_tests.cpp +++ b/test/sql_tests.cpp @@ -133,7 +133,7 @@ TEST(AlterStatementDropActionTest) { auto dropAction = (const DropColumnAction*) stmt->action; - ASSERT_EQ(dropAction->type, hsql::ActionType::DROPCOLUMN); + ASSERT_EQ(dropAction->type, hsql::ActionType::DropColumn); ASSERT_STREQ(dropAction->columnName, "mycolumn"); } From c2532e73951f23d4544d2640f83b54ab0a2181b3 Mon Sep 17 00:00:00 2001 From: mweisgut Date: Tue, 12 Oct 2021 08:44:23 +0200 Subject: [PATCH 73/73] empty lines --- src/sql/AlterStatement.h | 2 +- test/sql_tests.cpp | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/sql/AlterStatement.h b/src/sql/AlterStatement.h index 9e3dd37b..82a57801 100755 --- a/src/sql/AlterStatement.h +++ b/src/sql/AlterStatement.h @@ -24,7 +24,6 @@ namespace hsql { ~DropColumnAction() override; }; - // Represents SQL Alter Table statements. // Example "ALTER TABLE students DROP COLUMN name;" struct AlterStatement : SQLStatement { @@ -38,4 +37,5 @@ namespace hsql { AlterAction* action; }; } // namespace hsql + #endif diff --git a/test/sql_tests.cpp b/test/sql_tests.cpp index 16934b40..e2ab353f 100644 --- a/test/sql_tests.cpp +++ b/test/sql_tests.cpp @@ -191,8 +191,6 @@ TEST(DropIndexIfExistsTest) { ASSERT_EQ(stmt->ifExists, true); } - - TEST(DropTableStatementTest) { TEST_PARSE_SINGLE_SQL( "DROP TABLE students", @@ -221,8 +219,6 @@ TEST(DropTableIfExistsStatementTest) { ASSERT_STREQ(stmt->name, "students"); } - - TEST(ReleaseStatementTest) { TEST_PARSE_SINGLE_SQL( "SELECT * FROM students;",