зеркало из https://github.com/github/vitess-gh.git
sqplarser: Limit nesting for all parenthesized exprs
The previous change only handled nesting for one construt. This change extends the limit to all parenthesized constructs.
This commit is contained in:
Родитель
ccf0fcec25
Коммит
9f45f64fe0
|
@ -11,6 +11,6 @@ select * from t where :1 = 2#syntax error at position 24 near :
|
|||
select * from t where :. = 2#syntax error at position 24 near :
|
||||
select * from t where ::1 = 2#syntax error at position 25 near ::
|
||||
select * from t where ::. = 2#syntax error at position 25 near ::
|
||||
select(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(#max nesting level reached at position 409
|
||||
select(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(#syntax error at position 407
|
||||
select(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(#max nesting level reached at position 406
|
||||
select(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(F(#syntax error at position 405
|
||||
select /* aa#syntax error at position 13 near /* aa
|
||||
|
|
|
@ -276,121 +276,126 @@ const yyPrivate = 57344
|
|||
var yyTokenNames []string
|
||||
var yyStates []string
|
||||
|
||||
const yyLast = 580
|
||||
const yyLast = 625
|
||||
|
||||
var yyAct = []int{
|
||||
|
||||
94, 296, 159, 366, 91, 85, 333, 249, 62, 162,
|
||||
92, 199, 288, 240, 80, 210, 63, 179, 90, 161,
|
||||
3, 375, 375, 235, 103, 81, 50, 260, 261, 262,
|
||||
263, 264, 375, 265, 266, 136, 135, 130, 65, 231,
|
||||
294, 70, 64, 130, 73, 130, 346, 53, 77, 187,
|
||||
313, 315, 51, 52, 28, 29, 30, 31, 86, 231,
|
||||
38, 241, 40, 72, 76, 256, 41, 377, 376, 229,
|
||||
120, 68, 317, 43, 135, 44, 124, 49, 374, 128,
|
||||
314, 119, 344, 322, 132, 319, 293, 343, 342, 282,
|
||||
69, 281, 163, 324, 158, 160, 164, 121, 45, 271,
|
||||
123, 46, 47, 48, 230, 232, 234, 241, 350, 286,
|
||||
134, 117, 173, 65, 113, 339, 65, 64, 183, 182,
|
||||
64, 177, 169, 143, 144, 145, 146, 147, 148, 149,
|
||||
150, 219, 181, 86, 205, 183, 148, 149, 150, 71,
|
||||
209, 207, 208, 217, 218, 184, 221, 222, 223, 224,
|
||||
225, 226, 227, 228, 203, 197, 204, 136, 135, 136,
|
||||
135, 289, 115, 212, 252, 127, 59, 341, 233, 307,
|
||||
86, 86, 326, 289, 308, 220, 65, 65, 206, 340,
|
||||
64, 247, 236, 237, 245, 311, 251, 193, 253, 310,
|
||||
238, 309, 305, 115, 244, 248, 320, 306, 143, 144,
|
||||
145, 146, 147, 148, 149, 150, 191, 180, 231, 129,
|
||||
194, 351, 180, 270, 233, 254, 257, 328, 274, 275,
|
||||
283, 272, 116, 75, 361, 111, 203, 202, 114, 213,
|
||||
273, 360, 14, 359, 278, 211, 175, 201, 86, 212,
|
||||
146, 147, 148, 149, 150, 165, 71, 287, 110, 176,
|
||||
279, 171, 258, 285, 291, 130, 295, 115, 292, 170,
|
||||
190, 192, 189, 202, 138, 142, 140, 141, 168, 166,
|
||||
303, 304, 78, 201, 260, 261, 262, 263, 264, 321,
|
||||
265, 266, 66, 203, 203, 154, 155, 156, 157, 325,
|
||||
151, 152, 153, 318, 269, 65, 316, 330, 300, 329,
|
||||
331, 334, 323, 14, 15, 16, 17, 28, 29, 30,
|
||||
31, 268, 139, 143, 144, 145, 146, 147, 148, 149,
|
||||
150, 102, 299, 345, 196, 133, 335, 195, 178, 347,
|
||||
125, 18, 372, 99, 100, 101, 122, 118, 60, 349,
|
||||
79, 233, 71, 356, 355, 358, 74, 112, 357, 348,
|
||||
373, 327, 14, 363, 334, 58, 277, 365, 364, 379,
|
||||
367, 367, 367, 65, 368, 369, 185, 64, 353, 354,
|
||||
126, 370, 56, 97, 54, 243, 380, 297, 102, 338,
|
||||
381, 108, 382, 19, 20, 22, 21, 23, 98, 84,
|
||||
99, 100, 101, 298, 302, 250, 24, 25, 26, 89,
|
||||
337, 180, 214, 106, 215, 216, 61, 378, 362, 14,
|
||||
14, 280, 143, 144, 145, 146, 147, 148, 149, 150,
|
||||
167, 33, 88, 186, 97, 39, 104, 105, 82, 102,
|
||||
255, 188, 108, 109, 42, 67, 246, 174, 371, 98,
|
||||
66, 99, 100, 101, 97, 352, 332, 336, 107, 102,
|
||||
89, 301, 108, 284, 106, 172, 239, 96, 93, 98,
|
||||
66, 99, 100, 101, 32, 95, 290, 242, 137, 14,
|
||||
89, 87, 312, 88, 106, 200, 259, 104, 105, 198,
|
||||
34, 35, 36, 37, 109, 83, 267, 131, 55, 102,
|
||||
27, 57, 108, 88, 13, 12, 11, 104, 105, 107,
|
||||
66, 99, 100, 101, 109, 10, 9, 8, 7, 102,
|
||||
165, 6, 108, 5, 106, 4, 2, 1, 0, 107,
|
||||
66, 99, 100, 101, 0, 0, 0, 0, 0, 0,
|
||||
165, 0, 0, 0, 106, 0, 0, 104, 105, 0,
|
||||
0, 0, 0, 276, 109, 143, 144, 145, 146, 147,
|
||||
148, 149, 150, 0, 0, 0, 0, 104, 105, 107,
|
||||
0, 0, 0, 0, 109, 143, 144, 145, 146, 147,
|
||||
148, 149, 150, 0, 0, 0, 0, 0, 0, 107,
|
||||
94, 163, 160, 366, 229, 333, 90, 91, 250, 62,
|
||||
199, 296, 241, 288, 92, 63, 210, 179, 28, 29,
|
||||
30, 31, 162, 3, 104, 80, 50, 81, 137, 136,
|
||||
375, 131, 230, 261, 262, 263, 264, 265, 65, 266,
|
||||
267, 70, 232, 294, 73, 64, 187, 76, 77, 85,
|
||||
53, 68, 51, 52, 237, 43, 97, 44, 86, 257,
|
||||
344, 103, 230, 38, 109, 40, 324, 125, 230, 41,
|
||||
121, 98, 84, 100, 101, 102, 230, 230, 230, 129,
|
||||
343, 342, 99, 69, 133, 72, 107, 49, 230, 230,
|
||||
45, 242, 164, 46, 47, 48, 165, 122, 313, 315,
|
||||
124, 242, 272, 286, 135, 88, 193, 118, 114, 105,
|
||||
106, 82, 120, 173, 65, 136, 110, 65, 339, 183,
|
||||
182, 64, 169, 177, 64, 191, 71, 289, 314, 194,
|
||||
219, 108, 181, 253, 86, 205, 183, 230, 159, 161,
|
||||
128, 209, 137, 136, 217, 218, 184, 221, 222, 223,
|
||||
224, 225, 226, 227, 228, 203, 197, 326, 307, 204,
|
||||
149, 150, 151, 308, 212, 206, 166, 231, 233, 234,
|
||||
86, 86, 235, 341, 220, 340, 65, 65, 239, 190,
|
||||
192, 189, 311, 64, 248, 246, 207, 208, 254, 137,
|
||||
136, 310, 309, 236, 238, 249, 103, 245, 116, 109,
|
||||
147, 148, 149, 150, 151, 75, 305, 66, 100, 101,
|
||||
102, 306, 271, 273, 234, 255, 258, 99, 275, 276,
|
||||
232, 107, 89, 116, 180, 351, 203, 180, 130, 59,
|
||||
252, 274, 328, 283, 289, 279, 14, 175, 117, 212,
|
||||
86, 280, 99, 282, 105, 106, 28, 29, 30, 31,
|
||||
99, 110, 293, 285, 78, 89, 89, 111, 295, 291,
|
||||
292, 167, 168, 281, 170, 171, 108, 202, 71, 259,
|
||||
303, 304, 116, 202, 131, 213, 317, 99, 319, 176,
|
||||
321, 99, 270, 99, 203, 203, 322, 66, 112, 325,
|
||||
323, 115, 287, 350, 318, 65, 316, 201, 89, 269,
|
||||
331, 334, 329, 89, 89, 134, 211, 330, 144, 145,
|
||||
146, 147, 148, 149, 150, 151, 300, 299, 14, 15,
|
||||
16, 17, 71, 345, 103, 196, 335, 195, 346, 347,
|
||||
178, 126, 123, 119, 89, 89, 100, 101, 102, 60,
|
||||
357, 234, 79, 349, 74, 355, 18, 89, 372, 113,
|
||||
348, 327, 14, 363, 334, 58, 214, 364, 215, 216,
|
||||
367, 367, 367, 65, 368, 369, 373, 365, 201, 278,
|
||||
64, 374, 370, 376, 377, 244, 380, 379, 185, 127,
|
||||
381, 211, 382, 56, 54, 297, 338, 356, 320, 358,
|
||||
144, 145, 146, 147, 148, 149, 150, 151, 19, 20,
|
||||
22, 21, 23, 298, 89, 251, 302, 353, 354, 89,
|
||||
337, 24, 25, 26, 97, 180, 61, 378, 362, 103,
|
||||
14, 33, 109, 186, 39, 256, 201, 201, 188, 98,
|
||||
84, 100, 101, 102, 42, 261, 262, 263, 264, 265,
|
||||
99, 266, 267, 32, 107, 67, 247, 174, 371, 352,
|
||||
14, 144, 145, 146, 147, 148, 149, 150, 151, 34,
|
||||
35, 36, 37, 88, 332, 97, 336, 105, 106, 82,
|
||||
103, 301, 284, 109, 110, 172, 240, 96, 93, 95,
|
||||
98, 66, 100, 101, 102, 290, 243, 138, 87, 108,
|
||||
312, 99, 200, 260, 277, 107, 144, 145, 146, 147,
|
||||
148, 149, 150, 151, 89, 198, 89, 83, 268, 359,
|
||||
360, 361, 97, 14, 88, 132, 55, 103, 105, 106,
|
||||
109, 27, 57, 13, 12, 110, 11, 98, 66, 100,
|
||||
101, 102, 10, 103, 9, 8, 109, 7, 99, 6,
|
||||
108, 5, 107, 4, 66, 100, 101, 102, 2, 1,
|
||||
0, 0, 0, 0, 99, 0, 0, 0, 107, 0,
|
||||
0, 88, 0, 0, 0, 105, 106, 0, 139, 143,
|
||||
141, 142, 110, 144, 145, 146, 147, 148, 149, 150,
|
||||
151, 105, 106, 0, 0, 0, 0, 108, 110, 155,
|
||||
156, 157, 158, 0, 152, 153, 154, 0, 0, 0,
|
||||
0, 0, 0, 108, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 140, 144, 145, 146,
|
||||
147, 148, 149, 150, 151,
|
||||
}
|
||||
var yyPact = []int{
|
||||
|
||||
298, -1000, -1000, 256, -1000, -1000, -1000, -1000, -1000, -1000,
|
||||
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -30,
|
||||
-19, 8, 11, -13, -1000, -1000, -1000, 405, 357, -1000,
|
||||
-1000, -1000, 354, -1000, 326, 302, 397, 246, -24, -1,
|
||||
210, -1000, -27, 210, -1000, 310, -31, 210, -31, 304,
|
||||
-1000, -1000, -1000, -1000, -1000, 353, -1000, 207, 302, 314,
|
||||
36, 302, 138, -1000, 175, -1000, 33, 301, 12, 210,
|
||||
-1000, -1000, 300, -1000, -17, 294, 350, 99, 210, -1000,
|
||||
200, -1000, -1000, 306, 32, 92, 243, -1000, 424, 404,
|
||||
-1000, -1000, -1000, 484, 223, 222, -1000, 213, 205, -1000,
|
||||
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 484,
|
||||
-1000, 203, 246, 292, 391, 246, 484, 210, -1000, 346,
|
||||
-48, -1000, 174, -1000, 291, -1000, -1000, 288, -1000, 191,
|
||||
353, -1000, -1000, 210, 103, 424, 424, 484, 189, 381,
|
||||
484, 484, 106, 484, 484, 484, 484, 484, 484, 484,
|
||||
484, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 243,
|
||||
-32, 3, 4, 243, -1000, 464, 5, 353, 353, -1000,
|
||||
405, 296, -20, 495, 347, 246, 246, 202, -1000, 382,
|
||||
424, -1000, 495, -1000, -1000, -1000, 98, 210, -1000, -28,
|
||||
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 197, 218,
|
||||
275, 227, 21, -1000, -1000, -1000, -1000, -1000, 6, 495,
|
||||
-1000, 464, -1000, -1000, 189, 484, 484, 495, 475, -1000,
|
||||
331, 167, 167, 167, 61, 61, -1000, -1000, -1000, -1000,
|
||||
-1000, 484, -1000, 495, -1000, 353, -10, -12, 165, 26,
|
||||
-1000, 424, 95, 199, 256, 107, -15, -1000, 382, 362,
|
||||
379, 92, 286, -1000, -1000, 262, -1000, 383, 191, 191,
|
||||
-1000, -1000, 136, 113, 135, 133, 129, -14, -1000, 260,
|
||||
-29, 257, -16, -1000, 495, 128, 484, -1000, 495, -18,
|
||||
-1000, -1000, -1000, 296, 9, -1000, 484, 90, -1000, 321,
|
||||
162, -1000, -1000, -1000, 246, 362, -1000, 484, 484, -1000,
|
||||
-1000, 388, 365, 218, 49, -1000, 123, -1000, 111, -1000,
|
||||
-1000, -1000, -1000, -3, -4, -9, -1000, -1000, -1000, -1000,
|
||||
484, 495, -1000, -55, -1000, 495, 484, 318, 199, -1000,
|
||||
-1000, 53, 156, -1000, 342, -1000, 382, 424, 484, 424,
|
||||
-1000, -1000, 187, 185, 178, 495, -1000, 495, 401, -1000,
|
||||
484, 484, -1000, -1000, -1000, 362, 92, 153, 92, 210,
|
||||
210, 210, 246, 495, -1000, 316, -23, -1000, -33, -34,
|
||||
138, -1000, 400, 338, -1000, 210, -1000, -1000, -1000, 210,
|
||||
-1000, 210, -1000,
|
||||
313, -1000, -1000, 195, -1000, -1000, -1000, -1000, -1000, -1000,
|
||||
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -27,
|
||||
-37, 0, 3, -3, -1000, -1000, -1000, 415, 367, -1000,
|
||||
-1000, -1000, 365, -1000, 326, 303, 407, 251, -44, -8,
|
||||
232, -1000, -5, 232, -1000, 308, -48, 232, -48, 306,
|
||||
-1000, -1000, -1000, -1000, -1000, 394, -1000, 216, 303, 316,
|
||||
30, 303, 143, -1000, 191, -1000, 29, 297, 43, 232,
|
||||
-1000, -1000, 296, -1000, -26, 295, 359, 74, 232, -1000,
|
||||
219, -1000, -1000, 286, 26, 122, 547, -1000, 492, 445,
|
||||
-1000, -1000, -1000, 171, 196, 196, -1000, 196, 196, -1000,
|
||||
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
|
||||
171, -1000, 204, 251, 294, 405, 251, 171, 232, -1000,
|
||||
358, -51, -1000, 93, -1000, 291, -1000, -1000, 289, -1000,
|
||||
237, 394, -1000, -1000, 232, 90, 492, 492, 171, 235,
|
||||
335, 171, 171, 105, 171, 171, 171, 171, 171, 171,
|
||||
171, 171, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
|
||||
547, -39, -33, -13, 547, -1000, 508, 36, 394, -1000,
|
||||
415, 299, 10, 503, 347, 251, 251, 217, -1000, 392,
|
||||
492, -1000, 503, -1000, -1000, -1000, 67, 232, -1000, -34,
|
||||
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 214, 379,
|
||||
263, 231, 24, -1000, -1000, -1000, -1000, -1000, 47, 503,
|
||||
-1000, 508, -1000, -1000, 235, 171, 171, 503, 426, -1000,
|
||||
344, 127, 127, 127, 85, 85, -1000, -1000, -1000, -1000,
|
||||
-1000, -1000, 171, -1000, 503, -1000, -24, 394, -24, 178,
|
||||
20, -1000, 492, 61, 196, 195, 168, -12, -1000, 392,
|
||||
370, 389, 122, 281, -1000, -1000, 280, -1000, 395, 237,
|
||||
237, -1000, -1000, 150, 102, 136, 135, 126, 34, -1000,
|
||||
260, -23, 258, -13, -1000, 503, 320, 171, -1000, 503,
|
||||
-1000, -24, -1000, 299, -18, -1000, 171, 75, -1000, 321,
|
||||
177, -1000, -1000, -1000, 251, 370, -1000, 171, 171, -1000,
|
||||
-1000, 398, 372, 379, 52, -1000, 119, -1000, 117, -1000,
|
||||
-1000, -1000, -1000, -10, -11, -31, -1000, -1000, -1000, -1000,
|
||||
171, 503, -1000, -69, -1000, 503, 171, 319, 196, -1000,
|
||||
-1000, 238, 170, -1000, 381, -1000, 392, 492, 171, 492,
|
||||
-1000, -1000, 196, 196, 196, 503, -1000, 503, 411, -1000,
|
||||
171, 171, -1000, -1000, -1000, 370, 122, 165, 122, 232,
|
||||
232, 232, 251, 503, -1000, 332, -25, -1000, -25, -25,
|
||||
143, -1000, 410, 356, -1000, 232, -1000, -1000, -1000, 232,
|
||||
-1000, 232, -1000,
|
||||
}
|
||||
var yyPgo = []int{
|
||||
|
||||
0, 517, 516, 19, 515, 513, 511, 508, 507, 506,
|
||||
505, 496, 495, 494, 464, 491, 490, 488, 14, 25,
|
||||
487, 486, 485, 479, 11, 476, 475, 166, 472, 3,
|
||||
17, 5, 471, 468, 467, 18, 2, 15, 9, 466,
|
||||
10, 465, 24, 458, 4, 457, 456, 13, 455, 453,
|
||||
451, 447, 7, 446, 6, 445, 1, 438, 437, 436,
|
||||
12, 8, 16, 223, 435, 434, 431, 430, 425, 423,
|
||||
0, 26, 421, 420, 411,
|
||||
0, 549, 548, 22, 543, 541, 539, 537, 535, 534,
|
||||
532, 526, 524, 523, 443, 522, 521, 516, 25, 27,
|
||||
515, 508, 507, 505, 10, 493, 492, 229, 490, 3,
|
||||
17, 49, 488, 487, 486, 6, 2, 16, 1, 485,
|
||||
14, 479, 24, 478, 7, 477, 476, 12, 475, 472,
|
||||
471, 466, 8, 464, 5, 449, 11, 448, 447, 446,
|
||||
13, 9, 15, 205, 445, 434, 428, 425, 424, 423,
|
||||
0, 26, 421, 166, 4,
|
||||
}
|
||||
var yyR1 = []int{
|
||||
|
||||
|
@ -450,36 +455,36 @@ var yyChk = []int{
|
|||
-71, -71, -71, -3, 17, -17, 18, -15, 29, -27,
|
||||
36, 9, -61, -62, -44, -70, 36, -64, 95, 91,
|
||||
-70, 36, 90, -70, 36, -63, 95, -70, -63, 36,
|
||||
-18, -19, 75, -22, 36, -31, -36, -32, 69, 46,
|
||||
-35, -44, -40, -43, -70, -41, -45, 20, 35, 37,
|
||||
38, 39, 25, -42, 73, 74, 50, 95, 28, 80,
|
||||
41, -27, 33, 78, -27, 55, 47, 78, 36, 69,
|
||||
-70, -71, 36, -71, 93, 36, 20, 66, -70, 9,
|
||||
55, -20, -70, 19, 78, 68, 67, -33, 21, 69,
|
||||
23, 24, 22, 70, 71, 72, 73, 74, 75, 76,
|
||||
77, 47, 48, 49, 42, 43, 44, 45, -31, -36,
|
||||
-31, -3, -38, -36, -36, 46, 46, -73, 46, -42,
|
||||
46, 46, -48, -36, -58, 33, 46, -61, 36, -30,
|
||||
-18, -19, 75, -22, 36, -31, -36, -32, 69, -73,
|
||||
-35, -44, -40, -43, -70, -41, -45, 20, 35, 46,
|
||||
37, 38, 39, 25, -42, 73, 74, 50, 95, 28,
|
||||
80, 41, -27, 33, 78, -27, 55, 47, 78, 36,
|
||||
69, -70, -71, 36, -71, 93, 36, 20, 66, -70,
|
||||
9, 55, -20, -70, 19, 78, 68, 67, -33, 21,
|
||||
69, 23, 24, 22, 70, 71, 72, 73, 74, 75,
|
||||
76, 77, 47, 48, 49, 42, 43, 44, 45, -31,
|
||||
-36, -31, -3, -38, -36, -36, -73, -73, -73, -42,
|
||||
-73, -73, -48, -36, -58, 33, -73, -61, 36, -30,
|
||||
10, -62, -36, -70, -71, 20, -69, 97, -66, 88,
|
||||
86, 32, 87, 13, 36, 36, 36, -71, -23, -24,
|
||||
-26, 46, 36, -42, -19, -70, 75, -31, -31, -36,
|
||||
-37, 46, -42, 40, 21, 23, 24, -36, -36, 25,
|
||||
69, -36, -36, -36, -36, -36, -36, -36, -36, 101,
|
||||
101, 55, 101, -36, 101, 18, -18, -18, -35, -46,
|
||||
-47, 81, -34, 28, -3, -61, -59, -44, -30, -52,
|
||||
13, -31, 66, -70, -71, -67, 93, -30, 55, -25,
|
||||
56, 57, 58, 59, 60, 62, 63, -21, 36, 19,
|
||||
-24, 78, -38, -37, -36, -36, 68, 25, -36, -18,
|
||||
-74, 101, 101, 55, -49, -47, 83, -31, -60, 66,
|
||||
-39, -40, -60, 101, 55, -52, -56, 15, 14, 36,
|
||||
-26, -73, 36, -42, -19, -70, 75, -31, -31, -36,
|
||||
-37, -73, -42, 40, 21, 23, 24, -36, -36, 25,
|
||||
69, -36, -36, -36, -36, -36, -36, -36, -36, -74,
|
||||
101, -74, 55, -74, -36, -74, -18, 18, -18, -35,
|
||||
-46, -47, 81, -34, 28, -3, -61, -59, -44, -30,
|
||||
-52, 13, -31, 66, -70, -71, -67, 93, -30, 55,
|
||||
-25, 56, 57, 58, 59, 60, 62, 63, -21, 36,
|
||||
19, -24, 78, -38, -37, -36, -36, 68, 25, -36,
|
||||
-74, -18, -74, 55, -49, -47, 83, -31, -60, 66,
|
||||
-39, -40, -60, -74, 55, -52, -56, 15, 14, 36,
|
||||
36, -50, 11, -24, -24, 56, 61, 56, 61, 56,
|
||||
56, 56, -28, 64, 94, 65, 36, 101, 36, 101,
|
||||
68, -36, 101, -35, 84, -36, 82, 30, 55, -44,
|
||||
56, 56, -28, 64, 94, 65, 36, -74, 36, -74,
|
||||
68, -36, -74, -35, 84, -36, 82, 30, 55, -44,
|
||||
-56, -36, -53, -54, -36, -71, -51, 12, 14, 66,
|
||||
56, 56, 91, 91, 91, -36, 101, -36, 31, -40,
|
||||
55, 55, -55, 26, 27, -52, -31, -38, -31, 46,
|
||||
46, 46, 7, -36, -54, -56, -29, -70, -29, -29,
|
||||
-61, -57, 16, 34, 101, 55, 101, 101, 7, 21,
|
||||
56, 56, 91, 91, 91, -36, -74, -36, 31, -40,
|
||||
55, 55, -55, 26, 27, -52, -31, -38, -31, -73,
|
||||
-73, -73, 7, -36, -54, -56, -29, -70, -29, -29,
|
||||
-61, -57, 16, 34, -74, 55, -74, -74, 7, 21,
|
||||
-70, -70, -70,
|
||||
}
|
||||
var yyDef = []int{
|
||||
|
@ -493,26 +498,26 @@ var yyDef = []int{
|
|||
76, 0, 19, 181, 0, 145, 201, 0, 0, 0,
|
||||
204, 201, 0, 204, 0, 0, 0, 0, 0, 30,
|
||||
0, 45, 47, 52, 201, 50, 51, 86, 0, 0,
|
||||
115, 116, 117, 0, 145, 0, 131, 0, 0, 147,
|
||||
148, 149, 150, 180, 134, 135, 136, 132, 133, 138,
|
||||
37, 169, 0, 0, 84, 0, 0, 0, 204, 0,
|
||||
199, 22, 0, 25, 0, 27, 185, 0, 204, 0,
|
||||
0, 48, 53, 0, 0, 0, 0, 0, 0, 0,
|
||||
115, 116, 117, 0, 145, 0, 131, 0, 0, 202,
|
||||
147, 148, 149, 150, 180, 134, 135, 136, 132, 133,
|
||||
138, 37, 169, 0, 0, 84, 0, 0, 0, 204,
|
||||
0, 199, 22, 0, 25, 0, 27, 185, 0, 204,
|
||||
0, 0, 48, 53, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 102, 103, 104, 105, 106, 107, 108, 89, 0,
|
||||
0, 0, 0, 113, 126, 0, 202, 0, 0, 100,
|
||||
0, 0, 102, 103, 104, 105, 106, 107, 108, 89,
|
||||
0, 0, 0, 0, 113, 126, 0, 0, 0, 100,
|
||||
0, 0, 0, 139, 0, 0, 0, 84, 77, 155,
|
||||
0, 182, 183, 146, 20, 187, 0, 0, 204, 195,
|
||||
190, 191, 192, 193, 194, 26, 28, 29, 84, 55,
|
||||
61, 0, 73, 75, 46, 54, 49, 87, 88, 91,
|
||||
92, 0, 110, 111, 0, 0, 0, 94, 0, 98,
|
||||
0, 118, 119, 120, 121, 122, 123, 124, 125, 90,
|
||||
112, 0, 179, 113, 127, 0, 0, 0, 0, 143,
|
||||
140, 0, 173, 0, 176, 173, 0, 171, 155, 163,
|
||||
0, 85, 0, 200, 23, 0, 196, 151, 0, 0,
|
||||
64, 65, 0, 0, 0, 0, 0, 78, 62, 0,
|
||||
0, 0, 0, 93, 95, 0, 0, 99, 114, 0,
|
||||
128, 203, 130, 0, 0, 141, 0, 0, 15, 0,
|
||||
203, 112, 0, 179, 113, 127, 0, 0, 0, 0,
|
||||
143, 140, 0, 173, 0, 176, 173, 0, 171, 155,
|
||||
163, 0, 85, 0, 200, 23, 0, 196, 151, 0,
|
||||
0, 64, 65, 0, 0, 0, 0, 0, 78, 62,
|
||||
0, 0, 0, 0, 93, 95, 0, 0, 99, 114,
|
||||
128, 0, 130, 0, 0, 141, 0, 0, 15, 0,
|
||||
175, 177, 16, 170, 0, 163, 18, 0, 0, 204,
|
||||
24, 153, 0, 56, 59, 66, 0, 68, 0, 70,
|
||||
71, 72, 57, 0, 0, 0, 63, 58, 74, 109,
|
||||
|
|
|
@ -407,7 +407,7 @@ table_expression:
|
|||
{
|
||||
$$ = &AliasedTableExpr{Expr:$1, As: $2, Hints: $3}
|
||||
}
|
||||
| '(' table_expression ')'
|
||||
| openb table_expression closeb
|
||||
{
|
||||
$$ = &ParenTableExpr{Expr: $2}
|
||||
}
|
||||
|
@ -499,15 +499,15 @@ index_hint_list:
|
|||
{
|
||||
$$ = nil
|
||||
}
|
||||
| USE INDEX '(' index_list ')'
|
||||
| USE INDEX openb index_list closeb
|
||||
{
|
||||
$$ = &IndexHints{Type: AST_USE, Indexes: $4}
|
||||
}
|
||||
| IGNORE INDEX '(' index_list ')'
|
||||
| IGNORE INDEX openb index_list closeb
|
||||
{
|
||||
$$ = &IndexHints{Type: AST_IGNORE, Indexes: $4}
|
||||
}
|
||||
| FORCE INDEX '(' index_list ')'
|
||||
| FORCE INDEX openb index_list closeb
|
||||
{
|
||||
$$ = &IndexHints{Type: AST_FORCE, Indexes: $4}
|
||||
}
|
||||
|
@ -545,7 +545,7 @@ boolean_expression:
|
|||
{
|
||||
$$ = &NotExpr{Expr: $2}
|
||||
}
|
||||
| '(' boolean_expression ')'
|
||||
| openb boolean_expression closeb
|
||||
{
|
||||
$$ = &ParenBoolExpr{Expr: $2}
|
||||
}
|
||||
|
@ -591,7 +591,7 @@ condition:
|
|||
{
|
||||
$$ = &ExistsExpr{Subquery: $2}
|
||||
}
|
||||
| KEYRANGE '(' value ',' value ')'
|
||||
| KEYRANGE openb value ',' value closeb
|
||||
{
|
||||
$$ = &KeyrangeExpr{Start: $3, End: $5}
|
||||
}
|
||||
|
@ -627,7 +627,7 @@ compare:
|
|||
}
|
||||
|
||||
col_tuple:
|
||||
'(' value_expression_list ')'
|
||||
openb value_expression_list closeb
|
||||
{
|
||||
$$ = ValTuple($2)
|
||||
}
|
||||
|
@ -641,7 +641,7 @@ col_tuple:
|
|||
}
|
||||
|
||||
subquery:
|
||||
'(' select_statement ')'
|
||||
openb select_statement closeb
|
||||
{
|
||||
$$ = &Subquery{$2}
|
||||
}
|
||||
|
@ -716,7 +716,7 @@ value_expression:
|
|||
$$ = &UnaryExpr{Operator: $1, Expr: $2}
|
||||
}
|
||||
}
|
||||
| sql_id '(' ')'
|
||||
| sql_id openb closeb
|
||||
{
|
||||
$$ = &FuncExpr{Name: $1}
|
||||
}
|
||||
|
@ -724,11 +724,11 @@ value_expression:
|
|||
{
|
||||
$$ = &FuncExpr{Name: $1, Exprs: $3}
|
||||
}
|
||||
| sql_id '(' DISTINCT select_expression_list ')'
|
||||
| sql_id openb DISTINCT select_expression_list closeb
|
||||
{
|
||||
$$ = &FuncExpr{Name: $1, Distinct: true, Exprs: $4}
|
||||
}
|
||||
| keyword_as_func '(' select_expression_list ')'
|
||||
| keyword_as_func openb select_expression_list closeb
|
||||
{
|
||||
$$ = &FuncExpr{Name: $1, Exprs: $3}
|
||||
}
|
||||
|
@ -923,7 +923,7 @@ column_list_opt:
|
|||
{
|
||||
$$ = nil
|
||||
}
|
||||
| '(' column_list ')'
|
||||
| openb column_list closeb
|
||||
{
|
||||
$$ = $2
|
||||
}
|
||||
|
@ -968,7 +968,7 @@ tuple_list:
|
|||
}
|
||||
|
||||
row_tuple:
|
||||
'(' value_expression_list ')'
|
||||
openb value_expression_list closeb
|
||||
{
|
||||
$$ = ValTuple($2)
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче