From 76d498f9bdfc66457865323ea12e871e0b4d9737 Mon Sep 17 00:00:00 2001 From: Martin Hansson Date: Fri, 30 Aug 2024 11:23:35 +0200 Subject: [PATCH] All of these queries are valid standard SQL. Thanks to the previous refactoring, we now have to add only a single rule to support them all. Quite surprising, there are not shift/reduce conflicts, which are known to occur in both the MySQL and Postgres parsers for this construction. --- src/parser/bison_parser.cpp | 2477 +++++++++++++++++---------------- src/parser/bison_parser.y | 12 + test/queries/queries-good.sql | 30 +- 3 files changed, 1288 insertions(+), 1231 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 3a4f14cd..192816a8 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -791,16 +791,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 79 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 852 +#define YYLAST 848 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 196 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 132 /* YYNRULES -- Number of rules. */ -#define YYNRULES 339 +#define YYNRULES 340 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 616 +#define YYNSTATES 617 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 433 @@ -878,29 +878,30 @@ static const yytype_int16 yyrline[] = 618, 620, 621, 623, 627, 632, 633, 634, 635, 637, 638, 646, 652, 658, 664, 670, 671, 678, 684, 686, 696, 703, 714, 721, 729, 730, 737, 744, 748, 753, - 763, 764, 768, 790, 821, 822, 834, 846, 861, 865, - 872, 876, 882, 887, 891, 895, 900, 901, 903, 913, - 914, 916, 918, 919, 921, 923, 924, 926, 931, 933, - 934, 936, 937, 939, 943, 948, 950, 951, 952, 956, - 957, 959, 960, 961, 962, 963, 964, 969, 973, 979, - 980, 982, 986, 991, 991, 995, 1003, 1004, 1006, 1014, - 1014, 1014, 1014, 1014, 1016, 1017, 1017, 1017, 1017, 1017, - 1017, 1017, 1017, 1018, 1018, 1022, 1022, 1024, 1025, 1026, - 1027, 1028, 1030, 1030, 1031, 1032, 1033, 1034, 1035, 1036, - 1037, 1038, 1039, 1041, 1042, 1044, 1045, 1046, 1047, 1051, - 1052, 1053, 1054, 1056, 1057, 1059, 1060, 1062, 1063, 1064, - 1065, 1066, 1067, 1068, 1072, 1073, 1077, 1078, 1080, 1081, - 1086, 1087, 1088, 1092, 1093, 1094, 1096, 1097, 1098, 1099, - 1100, 1102, 1104, 1106, 1107, 1108, 1109, 1110, 1111, 1113, - 1114, 1115, 1116, 1117, 1118, 1120, 1120, 1122, 1124, 1126, - 1128, 1129, 1130, 1131, 1133, 1133, 1133, 1133, 1133, 1133, - 1133, 1135, 1137, 1138, 1140, 1141, 1143, 1145, 1147, 1158, - 1159, 1170, 1202, 1211, 1211, 1218, 1218, 1220, 1220, 1227, - 1231, 1236, 1244, 1250, 1254, 1259, 1260, 1262, 1262, 1264, - 1264, 1266, 1267, 1269, 1269, 1275, 1276, 1278, 1282, 1287, - 1293, 1300, 1301, 1302, 1303, 1305, 1306, 1307, 1313, 1315, - 1319, 1324, 1340, 1347, 1355, 1364, 1365, 1366, 1367, 1368, - 1369, 1370, 1371, 1372, 1373, 1375, 1381, 1381, 1384, 1388 + 763, 764, 768, 790, 821, 822, 834, 846, 858, 873, + 877, 884, 888, 894, 899, 903, 907, 912, 913, 915, + 925, 926, 928, 930, 931, 933, 935, 936, 938, 943, + 945, 946, 948, 949, 951, 955, 960, 962, 963, 964, + 968, 969, 971, 972, 973, 974, 975, 976, 981, 985, + 991, 992, 994, 998, 1003, 1003, 1007, 1015, 1016, 1018, + 1026, 1026, 1026, 1026, 1026, 1028, 1029, 1029, 1029, 1029, + 1029, 1029, 1029, 1029, 1030, 1030, 1034, 1034, 1036, 1037, + 1038, 1039, 1040, 1042, 1042, 1043, 1044, 1045, 1046, 1047, + 1048, 1049, 1050, 1051, 1053, 1054, 1056, 1057, 1058, 1059, + 1063, 1064, 1065, 1066, 1068, 1069, 1071, 1072, 1074, 1075, + 1076, 1077, 1078, 1079, 1080, 1084, 1085, 1089, 1090, 1092, + 1093, 1098, 1099, 1100, 1104, 1105, 1106, 1108, 1109, 1110, + 1111, 1112, 1114, 1116, 1118, 1119, 1120, 1121, 1122, 1123, + 1125, 1126, 1127, 1128, 1129, 1130, 1132, 1132, 1134, 1136, + 1138, 1140, 1141, 1142, 1143, 1145, 1145, 1145, 1145, 1145, + 1145, 1145, 1147, 1149, 1150, 1152, 1153, 1155, 1157, 1159, + 1170, 1171, 1182, 1214, 1223, 1223, 1230, 1230, 1232, 1232, + 1239, 1243, 1248, 1256, 1262, 1266, 1271, 1272, 1274, 1274, + 1276, 1276, 1278, 1279, 1281, 1281, 1287, 1288, 1290, 1294, + 1299, 1305, 1312, 1313, 1314, 1315, 1317, 1318, 1319, 1325, + 1327, 1331, 1336, 1352, 1359, 1367, 1376, 1377, 1378, 1379, + 1380, 1381, 1382, 1383, 1384, 1385, 1387, 1393, 1393, 1396, + 1400 }; #endif @@ -986,12 +987,12 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-439) +#define YYPACT_NINF (-443) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF (-335) +#define YYTABLE_NINF (-336) #define yytable_value_is_error(Yyn) \ ((Yyn) == YYTABLE_NINF) @@ -1000,68 +1001,68 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int16 yypact[] = { - 465, 109, 134, 158, 193, 134, 166, 148, 162, 71, - 149, 134, 199, 32, 177, 73, 267, 126, 126, 126, - -36, 291, 131, -439, 214, -439, 214, -439, -439, -439, - -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, - 30, 86, -439, -439, -34, 327, 140, -439, 171, 246, - -439, 220, 220, 220, 134, 365, 134, 367, 394, 261, - -439, 284, -36, 281, 44, 284, 284, 284, 134, -439, - 290, 227, -439, -439, -439, -439, -439, 231, 35, -439, - 465, -439, 325, -439, -439, -439, -439, 296, -439, -34, - 316, 8, 375, 30, 86, -439, 431, 92, 434, 312, - 436, 134, 134, 368, -439, 351, 259, -439, -439, -439, - 361, 443, 405, 134, 263, 451, 451, 451, 453, 134, - 134, -439, 272, 267, -439, -439, -439, 273, 361, -439, - -439, -439, -439, 361, 144, 347, -439, 8, -439, -439, - -439, 701, 283, 467, -439, 470, -439, -439, 21, -439, - 285, 287, -439, -439, -439, -439, -439, -439, -439, -439, - -439, -439, -439, -439, -439, 432, -439, 346, -62, 259, - 361, -439, 451, 479, 250, -107, 293, 295, 298, 247, - 372, 301, 422, -439, 258, 391, 300, -439, 25, 458, - -439, -439, -439, -439, -439, -439, -439, -439, -439, -439, - -439, -439, -439, -439, -439, -439, 319, -53, -439, -439, - 400, -439, 382, -439, 382, 382, -439, -439, -439, -439, - -439, 494, 305, -439, 151, 137, 445, -23, 103, -439, - 347, -439, 347, -439, -439, -439, -439, -439, -439, -439, - -439, -439, -439, -439, -439, -439, -439, -439, 41, -439, - 442, -439, -439, -439, 92, -439, 134, 498, -36, 39, - 376, 137, 408, -439, 128, 314, -439, 11, 16, 375, - 442, 361, 361, 54, 64, 320, 422, 625, 361, 127, - 328, -64, 34, 368, -439, 361, -439, 361, 513, 361, - -439, -439, 422, -439, 422, 125, 330, 75, 422, 422, - 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, - 422, 422, 422, 367, 361, 443, -439, 482, -439, -439, - 473, -439, 368, -439, 339, 129, -439, 361, -439, -439, - -439, 361, 361, -439, 369, 411, -439, -74, -439, -439, - 403, -439, -439, 344, 444, -439, 634, 414, 349, 152, - -439, -439, -439, -36, 134, -439, 534, 92, 463, 361, - -439, -439, 355, 447, 175, 167, 65, 361, 361, -439, - 375, 448, -112, -439, -439, -36, -439, 364, -439, 358, - -439, 26, -439, 491, -439, -439, -439, 446, 594, 652, - 422, 359, 258, -439, 460, 378, 652, 652, 652, 652, - 516, 516, 516, 516, 127, 127, -14, -14, -14, -54, - 383, 137, -439, 284, 365, -439, 92, -439, 494, -439, - 137, 137, -439, 508, 479, -439, 415, -439, 634, 479, - 451, -439, -439, 388, -439, 390, -439, -439, 401, -439, - -439, 402, -439, -439, -439, -439, 404, -439, -439, 3, - 409, 479, -439, 39, -439, -439, -439, 157, 410, -439, - 159, -439, 361, 634, 361, 361, -439, 169, 173, 399, - -439, 407, 493, -439, -439, -439, 522, 523, 524, 495, - 34, 603, -439, -439, -439, 480, -439, 422, 652, 258, - 416, 164, -439, -439, 606, -439, 168, -439, -439, -88, - -439, 419, 178, -439, 605, 607, -439, 608, 609, 610, - -439, 496, -439, -439, 514, -439, 3, -439, 479, 180, - -439, -439, 515, 463, -55, 429, 137, 223, -439, 361, - -439, 26, 34, -439, -439, -439, 34, 468, 435, 361, - 625, 437, 188, -439, -439, -439, -439, -439, -439, -439, - 459, 189, 461, 462, 466, -439, -439, -439, 194, -439, - 499, 549, -439, -439, -439, -439, 137, -439, -439, 42, - 479, -30, -439, -439, -439, -439, 628, -439, -439, -439, - -439, 361, 239, 469, 361, 196, 361, -439, 477, 300, - -439, -439, -439, 481, 19, 479, 137, -439, -439, 137, - -439, -439, -108, 68, 63, -439, -439, 200, -439, -439, - 518, -439, -439, -439, 68, -439 + 480, 62, 104, 127, 212, 104, 16, 152, 167, 171, + 239, 104, 221, 17, 174, 67, 313, 172, 172, 172, + -31, 333, 153, -443, 238, -443, 238, -443, -443, -443, + -443, -443, -443, -443, -443, -443, -443, -443, -443, -443, + 226, 26, -443, -443, -30, 368, 185, -443, 198, 294, + -443, 250, 250, 250, 104, 397, 104, 409, 411, 300, + -443, 297, -31, 298, -13, 297, 297, 297, 104, -443, + 307, 242, -443, -443, -443, -443, -443, 248, 22, -443, + 480, -443, 345, -443, -443, -443, -443, 316, -443, -30, + 329, 84, -30, 226, 26, -443, 443, 37, 444, 324, + 446, 104, 104, 366, -443, 357, 262, -443, -443, -443, + 370, 454, 415, 104, 271, 459, 459, 459, 465, 104, + 104, -443, 280, 313, -443, -443, -443, 281, 370, -443, + -443, -443, -443, 370, 106, 356, -443, -443, 84, -443, + -443, -443, 697, 287, 475, -443, 476, -443, -443, 20, + -443, 290, 288, -443, -443, -443, -443, -443, -443, -443, + -443, -443, -443, -443, -443, -443, 439, -443, 353, -50, + 262, 370, -443, 459, 485, 91, 137, 299, 302, 304, + 245, 426, 309, 461, -443, 301, 395, 305, -443, 31, + 494, -443, -443, -443, -443, -443, -443, -443, -443, -443, + -443, -443, -443, -443, -443, -443, -443, 327, -51, -443, + -443, 408, -443, 387, -443, 387, 387, -443, -443, -443, + -443, -443, 500, 310, -443, 103, 83, 450, -17, -1, + -443, 356, -443, 356, -443, -443, -443, -443, -443, -443, + -443, -443, -443, -443, -443, -443, -443, -443, -443, 45, + -443, 251, -443, -443, -443, 37, -443, 104, 507, -31, + 72, 386, 83, 417, -443, -23, 328, -443, 12, 19, + 456, 251, 370, 370, 150, 181, 335, 461, 610, 370, + -92, 336, -54, 18, 366, -443, 370, -443, 370, 516, + 370, -443, -443, 461, -443, 461, -24, 338, 13, 461, + 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, + 461, 461, 461, 461, 409, 370, 454, -443, 487, -443, + -443, 481, -443, 366, -443, 339, 86, -443, 370, -443, + -443, -443, 370, 370, -443, 371, 414, -443, -71, -443, + -443, 410, -443, -443, 349, 447, -443, 617, 418, 352, + 119, -443, -443, -443, -31, 104, -443, 541, 37, 467, + 370, -443, -443, 360, 460, 208, 207, 202, 370, 370, + -443, 456, 452, -110, -443, -443, -31, -443, 284, -443, + 362, -443, 29, -443, 488, -443, -443, -443, 440, 572, + 630, 461, 369, 301, -443, 457, 373, 630, 630, 630, + 630, 648, 648, 648, 648, -92, -92, 58, 58, 58, + -72, 375, 83, -443, 297, 397, -443, 37, -443, 500, + -443, 83, 83, -443, 504, 485, -443, 407, -443, 617, + 485, 459, -443, -443, 380, -443, 381, -443, -443, 383, + -443, -443, 384, -443, -443, -443, -443, 385, -443, -443, + 9, 391, 485, -443, 72, -443, -443, -443, 146, 392, + -443, 176, -443, 370, 617, 370, 370, -443, 164, 209, + 394, -443, 396, 477, -443, -443, -443, 497, 510, 511, + 483, 18, 583, -443, -443, -443, 463, -443, 461, 630, + 301, 401, 178, -443, -443, 590, -443, 187, -443, -443, + 93, -443, 404, 192, -443, 591, 593, -443, 594, 595, + 596, -443, 482, -443, -443, 498, -443, 9, -443, 485, + 210, -443, -443, 499, 467, -53, 416, 83, 180, -443, + 370, -443, 29, 18, -443, -443, -443, 18, 341, 420, + 370, 610, 421, 211, -443, -443, -443, -443, -443, -443, + -443, 427, 216, 428, 429, 431, -443, -443, -443, 218, + -443, 478, 534, -443, -443, -443, -443, 83, -443, -443, + 189, 485, -28, -443, -443, -443, -443, 621, -443, -443, + -443, -443, 370, 59, 433, 370, 220, 370, -443, 438, + 305, -443, -443, -443, 445, 42, 485, 83, -443, -443, + 83, -443, -443, 70, 63, 143, -443, -443, 228, -443, + -443, 513, -443, -443, -443, 63, -443 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -1070,105 +1071,105 @@ static const yytype_int16 yypact[] = static const yytype_int16 yydefact[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 150, 0, 0, 0, 0, 0, 0, 30, 30, 30, - 0, 0, 337, 3, 21, 19, 21, 18, 8, 9, + 151, 0, 0, 0, 0, 0, 0, 30, 30, 30, + 0, 0, 338, 3, 21, 19, 21, 18, 8, 9, 7, 11, 16, 17, 13, 14, 12, 15, 10, 110, - 142, 111, 114, 120, 0, 0, 293, 101, 33, 0, - 45, 52, 52, 52, 0, 0, 0, 0, 130, 0, - 292, 96, 0, 0, 0, 96, 96, 96, 0, 43, - 0, 318, 319, 29, 26, 28, 27, 0, 0, 1, - 336, 2, 0, 6, 5, 124, 125, 0, 123, 0, - 127, 156, 0, 142, 0, 93, 0, 160, 0, 0, - 296, 0, 0, 136, 37, 0, 105, 276, 149, 129, + 143, 111, 114, 121, 0, 0, 294, 101, 33, 0, + 45, 52, 52, 52, 0, 0, 0, 0, 131, 0, + 293, 96, 0, 0, 0, 96, 96, 96, 0, 43, + 0, 319, 320, 29, 26, 28, 27, 0, 0, 1, + 337, 2, 0, 6, 5, 125, 126, 0, 124, 0, + 128, 157, 0, 143, 0, 93, 0, 161, 0, 0, + 297, 0, 0, 137, 37, 0, 105, 277, 150, 130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 44, 0, 0, 119, 118, 4, 0, 0, 117, - 115, 126, 122, 0, 0, 306, 116, 156, 294, 271, - 274, 276, 0, 0, 277, 0, 272, 273, 0, 282, - 0, 159, 161, 163, 165, 264, 265, 266, 275, 267, - 268, 269, 270, 32, 31, 0, 295, 0, 0, 105, - 0, 100, 0, 0, 0, 260, 0, 0, 0, 0, - 0, 0, 0, 262, 0, 133, 131, 157, 304, 169, - 176, 177, 178, 171, 173, 179, 172, 192, 180, 181, - 182, 183, 175, 170, 185, 186, 0, 136, 107, 95, - 0, 121, 40, 38, 40, 40, 94, 91, 92, 321, - 320, 0, 141, 143, 148, 152, 154, 151, 0, 112, - 305, 307, 306, 243, 244, 245, 246, 247, 248, 249, - 250, 251, 252, 253, 254, 255, 256, 279, 0, 278, - 281, 166, 167, 34, 0, 51, 0, 0, 0, 0, - 0, 135, 0, 338, 0, 0, 103, 130, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 188, 0, 187, - 0, 0, 0, 136, 132, 0, 302, 0, 0, 0, - 303, 168, 0, 189, 0, 0, 0, 0, 0, 0, + 0, 44, 0, 0, 120, 119, 4, 0, 0, 117, + 115, 127, 123, 0, 0, 307, 118, 116, 157, 295, + 272, 275, 277, 0, 0, 278, 0, 273, 274, 0, + 283, 0, 160, 162, 164, 166, 265, 266, 267, 276, + 268, 269, 270, 271, 32, 31, 0, 296, 0, 0, + 105, 0, 100, 0, 0, 0, 261, 0, 0, 0, + 0, 0, 0, 0, 263, 0, 134, 132, 158, 305, + 170, 177, 178, 179, 172, 174, 180, 173, 193, 181, + 182, 183, 184, 176, 171, 186, 187, 0, 137, 107, + 95, 0, 122, 40, 38, 40, 40, 94, 91, 92, + 322, 321, 0, 142, 144, 149, 153, 155, 152, 0, + 112, 306, 308, 307, 244, 245, 246, 247, 248, 249, + 250, 251, 252, 253, 254, 255, 256, 257, 280, 0, + 279, 282, 167, 168, 34, 0, 51, 0, 0, 0, + 0, 0, 136, 0, 339, 0, 0, 103, 131, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 189, 0, + 188, 0, 0, 0, 137, 133, 0, 303, 0, 0, + 0, 304, 169, 0, 190, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 106, 0, 97, 98, - 0, 42, 136, 41, 24, 0, 22, 0, 147, 146, - 145, 0, 0, 311, 0, 0, 313, 317, 308, 113, - 0, 280, 162, 0, 0, 48, 0, 0, 0, 0, - 53, 55, 56, 0, 0, 104, 0, 0, 227, 0, - 261, 263, 0, 0, 0, 0, 0, 0, 0, 211, - 0, 0, 0, 184, 174, 0, 134, 283, 285, 0, - 287, 300, 286, 138, 158, 203, 301, 204, 0, 199, - 0, 0, 0, 190, 0, 202, 201, 217, 218, 219, - 220, 221, 222, 223, 194, 193, 196, 195, 197, 198, - 0, 109, 108, 96, 0, 36, 0, 20, 0, 144, - 155, 153, 314, 0, 0, 316, 0, 309, 0, 0, - 0, 74, 68, 0, 70, 80, 71, 58, 0, 65, - 66, 0, 62, 63, 69, 72, 77, 67, 59, 82, - 0, 0, 47, 0, 50, 35, 339, 0, 0, 224, - 0, 215, 0, 0, 0, 0, 209, 0, 0, 0, - 257, 0, 0, 333, 325, 331, 329, 332, 327, 0, - 0, 0, 299, 291, 297, 0, 128, 0, 200, 0, - 0, 0, 191, 258, 0, 39, 0, 23, 312, 317, - 315, 0, 0, 46, 0, 0, 64, 0, 0, 0, - 73, 0, 86, 87, 0, 57, 81, 83, 0, 0, - 54, 102, 229, 227, 0, 0, 213, 0, 212, 0, - 216, 300, 0, 328, 330, 326, 0, 284, 301, 0, - 259, 0, 0, 207, 205, 99, 25, 310, 164, 49, - 0, 0, 0, 0, 0, 85, 88, 84, 0, 90, - 0, 142, 225, 241, 242, 210, 214, 288, 322, 334, - 0, 140, 208, 206, 61, 79, 0, 75, 60, 76, - 89, 0, 232, 0, 0, 0, 0, 137, 0, 228, - 233, 234, 235, 0, 0, 0, 335, 323, 298, 139, - 78, 226, 0, 0, 0, 240, 230, 0, 239, 237, - 0, 238, 236, 324, 0, 231 + 0, 0, 0, 0, 0, 0, 0, 106, 0, 97, + 98, 0, 42, 137, 41, 24, 0, 22, 0, 148, + 147, 146, 0, 0, 312, 0, 0, 314, 318, 309, + 113, 0, 281, 163, 0, 0, 48, 0, 0, 0, + 0, 53, 55, 56, 0, 0, 104, 0, 0, 228, + 0, 262, 264, 0, 0, 0, 0, 0, 0, 0, + 212, 0, 0, 0, 185, 175, 0, 135, 284, 286, + 0, 288, 301, 287, 139, 159, 204, 302, 205, 0, + 200, 0, 0, 0, 191, 0, 203, 202, 218, 219, + 220, 221, 222, 223, 224, 195, 194, 197, 196, 198, + 199, 0, 109, 108, 96, 0, 36, 0, 20, 0, + 145, 156, 154, 315, 0, 0, 317, 0, 310, 0, + 0, 0, 74, 68, 0, 70, 80, 71, 58, 0, + 65, 66, 0, 62, 63, 69, 72, 77, 67, 59, + 82, 0, 0, 47, 0, 50, 35, 340, 0, 0, + 225, 0, 216, 0, 0, 0, 0, 210, 0, 0, + 0, 258, 0, 0, 334, 326, 332, 330, 333, 328, + 0, 0, 0, 300, 292, 298, 0, 129, 0, 201, + 0, 0, 0, 192, 259, 0, 39, 0, 23, 313, + 318, 316, 0, 0, 46, 0, 0, 64, 0, 0, + 0, 73, 0, 86, 87, 0, 57, 81, 83, 0, + 0, 54, 102, 230, 228, 0, 0, 214, 0, 213, + 0, 217, 301, 0, 329, 331, 327, 0, 285, 302, + 0, 260, 0, 0, 208, 206, 99, 25, 311, 165, + 49, 0, 0, 0, 0, 0, 85, 88, 84, 0, + 90, 0, 143, 226, 242, 243, 211, 215, 289, 323, + 335, 0, 141, 209, 207, 61, 79, 0, 75, 60, + 76, 89, 0, 233, 0, 0, 0, 0, 138, 0, + 229, 234, 235, 236, 0, 0, 0, 336, 324, 299, + 140, 78, 227, 0, 0, 0, 241, 231, 0, 240, + 238, 0, 239, 237, 325, 0, 232 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -439, -439, -439, 558, -439, 623, -439, 233, -439, 374, - -439, -439, -439, -439, 242, -113, 183, -439, -439, -439, - 362, -439, 207, -439, -373, -439, -439, -439, -439, 145, - -439, -439, -57, -439, -439, -439, -439, -439, -439, 501, - -439, -439, 356, -224, 56, 629, 256, -51, 552, 10, - -439, -439, -164, 413, -439, -439, -439, -167, -439, -439, - -93, -439, 348, -439, -439, 539, -260, -439, -306, 424, - 433, 397, -127, -91, -439, -439, -439, -439, -439, -439, - 412, -439, -439, -439, 160, -439, -439, -439, -438, -439, - -439, -201, -439, -439, -439, -439, -439, -439, -85, -101, - -439, 536, -40, -439, -439, 538, -439, -439, -432, 155, - -439, -439, -439, 0, -439, -439, 161, 500, -439, 457, - -439, 475, -439, 208, -439, -439, 570, -439, -439, -439, - -439, -336 + -443, -443, -443, 551, -443, 608, -443, 223, -443, 326, + -443, -443, -443, -443, 225, -113, 138, -443, -443, -443, + 308, -443, 191, -443, -198, -443, -443, -443, -443, 118, + -443, -443, -57, -443, -443, -443, -443, -443, -443, 484, + -443, -443, 337, -229, 53, 611, 190, -52, 535, 36, + -443, -443, -167, 390, -443, -443, -443, -179, -443, -443, + -93, -443, 331, -443, -443, 523, -262, -443, -293, 430, + 413, 377, -127, -126, -443, -443, -443, -443, -443, -443, + 419, -443, -443, -443, 147, -443, -443, -443, -340, -443, + -443, -35, -443, -443, -443, -443, -443, -443, -85, -101, + -443, 532, -38, -443, -443, 538, -443, -443, -442, 155, + -443, -443, -443, 0, -443, -443, 151, 501, -443, 458, + -443, 466, -443, 194, -443, -443, 569, -443, -443, -443, + -443, -378 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - 0, 21, 22, 23, 24, 83, 325, 326, 25, 74, - 26, 164, 27, 28, 105, 212, 321, 29, 30, 31, - 100, 349, 350, 351, 449, 510, 506, 515, 516, 517, - 352, 32, 113, 33, 318, 319, 34, 35, 36, 174, - 37, 207, 208, 38, 39, 40, 41, 42, 63, 92, - 90, 132, 43, 110, 185, 283, 284, 171, 486, 587, - 91, 222, 223, 330, 58, 135, 186, 150, 151, 152, - 153, 187, 188, 189, 190, 191, 192, 193, 194, 195, - 274, 196, 197, 198, 459, 561, 593, 594, 606, 199, - 200, 245, 246, 247, 201, 202, 203, 204, 205, 155, - 156, 157, 158, 159, 160, 161, 162, 376, 377, 378, - 379, 380, 59, 381, 167, 482, 483, 484, 291, 229, - 230, 231, 337, 427, 44, 71, 72, 382, 479, 597, - 81, 264 + 0, 21, 22, 23, 24, 83, 326, 327, 25, 74, + 26, 165, 27, 28, 105, 213, 322, 29, 30, 31, + 100, 350, 351, 352, 450, 511, 507, 516, 517, 518, + 353, 32, 113, 33, 319, 320, 34, 35, 36, 175, + 37, 208, 209, 38, 39, 40, 41, 42, 63, 92, + 90, 132, 43, 110, 186, 284, 285, 172, 487, 588, + 91, 223, 224, 331, 58, 135, 187, 151, 152, 153, + 154, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 275, 197, 198, 199, 460, 562, 594, 595, 607, 200, + 201, 246, 247, 248, 202, 203, 204, 205, 206, 156, + 157, 158, 159, 160, 161, 162, 163, 377, 378, 379, + 380, 381, 59, 382, 168, 483, 484, 485, 292, 230, + 231, 232, 338, 428, 44, 71, 72, 383, 480, 598, + 81, 265 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1176,182 +1177,180 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 137, 224, 47, 214, 215, 50, 225, 227, 118, 119, - 120, 60, 154, 64, 213, 213, 213, 108, 372, 360, - 280, 586, 10, 109, 10, 602, 140, 141, 286, 286, - 511, 170, 332, 257, 345, 46, 603, 46, 130, 85, - 316, 136, 346, 261, 85, 139, 140, 141, 537, 341, - 89, 457, 273, 287, 103, 501, 106, 281, 424, 262, - 608, 609, 287, 133, 512, 258, 347, 472, 121, 363, - 289, 213, 425, 426, 602, 86, 77, 470, 16, 289, - 86, 134, 285, 267, 298, 268, 425, 426, 499, 277, - 525, 279, 68, 502, 287, 85, 139, 140, 141, 460, - 348, 168, 169, 89, 569, 362, 356, 87, 513, 473, - 496, 289, 88, 210, 474, 519, 383, 88, 114, 217, - 218, 475, 476, 266, 298, 583, 514, 374, 259, 454, - 143, 86, 491, 69, 313, 45, 563, 46, 477, 116, - 142, 315, 287, 478, 364, 365, 144, 175, 139, 140, - 141, 471, 288, 481, 20, 415, 20, 367, 465, 289, - 385, 48, 387, 154, 285, 610, 333, 272, 88, 154, - 56, 287, 312, 145, 313, 584, 615, 368, 368, 117, - 393, 143, 558, 369, 466, 277, 604, 411, 289, 605, - 176, 177, 178, 145, 146, 147, 49, 144, 394, 361, - 224, 388, 358, 389, 420, 421, 469, 395, 396, 397, - 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, - 408, 409, 62, 148, 375, 334, 125, 390, 490, 542, - 179, 611, 612, 143, 585, 604, 149, 51, 605, 335, - 467, 468, 328, 54, 145, 146, 147, 52, 65, 144, - 175, 139, 140, 141, 287, 391, 343, 55, 66, 607, - 226, 175, 139, 140, 141, 298, 336, 180, 287, 329, - 70, 289, 154, 410, 148, 57, 78, 464, 53, 571, - 61, 181, 73, 529, 287, 289, 287, 149, 528, 67, - 287, 79, 287, 176, 177, 178, 145, 146, 147, 488, - 94, 289, 463, 289, 176, 177, 178, 289, 10, 289, - 309, 310, 311, 312, 265, 313, 10, 503, 94, 355, - 417, 589, 356, 418, 80, 541, 182, 183, 82, 213, - 95, 154, 96, 179, 184, 524, 143, 526, 527, 149, - 287, 98, 565, 452, 179, 129, 453, 143, 521, 99, - 523, 254, 144, 285, 455, 544, 494, 289, 285, 546, - 272, 97, 254, 144, 175, 139, 140, 141, 104, 549, - 180, 559, 356, 107, 356, 175, 139, 140, 141, 573, - 575, 180, 285, 576, 181, 580, 111, 598, 356, 472, - 356, 613, 75, 76, 356, 181, 540, 322, 323, 145, - 146, 147, 566, 590, 591, 592, 109, 176, 177, 178, - 145, 146, 147, 112, 101, 102, 115, 122, 275, 177, - 178, 123, 124, 127, 128, 175, 139, 140, 141, 182, - 183, 473, 131, 10, 138, 165, 474, 184, 163, 166, - 182, 183, 149, 475, 476, 172, 206, 179, 184, 173, - 143, 209, 170, 149, 211, 139, 216, 596, 179, 599, - 477, 143, 62, 221, -334, 478, 144, 228, 582, 177, - 178, 249, 1, 248, 250, 292, 253, 144, 255, 256, - 2, 254, 263, 269, 180, 270, 282, 3, 271, 278, - 314, 4, 317, 472, 285, 276, 320, 324, 181, 327, - 331, 344, 5, 353, 357, 6, 7, 354, 179, 181, - 370, 143, 293, 145, 146, 147, 386, 8, 9, 373, - 392, 413, 414, 10, 145, 146, 147, 144, 11, 416, - 428, 12, 422, 423, 429, 473, 450, 456, 430, 451, - 474, 458, 462, 182, 183, 276, 461, 475, 476, 489, - 390, 184, 480, 13, 182, 183, 149, 14, -289, 181, - 294, 485, 184, 287, 477, 492, 313, 149, -334, 478, - 293, 498, 493, 15, 145, 146, 147, 500, 504, 16, - 505, 295, 233, 234, 235, 236, 237, 238, 296, 297, - 530, 507, 508, 532, 509, 536, 298, 299, 531, 518, - 522, 533, 534, 535, 182, 183, 538, 543, 539, 545, - 548, 550, 184, 551, 552, 553, 554, 149, 555, 556, - 564, 560, 17, 18, 19, 570, 87, 581, 572, 300, - 301, 302, 303, 304, 588, 614, 305, 306, 126, 307, - 308, 309, 310, 311, 312, 431, 313, 297, 293, 84, - 574, 497, 577, 578, 298, 20, 495, 579, 432, 595, - 520, 557, -290, 433, 434, 435, 436, 437, 600, 438, - 260, 412, 601, 93, 219, 419, 232, 439, 342, 293, - 359, 340, 384, 562, 251, 366, 252, 568, 290, 339, - -335, -335, 567, 220, -335, -335, 294, 307, 308, 309, - 310, 311, 312, 440, 313, 338, 293, 547, 0, 0, - 0, 487, 0, 0, 0, 0, 0, 371, 0, 0, - 0, 441, 0, 442, 443, 297, 0, 294, 0, 0, - 0, 0, 298, 299, 0, 0, 0, 0, 444, 0, - 0, 0, 0, 445, 0, 446, 0, 0, 371, 0, - 0, 0, 0, 0, -335, 447, 297, 0, 0, 0, - 0, 0, 0, 298, 299, 300, 301, 302, 303, 304, - 0, 0, 305, 306, 0, 307, 308, 309, 310, 311, - 312, 0, 313, 297, 0, 0, 0, 0, 0, 448, - 298, -335, 0, 0, 0, 0, 300, 301, 302, 303, - 304, 0, 0, 305, 306, 0, 307, 308, 309, 310, - 311, 312, 0, 313, 0, 0, 0, 0, 0, 0, - 0, 0, 0, -335, -335, -335, 303, 304, 0, 0, - 305, 306, 0, 307, 308, 309, 310, 311, 312, 0, - 313, 233, 234, 235, 236, 237, 238, 239, 240, 241, - 242, 243, 244 + 138, 225, 47, 215, 216, 50, 226, 228, 118, 119, + 120, 60, 155, 64, 214, 214, 214, 373, 281, 108, + 46, 46, 361, 587, 109, 141, 142, 10, 10, 317, + 346, 85, 287, 171, 287, 85, 512, 130, 333, 538, + 137, 140, 141, 142, 262, 258, 299, 500, 603, 140, + 141, 142, 503, 274, 103, 278, 106, 280, 282, 604, + 263, 425, 334, 288, 288, 458, 299, 86, 121, 603, + 513, 86, 214, 77, 520, 347, 89, 259, 391, 471, + 290, 290, 116, 16, 286, 143, 68, 51, 45, 426, + 427, 310, 311, 312, 313, 570, 314, 52, 461, 348, + 288, 169, 170, 363, 88, 384, 392, 46, 88, 176, + 140, 141, 142, 211, 514, 114, 314, 290, 394, 218, + 219, 335, 117, 267, 497, 455, 144, 69, 53, 89, + 48, 492, 515, 349, 144, 336, 395, 375, 564, 133, + 260, 559, 145, 316, 416, 365, 366, 472, 288, 10, + 145, 278, 177, 178, 179, 266, 482, 134, 289, 20, + 20, 386, 337, 388, 155, 290, 286, 389, 356, 390, + 155, 357, 146, 396, 397, 398, 399, 400, 401, 402, + 403, 404, 405, 406, 407, 408, 409, 410, 412, 146, + 147, 148, 180, 586, 329, 144, 299, 146, 147, 148, + 288, 225, 362, 359, 470, 421, 422, 62, 376, 605, + 78, 145, 606, 125, 473, 49, 342, 290, 608, 149, + 288, 330, 227, 591, 592, 593, 491, 149, 543, 181, + 605, 502, 150, 606, 94, 85, 364, 290, 609, 610, + 150, 468, 469, 182, 313, 65, 314, 54, 176, 140, + 141, 142, 94, 426, 427, 66, 474, 344, 146, 147, + 148, 475, 55, 273, 611, 489, 526, 288, 476, 477, + 56, 86, 584, 155, 368, 616, 411, 418, 572, 129, + 419, 288, 136, 529, 290, 478, 67, 357, 183, 184, + 479, 177, 178, 179, 369, 466, 185, 288, 290, 566, + 370, 150, 61, 87, 176, 140, 141, 142, 88, 473, + 453, 612, 613, 454, 290, 369, 70, 465, 504, 530, + 590, 467, 585, 542, 288, 288, 288, 268, 73, 269, + 214, 180, 155, 79, 144, 464, 525, 522, 527, 528, + 255, 290, 290, 290, 75, 76, 80, 177, 178, 179, + 145, 474, 82, 323, 324, 456, 475, 495, 273, 10, + 101, 102, 541, 476, 477, 57, 473, 524, 181, 545, + 286, 95, 286, 176, 140, 141, 142, 96, 547, 99, + 478, 255, 182, 550, -335, 479, 357, 180, 97, 98, + 144, 234, 235, 236, 237, 238, 239, 146, 147, 148, + 104, 560, 574, 567, 357, 286, 145, 576, 474, 581, + 577, 599, 357, 475, 357, 107, 177, 178, 179, 614, + 476, 477, 357, 109, 181, 111, 112, 183, 184, 176, + 140, 141, 142, 115, 122, 185, 123, 478, 182, 124, + 150, -335, 479, 127, 128, 131, 139, 166, 164, 167, + 171, 173, 174, 146, 147, 148, 180, 207, 597, 144, + 600, 210, 212, 140, 176, 140, 141, 142, 217, 583, + 62, 222, 276, 178, 179, 145, 229, 249, -290, 250, + 251, 254, 255, 183, 184, 256, 257, 1, 264, 270, + 283, 185, 271, 181, 272, 2, 150, 279, 315, 286, + 318, 321, 3, 325, 328, 332, 4, 182, 178, 179, + 345, 293, 180, 354, 10, 144, 355, 5, 358, 387, + 6, 7, 146, 147, 148, 371, 414, 374, 393, 417, + 415, 145, 8, 9, 423, -291, 424, 429, 10, 430, + 451, 431, 452, 11, 457, 459, 12, 180, 294, 277, + 144, 462, 183, 184, 391, 463, 481, 288, 486, 490, + 185, 314, 493, 182, 494, 150, 145, 499, 13, 501, + 505, 506, 14, 508, 509, 510, 534, 533, 146, 147, + 148, 519, 523, 537, 277, 531, 539, 532, 15, 535, + 536, 540, 544, 546, 16, 549, 295, 551, 182, 552, + 553, 554, 555, 557, 556, 561, 582, 565, 183, 184, + 571, 87, 573, 146, 147, 148, 185, 296, 575, 578, + 579, 150, 580, 596, 297, 298, 294, 589, 432, 601, + 615, 126, 299, 300, 84, 558, 602, 17, 18, 19, + 496, 433, 498, 183, 184, 521, 434, 435, 436, 437, + 438, 185, 439, 413, 261, 93, 150, 220, 360, 420, + 440, 233, 341, 385, 294, 301, 302, 303, 304, 305, + 20, 563, 306, 307, 295, 308, 309, 310, 311, 312, + 313, 252, 314, 568, 294, 343, 441, 253, 569, 488, + 291, 340, 221, 367, 548, 372, 0, 339, 0, 0, + 0, 0, 294, 298, 442, 0, 443, 444, 0, 0, + 299, 300, 295, 0, 0, 0, 0, 0, 0, 0, + 0, 445, 0, 0, 0, 0, 446, 0, 447, 0, + 0, 0, -336, 372, 0, 0, 0, 0, 448, 0, + 0, 298, 0, 301, 302, 303, 304, 305, 299, 300, + 306, 307, 0, 308, 309, 310, 311, 312, 313, 0, + 314, 298, 0, 0, 0, 0, 0, 0, 299, -336, + 0, 0, 449, 0, 0, 0, 0, 0, 0, 298, + 0, 301, 302, 303, 304, 305, 299, 0, 306, 307, + 0, 308, 309, 310, 311, 312, 313, 0, 314, 0, + 0, -336, -336, -336, 304, 305, 0, 0, 306, 307, + 0, 308, 309, 310, 311, 312, 313, 0, 314, 0, + 0, 0, -336, -336, 0, 0, -336, -336, 0, 308, + 309, 310, 311, 312, 313, 0, 314, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245 }; static const yytype_int16 yycheck[] = { 93, 128, 2, 116, 117, 5, 133, 134, 65, 66, - 67, 11, 97, 13, 115, 116, 117, 57, 278, 3, - 184, 51, 58, 12, 58, 6, 5, 6, 3, 3, - 27, 84, 55, 95, 258, 3, 17, 3, 89, 9, - 207, 92, 3, 170, 9, 4, 5, 6, 480, 250, - 40, 357, 179, 117, 54, 428, 56, 184, 132, 172, - 168, 169, 117, 55, 61, 127, 27, 25, 68, 270, - 134, 172, 160, 161, 6, 45, 20, 189, 114, 134, - 45, 73, 194, 190, 138, 192, 160, 161, 424, 180, - 463, 182, 19, 429, 117, 9, 4, 5, 6, 359, - 61, 101, 102, 93, 536, 269, 194, 77, 105, 67, - 416, 134, 82, 113, 72, 451, 283, 82, 62, 119, - 120, 79, 80, 174, 138, 83, 123, 191, 190, 353, - 89, 45, 392, 60, 188, 26, 191, 3, 96, 95, - 48, 194, 117, 101, 271, 272, 105, 3, 4, 5, - 6, 375, 127, 127, 190, 322, 190, 93, 93, 134, - 287, 3, 289, 248, 194, 603, 63, 113, 82, 254, - 99, 117, 186, 152, 188, 133, 614, 113, 113, 135, - 105, 89, 518, 119, 119, 276, 167, 314, 134, 170, - 46, 47, 48, 152, 153, 154, 3, 105, 123, 183, - 327, 292, 191, 294, 331, 332, 370, 298, 299, 300, - 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, - 311, 312, 190, 182, 190, 122, 191, 102, 392, 489, - 86, 168, 169, 89, 570, 167, 195, 71, 170, 136, - 367, 368, 91, 95, 152, 153, 154, 81, 71, 105, - 3, 4, 5, 6, 117, 130, 256, 95, 81, 595, - 116, 3, 4, 5, 6, 138, 163, 123, 117, 118, - 3, 134, 357, 313, 182, 126, 20, 110, 112, 539, - 81, 137, 156, 110, 117, 134, 117, 195, 119, 112, - 117, 0, 117, 46, 47, 48, 152, 153, 154, 390, - 44, 134, 127, 134, 46, 47, 48, 134, 58, 134, - 183, 184, 185, 186, 64, 188, 58, 430, 62, 191, - 191, 581, 194, 194, 193, 489, 182, 183, 114, 430, - 3, 416, 192, 86, 190, 462, 89, 464, 465, 195, - 117, 95, 119, 191, 86, 89, 194, 89, 191, 129, - 191, 194, 105, 194, 354, 191, 413, 134, 194, 191, - 113, 190, 194, 105, 3, 4, 5, 6, 3, 191, - 123, 191, 194, 6, 194, 3, 4, 5, 6, 191, - 191, 123, 194, 194, 137, 191, 125, 191, 194, 25, - 194, 191, 18, 19, 194, 137, 487, 214, 215, 152, - 153, 154, 529, 164, 165, 166, 12, 46, 47, 48, - 152, 153, 154, 129, 52, 53, 135, 127, 46, 47, - 48, 194, 191, 98, 128, 3, 4, 5, 6, 182, - 183, 67, 116, 58, 3, 123, 72, 190, 4, 3, - 182, 183, 195, 79, 80, 94, 3, 86, 190, 190, - 89, 46, 84, 195, 191, 4, 3, 584, 86, 586, - 96, 89, 190, 190, 100, 101, 105, 120, 561, 47, - 48, 4, 7, 190, 4, 17, 191, 105, 46, 133, - 15, 194, 3, 190, 123, 190, 95, 22, 190, 188, - 171, 26, 92, 25, 194, 123, 114, 3, 137, 194, - 55, 3, 37, 127, 190, 40, 41, 99, 86, 137, - 190, 89, 54, 152, 153, 154, 3, 52, 53, 191, - 190, 39, 49, 58, 152, 153, 154, 105, 63, 190, - 127, 66, 163, 122, 190, 67, 122, 3, 94, 190, - 72, 78, 95, 182, 183, 123, 191, 79, 80, 190, - 102, 190, 194, 88, 182, 183, 195, 92, 194, 137, - 102, 70, 190, 117, 96, 105, 188, 195, 100, 101, - 54, 63, 189, 108, 152, 153, 154, 162, 190, 114, - 190, 123, 140, 141, 142, 143, 144, 145, 130, 131, - 191, 190, 190, 100, 190, 100, 138, 139, 191, 190, - 190, 79, 79, 79, 182, 183, 3, 191, 128, 3, - 191, 6, 190, 6, 6, 6, 6, 195, 122, 105, - 191, 106, 157, 158, 159, 190, 77, 128, 191, 171, - 172, 173, 174, 175, 6, 117, 178, 179, 80, 181, - 182, 183, 184, 185, 186, 11, 188, 131, 54, 26, - 191, 418, 191, 191, 138, 190, 414, 191, 24, 190, - 453, 516, 194, 29, 30, 31, 32, 33, 191, 35, - 169, 315, 191, 44, 122, 327, 137, 43, 254, 54, - 267, 248, 285, 523, 148, 273, 148, 532, 188, 232, - 174, 175, 531, 123, 178, 179, 102, 181, 182, 183, - 184, 185, 186, 69, 188, 230, 54, 499, -1, -1, - -1, 117, -1, -1, -1, -1, -1, 123, -1, -1, - -1, 87, -1, 89, 90, 131, -1, 102, -1, -1, - -1, -1, 138, 139, -1, -1, -1, -1, 104, -1, - -1, -1, -1, 109, -1, 111, -1, -1, 123, -1, - -1, -1, -1, -1, 102, 121, 131, -1, -1, -1, - -1, -1, -1, 138, 139, 171, 172, 173, 174, 175, - -1, -1, 178, 179, -1, 181, 182, 183, 184, 185, - 186, -1, 188, 131, -1, -1, -1, -1, -1, 155, - 138, 139, -1, -1, -1, -1, 171, 172, 173, 174, - 175, -1, -1, 178, 179, -1, 181, 182, 183, 184, - 185, 186, -1, 188, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 171, 172, 173, 174, 175, -1, -1, + 67, 11, 97, 13, 115, 116, 117, 279, 185, 57, + 3, 3, 3, 51, 12, 5, 6, 58, 58, 208, + 259, 9, 3, 84, 3, 9, 27, 89, 55, 481, + 92, 4, 5, 6, 171, 95, 138, 425, 6, 4, + 5, 6, 430, 180, 54, 181, 56, 183, 185, 17, + 173, 132, 63, 117, 117, 358, 138, 45, 68, 6, + 61, 45, 173, 20, 452, 3, 40, 127, 102, 189, + 134, 134, 95, 114, 194, 48, 19, 71, 26, 160, + 161, 183, 184, 185, 186, 537, 188, 81, 360, 27, + 117, 101, 102, 270, 82, 284, 130, 3, 82, 3, + 4, 5, 6, 113, 105, 62, 188, 134, 105, 119, + 120, 122, 135, 175, 417, 354, 89, 60, 112, 93, + 3, 393, 123, 61, 89, 136, 123, 191, 191, 55, + 190, 519, 105, 194, 323, 272, 273, 376, 117, 58, + 105, 277, 46, 47, 48, 64, 127, 73, 127, 190, + 190, 288, 163, 290, 249, 134, 194, 293, 191, 295, + 255, 194, 152, 299, 300, 301, 302, 303, 304, 305, + 306, 307, 308, 309, 310, 311, 312, 313, 315, 152, + 153, 154, 86, 571, 91, 89, 138, 152, 153, 154, + 117, 328, 183, 191, 371, 332, 333, 190, 190, 167, + 20, 105, 170, 191, 25, 3, 251, 134, 596, 182, + 117, 118, 116, 164, 165, 166, 393, 182, 490, 123, + 167, 429, 195, 170, 44, 9, 271, 134, 168, 169, + 195, 368, 369, 137, 186, 71, 188, 95, 3, 4, + 5, 6, 62, 160, 161, 81, 67, 257, 152, 153, + 154, 72, 95, 113, 604, 391, 464, 117, 79, 80, + 99, 45, 83, 358, 93, 615, 314, 191, 540, 89, + 194, 117, 92, 119, 134, 96, 112, 194, 182, 183, + 101, 46, 47, 48, 113, 93, 190, 117, 134, 119, + 119, 195, 81, 77, 3, 4, 5, 6, 82, 25, + 191, 168, 169, 194, 134, 113, 3, 110, 431, 110, + 582, 119, 133, 490, 117, 117, 117, 190, 156, 192, + 431, 86, 417, 0, 89, 127, 463, 191, 465, 466, + 194, 134, 134, 134, 18, 19, 193, 46, 47, 48, + 105, 67, 114, 215, 216, 355, 72, 414, 113, 58, + 52, 53, 488, 79, 80, 126, 25, 191, 123, 191, + 194, 3, 194, 3, 4, 5, 6, 192, 191, 129, + 96, 194, 137, 191, 100, 101, 194, 86, 190, 95, + 89, 140, 141, 142, 143, 144, 145, 152, 153, 154, + 3, 191, 191, 530, 194, 194, 105, 191, 67, 191, + 194, 191, 194, 72, 194, 6, 46, 47, 48, 191, + 79, 80, 194, 12, 123, 125, 129, 182, 183, 3, + 4, 5, 6, 135, 127, 190, 194, 96, 137, 191, + 195, 100, 101, 98, 128, 116, 3, 123, 4, 3, + 84, 94, 190, 152, 153, 154, 86, 3, 585, 89, + 587, 46, 191, 4, 3, 4, 5, 6, 3, 562, + 190, 190, 46, 47, 48, 105, 120, 190, 194, 4, + 4, 191, 194, 182, 183, 46, 133, 7, 3, 190, + 95, 190, 190, 123, 190, 15, 195, 188, 171, 194, + 92, 114, 22, 3, 194, 55, 26, 137, 47, 48, + 3, 17, 86, 127, 58, 89, 99, 37, 190, 3, + 40, 41, 152, 153, 154, 190, 39, 191, 190, 190, + 49, 105, 52, 53, 163, 194, 122, 127, 58, 190, + 122, 94, 190, 63, 3, 78, 66, 86, 54, 123, + 89, 191, 182, 183, 102, 95, 194, 117, 70, 190, + 190, 188, 105, 137, 189, 195, 105, 63, 88, 162, + 190, 190, 92, 190, 190, 190, 79, 100, 152, 153, + 154, 190, 190, 100, 123, 191, 3, 191, 108, 79, + 79, 128, 191, 3, 114, 191, 102, 6, 137, 6, + 6, 6, 6, 105, 122, 106, 128, 191, 182, 183, + 190, 77, 191, 152, 153, 154, 190, 123, 191, 191, + 191, 195, 191, 190, 130, 131, 54, 6, 11, 191, + 117, 80, 138, 139, 26, 517, 191, 157, 158, 159, + 415, 24, 419, 182, 183, 454, 29, 30, 31, 32, + 33, 190, 35, 316, 170, 44, 195, 122, 268, 328, + 43, 138, 249, 286, 54, 171, 172, 173, 174, 175, + 190, 524, 178, 179, 102, 181, 182, 183, 184, 185, + 186, 149, 188, 532, 54, 255, 69, 149, 533, 117, + 189, 233, 123, 274, 500, 123, -1, 231, -1, -1, + -1, -1, 54, 131, 87, -1, 89, 90, -1, -1, + 138, 139, 102, -1, -1, -1, -1, -1, -1, -1, + -1, 104, -1, -1, -1, -1, 109, -1, 111, -1, + -1, -1, 102, 123, -1, -1, -1, -1, 121, -1, + -1, 131, -1, 171, 172, 173, 174, 175, 138, 139, 178, 179, -1, 181, 182, 183, 184, 185, 186, -1, - 188, 140, 141, 142, 143, 144, 145, 146, 147, 148, - 149, 150, 151 + 188, 131, -1, -1, -1, -1, -1, -1, 138, 139, + -1, -1, 155, -1, -1, -1, -1, -1, -1, 131, + -1, 171, 172, 173, 174, 175, 138, -1, 178, 179, + -1, 181, 182, 183, 184, 185, 186, -1, 188, -1, + -1, 171, 172, 173, 174, 175, -1, -1, 178, 179, + -1, 181, 182, 183, 184, 185, 186, -1, 188, -1, + -1, -1, 174, 175, -1, -1, 178, 179, -1, 181, + 182, 183, 184, 185, 186, -1, 188, 140, 141, 142, + 143, 144, 145, 146, 147, 148, 149, 150, 151 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -1371,55 +1370,55 @@ static const yytype_int16 yystos[] = 216, 216, 216, 309, 3, 210, 309, 6, 298, 12, 249, 125, 129, 228, 240, 135, 95, 135, 228, 228, 228, 309, 127, 194, 191, 191, 199, 98, 128, 242, - 243, 116, 247, 55, 73, 261, 243, 256, 3, 4, - 5, 6, 48, 89, 105, 152, 153, 154, 182, 195, - 263, 264, 265, 266, 294, 295, 296, 297, 298, 299, - 300, 301, 302, 4, 207, 123, 3, 310, 309, 309, - 84, 253, 94, 190, 235, 3, 46, 47, 48, 86, - 123, 137, 182, 183, 190, 250, 262, 267, 268, 269, - 270, 271, 272, 273, 274, 275, 277, 278, 279, 285, - 286, 290, 291, 292, 293, 294, 3, 237, 238, 46, - 309, 191, 211, 295, 211, 211, 3, 309, 309, 244, - 322, 190, 257, 258, 268, 268, 116, 268, 120, 315, - 316, 317, 261, 140, 141, 142, 143, 144, 145, 146, - 147, 148, 149, 150, 151, 287, 288, 289, 190, 4, - 4, 297, 301, 191, 194, 46, 133, 95, 127, 190, - 235, 268, 211, 3, 327, 64, 243, 190, 192, 190, - 190, 190, 113, 268, 276, 46, 123, 269, 188, 269, - 248, 268, 95, 251, 252, 194, 3, 117, 127, 134, - 313, 314, 17, 54, 102, 123, 130, 131, 138, 139, - 171, 172, 173, 174, 175, 178, 179, 181, 182, 183, - 184, 185, 186, 188, 171, 194, 253, 92, 230, 231, - 114, 212, 212, 212, 3, 202, 203, 194, 91, 118, - 259, 55, 55, 63, 122, 136, 163, 318, 317, 315, - 266, 287, 265, 309, 3, 239, 3, 27, 61, 217, - 218, 219, 226, 127, 99, 191, 194, 190, 191, 249, - 3, 183, 248, 287, 268, 268, 276, 93, 113, 119, - 190, 123, 262, 191, 191, 190, 303, 304, 305, 306, - 307, 309, 323, 253, 267, 268, 3, 268, 269, 269, - 102, 130, 190, 105, 123, 269, 269, 269, 269, 269, + 243, 116, 247, 55, 73, 261, 242, 243, 256, 3, + 4, 5, 6, 48, 89, 105, 152, 153, 154, 182, + 195, 263, 264, 265, 266, 294, 295, 296, 297, 298, + 299, 300, 301, 302, 4, 207, 123, 3, 310, 309, + 309, 84, 253, 94, 190, 235, 3, 46, 47, 48, + 86, 123, 137, 182, 183, 190, 250, 262, 267, 268, + 269, 270, 271, 272, 273, 274, 275, 277, 278, 279, + 285, 286, 290, 291, 292, 293, 294, 3, 237, 238, + 46, 309, 191, 211, 295, 211, 211, 3, 309, 309, + 244, 322, 190, 257, 258, 268, 268, 116, 268, 120, + 315, 316, 317, 261, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 151, 287, 288, 289, 190, + 4, 4, 297, 301, 191, 194, 46, 133, 95, 127, + 190, 235, 268, 211, 3, 327, 64, 243, 190, 192, + 190, 190, 190, 113, 268, 276, 46, 123, 269, 188, + 269, 248, 268, 95, 251, 252, 194, 3, 117, 127, + 134, 313, 314, 17, 54, 102, 123, 130, 131, 138, + 139, 171, 172, 173, 174, 175, 178, 179, 181, 182, + 183, 184, 185, 186, 188, 171, 194, 253, 92, 230, + 231, 114, 212, 212, 212, 3, 202, 203, 194, 91, + 118, 259, 55, 55, 63, 122, 136, 163, 318, 317, + 315, 266, 287, 265, 309, 3, 239, 3, 27, 61, + 217, 218, 219, 226, 127, 99, 191, 194, 190, 191, + 249, 3, 183, 248, 287, 268, 268, 276, 93, 113, + 119, 190, 123, 262, 191, 191, 190, 303, 304, 305, + 306, 307, 309, 323, 253, 267, 268, 3, 268, 269, + 269, 102, 130, 190, 105, 123, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, - 298, 268, 238, 39, 49, 253, 190, 191, 194, 258, - 268, 268, 163, 122, 132, 160, 161, 319, 127, 190, - 94, 11, 24, 29, 30, 31, 32, 33, 35, 43, - 69, 87, 89, 90, 104, 109, 111, 121, 155, 220, - 122, 190, 191, 194, 239, 309, 3, 264, 78, 280, - 262, 191, 95, 127, 110, 93, 119, 268, 268, 248, - 189, 239, 25, 67, 72, 79, 80, 96, 101, 324, - 194, 127, 311, 312, 313, 70, 254, 117, 269, 190, - 248, 262, 105, 189, 228, 210, 264, 203, 63, 327, - 162, 220, 327, 211, 190, 190, 222, 190, 190, 190, - 221, 27, 61, 105, 123, 223, 224, 225, 190, 327, - 218, 191, 190, 191, 268, 220, 268, 268, 119, 110, - 191, 191, 100, 79, 79, 79, 100, 304, 3, 128, - 269, 248, 262, 191, 191, 3, 191, 319, 191, 191, - 6, 6, 6, 6, 6, 122, 105, 225, 327, 191, - 106, 281, 280, 191, 191, 119, 268, 312, 305, 304, - 190, 262, 191, 191, 191, 191, 194, 191, 191, 191, - 191, 128, 256, 83, 133, 327, 51, 255, 6, 262, - 164, 165, 166, 282, 283, 190, 268, 325, 191, 268, - 191, 191, 6, 17, 167, 170, 284, 327, 168, 169, - 284, 168, 169, 191, 117, 284 + 269, 298, 268, 238, 39, 49, 253, 190, 191, 194, + 258, 268, 268, 163, 122, 132, 160, 161, 319, 127, + 190, 94, 11, 24, 29, 30, 31, 32, 33, 35, + 43, 69, 87, 89, 90, 104, 109, 111, 121, 155, + 220, 122, 190, 191, 194, 239, 309, 3, 264, 78, + 280, 262, 191, 95, 127, 110, 93, 119, 268, 268, + 248, 189, 239, 25, 67, 72, 79, 80, 96, 101, + 324, 194, 127, 311, 312, 313, 70, 254, 117, 269, + 190, 248, 262, 105, 189, 228, 210, 264, 203, 63, + 327, 162, 220, 327, 211, 190, 190, 222, 190, 190, + 190, 221, 27, 61, 105, 123, 223, 224, 225, 190, + 327, 218, 191, 190, 191, 268, 220, 268, 268, 119, + 110, 191, 191, 100, 79, 79, 79, 100, 304, 3, + 128, 269, 248, 262, 191, 191, 3, 191, 319, 191, + 191, 6, 6, 6, 6, 6, 122, 105, 225, 327, + 191, 106, 281, 280, 191, 191, 119, 268, 312, 305, + 304, 190, 262, 191, 191, 191, 191, 194, 191, 191, + 191, 191, 128, 256, 83, 133, 327, 51, 255, 6, + 262, 164, 165, 166, 282, 283, 190, 268, 325, 191, + 268, 191, 191, 6, 17, 167, 170, 284, 327, 168, + 169, 284, 168, 169, 191, 117, 284 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ @@ -1436,29 +1435,30 @@ static const yytype_int16 yyr1[] = 222, 223, 223, 224, 224, 225, 225, 225, 225, 226, 226, 227, 227, 227, 227, 228, 228, 229, 230, 231, 232, 233, 234, 234, 235, 235, 236, 237, 237, 238, - 239, 239, 240, 240, 241, 241, 241, 241, 242, 242, - 243, 244, 245, 246, 246, 246, 247, 247, 248, 249, - 249, 250, 251, 251, 252, 253, 253, 254, 254, 255, - 255, 256, 256, 257, 257, 258, 259, 259, 259, 260, - 260, 261, 261, 261, 261, 261, 261, 262, 262, 263, - 263, 264, 264, 265, 265, 266, 266, 266, 267, 268, - 268, 268, 268, 268, 269, 269, 269, 269, 269, 269, - 269, 269, 269, 269, 269, 270, 270, 271, 271, 271, - 271, 271, 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 273, 273, 274, 274, 274, 274, 275, - 275, 275, 275, 276, 276, 277, 277, 278, 278, 278, - 278, 278, 278, 278, 279, 279, 280, 280, 281, 281, - 282, 282, 282, 283, 283, 283, 284, 284, 284, 284, - 284, 285, 286, 287, 287, 287, 287, 287, 287, 288, - 288, 288, 288, 288, 288, 289, 289, 290, 291, 292, - 293, 293, 293, 293, 294, 294, 294, 294, 294, 294, - 294, 295, 296, 296, 297, 297, 298, 299, 300, 301, - 301, 301, 302, 303, 303, 304, 304, 305, 305, 306, - 306, 307, 308, 309, 309, 310, 310, 311, 311, 312, - 312, 313, 313, 314, 314, 315, 315, 316, 316, 317, - 317, 318, 318, 318, 318, 319, 319, 319, 320, 321, - 321, 322, 323, 323, 323, 324, 324, 324, 324, 324, - 324, 324, 324, 324, 324, 325, 326, 326, 327, 327 + 239, 239, 240, 240, 241, 241, 241, 241, 241, 242, + 242, 243, 244, 245, 246, 246, 246, 247, 247, 248, + 249, 249, 250, 251, 251, 252, 253, 253, 254, 254, + 255, 255, 256, 256, 257, 257, 258, 259, 259, 259, + 260, 260, 261, 261, 261, 261, 261, 261, 262, 262, + 263, 263, 264, 264, 265, 265, 266, 266, 266, 267, + 268, 268, 268, 268, 268, 269, 269, 269, 269, 269, + 269, 269, 269, 269, 269, 269, 270, 270, 271, 271, + 271, 271, 271, 272, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 273, 273, 274, 274, 274, 274, + 275, 275, 275, 275, 276, 276, 277, 277, 278, 278, + 278, 278, 278, 278, 278, 279, 279, 280, 280, 281, + 281, 282, 282, 282, 283, 283, 283, 284, 284, 284, + 284, 284, 285, 286, 287, 287, 287, 287, 287, 287, + 288, 288, 288, 288, 288, 288, 289, 289, 290, 291, + 292, 293, 293, 293, 293, 294, 294, 294, 294, 294, + 294, 294, 295, 296, 296, 297, 297, 298, 299, 300, + 301, 301, 301, 302, 303, 303, 304, 304, 305, 305, + 306, 306, 307, 308, 309, 309, 310, 310, 311, 311, + 312, 312, 313, 313, 314, 314, 315, 315, 316, 316, + 317, 317, 318, 318, 318, 318, 319, 319, 319, 320, + 321, 321, 322, 323, 323, 323, 324, 324, 324, 324, + 324, 324, 324, 324, 324, 324, 325, 326, 326, 327, + 327 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -1476,28 +1476,29 @@ static const yytype_int8 yyr2[] = 4, 4, 4, 3, 4, 2, 0, 5, 1, 4, 4, 2, 8, 5, 3, 0, 5, 1, 3, 3, 1, 1, 4, 5, 1, 3, 3, 3, 3, 3, - 1, 3, 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, 1, 6, 1, 2, 2, 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, 4, 6, 6, 0, 3, 0, - 2, 5, 0, 1, 1, 1, 2, 2, 2, 2, - 1, 6, 6, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 4, 4, 5, - 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, - 3, 2, 1, 1, 3, 1, 1, 1, 4, 1, - 3, 2, 1, 1, 3, 1, 0, 1, 5, 1, - 0, 2, 1, 1, 0, 1, 0, 1, 2, 3, - 5, 1, 3, 1, 2, 2, 1, 0, 2, 1, - 3, 3, 4, 6, 8, 1, 2, 1, 2, 1, - 2, 1, 1, 1, 0, 1, 1, 0, 1, 3 + 3, 1, 3, 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, 1, 6, 1, 2, 2, 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, 4, 6, 6, 0, 3, + 0, 2, 5, 0, 1, 1, 1, 2, 2, 2, + 2, 1, 6, 6, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, + 5, 1, 3, 1, 3, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, + 2, 3, 2, 1, 1, 3, 1, 1, 1, 4, + 1, 3, 2, 1, 1, 3, 1, 0, 1, 5, + 1, 0, 2, 1, 1, 0, 1, 0, 1, 2, + 3, 5, 1, 3, 1, 2, 2, 1, 0, 2, + 1, 3, 3, 4, 6, 8, 1, 2, 1, 2, + 1, 2, 1, 1, 1, 0, 1, 1, 0, 1, + 3 }; @@ -2063,25 +2064,25 @@ yydestruct (const char *yymsg, case YYSYMBOL_IDENTIFIER: /* IDENTIFIER */ #line 186 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2067 "bison_parser.cpp" +#line 2068 "bison_parser.cpp" break; case YYSYMBOL_STRING: /* STRING */ #line 186 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2073 "bison_parser.cpp" +#line 2074 "bison_parser.cpp" break; case YYSYMBOL_FLOATVAL: /* FLOATVAL */ #line 173 "bison_parser.y" { } -#line 2079 "bison_parser.cpp" +#line 2080 "bison_parser.cpp" break; case YYSYMBOL_INTVAL: /* INTVAL */ #line 173 "bison_parser.y" { } -#line 2085 "bison_parser.cpp" +#line 2086 "bison_parser.cpp" break; case YYSYMBOL_statement_list: /* statement_list */ @@ -2094,19 +2095,19 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).stmt_vec)); } -#line 2098 "bison_parser.cpp" +#line 2099 "bison_parser.cpp" break; case YYSYMBOL_statement: /* statement */ #line 195 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 2104 "bison_parser.cpp" +#line 2105 "bison_parser.cpp" break; case YYSYMBOL_preparable_statement: /* preparable_statement */ #line 195 "bison_parser.y" { delete (((*yyvaluep).statement)); } -#line 2110 "bison_parser.cpp" +#line 2111 "bison_parser.cpp" break; case YYSYMBOL_opt_hints: /* opt_hints */ @@ -2119,7 +2120,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2123 "bison_parser.cpp" +#line 2124 "bison_parser.cpp" break; case YYSYMBOL_hint_list: /* hint_list */ @@ -2132,85 +2133,85 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2136 "bison_parser.cpp" +#line 2137 "bison_parser.cpp" break; case YYSYMBOL_hint: /* hint */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2142 "bison_parser.cpp" +#line 2143 "bison_parser.cpp" break; case YYSYMBOL_transaction_statement: /* transaction_statement */ #line 195 "bison_parser.y" { delete (((*yyvaluep).transaction_stmt)); } -#line 2148 "bison_parser.cpp" +#line 2149 "bison_parser.cpp" break; case YYSYMBOL_prepare_statement: /* prepare_statement */ #line 195 "bison_parser.y" { delete (((*yyvaluep).prep_stmt)); } -#line 2154 "bison_parser.cpp" +#line 2155 "bison_parser.cpp" break; case YYSYMBOL_prepare_target_query: /* prepare_target_query */ #line 186 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2160 "bison_parser.cpp" +#line 2161 "bison_parser.cpp" break; case YYSYMBOL_execute_statement: /* execute_statement */ #line 195 "bison_parser.y" { delete (((*yyvaluep).exec_stmt)); } -#line 2166 "bison_parser.cpp" +#line 2167 "bison_parser.cpp" break; case YYSYMBOL_import_statement: /* import_statement */ #line 195 "bison_parser.y" { delete (((*yyvaluep).import_stmt)); } -#line 2172 "bison_parser.cpp" +#line 2173 "bison_parser.cpp" break; case YYSYMBOL_file_type: /* file_type */ #line 173 "bison_parser.y" { } -#line 2178 "bison_parser.cpp" +#line 2179 "bison_parser.cpp" break; case YYSYMBOL_file_path: /* file_path */ #line 186 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2184 "bison_parser.cpp" +#line 2185 "bison_parser.cpp" break; case YYSYMBOL_opt_file_type: /* opt_file_type */ #line 173 "bison_parser.y" { } -#line 2190 "bison_parser.cpp" +#line 2191 "bison_parser.cpp" break; case YYSYMBOL_export_statement: /* export_statement */ #line 195 "bison_parser.y" { delete (((*yyvaluep).export_stmt)); } -#line 2196 "bison_parser.cpp" +#line 2197 "bison_parser.cpp" break; case YYSYMBOL_show_statement: /* show_statement */ #line 195 "bison_parser.y" { delete (((*yyvaluep).show_stmt)); } -#line 2202 "bison_parser.cpp" +#line 2203 "bison_parser.cpp" break; case YYSYMBOL_create_statement: /* create_statement */ #line 195 "bison_parser.y" { delete (((*yyvaluep).create_stmt)); } -#line 2208 "bison_parser.cpp" +#line 2209 "bison_parser.cpp" break; case YYSYMBOL_opt_not_exists: /* opt_not_exists */ #line 173 "bison_parser.y" { } -#line 2214 "bison_parser.cpp" +#line 2215 "bison_parser.cpp" break; case YYSYMBOL_table_elem_commalist: /* table_elem_commalist */ @@ -2223,109 +2224,109 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).table_element_vec)); } -#line 2227 "bison_parser.cpp" +#line 2228 "bison_parser.cpp" break; case YYSYMBOL_table_elem: /* table_elem */ #line 195 "bison_parser.y" { delete (((*yyvaluep).table_element_t)); } -#line 2233 "bison_parser.cpp" +#line 2234 "bison_parser.cpp" break; case YYSYMBOL_column_def: /* column_def */ #line 195 "bison_parser.y" { delete (((*yyvaluep).column_t)); } -#line 2239 "bison_parser.cpp" +#line 2240 "bison_parser.cpp" break; case YYSYMBOL_column_type: /* column_type */ #line 173 "bison_parser.y" { } -#line 2245 "bison_parser.cpp" +#line 2246 "bison_parser.cpp" break; case YYSYMBOL_opt_time_precision: /* opt_time_precision */ #line 173 "bison_parser.y" { } -#line 2251 "bison_parser.cpp" +#line 2252 "bison_parser.cpp" break; case YYSYMBOL_opt_decimal_specification: /* opt_decimal_specification */ #line 195 "bison_parser.y" { delete (((*yyvaluep).ival_pair)); } -#line 2257 "bison_parser.cpp" +#line 2258 "bison_parser.cpp" break; case YYSYMBOL_opt_column_constraints: /* opt_column_constraints */ #line 173 "bison_parser.y" { } -#line 2263 "bison_parser.cpp" +#line 2264 "bison_parser.cpp" break; case YYSYMBOL_column_constraint_set: /* column_constraint_set */ #line 173 "bison_parser.y" { } -#line 2269 "bison_parser.cpp" +#line 2270 "bison_parser.cpp" break; case YYSYMBOL_column_constraint: /* column_constraint */ #line 173 "bison_parser.y" { } -#line 2275 "bison_parser.cpp" +#line 2276 "bison_parser.cpp" break; case YYSYMBOL_table_constraint: /* table_constraint */ #line 195 "bison_parser.y" { delete (((*yyvaluep).table_constraint_t)); } -#line 2281 "bison_parser.cpp" +#line 2282 "bison_parser.cpp" break; case YYSYMBOL_drop_statement: /* drop_statement */ #line 195 "bison_parser.y" { delete (((*yyvaluep).drop_stmt)); } -#line 2287 "bison_parser.cpp" +#line 2288 "bison_parser.cpp" break; case YYSYMBOL_opt_exists: /* opt_exists */ #line 173 "bison_parser.y" { } -#line 2293 "bison_parser.cpp" +#line 2294 "bison_parser.cpp" break; case YYSYMBOL_alter_statement: /* alter_statement */ #line 195 "bison_parser.y" { delete (((*yyvaluep).alter_stmt)); } -#line 2299 "bison_parser.cpp" +#line 2300 "bison_parser.cpp" break; case YYSYMBOL_alter_action: /* alter_action */ #line 195 "bison_parser.y" { delete (((*yyvaluep).alter_action_t)); } -#line 2305 "bison_parser.cpp" +#line 2306 "bison_parser.cpp" break; case YYSYMBOL_drop_action: /* drop_action */ #line 195 "bison_parser.y" { delete (((*yyvaluep).drop_action_t)); } -#line 2311 "bison_parser.cpp" +#line 2312 "bison_parser.cpp" break; case YYSYMBOL_delete_statement: /* delete_statement */ #line 195 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2317 "bison_parser.cpp" +#line 2318 "bison_parser.cpp" break; case YYSYMBOL_truncate_statement: /* truncate_statement */ #line 195 "bison_parser.y" { delete (((*yyvaluep).delete_stmt)); } -#line 2323 "bison_parser.cpp" +#line 2324 "bison_parser.cpp" break; case YYSYMBOL_insert_statement: /* insert_statement */ #line 195 "bison_parser.y" { delete (((*yyvaluep).insert_stmt)); } -#line 2329 "bison_parser.cpp" +#line 2330 "bison_parser.cpp" break; case YYSYMBOL_opt_column_list: /* opt_column_list */ @@ -2338,13 +2339,13 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2342 "bison_parser.cpp" +#line 2343 "bison_parser.cpp" break; case YYSYMBOL_update_statement: /* update_statement */ #line 195 "bison_parser.y" { delete (((*yyvaluep).update_stmt)); } -#line 2348 "bison_parser.cpp" +#line 2349 "bison_parser.cpp" break; case YYSYMBOL_update_clause_commalist: /* update_clause_commalist */ @@ -2357,79 +2358,79 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).update_vec)); } -#line 2361 "bison_parser.cpp" +#line 2362 "bison_parser.cpp" break; case YYSYMBOL_update_clause: /* update_clause */ #line 195 "bison_parser.y" { delete (((*yyvaluep).update_t)); } -#line 2367 "bison_parser.cpp" +#line 2368 "bison_parser.cpp" break; case YYSYMBOL_select_statement: /* select_statement */ #line 195 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2373 "bison_parser.cpp" +#line 2374 "bison_parser.cpp" break; case YYSYMBOL_query_expression: /* query_expression */ #line 195 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2379 "bison_parser.cpp" +#line 2380 "bison_parser.cpp" break; case YYSYMBOL_query_expression_body: /* query_expression_body */ #line 195 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2385 "bison_parser.cpp" +#line 2386 "bison_parser.cpp" break; case YYSYMBOL_query_expression_parens: /* query_expression_parens */ #line 195 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2391 "bison_parser.cpp" +#line 2392 "bison_parser.cpp" break; case YYSYMBOL_query_term: /* query_term */ #line 195 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2397 "bison_parser.cpp" +#line 2398 "bison_parser.cpp" break; case YYSYMBOL_subquery: /* subquery */ #line 195 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2403 "bison_parser.cpp" +#line 2404 "bison_parser.cpp" break; case YYSYMBOL_set_operator: /* set_operator */ #line 195 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2409 "bison_parser.cpp" +#line 2410 "bison_parser.cpp" break; case YYSYMBOL_set_type: /* set_type */ #line 195 "bison_parser.y" { delete (((*yyvaluep).set_operator_t)); } -#line 2415 "bison_parser.cpp" +#line 2416 "bison_parser.cpp" break; case YYSYMBOL_opt_all: /* opt_all */ #line 173 "bison_parser.y" { } -#line 2421 "bison_parser.cpp" +#line 2422 "bison_parser.cpp" break; case YYSYMBOL_query_primary: /* query_primary */ #line 195 "bison_parser.y" { delete (((*yyvaluep).select_stmt)); } -#line 2427 "bison_parser.cpp" +#line 2428 "bison_parser.cpp" break; case YYSYMBOL_opt_distinct: /* opt_distinct */ #line 173 "bison_parser.y" { } -#line 2433 "bison_parser.cpp" +#line 2434 "bison_parser.cpp" break; case YYSYMBOL_select_list: /* select_list */ @@ -2442,37 +2443,37 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2446 "bison_parser.cpp" +#line 2447 "bison_parser.cpp" break; case YYSYMBOL_opt_from_clause: /* opt_from_clause */ #line 195 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2452 "bison_parser.cpp" +#line 2453 "bison_parser.cpp" break; case YYSYMBOL_from_clause: /* from_clause */ #line 195 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2458 "bison_parser.cpp" +#line 2459 "bison_parser.cpp" break; case YYSYMBOL_opt_where: /* opt_where */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2464 "bison_parser.cpp" +#line 2465 "bison_parser.cpp" break; case YYSYMBOL_opt_group: /* opt_group */ #line 195 "bison_parser.y" { delete (((*yyvaluep).group_t)); } -#line 2470 "bison_parser.cpp" +#line 2471 "bison_parser.cpp" break; case YYSYMBOL_opt_having: /* opt_having */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2476 "bison_parser.cpp" +#line 2477 "bison_parser.cpp" break; case YYSYMBOL_opt_order: /* opt_order */ @@ -2485,7 +2486,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2489 "bison_parser.cpp" +#line 2490 "bison_parser.cpp" break; case YYSYMBOL_order_list: /* order_list */ @@ -2498,31 +2499,31 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).order_vec)); } -#line 2502 "bison_parser.cpp" +#line 2503 "bison_parser.cpp" break; case YYSYMBOL_order_desc: /* order_desc */ #line 195 "bison_parser.y" { delete (((*yyvaluep).order)); } -#line 2508 "bison_parser.cpp" +#line 2509 "bison_parser.cpp" break; case YYSYMBOL_opt_order_type: /* opt_order_type */ #line 173 "bison_parser.y" { } -#line 2514 "bison_parser.cpp" +#line 2515 "bison_parser.cpp" break; case YYSYMBOL_opt_top: /* opt_top */ #line 195 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2520 "bison_parser.cpp" +#line 2521 "bison_parser.cpp" break; case YYSYMBOL_opt_limit: /* opt_limit */ #line 195 "bison_parser.y" { delete (((*yyvaluep).limit)); } -#line 2526 "bison_parser.cpp" +#line 2527 "bison_parser.cpp" break; case YYSYMBOL_expr_list: /* expr_list */ @@ -2535,7 +2536,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2539 "bison_parser.cpp" +#line 2540 "bison_parser.cpp" break; case YYSYMBOL_opt_extended_literal_list: /* opt_extended_literal_list */ @@ -2548,7 +2549,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2552 "bison_parser.cpp" +#line 2553 "bison_parser.cpp" break; case YYSYMBOL_extended_literal_list: /* extended_literal_list */ @@ -2561,103 +2562,103 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2565 "bison_parser.cpp" +#line 2566 "bison_parser.cpp" break; case YYSYMBOL_casted_extended_literal: /* casted_extended_literal */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2571 "bison_parser.cpp" +#line 2572 "bison_parser.cpp" break; case YYSYMBOL_extended_literal: /* extended_literal */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2577 "bison_parser.cpp" +#line 2578 "bison_parser.cpp" break; case YYSYMBOL_expr_alias: /* expr_alias */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2583 "bison_parser.cpp" +#line 2584 "bison_parser.cpp" break; case YYSYMBOL_expr: /* expr */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2589 "bison_parser.cpp" +#line 2590 "bison_parser.cpp" break; case YYSYMBOL_operand: /* operand */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2595 "bison_parser.cpp" +#line 2596 "bison_parser.cpp" break; case YYSYMBOL_scalar_expr: /* scalar_expr */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2601 "bison_parser.cpp" +#line 2602 "bison_parser.cpp" break; case YYSYMBOL_unary_expr: /* unary_expr */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2607 "bison_parser.cpp" +#line 2608 "bison_parser.cpp" break; case YYSYMBOL_binary_expr: /* binary_expr */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2613 "bison_parser.cpp" +#line 2614 "bison_parser.cpp" break; case YYSYMBOL_logic_expr: /* logic_expr */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2619 "bison_parser.cpp" +#line 2620 "bison_parser.cpp" break; case YYSYMBOL_in_expr: /* in_expr */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2625 "bison_parser.cpp" +#line 2626 "bison_parser.cpp" break; case YYSYMBOL_case_expr: /* case_expr */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2631 "bison_parser.cpp" +#line 2632 "bison_parser.cpp" break; case YYSYMBOL_case_list: /* case_list */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2637 "bison_parser.cpp" +#line 2638 "bison_parser.cpp" break; case YYSYMBOL_exists_expr: /* exists_expr */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2643 "bison_parser.cpp" +#line 2644 "bison_parser.cpp" break; case YYSYMBOL_comp_expr: /* comp_expr */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2649 "bison_parser.cpp" +#line 2650 "bison_parser.cpp" break; case YYSYMBOL_function_expr: /* function_expr */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2655 "bison_parser.cpp" +#line 2656 "bison_parser.cpp" break; case YYSYMBOL_opt_window: /* opt_window */ #line 195 "bison_parser.y" { delete (((*yyvaluep).window_description)); } -#line 2661 "bison_parser.cpp" +#line 2662 "bison_parser.cpp" break; case YYSYMBOL_opt_partition: /* opt_partition */ @@ -2670,151 +2671,151 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).expr_vec)); } -#line 2674 "bison_parser.cpp" +#line 2675 "bison_parser.cpp" break; case YYSYMBOL_opt_frame_clause: /* opt_frame_clause */ #line 195 "bison_parser.y" { delete (((*yyvaluep).frame_description)); } -#line 2680 "bison_parser.cpp" +#line 2681 "bison_parser.cpp" break; case YYSYMBOL_frame_type: /* frame_type */ #line 173 "bison_parser.y" { } -#line 2686 "bison_parser.cpp" +#line 2687 "bison_parser.cpp" break; case YYSYMBOL_frame_bound: /* frame_bound */ #line 195 "bison_parser.y" { delete (((*yyvaluep).frame_bound)); } -#line 2692 "bison_parser.cpp" +#line 2693 "bison_parser.cpp" break; case YYSYMBOL_extract_expr: /* extract_expr */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2698 "bison_parser.cpp" +#line 2699 "bison_parser.cpp" break; case YYSYMBOL_cast_expr: /* cast_expr */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2704 "bison_parser.cpp" +#line 2705 "bison_parser.cpp" break; case YYSYMBOL_datetime_field: /* datetime_field */ #line 173 "bison_parser.y" { } -#line 2710 "bison_parser.cpp" +#line 2711 "bison_parser.cpp" break; case YYSYMBOL_datetime_field_plural: /* datetime_field_plural */ #line 173 "bison_parser.y" { } -#line 2716 "bison_parser.cpp" +#line 2717 "bison_parser.cpp" break; case YYSYMBOL_duration_field: /* duration_field */ #line 173 "bison_parser.y" { } -#line 2722 "bison_parser.cpp" +#line 2723 "bison_parser.cpp" break; case YYSYMBOL_array_expr: /* array_expr */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2728 "bison_parser.cpp" +#line 2729 "bison_parser.cpp" break; case YYSYMBOL_array_index: /* array_index */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2734 "bison_parser.cpp" +#line 2735 "bison_parser.cpp" break; case YYSYMBOL_between_expr: /* between_expr */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2740 "bison_parser.cpp" +#line 2741 "bison_parser.cpp" break; case YYSYMBOL_column_name: /* column_name */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2746 "bison_parser.cpp" +#line 2747 "bison_parser.cpp" break; case YYSYMBOL_literal: /* literal */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2752 "bison_parser.cpp" +#line 2753 "bison_parser.cpp" break; case YYSYMBOL_string_literal: /* string_literal */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2758 "bison_parser.cpp" +#line 2759 "bison_parser.cpp" break; case YYSYMBOL_bool_literal: /* bool_literal */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2764 "bison_parser.cpp" +#line 2765 "bison_parser.cpp" break; case YYSYMBOL_num_literal: /* num_literal */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2770 "bison_parser.cpp" +#line 2771 "bison_parser.cpp" break; case YYSYMBOL_int_literal: /* int_literal */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2776 "bison_parser.cpp" +#line 2777 "bison_parser.cpp" break; case YYSYMBOL_null_literal: /* null_literal */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2782 "bison_parser.cpp" +#line 2783 "bison_parser.cpp" break; case YYSYMBOL_date_literal: /* date_literal */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2788 "bison_parser.cpp" +#line 2789 "bison_parser.cpp" break; case YYSYMBOL_interval_literal: /* interval_literal */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2794 "bison_parser.cpp" +#line 2795 "bison_parser.cpp" break; case YYSYMBOL_param_expr: /* param_expr */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2800 "bison_parser.cpp" +#line 2801 "bison_parser.cpp" break; case YYSYMBOL_table_ref: /* table_ref */ #line 195 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2806 "bison_parser.cpp" +#line 2807 "bison_parser.cpp" break; case YYSYMBOL_table_ref_atomic: /* table_ref_atomic */ #line 195 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2812 "bison_parser.cpp" +#line 2813 "bison_parser.cpp" break; case YYSYMBOL_nonjoin_table_ref_atomic: /* nonjoin_table_ref_atomic */ #line 195 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2818 "bison_parser.cpp" +#line 2819 "bison_parser.cpp" break; case YYSYMBOL_table_ref_commalist: /* table_ref_commalist */ @@ -2827,19 +2828,19 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).table_vec)); } -#line 2831 "bison_parser.cpp" +#line 2832 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name: /* table_ref_name */ #line 195 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2837 "bison_parser.cpp" +#line 2838 "bison_parser.cpp" break; case YYSYMBOL_table_ref_name_no_alias: /* table_ref_name_no_alias */ #line 195 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2843 "bison_parser.cpp" +#line 2844 "bison_parser.cpp" break; case YYSYMBOL_table_name: /* table_name */ @@ -2848,103 +2849,103 @@ yydestruct (const char *yymsg, free( (((*yyvaluep).table_name).name) ); free( (((*yyvaluep).table_name).schema) ); } -#line 2852 "bison_parser.cpp" +#line 2853 "bison_parser.cpp" break; case YYSYMBOL_opt_index_name: /* opt_index_name */ #line 186 "bison_parser.y" { free( (((*yyvaluep).sval)) ); } -#line 2858 "bison_parser.cpp" +#line 2859 "bison_parser.cpp" break; case YYSYMBOL_table_alias: /* table_alias */ #line 195 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2864 "bison_parser.cpp" +#line 2865 "bison_parser.cpp" break; case YYSYMBOL_opt_table_alias: /* opt_table_alias */ #line 195 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2870 "bison_parser.cpp" +#line 2871 "bison_parser.cpp" break; case YYSYMBOL_alias: /* alias */ #line 195 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2876 "bison_parser.cpp" +#line 2877 "bison_parser.cpp" break; case YYSYMBOL_opt_alias: /* opt_alias */ #line 195 "bison_parser.y" { delete (((*yyvaluep).alias_t)); } -#line 2882 "bison_parser.cpp" +#line 2883 "bison_parser.cpp" break; case YYSYMBOL_opt_locking_clause: /* opt_locking_clause */ #line 195 "bison_parser.y" { delete (((*yyvaluep).locking_clause_vec)); } -#line 2888 "bison_parser.cpp" +#line 2889 "bison_parser.cpp" break; case YYSYMBOL_opt_locking_clause_list: /* opt_locking_clause_list */ #line 195 "bison_parser.y" { delete (((*yyvaluep).locking_clause_vec)); } -#line 2894 "bison_parser.cpp" +#line 2895 "bison_parser.cpp" break; case YYSYMBOL_locking_clause: /* locking_clause */ #line 195 "bison_parser.y" { delete (((*yyvaluep).locking_t)); } -#line 2900 "bison_parser.cpp" +#line 2901 "bison_parser.cpp" break; case YYSYMBOL_row_lock_mode: /* row_lock_mode */ #line 173 "bison_parser.y" { } -#line 2906 "bison_parser.cpp" +#line 2907 "bison_parser.cpp" break; case YYSYMBOL_opt_row_lock_policy: /* opt_row_lock_policy */ #line 173 "bison_parser.y" { } -#line 2912 "bison_parser.cpp" +#line 2913 "bison_parser.cpp" break; case YYSYMBOL_with_clause: /* with_clause */ #line 195 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2918 "bison_parser.cpp" +#line 2919 "bison_parser.cpp" break; case YYSYMBOL_with_description_list: /* with_description_list */ #line 195 "bison_parser.y" { delete (((*yyvaluep).with_description_vec)); } -#line 2924 "bison_parser.cpp" +#line 2925 "bison_parser.cpp" break; case YYSYMBOL_with_description: /* with_description */ #line 195 "bison_parser.y" { delete (((*yyvaluep).with_description_t)); } -#line 2930 "bison_parser.cpp" +#line 2931 "bison_parser.cpp" break; case YYSYMBOL_join_clause: /* join_clause */ #line 195 "bison_parser.y" { delete (((*yyvaluep).table)); } -#line 2936 "bison_parser.cpp" +#line 2937 "bison_parser.cpp" break; case YYSYMBOL_opt_join_type: /* opt_join_type */ #line 173 "bison_parser.y" { } -#line 2942 "bison_parser.cpp" +#line 2943 "bison_parser.cpp" break; case YYSYMBOL_join_condition: /* join_condition */ #line 195 "bison_parser.y" { delete (((*yyvaluep).expr)); } -#line 2948 "bison_parser.cpp" +#line 2949 "bison_parser.cpp" break; case YYSYMBOL_ident_commalist: /* ident_commalist */ @@ -2957,7 +2958,7 @@ yydestruct (const char *yymsg, } delete (((*yyvaluep).str_vec)); } -#line 2961 "bison_parser.cpp" +#line 2962 "bison_parser.cpp" break; default: @@ -3065,7 +3066,7 @@ YYLTYPE yylloc = yyloc_default; yylloc.string_length = 0; } -#line 3069 "bison_parser.cpp" +#line 3070 "bison_parser.cpp" yylsp[0] = yylloc; goto yysetstate; @@ -3294,7 +3295,7 @@ YYLTYPE yylloc = yyloc_default; } delete (yyvsp[-1].stmt_vec); } -#line 3298 "bison_parser.cpp" +#line 3299 "bison_parser.cpp" break; case 3: /* statement_list: statement */ @@ -3305,7 +3306,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.stmt_vec) = new std::vector(); (yyval.stmt_vec)->push_back((yyvsp[0].statement)); } -#line 3309 "bison_parser.cpp" +#line 3310 "bison_parser.cpp" break; case 4: /* statement_list: statement_list ';' statement */ @@ -3316,7 +3317,7 @@ YYLTYPE yylloc = yyloc_default; (yyvsp[-2].stmt_vec)->push_back((yyvsp[0].statement)); (yyval.stmt_vec) = (yyvsp[-2].stmt_vec); } -#line 3320 "bison_parser.cpp" +#line 3321 "bison_parser.cpp" break; case 5: /* statement: prepare_statement opt_hints */ @@ -3325,7 +3326,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3329 "bison_parser.cpp" +#line 3330 "bison_parser.cpp" break; case 6: /* statement: preparable_statement opt_hints */ @@ -3334,97 +3335,97 @@ YYLTYPE yylloc = yyloc_default; (yyval.statement) = (yyvsp[-1].statement); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 3338 "bison_parser.cpp" +#line 3339 "bison_parser.cpp" break; case 7: /* statement: show_statement */ #line 368 "bison_parser.y" { (yyval.statement) = (yyvsp[0].show_stmt); } -#line 3344 "bison_parser.cpp" +#line 3345 "bison_parser.cpp" break; case 8: /* statement: import_statement */ #line 369 "bison_parser.y" { (yyval.statement) = (yyvsp[0].import_stmt); } -#line 3350 "bison_parser.cpp" +#line 3351 "bison_parser.cpp" break; case 9: /* statement: export_statement */ #line 370 "bison_parser.y" { (yyval.statement) = (yyvsp[0].export_stmt); } -#line 3356 "bison_parser.cpp" +#line 3357 "bison_parser.cpp" break; case 10: /* preparable_statement: select_statement */ #line 372 "bison_parser.y" { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 3362 "bison_parser.cpp" +#line 3363 "bison_parser.cpp" break; case 11: /* preparable_statement: create_statement */ #line 373 "bison_parser.y" { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 3368 "bison_parser.cpp" +#line 3369 "bison_parser.cpp" break; case 12: /* preparable_statement: insert_statement */ #line 374 "bison_parser.y" { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 3374 "bison_parser.cpp" +#line 3375 "bison_parser.cpp" break; case 13: /* preparable_statement: delete_statement */ #line 375 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3380 "bison_parser.cpp" +#line 3381 "bison_parser.cpp" break; case 14: /* preparable_statement: truncate_statement */ #line 376 "bison_parser.y" { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 3386 "bison_parser.cpp" +#line 3387 "bison_parser.cpp" break; case 15: /* preparable_statement: update_statement */ #line 377 "bison_parser.y" { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 3392 "bison_parser.cpp" +#line 3393 "bison_parser.cpp" break; case 16: /* preparable_statement: drop_statement */ #line 378 "bison_parser.y" { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 3398 "bison_parser.cpp" +#line 3399 "bison_parser.cpp" break; case 17: /* preparable_statement: alter_statement */ #line 379 "bison_parser.y" { (yyval.statement) = (yyvsp[0].alter_stmt); } -#line 3404 "bison_parser.cpp" +#line 3405 "bison_parser.cpp" break; case 18: /* preparable_statement: execute_statement */ #line 380 "bison_parser.y" { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 3410 "bison_parser.cpp" +#line 3411 "bison_parser.cpp" break; case 19: /* preparable_statement: transaction_statement */ #line 381 "bison_parser.y" { (yyval.statement) = (yyvsp[0].transaction_stmt); } -#line 3416 "bison_parser.cpp" +#line 3417 "bison_parser.cpp" break; case 20: /* opt_hints: WITH HINT '(' hint_list ')' */ #line 387 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 3422 "bison_parser.cpp" +#line 3423 "bison_parser.cpp" break; case 21: /* opt_hints: %empty */ #line 388 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 3428 "bison_parser.cpp" +#line 3429 "bison_parser.cpp" break; case 22: /* hint_list: hint */ @@ -3433,7 +3434,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3437 "bison_parser.cpp" +#line 3438 "bison_parser.cpp" break; case 23: /* hint_list: hint_list ',' hint */ @@ -3442,7 +3443,7 @@ YYLTYPE yylloc = yyloc_default; (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3446 "bison_parser.cpp" +#line 3447 "bison_parser.cpp" break; case 24: /* hint: IDENTIFIER */ @@ -3451,7 +3452,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[0].sval); } -#line 3455 "bison_parser.cpp" +#line 3456 "bison_parser.cpp" break; case 25: /* hint: IDENTIFIER '(' extended_literal_list ')' */ @@ -3461,25 +3462,25 @@ YYLTYPE yylloc = yyloc_default; (yyval.expr)->name = (yyvsp[-3].sval); (yyval.expr)->exprList = (yyvsp[-1].expr_vec); } -#line 3465 "bison_parser.cpp" +#line 3466 "bison_parser.cpp" break; case 26: /* transaction_statement: BEGIN opt_transaction_keyword */ #line 413 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kBeginTransaction); } -#line 3471 "bison_parser.cpp" +#line 3472 "bison_parser.cpp" break; case 27: /* transaction_statement: ROLLBACK opt_transaction_keyword */ #line 414 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kRollbackTransaction); } -#line 3477 "bison_parser.cpp" +#line 3478 "bison_parser.cpp" break; case 28: /* transaction_statement: COMMIT opt_transaction_keyword */ #line 415 "bison_parser.y" { (yyval.transaction_stmt) = new TransactionStatement(kCommitTransaction); } -#line 3483 "bison_parser.cpp" +#line 3484 "bison_parser.cpp" break; case 31: /* prepare_statement: PREPARE IDENTIFIER FROM prepare_target_query */ @@ -3489,7 +3490,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.prep_stmt)->name = (yyvsp[-2].sval); (yyval.prep_stmt)->query = (yyvsp[0].sval); } -#line 3493 "bison_parser.cpp" +#line 3494 "bison_parser.cpp" break; case 33: /* execute_statement: EXECUTE IDENTIFIER */ @@ -3498,7 +3499,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[0].sval); } -#line 3502 "bison_parser.cpp" +#line 3503 "bison_parser.cpp" break; case 34: /* execute_statement: EXECUTE IDENTIFIER '(' opt_extended_literal_list ')' */ @@ -3508,7 +3509,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.exec_stmt)->name = (yyvsp[-3].sval); (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); } -#line 3512 "bison_parser.cpp" +#line 3513 "bison_parser.cpp" break; case 35: /* import_statement: IMPORT FROM file_type FILE file_path INTO table_name */ @@ -3519,7 +3520,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.import_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3523 "bison_parser.cpp" +#line 3524 "bison_parser.cpp" break; case 36: /* import_statement: COPY table_name FROM file_path opt_file_type opt_where */ @@ -3531,7 +3532,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.import_stmt)->tableName = (yyvsp[-4].table_name).name; (yyval.import_stmt)->whereClause = (yyvsp[0].expr); } -#line 3535 "bison_parser.cpp" +#line 3536 "bison_parser.cpp" break; case 37: /* file_type: IDENTIFIER */ @@ -3550,7 +3551,7 @@ YYLTYPE yylloc = yyloc_default; } free((yyvsp[0].sval)); } -#line 3554 "bison_parser.cpp" +#line 3555 "bison_parser.cpp" break; case 38: /* file_path: string_literal */ @@ -3559,19 +3560,19 @@ YYLTYPE yylloc = yyloc_default; (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 3563 "bison_parser.cpp" +#line 3564 "bison_parser.cpp" break; case 39: /* opt_file_type: WITH FORMAT file_type */ #line 480 "bison_parser.y" { (yyval.import_type_t) = (yyvsp[0].import_type_t); } -#line 3569 "bison_parser.cpp" +#line 3570 "bison_parser.cpp" break; case 40: /* opt_file_type: %empty */ #line 481 "bison_parser.y" { (yyval.import_type_t) = kImportAuto; } -#line 3575 "bison_parser.cpp" +#line 3576 "bison_parser.cpp" break; case 41: /* export_statement: COPY table_name TO file_path opt_file_type */ @@ -3582,7 +3583,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.export_stmt)->schema = (yyvsp[-3].table_name).schema; (yyval.export_stmt)->tableName = (yyvsp[-3].table_name).name; } -#line 3586 "bison_parser.cpp" +#line 3587 "bison_parser.cpp" break; case 42: /* export_statement: COPY subquery TO file_path opt_file_type */ @@ -3592,13 +3593,13 @@ YYLTYPE yylloc = yyloc_default; (yyval.export_stmt)->filePath = (yyvsp[-1].sval); (yyval.export_stmt)->select = (yyvsp[-3].select_stmt); } -#line 3596 "bison_parser.cpp" +#line 3597 "bison_parser.cpp" break; case 43: /* show_statement: SHOW TABLES */ #line 504 "bison_parser.y" { (yyval.show_stmt) = new ShowStatement(kShowTables); } -#line 3602 "bison_parser.cpp" +#line 3603 "bison_parser.cpp" break; case 44: /* show_statement: SHOW COLUMNS table_name */ @@ -3608,7 +3609,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.show_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.show_stmt)->name = (yyvsp[0].table_name).name; } -#line 3612 "bison_parser.cpp" +#line 3613 "bison_parser.cpp" break; case 45: /* show_statement: DESCRIBE table_name */ @@ -3618,7 +3619,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.show_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.show_stmt)->name = (yyvsp[0].table_name).name; } -#line 3622 "bison_parser.cpp" +#line 3623 "bison_parser.cpp" break; case 46: /* create_statement: CREATE TABLE opt_not_exists table_name FROM IDENTIFIER FILE file_path */ @@ -3636,7 +3637,7 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-2].sval)); (yyval.create_stmt)->filePath = (yyvsp[0].sval); } -#line 3640 "bison_parser.cpp" +#line 3641 "bison_parser.cpp" break; case 47: /* create_statement: CREATE TABLE opt_not_exists table_name '(' table_elem_commalist ')' */ @@ -3653,7 +3654,7 @@ YYLTYPE yylloc = yyloc_default; YYERROR; } } -#line 3657 "bison_parser.cpp" +#line 3658 "bison_parser.cpp" break; case 48: /* create_statement: CREATE TABLE opt_not_exists table_name AS select_statement */ @@ -3665,7 +3666,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-2].table_name).name; (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3669 "bison_parser.cpp" +#line 3670 "bison_parser.cpp" break; case 49: /* create_statement: CREATE INDEX opt_not_exists opt_index_name ON table_name '(' ident_commalist ')' */ @@ -3677,7 +3678,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->indexColumns = (yyvsp[-1].str_vec); } -#line 3681 "bison_parser.cpp" +#line 3682 "bison_parser.cpp" break; case 50: /* create_statement: CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement */ @@ -3690,19 +3691,19 @@ YYLTYPE yylloc = yyloc_default; (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 3694 "bison_parser.cpp" +#line 3695 "bison_parser.cpp" break; case 51: /* opt_not_exists: IF NOT EXISTS */ #line 569 "bison_parser.y" { (yyval.bval) = true; } -#line 3700 "bison_parser.cpp" +#line 3701 "bison_parser.cpp" break; case 52: /* opt_not_exists: %empty */ #line 570 "bison_parser.y" { (yyval.bval) = false; } -#line 3706 "bison_parser.cpp" +#line 3707 "bison_parser.cpp" break; case 53: /* table_elem_commalist: table_elem */ @@ -3711,7 +3712,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.table_element_vec) = new std::vector(); (yyval.table_element_vec)->push_back((yyvsp[0].table_element_t)); } -#line 3715 "bison_parser.cpp" +#line 3716 "bison_parser.cpp" break; case 54: /* table_elem_commalist: table_elem_commalist ',' table_elem */ @@ -3720,19 +3721,19 @@ YYLTYPE yylloc = yyloc_default; (yyvsp[-2].table_element_vec)->push_back((yyvsp[0].table_element_t)); (yyval.table_element_vec) = (yyvsp[-2].table_element_vec); } -#line 3724 "bison_parser.cpp" +#line 3725 "bison_parser.cpp" break; case 55: /* table_elem: column_def */ #line 581 "bison_parser.y" { (yyval.table_element_t) = (yyvsp[0].column_t); } -#line 3730 "bison_parser.cpp" +#line 3731 "bison_parser.cpp" break; case 56: /* table_elem: table_constraint */ #line 582 "bison_parser.y" { (yyval.table_element_t) = (yyvsp[0].table_constraint_t); } -#line 3736 "bison_parser.cpp" +#line 3737 "bison_parser.cpp" break; case 57: /* column_def: IDENTIFIER column_type opt_column_constraints */ @@ -3743,43 +3744,43 @@ YYLTYPE yylloc = yyloc_default; yyerror(&yyloc, result, scanner, ("Conflicting nullability constraints for " + std::string{(yyvsp[-2].sval)}).c_str()); } } -#line 3747 "bison_parser.cpp" +#line 3748 "bison_parser.cpp" break; case 58: /* column_type: BIGINT */ #line 591 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::BIGINT}; } -#line 3753 "bison_parser.cpp" +#line 3754 "bison_parser.cpp" break; case 59: /* column_type: BOOLEAN */ #line 592 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::BOOLEAN}; } -#line 3759 "bison_parser.cpp" +#line 3760 "bison_parser.cpp" break; case 60: /* column_type: CHAR '(' INTVAL ')' */ #line 593 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } -#line 3765 "bison_parser.cpp" +#line 3766 "bison_parser.cpp" break; case 61: /* column_type: CHARACTER_VARYING '(' INTVAL ')' */ #line 594 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3771 "bison_parser.cpp" +#line 3772 "bison_parser.cpp" break; case 62: /* column_type: DATE */ #line 595 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATE}; } -#line 3777 "bison_parser.cpp" +#line 3778 "bison_parser.cpp" break; case 63: /* column_type: DATETIME */ #line 596 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } -#line 3783 "bison_parser.cpp" +#line 3784 "bison_parser.cpp" break; case 64: /* column_type: DECIMAL opt_decimal_specification */ @@ -3788,115 +3789,115 @@ YYLTYPE yylloc = yyloc_default; (yyval.column_type_t) = ColumnType{DataType::DECIMAL, 0, (yyvsp[0].ival_pair)->first, (yyvsp[0].ival_pair)->second}; delete (yyvsp[0].ival_pair); } -#line 3792 "bison_parser.cpp" +#line 3793 "bison_parser.cpp" break; case 65: /* column_type: DOUBLE */ #line 601 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } -#line 3798 "bison_parser.cpp" +#line 3799 "bison_parser.cpp" break; case 66: /* column_type: FLOAT */ #line 602 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3804 "bison_parser.cpp" +#line 3805 "bison_parser.cpp" break; case 67: /* column_type: INT */ #line 603 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3810 "bison_parser.cpp" +#line 3811 "bison_parser.cpp" break; case 68: /* column_type: INTEGER */ #line 604 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3816 "bison_parser.cpp" +#line 3817 "bison_parser.cpp" break; case 69: /* column_type: LONG */ #line 605 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::LONG}; } -#line 3822 "bison_parser.cpp" +#line 3823 "bison_parser.cpp" break; case 70: /* column_type: REAL */ #line 606 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::REAL}; } -#line 3828 "bison_parser.cpp" +#line 3829 "bison_parser.cpp" break; case 71: /* column_type: SMALLINT */ #line 607 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::SMALLINT}; } -#line 3834 "bison_parser.cpp" +#line 3835 "bison_parser.cpp" break; case 72: /* column_type: TEXT */ #line 608 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } -#line 3840 "bison_parser.cpp" +#line 3841 "bison_parser.cpp" break; case 73: /* column_type: TIME opt_time_precision */ #line 609 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::TIME, 0, (yyvsp[0].ival)}; } -#line 3846 "bison_parser.cpp" +#line 3847 "bison_parser.cpp" break; case 74: /* column_type: TIMESTAMP */ #line 610 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; } -#line 3852 "bison_parser.cpp" +#line 3853 "bison_parser.cpp" break; case 75: /* column_type: VARCHAR '(' INTVAL ')' */ #line 611 "bison_parser.y" { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3858 "bison_parser.cpp" +#line 3859 "bison_parser.cpp" break; case 76: /* opt_time_precision: '(' INTVAL ')' */ #line 613 "bison_parser.y" { (yyval.ival) = (yyvsp[-1].ival); } -#line 3864 "bison_parser.cpp" +#line 3865 "bison_parser.cpp" break; case 77: /* opt_time_precision: %empty */ #line 614 "bison_parser.y" { (yyval.ival) = 0; } -#line 3870 "bison_parser.cpp" +#line 3871 "bison_parser.cpp" break; case 78: /* opt_decimal_specification: '(' INTVAL ',' INTVAL ')' */ #line 616 "bison_parser.y" { (yyval.ival_pair) = new std::pair{(yyvsp[-3].ival), (yyvsp[-1].ival)}; } -#line 3876 "bison_parser.cpp" +#line 3877 "bison_parser.cpp" break; case 79: /* opt_decimal_specification: '(' INTVAL ')' */ #line 617 "bison_parser.y" { (yyval.ival_pair) = new std::pair{(yyvsp[-1].ival), 0}; } -#line 3882 "bison_parser.cpp" +#line 3883 "bison_parser.cpp" break; case 80: /* opt_decimal_specification: %empty */ #line 618 "bison_parser.y" { (yyval.ival_pair) = new std::pair{0, 0}; } -#line 3888 "bison_parser.cpp" +#line 3889 "bison_parser.cpp" break; case 81: /* opt_column_constraints: column_constraint_set */ #line 620 "bison_parser.y" { (yyval.column_constraint_set) = (yyvsp[0].column_constraint_set); } -#line 3894 "bison_parser.cpp" +#line 3895 "bison_parser.cpp" break; case 82: /* opt_column_constraints: %empty */ #line 621 "bison_parser.y" { (yyval.column_constraint_set) = new std::unordered_set(); } -#line 3900 "bison_parser.cpp" +#line 3901 "bison_parser.cpp" break; case 83: /* column_constraint_set: column_constraint */ @@ -3905,7 +3906,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.column_constraint_set) = new std::unordered_set(); (yyval.column_constraint_set)->insert((yyvsp[0].column_constraint_t)); } -#line 3909 "bison_parser.cpp" +#line 3910 "bison_parser.cpp" break; case 84: /* column_constraint_set: column_constraint_set column_constraint */ @@ -3914,43 +3915,43 @@ YYLTYPE yylloc = yyloc_default; (yyvsp[-1].column_constraint_set)->insert((yyvsp[0].column_constraint_t)); (yyval.column_constraint_set) = (yyvsp[-1].column_constraint_set); } -#line 3918 "bison_parser.cpp" +#line 3919 "bison_parser.cpp" break; case 85: /* column_constraint: PRIMARY KEY */ #line 632 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::PrimaryKey; } -#line 3924 "bison_parser.cpp" +#line 3925 "bison_parser.cpp" break; case 86: /* column_constraint: UNIQUE */ #line 633 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::Unique; } -#line 3930 "bison_parser.cpp" +#line 3931 "bison_parser.cpp" break; case 87: /* column_constraint: NULL */ #line 634 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::Null; } -#line 3936 "bison_parser.cpp" +#line 3937 "bison_parser.cpp" break; case 88: /* column_constraint: NOT NULL */ #line 635 "bison_parser.y" { (yyval.column_constraint_t) = ConstraintType::NotNull; } -#line 3942 "bison_parser.cpp" +#line 3943 "bison_parser.cpp" break; case 89: /* table_constraint: PRIMARY KEY '(' ident_commalist ')' */ #line 637 "bison_parser.y" { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::PrimaryKey, (yyvsp[-1].str_vec)); } -#line 3948 "bison_parser.cpp" +#line 3949 "bison_parser.cpp" break; case 90: /* table_constraint: UNIQUE '(' ident_commalist ')' */ #line 638 "bison_parser.y" { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::Unique, (yyvsp[-1].str_vec)); } -#line 3954 "bison_parser.cpp" +#line 3955 "bison_parser.cpp" break; case 91: /* drop_statement: DROP TABLE opt_exists table_name */ @@ -3961,7 +3962,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.drop_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; } -#line 3965 "bison_parser.cpp" +#line 3966 "bison_parser.cpp" break; case 92: /* drop_statement: DROP VIEW opt_exists table_name */ @@ -3972,7 +3973,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.drop_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; } -#line 3976 "bison_parser.cpp" +#line 3977 "bison_parser.cpp" break; case 93: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */ @@ -3982,7 +3983,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.drop_stmt)->ifExists = false; (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 3986 "bison_parser.cpp" +#line 3987 "bison_parser.cpp" break; case 94: /* drop_statement: DROP INDEX opt_exists IDENTIFIER */ @@ -3992,19 +3993,19 @@ YYLTYPE yylloc = yyloc_default; (yyval.drop_stmt)->ifExists = (yyvsp[-1].bval); (yyval.drop_stmt)->indexName = (yyvsp[0].sval); } -#line 3996 "bison_parser.cpp" +#line 3997 "bison_parser.cpp" break; case 95: /* opt_exists: IF EXISTS */ #line 670 "bison_parser.y" { (yyval.bval) = true; } -#line 4002 "bison_parser.cpp" +#line 4003 "bison_parser.cpp" break; case 96: /* opt_exists: %empty */ #line 671 "bison_parser.y" { (yyval.bval) = false; } -#line 4008 "bison_parser.cpp" +#line 4009 "bison_parser.cpp" break; case 97: /* alter_statement: ALTER TABLE opt_exists table_name alter_action */ @@ -4014,13 +4015,13 @@ YYLTYPE yylloc = yyloc_default; (yyval.alter_stmt)->ifTableExists = (yyvsp[-2].bval); (yyval.alter_stmt)->schema = (yyvsp[-1].table_name).schema; } -#line 4018 "bison_parser.cpp" +#line 4019 "bison_parser.cpp" break; case 98: /* alter_action: drop_action */ #line 684 "bison_parser.y" { (yyval.alter_action_t) = (yyvsp[0].drop_action_t); } -#line 4024 "bison_parser.cpp" +#line 4025 "bison_parser.cpp" break; case 99: /* drop_action: DROP COLUMN opt_exists IDENTIFIER */ @@ -4029,7 +4030,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.drop_action_t) = new DropColumnAction((yyvsp[0].sval)); (yyval.drop_action_t)->ifExists = (yyvsp[-1].bval); } -#line 4033 "bison_parser.cpp" +#line 4034 "bison_parser.cpp" break; case 100: /* delete_statement: DELETE FROM table_name opt_where */ @@ -4040,7 +4041,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.delete_stmt)->tableName = (yyvsp[-1].table_name).name; (yyval.delete_stmt)->expr = (yyvsp[0].expr); } -#line 4044 "bison_parser.cpp" +#line 4045 "bison_parser.cpp" break; case 101: /* truncate_statement: TRUNCATE table_name */ @@ -4050,7 +4051,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 4054 "bison_parser.cpp" +#line 4055 "bison_parser.cpp" break; case 102: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' extended_literal_list ')' */ @@ -4062,7 +4063,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } -#line 4066 "bison_parser.cpp" +#line 4067 "bison_parser.cpp" break; case 103: /* insert_statement: INSERT INTO table_name opt_column_list query_term */ @@ -4074,19 +4075,19 @@ YYLTYPE yylloc = yyloc_default; (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } -#line 4078 "bison_parser.cpp" +#line 4079 "bison_parser.cpp" break; case 104: /* opt_column_list: '(' ident_commalist ')' */ #line 729 "bison_parser.y" { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 4084 "bison_parser.cpp" +#line 4085 "bison_parser.cpp" break; case 105: /* opt_column_list: %empty */ #line 730 "bison_parser.y" { (yyval.str_vec) = nullptr; } -#line 4090 "bison_parser.cpp" +#line 4091 "bison_parser.cpp" break; case 106: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */ @@ -4097,7 +4098,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.update_stmt)->updates = (yyvsp[-1].update_vec); (yyval.update_stmt)->where = (yyvsp[0].expr); } -#line 4101 "bison_parser.cpp" +#line 4102 "bison_parser.cpp" break; case 107: /* update_clause_commalist: update_clause */ @@ -4106,7 +4107,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 4110 "bison_parser.cpp" +#line 4111 "bison_parser.cpp" break; case 108: /* update_clause_commalist: update_clause_commalist ',' update_clause */ @@ -4115,7 +4116,7 @@ YYLTYPE yylloc = yyloc_default; (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 4119 "bison_parser.cpp" +#line 4120 "bison_parser.cpp" break; case 109: /* update_clause: IDENTIFIER '=' expr */ @@ -4125,7 +4126,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 4129 "bison_parser.cpp" +#line 4130 "bison_parser.cpp" break; case 112: /* query_expression: query_expression_body opt_order opt_limit opt_locking_clause */ @@ -4151,7 +4152,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt) = (yyvsp[-3].select_stmt); } -#line 4155 "bison_parser.cpp" +#line 4156 "bison_parser.cpp" break; case 113: /* query_expression: with_clause query_expression_body opt_order opt_limit opt_locking_clause */ @@ -4178,7 +4179,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt) = (yyvsp[-3].select_stmt); } -#line 4182 "bison_parser.cpp" +#line 4183 "bison_parser.cpp" break; case 115: /* query_expression_body: query_expression_body set_operator query_term */ @@ -4194,7 +4195,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt) = (yyvsp[-2].select_stmt); } -#line 4198 "bison_parser.cpp" +#line 4199 "bison_parser.cpp" break; case 116: /* query_expression_body: query_expression_parens set_operator query_term */ @@ -4210,7 +4211,7 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt) = (yyvsp[-2].select_stmt); } -#line 4214 "bison_parser.cpp" +#line 4215 "bison_parser.cpp" break; case 117: /* query_expression_body: query_expression_body set_operator query_expression_parens */ @@ -4226,83 +4227,99 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt) = (yyvsp[-2].select_stmt); } -#line 4230 "bison_parser.cpp" +#line 4231 "bison_parser.cpp" break; - case 118: /* query_expression_parens: '(' query_expression_parens ')' */ -#line 862 "bison_parser.y" + case 118: /* query_expression_body: query_expression_parens set_operator query_expression_parens */ +#line 859 "bison_parser.y" + { + (yyval.select_stmt) = (yyvsp[-2].select_stmt); + auto *setOperations = &(yyvsp[-2].select_stmt)->setOperations; + while (*setOperations != nullptr) { + setOperations = &(*setOperations)->back()->nestedSelectStatement->setOperations; + } + (yyvsp[-1].set_operator_t)->nestedSelectStatement = (yyvsp[0].select_stmt); + *setOperations = new std::vector({(yyvsp[-1].set_operator_t)}); + + (yyval.select_stmt) = (yyvsp[-2].select_stmt); + } +#line 4247 "bison_parser.cpp" + break; + + case 119: /* query_expression_parens: '(' query_expression_parens ')' */ +#line 874 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 4238 "bison_parser.cpp" +#line 4255 "bison_parser.cpp" break; - case 119: /* query_expression_parens: '(' query_expression ')' */ -#line 866 "bison_parser.y" + case 120: /* query_expression_parens: '(' query_expression ')' */ +#line 878 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 4246 "bison_parser.cpp" +#line 4263 "bison_parser.cpp" break; - case 121: /* subquery: '(' query_expression ')' */ -#line 877 "bison_parser.y" + case 122: /* subquery: '(' query_expression ')' */ +#line 889 "bison_parser.y" { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 4254 "bison_parser.cpp" +#line 4271 "bison_parser.cpp" break; - case 122: /* set_operator: set_type opt_all */ -#line 882 "bison_parser.y" + case 123: /* set_operator: set_type opt_all */ +#line 894 "bison_parser.y" { (yyval.set_operator_t) = (yyvsp[-1].set_operator_t); (yyval.set_operator_t)->isAll = (yyvsp[0].bval); } -#line 4263 "bison_parser.cpp" +#line 4280 "bison_parser.cpp" break; - case 123: /* set_type: UNION */ -#line 887 "bison_parser.y" + case 124: /* set_type: UNION */ +#line 899 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetUnion; } -#line 4272 "bison_parser.cpp" +#line 4289 "bison_parser.cpp" break; - case 124: /* set_type: INTERSECT */ -#line 891 "bison_parser.y" + case 125: /* set_type: INTERSECT */ +#line 903 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetIntersect; } -#line 4281 "bison_parser.cpp" +#line 4298 "bison_parser.cpp" break; - case 125: /* set_type: EXCEPT */ -#line 895 "bison_parser.y" + case 126: /* set_type: EXCEPT */ +#line 907 "bison_parser.y" { (yyval.set_operator_t) = new SetOperation(); (yyval.set_operator_t)->setType = SetType::kSetExcept; } -#line 4290 "bison_parser.cpp" +#line 4307 "bison_parser.cpp" break; - case 126: /* opt_all: ALL */ -#line 900 "bison_parser.y" + case 127: /* opt_all: ALL */ +#line 912 "bison_parser.y" { (yyval.bval) = true; } -#line 4296 "bison_parser.cpp" +#line 4313 "bison_parser.cpp" break; - case 127: /* opt_all: %empty */ -#line 901 "bison_parser.y" + case 128: /* opt_all: %empty */ +#line 913 "bison_parser.y" { (yyval.bval) = false; } -#line 4302 "bison_parser.cpp" +#line 4319 "bison_parser.cpp" break; - case 128: /* query_primary: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ -#line 903 "bison_parser.y" + case 129: /* query_primary: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */ +#line 915 "bison_parser.y" { (yyval.select_stmt) = new SelectStatement(); (yyval.select_stmt)->limit = (yyvsp[-5].limit); @@ -4312,239 +4329,239 @@ YYLTYPE yylloc = yyloc_default; (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 4316 "bison_parser.cpp" +#line 4333 "bison_parser.cpp" break; - case 129: /* opt_distinct: DISTINCT */ -#line 913 "bison_parser.y" + case 130: /* opt_distinct: DISTINCT */ +#line 925 "bison_parser.y" { (yyval.bval) = true; } -#line 4322 "bison_parser.cpp" +#line 4339 "bison_parser.cpp" break; - case 130: /* opt_distinct: %empty */ -#line 914 "bison_parser.y" + case 131: /* opt_distinct: %empty */ +#line 926 "bison_parser.y" { (yyval.bval) = false; } -#line 4328 "bison_parser.cpp" +#line 4345 "bison_parser.cpp" break; - case 132: /* opt_from_clause: from_clause */ -#line 918 "bison_parser.y" + case 133: /* opt_from_clause: from_clause */ +#line 930 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 4334 "bison_parser.cpp" +#line 4351 "bison_parser.cpp" break; - case 133: /* opt_from_clause: %empty */ -#line 919 "bison_parser.y" + case 134: /* opt_from_clause: %empty */ +#line 931 "bison_parser.y" { (yyval.table) = nullptr; } -#line 4340 "bison_parser.cpp" +#line 4357 "bison_parser.cpp" break; - case 134: /* from_clause: FROM table_ref */ -#line 921 "bison_parser.y" + case 135: /* from_clause: FROM table_ref */ +#line 933 "bison_parser.y" { (yyval.table) = (yyvsp[0].table); } -#line 4346 "bison_parser.cpp" +#line 4363 "bison_parser.cpp" break; - case 135: /* opt_where: WHERE expr */ -#line 923 "bison_parser.y" + case 136: /* opt_where: WHERE expr */ +#line 935 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 4352 "bison_parser.cpp" +#line 4369 "bison_parser.cpp" break; - case 136: /* opt_where: %empty */ -#line 924 "bison_parser.y" + case 137: /* opt_where: %empty */ +#line 936 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 4358 "bison_parser.cpp" +#line 4375 "bison_parser.cpp" break; - case 137: /* opt_group: GROUP BY expr_list opt_having */ -#line 926 "bison_parser.y" + case 138: /* opt_group: GROUP BY expr_list opt_having */ +#line 938 "bison_parser.y" { (yyval.group_t) = new GroupByDescription(); (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 4368 "bison_parser.cpp" +#line 4385 "bison_parser.cpp" break; - case 138: /* opt_group: %empty */ -#line 931 "bison_parser.y" + case 139: /* opt_group: %empty */ +#line 943 "bison_parser.y" { (yyval.group_t) = nullptr; } -#line 4374 "bison_parser.cpp" +#line 4391 "bison_parser.cpp" break; - case 139: /* opt_having: HAVING expr */ -#line 933 "bison_parser.y" + case 140: /* opt_having: HAVING expr */ +#line 945 "bison_parser.y" { (yyval.expr) = (yyvsp[0].expr); } -#line 4380 "bison_parser.cpp" +#line 4397 "bison_parser.cpp" break; - case 140: /* opt_having: %empty */ -#line 934 "bison_parser.y" + case 141: /* opt_having: %empty */ +#line 946 "bison_parser.y" { (yyval.expr) = nullptr; } -#line 4386 "bison_parser.cpp" +#line 4403 "bison_parser.cpp" break; - case 141: /* opt_order: ORDER BY order_list */ -#line 936 "bison_parser.y" + case 142: /* opt_order: ORDER BY order_list */ +#line 948 "bison_parser.y" { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 4392 "bison_parser.cpp" +#line 4409 "bison_parser.cpp" break; - case 142: /* opt_order: %empty */ -#line 937 "bison_parser.y" + case 143: /* opt_order: %empty */ +#line 949 "bison_parser.y" { (yyval.order_vec) = nullptr; } -#line 4398 "bison_parser.cpp" +#line 4415 "bison_parser.cpp" break; - case 143: /* order_list: order_desc */ -#line 939 "bison_parser.y" + case 144: /* order_list: order_desc */ +#line 951 "bison_parser.y" { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 4407 "bison_parser.cpp" +#line 4424 "bison_parser.cpp" break; - case 144: /* order_list: order_list ',' order_desc */ -#line 943 "bison_parser.y" + case 145: /* order_list: order_list ',' order_desc */ +#line 955 "bison_parser.y" { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 4416 "bison_parser.cpp" +#line 4433 "bison_parser.cpp" break; - case 145: /* order_desc: expr opt_order_type */ -#line 948 "bison_parser.y" + case 146: /* order_desc: expr opt_order_type */ +#line 960 "bison_parser.y" { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 4422 "bison_parser.cpp" +#line 4439 "bison_parser.cpp" break; - case 146: /* opt_order_type: ASC */ -#line 950 "bison_parser.y" + case 147: /* opt_order_type: ASC */ +#line 962 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 4428 "bison_parser.cpp" +#line 4445 "bison_parser.cpp" break; - case 147: /* opt_order_type: DESC */ -#line 951 "bison_parser.y" + case 148: /* opt_order_type: DESC */ +#line 963 "bison_parser.y" { (yyval.order_type) = kOrderDesc; } -#line 4434 "bison_parser.cpp" +#line 4451 "bison_parser.cpp" break; - case 148: /* opt_order_type: %empty */ -#line 952 "bison_parser.y" + case 149: /* opt_order_type: %empty */ +#line 964 "bison_parser.y" { (yyval.order_type) = kOrderAsc; } -#line 4440 "bison_parser.cpp" +#line 4457 "bison_parser.cpp" break; - case 149: /* opt_top: TOP int_literal */ -#line 956 "bison_parser.y" + case 150: /* opt_top: TOP int_literal */ +#line 968 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 4446 "bison_parser.cpp" +#line 4463 "bison_parser.cpp" break; - case 150: /* opt_top: %empty */ -#line 957 "bison_parser.y" + case 151: /* opt_top: %empty */ +#line 969 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 4452 "bison_parser.cpp" +#line 4469 "bison_parser.cpp" break; - case 151: /* opt_limit: LIMIT expr */ -#line 959 "bison_parser.y" + case 152: /* opt_limit: LIMIT expr */ +#line 971 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 4458 "bison_parser.cpp" +#line 4475 "bison_parser.cpp" break; - case 152: /* opt_limit: OFFSET expr */ -#line 960 "bison_parser.y" + case 153: /* opt_limit: OFFSET expr */ +#line 972 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 4464 "bison_parser.cpp" +#line 4481 "bison_parser.cpp" break; - case 153: /* opt_limit: LIMIT expr OFFSET expr */ -#line 961 "bison_parser.y" + case 154: /* opt_limit: LIMIT expr OFFSET expr */ +#line 973 "bison_parser.y" { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 4470 "bison_parser.cpp" +#line 4487 "bison_parser.cpp" break; - case 154: /* opt_limit: LIMIT ALL */ -#line 962 "bison_parser.y" + case 155: /* opt_limit: LIMIT ALL */ +#line 974 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, nullptr); } -#line 4476 "bison_parser.cpp" +#line 4493 "bison_parser.cpp" break; - case 155: /* opt_limit: LIMIT ALL OFFSET expr */ -#line 963 "bison_parser.y" + case 156: /* opt_limit: LIMIT ALL OFFSET expr */ +#line 975 "bison_parser.y" { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 4482 "bison_parser.cpp" +#line 4499 "bison_parser.cpp" break; - case 156: /* opt_limit: %empty */ -#line 964 "bison_parser.y" + case 157: /* opt_limit: %empty */ +#line 976 "bison_parser.y" { (yyval.limit) = nullptr; } -#line 4488 "bison_parser.cpp" +#line 4505 "bison_parser.cpp" break; - case 157: /* expr_list: expr_alias */ -#line 969 "bison_parser.y" + case 158: /* expr_list: expr_alias */ +#line 981 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4497 "bison_parser.cpp" +#line 4514 "bison_parser.cpp" break; - case 158: /* expr_list: expr_list ',' expr_alias */ -#line 973 "bison_parser.y" + case 159: /* expr_list: expr_list ',' expr_alias */ +#line 985 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4506 "bison_parser.cpp" +#line 4523 "bison_parser.cpp" break; - case 159: /* opt_extended_literal_list: extended_literal_list */ -#line 979 "bison_parser.y" + case 160: /* opt_extended_literal_list: extended_literal_list */ +#line 991 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[0].expr_vec); } -#line 4512 "bison_parser.cpp" +#line 4529 "bison_parser.cpp" break; - case 160: /* opt_extended_literal_list: %empty */ -#line 980 "bison_parser.y" + case 161: /* opt_extended_literal_list: %empty */ +#line 992 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 4518 "bison_parser.cpp" +#line 4535 "bison_parser.cpp" break; - case 161: /* extended_literal_list: casted_extended_literal */ -#line 982 "bison_parser.y" + case 162: /* extended_literal_list: casted_extended_literal */ +#line 994 "bison_parser.y" { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 4527 "bison_parser.cpp" +#line 4544 "bison_parser.cpp" break; - case 162: /* extended_literal_list: extended_literal_list ',' casted_extended_literal */ -#line 986 "bison_parser.y" + case 163: /* extended_literal_list: extended_literal_list ',' casted_extended_literal */ +#line 998 "bison_parser.y" { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 4536 "bison_parser.cpp" +#line 4553 "bison_parser.cpp" break; - case 164: /* casted_extended_literal: CAST '(' extended_literal AS column_type ')' */ -#line 991 "bison_parser.y" + case 165: /* casted_extended_literal: CAST '(' extended_literal AS column_type ')' */ +#line 1003 "bison_parser.y" { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } -#line 4544 "bison_parser.cpp" +#line 4561 "bison_parser.cpp" break; - case 165: /* extended_literal: literal */ -#line 995 "bison_parser.y" + case 166: /* extended_literal: literal */ +#line 1007 "bison_parser.y" { if ((yyvsp[0].expr)->type == ExprType::kExprParameter) { delete (yyvsp[0].expr); @@ -4553,23 +4570,23 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expr) = (yyvsp[0].expr); } -#line 4557 "bison_parser.cpp" +#line 4574 "bison_parser.cpp" break; - case 166: /* extended_literal: '-' num_literal */ -#line 1003 "bison_parser.y" + case 167: /* extended_literal: '-' num_literal */ +#line 1015 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 4563 "bison_parser.cpp" +#line 4580 "bison_parser.cpp" break; - case 167: /* extended_literal: '-' interval_literal */ -#line 1004 "bison_parser.y" + case 168: /* extended_literal: '-' interval_literal */ +#line 1016 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 4569 "bison_parser.cpp" +#line 4586 "bison_parser.cpp" break; - case 168: /* expr_alias: expr opt_alias */ -#line 1006 "bison_parser.y" + case 169: /* expr_alias: expr opt_alias */ +#line 1018 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); if ((yyvsp[0].alias_t)) { @@ -4577,507 +4594,507 @@ YYLTYPE yylloc = yyloc_default; delete (yyvsp[0].alias_t); } } -#line 4581 "bison_parser.cpp" +#line 4598 "bison_parser.cpp" break; - case 174: /* operand: '(' expr ')' */ -#line 1016 "bison_parser.y" + case 175: /* operand: '(' expr ')' */ +#line 1028 "bison_parser.y" { (yyval.expr) = (yyvsp[-1].expr); } -#line 4587 "bison_parser.cpp" +#line 4604 "bison_parser.cpp" break; - case 184: /* operand: '(' query_primary ')' */ -#line 1018 "bison_parser.y" + case 185: /* operand: '(' query_primary ')' */ +#line 1030 "bison_parser.y" { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 4595 "bison_parser.cpp" +#line 4612 "bison_parser.cpp" break; - case 187: /* unary_expr: '-' operand */ -#line 1024 "bison_parser.y" + case 188: /* unary_expr: '-' operand */ +#line 1036 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 4601 "bison_parser.cpp" +#line 4618 "bison_parser.cpp" break; - case 188: /* unary_expr: NOT operand */ -#line 1025 "bison_parser.y" + case 189: /* unary_expr: NOT operand */ +#line 1037 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 4607 "bison_parser.cpp" +#line 4624 "bison_parser.cpp" break; - case 189: /* unary_expr: operand ISNULL */ -#line 1026 "bison_parser.y" + case 190: /* unary_expr: operand ISNULL */ +#line 1038 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 4613 "bison_parser.cpp" +#line 4630 "bison_parser.cpp" break; - case 190: /* unary_expr: operand IS NULL */ -#line 1027 "bison_parser.y" + case 191: /* unary_expr: operand IS NULL */ +#line 1039 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 4619 "bison_parser.cpp" +#line 4636 "bison_parser.cpp" break; - case 191: /* unary_expr: operand IS NOT NULL */ -#line 1028 "bison_parser.y" + case 192: /* unary_expr: operand IS NOT NULL */ +#line 1040 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 4625 "bison_parser.cpp" +#line 4642 "bison_parser.cpp" break; - case 193: /* binary_expr: operand '-' operand */ -#line 1030 "bison_parser.y" + case 194: /* binary_expr: operand '-' operand */ +#line 1042 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 4631 "bison_parser.cpp" +#line 4648 "bison_parser.cpp" break; - case 194: /* binary_expr: operand '+' operand */ -#line 1031 "bison_parser.y" + case 195: /* binary_expr: operand '+' operand */ +#line 1043 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 4637 "bison_parser.cpp" +#line 4654 "bison_parser.cpp" break; - case 195: /* binary_expr: operand '/' operand */ -#line 1032 "bison_parser.y" + case 196: /* binary_expr: operand '/' operand */ +#line 1044 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 4643 "bison_parser.cpp" +#line 4660 "bison_parser.cpp" break; - case 196: /* binary_expr: operand '*' operand */ -#line 1033 "bison_parser.y" + case 197: /* binary_expr: operand '*' operand */ +#line 1045 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 4649 "bison_parser.cpp" +#line 4666 "bison_parser.cpp" break; - case 197: /* binary_expr: operand '%' operand */ -#line 1034 "bison_parser.y" + case 198: /* binary_expr: operand '%' operand */ +#line 1046 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 4655 "bison_parser.cpp" +#line 4672 "bison_parser.cpp" break; - case 198: /* binary_expr: operand '^' operand */ -#line 1035 "bison_parser.y" + case 199: /* binary_expr: operand '^' operand */ +#line 1047 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 4661 "bison_parser.cpp" +#line 4678 "bison_parser.cpp" break; - case 199: /* binary_expr: operand LIKE operand */ -#line 1036 "bison_parser.y" + case 200: /* binary_expr: operand LIKE operand */ +#line 1048 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 4667 "bison_parser.cpp" +#line 4684 "bison_parser.cpp" break; - case 200: /* binary_expr: operand NOT LIKE operand */ -#line 1037 "bison_parser.y" + case 201: /* binary_expr: operand NOT LIKE operand */ +#line 1049 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 4673 "bison_parser.cpp" +#line 4690 "bison_parser.cpp" break; - case 201: /* binary_expr: operand ILIKE operand */ -#line 1038 "bison_parser.y" + case 202: /* binary_expr: operand ILIKE operand */ +#line 1050 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 4679 "bison_parser.cpp" +#line 4696 "bison_parser.cpp" break; - case 202: /* binary_expr: operand CONCAT operand */ -#line 1039 "bison_parser.y" + case 203: /* binary_expr: operand CONCAT operand */ +#line 1051 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 4685 "bison_parser.cpp" +#line 4702 "bison_parser.cpp" break; - case 203: /* logic_expr: expr AND expr */ -#line 1041 "bison_parser.y" + case 204: /* logic_expr: expr AND expr */ +#line 1053 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 4691 "bison_parser.cpp" +#line 4708 "bison_parser.cpp" break; - case 204: /* logic_expr: expr OR expr */ -#line 1042 "bison_parser.y" + case 205: /* logic_expr: expr OR expr */ +#line 1054 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 4697 "bison_parser.cpp" +#line 4714 "bison_parser.cpp" break; - case 205: /* in_expr: operand IN '(' expr_list ')' */ -#line 1044 "bison_parser.y" + case 206: /* in_expr: operand IN '(' expr_list ')' */ +#line 1056 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 4703 "bison_parser.cpp" +#line 4720 "bison_parser.cpp" break; - case 206: /* in_expr: operand NOT IN '(' expr_list ')' */ -#line 1045 "bison_parser.y" + case 207: /* in_expr: operand NOT IN '(' expr_list ')' */ +#line 1057 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 4709 "bison_parser.cpp" +#line 4726 "bison_parser.cpp" break; - case 207: /* in_expr: operand IN '(' query_primary ')' */ -#line 1046 "bison_parser.y" + case 208: /* in_expr: operand IN '(' query_primary ')' */ +#line 1058 "bison_parser.y" { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 4715 "bison_parser.cpp" +#line 4732 "bison_parser.cpp" break; - case 208: /* in_expr: operand NOT IN '(' query_primary ')' */ -#line 1047 "bison_parser.y" + case 209: /* in_expr: operand NOT IN '(' query_primary ')' */ +#line 1059 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 4721 "bison_parser.cpp" +#line 4738 "bison_parser.cpp" break; - case 209: /* case_expr: CASE expr case_list END */ -#line 1051 "bison_parser.y" + case 210: /* case_expr: CASE expr case_list END */ +#line 1063 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } -#line 4727 "bison_parser.cpp" +#line 4744 "bison_parser.cpp" break; - case 210: /* case_expr: CASE expr case_list ELSE expr END */ -#line 1052 "bison_parser.y" + case 211: /* case_expr: CASE expr case_list ELSE expr END */ +#line 1064 "bison_parser.y" { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4733 "bison_parser.cpp" +#line 4750 "bison_parser.cpp" break; - case 211: /* case_expr: CASE case_list END */ -#line 1053 "bison_parser.y" + case 212: /* case_expr: CASE case_list END */ +#line 1065 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } -#line 4739 "bison_parser.cpp" +#line 4756 "bison_parser.cpp" break; - case 212: /* case_expr: CASE case_list ELSE expr END */ -#line 1054 "bison_parser.y" + case 213: /* case_expr: CASE case_list ELSE expr END */ +#line 1066 "bison_parser.y" { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 4745 "bison_parser.cpp" +#line 4762 "bison_parser.cpp" break; - case 213: /* case_list: WHEN expr THEN expr */ -#line 1056 "bison_parser.y" + case 214: /* case_list: WHEN expr THEN expr */ +#line 1068 "bison_parser.y" { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4751 "bison_parser.cpp" +#line 4768 "bison_parser.cpp" break; - case 214: /* case_list: case_list WHEN expr THEN expr */ -#line 1057 "bison_parser.y" + case 215: /* case_list: case_list WHEN expr THEN expr */ +#line 1069 "bison_parser.y" { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 4757 "bison_parser.cpp" +#line 4774 "bison_parser.cpp" break; - case 215: /* exists_expr: EXISTS '(' query_primary ')' */ -#line 1059 "bison_parser.y" + case 216: /* exists_expr: EXISTS '(' query_primary ')' */ +#line 1071 "bison_parser.y" { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 4763 "bison_parser.cpp" +#line 4780 "bison_parser.cpp" break; - case 216: /* exists_expr: NOT EXISTS '(' query_primary ')' */ -#line 1060 "bison_parser.y" + case 217: /* exists_expr: NOT EXISTS '(' query_primary ')' */ +#line 1072 "bison_parser.y" { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 4769 "bison_parser.cpp" +#line 4786 "bison_parser.cpp" break; - case 217: /* comp_expr: operand '=' operand */ -#line 1062 "bison_parser.y" + case 218: /* comp_expr: operand '=' operand */ +#line 1074 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4775 "bison_parser.cpp" +#line 4792 "bison_parser.cpp" break; - case 218: /* comp_expr: operand EQUALS operand */ -#line 1063 "bison_parser.y" + case 219: /* comp_expr: operand EQUALS operand */ +#line 1075 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 4781 "bison_parser.cpp" +#line 4798 "bison_parser.cpp" break; - case 219: /* comp_expr: operand NOTEQUALS operand */ -#line 1064 "bison_parser.y" + case 220: /* comp_expr: operand NOTEQUALS operand */ +#line 1076 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 4787 "bison_parser.cpp" +#line 4804 "bison_parser.cpp" break; - case 220: /* comp_expr: operand '<' operand */ -#line 1065 "bison_parser.y" + case 221: /* comp_expr: operand '<' operand */ +#line 1077 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 4793 "bison_parser.cpp" +#line 4810 "bison_parser.cpp" break; - case 221: /* comp_expr: operand '>' operand */ -#line 1066 "bison_parser.y" + case 222: /* comp_expr: operand '>' operand */ +#line 1078 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 4799 "bison_parser.cpp" +#line 4816 "bison_parser.cpp" break; - case 222: /* comp_expr: operand LESSEQ operand */ -#line 1067 "bison_parser.y" + case 223: /* comp_expr: operand LESSEQ operand */ +#line 1079 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 4805 "bison_parser.cpp" +#line 4822 "bison_parser.cpp" break; - case 223: /* comp_expr: operand GREATEREQ operand */ -#line 1068 "bison_parser.y" + case 224: /* comp_expr: operand GREATEREQ operand */ +#line 1080 "bison_parser.y" { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 4811 "bison_parser.cpp" +#line 4828 "bison_parser.cpp" break; - case 224: /* function_expr: IDENTIFIER '(' ')' opt_window */ -#line 1072 "bison_parser.y" + case 225: /* function_expr: IDENTIFIER '(' ')' opt_window */ +#line 1084 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-3].sval), new std::vector(), false, (yyvsp[0].window_description)); } -#line 4817 "bison_parser.cpp" +#line 4834 "bison_parser.cpp" break; - case 225: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' opt_window */ -#line 1073 "bison_parser.y" + case 226: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' opt_window */ +#line 1085 "bison_parser.y" { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-5].sval), (yyvsp[-2].expr_vec), (yyvsp[-3].bval), (yyvsp[0].window_description)); } -#line 4823 "bison_parser.cpp" +#line 4840 "bison_parser.cpp" break; - case 226: /* opt_window: OVER '(' opt_partition opt_order opt_frame_clause ')' */ -#line 1077 "bison_parser.y" + case 227: /* opt_window: OVER '(' opt_partition opt_order opt_frame_clause ')' */ +#line 1089 "bison_parser.y" { (yyval.window_description) = new WindowDescription((yyvsp[-3].expr_vec), (yyvsp[-2].order_vec), (yyvsp[-1].frame_description)); } -#line 4829 "bison_parser.cpp" +#line 4846 "bison_parser.cpp" break; - case 227: /* opt_window: %empty */ -#line 1078 "bison_parser.y" + case 228: /* opt_window: %empty */ +#line 1090 "bison_parser.y" { (yyval.window_description) = nullptr; } -#line 4835 "bison_parser.cpp" +#line 4852 "bison_parser.cpp" break; - case 228: /* opt_partition: PARTITION BY expr_list */ -#line 1080 "bison_parser.y" + case 229: /* opt_partition: PARTITION BY expr_list */ +#line 1092 "bison_parser.y" { (yyval.expr_vec) = (yyvsp[0].expr_vec); } -#line 4841 "bison_parser.cpp" +#line 4858 "bison_parser.cpp" break; - case 229: /* opt_partition: %empty */ -#line 1081 "bison_parser.y" + case 230: /* opt_partition: %empty */ +#line 1093 "bison_parser.y" { (yyval.expr_vec) = nullptr; } -#line 4847 "bison_parser.cpp" +#line 4864 "bison_parser.cpp" break; - case 230: /* opt_frame_clause: frame_type frame_bound */ -#line 1086 "bison_parser.y" + case 231: /* opt_frame_clause: frame_type frame_bound */ +#line 1098 "bison_parser.y" { (yyval.frame_description) = new FrameDescription{(yyvsp[-1].frame_type), (yyvsp[0].frame_bound), new FrameBound{0, kCurrentRow, false}}; } -#line 4853 "bison_parser.cpp" +#line 4870 "bison_parser.cpp" break; - case 231: /* opt_frame_clause: frame_type BETWEEN frame_bound AND frame_bound */ -#line 1087 "bison_parser.y" + case 232: /* opt_frame_clause: frame_type BETWEEN frame_bound AND frame_bound */ +#line 1099 "bison_parser.y" { (yyval.frame_description) = new FrameDescription{(yyvsp[-4].frame_type), (yyvsp[-2].frame_bound), (yyvsp[0].frame_bound)}; } -#line 4859 "bison_parser.cpp" +#line 4876 "bison_parser.cpp" break; - case 232: /* opt_frame_clause: %empty */ -#line 1088 "bison_parser.y" + case 233: /* opt_frame_clause: %empty */ +#line 1100 "bison_parser.y" { (yyval.frame_description) = new FrameDescription{kRange, new FrameBound{0, kPreceding, true}, new FrameBound{0, kCurrentRow, false}}; } -#line 4867 "bison_parser.cpp" +#line 4884 "bison_parser.cpp" break; - case 233: /* frame_type: RANGE */ -#line 1092 "bison_parser.y" + case 234: /* frame_type: RANGE */ +#line 1104 "bison_parser.y" { (yyval.frame_type) = kRange; } -#line 4873 "bison_parser.cpp" +#line 4890 "bison_parser.cpp" break; - case 234: /* frame_type: ROWS */ -#line 1093 "bison_parser.y" + case 235: /* frame_type: ROWS */ +#line 1105 "bison_parser.y" { (yyval.frame_type) = kRows; } -#line 4879 "bison_parser.cpp" +#line 4896 "bison_parser.cpp" break; - case 235: /* frame_type: GROUPS */ -#line 1094 "bison_parser.y" + case 236: /* frame_type: GROUPS */ +#line 1106 "bison_parser.y" { (yyval.frame_type) = kGroups; } -#line 4885 "bison_parser.cpp" +#line 4902 "bison_parser.cpp" break; - case 236: /* frame_bound: UNBOUNDED PRECEDING */ -#line 1096 "bison_parser.y" + case 237: /* frame_bound: UNBOUNDED PRECEDING */ +#line 1108 "bison_parser.y" { (yyval.frame_bound) = new FrameBound{0, kPreceding, true}; } -#line 4891 "bison_parser.cpp" +#line 4908 "bison_parser.cpp" break; - case 237: /* frame_bound: INTVAL PRECEDING */ -#line 1097 "bison_parser.y" + case 238: /* frame_bound: INTVAL PRECEDING */ +#line 1109 "bison_parser.y" { (yyval.frame_bound) = new FrameBound{(yyvsp[-1].ival), kPreceding, false}; } -#line 4897 "bison_parser.cpp" +#line 4914 "bison_parser.cpp" break; - case 238: /* frame_bound: UNBOUNDED FOLLOWING */ -#line 1098 "bison_parser.y" + case 239: /* frame_bound: UNBOUNDED FOLLOWING */ +#line 1110 "bison_parser.y" { (yyval.frame_bound) = new FrameBound{0, kFollowing, true}; } -#line 4903 "bison_parser.cpp" +#line 4920 "bison_parser.cpp" break; - case 239: /* frame_bound: INTVAL FOLLOWING */ -#line 1099 "bison_parser.y" + case 240: /* frame_bound: INTVAL FOLLOWING */ +#line 1111 "bison_parser.y" { (yyval.frame_bound) = new FrameBound{(yyvsp[-1].ival), kFollowing, false}; } -#line 4909 "bison_parser.cpp" +#line 4926 "bison_parser.cpp" break; - case 240: /* frame_bound: CURRENT_ROW */ -#line 1100 "bison_parser.y" + case 241: /* frame_bound: CURRENT_ROW */ +#line 1112 "bison_parser.y" { (yyval.frame_bound) = new FrameBound{0, kCurrentRow, false}; } -#line 4915 "bison_parser.cpp" +#line 4932 "bison_parser.cpp" break; - case 241: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ -#line 1102 "bison_parser.y" + case 242: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */ +#line 1114 "bison_parser.y" { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } -#line 4921 "bison_parser.cpp" +#line 4938 "bison_parser.cpp" break; - case 242: /* cast_expr: CAST '(' expr AS column_type ')' */ -#line 1104 "bison_parser.y" + case 243: /* cast_expr: CAST '(' expr AS column_type ')' */ +#line 1116 "bison_parser.y" { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); } -#line 4927 "bison_parser.cpp" +#line 4944 "bison_parser.cpp" break; - case 243: /* datetime_field: SECOND */ -#line 1106 "bison_parser.y" + case 244: /* datetime_field: SECOND */ +#line 1118 "bison_parser.y" { (yyval.datetime_field) = kDatetimeSecond; } -#line 4933 "bison_parser.cpp" +#line 4950 "bison_parser.cpp" break; - case 244: /* datetime_field: MINUTE */ -#line 1107 "bison_parser.y" + case 245: /* datetime_field: MINUTE */ +#line 1119 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMinute; } -#line 4939 "bison_parser.cpp" +#line 4956 "bison_parser.cpp" break; - case 245: /* datetime_field: HOUR */ -#line 1108 "bison_parser.y" + case 246: /* datetime_field: HOUR */ +#line 1120 "bison_parser.y" { (yyval.datetime_field) = kDatetimeHour; } -#line 4945 "bison_parser.cpp" +#line 4962 "bison_parser.cpp" break; - case 246: /* datetime_field: DAY */ -#line 1109 "bison_parser.y" + case 247: /* datetime_field: DAY */ +#line 1121 "bison_parser.y" { (yyval.datetime_field) = kDatetimeDay; } -#line 4951 "bison_parser.cpp" +#line 4968 "bison_parser.cpp" break; - case 247: /* datetime_field: MONTH */ -#line 1110 "bison_parser.y" + case 248: /* datetime_field: MONTH */ +#line 1122 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMonth; } -#line 4957 "bison_parser.cpp" +#line 4974 "bison_parser.cpp" break; - case 248: /* datetime_field: YEAR */ -#line 1111 "bison_parser.y" + case 249: /* datetime_field: YEAR */ +#line 1123 "bison_parser.y" { (yyval.datetime_field) = kDatetimeYear; } -#line 4963 "bison_parser.cpp" +#line 4980 "bison_parser.cpp" break; - case 249: /* datetime_field_plural: SECONDS */ -#line 1113 "bison_parser.y" + case 250: /* datetime_field_plural: SECONDS */ +#line 1125 "bison_parser.y" { (yyval.datetime_field) = kDatetimeSecond; } -#line 4969 "bison_parser.cpp" +#line 4986 "bison_parser.cpp" break; - case 250: /* datetime_field_plural: MINUTES */ -#line 1114 "bison_parser.y" + case 251: /* datetime_field_plural: MINUTES */ +#line 1126 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMinute; } -#line 4975 "bison_parser.cpp" +#line 4992 "bison_parser.cpp" break; - case 251: /* datetime_field_plural: HOURS */ -#line 1115 "bison_parser.y" + case 252: /* datetime_field_plural: HOURS */ +#line 1127 "bison_parser.y" { (yyval.datetime_field) = kDatetimeHour; } -#line 4981 "bison_parser.cpp" +#line 4998 "bison_parser.cpp" break; - case 252: /* datetime_field_plural: DAYS */ -#line 1116 "bison_parser.y" + case 253: /* datetime_field_plural: DAYS */ +#line 1128 "bison_parser.y" { (yyval.datetime_field) = kDatetimeDay; } -#line 4987 "bison_parser.cpp" +#line 5004 "bison_parser.cpp" break; - case 253: /* datetime_field_plural: MONTHS */ -#line 1117 "bison_parser.y" + case 254: /* datetime_field_plural: MONTHS */ +#line 1129 "bison_parser.y" { (yyval.datetime_field) = kDatetimeMonth; } -#line 4993 "bison_parser.cpp" +#line 5010 "bison_parser.cpp" break; - case 254: /* datetime_field_plural: YEARS */ -#line 1118 "bison_parser.y" + case 255: /* datetime_field_plural: YEARS */ +#line 1130 "bison_parser.y" { (yyval.datetime_field) = kDatetimeYear; } -#line 4999 "bison_parser.cpp" +#line 5016 "bison_parser.cpp" break; - case 257: /* array_expr: ARRAY '[' expr_list ']' */ -#line 1122 "bison_parser.y" + case 258: /* array_expr: ARRAY '[' expr_list ']' */ +#line 1134 "bison_parser.y" { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 5005 "bison_parser.cpp" +#line 5022 "bison_parser.cpp" break; - case 258: /* array_index: operand '[' int_literal ']' */ -#line 1124 "bison_parser.y" + case 259: /* array_index: operand '[' int_literal ']' */ +#line 1136 "bison_parser.y" { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 5011 "bison_parser.cpp" +#line 5028 "bison_parser.cpp" break; - case 259: /* between_expr: operand BETWEEN operand AND operand */ -#line 1126 "bison_parser.y" + case 260: /* between_expr: operand BETWEEN operand AND operand */ +#line 1138 "bison_parser.y" { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 5017 "bison_parser.cpp" +#line 5034 "bison_parser.cpp" break; - case 260: /* column_name: IDENTIFIER */ -#line 1128 "bison_parser.y" + case 261: /* column_name: IDENTIFIER */ +#line 1140 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 5023 "bison_parser.cpp" +#line 5040 "bison_parser.cpp" break; - case 261: /* column_name: IDENTIFIER '.' IDENTIFIER */ -#line 1129 "bison_parser.y" + case 262: /* column_name: IDENTIFIER '.' IDENTIFIER */ +#line 1141 "bison_parser.y" { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 5029 "bison_parser.cpp" +#line 5046 "bison_parser.cpp" break; - case 262: /* column_name: '*' */ -#line 1130 "bison_parser.y" + case 263: /* column_name: '*' */ +#line 1142 "bison_parser.y" { (yyval.expr) = Expr::makeStar(); } -#line 5035 "bison_parser.cpp" +#line 5052 "bison_parser.cpp" break; - case 263: /* column_name: IDENTIFIER '.' '*' */ -#line 1131 "bison_parser.y" + case 264: /* column_name: IDENTIFIER '.' '*' */ +#line 1143 "bison_parser.y" { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 5041 "bison_parser.cpp" +#line 5058 "bison_parser.cpp" break; - case 271: /* string_literal: STRING */ -#line 1135 "bison_parser.y" + case 272: /* string_literal: STRING */ +#line 1147 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 5047 "bison_parser.cpp" +#line 5064 "bison_parser.cpp" break; - case 272: /* bool_literal: TRUE */ -#line 1137 "bison_parser.y" + case 273: /* bool_literal: TRUE */ +#line 1149 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(true); } -#line 5053 "bison_parser.cpp" +#line 5070 "bison_parser.cpp" break; - case 273: /* bool_literal: FALSE */ -#line 1138 "bison_parser.y" + case 274: /* bool_literal: FALSE */ +#line 1150 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral(false); } -#line 5059 "bison_parser.cpp" +#line 5076 "bison_parser.cpp" break; - case 274: /* num_literal: FLOATVAL */ -#line 1140 "bison_parser.y" + case 275: /* num_literal: FLOATVAL */ +#line 1152 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 5065 "bison_parser.cpp" +#line 5082 "bison_parser.cpp" break; - case 276: /* int_literal: INTVAL */ -#line 1143 "bison_parser.y" + case 277: /* int_literal: INTVAL */ +#line 1155 "bison_parser.y" { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 5071 "bison_parser.cpp" +#line 5088 "bison_parser.cpp" break; - case 277: /* null_literal: NULL */ -#line 1145 "bison_parser.y" + case 278: /* null_literal: NULL */ +#line 1157 "bison_parser.y" { (yyval.expr) = Expr::makeNullLiteral(); } -#line 5077 "bison_parser.cpp" +#line 5094 "bison_parser.cpp" break; - case 278: /* date_literal: DATE STRING */ -#line 1147 "bison_parser.y" + case 279: /* date_literal: DATE STRING */ +#line 1159 "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 @@ -5088,17 +5105,17 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expr) = Expr::makeDateLiteral((yyvsp[0].sval)); } -#line 5092 "bison_parser.cpp" +#line 5109 "bison_parser.cpp" break; - case 279: /* interval_literal: INTVAL duration_field */ -#line 1158 "bison_parser.y" + case 280: /* interval_literal: INTVAL duration_field */ +#line 1170 "bison_parser.y" { (yyval.expr) = Expr::makeIntervalLiteral((yyvsp[-1].ival), (yyvsp[0].datetime_field)); } -#line 5098 "bison_parser.cpp" +#line 5115 "bison_parser.cpp" break; - case 280: /* interval_literal: INTERVAL STRING datetime_field */ -#line 1159 "bison_parser.y" + case 281: /* interval_literal: INTERVAL STRING datetime_field */ +#line 1171 "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 @@ -5110,11 +5127,11 @@ YYLTYPE yylloc = yyloc_default; free((yyvsp[-1].sval)); (yyval.expr) = Expr::makeIntervalLiteral(duration, (yyvsp[0].datetime_field)); } -#line 5114 "bison_parser.cpp" +#line 5131 "bison_parser.cpp" break; - case 281: /* interval_literal: INTERVAL STRING */ -#line 1170 "bison_parser.y" + case 282: /* interval_literal: INTERVAL STRING */ +#line 1182 "bison_parser.y" { int duration{0}, chars_parsed{0}; // 'seconds' and 'minutes' are the longest accepted interval qualifiers (7 chars) + null byte @@ -5146,61 +5163,61 @@ YYLTYPE yylloc = yyloc_default; } (yyval.expr) = Expr::makeIntervalLiteral(duration, unit); } -#line 5150 "bison_parser.cpp" +#line 5167 "bison_parser.cpp" break; - case 282: /* param_expr: '?' */ -#line 1202 "bison_parser.y" + case 283: /* param_expr: '?' */ +#line 1214 "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 5160 "bison_parser.cpp" +#line 5177 "bison_parser.cpp" break; - case 284: /* table_ref: table_ref_commalist ',' table_ref_atomic */ -#line 1211 "bison_parser.y" + case 285: /* table_ref: table_ref_commalist ',' table_ref_atomic */ +#line 1223 "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 5171 "bison_parser.cpp" +#line 5188 "bison_parser.cpp" break; - case 288: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ -#line 1220 "bison_parser.y" + case 289: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */ +#line 1232 "bison_parser.y" { auto tbl = new TableRef(kTableSelect); tbl->select = (yyvsp[-2].select_stmt); tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 5182 "bison_parser.cpp" +#line 5199 "bison_parser.cpp" break; - case 289: /* table_ref_commalist: table_ref_atomic */ -#line 1227 "bison_parser.y" + case 290: /* table_ref_commalist: table_ref_atomic */ +#line 1239 "bison_parser.y" { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 5191 "bison_parser.cpp" +#line 5208 "bison_parser.cpp" break; - case 290: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ -#line 1231 "bison_parser.y" + case 291: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */ +#line 1243 "bison_parser.y" { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 5200 "bison_parser.cpp" +#line 5217 "bison_parser.cpp" break; - case 291: /* table_ref_name: table_name opt_table_alias */ -#line 1236 "bison_parser.y" + case 292: /* table_ref_name: table_name opt_table_alias */ +#line 1248 "bison_parser.y" { auto tbl = new TableRef(kTableName); tbl->schema = (yyvsp[-1].table_name).schema; @@ -5208,199 +5225,199 @@ YYLTYPE yylloc = yyloc_default; tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 5212 "bison_parser.cpp" +#line 5229 "bison_parser.cpp" break; - case 292: /* table_ref_name_no_alias: table_name */ -#line 1244 "bison_parser.y" + case 293: /* table_ref_name_no_alias: table_name */ +#line 1256 "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 5222 "bison_parser.cpp" +#line 5239 "bison_parser.cpp" break; - case 293: /* table_name: IDENTIFIER */ -#line 1250 "bison_parser.y" + case 294: /* table_name: IDENTIFIER */ +#line 1262 "bison_parser.y" { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval); } -#line 5231 "bison_parser.cpp" +#line 5248 "bison_parser.cpp" break; - case 294: /* table_name: IDENTIFIER '.' IDENTIFIER */ -#line 1254 "bison_parser.y" + case 295: /* table_name: IDENTIFIER '.' IDENTIFIER */ +#line 1266 "bison_parser.y" { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } -#line 5240 "bison_parser.cpp" +#line 5257 "bison_parser.cpp" break; - case 295: /* opt_index_name: IDENTIFIER */ -#line 1259 "bison_parser.y" + case 296: /* opt_index_name: IDENTIFIER */ +#line 1271 "bison_parser.y" { (yyval.sval) = (yyvsp[0].sval); } -#line 5246 "bison_parser.cpp" +#line 5263 "bison_parser.cpp" break; - case 296: /* opt_index_name: %empty */ -#line 1260 "bison_parser.y" + case 297: /* opt_index_name: %empty */ +#line 1272 "bison_parser.y" { (yyval.sval) = nullptr; } -#line 5252 "bison_parser.cpp" +#line 5269 "bison_parser.cpp" break; - case 298: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ -#line 1262 "bison_parser.y" + case 299: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */ +#line 1274 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } -#line 5258 "bison_parser.cpp" +#line 5275 "bison_parser.cpp" break; - case 300: /* opt_table_alias: %empty */ -#line 1264 "bison_parser.y" + case 301: /* opt_table_alias: %empty */ +#line 1276 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 5264 "bison_parser.cpp" +#line 5281 "bison_parser.cpp" break; - case 301: /* alias: AS IDENTIFIER */ -#line 1266 "bison_parser.y" + case 302: /* alias: AS IDENTIFIER */ +#line 1278 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 5270 "bison_parser.cpp" +#line 5287 "bison_parser.cpp" break; - case 302: /* alias: IDENTIFIER */ -#line 1267 "bison_parser.y" + case 303: /* alias: IDENTIFIER */ +#line 1279 "bison_parser.y" { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 5276 "bison_parser.cpp" +#line 5293 "bison_parser.cpp" break; - case 304: /* opt_alias: %empty */ -#line 1269 "bison_parser.y" + case 305: /* opt_alias: %empty */ +#line 1281 "bison_parser.y" { (yyval.alias_t) = nullptr; } -#line 5282 "bison_parser.cpp" +#line 5299 "bison_parser.cpp" break; - case 305: /* opt_locking_clause: opt_locking_clause_list */ -#line 1275 "bison_parser.y" + case 306: /* opt_locking_clause: opt_locking_clause_list */ +#line 1287 "bison_parser.y" { (yyval.locking_clause_vec) = (yyvsp[0].locking_clause_vec); } -#line 5288 "bison_parser.cpp" +#line 5305 "bison_parser.cpp" break; - case 306: /* opt_locking_clause: %empty */ -#line 1276 "bison_parser.y" + case 307: /* opt_locking_clause: %empty */ +#line 1288 "bison_parser.y" { (yyval.locking_clause_vec) = nullptr; } -#line 5294 "bison_parser.cpp" +#line 5311 "bison_parser.cpp" break; - case 307: /* opt_locking_clause_list: locking_clause */ -#line 1278 "bison_parser.y" + case 308: /* opt_locking_clause_list: locking_clause */ +#line 1290 "bison_parser.y" { (yyval.locking_clause_vec) = new std::vector(); (yyval.locking_clause_vec)->push_back((yyvsp[0].locking_t)); } -#line 5303 "bison_parser.cpp" +#line 5320 "bison_parser.cpp" break; - case 308: /* opt_locking_clause_list: opt_locking_clause_list locking_clause */ -#line 1282 "bison_parser.y" + case 309: /* opt_locking_clause_list: opt_locking_clause_list locking_clause */ +#line 1294 "bison_parser.y" { (yyvsp[-1].locking_clause_vec)->push_back((yyvsp[0].locking_t)); (yyval.locking_clause_vec) = (yyvsp[-1].locking_clause_vec); } -#line 5312 "bison_parser.cpp" +#line 5329 "bison_parser.cpp" break; - case 309: /* locking_clause: FOR row_lock_mode opt_row_lock_policy */ -#line 1287 "bison_parser.y" + case 310: /* locking_clause: FOR row_lock_mode opt_row_lock_policy */ +#line 1299 "bison_parser.y" { (yyval.locking_t) = new LockingClause(); (yyval.locking_t)->rowLockMode = (yyvsp[-1].lock_mode_t); (yyval.locking_t)->rowLockWaitPolicy = (yyvsp[0].lock_wait_policy_t); (yyval.locking_t)->tables = nullptr; } -#line 5323 "bison_parser.cpp" +#line 5340 "bison_parser.cpp" break; - case 310: /* locking_clause: FOR row_lock_mode OF ident_commalist opt_row_lock_policy */ -#line 1293 "bison_parser.y" + case 311: /* locking_clause: FOR row_lock_mode OF ident_commalist opt_row_lock_policy */ +#line 1305 "bison_parser.y" { (yyval.locking_t) = new LockingClause(); (yyval.locking_t)->rowLockMode = (yyvsp[-3].lock_mode_t); (yyval.locking_t)->tables = (yyvsp[-1].str_vec); (yyval.locking_t)->rowLockWaitPolicy = (yyvsp[0].lock_wait_policy_t); } -#line 5334 "bison_parser.cpp" +#line 5351 "bison_parser.cpp" break; - case 311: /* row_lock_mode: UPDATE */ -#line 1300 "bison_parser.y" + case 312: /* row_lock_mode: UPDATE */ +#line 1312 "bison_parser.y" { (yyval.lock_mode_t) = RowLockMode::ForUpdate; } -#line 5340 "bison_parser.cpp" +#line 5357 "bison_parser.cpp" break; - case 312: /* row_lock_mode: NO KEY UPDATE */ -#line 1301 "bison_parser.y" + case 313: /* row_lock_mode: NO KEY UPDATE */ +#line 1313 "bison_parser.y" { (yyval.lock_mode_t) = RowLockMode::ForNoKeyUpdate; } -#line 5346 "bison_parser.cpp" +#line 5363 "bison_parser.cpp" break; - case 313: /* row_lock_mode: SHARE */ -#line 1302 "bison_parser.y" + case 314: /* row_lock_mode: SHARE */ +#line 1314 "bison_parser.y" { (yyval.lock_mode_t) = RowLockMode::ForShare; } -#line 5352 "bison_parser.cpp" +#line 5369 "bison_parser.cpp" break; - case 314: /* row_lock_mode: KEY SHARE */ -#line 1303 "bison_parser.y" + case 315: /* row_lock_mode: KEY SHARE */ +#line 1315 "bison_parser.y" { (yyval.lock_mode_t) = RowLockMode::ForKeyShare; } -#line 5358 "bison_parser.cpp" +#line 5375 "bison_parser.cpp" break; - case 315: /* opt_row_lock_policy: SKIP LOCKED */ -#line 1305 "bison_parser.y" + case 316: /* opt_row_lock_policy: SKIP LOCKED */ +#line 1317 "bison_parser.y" { (yyval.lock_wait_policy_t) = RowLockWaitPolicy::SkipLocked; } -#line 5364 "bison_parser.cpp" +#line 5381 "bison_parser.cpp" break; - case 316: /* opt_row_lock_policy: NOWAIT */ -#line 1306 "bison_parser.y" + case 317: /* opt_row_lock_policy: NOWAIT */ +#line 1318 "bison_parser.y" { (yyval.lock_wait_policy_t) = RowLockWaitPolicy::NoWait; } -#line 5370 "bison_parser.cpp" +#line 5387 "bison_parser.cpp" break; - case 317: /* opt_row_lock_policy: %empty */ -#line 1307 "bison_parser.y" + case 318: /* opt_row_lock_policy: %empty */ +#line 1319 "bison_parser.y" { (yyval.lock_wait_policy_t) = RowLockWaitPolicy::None; } -#line 5376 "bison_parser.cpp" +#line 5393 "bison_parser.cpp" break; - case 318: /* with_clause: WITH with_description_list */ -#line 1313 "bison_parser.y" + case 319: /* with_clause: WITH with_description_list */ +#line 1325 "bison_parser.y" { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } -#line 5382 "bison_parser.cpp" +#line 5399 "bison_parser.cpp" break; - case 319: /* with_description_list: with_description */ -#line 1315 "bison_parser.y" + case 320: /* with_description_list: with_description */ +#line 1327 "bison_parser.y" { (yyval.with_description_vec) = new std::vector(); (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); } -#line 5391 "bison_parser.cpp" +#line 5408 "bison_parser.cpp" break; - case 320: /* with_description_list: with_description_list ',' with_description */ -#line 1319 "bison_parser.y" + case 321: /* with_description_list: with_description_list ',' with_description */ +#line 1331 "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 5400 "bison_parser.cpp" +#line 5417 "bison_parser.cpp" break; - case 321: /* with_description: IDENTIFIER AS subquery */ -#line 1324 "bison_parser.y" + case 322: /* with_description: IDENTIFIER AS subquery */ +#line 1336 "bison_parser.y" { if ((yyvsp[0].select_stmt)->withDescriptions != nullptr) { free((yyvsp[-2].sval)); @@ -5412,11 +5429,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.with_description_t)->alias = (yyvsp[-2].sval); (yyval.with_description_t)->select = (yyvsp[0].select_stmt); } -#line 5416 "bison_parser.cpp" +#line 5433 "bison_parser.cpp" break; - case 322: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ -#line 1340 "bison_parser.y" + case 323: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */ +#line 1352 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -5424,11 +5441,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 5428 "bison_parser.cpp" +#line 5445 "bison_parser.cpp" break; - case 323: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ -#line 1347 "bison_parser.y" + case 324: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */ +#line 1359 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -5437,11 +5454,11 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 5441 "bison_parser.cpp" +#line 5458 "bison_parser.cpp" break; - case 324: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' ident_commalist ')' */ -#line 1355 "bison_parser.y" + case 325: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' ident_commalist ')' */ +#line 1367 "bison_parser.y" { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -5450,89 +5467,89 @@ YYLTYPE yylloc = yyloc_default; (yyval.table)->join->right = (yyvsp[-4].table); (yyval.table)->join->namedColumns = (yyvsp[-1].str_vec); } -#line 5454 "bison_parser.cpp" +#line 5471 "bison_parser.cpp" break; - case 325: /* opt_join_type: INNER */ -#line 1364 "bison_parser.y" + case 326: /* opt_join_type: INNER */ +#line 1376 "bison_parser.y" { (yyval.join_type) = kJoinInner; } -#line 5460 "bison_parser.cpp" +#line 5477 "bison_parser.cpp" break; - case 326: /* opt_join_type: LEFT OUTER */ -#line 1365 "bison_parser.y" + case 327: /* opt_join_type: LEFT OUTER */ +#line 1377 "bison_parser.y" { (yyval.join_type) = kJoinLeft; } -#line 5466 "bison_parser.cpp" +#line 5483 "bison_parser.cpp" break; - case 327: /* opt_join_type: LEFT */ -#line 1366 "bison_parser.y" + case 328: /* opt_join_type: LEFT */ +#line 1378 "bison_parser.y" { (yyval.join_type) = kJoinLeft; } -#line 5472 "bison_parser.cpp" +#line 5489 "bison_parser.cpp" break; - case 328: /* opt_join_type: RIGHT OUTER */ -#line 1367 "bison_parser.y" + case 329: /* opt_join_type: RIGHT OUTER */ +#line 1379 "bison_parser.y" { (yyval.join_type) = kJoinRight; } -#line 5478 "bison_parser.cpp" +#line 5495 "bison_parser.cpp" break; - case 329: /* opt_join_type: RIGHT */ -#line 1368 "bison_parser.y" + case 330: /* opt_join_type: RIGHT */ +#line 1380 "bison_parser.y" { (yyval.join_type) = kJoinRight; } -#line 5484 "bison_parser.cpp" +#line 5501 "bison_parser.cpp" break; - case 330: /* opt_join_type: FULL OUTER */ -#line 1369 "bison_parser.y" + case 331: /* opt_join_type: FULL OUTER */ +#line 1381 "bison_parser.y" { (yyval.join_type) = kJoinFull; } -#line 5490 "bison_parser.cpp" +#line 5507 "bison_parser.cpp" break; - case 331: /* opt_join_type: OUTER */ -#line 1370 "bison_parser.y" + case 332: /* opt_join_type: OUTER */ +#line 1382 "bison_parser.y" { (yyval.join_type) = kJoinFull; } -#line 5496 "bison_parser.cpp" +#line 5513 "bison_parser.cpp" break; - case 332: /* opt_join_type: FULL */ -#line 1371 "bison_parser.y" + case 333: /* opt_join_type: FULL */ +#line 1383 "bison_parser.y" { (yyval.join_type) = kJoinFull; } -#line 5502 "bison_parser.cpp" +#line 5519 "bison_parser.cpp" break; - case 333: /* opt_join_type: CROSS */ -#line 1372 "bison_parser.y" + case 334: /* opt_join_type: CROSS */ +#line 1384 "bison_parser.y" { (yyval.join_type) = kJoinCross; } -#line 5508 "bison_parser.cpp" +#line 5525 "bison_parser.cpp" break; - case 334: /* opt_join_type: %empty */ -#line 1373 "bison_parser.y" + case 335: /* opt_join_type: %empty */ +#line 1385 "bison_parser.y" { (yyval.join_type) = kJoinInner; } -#line 5514 "bison_parser.cpp" +#line 5531 "bison_parser.cpp" break; - case 338: /* ident_commalist: IDENTIFIER */ -#line 1384 "bison_parser.y" + case 339: /* ident_commalist: IDENTIFIER */ +#line 1396 "bison_parser.y" { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 5523 "bison_parser.cpp" +#line 5540 "bison_parser.cpp" break; - case 339: /* ident_commalist: ident_commalist ',' IDENTIFIER */ -#line 1388 "bison_parser.y" + case 340: /* ident_commalist: ident_commalist ',' IDENTIFIER */ +#line 1400 "bison_parser.y" { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 5532 "bison_parser.cpp" +#line 5549 "bison_parser.cpp" break; -#line 5536 "bison_parser.cpp" +#line 5553 "bison_parser.cpp" default: break; } @@ -5761,7 +5778,7 @@ YYLTYPE yylloc = yyloc_default; return yyresult; } -#line 1394 "bison_parser.y" +#line 1406 "bison_parser.y" /********************************* diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 8b9ac9f6..29df7ca0 100644 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -855,6 +855,18 @@ query_expression_body: $$ = $1; } + | query_expression_parens set_operator query_expression_parens + { + $$ = $1; + auto *setOperations = &$1->setOperations; + while (*setOperations != nullptr) { + setOperations = &(*setOperations)->back()->nestedSelectStatement->setOperations; + } + $2->nestedSelectStatement = $3; + *setOperations = new std::vector({$2}); + + $$ = $1; + } ; query_expression_parens: diff --git a/test/queries/queries-good.sql b/test/queries/queries-good.sql index 612d433d..22a42a6b 100755 --- a/test/queries/queries-good.sql +++ b/test/queries/queries-good.sql @@ -18,7 +18,35 @@ SELECT * FROM t WHERE a = ? AND b = ?; SELECT City.name, Product.category, SUM(price) FROM fact INNER JOIN City ON fact.city_id = City.id INNER JOIN Product ON fact.product_id = Product.id GROUP BY City.name, Product.category; SELECT SUBSTR(a, 3, 5) FROM t; SELECT * FROM t WHERE a = DATE '1996-12-31'; -# JOIN +SELECT 1 UNION SELECT 1; +(SELECT 1 UNION SELECT 1); +((SELECT 1 UNION SELECT 1)); +(SELECT 1) UNION SELECT 1; +((SELECT 1)) UNION SELECT 1; +((SELECT 1) UNION SELECT 1); +(((SELECT 1) UNION SELECT 1)); +((SELECT 1)) UNION SELECT 1; +(((SELECT 1)) UNION SELECT 1); +((((SELECT 1)) UNION SELECT 1)); +SELECT 1 UNION (SELECT 1); +(SELECT 1 UNION ((SELECT 1))); +((SELECT 1 UNION ((SELECT 1)))); +SELECT 1 UNION ((SELECT 1)); +(SELECT 1 UNION ((SELECT 1))); +((SELECT 1 UNION ((SELECT 1)))); +(SELECT 1) UNION (SELECT 1); +((SELECT 1) UNION (SELECT 1)); +(((SELECT 1) UNION (SELECT 1))); +((SELECT 1)) UNION (SELECT 1); +(((SELECT 1)) UNION (SELECT 1)); +((((SELECT 1)) UNION (SELECT 1))); +(SELECT 1) UNION ((SELECT 1)); +((SELECT 1) UNION ((SELECT 1))); +(((SELECT 1) UNION ((SELECT 1)))); +((SELECT 1)) UNION ((SELECT 1)); +(((SELECT 1)) UNION ((SELECT 1))); +((((SELECT 1)) UNION ((SELECT 1)))); +# JOIN# JOIN SELECT t1.a, t1.b, t2.c FROM "table" AS t1 JOIN (SELECT * FROM foo JOIN bar ON foo.id = bar.id) t2 ON t1.a = t2.b WHERE (t1.b OR NOT t1.a) AND t2.c = 12.5 SELECT * FROM t1 JOIN t2 ON c1 = c2; SELECT a, SUM(b) FROM t2 GROUP BY a HAVING SUM(b) > 100;