omlish 0.0.0.dev252__py3-none-any.whl → 0.0.0.dev253__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
omlish/__about__.py CHANGED
@@ -1,5 +1,5 @@
1
- __version__ = '0.0.0.dev252'
2
- __revision__ = '7dc2af77cc02ef4529b3c5f8aeeee1c08886a806'
1
+ __version__ = '0.0.0.dev253'
2
+ __revision__ = '87d5615719183def315c54d7b281f939c270c396'
3
3
 
4
4
 
5
5
  #
File without changes
@@ -0,0 +1,289 @@
1
+ grammar Minisql;
2
+
3
+
4
+ tokens {
5
+ DELIMITER
6
+ }
7
+
8
+
9
+ singleStmt
10
+ : select ';' EOF
11
+ ;
12
+
13
+ select
14
+ : cteSelect
15
+ ;
16
+
17
+ cteSelect
18
+ : (WITH cte (',' cte)*)? unionSelect
19
+ ;
20
+
21
+ cte
22
+ : ident AS '(' select ')'
23
+ ;
24
+
25
+ unionSelect
26
+ : primarySelect unionItem*
27
+ ;
28
+
29
+ unionItem
30
+ : UNION setQuantifier? primarySelect
31
+ ;
32
+
33
+ primarySelect
34
+ : SELECT setQuantifier? selectItem (',' selectItem)*
35
+ (FROM relation (',' relation)*)?
36
+ (WHERE where=booleanExpr)?
37
+ (GROUP BY groupBy)?
38
+ (HAVING having=booleanExpr)?
39
+ (ORDER BY sortItem (',' sortItem)*)?
40
+ ;
41
+
42
+ selectItem
43
+ : '*' #allSelectItem
44
+ | expr (AS? ident)? #exprSelectItem
45
+ ;
46
+
47
+ expr
48
+ : booleanExpr
49
+ ;
50
+
51
+ booleanExpr
52
+ : valueExpr predicate[$valueExpr.ctx]? #predicatedBooleanExpr
53
+ | op=NOT booleanExpr #unaryBooleanExpr
54
+ | booleanExpr op=(AND | OR) booleanExpr #binaryBooleanExpr
55
+ | booleanExpr '::' ident #castBooleanExpr
56
+ ;
57
+
58
+ predicate[ParserRuleContext value]
59
+ : cmpOp right=valueExpr #cmpPredicate
60
+ | IS NOT? NULL #isNullPredicate
61
+ | NOT? IN '(' expr (',' expr)* ')' #inListPredicate
62
+ | NOT? IN '(' select ')' #inSelectPredicate
63
+ | NOT? LIKE expr #likePredicate
64
+ ;
65
+
66
+ valueExpr
67
+ : primaryExpr #primaryValueExpr
68
+ | op=unaryOp valueExpr #unaryValueExpr
69
+ | left=valueExpr op=arithOp right=valueExpr #arithValueExpr
70
+ ;
71
+
72
+ primaryExpr
73
+ : qualifiedName '(' (expr (',' expr)*)? ')' over? #functionCallExpr
74
+ | qualifiedName '(' '*' ')' over? #starFunctionCallExpr
75
+ | CASE caseItem* (ELSE expr)? END #caseExpr
76
+ | '(' select ')' #selectExpr
77
+ | '(' expr ')' #parenExpr
78
+ | simpleExpr #simplePrimaryExpr
79
+ ;
80
+
81
+ simpleExpr
82
+ : qualifiedName
83
+ | number
84
+ | string
85
+ | null
86
+ | true
87
+ | false
88
+ ;
89
+
90
+ caseItem
91
+ : WHEN expr THEN expr
92
+ ;
93
+
94
+ over
95
+ : OVER '(' (ORDER BY sortItem (',' sortItem)*)? ')'
96
+ ;
97
+
98
+ sortItem
99
+ : expr direction=(ASC | DESC)?
100
+ ;
101
+
102
+ relation
103
+ : relation AS? ident #aliasedRelation
104
+ | left=relation ty=joinType? JOIN right=relation (ON cond=booleanExpr)? #joinRelation
105
+ | '(' select ')' #selectRelation
106
+ | '(' relation ')' #parenRelation
107
+ | qualifiedName #tableRelation
108
+ ;
109
+
110
+ groupBy
111
+ : expr (',' expr)*
112
+ ;
113
+
114
+ qualifiedName
115
+ : ident ('.' ident)*
116
+ ;
117
+
118
+ identList
119
+ : ident (',' ident)*
120
+ ;
121
+
122
+ ident
123
+ : unquotedIdent
124
+ | quotedIdent
125
+ ;
126
+
127
+ quotedIdent
128
+ : QUOTED_IDENT
129
+ ;
130
+
131
+ number
132
+ : INTEGER_VALUE #integerNumber
133
+ | DECIMAL_VALUE #decimalNumber
134
+ | FLOAT_VALUE #floatNumber
135
+ ;
136
+
137
+ string
138
+ : STRING
139
+ ;
140
+
141
+ null
142
+ : NULL
143
+ ;
144
+
145
+ true
146
+ : TRUE
147
+ ;
148
+
149
+ false
150
+ : FALSE
151
+ ;
152
+
153
+ setQuantifier
154
+ : DISTINCT
155
+ | ALL
156
+ ;
157
+
158
+ joinType
159
+ : INNER
160
+ | LEFT
161
+ | LEFT OUTER
162
+ | RIGHT
163
+ | RIGHT OUTER
164
+ | FULL
165
+ | FULL OUTER
166
+ | CROSS
167
+ | NATURAL
168
+ ;
169
+
170
+ cmpOp
171
+ : '='
172
+ | '!='
173
+ | '<>'
174
+ | '<'
175
+ | '<='
176
+ | '>'
177
+ | '>='
178
+ ;
179
+
180
+ arithOp
181
+ : '+'
182
+ | '-'
183
+ | '*'
184
+ | '/'
185
+ | '%'
186
+ | '||'
187
+ ;
188
+
189
+ unaryOp
190
+ : '+'
191
+ | '-'
192
+ ;
193
+
194
+ unquotedIdent
195
+ : IDENT
196
+
197
+ | LEFT
198
+ | RIGHT
199
+
200
+ ;
201
+
202
+ ALL: 'all';
203
+ AND: 'and';
204
+ AS: 'as';
205
+ ASC: 'asc';
206
+ BY: 'by';
207
+ CASE: 'case';
208
+ CROSS: 'cross';
209
+ DESC: 'desc';
210
+ DISTINCT: 'distinct';
211
+ ELSE: 'else';
212
+ END: 'end';
213
+ FALSE: 'false';
214
+ FROM: 'from';
215
+ FULL: 'full';
216
+ GROUP: 'group';
217
+ HAVING: 'having';
218
+ IN: 'in';
219
+ INNER: 'inner';
220
+ IS: 'is';
221
+ JOIN: 'join';
222
+ LEFT: 'left';
223
+ LIKE: 'like';
224
+ NATURAL: 'natural';
225
+ NOT: 'not';
226
+ NULL: 'null';
227
+ ON: 'on';
228
+ OR: 'or';
229
+ ORDER: 'order';
230
+ OUTER: 'outer';
231
+ OVER: 'over';
232
+ RIGHT: 'right';
233
+ SELECT: 'select';
234
+ THEN: 'then';
235
+ TRUE: 'true';
236
+ UNION: 'union';
237
+ WHEN: 'when';
238
+ WHERE: 'where';
239
+ WITH: 'with';
240
+
241
+ STRING
242
+ : '\'' (~'\'' | '\'\'')* '\''
243
+ ;
244
+
245
+ INTEGER_VALUE
246
+ : DIGIT+
247
+ ;
248
+
249
+ DECIMAL_VALUE
250
+ : DIGIT+ '.' DIGIT*
251
+ | '.' DIGIT+
252
+ ;
253
+
254
+ FLOAT_VALUE
255
+ : DIGIT+ ('.' DIGIT*)? EXPONENT
256
+ | '.' DIGIT+ EXPONENT
257
+ ;
258
+
259
+ IDENT
260
+ : (LETTER | '_') (LETTER | DIGIT | '_' | '@' | ':' | '$')*
261
+ ;
262
+
263
+ QUOTED_IDENT
264
+ : '"' (~'"' | '""')* '"'
265
+ ;
266
+
267
+ fragment EXPONENT
268
+ : [Ee] [+-]? DIGIT+
269
+ ;
270
+
271
+ fragment DIGIT
272
+ : [0-9]
273
+ ;
274
+
275
+ fragment LETTER
276
+ : [A-Za-z]
277
+ ;
278
+
279
+ COMMENT
280
+ : '--' ~[\r\n]* '\r'? '\n'? -> channel(HIDDEN)
281
+ ;
282
+
283
+ BLOCK_COMMENT
284
+ : '/*' .*? '*/' -> channel(HIDDEN)
285
+ ;
286
+
287
+ WS
288
+ : [ \t\n\r]+ -> skip
289
+ ;
File without changes
@@ -0,0 +1,321 @@
1
+ # type: ignore
2
+ # ruff: noqa
3
+ # flake8: noqa
4
+ # Generated from Minisql.g4 by ANTLR 4.13.2
5
+ from omlish.antlr._runtime._all import *
6
+ from io import StringIO
7
+ import sys
8
+ if sys.version_info[1] > 5:
9
+ from typing import TextIO
10
+ else:
11
+ from typing.io import TextIO
12
+
13
+
14
+ def serializedATN():
15
+ return [
16
+ 4,0,66,512,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,
17
+ 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,
18
+ 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
+ 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,
20
+ 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,
21
+ 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,
22
+ 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,
23
+ 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,
24
+ 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,
25
+ 58,2,59,7,59,2,60,7,60,2,61,7,61,2,62,7,62,2,63,7,63,2,64,7,64,2,
26
+ 65,7,65,2,66,7,66,2,67,7,67,2,68,7,68,1,0,1,0,1,1,1,1,1,2,1,2,1,
27
+ 3,1,3,1,4,1,4,1,5,1,5,1,5,1,6,1,6,1,7,1,7,1,8,1,8,1,8,1,9,1,9,1,
28
+ 9,1,10,1,10,1,11,1,11,1,11,1,12,1,12,1,13,1,13,1,13,1,14,1,14,1,
29
+ 15,1,15,1,16,1,16,1,17,1,17,1,18,1,18,1,18,1,19,1,19,1,19,1,19,1,
30
+ 20,1,20,1,20,1,20,1,21,1,21,1,21,1,22,1,22,1,22,1,22,1,23,1,23,1,
31
+ 23,1,24,1,24,1,24,1,24,1,24,1,25,1,25,1,25,1,25,1,25,1,25,1,26,1,
32
+ 26,1,26,1,26,1,26,1,27,1,27,1,27,1,27,1,27,1,27,1,27,1,27,1,27,1,
33
+ 28,1,28,1,28,1,28,1,28,1,29,1,29,1,29,1,29,1,30,1,30,1,30,1,30,1,
34
+ 30,1,30,1,31,1,31,1,31,1,31,1,31,1,32,1,32,1,32,1,32,1,32,1,33,1,
35
+ 33,1,33,1,33,1,33,1,33,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,35,1,
36
+ 35,1,35,1,36,1,36,1,36,1,36,1,36,1,36,1,37,1,37,1,37,1,38,1,38,1,
37
+ 38,1,38,1,38,1,39,1,39,1,39,1,39,1,39,1,40,1,40,1,40,1,40,1,40,1,
38
+ 41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,42,1,42,1,42,1,42,1,43,1,
39
+ 43,1,43,1,43,1,43,1,44,1,44,1,44,1,45,1,45,1,45,1,46,1,46,1,46,1,
40
+ 46,1,46,1,46,1,47,1,47,1,47,1,47,1,47,1,47,1,48,1,48,1,48,1,48,1,
41
+ 48,1,49,1,49,1,49,1,49,1,49,1,49,1,50,1,50,1,50,1,50,1,50,1,50,1,
42
+ 50,1,51,1,51,1,51,1,51,1,51,1,52,1,52,1,52,1,52,1,52,1,53,1,53,1,
43
+ 53,1,53,1,53,1,53,1,54,1,54,1,54,1,54,1,54,1,55,1,55,1,55,1,55,1,
44
+ 55,1,55,1,56,1,56,1,56,1,56,1,56,1,57,1,57,1,57,1,57,5,57,381,8,
45
+ 57,10,57,12,57,384,9,57,1,57,1,57,1,58,4,58,389,8,58,11,58,12,58,
46
+ 390,1,59,4,59,394,8,59,11,59,12,59,395,1,59,1,59,5,59,400,8,59,10,
47
+ 59,12,59,403,9,59,1,59,1,59,4,59,407,8,59,11,59,12,59,408,3,59,411,
48
+ 8,59,1,60,4,60,414,8,60,11,60,12,60,415,1,60,1,60,5,60,420,8,60,
49
+ 10,60,12,60,423,9,60,3,60,425,8,60,1,60,1,60,1,60,1,60,4,60,431,
50
+ 8,60,11,60,12,60,432,1,60,1,60,3,60,437,8,60,1,61,1,61,3,61,441,
51
+ 8,61,1,61,1,61,1,61,5,61,446,8,61,10,61,12,61,449,9,61,1,62,1,62,
52
+ 1,62,1,62,5,62,455,8,62,10,62,12,62,458,9,62,1,62,1,62,1,63,1,63,
53
+ 3,63,464,8,63,1,63,4,63,467,8,63,11,63,12,63,468,1,64,1,64,1,65,
54
+ 1,65,1,66,1,66,1,66,1,66,5,66,479,8,66,10,66,12,66,482,9,66,1,66,
55
+ 3,66,485,8,66,1,66,3,66,488,8,66,1,66,1,66,1,67,1,67,1,67,1,67,5,
56
+ 67,496,8,67,10,67,12,67,499,9,67,1,67,1,67,1,67,1,67,1,67,1,68,4,
57
+ 68,507,8,68,11,68,12,68,508,1,68,1,68,1,497,0,69,1,1,3,2,5,3,7,4,
58
+ 9,5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25,13,27,14,29,15,31,16,
59
+ 33,17,35,18,37,19,39,20,41,21,43,22,45,23,47,24,49,25,51,26,53,27,
60
+ 55,28,57,29,59,30,61,31,63,32,65,33,67,34,69,35,71,36,73,37,75,38,
61
+ 77,39,79,40,81,41,83,42,85,43,87,44,89,45,91,46,93,47,95,48,97,49,
62
+ 99,50,101,51,103,52,105,53,107,54,109,55,111,56,113,57,115,58,117,
63
+ 59,119,60,121,61,123,62,125,63,127,0,129,0,131,0,133,64,135,65,137,
64
+ 66,1,0,9,1,0,39,39,4,0,36,36,58,58,64,64,95,95,1,0,34,34,2,0,69,
65
+ 69,101,101,2,0,43,43,45,45,1,0,48,57,2,0,65,90,97,122,2,0,10,10,
66
+ 13,13,3,0,9,10,13,13,32,32,533,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,
67
+ 0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,
68
+ 0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,
69
+ 0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,
70
+ 0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,
71
+ 0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,
72
+ 0,57,1,0,0,0,0,59,1,0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,
73
+ 0,67,1,0,0,0,0,69,1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,
74
+ 0,77,1,0,0,0,0,79,1,0,0,0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,
75
+ 0,87,1,0,0,0,0,89,1,0,0,0,0,91,1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,0,
76
+ 0,97,1,0,0,0,0,99,1,0,0,0,0,101,1,0,0,0,0,103,1,0,0,0,0,105,1,0,
77
+ 0,0,0,107,1,0,0,0,0,109,1,0,0,0,0,111,1,0,0,0,0,113,1,0,0,0,0,115,
78
+ 1,0,0,0,0,117,1,0,0,0,0,119,1,0,0,0,0,121,1,0,0,0,0,123,1,0,0,0,
79
+ 0,125,1,0,0,0,0,133,1,0,0,0,0,135,1,0,0,0,0,137,1,0,0,0,1,139,1,
80
+ 0,0,0,3,141,1,0,0,0,5,143,1,0,0,0,7,145,1,0,0,0,9,147,1,0,0,0,11,
81
+ 149,1,0,0,0,13,152,1,0,0,0,15,154,1,0,0,0,17,156,1,0,0,0,19,159,
82
+ 1,0,0,0,21,162,1,0,0,0,23,164,1,0,0,0,25,167,1,0,0,0,27,169,1,0,
83
+ 0,0,29,172,1,0,0,0,31,174,1,0,0,0,33,176,1,0,0,0,35,178,1,0,0,0,
84
+ 37,180,1,0,0,0,39,183,1,0,0,0,41,187,1,0,0,0,43,191,1,0,0,0,45,194,
85
+ 1,0,0,0,47,198,1,0,0,0,49,201,1,0,0,0,51,206,1,0,0,0,53,212,1,0,
86
+ 0,0,55,217,1,0,0,0,57,226,1,0,0,0,59,231,1,0,0,0,61,235,1,0,0,0,
87
+ 63,241,1,0,0,0,65,246,1,0,0,0,67,251,1,0,0,0,69,257,1,0,0,0,71,264,
88
+ 1,0,0,0,73,267,1,0,0,0,75,273,1,0,0,0,77,276,1,0,0,0,79,281,1,0,
89
+ 0,0,81,286,1,0,0,0,83,291,1,0,0,0,85,299,1,0,0,0,87,303,1,0,0,0,
90
+ 89,308,1,0,0,0,91,311,1,0,0,0,93,314,1,0,0,0,95,320,1,0,0,0,97,326,
91
+ 1,0,0,0,99,331,1,0,0,0,101,337,1,0,0,0,103,344,1,0,0,0,105,349,1,
92
+ 0,0,0,107,354,1,0,0,0,109,360,1,0,0,0,111,365,1,0,0,0,113,371,1,
93
+ 0,0,0,115,376,1,0,0,0,117,388,1,0,0,0,119,410,1,0,0,0,121,436,1,
94
+ 0,0,0,123,440,1,0,0,0,125,450,1,0,0,0,127,461,1,0,0,0,129,470,1,
95
+ 0,0,0,131,472,1,0,0,0,133,474,1,0,0,0,135,491,1,0,0,0,137,506,1,
96
+ 0,0,0,139,140,5,59,0,0,140,2,1,0,0,0,141,142,5,44,0,0,142,4,1,0,
97
+ 0,0,143,144,5,40,0,0,144,6,1,0,0,0,145,146,5,41,0,0,146,8,1,0,0,
98
+ 0,147,148,5,42,0,0,148,10,1,0,0,0,149,150,5,58,0,0,150,151,5,58,
99
+ 0,0,151,12,1,0,0,0,152,153,5,46,0,0,153,14,1,0,0,0,154,155,5,61,
100
+ 0,0,155,16,1,0,0,0,156,157,5,33,0,0,157,158,5,61,0,0,158,18,1,0,
101
+ 0,0,159,160,5,60,0,0,160,161,5,62,0,0,161,20,1,0,0,0,162,163,5,60,
102
+ 0,0,163,22,1,0,0,0,164,165,5,60,0,0,165,166,5,61,0,0,166,24,1,0,
103
+ 0,0,167,168,5,62,0,0,168,26,1,0,0,0,169,170,5,62,0,0,170,171,5,61,
104
+ 0,0,171,28,1,0,0,0,172,173,5,43,0,0,173,30,1,0,0,0,174,175,5,45,
105
+ 0,0,175,32,1,0,0,0,176,177,5,47,0,0,177,34,1,0,0,0,178,179,5,37,
106
+ 0,0,179,36,1,0,0,0,180,181,5,124,0,0,181,182,5,124,0,0,182,38,1,
107
+ 0,0,0,183,184,5,97,0,0,184,185,5,108,0,0,185,186,5,108,0,0,186,40,
108
+ 1,0,0,0,187,188,5,97,0,0,188,189,5,110,0,0,189,190,5,100,0,0,190,
109
+ 42,1,0,0,0,191,192,5,97,0,0,192,193,5,115,0,0,193,44,1,0,0,0,194,
110
+ 195,5,97,0,0,195,196,5,115,0,0,196,197,5,99,0,0,197,46,1,0,0,0,198,
111
+ 199,5,98,0,0,199,200,5,121,0,0,200,48,1,0,0,0,201,202,5,99,0,0,202,
112
+ 203,5,97,0,0,203,204,5,115,0,0,204,205,5,101,0,0,205,50,1,0,0,0,
113
+ 206,207,5,99,0,0,207,208,5,114,0,0,208,209,5,111,0,0,209,210,5,115,
114
+ 0,0,210,211,5,115,0,0,211,52,1,0,0,0,212,213,5,100,0,0,213,214,5,
115
+ 101,0,0,214,215,5,115,0,0,215,216,5,99,0,0,216,54,1,0,0,0,217,218,
116
+ 5,100,0,0,218,219,5,105,0,0,219,220,5,115,0,0,220,221,5,116,0,0,
117
+ 221,222,5,105,0,0,222,223,5,110,0,0,223,224,5,99,0,0,224,225,5,116,
118
+ 0,0,225,56,1,0,0,0,226,227,5,101,0,0,227,228,5,108,0,0,228,229,5,
119
+ 115,0,0,229,230,5,101,0,0,230,58,1,0,0,0,231,232,5,101,0,0,232,233,
120
+ 5,110,0,0,233,234,5,100,0,0,234,60,1,0,0,0,235,236,5,102,0,0,236,
121
+ 237,5,97,0,0,237,238,5,108,0,0,238,239,5,115,0,0,239,240,5,101,0,
122
+ 0,240,62,1,0,0,0,241,242,5,102,0,0,242,243,5,114,0,0,243,244,5,111,
123
+ 0,0,244,245,5,109,0,0,245,64,1,0,0,0,246,247,5,102,0,0,247,248,5,
124
+ 117,0,0,248,249,5,108,0,0,249,250,5,108,0,0,250,66,1,0,0,0,251,252,
125
+ 5,103,0,0,252,253,5,114,0,0,253,254,5,111,0,0,254,255,5,117,0,0,
126
+ 255,256,5,112,0,0,256,68,1,0,0,0,257,258,5,104,0,0,258,259,5,97,
127
+ 0,0,259,260,5,118,0,0,260,261,5,105,0,0,261,262,5,110,0,0,262,263,
128
+ 5,103,0,0,263,70,1,0,0,0,264,265,5,105,0,0,265,266,5,110,0,0,266,
129
+ 72,1,0,0,0,267,268,5,105,0,0,268,269,5,110,0,0,269,270,5,110,0,0,
130
+ 270,271,5,101,0,0,271,272,5,114,0,0,272,74,1,0,0,0,273,274,5,105,
131
+ 0,0,274,275,5,115,0,0,275,76,1,0,0,0,276,277,5,106,0,0,277,278,5,
132
+ 111,0,0,278,279,5,105,0,0,279,280,5,110,0,0,280,78,1,0,0,0,281,282,
133
+ 5,108,0,0,282,283,5,101,0,0,283,284,5,102,0,0,284,285,5,116,0,0,
134
+ 285,80,1,0,0,0,286,287,5,108,0,0,287,288,5,105,0,0,288,289,5,107,
135
+ 0,0,289,290,5,101,0,0,290,82,1,0,0,0,291,292,5,110,0,0,292,293,5,
136
+ 97,0,0,293,294,5,116,0,0,294,295,5,117,0,0,295,296,5,114,0,0,296,
137
+ 297,5,97,0,0,297,298,5,108,0,0,298,84,1,0,0,0,299,300,5,110,0,0,
138
+ 300,301,5,111,0,0,301,302,5,116,0,0,302,86,1,0,0,0,303,304,5,110,
139
+ 0,0,304,305,5,117,0,0,305,306,5,108,0,0,306,307,5,108,0,0,307,88,
140
+ 1,0,0,0,308,309,5,111,0,0,309,310,5,110,0,0,310,90,1,0,0,0,311,312,
141
+ 5,111,0,0,312,313,5,114,0,0,313,92,1,0,0,0,314,315,5,111,0,0,315,
142
+ 316,5,114,0,0,316,317,5,100,0,0,317,318,5,101,0,0,318,319,5,114,
143
+ 0,0,319,94,1,0,0,0,320,321,5,111,0,0,321,322,5,117,0,0,322,323,5,
144
+ 116,0,0,323,324,5,101,0,0,324,325,5,114,0,0,325,96,1,0,0,0,326,327,
145
+ 5,111,0,0,327,328,5,118,0,0,328,329,5,101,0,0,329,330,5,114,0,0,
146
+ 330,98,1,0,0,0,331,332,5,114,0,0,332,333,5,105,0,0,333,334,5,103,
147
+ 0,0,334,335,5,104,0,0,335,336,5,116,0,0,336,100,1,0,0,0,337,338,
148
+ 5,115,0,0,338,339,5,101,0,0,339,340,5,108,0,0,340,341,5,101,0,0,
149
+ 341,342,5,99,0,0,342,343,5,116,0,0,343,102,1,0,0,0,344,345,5,116,
150
+ 0,0,345,346,5,104,0,0,346,347,5,101,0,0,347,348,5,110,0,0,348,104,
151
+ 1,0,0,0,349,350,5,116,0,0,350,351,5,114,0,0,351,352,5,117,0,0,352,
152
+ 353,5,101,0,0,353,106,1,0,0,0,354,355,5,117,0,0,355,356,5,110,0,
153
+ 0,356,357,5,105,0,0,357,358,5,111,0,0,358,359,5,110,0,0,359,108,
154
+ 1,0,0,0,360,361,5,119,0,0,361,362,5,104,0,0,362,363,5,101,0,0,363,
155
+ 364,5,110,0,0,364,110,1,0,0,0,365,366,5,119,0,0,366,367,5,104,0,
156
+ 0,367,368,5,101,0,0,368,369,5,114,0,0,369,370,5,101,0,0,370,112,
157
+ 1,0,0,0,371,372,5,119,0,0,372,373,5,105,0,0,373,374,5,116,0,0,374,
158
+ 375,5,104,0,0,375,114,1,0,0,0,376,382,5,39,0,0,377,381,8,0,0,0,378,
159
+ 379,5,39,0,0,379,381,5,39,0,0,380,377,1,0,0,0,380,378,1,0,0,0,381,
160
+ 384,1,0,0,0,382,380,1,0,0,0,382,383,1,0,0,0,383,385,1,0,0,0,384,
161
+ 382,1,0,0,0,385,386,5,39,0,0,386,116,1,0,0,0,387,389,3,129,64,0,
162
+ 388,387,1,0,0,0,389,390,1,0,0,0,390,388,1,0,0,0,390,391,1,0,0,0,
163
+ 391,118,1,0,0,0,392,394,3,129,64,0,393,392,1,0,0,0,394,395,1,0,0,
164
+ 0,395,393,1,0,0,0,395,396,1,0,0,0,396,397,1,0,0,0,397,401,5,46,0,
165
+ 0,398,400,3,129,64,0,399,398,1,0,0,0,400,403,1,0,0,0,401,399,1,0,
166
+ 0,0,401,402,1,0,0,0,402,411,1,0,0,0,403,401,1,0,0,0,404,406,5,46,
167
+ 0,0,405,407,3,129,64,0,406,405,1,0,0,0,407,408,1,0,0,0,408,406,1,
168
+ 0,0,0,408,409,1,0,0,0,409,411,1,0,0,0,410,393,1,0,0,0,410,404,1,
169
+ 0,0,0,411,120,1,0,0,0,412,414,3,129,64,0,413,412,1,0,0,0,414,415,
170
+ 1,0,0,0,415,413,1,0,0,0,415,416,1,0,0,0,416,424,1,0,0,0,417,421,
171
+ 5,46,0,0,418,420,3,129,64,0,419,418,1,0,0,0,420,423,1,0,0,0,421,
172
+ 419,1,0,0,0,421,422,1,0,0,0,422,425,1,0,0,0,423,421,1,0,0,0,424,
173
+ 417,1,0,0,0,424,425,1,0,0,0,425,426,1,0,0,0,426,427,3,127,63,0,427,
174
+ 437,1,0,0,0,428,430,5,46,0,0,429,431,3,129,64,0,430,429,1,0,0,0,
175
+ 431,432,1,0,0,0,432,430,1,0,0,0,432,433,1,0,0,0,433,434,1,0,0,0,
176
+ 434,435,3,127,63,0,435,437,1,0,0,0,436,413,1,0,0,0,436,428,1,0,0,
177
+ 0,437,122,1,0,0,0,438,441,3,131,65,0,439,441,5,95,0,0,440,438,1,
178
+ 0,0,0,440,439,1,0,0,0,441,447,1,0,0,0,442,446,3,131,65,0,443,446,
179
+ 3,129,64,0,444,446,7,1,0,0,445,442,1,0,0,0,445,443,1,0,0,0,445,444,
180
+ 1,0,0,0,446,449,1,0,0,0,447,445,1,0,0,0,447,448,1,0,0,0,448,124,
181
+ 1,0,0,0,449,447,1,0,0,0,450,456,5,34,0,0,451,455,8,2,0,0,452,453,
182
+ 5,34,0,0,453,455,5,34,0,0,454,451,1,0,0,0,454,452,1,0,0,0,455,458,
183
+ 1,0,0,0,456,454,1,0,0,0,456,457,1,0,0,0,457,459,1,0,0,0,458,456,
184
+ 1,0,0,0,459,460,5,34,0,0,460,126,1,0,0,0,461,463,7,3,0,0,462,464,
185
+ 7,4,0,0,463,462,1,0,0,0,463,464,1,0,0,0,464,466,1,0,0,0,465,467,
186
+ 3,129,64,0,466,465,1,0,0,0,467,468,1,0,0,0,468,466,1,0,0,0,468,469,
187
+ 1,0,0,0,469,128,1,0,0,0,470,471,7,5,0,0,471,130,1,0,0,0,472,473,
188
+ 7,6,0,0,473,132,1,0,0,0,474,475,5,45,0,0,475,476,5,45,0,0,476,480,
189
+ 1,0,0,0,477,479,8,7,0,0,478,477,1,0,0,0,479,482,1,0,0,0,480,478,
190
+ 1,0,0,0,480,481,1,0,0,0,481,484,1,0,0,0,482,480,1,0,0,0,483,485,
191
+ 5,13,0,0,484,483,1,0,0,0,484,485,1,0,0,0,485,487,1,0,0,0,486,488,
192
+ 5,10,0,0,487,486,1,0,0,0,487,488,1,0,0,0,488,489,1,0,0,0,489,490,
193
+ 6,66,0,0,490,134,1,0,0,0,491,492,5,47,0,0,492,493,5,42,0,0,493,497,
194
+ 1,0,0,0,494,496,9,0,0,0,495,494,1,0,0,0,496,499,1,0,0,0,497,498,
195
+ 1,0,0,0,497,495,1,0,0,0,498,500,1,0,0,0,499,497,1,0,0,0,500,501,
196
+ 5,42,0,0,501,502,5,47,0,0,502,503,1,0,0,0,503,504,6,67,0,0,504,136,
197
+ 1,0,0,0,505,507,7,8,0,0,506,505,1,0,0,0,507,508,1,0,0,0,508,506,
198
+ 1,0,0,0,508,509,1,0,0,0,509,510,1,0,0,0,510,511,6,68,1,0,511,138,
199
+ 1,0,0,0,25,0,380,382,390,395,401,408,410,415,421,424,432,436,440,
200
+ 445,447,454,456,463,468,480,484,487,497,508,2,0,1,0,6,0,0
201
+ ]
202
+
203
+ class MinisqlLexer(Lexer):
204
+
205
+ atn = ATNDeserializer().deserialize(serializedATN())
206
+
207
+ decisionsToDFA = [ DFA(ds, i) for i, ds in enumerate(atn.decisionToState) ]
208
+
209
+ T__0 = 1
210
+ T__1 = 2
211
+ T__2 = 3
212
+ T__3 = 4
213
+ T__4 = 5
214
+ T__5 = 6
215
+ T__6 = 7
216
+ T__7 = 8
217
+ T__8 = 9
218
+ T__9 = 10
219
+ T__10 = 11
220
+ T__11 = 12
221
+ T__12 = 13
222
+ T__13 = 14
223
+ T__14 = 15
224
+ T__15 = 16
225
+ T__16 = 17
226
+ T__17 = 18
227
+ T__18 = 19
228
+ ALL = 20
229
+ AND = 21
230
+ AS = 22
231
+ ASC = 23
232
+ BY = 24
233
+ CASE = 25
234
+ CROSS = 26
235
+ DESC = 27
236
+ DISTINCT = 28
237
+ ELSE = 29
238
+ END = 30
239
+ FALSE = 31
240
+ FROM = 32
241
+ FULL = 33
242
+ GROUP = 34
243
+ HAVING = 35
244
+ IN = 36
245
+ INNER = 37
246
+ IS = 38
247
+ JOIN = 39
248
+ LEFT = 40
249
+ LIKE = 41
250
+ NATURAL = 42
251
+ NOT = 43
252
+ NULL = 44
253
+ ON = 45
254
+ OR = 46
255
+ ORDER = 47
256
+ OUTER = 48
257
+ OVER = 49
258
+ RIGHT = 50
259
+ SELECT = 51
260
+ THEN = 52
261
+ TRUE = 53
262
+ UNION = 54
263
+ WHEN = 55
264
+ WHERE = 56
265
+ WITH = 57
266
+ STRING = 58
267
+ INTEGER_VALUE = 59
268
+ DECIMAL_VALUE = 60
269
+ FLOAT_VALUE = 61
270
+ IDENT = 62
271
+ QUOTED_IDENT = 63
272
+ COMMENT = 64
273
+ BLOCK_COMMENT = 65
274
+ WS = 66
275
+
276
+ channelNames = [ u"DEFAULT_TOKEN_CHANNEL", u"HIDDEN" ]
277
+
278
+ modeNames = [ "DEFAULT_MODE" ]
279
+
280
+ literalNames = [ "<INVALID>",
281
+ "';'", "','", "'('", "')'", "'*'", "'::'", "'.'", "'='", "'!='",
282
+ "'<>'", "'<'", "'<='", "'>'", "'>='", "'+'", "'-'", "'/'", "'%'",
283
+ "'||'", "'all'", "'and'", "'as'", "'asc'", "'by'", "'case'",
284
+ "'cross'", "'desc'", "'distinct'", "'else'", "'end'", "'false'",
285
+ "'from'", "'full'", "'group'", "'having'", "'in'", "'inner'",
286
+ "'is'", "'join'", "'left'", "'like'", "'natural'", "'not'",
287
+ "'null'", "'on'", "'or'", "'order'", "'outer'", "'over'", "'right'",
288
+ "'select'", "'then'", "'true'", "'union'", "'when'", "'where'",
289
+ "'with'" ]
290
+
291
+ symbolicNames = [ "<INVALID>",
292
+ "ALL", "AND", "AS", "ASC", "BY", "CASE", "CROSS", "DESC", "DISTINCT",
293
+ "ELSE", "END", "FALSE", "FROM", "FULL", "GROUP", "HAVING", "IN",
294
+ "INNER", "IS", "JOIN", "LEFT", "LIKE", "NATURAL", "NOT", "NULL",
295
+ "ON", "OR", "ORDER", "OUTER", "OVER", "RIGHT", "SELECT", "THEN",
296
+ "TRUE", "UNION", "WHEN", "WHERE", "WITH", "STRING", "INTEGER_VALUE",
297
+ "DECIMAL_VALUE", "FLOAT_VALUE", "IDENT", "QUOTED_IDENT", "COMMENT",
298
+ "BLOCK_COMMENT", "WS" ]
299
+
300
+ ruleNames = [ "T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6",
301
+ "T__7", "T__8", "T__9", "T__10", "T__11", "T__12", "T__13",
302
+ "T__14", "T__15", "T__16", "T__17", "T__18", "ALL", "AND",
303
+ "AS", "ASC", "BY", "CASE", "CROSS", "DESC", "DISTINCT",
304
+ "ELSE", "END", "FALSE", "FROM", "FULL", "GROUP", "HAVING",
305
+ "IN", "INNER", "IS", "JOIN", "LEFT", "LIKE", "NATURAL",
306
+ "NOT", "NULL", "ON", "OR", "ORDER", "OUTER", "OVER", "RIGHT",
307
+ "SELECT", "THEN", "TRUE", "UNION", "WHEN", "WHERE", "WITH",
308
+ "STRING", "INTEGER_VALUE", "DECIMAL_VALUE", "FLOAT_VALUE",
309
+ "IDENT", "QUOTED_IDENT", "EXPONENT", "DIGIT", "LETTER",
310
+ "COMMENT", "BLOCK_COMMENT", "WS" ]
311
+
312
+ grammarFileName = "Minisql.g4"
313
+
314
+ def __init__(self, input=None, output:TextIO = sys.stdout):
315
+ super().__init__(input, output)
316
+ self.checkVersion("4.13.2")
317
+ self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache())
318
+ self._actions = None
319
+ self._predicates = None
320
+
321
+