ksql-lint
Version:
CLI tool to lint KSQLDB commands/queries, for use in CI/CD, using [the official KSQLDB grammar](https://github.com/confluentinc/ksql/blob/master/ksqldb-parser/src/main/antlr4/io/confluent/ksql/parser/SqlBase.g4) and using that parser to validate KSQLDB st
895 lines (852 loc) • 334 kB
JavaScript
// Generated from grammars/SqlBase.g4 by ANTLR 4.12.0
// jshint ignore: start
import antlr4 from 'antlr4';
import SqlBaseListener from './SqlBaseListener.js';
const serializedATN = [4,1,182,1201,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,
7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,
2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,
20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,
7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,2,34,7,
34,2,35,7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39,2,40,7,40,2,41,7,41,
2,42,7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,46,7,46,2,47,7,47,2,48,7,48,2,
49,7,49,2,50,7,50,2,51,7,51,2,52,7,52,2,53,7,53,2,54,7,54,2,55,7,55,2,56,
7,56,2,57,7,57,2,58,7,58,2,59,7,59,2,60,7,60,2,61,7,61,2,62,7,62,1,0,5,0,
128,8,0,10,0,12,0,131,9,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,142,8,
1,1,1,3,1,145,8,1,1,2,1,2,1,2,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1,4,3,4,158,8,
4,1,4,1,4,3,4,162,8,4,1,4,1,4,1,4,3,4,167,8,4,1,4,1,4,1,4,3,4,172,8,4,1,
4,1,4,1,4,1,4,3,4,178,8,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,3,
4,191,8,4,1,4,1,4,1,4,3,4,196,8,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,
4,1,4,1,4,1,4,3,4,211,8,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,
4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,
4,1,4,1,4,1,4,3,4,246,8,4,1,4,3,4,249,8,4,1,4,1,4,1,4,1,4,3,4,255,8,4,1,
4,1,4,3,4,259,8,4,1,4,1,4,3,4,263,8,4,1,4,1,4,1,4,3,4,268,8,4,1,4,1,4,1,
4,1,4,3,4,274,8,4,1,4,1,4,1,4,3,4,279,8,4,1,4,1,4,1,4,1,4,1,4,1,4,3,4,287,
8,4,1,4,3,4,290,8,4,1,4,1,4,1,4,1,4,3,4,296,8,4,1,4,1,4,3,4,300,8,4,1,4,
1,4,3,4,304,8,4,1,4,1,4,1,4,3,4,309,8,4,1,4,1,4,1,4,1,4,3,4,315,8,4,1,4,
1,4,1,4,3,4,320,8,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,3,4,331,8,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,3,4,342,8,4,1,4,1,4,1,4,1,4,1,4,1,4,3,4,
350,8,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,3,4,359,8,4,1,4,1,4,1,4,3,4,364,8,4,
1,4,1,4,1,4,1,4,3,4,370,8,4,1,4,1,4,1,4,3,4,375,8,4,1,4,1,4,1,4,1,4,3,4,
381,8,4,1,4,1,4,1,4,1,4,3,4,387,8,4,1,4,1,4,1,4,1,4,1,4,3,4,394,8,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,3,4,404,8,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,5,4,
413,8,4,10,4,12,4,416,9,4,1,4,1,4,1,4,3,4,421,8,4,1,4,1,4,1,4,1,4,3,4,427,
8,4,1,4,3,4,430,8,4,1,4,1,4,1,4,3,4,435,8,4,1,4,1,4,1,4,3,4,440,8,4,1,4,
1,4,3,4,444,8,4,1,4,3,4,447,8,4,3,4,449,8,4,1,5,1,5,1,5,1,5,3,5,455,8,5,
1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,3,5,465,8,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,
3,5,474,8,5,1,5,1,5,3,5,478,8,5,1,5,1,5,1,5,1,5,3,5,484,8,5,1,5,1,5,3,5,
488,8,5,3,5,490,8,5,1,6,1,6,1,6,1,6,1,7,1,7,3,7,498,8,7,1,8,1,8,1,8,1,8,
5,8,504,8,8,10,8,12,8,507,9,8,1,8,1,8,1,8,1,8,3,8,513,8,8,1,8,1,8,3,8,517,
8,8,1,8,1,8,1,8,3,8,522,8,8,1,8,1,8,1,8,3,8,527,8,8,1,8,1,8,3,8,531,8,8,
1,8,1,8,3,8,535,8,8,1,8,3,8,538,8,8,1,9,1,9,1,10,1,10,1,10,1,10,1,11,1,11,
3,11,548,8,11,1,11,1,11,1,11,1,12,1,12,1,12,1,12,5,12,557,8,12,10,12,12,
12,560,9,12,1,12,1,12,1,13,1,13,1,13,3,13,567,8,13,1,14,3,14,570,8,14,1,
14,1,14,1,14,1,14,1,14,1,14,3,14,578,8,14,1,15,1,15,1,15,1,15,5,15,584,8,
15,10,15,12,15,587,9,15,1,15,1,15,1,16,1,16,3,16,593,8,16,1,16,1,16,1,16,
1,17,1,17,3,17,600,8,17,1,17,3,17,603,8,17,1,17,3,17,606,8,17,1,18,1,18,
1,18,1,19,1,19,1,19,1,20,1,20,1,20,1,20,1,21,1,21,1,21,1,21,1,21,1,22,3,
22,624,8,22,1,22,1,22,1,22,3,22,629,8,22,1,23,1,23,1,23,1,23,1,23,1,23,1,
23,3,23,638,8,23,1,23,1,23,3,23,642,8,23,1,23,1,23,1,24,1,24,1,24,1,24,1,
24,1,24,1,24,1,24,1,24,1,24,1,24,1,24,3,24,658,8,24,1,24,1,24,3,24,662,8,
24,1,24,1,24,1,25,1,25,1,25,1,25,1,25,1,25,3,25,672,8,25,1,25,1,25,3,25,
676,8,25,1,25,1,25,1,26,1,26,1,27,1,27,1,27,5,27,685,8,27,10,27,12,27,688,
9,27,1,27,1,27,1,27,1,27,5,27,694,8,27,10,27,12,27,697,9,27,3,27,699,8,27,
1,27,3,27,702,8,27,1,28,1,28,1,28,5,28,707,8,28,10,28,12,28,710,9,28,1,28,
1,28,1,28,1,28,5,28,716,8,28,10,28,12,28,719,9,28,3,28,721,8,28,1,28,3,28,
724,8,28,1,29,1,29,1,29,1,29,5,29,730,8,29,10,29,12,29,733,9,29,3,29,735,
8,29,1,29,1,29,1,30,1,30,3,30,741,8,30,1,30,3,30,744,8,30,1,30,1,30,1,30,
1,30,1,30,1,30,1,30,1,30,1,30,3,30,755,8,30,1,31,1,31,4,31,759,8,31,11,31,
12,31,760,1,31,3,31,764,8,31,1,32,1,32,1,32,1,32,3,32,770,8,32,1,32,1,32,
1,33,3,33,775,8,33,1,33,1,33,3,33,779,8,33,1,33,1,33,3,33,783,8,33,1,33,
1,33,3,33,787,8,33,3,33,789,8,33,1,34,1,34,1,34,1,35,1,35,1,35,1,35,1,35,
1,35,3,35,800,8,35,1,35,1,35,3,35,804,8,35,3,35,806,8,35,1,36,1,36,1,36,
1,37,1,37,1,37,1,38,1,38,3,38,816,8,38,1,38,3,38,819,8,38,1,39,1,39,1,39,
1,39,5,39,825,8,39,10,39,12,39,828,9,39,1,39,1,39,1,40,1,40,1,41,1,41,1,
42,1,42,1,42,1,42,3,42,840,8,42,1,42,1,42,1,42,1,42,1,42,1,42,5,42,848,8,
42,10,42,12,42,851,9,42,1,43,1,43,3,43,855,8,43,1,44,1,44,1,44,1,44,3,44,
861,8,44,1,44,1,44,1,44,1,44,1,44,1,44,3,44,869,8,44,1,44,1,44,1,44,1,44,
1,44,5,44,876,8,44,10,44,12,44,879,9,44,1,44,1,44,1,44,3,44,884,8,44,1,44,
1,44,1,44,1,44,3,44,890,8,44,1,44,1,44,3,44,894,8,44,1,44,1,44,1,44,3,44,
899,8,44,1,44,1,44,1,44,3,44,904,8,44,1,45,1,45,1,45,1,45,3,45,910,8,45,
1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,5,45,924,8,45,
10,45,12,45,927,9,45,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,4,46,937,8,
46,11,46,12,46,938,1,46,1,46,3,46,943,8,46,1,46,1,46,1,46,1,46,4,46,949,
8,46,11,46,12,46,950,1,46,1,46,3,46,955,8,46,1,46,1,46,1,46,1,46,1,46,1,
46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,5,46,971,8,46,10,46,12,46,974,
9,46,3,46,976,8,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,
5,46,989,8,46,10,46,12,46,992,9,46,3,46,994,8,46,1,46,1,46,1,46,1,46,1,46,
1,46,1,46,1,46,1,46,1,46,1,46,5,46,1007,8,46,10,46,12,46,1010,9,46,3,46,
1012,8,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,5,46,1025,
8,46,10,46,12,46,1028,9,46,1,46,1,46,5,46,1032,8,46,10,46,12,46,1035,9,46,
3,46,1037,8,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,3,
46,1050,8,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,5,46,1060,8,46,10,46,
12,46,1063,9,46,1,47,1,47,3,47,1067,8,47,1,48,1,48,1,48,1,48,1,49,1,49,1,
50,1,50,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,51,
1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,51,5,51,1098,8,51,10,51,12,51,1101,
9,51,3,51,1103,8,51,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,
51,1,51,1,51,5,51,1118,8,51,10,51,12,51,1121,9,51,1,51,1,51,3,51,1125,8,
51,3,51,1127,8,51,1,51,1,51,5,51,1131,8,51,10,51,12,51,1134,9,51,1,52,1,
52,1,53,1,53,1,54,1,54,1,54,1,54,1,54,1,55,1,55,1,55,1,55,1,55,1,55,3,55,
1151,8,55,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,5,56,1161,8,56,10,56,12,
56,1164,9,56,1,56,1,56,1,56,1,56,3,56,1170,8,56,1,57,1,57,1,58,1,58,1,59,
1,59,1,60,3,60,1179,8,60,1,60,1,60,3,60,1183,8,60,1,60,1,60,3,60,1187,8,
60,1,60,3,60,1190,8,60,1,61,1,61,1,61,1,61,1,61,3,61,1197,8,61,1,62,1,62,
1,62,0,4,84,90,92,102,63,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,
36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,
84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,
124,0,12,1,0,96,97,1,0,133,134,2,0,81,81,83,83,1,0,10,11,2,0,41,41,121,121,
2,0,44,48,51,55,1,0,159,160,1,0,161,163,1,0,153,158,1,0,35,36,2,0,8,8,169,
169,14,0,8,11,32,32,37,47,56,56,62,63,76,77,91,94,96,96,98,98,106,110,114,
120,130,130,133,134,138,152,1369,0,129,1,0,0,0,2,141,1,0,0,0,4,146,1,0,0,
0,6,149,1,0,0,0,8,448,1,0,0,0,10,489,1,0,0,0,12,491,1,0,0,0,14,497,1,0,0,
0,16,499,1,0,0,0,18,539,1,0,0,0,20,541,1,0,0,0,22,545,1,0,0,0,24,552,1,0,
0,0,26,563,1,0,0,0,28,577,1,0,0,0,30,579,1,0,0,0,32,592,1,0,0,0,34,599,1,
0,0,0,36,607,1,0,0,0,38,610,1,0,0,0,40,613,1,0,0,0,42,617,1,0,0,0,44,623,
1,0,0,0,46,630,1,0,0,0,48,645,1,0,0,0,50,665,1,0,0,0,52,679,1,0,0,0,54,701,
1,0,0,0,56,723,1,0,0,0,58,725,1,0,0,0,60,754,1,0,0,0,62,763,1,0,0,0,64,765,
1,0,0,0,66,788,1,0,0,0,68,790,1,0,0,0,70,805,1,0,0,0,72,807,1,0,0,0,74,810,
1,0,0,0,76,813,1,0,0,0,78,820,1,0,0,0,80,831,1,0,0,0,82,833,1,0,0,0,84,839,
1,0,0,0,86,852,1,0,0,0,88,903,1,0,0,0,90,909,1,0,0,0,92,1049,1,0,0,0,94,
1066,1,0,0,0,96,1068,1,0,0,0,98,1072,1,0,0,0,100,1074,1,0,0,0,102,1126,1,
0,0,0,104,1135,1,0,0,0,106,1137,1,0,0,0,108,1139,1,0,0,0,110,1150,1,0,0,
0,112,1169,1,0,0,0,114,1171,1,0,0,0,116,1173,1,0,0,0,118,1175,1,0,0,0,120,
1189,1,0,0,0,122,1196,1,0,0,0,124,1198,1,0,0,0,126,128,3,4,2,0,127,126,1,
0,0,0,128,131,1,0,0,0,129,127,1,0,0,0,129,130,1,0,0,0,130,132,1,0,0,0,131,
129,1,0,0,0,132,133,5,0,0,1,133,1,1,0,0,0,134,142,3,4,2,0,135,136,3,10,5,
0,136,137,5,1,0,0,137,142,1,0,0,0,138,139,3,12,6,0,139,140,5,1,0,0,140,142,
1,0,0,0,141,134,1,0,0,0,141,135,1,0,0,0,141,138,1,0,0,0,142,144,1,0,0,0,
143,145,5,0,0,1,144,143,1,0,0,0,144,145,1,0,0,0,145,3,1,0,0,0,146,147,3,
8,4,0,147,148,5,1,0,0,148,5,1,0,0,0,149,150,3,82,41,0,150,151,5,0,0,1,151,
7,1,0,0,0,152,449,3,16,8,0,153,154,7,0,0,0,154,449,5,124,0,0,155,157,7,0,
0,0,156,158,5,15,0,0,157,156,1,0,0,0,157,158,1,0,0,0,158,159,1,0,0,0,159,
161,5,99,0,0,160,162,5,89,0,0,161,160,1,0,0,0,161,162,1,0,0,0,162,449,1,
0,0,0,163,164,7,0,0,0,164,166,5,84,0,0,165,167,5,89,0,0,166,165,1,0,0,0,
166,167,1,0,0,0,167,449,1,0,0,0,168,169,7,0,0,0,169,171,5,98,0,0,170,172,
5,89,0,0,171,170,1,0,0,0,171,172,1,0,0,0,172,449,1,0,0,0,173,174,7,0,0,0,
174,449,5,109,0,0,175,177,7,0,0,0,176,178,7,1,0,0,177,176,1,0,0,0,177,178,
1,0,0,0,178,179,1,0,0,0,179,449,5,132,0,0,180,181,7,0,0,0,181,182,5,131,
0,0,182,449,5,144,0,0,183,184,7,0,0,0,184,449,5,94,0,0,185,186,7,0,0,0,186,
449,5,143,0,0,187,188,5,88,0,0,188,190,3,118,59,0,189,191,5,89,0,0,190,189,
1,0,0,0,190,191,1,0,0,0,191,449,1,0,0,0,192,193,5,88,0,0,193,195,5,84,0,
0,194,196,5,89,0,0,195,194,1,0,0,0,195,196,1,0,0,0,196,449,1,0,0,0,197,198,
5,88,0,0,198,199,5,110,0,0,199,449,3,110,55,0,200,201,5,88,0,0,201,202,5,
131,0,0,202,449,3,110,55,0,203,204,5,90,0,0,204,205,3,14,7,0,205,206,3,34,
17,0,206,449,1,0,0,0,207,208,7,0,0,0,208,210,5,101,0,0,209,211,5,89,0,0,
210,209,1,0,0,0,210,211,1,0,0,0,211,449,1,0,0,0,212,213,5,102,0,0,213,449,
3,110,55,0,214,215,5,102,0,0,215,449,5,15,0,0,216,217,5,103,0,0,217,449,
3,110,55,0,218,219,5,103,0,0,219,449,5,15,0,0,220,221,5,104,0,0,221,449,
3,110,55,0,222,223,5,104,0,0,223,449,5,15,0,0,224,225,5,116,0,0,225,226,
5,168,0,0,226,227,5,153,0,0,227,449,5,168,0,0,228,229,5,142,0,0,229,230,
5,147,0,0,230,231,5,168,0,0,231,232,5,153,0,0,232,449,5,168,0,0,233,234,
5,126,0,0,234,449,5,168,0,0,235,236,5,117,0,0,236,237,3,114,57,0,237,238,
5,153,0,0,238,239,3,116,58,0,239,449,1,0,0,0,240,241,5,118,0,0,241,449,3,
114,57,0,242,245,5,80,0,0,243,244,5,25,0,0,244,246,5,139,0,0,245,243,1,0,
0,0,245,246,1,0,0,0,246,248,1,0,0,0,247,249,5,134,0,0,248,247,1,0,0,0,248,
249,1,0,0,0,249,250,1,0,0,0,250,254,5,83,0,0,251,252,5,152,0,0,252,253,5,
28,0,0,253,255,5,29,0,0,254,251,1,0,0,0,254,255,1,0,0,0,255,256,1,0,0,0,
256,258,3,118,59,0,257,259,3,24,12,0,258,257,1,0,0,0,258,259,1,0,0,0,259,
262,1,0,0,0,260,261,5,78,0,0,261,263,3,30,15,0,262,260,1,0,0,0,262,263,1,
0,0,0,263,449,1,0,0,0,264,267,5,80,0,0,265,266,5,25,0,0,266,268,5,139,0,
0,267,265,1,0,0,0,267,268,1,0,0,0,268,269,1,0,0,0,269,273,5,83,0,0,270,271,
5,152,0,0,271,272,5,28,0,0,272,274,5,29,0,0,273,270,1,0,0,0,273,274,1,0,
0,0,274,275,1,0,0,0,275,278,3,118,59,0,276,277,5,78,0,0,277,279,3,30,15,
0,278,276,1,0,0,0,278,279,1,0,0,0,279,280,1,0,0,0,280,281,5,14,0,0,281,282,
3,16,8,0,282,449,1,0,0,0,283,286,5,80,0,0,284,285,5,25,0,0,285,287,5,139,
0,0,286,284,1,0,0,0,286,287,1,0,0,0,287,289,1,0,0,0,288,290,5,134,0,0,289,
288,1,0,0,0,289,290,1,0,0,0,290,291,1,0,0,0,291,295,5,81,0,0,292,293,5,152,
0,0,293,294,5,28,0,0,294,296,5,29,0,0,295,292,1,0,0,0,295,296,1,0,0,0,296,
297,1,0,0,0,297,299,3,118,59,0,298,300,3,24,12,0,299,298,1,0,0,0,299,300,
1,0,0,0,300,303,1,0,0,0,301,302,5,78,0,0,302,304,3,30,15,0,303,301,1,0,0,
0,303,304,1,0,0,0,304,449,1,0,0,0,305,308,5,80,0,0,306,307,5,25,0,0,307,
309,5,139,0,0,308,306,1,0,0,0,308,309,1,0,0,0,309,310,1,0,0,0,310,314,5,
81,0,0,311,312,5,152,0,0,312,313,5,28,0,0,313,315,5,29,0,0,314,311,1,0,0,
0,314,315,1,0,0,0,315,316,1,0,0,0,316,319,3,118,59,0,317,318,5,78,0,0,318,
320,3,30,15,0,319,317,1,0,0,0,319,320,1,0,0,0,320,321,1,0,0,0,321,322,5,
14,0,0,322,323,3,16,8,0,323,449,1,0,0,0,324,325,5,80,0,0,325,326,7,1,0,0,
326,330,5,131,0,0,327,328,5,152,0,0,328,329,5,28,0,0,329,331,5,29,0,0,330,
327,1,0,0,0,330,331,1,0,0,0,331,332,1,0,0,0,332,333,3,110,55,0,333,334,5,
78,0,0,334,335,3,30,15,0,335,449,1,0,0,0,336,337,5,85,0,0,337,338,5,87,0,
0,338,341,3,118,59,0,339,340,5,78,0,0,340,342,3,30,15,0,341,339,1,0,0,0,
341,342,1,0,0,0,342,343,1,0,0,0,343,344,3,16,8,0,344,449,1,0,0,0,345,346,
5,85,0,0,346,347,5,87,0,0,347,349,3,118,59,0,348,350,3,78,39,0,349,348,1,
0,0,0,349,350,1,0,0,0,350,351,1,0,0,0,351,352,5,79,0,0,352,353,3,58,29,0,
353,449,1,0,0,0,354,355,5,111,0,0,355,358,5,83,0,0,356,357,5,152,0,0,357,
359,5,29,0,0,358,356,1,0,0,0,358,359,1,0,0,0,359,360,1,0,0,0,360,363,3,118,
59,0,361,362,5,86,0,0,362,364,5,82,0,0,363,361,1,0,0,0,363,364,1,0,0,0,364,
449,1,0,0,0,365,366,5,111,0,0,366,369,5,81,0,0,367,368,5,152,0,0,368,370,
5,29,0,0,369,367,1,0,0,0,369,370,1,0,0,0,370,371,1,0,0,0,371,374,3,118,59,
0,372,373,5,86,0,0,373,375,5,82,0,0,374,372,1,0,0,0,374,375,1,0,0,0,375,
449,1,0,0,0,376,377,5,111,0,0,377,380,5,131,0,0,378,379,5,152,0,0,379,381,
5,29,0,0,380,378,1,0,0,0,380,381,1,0,0,0,381,382,1,0,0,0,382,449,3,110,55,
0,383,386,5,91,0,0,384,387,3,8,4,0,385,387,3,110,55,0,386,384,1,0,0,0,386,
385,1,0,0,0,387,449,1,0,0,0,388,389,5,80,0,0,389,393,5,93,0,0,390,391,5,
152,0,0,391,392,5,28,0,0,392,394,5,29,0,0,393,390,1,0,0,0,393,394,1,0,0,
0,394,395,1,0,0,0,395,396,3,110,55,0,396,397,5,14,0,0,397,398,3,102,51,0,
398,449,1,0,0,0,399,400,5,111,0,0,400,403,5,93,0,0,401,402,5,152,0,0,402,
404,5,29,0,0,403,401,1,0,0,0,403,404,1,0,0,0,404,405,1,0,0,0,405,449,3,110,
55,0,406,407,5,142,0,0,407,408,7,2,0,0,408,409,3,118,59,0,409,414,3,22,11,
0,410,411,5,2,0,0,411,413,3,22,11,0,412,410,1,0,0,0,413,416,1,0,0,0,414,
412,1,0,0,0,414,415,1,0,0,0,415,449,1,0,0,0,416,414,1,0,0,0,417,420,5,140,
0,0,418,419,5,28,0,0,419,421,5,29,0,0,420,418,1,0,0,0,420,421,1,0,0,0,421,
422,1,0,0,0,422,423,5,82,0,0,423,426,3,14,7,0,424,425,5,78,0,0,425,427,3,
30,15,0,426,424,1,0,0,0,426,427,1,0,0,0,427,429,1,0,0,0,428,430,3,20,10,
0,429,428,1,0,0,0,429,430,1,0,0,0,430,449,1,0,0,0,431,434,5,140,0,0,432,
433,5,28,0,0,433,435,5,29,0,0,434,432,1,0,0,0,434,435,1,0,0,0,435,436,1,
0,0,0,436,439,5,149,0,0,437,438,5,150,0,0,438,440,3,14,7,0,439,437,1,0,0,
0,439,440,1,0,0,0,440,443,1,0,0,0,441,442,5,151,0,0,442,444,3,122,61,0,443,
441,1,0,0,0,443,444,1,0,0,0,444,446,1,0,0,0,445,447,3,20,10,0,446,445,1,
0,0,0,446,447,1,0,0,0,447,449,1,0,0,0,448,152,1,0,0,0,448,153,1,0,0,0,448,
155,1,0,0,0,448,163,1,0,0,0,448,168,1,0,0,0,448,173,1,0,0,0,448,175,1,0,
0,0,448,180,1,0,0,0,448,183,1,0,0,0,448,185,1,0,0,0,448,187,1,0,0,0,448,
192,1,0,0,0,448,197,1,0,0,0,448,200,1,0,0,0,448,203,1,0,0,0,448,207,1,0,
0,0,448,212,1,0,0,0,448,214,1,0,0,0,448,216,1,0,0,0,448,218,1,0,0,0,448,
220,1,0,0,0,448,222,1,0,0,0,448,224,1,0,0,0,448,228,1,0,0,0,448,233,1,0,
0,0,448,235,1,0,0,0,448,240,1,0,0,0,448,242,1,0,0,0,448,264,1,0,0,0,448,
283,1,0,0,0,448,305,1,0,0,0,448,324,1,0,0,0,448,336,1,0,0,0,448,345,1,0,
0,0,448,354,1,0,0,0,448,365,1,0,0,0,448,376,1,0,0,0,448,383,1,0,0,0,448,
388,1,0,0,0,448,399,1,0,0,0,448,406,1,0,0,0,448,417,1,0,0,0,448,431,1,0,
0,0,449,9,1,0,0,0,450,451,5,140,0,0,451,452,5,79,0,0,452,454,3,118,59,0,
453,455,3,78,39,0,454,453,1,0,0,0,454,455,1,0,0,0,455,456,1,0,0,0,456,457,
5,79,0,0,457,458,3,58,29,0,458,490,1,0,0,0,459,460,5,140,0,0,460,461,5,34,
0,0,461,462,5,79,0,0,462,464,3,118,59,0,463,465,3,78,39,0,464,463,1,0,0,
0,464,465,1,0,0,0,465,466,1,0,0,0,466,467,5,130,0,0,467,468,3,58,29,0,468,
490,1,0,0,0,469,470,5,140,0,0,470,471,5,83,0,0,471,473,3,118,59,0,472,474,
3,24,12,0,473,472,1,0,0,0,473,474,1,0,0,0,474,477,1,0,0,0,475,476,5,78,0,
0,476,478,3,30,15,0,477,475,1,0,0,0,477,478,1,0,0,0,478,490,1,0,0,0,479,
480,5,140,0,0,480,481,5,81,0,0,481,483,3,118,59,0,482,484,3,24,12,0,483,
482,1,0,0,0,483,484,1,0,0,0,484,487,1,0,0,0,485,486,5,78,0,0,486,488,3,30,
15,0,487,485,1,0,0,0,487,488,1,0,0,0,488,490,1,0,0,0,489,450,1,0,0,0,489,
459,1,0,0,0,489,469,1,0,0,0,489,479,1,0,0,0,490,11,1,0,0,0,491,492,5,127,
0,0,492,493,5,128,0,0,493,494,5,168,0,0,494,13,1,0,0,0,495,498,3,110,55,
0,496,498,5,168,0,0,497,495,1,0,0,0,497,496,1,0,0,0,498,15,1,0,0,0,499,500,
5,12,0,0,500,505,3,60,30,0,501,502,5,2,0,0,502,504,3,60,30,0,503,501,1,0,
0,0,504,507,1,0,0,0,505,503,1,0,0,0,505,506,1,0,0,0,506,508,1,0,0,0,507,
505,1,0,0,0,508,509,5,13,0,0,509,512,3,62,31,0,510,511,5,19,0,0,511,513,
3,44,22,0,512,510,1,0,0,0,512,513,1,0,0,0,513,516,1,0,0,0,514,515,5,17,0,
0,515,517,3,84,42,0,516,514,1,0,0,0,516,517,1,0,0,0,517,521,1,0,0,0,518,
519,5,20,0,0,519,520,5,21,0,0,520,522,3,54,27,0,521,518,1,0,0,0,521,522,
1,0,0,0,522,526,1,0,0,0,523,524,5,76,0,0,524,525,5,21,0,0,525,527,3,56,28,
0,526,523,1,0,0,0,526,527,1,0,0,0,527,530,1,0,0,0,528,529,5,22,0,0,529,531,
3,84,42,0,530,528,1,0,0,0,530,531,1,0,0,0,531,534,1,0,0,0,532,533,5,9,0,
0,533,535,3,18,9,0,534,532,1,0,0,0,534,535,1,0,0,0,535,537,1,0,0,0,536,538,
3,38,19,0,537,536,1,0,0,0,537,538,1,0,0,0,538,17,1,0,0,0,539,540,7,3,0,0,
540,19,1,0,0,0,541,542,5,148,0,0,542,543,3,120,60,0,543,544,3,52,26,0,544,
21,1,0,0,0,545,547,5,141,0,0,546,548,5,107,0,0,547,546,1,0,0,0,547,548,1,
0,0,0,548,549,1,0,0,0,549,550,3,110,55,0,550,551,3,102,51,0,551,23,1,0,0,
0,552,553,5,3,0,0,553,558,3,26,13,0,554,555,5,2,0,0,555,557,3,26,13,0,556,
554,1,0,0,0,557,560,1,0,0,0,558,556,1,0,0,0,558,559,1,0,0,0,559,561,1,0,
0,0,560,558,1,0,0,0,561,562,5,4,0,0,562,25,1,0,0,0,563,564,3,110,55,0,564,
566,3,102,51,0,565,567,3,28,14,0,566,565,1,0,0,0,566,567,1,0,0,0,567,27,
1,0,0,0,568,570,5,138,0,0,569,568,1,0,0,0,569,570,1,0,0,0,570,571,1,0,0,
0,571,578,5,130,0,0,572,578,5,145,0,0,573,574,5,146,0,0,574,575,5,3,0,0,
575,576,5,168,0,0,576,578,5,4,0,0,577,569,1,0,0,0,577,572,1,0,0,0,577,573,
1,0,0,0,578,29,1,0,0,0,579,580,5,3,0,0,580,585,3,32,16,0,581,582,5,2,0,0,
582,584,3,32,16,0,583,581,1,0,0,0,584,587,1,0,0,0,585,583,1,0,0,0,585,586,
1,0,0,0,586,588,1,0,0,0,587,585,1,0,0,0,588,589,5,4,0,0,589,31,1,0,0,0,590,
593,3,110,55,0,591,593,5,168,0,0,592,590,1,0,0,0,592,591,1,0,0,0,593,594,
1,0,0,0,594,595,5,153,0,0,595,596,3,122,61,0,596,33,1,0,0,0,597,598,5,13,
0,0,598,600,5,125,0,0,599,597,1,0,0,0,599,600,1,0,0,0,600,602,1,0,0,0,601,
603,3,36,18,0,602,601,1,0,0,0,602,603,1,0,0,0,603,605,1,0,0,0,604,606,3,
38,19,0,605,604,1,0,0,0,605,606,1,0,0,0,606,35,1,0,0,0,607,608,7,4,0,0,608,
609,3,120,60,0,609,37,1,0,0,0,610,611,5,23,0,0,611,612,3,120,60,0,612,39,
1,0,0,0,613,614,5,61,0,0,614,615,3,120,60,0,615,616,3,52,26,0,616,41,1,0,
0,0,617,618,5,62,0,0,618,619,5,63,0,0,619,620,3,120,60,0,620,621,3,52,26,
0,621,43,1,0,0,0,622,624,5,172,0,0,623,622,1,0,0,0,623,624,1,0,0,0,624,628,
1,0,0,0,625,629,3,46,23,0,626,629,3,48,24,0,627,629,3,50,25,0,628,625,1,
0,0,0,628,626,1,0,0,0,628,627,1,0,0,0,629,45,1,0,0,0,630,631,5,57,0,0,631,
632,5,3,0,0,632,633,5,59,0,0,633,634,3,120,60,0,634,637,3,52,26,0,635,636,
5,2,0,0,636,638,3,40,20,0,637,635,1,0,0,0,637,638,1,0,0,0,638,641,1,0,0,
0,639,640,5,2,0,0,640,642,3,42,21,0,641,639,1,0,0,0,641,642,1,0,0,0,642,
643,1,0,0,0,643,644,5,4,0,0,644,47,1,0,0,0,645,646,5,58,0,0,646,647,5,3,
0,0,647,648,5,59,0,0,648,649,3,120,60,0,649,650,3,52,26,0,650,651,5,2,0,
0,651,652,5,60,0,0,652,653,5,21,0,0,653,654,3,120,60,0,654,657,3,52,26,0,
655,656,5,2,0,0,656,658,3,40,20,0,657,655,1,0,0,0,657,658,1,0,0,0,658,661,
1,0,0,0,659,660,5,2,0,0,660,662,3,42,21,0,661,659,1,0,0,0,661,662,1,0,0,
0,662,663,1,0,0,0,663,664,5,4,0,0,664,49,1,0,0,0,665,666,5,120,0,0,666,667,
5,3,0,0,667,668,3,120,60,0,668,671,3,52,26,0,669,670,5,2,0,0,670,672,3,40,
20,0,671,669,1,0,0,0,671,672,1,0,0,0,672,675,1,0,0,0,673,674,5,2,0,0,674,
676,3,42,21,0,675,673,1,0,0,0,675,676,1,0,0,0,676,677,1,0,0,0,677,678,5,
4,0,0,678,51,1,0,0,0,679,680,7,5,0,0,680,53,1,0,0,0,681,686,3,90,45,0,682,
683,5,2,0,0,683,685,3,90,45,0,684,682,1,0,0,0,685,688,1,0,0,0,686,684,1,
0,0,0,686,687,1,0,0,0,687,702,1,0,0,0,688,686,1,0,0,0,689,698,5,3,0,0,690,
695,3,90,45,0,691,692,5,2,0,0,692,694,3,90,45,0,693,691,1,0,0,0,694,697,
1,0,0,0,695,693,1,0,0,0,695,696,1,0,0,0,696,699,1,0,0,0,697,695,1,0,0,0,
698,690,1,0,0,0,698,699,1,0,0,0,699,700,1,0,0,0,700,702,5,4,0,0,701,681,
1,0,0,0,701,689,1,0,0,0,702,55,1,0,0,0,703,708,3,90,45,0,704,705,5,2,0,0,
705,707,3,90,45,0,706,704,1,0,0,0,707,710,1,0,0,0,708,706,1,0,0,0,708,709,
1,0,0,0,709,724,1,0,0,0,710,708,1,0,0,0,711,720,5,3,0,0,712,717,3,90,45,
0,713,714,5,2,0,0,714,716,3,90,45,0,715,713,1,0,0,0,716,719,1,0,0,0,717,
715,1,0,0,0,717,718,1,0,0,0,718,721,1,0,0,0,719,717,1,0,0,0,720,712,1,0,
0,0,720,721,1,0,0,0,721,722,1,0,0,0,722,724,5,4,0,0,723,703,1,0,0,0,723,
711,1,0,0,0,724,57,1,0,0,0,725,734,5,3,0,0,726,731,3,90,45,0,727,728,5,2,
0,0,728,730,3,90,45,0,729,727,1,0,0,0,730,733,1,0,0,0,731,729,1,0,0,0,731,
732,1,0,0,0,732,735,1,0,0,0,733,731,1,0,0,0,734,726,1,0,0,0,734,735,1,0,
0,0,735,736,1,0,0,0,736,737,5,4,0,0,737,59,1,0,0,0,738,743,3,82,41,0,739,
741,5,14,0,0,740,739,1,0,0,0,740,741,1,0,0,0,741,742,1,0,0,0,742,744,3,110,
55,0,743,740,1,0,0,0,743,744,1,0,0,0,744,755,1,0,0,0,745,746,3,92,46,0,746,
747,5,166,0,0,747,748,5,161,0,0,748,755,1,0,0,0,749,750,3,110,55,0,750,751,
5,5,0,0,751,752,5,161,0,0,752,755,1,0,0,0,753,755,5,161,0,0,754,738,1,0,
0,0,754,745,1,0,0,0,754,749,1,0,0,0,754,753,1,0,0,0,755,61,1,0,0,0,756,758,
3,76,38,0,757,759,3,64,32,0,758,757,1,0,0,0,759,760,1,0,0,0,760,758,1,0,
0,0,760,761,1,0,0,0,761,764,1,0,0,0,762,764,3,76,38,0,763,756,1,0,0,0,763,
762,1,0,0,0,764,63,1,0,0,0,765,766,3,66,33,0,766,767,5,69,0,0,767,769,3,
76,38,0,768,770,3,68,34,0,769,768,1,0,0,0,769,770,1,0,0,0,770,771,1,0,0,
0,771,772,3,74,37,0,772,65,1,0,0,0,773,775,5,72,0,0,774,773,1,0,0,0,774,
775,1,0,0,0,775,789,1,0,0,0,776,778,5,70,0,0,777,779,5,71,0,0,778,777,1,
0,0,0,778,779,1,0,0,0,779,789,1,0,0,0,780,782,5,73,0,0,781,783,5,71,0,0,
782,781,1,0,0,0,782,783,1,0,0,0,783,789,1,0,0,0,784,786,5,74,0,0,785,787,
5,71,0,0,786,785,1,0,0,0,786,787,1,0,0,0,787,789,1,0,0,0,788,774,1,0,0,0,
788,776,1,0,0,0,788,780,1,0,0,0,788,784,1,0,0,0,789,67,1,0,0,0,790,791,5,
18,0,0,791,792,3,70,35,0,792,69,1,0,0,0,793,794,5,3,0,0,794,795,3,72,36,
0,795,796,5,2,0,0,796,797,3,72,36,0,797,799,5,4,0,0,798,800,3,42,21,0,799,
798,1,0,0,0,799,800,1,0,0,0,800,806,1,0,0,0,801,803,3,72,36,0,802,804,3,
42,21,0,803,802,1,0,0,0,803,804,1,0,0,0,804,806,1,0,0,0,805,793,1,0,0,0,
805,801,1,0,0,0,806,71,1,0,0,0,807,808,3,120,60,0,808,809,3,52,26,0,809,
73,1,0,0,0,810,811,5,75,0,0,811,812,3,84,42,0,812,75,1,0,0,0,813,818,3,80,
40,0,814,816,5,14,0,0,815,814,1,0,0,0,815,816,1,0,0,0,816,817,1,0,0,0,817,
819,3,118,59,0,818,815,1,0,0,0,818,819,1,0,0,0,819,77,1,0,0,0,820,821,5,
3,0,0,821,826,3,110,55,0,822,823,5,2,0,0,823,825,3,110,55,0,824,822,1,0,
0,0,825,828,1,0,0,0,826,824,1,0,0,0,826,827,1,0,0,0,827,829,1,0,0,0,828,
826,1,0,0,0,829,830,5,4,0,0,830,79,1,0,0,0,831,832,3,118,59,0,832,81,1,0,
0,0,833,834,3,84,42,0,834,83,1,0,0,0,835,836,6,42,-1,0,836,840,3,86,43,0,
837,838,5,28,0,0,838,840,3,84,42,3,839,835,1,0,0,0,839,837,1,0,0,0,840,849,
1,0,0,0,841,842,10,2,0,0,842,843,5,26,0,0,843,848,3,84,42,3,844,845,10,1,
0,0,845,846,5,25,0,0,846,848,3,84,42,2,847,841,1,0,0,0,847,844,1,0,0,0,848,
851,1,0,0,0,849,847,1,0,0,0,849,850,1,0,0,0,850,85,1,0,0,0,851,849,1,0,0,
0,852,854,3,90,45,0,853,855,3,88,44,0,854,853,1,0,0,0,854,855,1,0,0,0,855,
87,1,0,0,0,856,857,3,98,49,0,857,858,3,90,45,0,858,904,1,0,0,0,859,861,5,
28,0,0,860,859,1,0,0,0,860,861,1,0,0,0,861,862,1,0,0,0,862,863,5,30,0,0,
863,864,3,90,45,0,864,865,5,26,0,0,865,866,3,90,45,0,866,904,1,0,0,0,867,
869,5,28,0,0,868,867,1,0,0,0,868,869,1,0,0,0,869,870,1,0,0,0,870,871,5,27,
0,0,871,872,5,3,0,0,872,877,3,82,41,0,873,874,5,2,0,0,874,876,3,82,41,0,
875,873,1,0,0,0,876,879,1,0,0,0,877,875,1,0,0,0,877,878,1,0,0,0,878,880,
1,0,0,0,879,877,1,0,0,0,880,881,5,4,0,0,881,904,1,0,0,0,882,884,5,28,0,0,
883,882,1,0,0,0,883,884,1,0,0,0,884,885,1,0,0,0,885,886,5,31,0,0,886,889,
3,90,45,0,887,888,5,32,0,0,888,890,5,168,0,0,889,887,1,0,0,0,889,890,1,0,
0,0,890,904,1,0,0,0,891,893,5,33,0,0,892,894,5,28,0,0,893,892,1,0,0,0,893,
894,1,0,0,0,894,895,1,0,0,0,895,904,5,34,0,0,896,898,5,33,0,0,897,899,5,
28,0,0,898,897,1,0,0,0,898,899,1,0,0,0,899,900,1,0,0,0,900,901,5,16,0,0,
901,902,5,13,0,0,902,904,3,90,45,0,903,856,1,0,0,0,903,860,1,0,0,0,903,868,
1,0,0,0,903,883,1,0,0,0,903,891,1,0,0,0,903,896,1,0,0,0,904,89,1,0,0,0,905,
906,6,45,-1,0,906,910,3,92,46,0,907,908,7,6,0,0,908,910,3,90,45,4,909,905,
1,0,0,0,909,907,1,0,0,0,910,925,1,0,0,0,911,912,10,3,0,0,912,913,7,7,0,0,
913,924,3,90,45,4,914,915,10,2,0,0,915,916,7,6,0,0,916,924,3,90,45,3,917,
918,10,1,0,0,918,919,5,164,0,0,919,924,3,90,45,2,920,921,10,5,0,0,921,922,
5,24,0,0,922,924,3,96,48,0,923,911,1,0,0,0,923,914,1,0,0,0,923,917,1,0,0,
0,923,920,1,0,0,0,924,927,1,0,0,0,925,923,1,0,0,0,925,926,1,0,0,0,926,91,
1,0,0,0,927,925,1,0,0,0,928,929,6,46,-1,0,929,1050,3,122,61,0,930,931,3,
110,55,0,931,932,5,168,0,0,932,1050,1,0,0,0,933,934,5,64,0,0,934,936,3,90,
45,0,935,937,3,108,54,0,936,935,1,0,0,0,937,938,1,0,0,0,938,936,1,0,0,0,
938,939,1,0,0,0,939,942,1,0,0,0,940,941,5,67,0,0,941,943,3,82,41,0,942,940,
1,0,0,0,942,943,1,0,0,0,943,944,1,0,0,0,944,945,5,68,0,0,945,1050,1,0,0,
0,946,948,5,64,0,0,947,949,3,108,54,0,948,947,1,0,0,0,949,950,1,0,0,0,950,
948,1,0,0,0,950,951,1,0,0,0,951,954,1,0,0,0,952,953,5,67,0,0,953,955,3,82,
41,0,954,952,1,0,0,0,954,955,1,0,0,0,955,956,1,0,0,0,956,957,5,68,0,0,957,
1050,1,0,0,0,958,959,5,95,0,0,959,960,5,3,0,0,960,961,3,82,41,0,961,962,
5,14,0,0,962,963,3,102,51,0,963,964,5,4,0,0,964,1050,1,0,0,0,965,966,5,114,
0,0,966,975,5,6,0,0,967,972,3,82,41,0,968,969,5,2,0,0,969,971,3,82,41,0,
970,968,1,0,0,0,971,974,1,0,0,0,972,970,1,0,0,0,972,973,1,0,0,0,973,976,
1,0,0,0,974,972,1,0,0,0,975,967,1,0,0,0,975,976,1,0,0,0,976,977,1,0,0,0,
977,1050,5,7,0,0,978,979,5,115,0,0,979,993,5,3,0,0,980,981,3,82,41,0,981,
982,5,165,0,0,982,990,3,82,41,0,983,984,5,2,0,0,984,985,3,82,41,0,985,986,
5,165,0,0,986,987,3,82,41,0,987,989,1,0,0,0,988,983,1,0,0,0,989,992,1,0,
0,0,990,988,1,0,0,0,990,991,1,0,0,0,991,994,1,0,0,0,992,990,1,0,0,0,993,
980,1,0,0,0,993,994,1,0,0,0,994,995,1,0,0,0,995,1050,5,4,0,0,996,997,5,77,
0,0,997,1011,5,3,0,0,998,999,3,110,55,0,999,1000,5,165,0,0,1000,1008,3,82,
41,0,1001,1002,5,2,0,0,1002,1003,3,110,55,0,1003,1004,5,165,0,0,1004,1005,
3,82,41,0,1005,1007,1,0,0,0,1006,1001,1,0,0,0,1007,1010,1,0,0,0,1008,1006,
1,0,0,0,1008,1009,1,0,0,0,1009,1012,1,0,0,0,1010,1008,1,0,0,0,1011,998,1,
0,0,0,1011,1012,1,0,0,0,1012,1013,1,0,0,0,1013,1050,5,4,0,0,1014,1015,3,
110,55,0,1015,1016,5,3,0,0,1016,1017,5,161,0,0,1017,1018,5,4,0,0,1018,1050,
1,0,0,0,1019,1020,3,110,55,0,1020,1036,5,3,0,0,1021,1026,3,94,47,0,1022,
1023,5,2,0,0,1023,1025,3,94,47,0,1024,1022,1,0,0,0,1025,1028,1,0,0,0,1026,
1024,1,0,0,0,1026,1027,1,0,0,0,1027,1033,1,0,0,0,1028,1026,1,0,0,0,1029,
1030,5,2,0,0,1030,1032,3,112,56,0,1031,1029,1,0,0,0,1032,1035,1,0,0,0,1033,
1031,1,0,0,0,1033,1034,1,0,0,0,1034,1037,1,0,0,0,1035,1033,1,0,0,0,1036,
1021,1,0,0,0,1036,1037,1,0,0,0,1037,1038,1,0,0,0,1038,1039,5,4,0,0,1039,
1050,1,0,0,0,1040,1050,3,110,55,0,1041,1042,3,110,55,0,1042,1043,5,5,0,0,
1043,1044,3,110,55,0,1044,1050,1,0,0,0,1045,1046,5,3,0,0,1046,1047,3,82,
41,0,1047,1048,5,4,0,0,1048,1050,1,0,0,0,1049,928,1,0,0,0,1049,930,1,0,0,
0,1049,933,1,0,0,0,1049,946,1,0,0,0,1049,958,1,0,0,0,1049,965,1,0,0,0,1049,
978,1,0,0,0,1049,996,1,0,0,0,1049,1014,1,0,0,0,1049,1019,1,0,0,0,1049,1040,
1,0,0,0,1049,1041,1,0,0,0,1049,1045,1,0,0,0,1050,1061,1,0,0,0,1051,1052,
10,5,0,0,1052,1053,5,6,0,0,1053,1054,3,90,45,0,1054,1055,5,7,0,0,1055,1060,
1,0,0,0,1056,1057,10,2,0,0,1057,1058,5,166,0,0,1058,1060,3,110,55,0,1059,
1051,1,0,0,0,1059,1056,1,0,0,0,1060,1063,1,0,0,0,1061,1059,1,0,0,0,1061,
1062,1,0,0,0,1062,93,1,0,0,0,1063,1061,1,0,0,0,1064,1067,3,82,41,0,1065,
1067,3,52,26,0,1066,1064,1,0,0,0,1066,1065,1,0,0,0,1067,95,1,0,0,0,1068,
1069,5,39,0,0,1069,1070,5,56,0,0,1070,1071,5,168,0,0,1071,97,1,0,0,0,1072,
1073,7,8,0,0,1073,99,1,0,0,0,1074,1075,7,9,0,0,1075,101,1,0,0,0,1076,1077,
6,51,-1,0,1077,1078,5,114,0,0,1078,1079,5,155,0,0,1079,1080,3,102,51,0,1080,
1081,5,157,0,0,1081,1127,1,0,0,0,1082,1083,5,115,0,0,1083,1084,5,155,0,0,
1084,1085,3,102,51,0,1085,1086,5,2,0,0,1086,1087,3,102,51,0,1087,1088,5,
157,0,0,1088,1127,1,0,0,0,1089,1090,5,77,0,0,1090,1102,5,155,0,0,1091,1092,
3,110,55,0,1092,1099,3,102,51,0,1093,1094,5,2,0,0,1094,1095,3,110,55,0,1095,
1096,3,102,51,0,1096,1098,1,0,0,0,1097,1093,1,0,0,0,1098,1101,1,0,0,0,1099,
1097,1,0,0,0,1099,1100,1,0,0,0,1100,1103,1,0,0,0,1101,1099,1,0,0,0,1102,
1091,1,0,0,0,1102,1103,1,0,0,0,1103,1104,1,0,0,0,1104,1127,5,157,0,0,1105,
1106,5,129,0,0,1106,1107,5,3,0,0,1107,1108,3,120,60,0,1108,1109,5,2,0,0,
1109,1110,3,120,60,0,1110,1111,5,4,0,0,1111,1127,1,0,0,0,1112,1124,3,106,
53,0,1113,1114,5,3,0,0,1114,1119,3,104,52,0,1115,1116,5,2,0,0,1116,1118,
3,104,52,0,1117,1115,1,0,0,0,1118,1121,1,0,0,0,1119,1117,1,0,0,0,1119,1120,
1,0,0,0,1120,1122,1,0,0,0,1121,1119,1,0,0,0,1122,1123,5,4,0,0,1123,1125,
1,0,0,0,1124,1113,1,0,0,0,1124,1125,1,0,0,0,1125,1127,1,0,0,0,1126,1076,
1,0,0,0,1126,1082,1,0,0,0,1126,1089,1,0,0,0,1126,1105,1,0,0,0,1126,1112,
1,0,0,0,1127,1132,1,0,0,0,1128,1129,10,6,0,0,1129,1131,5,114,0,0,1130,1128,
1,0,0,0,1131,1134,1,0,0,0,1132,1130,1,0,0,0,1132,1133,1,0,0,0,1133,103,1,
0,0,0,1134,1132,1,0,0,0,1135,1136,7,10,0,0,1136,105,1,0,0,0,1137,1138,3,
110,55,0,1138,107,1,0,0,0,1139,1140,5,65,0,0,1140,1141,3,82,41,0,1141,1142,
5,66,0,0,1142,1143,3,82,41,0,1143,109,1,0,0,0,1144,1151,5,176,0,0,1145,1151,
5,172,0,0,1146,1151,5,174,0,0,1147,1151,3,124,62,0,1148,1151,5,175,0,0,1149,
1151,5,173,0,0,1150,1144,1,0,0,0,1150,1145,1,0,0,0,1150,1146,1,0,0,0,1150,
1147,1,0,0,0,1150,1148,1,0,0,0,1150,1149,1,0,0,0,1151,111,1,0,0,0,1152,1153,
3,110,55,0,1153,1154,5,167,0,0,1154,1155,3,82,41,0,1155,1170,1,0,0,0,1156,
1157,5,3,0,0,1157,1162,3,110,55,0,1158,1159,5,2,0,0,1159,1161,3,110,55,0,
1160,1158,1,0,0,0,1161,1164,1,0,0,0,1162,1160,1,0,0,0,1162,1163,1,0,0,0,
1163,1165,1,0,0,0,1164,1162,1,0,0,0,1165,1166,5,4,0,0,1166,1167,5,167,0,
0,1167,1168,3,82,41,0,1168,1170,1,0,0,0,1169,1152,1,0,0,0,1169,1156,1,0,
0,0,1170,113,1,0,0,0,1171,1172,5,172,0,0,1172,115,1,0,0,0,1173,1174,5,168,
0,0,1174,117,1,0,0,0,1175,1176,3,110,55,0,1176,119,1,0,0,0,1177,1179,5,160,
0,0,1178,1177,1,0,0,0,1178,1179,1,0,0,0,1179,1180,1,0,0,0,1180,1190,5,170,
0,0,1181,1183,5,160,0,0,1182,1181,1,0,0,0,1182,1183,1,0,0,0,1183,1184,1,
0,0,0,1184,1190,5,171,0,0,1185,1187,5,160,0,0,1186,1185,1,0,0,0,1186,1187,
1,0,0,0,1187,1188,1,0,0,0,1188,1190,5,169,0,0,1189,1178,1,0,0,0,1189,1182,
1,0,0,0,1189,1186,1,0,0,0,1190,121,1,0,0,0,1191,1197,5,34,0,0,1192,1197,
3,120,60,0,1193,1197,3,100,50,0,1194,1197,5,168,0,0,1195,1197,5,176,0,0,
1196,1191,1,0,0,0,1196,1192,1,0,0,0,1196,1193,1,0,0,0,1196,1194,1,0,0,0,
1196,1195,1,0,0,0,1197,123,1,0,0,0,1198,1199,7,11,0,0,1199,125,1,0,0,0,154,
129,141,144,157,161,166,171,177,190,195,210,245,248,254,258,262,267,273,
278,286,289,295,299,303,308,314,319,330,341,349,358,363,369,374,380,386,
393,403,414,420,426,429,434,439,443,446,448,454,464,473,477,483,487,489,
497,505,512,516,521,526,530,534,537,547,558,566,569,577,585,592,599,602,
605,623,628,637,641,657,661,671,675,686,695,698,701,708,717,720,723,731,
734,740,743,754,760,763,769,774,778,782,786,788,799,803,805,815,818,826,
839,847,849,854,860,868,877,883,889,893,898,903,909,923,925,938,942,950,
954,972,975,990,993,1008,1011,1026,1033,1036,1049,1059,1061,1066,1099,1102,
1119,1124,1126,1132,1150,1162,1169,1178,1182,1186,1189,1196];
const atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN);
const decisionsToDFA = atn.decisionToState.map( (ds, index) => new antlr4.dfa.DFA(ds, index) );
const sharedContextCache = new antlr4.atn.PredictionContextCache();
export default class SqlBaseParser extends antlr4.Parser {
static grammarFileName = "SqlBase.g4";
static literalNames = [ null, "';'", "','", "'('", "')'", "'.'", "'['",
"']'", "'STRING'", "'EMIT'", "'CHANGES'", "'FINAL'",
"'SELECT'", "'FROM'", "'AS'", "'ALL'", "'DISTINCT'",
"'WHERE'", "'WITHIN'", "'WINDOW'", "'GROUP'",
"'BY'", "'HAVING'", "'LIMIT'", "'AT'", "'OR'",
"'AND'", "'IN'", "'NOT'", "'EXISTS'", "'BETWEEN'",
"'LIKE'", "'ESCAPE'", "'IS'", "'NULL'", "'TRUE'",
"'FALSE'", "'INTEGER'", "'DATE'", "'TIME'",
"'TIMESTAMP'", "'INTERVAL'", "'YEAR'", "'MONTH'",
"'DAY'", "'HOUR'", "'MINUTE'", "'SECOND'", "'MILLISECOND'",
"'YEARS'", "'MONTHS'", "'DAYS'", "'HOURS'",
"'MINUTES'", "'SECONDS'", "'MILLISECONDS'",
"'ZONE'", "'TUMBLING'", "'HOPPING'", "'SIZE'",
"'ADVANCE'", "'RETENTION'", "'GRACE'", "'PERIOD'",
"'CASE'", "'WHEN'", "'THEN'", "'ELSE'", "'END'",
"'JOIN'", "'FULL'", "'OUTER'", "'INNER'", "'LEFT'",
"'RIGHT'", "'ON'", "'PARTITION'", "'STRUCT'",
"'WITH'", "'VALUES'", "'CREATE'", "'TABLE'",
"'TOPIC'", "'STREAM'", "'STREAMS'", "'INSERT'",
"'DELETE'", "'INTO'", "'DESCRIBE'", "'EXTENDED'",
"'PRINT'", "'EXPLAIN'", "'ANALYZE'", "'TYPE'",
"'TYPES'", "'CAST'", "'SHOW'", "'LIST'", "'TABLES'",
"'TOPICS'", "'QUERY'", "'QUERIES'", "'TERMINATE'",
"'PAUSE'", "'RESUME'", "'LOAD'", "'COLUMNS'",
"'COLUMN'", "'PARTITIONS'", "'FUNCTIONS'", "'FUNCTION'",
"'DROP'", "'TO'", "'RENAME'", "'ARRAY'", "'MAP'",
"'SET'", "'DEFINE'", "'UNDEFINE'", "'RESET'",
"'SESSION'", "'SAMPLE'", "'EXPORT'", "'CATALOG'",
"'PROPERTIES'", "'BEGINNING'", "'UNSET'", "'RUN'",
"'SCRIPT'", "'DECIMAL'", "'KEY'", "'CONNECTOR'",
"'CONNECTORS'", "'SINK'", "'SOURCE'", "'NAMESPACE'",
"'MATERIALIZED'", "'VIEW'", "'PRIMARY'", "'REPLACE'",
"'ASSERT'", "'ADD'", "'ALTER'", "'VARIABLES'",
"'PLUGINS'", "'HEADERS'", "'HEADER'", "'SYSTEM'",
"'TIMEOUT'", "'SCHEMA'", "'SUBJECT'", "'ID'",
"'IF'", "'='", null, "'<'", "'<='", "'>'", "'>='",
"'+'", "'-'", "'*'", "'/'", "'%'", "'||'", "':='",
"'->'", "'=>'" ];
static symbolicNames = [ null, null, null, null, null, null, null, null,
null, "EMIT", "CHANGES", "FINAL", "SELECT",
"FROM", "AS", "ALL", "DISTINCT", "WHERE", "WITHIN",
"WINDOW", "GROUP", "BY", "HAVING", "LIMIT",
"AT", "OR", "AND", "IN", "NOT", "EXISTS", "BETWEEN",
"LIKE", "ESCAPE", "IS", "NULL", "TRUE", "FALSE",
"INTEGER", "DATE", "TIME", "TIMESTAMP", "INTERVAL",
"YEAR", "MONTH", "DAY", "HOUR", "MINUTE", "SECOND",
"MILLISECOND", "YEARS", "MONTHS", "DAYS", "HOURS",
"MINUTES", "SECONDS", "MILLISECONDS", "ZONE",
"TUMBLING", "HOPPING", "SIZE", "ADVANCE", "RETENTION",
"GRACE", "PERIOD", "CASE", "WHEN", "THEN",
"ELSE", "END", "JOIN", "FULL", "OUTER", "INNER",
"LEFT", "RIGHT", "ON", "PARTITION", "STRUCT",
"WITH", "VALUES", "CREATE", "TABLE", "TOPIC",
"STREAM", "STREAMS", "INSERT", "DELETE", "INTO",
"DESCRIBE", "EXTENDED", "PRINT", "EXPLAIN",
"ANALYZE", "TYPE", "TYPES", "CAST", "SHOW",
"LIST", "TABLES", "TOPICS", "QUERY", "QUERIES",
"TERMINATE", "PAUSE", "RESUME", "LOAD", "COLUMNS",
"COLUMN", "PARTITIONS", "FUNCTIONS", "FUNCTION",
"DROP", "TO", "RENAME", "ARRAY", "MAP", "SET",
"DEFINE", "UNDEFINE", "RESET", "SESSION", "SAMPLE",
"EXPORT", "CATALOG", "PROPERTIES", "BEGINNING",
"UNSET", "RUN", "SCRIPT", "DECIMAL", "KEY",
"CONNECTOR", "CONNECTORS", "SINK", "SOURCE",
"NAMESPACE", "MATERIALIZED", "VIEW", "PRIMARY",
"REPLACE", "ASSERT", "ADD", "ALTER", "VARIABLES",
"PLUGINS", "HEADERS", "HEADER", "SYSTEM", "TIMEOUT",
"SCHEMA", "SUBJECT", "ID", "IF", "EQ", "NEQ",
"LT", "LTE", "GT", "GTE", "PLUS", "MINUS",
"ASTERISK", "SLASH", "PERCENT", "CONCAT", "ASSIGN",
"STRUCT_FIELD_REF", "LAMBDA_EXPRESSION", "STRING",
"INTEGER_VALUE", "DECIMAL_VALUE", "FLOATING_POINT_VALUE",
"IDENTIFIER", "DIGIT_IDENTIFIER", "QUOTED_IDENTIFIER",
"BACKQUOTED_IDENTIFIER", "VARIABLE", "SIMPLE_COMMENT",
"DIRECTIVE_COMMENT", "BRACKETED_COMMENT", "WS",
"UNRECOGNIZED", "DELIMITER" ];
static ruleNames = [ "statements", "testStatement", "singleStatement",
"singleExpression", "statement", "assertStatement",
"runScript", "resourceName", "query", "resultMaterialization",
"timeout", "alterOption", "tableElements", "tableElement",
"columnConstraints", "tableProperties", "tableProperty",
"printClause", "intervalClause", "limitClause",
"retentionClause", "gracePeriodClause", "windowExpression",
"tumblingWindowExpression", "hoppingWindowExpression",
"sessionWindowExpression", "windowUnit", "groupBy",
"partitionBy", "values", "selectItem", "relation",
"joinedSource", "joinType", "joinWindow", "withinExpression",
"joinWindowSize", "joinCriteria", "aliasedRelation",
"columns", "relationPrimary", "expression", "booleanExpression",
"predicated", "predicate", "valueExpression", "primaryExpression",
"functionArgument", "timeZoneSpecifier", "comparisonOperator",
"booleanValue", "type", "typeParameter", "baseType",
"whenClause", "identifier", "lambdaFunction", "variableName",
"variableValue", "sourceName", "number", "literal",
"nonReserved" ];
constructor(input) {
super(input);
this._interp = new antlr4.atn.ParserATNSimulator(this, atn, decisionsToDFA, sharedContextCache);
this.ruleNames = SqlBaseParser.ruleNames;
this.literalNames = SqlBaseParser.literalNames;
this.symbolicNames = SqlBaseParser.symbolicNames;
}
sempred(localctx, ruleIndex, predIndex) {
switch(ruleIndex) {
case 42:
return this.booleanExpression_sempred(localctx, predIndex);
case 45:
return this.valueExpression_sempred(localctx, predIndex);
case 46:
return this.primaryExpression_sempred(localctx, predIndex);
case 51:
return this.type_sempred(localctx, predIndex);
default:
throw "No predicate with index:" + ruleIndex;
}
}
booleanExpression_sempred(localctx, predIndex) {
switch(predIndex) {
case 0:
return this.precpred(this._ctx, 2);
case 1:
return this.precpred(this._ctx, 1);
default:
throw "No predicate with index:" + predIndex;
}
};
valueExpression_sempred(localctx, predIndex) {
switch(predIndex) {
case 2:
return this.precpred(this._ctx, 3);
case 3:
return this.precpred(this._ctx, 2);
case 4:
return this.precpred(this._ctx, 1);
case 5:
return this.precpred(this._ctx, 5);
default:
throw "No predicate with index:" + predIndex;
}
};
primaryExpression_sempred(localctx, predIndex) {
switch(predIndex) {
case 6:
return this.precpred(this._ctx, 5);
case 7:
return this.precpred(this._ctx, 2);
default:
throw "No predicate with index:" + predIndex;
}
};
type_sempred(localctx, predIndex) {
switch(predIndex) {
case 8:
return this.precpred(this._ctx, 6);
default:
throw "No predicate with index:" + predIndex;
}
};
statements() {
let localctx = new StatementsContext(this, this._ctx, this.state);
this.enterRule(localctx, 0, SqlBaseParser.RULE_statements);
var _la = 0;
try {
this.enterOuterAlt(localctx, 1);
this.state = 129;
this._errHandler.sync(this);
_la = this._input.LA(1);
while(_la===12 || ((((_la - 80)) & ~0x1f) === 0 && ((1 << (_la - 80)) & 2177043745) !== 0) || ((((_la - 116)) & ~0x1f) === 0 && ((1 << (_la - 116)) & 83887111) !== 0)) {
this.state = 126;
this.singleStatement();
this.state = 131;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 132;
this.match(SqlBaseParser.EOF);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
}
testStatement() {
let localctx = new TestStatementContext(this, this._ctx, this.state);
this.enterRule(localctx, 2, SqlBaseParser.RULE_testStatement);
try {
this.enterOuterAlt(localctx, 1);
this.state = 141;
this._errHandler.sync(this);
var la_ = this._interp.adaptivePredict(this._input,1,this._ctx);
switch(la_) {
case 1:
this.state = 134;
this.singleStatement();
break;
case 2:
this.state = 135;
this.assertStatement();
this.state = 136;
this.match(SqlBaseParser.T__0);
break;
case 3:
this.state = 138;
this.runScript();
this.state = 139;
this.match(SqlBaseParser.T__0);
break;
}
this.state = 144;
this._errHandler.sync(this);
var la_ = this._interp.adaptivePredict(this._input,2,this._ctx);
if(la_===1) {
this.state = 143;
this.match(SqlBaseParser.EOF);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
}
singleStatement() {
let localctx = new SingleStatementContext(this, this._ctx, this.state);
this.enterRule(localctx, 4, SqlBaseParser.RULE_singleStatement);
try {
this.enterOuterAlt(localctx, 1);
this.state = 146;
this.statement();
this.state = 147;
this.match(SqlBaseParser.T__0);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
}
singleExpression() {
let localctx = new SingleExpressionContext(this, this._ctx, this.state);
this.enterRule(localctx, 6, SqlBaseParser.RULE_singleExpression);
try {
this.enterOuterAlt(localctx, 1);
this.state = 149;
this.expression();
this.state = 150;
this.match(SqlBaseParser.EOF);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
}
statement() {
let localctx = new StatementContext(this, this._ctx, this.state);
this.enterRule(localctx, 8, SqlBaseParser.RULE_statement);
var _la = 0;
try {
this.state = 448;
this._errHandler.sync(this);
var la_ = this._interp.adaptivePredict(this._input,46,this._ctx);
switch(la_) {
case 1:
localctx = new QueryStatementContext(this, localctx);
this.enterOuterAlt(localctx, 1);
this.state = 152;
this.query();
break;
case 2:
localctx = new ListPropertiesContext(this, localctx);
this.enterOuterAlt(localctx, 2);
this.state = 153;
_la = this._input.LA(1);
if(!(_la===96 || _la===97)) {
this._errHandler.recoverInline(this);
}
else {
this._errHandler.reportMatch(this);
this.consume();
}
this.state = 154;
this.match(SqlBaseParser.PROPERTIES);
break;
case 3:
localctx = new ListTopicsContext(this, localctx);
this.enterOuterAlt(localctx, 3);
this.state = 155;
_la = this._input.LA(1);
if(!(_la===96 || _la===97)) {
this._errHandler.recoverInline(this);
}
else {
this._errHandler.reportMatch(this);
this.consume();
}
this.state = 157;
this._errHandler.sync(this);
_la = this._input.LA(1);
if(_la===15) {
this.state = 156;
this.match(SqlBaseParser.ALL);
}
this.state = 159;
this.match(SqlBaseParser.TOPICS);
this.state = 161;
this._errHandler.sync(this);
_la = this._input.LA(1);
if(_la===89) {
this.state = 160;
this.match(SqlBaseParser.EXTENDED);
}
break;
case 4:
localctx = new ListStreamsContext(this, localctx);
this.enterOuterAlt(localctx, 4);
this.state = 163;
_la = this._input.LA(1);
if(!(_la===96 || _la===97)) {
this._errHandler.recoverInline(this);
}
else {
this._errHandler.reportMatch(this);
this.consume();
}
this.state = 164;
this.match(SqlBaseParser.STREAMS);
this.state = 166;
this._errHandler.sync(this);
_la = this._input.LA(1);
if(_la===89) {
this.state = 165;
this.match(SqlBaseParser.EXTENDED);
}
break;
case 5:
localctx = new ListTablesContext(this, localctx);
this.enterOuterAlt(localctx, 5);
this.state = 168;
_la = this._input.LA(1);
if(!(_la===96 || _la===97)) {
this._errHandler.recoverInline(this);
}
else {
this._errHandler.reportMatch(this);
this.consume();
}
this.state = 169;
this.match(SqlBaseParser.TABLES);
this.state = 171;
this._errHandler.sync(this);
_la = this._input.LA(1);
if(_la===89) {
this.state = 170;
this.match(SqlBaseParser.EXTENDED);
}
break;
case 6:
localctx = new ListFunctionsContext(this, localctx);
this.enterOuterAlt(localctx, 6);
this.state = 173;
_la = this._input.LA(1);
if(!(_la===96 || _la===97)) {
this._errHandler.recoverInline(this);
}
else {
this._errHandler.reportMatch(this);
this.consume();
}
this.state = 174;
this.match(SqlBaseParser.FUNCTIONS);
break;
case 7:
localctx = new ListConnectorsContext(this, localctx);
this.enterOuterAlt(localctx, 7);
this.state = 175;
_la = this._input.LA(1);
if(!(_la===96 || _la===97)) {
this._errHandler.recoverInline(this);
}
else {
this._errHandler.reportMatch(this);
this.consume();
}
this.state = 177;
this._errHandler.sync(this);
_la = this._input.LA(1);
if(_la===133 || _la===134) {
this.state = 176;
_la = this._input.LA(1);
if(!(_la===133 || _la===134)) {
this._errHandler.recoverInline(this);
}
else {
this._errHandler.reportMatch(this);
this.consume();
}