Support single quotes with string (#24386)

Signed-off-by: cai.zhang <cai.zhang@zilliz.com>
This commit is contained in:
cai.zhang 2023-05-25 15:47:26 +08:00 committed by GitHub
parent 2fdbe7f4c0
commit 6804bda8f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 352 additions and 231 deletions

View File

@ -84,14 +84,16 @@ FloatingConstant:
Identifier: Nondigit (Nondigit | Digit)* | '$meta';
StringLiteral: EncodingPrefix? '"' SCharSequence? '"';
StringLiteral: EncodingPrefix? ('"' DoubleSCharSequence? '"' | '\'' SingleSCharSequence? '\'');
JSONIdentifier: Identifier('[' (StringLiteral | DecimalConstant) ']')+;
fragment EncodingPrefix: 'u8' | 'u' | 'U' | 'L';
fragment SCharSequence: SChar+;
fragment DoubleSCharSequence: DoubleSChar+;
fragment SingleSCharSequence: SingleSChar+;
fragment SChar: ~["\\\r\n] | EscapeSequence | '\\\n' | '\\\r\n';
fragment DoubleSChar: ~["\\\r\n] | EscapeSequence | '\\\n' | '\\\r\n';
fragment SingleSChar: ~['\\\r\n] | EscapeSequence | '\\\n' | '\\\r\n';
fragment Nondigit: [a-zA-Z_];
fragment Digit: [0-9];
fragment BinaryConstant: '0' [bB] [0-1]+;

File diff suppressed because one or more lines are too long

View File

@ -14,7 +14,7 @@ var _ = fmt.Printf
var _ = unicode.IsLetter
var serializedLexerAtn = []uint16{
3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 41, 484,
3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 41, 508,
8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7,
9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12,
4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4,
@ -26,218 +26,230 @@ var serializedLexerAtn = []uint16{
9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9,
49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54,
4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4,
60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 3, 2, 3, 2, 3, 3,
3, 3, 3, 4, 3, 4, 3, 5, 3, 5, 3, 6, 3, 6, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8,
3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3,
12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 5, 13, 162,
10, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14,
3, 14, 3, 14, 3, 14, 5, 14, 176, 10, 14, 3, 15, 3, 15, 3, 16, 3, 16, 3,
17, 3, 17, 3, 18, 3, 18, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21,
3, 21, 3, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 24, 3, 24, 3, 25, 3, 25, 3,
26, 3, 26, 3, 26, 3, 26, 3, 26, 5, 26, 208, 10, 26, 3, 27, 3, 27, 3, 27,
3, 27, 5, 27, 214, 10, 27, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 29, 5,
29, 222, 10, 29, 3, 30, 3, 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31,
3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 7, 32, 237, 10, 32, 12, 32, 14, 32,
240, 11, 32, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3,
60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65,
9, 65, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 3, 5, 3, 5, 3, 6, 3, 6, 3, 7,
3, 7, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11,
3, 11, 3, 12, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3,
13, 3, 13, 5, 13, 166, 10, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14,
3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 5, 14, 180, 10, 14, 3, 15, 3,
15, 3, 16, 3, 16, 3, 17, 3, 17, 3, 18, 3, 18, 3, 19, 3, 19, 3, 20, 3, 20,
3, 20, 3, 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 24, 3,
24, 3, 25, 3, 25, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 5, 26, 212, 10, 26,
3, 27, 3, 27, 3, 27, 3, 27, 5, 27, 218, 10, 27, 3, 28, 3, 28, 3, 29, 3,
29, 3, 29, 3, 29, 5, 29, 226, 10, 29, 3, 30, 3, 30, 3, 30, 3, 31, 3, 31,
3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 7, 32, 241, 10,
32, 12, 32, 14, 32, 244, 11, 32, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, 3,
33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33,
3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 5,
33, 271, 10, 33, 3, 34, 3, 34, 3, 34, 3, 34, 5, 34, 277, 10, 34, 3, 35,
3, 35, 5, 35, 281, 10, 35, 3, 36, 3, 36, 3, 36, 7, 36, 286, 10, 36, 12,
36, 14, 36, 289, 11, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 5, 36, 296,
10, 36, 3, 37, 5, 37, 299, 10, 37, 3, 37, 3, 37, 5, 37, 303, 10, 37, 3,
37, 3, 37, 3, 38, 3, 38, 3, 38, 3, 38, 5, 38, 311, 10, 38, 3, 38, 3, 38,
6, 38, 315, 10, 38, 13, 38, 14, 38, 316, 3, 39, 3, 39, 3, 39, 5, 39, 322,
10, 39, 3, 40, 6, 40, 325, 10, 40, 13, 40, 14, 40, 326, 3, 41, 3, 41, 3,
41, 3, 41, 3, 41, 3, 41, 3, 41, 5, 41, 336, 10, 41, 3, 42, 3, 42, 3, 43,
3, 43, 3, 44, 3, 44, 3, 44, 6, 44, 345, 10, 44, 13, 44, 14, 44, 346, 3,
45, 3, 45, 7, 45, 351, 10, 45, 12, 45, 14, 45, 354, 11, 45, 3, 45, 5, 45,
357, 10, 45, 3, 46, 3, 46, 7, 46, 361, 10, 46, 12, 46, 14, 46, 364, 11,
46, 3, 47, 3, 47, 3, 47, 3, 47, 3, 48, 3, 48, 3, 49, 3, 49, 3, 50, 3, 50,
3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3,
52, 3, 52, 3, 52, 3, 52, 3, 52, 5, 52, 391, 10, 52, 3, 53, 3, 53, 5, 53,
395, 10, 53, 3, 53, 3, 53, 3, 53, 5, 53, 400, 10, 53, 3, 54, 3, 54, 3,
54, 3, 54, 5, 54, 406, 10, 54, 3, 54, 3, 54, 3, 55, 5, 55, 411, 10, 55,
3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 5, 55, 418, 10, 55, 3, 56, 3, 56, 5,
56, 422, 10, 56, 3, 56, 3, 56, 3, 57, 6, 57, 427, 10, 57, 13, 57, 14, 57,
428, 3, 58, 5, 58, 432, 10, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 5, 58,
439, 10, 58, 3, 59, 6, 59, 442, 10, 59, 13, 59, 14, 59, 443, 3, 60, 3,
60, 5, 60, 448, 10, 60, 3, 60, 3, 60, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61,
5, 61, 457, 10, 61, 3, 61, 5, 61, 460, 10, 61, 3, 61, 3, 61, 3, 61, 3,
61, 3, 61, 5, 61, 467, 10, 61, 3, 62, 6, 62, 470, 10, 62, 13, 62, 14, 62,
471, 3, 62, 3, 62, 3, 63, 3, 63, 5, 63, 478, 10, 63, 3, 63, 5, 63, 481,
10, 63, 3, 63, 3, 63, 2, 2, 64, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15,
9, 17, 10, 19, 11, 21, 12, 23, 13, 25, 14, 27, 15, 29, 16, 31, 17, 33,
18, 35, 19, 37, 20, 39, 21, 41, 22, 43, 23, 45, 24, 47, 25, 49, 26, 51,
27, 53, 28, 55, 29, 57, 30, 59, 31, 61, 32, 63, 33, 65, 34, 67, 35, 69,
36, 71, 37, 73, 38, 75, 39, 77, 2, 79, 2, 81, 2, 83, 2, 85, 2, 87, 2, 89,
2, 91, 2, 93, 2, 95, 2, 97, 2, 99, 2, 101, 2, 103, 2, 105, 2, 107, 2, 109,
2, 111, 2, 113, 2, 115, 2, 117, 2, 119, 2, 121, 2, 123, 40, 125, 41, 3,
2, 17, 5, 2, 78, 78, 87, 87, 119, 119, 6, 2, 12, 12, 15, 15, 36, 36, 94,
94, 5, 2, 67, 92, 97, 97, 99, 124, 3, 2, 50, 59, 4, 2, 68, 68, 100, 100,
3, 2, 50, 51, 4, 2, 90, 90, 122, 122, 3, 2, 51, 59, 3, 2, 50, 57, 5, 2,
50, 59, 67, 72, 99, 104, 4, 2, 71, 71, 103, 103, 4, 2, 45, 45, 47, 47,
4, 2, 82, 82, 114, 114, 12, 2, 36, 36, 41, 41, 65, 65, 94, 94, 99, 100,
104, 104, 112, 112, 116, 116, 118, 118, 120, 120, 4, 2, 11, 11, 34, 34,
2, 512, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3,
2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17,
3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2,
25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2,
2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2,
2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2,
2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, 3,
2, 2, 2, 2, 57, 3, 2, 2, 2, 2, 59, 3, 2, 2, 2, 2, 61, 3, 2, 2, 2, 2, 63,
3, 2, 2, 2, 2, 65, 3, 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, 2,
71, 3, 2, 2, 2, 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 2, 123, 3, 2, 2,
2, 2, 125, 3, 2, 2, 2, 3, 127, 3, 2, 2, 2, 5, 129, 3, 2, 2, 2, 7, 131,
3, 2, 2, 2, 9, 133, 3, 2, 2, 2, 11, 135, 3, 2, 2, 2, 13, 137, 3, 2, 2,
2, 15, 139, 3, 2, 2, 2, 17, 142, 3, 2, 2, 2, 19, 144, 3, 2, 2, 2, 21, 147,
3, 2, 2, 2, 23, 150, 3, 2, 2, 2, 25, 161, 3, 2, 2, 2, 27, 175, 3, 2, 2,
2, 29, 177, 3, 2, 2, 2, 31, 179, 3, 2, 2, 2, 33, 181, 3, 2, 2, 2, 35, 183,
3, 2, 2, 2, 37, 185, 3, 2, 2, 2, 39, 187, 3, 2, 2, 2, 41, 190, 3, 2, 2,
2, 43, 193, 3, 2, 2, 2, 45, 196, 3, 2, 2, 2, 47, 198, 3, 2, 2, 2, 49, 200,
3, 2, 2, 2, 51, 207, 3, 2, 2, 2, 53, 213, 3, 2, 2, 2, 55, 215, 3, 2, 2,
2, 57, 221, 3, 2, 2, 2, 59, 223, 3, 2, 2, 2, 61, 226, 3, 2, 2, 2, 63, 233,
3, 2, 2, 2, 65, 270, 3, 2, 2, 2, 67, 276, 3, 2, 2, 2, 69, 280, 3, 2, 2,
2, 71, 295, 3, 2, 2, 2, 73, 298, 3, 2, 2, 2, 75, 306, 3, 2, 2, 2, 77, 321,
3, 2, 2, 2, 79, 324, 3, 2, 2, 2, 81, 335, 3, 2, 2, 2, 83, 337, 3, 2, 2,
2, 85, 339, 3, 2, 2, 2, 87, 341, 3, 2, 2, 2, 89, 356, 3, 2, 2, 2, 91, 358,
3, 2, 2, 2, 93, 365, 3, 2, 2, 2, 95, 369, 3, 2, 2, 2, 97, 371, 3, 2, 2,
2, 99, 373, 3, 2, 2, 2, 101, 375, 3, 2, 2, 2, 103, 390, 3, 2, 2, 2, 105,
399, 3, 2, 2, 2, 107, 401, 3, 2, 2, 2, 109, 417, 3, 2, 2, 2, 111, 419,
3, 2, 2, 2, 113, 426, 3, 2, 2, 2, 115, 438, 3, 2, 2, 2, 117, 441, 3, 2,
2, 2, 119, 445, 3, 2, 2, 2, 121, 466, 3, 2, 2, 2, 123, 469, 3, 2, 2, 2,
125, 480, 3, 2, 2, 2, 127, 128, 7, 42, 2, 2, 128, 4, 3, 2, 2, 2, 129, 130,
7, 43, 2, 2, 130, 6, 3, 2, 2, 2, 131, 132, 7, 93, 2, 2, 132, 8, 3, 2, 2,
2, 133, 134, 7, 46, 2, 2, 134, 10, 3, 2, 2, 2, 135, 136, 7, 95, 2, 2, 136,
12, 3, 2, 2, 2, 137, 138, 7, 62, 2, 2, 138, 14, 3, 2, 2, 2, 139, 140, 7,
62, 2, 2, 140, 141, 7, 63, 2, 2, 141, 16, 3, 2, 2, 2, 142, 143, 7, 64,
2, 2, 143, 18, 3, 2, 2, 2, 144, 145, 7, 64, 2, 2, 145, 146, 7, 63, 2, 2,
146, 20, 3, 2, 2, 2, 147, 148, 7, 63, 2, 2, 148, 149, 7, 63, 2, 2, 149,
22, 3, 2, 2, 2, 150, 151, 7, 35, 2, 2, 151, 152, 7, 63, 2, 2, 152, 24,
3, 2, 2, 2, 153, 154, 7, 110, 2, 2, 154, 155, 7, 107, 2, 2, 155, 156, 7,
109, 2, 2, 156, 162, 7, 103, 2, 2, 157, 158, 7, 78, 2, 2, 158, 159, 7,
75, 2, 2, 159, 160, 7, 77, 2, 2, 160, 162, 7, 71, 2, 2, 161, 153, 3, 2,
2, 2, 161, 157, 3, 2, 2, 2, 162, 26, 3, 2, 2, 2, 163, 164, 7, 103, 2, 2,
164, 165, 7, 122, 2, 2, 165, 166, 7, 107, 2, 2, 166, 167, 7, 117, 2, 2,
167, 168, 7, 118, 2, 2, 168, 176, 7, 117, 2, 2, 169, 170, 7, 71, 2, 2,
170, 171, 7, 90, 2, 2, 171, 172, 7, 75, 2, 2, 172, 173, 7, 85, 2, 2, 173,
174, 7, 86, 2, 2, 174, 176, 7, 85, 2, 2, 175, 163, 3, 2, 2, 2, 175, 169,
3, 2, 2, 2, 176, 28, 3, 2, 2, 2, 177, 178, 7, 45, 2, 2, 178, 30, 3, 2,
2, 2, 179, 180, 7, 47, 2, 2, 180, 32, 3, 2, 2, 2, 181, 182, 7, 44, 2, 2,
182, 34, 3, 2, 2, 2, 183, 184, 7, 49, 2, 2, 184, 36, 3, 2, 2, 2, 185, 186,
7, 39, 2, 2, 186, 38, 3, 2, 2, 2, 187, 188, 7, 44, 2, 2, 188, 189, 7, 44,
2, 2, 189, 40, 3, 2, 2, 2, 190, 191, 7, 62, 2, 2, 191, 192, 7, 62, 2, 2,
192, 42, 3, 2, 2, 2, 193, 194, 7, 64, 2, 2, 194, 195, 7, 64, 2, 2, 195,
44, 3, 2, 2, 2, 196, 197, 7, 40, 2, 2, 197, 46, 3, 2, 2, 2, 198, 199, 7,
126, 2, 2, 199, 48, 3, 2, 2, 2, 200, 201, 7, 96, 2, 2, 201, 50, 3, 2, 2,
2, 202, 203, 7, 40, 2, 2, 203, 208, 7, 40, 2, 2, 204, 205, 7, 99, 2, 2,
205, 206, 7, 112, 2, 2, 206, 208, 7, 102, 2, 2, 207, 202, 3, 2, 2, 2, 207,
204, 3, 2, 2, 2, 208, 52, 3, 2, 2, 2, 209, 210, 7, 126, 2, 2, 210, 214,
7, 126, 2, 2, 211, 212, 7, 113, 2, 2, 212, 214, 7, 116, 2, 2, 213, 209,
3, 2, 2, 2, 213, 211, 3, 2, 2, 2, 214, 54, 3, 2, 2, 2, 215, 216, 7, 128,
2, 2, 216, 56, 3, 2, 2, 2, 217, 222, 7, 35, 2, 2, 218, 219, 7, 112, 2,
2, 219, 220, 7, 113, 2, 2, 220, 222, 7, 118, 2, 2, 221, 217, 3, 2, 2, 2,
221, 218, 3, 2, 2, 2, 222, 58, 3, 2, 2, 2, 223, 224, 7, 107, 2, 2, 224,
225, 7, 112, 2, 2, 225, 60, 3, 2, 2, 2, 226, 227, 7, 112, 2, 2, 227, 228,
7, 113, 2, 2, 228, 229, 7, 118, 2, 2, 229, 230, 7, 34, 2, 2, 230, 231,
7, 107, 2, 2, 231, 232, 7, 112, 2, 2, 232, 62, 3, 2, 2, 2, 233, 238, 7,
93, 2, 2, 234, 237, 5, 123, 62, 2, 235, 237, 5, 125, 63, 2, 236, 234, 3,
2, 2, 2, 236, 235, 3, 2, 2, 2, 237, 240, 3, 2, 2, 2, 238, 236, 3, 2, 2,
2, 238, 239, 3, 2, 2, 2, 239, 241, 3, 2, 2, 2, 240, 238, 3, 2, 2, 2, 241,
242, 7, 95, 2, 2, 242, 64, 3, 2, 2, 2, 243, 244, 7, 118, 2, 2, 244, 245,
7, 116, 2, 2, 245, 246, 7, 119, 2, 2, 246, 271, 7, 103, 2, 2, 247, 248,
7, 86, 2, 2, 248, 249, 7, 116, 2, 2, 249, 250, 7, 119, 2, 2, 250, 271,
7, 103, 2, 2, 251, 252, 7, 86, 2, 2, 252, 253, 7, 84, 2, 2, 253, 254, 7,
87, 2, 2, 254, 271, 7, 71, 2, 2, 255, 256, 7, 104, 2, 2, 256, 257, 7, 99,
2, 2, 257, 258, 7, 110, 2, 2, 258, 259, 7, 117, 2, 2, 259, 271, 7, 103,
2, 2, 260, 261, 7, 72, 2, 2, 261, 262, 7, 99, 2, 2, 262, 263, 7, 110, 2,
2, 263, 264, 7, 117, 2, 2, 264, 271, 7, 103, 2, 2, 265, 266, 7, 72, 2,
2, 266, 267, 7, 67, 2, 2, 267, 268, 7, 78, 2, 2, 268, 269, 7, 85, 2, 2,
269, 271, 7, 71, 2, 2, 270, 243, 3, 2, 2, 2, 270, 247, 3, 2, 2, 2, 270,
251, 3, 2, 2, 2, 270, 255, 3, 2, 2, 2, 270, 260, 3, 2, 2, 2, 270, 265,
3, 2, 2, 2, 271, 66, 3, 2, 2, 2, 272, 277, 5, 89, 45, 2, 273, 277, 5, 91,
46, 2, 274, 277, 5, 93, 47, 2, 275, 277, 5, 87, 44, 2, 276, 272, 3, 2,
2, 2, 276, 273, 3, 2, 2, 2, 276, 274, 3, 2, 2, 2, 276, 275, 3, 2, 2, 2,
277, 68, 3, 2, 2, 2, 278, 281, 5, 105, 53, 2, 279, 281, 5, 107, 54, 2,
280, 278, 3, 2, 2, 2, 280, 279, 3, 2, 2, 2, 281, 70, 3, 2, 2, 2, 282, 287,
5, 83, 42, 2, 283, 286, 5, 83, 42, 2, 284, 286, 5, 85, 43, 2, 285, 283,
3, 2, 2, 2, 285, 284, 3, 2, 2, 2, 286, 289, 3, 2, 2, 2, 287, 285, 3, 2,
2, 2, 287, 288, 3, 2, 2, 2, 288, 296, 3, 2, 2, 2, 289, 287, 3, 2, 2, 2,
290, 291, 7, 38, 2, 2, 291, 292, 7, 111, 2, 2, 292, 293, 7, 103, 2, 2,
293, 294, 7, 118, 2, 2, 294, 296, 7, 99, 2, 2, 295, 282, 3, 2, 2, 2, 295,
290, 3, 2, 2, 2, 296, 72, 3, 2, 2, 2, 297, 299, 5, 77, 39, 2, 298, 297,
3, 2, 2, 2, 298, 299, 3, 2, 2, 2, 299, 300, 3, 2, 2, 2, 300, 302, 7, 36,
2, 2, 301, 303, 5, 79, 40, 2, 302, 301, 3, 2, 2, 2, 302, 303, 3, 2, 2,
2, 303, 304, 3, 2, 2, 2, 304, 305, 7, 36, 2, 2, 305, 74, 3, 2, 2, 2, 306,
314, 5, 71, 36, 2, 307, 310, 7, 93, 2, 2, 308, 311, 5, 73, 37, 2, 309,
311, 5, 89, 45, 2, 310, 308, 3, 2, 2, 2, 310, 309, 3, 2, 2, 2, 311, 312,
3, 2, 2, 2, 312, 313, 7, 95, 2, 2, 313, 315, 3, 2, 2, 2, 314, 307, 3, 2,
2, 2, 315, 316, 3, 2, 2, 2, 316, 314, 3, 2, 2, 2, 316, 317, 3, 2, 2, 2,
317, 76, 3, 2, 2, 2, 318, 319, 7, 119, 2, 2, 319, 322, 7, 58, 2, 2, 320,
322, 9, 2, 2, 2, 321, 318, 3, 2, 2, 2, 321, 320, 3, 2, 2, 2, 322, 78, 3,
2, 2, 2, 323, 325, 5, 81, 41, 2, 324, 323, 3, 2, 2, 2, 325, 326, 3, 2,
2, 2, 326, 324, 3, 2, 2, 2, 326, 327, 3, 2, 2, 2, 327, 80, 3, 2, 2, 2,
328, 336, 10, 3, 2, 2, 329, 336, 5, 121, 61, 2, 330, 331, 7, 94, 2, 2,
331, 336, 7, 12, 2, 2, 332, 333, 7, 94, 2, 2, 333, 334, 7, 15, 2, 2, 334,
336, 7, 12, 2, 2, 335, 328, 3, 2, 2, 2, 335, 329, 3, 2, 2, 2, 335, 330,
3, 2, 2, 2, 335, 332, 3, 2, 2, 2, 336, 82, 3, 2, 2, 2, 337, 338, 9, 4,
2, 2, 338, 84, 3, 2, 2, 2, 339, 340, 9, 5, 2, 2, 340, 86, 3, 2, 2, 2, 341,
342, 7, 50, 2, 2, 342, 344, 9, 6, 2, 2, 343, 345, 9, 7, 2, 2, 344, 343,
3, 2, 2, 2, 345, 346, 3, 2, 2, 2, 346, 344, 3, 2, 2, 2, 346, 347, 3, 2,
2, 2, 347, 88, 3, 2, 2, 2, 348, 352, 5, 95, 48, 2, 349, 351, 5, 85, 43,
2, 350, 349, 3, 2, 2, 2, 351, 354, 3, 2, 2, 2, 352, 350, 3, 2, 2, 2, 352,
353, 3, 2, 2, 2, 353, 357, 3, 2, 2, 2, 354, 352, 3, 2, 2, 2, 355, 357,
7, 50, 2, 2, 356, 348, 3, 2, 2, 2, 356, 355, 3, 2, 2, 2, 357, 90, 3, 2,
2, 2, 358, 362, 7, 50, 2, 2, 359, 361, 5, 97, 49, 2, 360, 359, 3, 2, 2,
2, 361, 364, 3, 2, 2, 2, 362, 360, 3, 2, 2, 2, 362, 363, 3, 2, 2, 2, 363,
92, 3, 2, 2, 2, 364, 362, 3, 2, 2, 2, 365, 366, 7, 50, 2, 2, 366, 367,
9, 8, 2, 2, 367, 368, 5, 117, 59, 2, 368, 94, 3, 2, 2, 2, 369, 370, 9,
9, 2, 2, 370, 96, 3, 2, 2, 2, 371, 372, 9, 10, 2, 2, 372, 98, 3, 2, 2,
2, 373, 374, 9, 11, 2, 2, 374, 100, 3, 2, 2, 2, 375, 376, 5, 99, 50, 2,
376, 377, 5, 99, 50, 2, 377, 378, 5, 99, 50, 2, 378, 379, 5, 99, 50, 2,
379, 102, 3, 2, 2, 2, 380, 381, 7, 94, 2, 2, 381, 382, 7, 119, 2, 2, 382,
383, 3, 2, 2, 2, 383, 391, 5, 101, 51, 2, 384, 385, 7, 94, 2, 2, 385, 386,
7, 87, 2, 2, 386, 387, 3, 2, 2, 2, 387, 388, 5, 101, 51, 2, 388, 389, 5,
101, 51, 2, 389, 391, 3, 2, 2, 2, 390, 380, 3, 2, 2, 2, 390, 384, 3, 2,
2, 2, 391, 104, 3, 2, 2, 2, 392, 394, 5, 109, 55, 2, 393, 395, 5, 111,
56, 2, 394, 393, 3, 2, 2, 2, 394, 395, 3, 2, 2, 2, 395, 400, 3, 2, 2, 2,
396, 397, 5, 113, 57, 2, 397, 398, 5, 111, 56, 2, 398, 400, 3, 2, 2, 2,
399, 392, 3, 2, 2, 2, 399, 396, 3, 2, 2, 2, 400, 106, 3, 2, 2, 2, 401,
402, 7, 50, 2, 2, 402, 405, 9, 8, 2, 2, 403, 406, 5, 115, 58, 2, 404, 406,
5, 117, 59, 2, 405, 403, 3, 2, 2, 2, 405, 404, 3, 2, 2, 2, 406, 407, 3,
2, 2, 2, 407, 408, 5, 119, 60, 2, 408, 108, 3, 2, 2, 2, 409, 411, 5, 113,
57, 2, 410, 409, 3, 2, 2, 2, 410, 411, 3, 2, 2, 2, 411, 412, 3, 2, 2, 2,
412, 413, 7, 48, 2, 2, 413, 418, 5, 113, 57, 2, 414, 415, 5, 113, 57, 2,
415, 416, 7, 48, 2, 2, 416, 418, 3, 2, 2, 2, 417, 410, 3, 2, 2, 2, 417,
414, 3, 2, 2, 2, 418, 110, 3, 2, 2, 2, 419, 421, 9, 12, 2, 2, 420, 422,
9, 13, 2, 2, 421, 420, 3, 2, 2, 2, 421, 422, 3, 2, 2, 2, 422, 423, 3, 2,
2, 2, 423, 424, 5, 113, 57, 2, 424, 112, 3, 2, 2, 2, 425, 427, 5, 85, 43,
2, 426, 425, 3, 2, 2, 2, 427, 428, 3, 2, 2, 2, 428, 426, 3, 2, 2, 2, 428,
429, 3, 2, 2, 2, 429, 114, 3, 2, 2, 2, 430, 432, 5, 117, 59, 2, 431, 430,
3, 2, 2, 2, 431, 432, 3, 2, 2, 2, 432, 433, 3, 2, 2, 2, 433, 434, 7, 48,
2, 2, 434, 439, 5, 117, 59, 2, 435, 436, 5, 117, 59, 2, 436, 437, 7, 48,
2, 2, 437, 439, 3, 2, 2, 2, 438, 431, 3, 2, 2, 2, 438, 435, 3, 2, 2, 2,
439, 116, 3, 2, 2, 2, 440, 442, 5, 99, 50, 2, 441, 440, 3, 2, 2, 2, 442,
443, 3, 2, 2, 2, 443, 441, 3, 2, 2, 2, 443, 444, 3, 2, 2, 2, 444, 118,
3, 2, 2, 2, 445, 447, 9, 14, 2, 2, 446, 448, 9, 13, 2, 2, 447, 446, 3,
2, 2, 2, 447, 448, 3, 2, 2, 2, 448, 449, 3, 2, 2, 2, 449, 450, 5, 113,
57, 2, 450, 120, 3, 2, 2, 2, 451, 452, 7, 94, 2, 2, 452, 467, 9, 15, 2,
2, 453, 454, 7, 94, 2, 2, 454, 456, 5, 97, 49, 2, 455, 457, 5, 97, 49,
2, 456, 455, 3, 2, 2, 2, 456, 457, 3, 2, 2, 2, 457, 459, 3, 2, 2, 2, 458,
460, 5, 97, 49, 2, 459, 458, 3, 2, 2, 2, 459, 460, 3, 2, 2, 2, 460, 467,
3, 2, 2, 2, 461, 462, 7, 94, 2, 2, 462, 463, 7, 122, 2, 2, 463, 464, 3,
2, 2, 2, 464, 467, 5, 117, 59, 2, 465, 467, 5, 103, 52, 2, 466, 451, 3,
2, 2, 2, 466, 453, 3, 2, 2, 2, 466, 461, 3, 2, 2, 2, 466, 465, 3, 2, 2,
2, 467, 122, 3, 2, 2, 2, 468, 470, 9, 16, 2, 2, 469, 468, 3, 2, 2, 2, 470,
471, 3, 2, 2, 2, 471, 469, 3, 2, 2, 2, 471, 472, 3, 2, 2, 2, 472, 473,
3, 2, 2, 2, 473, 474, 8, 62, 2, 2, 474, 124, 3, 2, 2, 2, 475, 477, 7, 15,
2, 2, 476, 478, 7, 12, 2, 2, 477, 476, 3, 2, 2, 2, 477, 478, 3, 2, 2, 2,
478, 481, 3, 2, 2, 2, 479, 481, 7, 12, 2, 2, 480, 475, 3, 2, 2, 2, 480,
479, 3, 2, 2, 2, 481, 482, 3, 2, 2, 2, 482, 483, 8, 63, 2, 2, 483, 126,
3, 2, 2, 2, 45, 2, 161, 175, 207, 213, 221, 236, 238, 270, 276, 280, 285,
287, 295, 298, 302, 310, 316, 321, 326, 335, 346, 352, 356, 362, 390, 394,
399, 405, 410, 417, 421, 428, 431, 438, 443, 447, 456, 459, 466, 471, 477,
480, 3, 8, 2, 2,
3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3,
33, 3, 33, 3, 33, 5, 33, 275, 10, 33, 3, 34, 3, 34, 3, 34, 3, 34, 5, 34,
281, 10, 34, 3, 35, 3, 35, 5, 35, 285, 10, 35, 3, 36, 3, 36, 3, 36, 7,
36, 290, 10, 36, 12, 36, 14, 36, 293, 11, 36, 3, 36, 3, 36, 3, 36, 3, 36,
3, 36, 5, 36, 300, 10, 36, 3, 37, 5, 37, 303, 10, 37, 3, 37, 3, 37, 5,
37, 307, 10, 37, 3, 37, 3, 37, 3, 37, 5, 37, 312, 10, 37, 3, 37, 5, 37,
315, 10, 37, 3, 38, 3, 38, 3, 38, 3, 38, 5, 38, 321, 10, 38, 3, 38, 3,
38, 6, 38, 325, 10, 38, 13, 38, 14, 38, 326, 3, 39, 3, 39, 3, 39, 5, 39,
332, 10, 39, 3, 40, 6, 40, 335, 10, 40, 13, 40, 14, 40, 336, 3, 41, 6,
41, 340, 10, 41, 13, 41, 14, 41, 341, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42,
3, 42, 3, 42, 5, 42, 351, 10, 42, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3,
43, 3, 43, 5, 43, 360, 10, 43, 3, 44, 3, 44, 3, 45, 3, 45, 3, 46, 3, 46,
3, 46, 6, 46, 369, 10, 46, 13, 46, 14, 46, 370, 3, 47, 3, 47, 7, 47, 375,
10, 47, 12, 47, 14, 47, 378, 11, 47, 3, 47, 5, 47, 381, 10, 47, 3, 48,
3, 48, 7, 48, 385, 10, 48, 12, 48, 14, 48, 388, 11, 48, 3, 49, 3, 49, 3,
49, 3, 49, 3, 50, 3, 50, 3, 51, 3, 51, 3, 52, 3, 52, 3, 53, 3, 53, 3, 53,
3, 53, 3, 53, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3,
54, 3, 54, 5, 54, 415, 10, 54, 3, 55, 3, 55, 5, 55, 419, 10, 55, 3, 55,
3, 55, 3, 55, 5, 55, 424, 10, 55, 3, 56, 3, 56, 3, 56, 3, 56, 5, 56, 430,
10, 56, 3, 56, 3, 56, 3, 57, 5, 57, 435, 10, 57, 3, 57, 3, 57, 3, 57, 3,
57, 3, 57, 5, 57, 442, 10, 57, 3, 58, 3, 58, 5, 58, 446, 10, 58, 3, 58,
3, 58, 3, 59, 6, 59, 451, 10, 59, 13, 59, 14, 59, 452, 3, 60, 5, 60, 456,
10, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 5, 60, 463, 10, 60, 3, 61, 6,
61, 466, 10, 61, 13, 61, 14, 61, 467, 3, 62, 3, 62, 5, 62, 472, 10, 62,
3, 62, 3, 62, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 5, 63, 481, 10, 63, 3,
63, 5, 63, 484, 10, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 5, 63, 491,
10, 63, 3, 64, 6, 64, 494, 10, 64, 13, 64, 14, 64, 495, 3, 64, 3, 64, 3,
65, 3, 65, 5, 65, 502, 10, 65, 3, 65, 5, 65, 505, 10, 65, 3, 65, 3, 65,
2, 2, 66, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11,
21, 12, 23, 13, 25, 14, 27, 15, 29, 16, 31, 17, 33, 18, 35, 19, 37, 20,
39, 21, 41, 22, 43, 23, 45, 24, 47, 25, 49, 26, 51, 27, 53, 28, 55, 29,
57, 30, 59, 31, 61, 32, 63, 33, 65, 34, 67, 35, 69, 36, 71, 37, 73, 38,
75, 39, 77, 2, 79, 2, 81, 2, 83, 2, 85, 2, 87, 2, 89, 2, 91, 2, 93, 2,
95, 2, 97, 2, 99, 2, 101, 2, 103, 2, 105, 2, 107, 2, 109, 2, 111, 2, 113,
2, 115, 2, 117, 2, 119, 2, 121, 2, 123, 2, 125, 2, 127, 40, 129, 41, 3,
2, 18, 5, 2, 78, 78, 87, 87, 119, 119, 6, 2, 12, 12, 15, 15, 36, 36, 94,
94, 6, 2, 12, 12, 15, 15, 41, 41, 94, 94, 5, 2, 67, 92, 97, 97, 99, 124,
3, 2, 50, 59, 4, 2, 68, 68, 100, 100, 3, 2, 50, 51, 4, 2, 90, 90, 122,
122, 3, 2, 51, 59, 3, 2, 50, 57, 5, 2, 50, 59, 67, 72, 99, 104, 4, 2, 71,
71, 103, 103, 4, 2, 45, 45, 47, 47, 4, 2, 82, 82, 114, 114, 12, 2, 36,
36, 41, 41, 65, 65, 94, 94, 99, 100, 104, 104, 112, 112, 116, 116, 118,
118, 120, 120, 4, 2, 11, 11, 34, 34, 2, 540, 2, 3, 3, 2, 2, 2, 2, 5, 3,
2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13,
3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2,
21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2,
2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2,
2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2,
2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3,
2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, 3, 2, 2, 2, 2, 57, 3, 2, 2, 2, 2, 59,
3, 2, 2, 2, 2, 61, 3, 2, 2, 2, 2, 63, 3, 2, 2, 2, 2, 65, 3, 2, 2, 2, 2,
67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, 2, 71, 3, 2, 2, 2, 2, 73, 3, 2, 2, 2,
2, 75, 3, 2, 2, 2, 2, 127, 3, 2, 2, 2, 2, 129, 3, 2, 2, 2, 3, 131, 3, 2,
2, 2, 5, 133, 3, 2, 2, 2, 7, 135, 3, 2, 2, 2, 9, 137, 3, 2, 2, 2, 11, 139,
3, 2, 2, 2, 13, 141, 3, 2, 2, 2, 15, 143, 3, 2, 2, 2, 17, 146, 3, 2, 2,
2, 19, 148, 3, 2, 2, 2, 21, 151, 3, 2, 2, 2, 23, 154, 3, 2, 2, 2, 25, 165,
3, 2, 2, 2, 27, 179, 3, 2, 2, 2, 29, 181, 3, 2, 2, 2, 31, 183, 3, 2, 2,
2, 33, 185, 3, 2, 2, 2, 35, 187, 3, 2, 2, 2, 37, 189, 3, 2, 2, 2, 39, 191,
3, 2, 2, 2, 41, 194, 3, 2, 2, 2, 43, 197, 3, 2, 2, 2, 45, 200, 3, 2, 2,
2, 47, 202, 3, 2, 2, 2, 49, 204, 3, 2, 2, 2, 51, 211, 3, 2, 2, 2, 53, 217,
3, 2, 2, 2, 55, 219, 3, 2, 2, 2, 57, 225, 3, 2, 2, 2, 59, 227, 3, 2, 2,
2, 61, 230, 3, 2, 2, 2, 63, 237, 3, 2, 2, 2, 65, 274, 3, 2, 2, 2, 67, 280,
3, 2, 2, 2, 69, 284, 3, 2, 2, 2, 71, 299, 3, 2, 2, 2, 73, 302, 3, 2, 2,
2, 75, 316, 3, 2, 2, 2, 77, 331, 3, 2, 2, 2, 79, 334, 3, 2, 2, 2, 81, 339,
3, 2, 2, 2, 83, 350, 3, 2, 2, 2, 85, 359, 3, 2, 2, 2, 87, 361, 3, 2, 2,
2, 89, 363, 3, 2, 2, 2, 91, 365, 3, 2, 2, 2, 93, 380, 3, 2, 2, 2, 95, 382,
3, 2, 2, 2, 97, 389, 3, 2, 2, 2, 99, 393, 3, 2, 2, 2, 101, 395, 3, 2, 2,
2, 103, 397, 3, 2, 2, 2, 105, 399, 3, 2, 2, 2, 107, 414, 3, 2, 2, 2, 109,
423, 3, 2, 2, 2, 111, 425, 3, 2, 2, 2, 113, 441, 3, 2, 2, 2, 115, 443,
3, 2, 2, 2, 117, 450, 3, 2, 2, 2, 119, 462, 3, 2, 2, 2, 121, 465, 3, 2,
2, 2, 123, 469, 3, 2, 2, 2, 125, 490, 3, 2, 2, 2, 127, 493, 3, 2, 2, 2,
129, 504, 3, 2, 2, 2, 131, 132, 7, 42, 2, 2, 132, 4, 3, 2, 2, 2, 133, 134,
7, 43, 2, 2, 134, 6, 3, 2, 2, 2, 135, 136, 7, 93, 2, 2, 136, 8, 3, 2, 2,
2, 137, 138, 7, 46, 2, 2, 138, 10, 3, 2, 2, 2, 139, 140, 7, 95, 2, 2, 140,
12, 3, 2, 2, 2, 141, 142, 7, 62, 2, 2, 142, 14, 3, 2, 2, 2, 143, 144, 7,
62, 2, 2, 144, 145, 7, 63, 2, 2, 145, 16, 3, 2, 2, 2, 146, 147, 7, 64,
2, 2, 147, 18, 3, 2, 2, 2, 148, 149, 7, 64, 2, 2, 149, 150, 7, 63, 2, 2,
150, 20, 3, 2, 2, 2, 151, 152, 7, 63, 2, 2, 152, 153, 7, 63, 2, 2, 153,
22, 3, 2, 2, 2, 154, 155, 7, 35, 2, 2, 155, 156, 7, 63, 2, 2, 156, 24,
3, 2, 2, 2, 157, 158, 7, 110, 2, 2, 158, 159, 7, 107, 2, 2, 159, 160, 7,
109, 2, 2, 160, 166, 7, 103, 2, 2, 161, 162, 7, 78, 2, 2, 162, 163, 7,
75, 2, 2, 163, 164, 7, 77, 2, 2, 164, 166, 7, 71, 2, 2, 165, 157, 3, 2,
2, 2, 165, 161, 3, 2, 2, 2, 166, 26, 3, 2, 2, 2, 167, 168, 7, 103, 2, 2,
168, 169, 7, 122, 2, 2, 169, 170, 7, 107, 2, 2, 170, 171, 7, 117, 2, 2,
171, 172, 7, 118, 2, 2, 172, 180, 7, 117, 2, 2, 173, 174, 7, 71, 2, 2,
174, 175, 7, 90, 2, 2, 175, 176, 7, 75, 2, 2, 176, 177, 7, 85, 2, 2, 177,
178, 7, 86, 2, 2, 178, 180, 7, 85, 2, 2, 179, 167, 3, 2, 2, 2, 179, 173,
3, 2, 2, 2, 180, 28, 3, 2, 2, 2, 181, 182, 7, 45, 2, 2, 182, 30, 3, 2,
2, 2, 183, 184, 7, 47, 2, 2, 184, 32, 3, 2, 2, 2, 185, 186, 7, 44, 2, 2,
186, 34, 3, 2, 2, 2, 187, 188, 7, 49, 2, 2, 188, 36, 3, 2, 2, 2, 189, 190,
7, 39, 2, 2, 190, 38, 3, 2, 2, 2, 191, 192, 7, 44, 2, 2, 192, 193, 7, 44,
2, 2, 193, 40, 3, 2, 2, 2, 194, 195, 7, 62, 2, 2, 195, 196, 7, 62, 2, 2,
196, 42, 3, 2, 2, 2, 197, 198, 7, 64, 2, 2, 198, 199, 7, 64, 2, 2, 199,
44, 3, 2, 2, 2, 200, 201, 7, 40, 2, 2, 201, 46, 3, 2, 2, 2, 202, 203, 7,
126, 2, 2, 203, 48, 3, 2, 2, 2, 204, 205, 7, 96, 2, 2, 205, 50, 3, 2, 2,
2, 206, 207, 7, 40, 2, 2, 207, 212, 7, 40, 2, 2, 208, 209, 7, 99, 2, 2,
209, 210, 7, 112, 2, 2, 210, 212, 7, 102, 2, 2, 211, 206, 3, 2, 2, 2, 211,
208, 3, 2, 2, 2, 212, 52, 3, 2, 2, 2, 213, 214, 7, 126, 2, 2, 214, 218,
7, 126, 2, 2, 215, 216, 7, 113, 2, 2, 216, 218, 7, 116, 2, 2, 217, 213,
3, 2, 2, 2, 217, 215, 3, 2, 2, 2, 218, 54, 3, 2, 2, 2, 219, 220, 7, 128,
2, 2, 220, 56, 3, 2, 2, 2, 221, 226, 7, 35, 2, 2, 222, 223, 7, 112, 2,
2, 223, 224, 7, 113, 2, 2, 224, 226, 7, 118, 2, 2, 225, 221, 3, 2, 2, 2,
225, 222, 3, 2, 2, 2, 226, 58, 3, 2, 2, 2, 227, 228, 7, 107, 2, 2, 228,
229, 7, 112, 2, 2, 229, 60, 3, 2, 2, 2, 230, 231, 7, 112, 2, 2, 231, 232,
7, 113, 2, 2, 232, 233, 7, 118, 2, 2, 233, 234, 7, 34, 2, 2, 234, 235,
7, 107, 2, 2, 235, 236, 7, 112, 2, 2, 236, 62, 3, 2, 2, 2, 237, 242, 7,
93, 2, 2, 238, 241, 5, 127, 64, 2, 239, 241, 5, 129, 65, 2, 240, 238, 3,
2, 2, 2, 240, 239, 3, 2, 2, 2, 241, 244, 3, 2, 2, 2, 242, 240, 3, 2, 2,
2, 242, 243, 3, 2, 2, 2, 243, 245, 3, 2, 2, 2, 244, 242, 3, 2, 2, 2, 245,
246, 7, 95, 2, 2, 246, 64, 3, 2, 2, 2, 247, 248, 7, 118, 2, 2, 248, 249,
7, 116, 2, 2, 249, 250, 7, 119, 2, 2, 250, 275, 7, 103, 2, 2, 251, 252,
7, 86, 2, 2, 252, 253, 7, 116, 2, 2, 253, 254, 7, 119, 2, 2, 254, 275,
7, 103, 2, 2, 255, 256, 7, 86, 2, 2, 256, 257, 7, 84, 2, 2, 257, 258, 7,
87, 2, 2, 258, 275, 7, 71, 2, 2, 259, 260, 7, 104, 2, 2, 260, 261, 7, 99,
2, 2, 261, 262, 7, 110, 2, 2, 262, 263, 7, 117, 2, 2, 263, 275, 7, 103,
2, 2, 264, 265, 7, 72, 2, 2, 265, 266, 7, 99, 2, 2, 266, 267, 7, 110, 2,
2, 267, 268, 7, 117, 2, 2, 268, 275, 7, 103, 2, 2, 269, 270, 7, 72, 2,
2, 270, 271, 7, 67, 2, 2, 271, 272, 7, 78, 2, 2, 272, 273, 7, 85, 2, 2,
273, 275, 7, 71, 2, 2, 274, 247, 3, 2, 2, 2, 274, 251, 3, 2, 2, 2, 274,
255, 3, 2, 2, 2, 274, 259, 3, 2, 2, 2, 274, 264, 3, 2, 2, 2, 274, 269,
3, 2, 2, 2, 275, 66, 3, 2, 2, 2, 276, 281, 5, 93, 47, 2, 277, 281, 5, 95,
48, 2, 278, 281, 5, 97, 49, 2, 279, 281, 5, 91, 46, 2, 280, 276, 3, 2,
2, 2, 280, 277, 3, 2, 2, 2, 280, 278, 3, 2, 2, 2, 280, 279, 3, 2, 2, 2,
281, 68, 3, 2, 2, 2, 282, 285, 5, 109, 55, 2, 283, 285, 5, 111, 56, 2,
284, 282, 3, 2, 2, 2, 284, 283, 3, 2, 2, 2, 285, 70, 3, 2, 2, 2, 286, 291,
5, 87, 44, 2, 287, 290, 5, 87, 44, 2, 288, 290, 5, 89, 45, 2, 289, 287,
3, 2, 2, 2, 289, 288, 3, 2, 2, 2, 290, 293, 3, 2, 2, 2, 291, 289, 3, 2,
2, 2, 291, 292, 3, 2, 2, 2, 292, 300, 3, 2, 2, 2, 293, 291, 3, 2, 2, 2,
294, 295, 7, 38, 2, 2, 295, 296, 7, 111, 2, 2, 296, 297, 7, 103, 2, 2,
297, 298, 7, 118, 2, 2, 298, 300, 7, 99, 2, 2, 299, 286, 3, 2, 2, 2, 299,
294, 3, 2, 2, 2, 300, 72, 3, 2, 2, 2, 301, 303, 5, 77, 39, 2, 302, 301,
3, 2, 2, 2, 302, 303, 3, 2, 2, 2, 303, 314, 3, 2, 2, 2, 304, 306, 7, 36,
2, 2, 305, 307, 5, 79, 40, 2, 306, 305, 3, 2, 2, 2, 306, 307, 3, 2, 2,
2, 307, 308, 3, 2, 2, 2, 308, 315, 7, 36, 2, 2, 309, 311, 7, 41, 2, 2,
310, 312, 5, 81, 41, 2, 311, 310, 3, 2, 2, 2, 311, 312, 3, 2, 2, 2, 312,
313, 3, 2, 2, 2, 313, 315, 7, 41, 2, 2, 314, 304, 3, 2, 2, 2, 314, 309,
3, 2, 2, 2, 315, 74, 3, 2, 2, 2, 316, 324, 5, 71, 36, 2, 317, 320, 7, 93,
2, 2, 318, 321, 5, 73, 37, 2, 319, 321, 5, 93, 47, 2, 320, 318, 3, 2, 2,
2, 320, 319, 3, 2, 2, 2, 321, 322, 3, 2, 2, 2, 322, 323, 7, 95, 2, 2, 323,
325, 3, 2, 2, 2, 324, 317, 3, 2, 2, 2, 325, 326, 3, 2, 2, 2, 326, 324,
3, 2, 2, 2, 326, 327, 3, 2, 2, 2, 327, 76, 3, 2, 2, 2, 328, 329, 7, 119,
2, 2, 329, 332, 7, 58, 2, 2, 330, 332, 9, 2, 2, 2, 331, 328, 3, 2, 2, 2,
331, 330, 3, 2, 2, 2, 332, 78, 3, 2, 2, 2, 333, 335, 5, 83, 42, 2, 334,
333, 3, 2, 2, 2, 335, 336, 3, 2, 2, 2, 336, 334, 3, 2, 2, 2, 336, 337,
3, 2, 2, 2, 337, 80, 3, 2, 2, 2, 338, 340, 5, 85, 43, 2, 339, 338, 3, 2,
2, 2, 340, 341, 3, 2, 2, 2, 341, 339, 3, 2, 2, 2, 341, 342, 3, 2, 2, 2,
342, 82, 3, 2, 2, 2, 343, 351, 10, 3, 2, 2, 344, 351, 5, 125, 63, 2, 345,
346, 7, 94, 2, 2, 346, 351, 7, 12, 2, 2, 347, 348, 7, 94, 2, 2, 348, 349,
7, 15, 2, 2, 349, 351, 7, 12, 2, 2, 350, 343, 3, 2, 2, 2, 350, 344, 3,
2, 2, 2, 350, 345, 3, 2, 2, 2, 350, 347, 3, 2, 2, 2, 351, 84, 3, 2, 2,
2, 352, 360, 10, 4, 2, 2, 353, 360, 5, 125, 63, 2, 354, 355, 7, 94, 2,
2, 355, 360, 7, 12, 2, 2, 356, 357, 7, 94, 2, 2, 357, 358, 7, 15, 2, 2,
358, 360, 7, 12, 2, 2, 359, 352, 3, 2, 2, 2, 359, 353, 3, 2, 2, 2, 359,
354, 3, 2, 2, 2, 359, 356, 3, 2, 2, 2, 360, 86, 3, 2, 2, 2, 361, 362, 9,
5, 2, 2, 362, 88, 3, 2, 2, 2, 363, 364, 9, 6, 2, 2, 364, 90, 3, 2, 2, 2,
365, 366, 7, 50, 2, 2, 366, 368, 9, 7, 2, 2, 367, 369, 9, 8, 2, 2, 368,
367, 3, 2, 2, 2, 369, 370, 3, 2, 2, 2, 370, 368, 3, 2, 2, 2, 370, 371,
3, 2, 2, 2, 371, 92, 3, 2, 2, 2, 372, 376, 5, 99, 50, 2, 373, 375, 5, 89,
45, 2, 374, 373, 3, 2, 2, 2, 375, 378, 3, 2, 2, 2, 376, 374, 3, 2, 2, 2,
376, 377, 3, 2, 2, 2, 377, 381, 3, 2, 2, 2, 378, 376, 3, 2, 2, 2, 379,
381, 7, 50, 2, 2, 380, 372, 3, 2, 2, 2, 380, 379, 3, 2, 2, 2, 381, 94,
3, 2, 2, 2, 382, 386, 7, 50, 2, 2, 383, 385, 5, 101, 51, 2, 384, 383, 3,
2, 2, 2, 385, 388, 3, 2, 2, 2, 386, 384, 3, 2, 2, 2, 386, 387, 3, 2, 2,
2, 387, 96, 3, 2, 2, 2, 388, 386, 3, 2, 2, 2, 389, 390, 7, 50, 2, 2, 390,
391, 9, 9, 2, 2, 391, 392, 5, 121, 61, 2, 392, 98, 3, 2, 2, 2, 393, 394,
9, 10, 2, 2, 394, 100, 3, 2, 2, 2, 395, 396, 9, 11, 2, 2, 396, 102, 3,
2, 2, 2, 397, 398, 9, 12, 2, 2, 398, 104, 3, 2, 2, 2, 399, 400, 5, 103,
52, 2, 400, 401, 5, 103, 52, 2, 401, 402, 5, 103, 52, 2, 402, 403, 5, 103,
52, 2, 403, 106, 3, 2, 2, 2, 404, 405, 7, 94, 2, 2, 405, 406, 7, 119, 2,
2, 406, 407, 3, 2, 2, 2, 407, 415, 5, 105, 53, 2, 408, 409, 7, 94, 2, 2,
409, 410, 7, 87, 2, 2, 410, 411, 3, 2, 2, 2, 411, 412, 5, 105, 53, 2, 412,
413, 5, 105, 53, 2, 413, 415, 3, 2, 2, 2, 414, 404, 3, 2, 2, 2, 414, 408,
3, 2, 2, 2, 415, 108, 3, 2, 2, 2, 416, 418, 5, 113, 57, 2, 417, 419, 5,
115, 58, 2, 418, 417, 3, 2, 2, 2, 418, 419, 3, 2, 2, 2, 419, 424, 3, 2,
2, 2, 420, 421, 5, 117, 59, 2, 421, 422, 5, 115, 58, 2, 422, 424, 3, 2,
2, 2, 423, 416, 3, 2, 2, 2, 423, 420, 3, 2, 2, 2, 424, 110, 3, 2, 2, 2,
425, 426, 7, 50, 2, 2, 426, 429, 9, 9, 2, 2, 427, 430, 5, 119, 60, 2, 428,
430, 5, 121, 61, 2, 429, 427, 3, 2, 2, 2, 429, 428, 3, 2, 2, 2, 430, 431,
3, 2, 2, 2, 431, 432, 5, 123, 62, 2, 432, 112, 3, 2, 2, 2, 433, 435, 5,
117, 59, 2, 434, 433, 3, 2, 2, 2, 434, 435, 3, 2, 2, 2, 435, 436, 3, 2,
2, 2, 436, 437, 7, 48, 2, 2, 437, 442, 5, 117, 59, 2, 438, 439, 5, 117,
59, 2, 439, 440, 7, 48, 2, 2, 440, 442, 3, 2, 2, 2, 441, 434, 3, 2, 2,
2, 441, 438, 3, 2, 2, 2, 442, 114, 3, 2, 2, 2, 443, 445, 9, 13, 2, 2, 444,
446, 9, 14, 2, 2, 445, 444, 3, 2, 2, 2, 445, 446, 3, 2, 2, 2, 446, 447,
3, 2, 2, 2, 447, 448, 5, 117, 59, 2, 448, 116, 3, 2, 2, 2, 449, 451, 5,
89, 45, 2, 450, 449, 3, 2, 2, 2, 451, 452, 3, 2, 2, 2, 452, 450, 3, 2,
2, 2, 452, 453, 3, 2, 2, 2, 453, 118, 3, 2, 2, 2, 454, 456, 5, 121, 61,
2, 455, 454, 3, 2, 2, 2, 455, 456, 3, 2, 2, 2, 456, 457, 3, 2, 2, 2, 457,
458, 7, 48, 2, 2, 458, 463, 5, 121, 61, 2, 459, 460, 5, 121, 61, 2, 460,
461, 7, 48, 2, 2, 461, 463, 3, 2, 2, 2, 462, 455, 3, 2, 2, 2, 462, 459,
3, 2, 2, 2, 463, 120, 3, 2, 2, 2, 464, 466, 5, 103, 52, 2, 465, 464, 3,
2, 2, 2, 466, 467, 3, 2, 2, 2, 467, 465, 3, 2, 2, 2, 467, 468, 3, 2, 2,
2, 468, 122, 3, 2, 2, 2, 469, 471, 9, 15, 2, 2, 470, 472, 9, 14, 2, 2,
471, 470, 3, 2, 2, 2, 471, 472, 3, 2, 2, 2, 472, 473, 3, 2, 2, 2, 473,
474, 5, 117, 59, 2, 474, 124, 3, 2, 2, 2, 475, 476, 7, 94, 2, 2, 476, 491,
9, 16, 2, 2, 477, 478, 7, 94, 2, 2, 478, 480, 5, 101, 51, 2, 479, 481,
5, 101, 51, 2, 480, 479, 3, 2, 2, 2, 480, 481, 3, 2, 2, 2, 481, 483, 3,
2, 2, 2, 482, 484, 5, 101, 51, 2, 483, 482, 3, 2, 2, 2, 483, 484, 3, 2,
2, 2, 484, 491, 3, 2, 2, 2, 485, 486, 7, 94, 2, 2, 486, 487, 7, 122, 2,
2, 487, 488, 3, 2, 2, 2, 488, 491, 5, 121, 61, 2, 489, 491, 5, 107, 54,
2, 490, 475, 3, 2, 2, 2, 490, 477, 3, 2, 2, 2, 490, 485, 3, 2, 2, 2, 490,
489, 3, 2, 2, 2, 491, 126, 3, 2, 2, 2, 492, 494, 9, 17, 2, 2, 493, 492,
3, 2, 2, 2, 494, 495, 3, 2, 2, 2, 495, 493, 3, 2, 2, 2, 495, 496, 3, 2,
2, 2, 496, 497, 3, 2, 2, 2, 497, 498, 8, 64, 2, 2, 498, 128, 3, 2, 2, 2,
499, 501, 7, 15, 2, 2, 500, 502, 7, 12, 2, 2, 501, 500, 3, 2, 2, 2, 501,
502, 3, 2, 2, 2, 502, 505, 3, 2, 2, 2, 503, 505, 7, 12, 2, 2, 504, 499,
3, 2, 2, 2, 504, 503, 3, 2, 2, 2, 505, 506, 3, 2, 2, 2, 506, 507, 8, 65,
2, 2, 507, 130, 3, 2, 2, 2, 49, 2, 165, 179, 211, 217, 225, 240, 242, 274,
280, 284, 289, 291, 299, 302, 306, 311, 314, 320, 326, 331, 336, 341, 350,
359, 370, 376, 380, 386, 414, 418, 423, 429, 434, 441, 445, 452, 455, 462,
467, 471, 480, 483, 490, 495, 501, 504, 3, 8, 2, 2,
}
var lexerChannelNames = []string{
@ -267,13 +279,13 @@ var lexerRuleNames = []string{
"LIKE", "EXISTS", "ADD", "SUB", "MUL", "DIV", "MOD", "POW", "SHL", "SHR",
"BAND", "BOR", "BXOR", "AND", "OR", "BNOT", "NOT", "IN", "NIN", "EmptyTerm",
"BooleanConstant", "IntegerConstant", "FloatingConstant", "Identifier",
"StringLiteral", "JSONIdentifier", "EncodingPrefix", "SCharSequence", "SChar",
"Nondigit", "Digit", "BinaryConstant", "DecimalConstant", "OctalConstant",
"HexadecimalConstant", "NonzeroDigit", "OctalDigit", "HexadecimalDigit",
"HexQuad", "UniversalCharacterName", "DecimalFloatingConstant", "HexadecimalFloatingConstant",
"FractionalConstant", "ExponentPart", "DigitSequence", "HexadecimalFractionalConstant",
"HexadecimalDigitSequence", "BinaryExponentPart", "EscapeSequence", "Whitespace",
"Newline",
"StringLiteral", "JSONIdentifier", "EncodingPrefix", "DoubleSCharSequence",
"SingleSCharSequence", "DoubleSChar", "SingleSChar", "Nondigit", "Digit",
"BinaryConstant", "DecimalConstant", "OctalConstant", "HexadecimalConstant",
"NonzeroDigit", "OctalDigit", "HexadecimalDigit", "HexQuad", "UniversalCharacterName",
"DecimalFloatingConstant", "HexadecimalFloatingConstant", "FractionalConstant",
"ExponentPart", "DigitSequence", "HexadecimalFractionalConstant", "HexadecimalDigitSequence",
"BinaryExponentPart", "EscapeSequence", "Whitespace", "Newline",
}
type PlanLexer struct {

View File

@ -125,9 +125,10 @@ func (v *ParserVisitor) VisitFloating(ctx *parser.FloatingContext) interface{} {
// VisitString translates expr to GenericValue.
func (v *ParserVisitor) VisitString(ctx *parser.StringContext) interface{} {
literal, err := strconv.Unquote(ctx.StringLiteral().GetText())
if err != nil {
return err
literal := ctx.StringLiteral().GetText()
if (strings.HasPrefix(literal, "\"") && strings.HasSuffix(literal, "\"")) ||
(strings.HasPrefix(literal, "'") && strings.HasSuffix(literal, "'")) {
literal = literal[1 : len(literal)-1]
}
return &ExprWithType{
dataType: schemapb.DataType_VarChar,
@ -418,9 +419,10 @@ func (v *ParserVisitor) VisitLike(ctx *parser.LikeContext) interface{} {
return fmt.Errorf("like operation on complicated expr is unsupported")
}
pattern, err := strconv.Unquote(ctx.StringLiteral().GetText())
if err != nil {
return err
pattern := ctx.StringLiteral().GetText()
if (strings.HasPrefix(pattern, "\"") && strings.HasSuffix(pattern, "\"")) ||
(strings.HasPrefix(pattern, "'") && strings.HasSuffix(pattern, "'")) {
pattern = pattern[1 : len(pattern)-1]
}
op, operand, err := translatePatternMatch(pattern)

View File

@ -3,9 +3,12 @@ package planparserv2
import (
"fmt"
"go.uber.org/zap"
"github.com/antlr/antlr4/runtime/Go/antlr"
"github.com/milvus-io/milvus-proto/go-api/schemapb"
"github.com/milvus-io/milvus/internal/proto/planpb"
"github.com/milvus-io/milvus/pkg/log"
"github.com/milvus-io/milvus/pkg/util/typeutil"
)
@ -32,6 +35,11 @@ func handleExpr(schema *typeutil.SchemaHelper, exprStr string) interface{} {
return errorListener.err
}
if parser.GetCurrentToken().GetTokenType() != antlr.TokenEOF {
log.Info("invalid expression", zap.String("expr", exprStr))
return fmt.Errorf("invalid expression: %s", exprStr)
}
// lexer & parser won't be used by this thread, can be put into pool.
putLexer(lexer)
putParser(parser)

View File

@ -1148,3 +1148,62 @@ func Test_InvalidExprWithMultipleJSONField(t *testing.T) {
})
assert.Error(t, err)
}
func Test_exprWithSingleQuotes(t *testing.T) {
schema := newTestSchema()
expr := ""
var err error
expr = `'abc' < StringField < "def"`
_, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{
Topk: 0,
MetricType: "",
SearchParams: "",
RoundDecimal: 0,
})
assert.NoError(t, err)
expr = `'ab"c' < StringField < "d'ef"`
_, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{
Topk: 0,
MetricType: "",
SearchParams: "",
RoundDecimal: 0,
})
assert.NoError(t, err)
expr = `'ab\"c' < StringField < "d\'ef"`
_, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{
Topk: 0,
MetricType: "",
SearchParams: "",
RoundDecimal: 0,
})
assert.NoError(t, err)
expr = `'ab\'c' < StringField < "d\"ef"`
_, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{
Topk: 0,
MetricType: "",
SearchParams: "",
RoundDecimal: 0,
})
assert.NoError(t, err)
expr = `'abc'd' < StringField < "def"`
_, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{
Topk: 0,
MetricType: "",
SearchParams: "",
RoundDecimal: 0,
})
assert.Error(t, err)
expr = `'abc' < StringField < "def"g"`
_, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{
Topk: 0,
MetricType: "",
SearchParams: "",
RoundDecimal: 0,
})
assert.Error(t, err)
}

View File

@ -615,6 +615,40 @@ func (s *JSONExprSuite) checkSearch(collectionName, fieldName string, dim int) {
s.doSearch(collectionName, []string{fieldName}, expr, dim, checkFunc)
log.Info("like expression run successfully")
expr = `str1 like 'abc\"def-%'`
checkFunc = func(result *milvuspb.SearchResults) {
s.Equal(1, len(result.Results.FieldsData))
s.Equal(fieldName, result.Results.FieldsData[0].GetFieldName())
s.Equal(schemapb.DataType_JSON, result.Results.FieldsData[0].GetType())
s.Equal(10, len(result.Results.FieldsData[0].GetScalars().GetJsonData().GetData()))
}
s.doSearch(collectionName, []string{fieldName}, expr, dim, checkFunc)
log.Info("like expression run successfully")
expr = `str1 like 'abc"def-%'`
checkFunc = func(result *milvuspb.SearchResults) {
s.Equal(0, len(result.Results.FieldsData))
}
s.doSearch(collectionName, []string{fieldName}, expr, dim, checkFunc)
log.Info("like expression run successfully")
expr = `str2 like 'abc\"def-%'`
checkFunc = func(result *milvuspb.SearchResults) {
s.Equal(0, len(result.Results.FieldsData))
}
s.doSearch(collectionName, []string{fieldName}, expr, dim, checkFunc)
log.Info("like expression run successfully")
expr = `str2 like 'abc"def-%'`
checkFunc = func(result *milvuspb.SearchResults) {
s.Equal(1, len(result.Results.FieldsData))
s.Equal(fieldName, result.Results.FieldsData[0].GetFieldName())
s.Equal(schemapb.DataType_JSON, result.Results.FieldsData[0].GetType())
s.Equal(10, len(result.Results.FieldsData[0].GetScalars().GetJsonData().GetData()))
}
s.doSearch(collectionName, []string{fieldName}, expr, dim, checkFunc)
log.Info("like expression run successfully")
expr = `A in []`
checkFunc = func(result *milvuspb.SearchResults) {
s.Equal(0, len(result.Results.FieldsData))
@ -810,6 +844,8 @@ func newJSONData(fieldName string, rowNum int) *schemapb.FieldData {
"F": i,
"G": i + 10,
},
"str1": `abc\"def-` + string(rune(i)),
"str2": fmt.Sprintf("abc\"def-%d", i),
}
if i%2 == 0 {
data = map[string]interface{}{