@cubejs-backend/schema-compiler 1.3.55 → 1.3.57
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.
- package/dist/src/adapter/BaseQuery.d.ts.map +1 -1
- package/dist/src/adapter/BaseQuery.js +0 -4
- package/dist/src/adapter/BaseQuery.js.map +1 -1
- package/dist/src/adapter/PrestodbQuery.d.ts.map +1 -1
- package/dist/src/adapter/PrestodbQuery.js +2 -0
- package/dist/src/adapter/PrestodbQuery.js.map +1 -1
- package/dist/src/compiler/CubeSymbols.d.ts +3 -0
- package/dist/src/compiler/CubeSymbols.d.ts.map +1 -1
- package/dist/src/compiler/CubeSymbols.js.map +1 -1
- package/dist/src/compiler/CubeValidator.d.ts.map +1 -1
- package/dist/src/compiler/CubeValidator.js +8 -2
- package/dist/src/compiler/CubeValidator.js.map +1 -1
- package/dist/src/compiler/DataSchemaCompiler.d.ts +2 -1
- package/dist/src/compiler/DataSchemaCompiler.d.ts.map +1 -1
- package/dist/src/compiler/DataSchemaCompiler.js +119 -55
- package/dist/src/compiler/DataSchemaCompiler.js.map +1 -1
- package/dist/src/compiler/PrepareCompiler.d.ts.map +1 -1
- package/dist/src/compiler/PrepareCompiler.js +1 -0
- package/dist/src/compiler/PrepareCompiler.js.map +1 -1
- package/dist/src/compiler/YamlCompiler.d.ts +2 -2
- package/dist/src/compiler/YamlCompiler.d.ts.map +1 -1
- package/dist/src/compiler/YamlCompiler.js +10 -5
- package/dist/src/compiler/YamlCompiler.js.map +1 -1
- package/dist/src/compiler/transpilers/CubePropContextTranspiler.d.ts.map +1 -1
- package/dist/src/compiler/transpilers/CubePropContextTranspiler.js.map +1 -1
- package/dist/src/compiler/transpilers/IIFETranspiler.d.ts +13 -0
- package/dist/src/compiler/transpilers/IIFETranspiler.d.ts.map +1 -0
- package/dist/src/compiler/transpilers/IIFETranspiler.js +52 -0
- package/dist/src/compiler/transpilers/IIFETranspiler.js.map +1 -0
- package/dist/src/compiler/transpilers/ImportExportTranspiler.js +6 -6
- package/dist/src/compiler/transpilers/ImportExportTranspiler.js.map +1 -1
- package/dist/src/compiler/transpilers/index.d.ts +1 -0
- package/dist/src/compiler/transpilers/index.d.ts.map +1 -1
- package/dist/src/compiler/transpilers/index.js +1 -0
- package/dist/src/compiler/transpilers/index.js.map +1 -1
- package/dist/src/compiler/transpilers/transpiler_worker.js +2 -0
- package/dist/src/compiler/transpilers/transpiler_worker.js.map +1 -1
- package/dist/src/parser/GenericSqlLexer.d.ts +11 -12
- package/dist/src/parser/GenericSqlLexer.d.ts.map +1 -1
- package/dist/src/parser/GenericSqlLexer.js +97 -144
- package/dist/src/parser/GenericSqlLexer.js.map +1 -1
- package/dist/src/parser/GenericSqlListener.d.ts +15 -15
- package/dist/src/parser/GenericSqlListener.d.ts.map +1 -1
- package/dist/src/parser/GenericSqlListener.js +140 -1
- package/dist/src/parser/GenericSqlListener.js.map +1 -1
- package/dist/src/parser/GenericSqlParser.d.ts +61 -66
- package/dist/src/parser/GenericSqlParser.d.ts.map +1 -1
- package/dist/src/parser/GenericSqlParser.js +445 -452
- package/dist/src/parser/GenericSqlParser.js.map +1 -1
- package/dist/src/parser/GenericSqlVisitor.d.ts +15 -15
- package/dist/src/parser/GenericSqlVisitor.d.ts.map +1 -1
- package/dist/src/parser/GenericSqlVisitor.js +91 -1
- package/dist/src/parser/GenericSqlVisitor.js.map +1 -1
- package/dist/src/parser/Python3Lexer.d.ts +13 -20
- package/dist/src/parser/Python3Lexer.d.ts.map +1 -1
- package/dist/src/parser/Python3Lexer.js +631 -772
- package/dist/src/parser/Python3Lexer.js.map +1 -1
- package/dist/src/parser/Python3Parser.d.ts +385 -393
- package/dist/src/parser/Python3Parser.d.ts.map +1 -1
- package/dist/src/parser/Python3Parser.js +3637 -3703
- package/dist/src/parser/Python3Parser.js.map +1 -1
- package/dist/src/parser/Python3ParserListener.d.ts +92 -92
- package/dist/src/parser/Python3ParserListener.d.ts.map +1 -1
- package/dist/src/parser/Python3ParserListener.js +910 -1
- package/dist/src/parser/Python3ParserListener.js.map +1 -1
- package/dist/src/parser/Python3ParserVisitor.d.ts +92 -92
- package/dist/src/parser/Python3ParserVisitor.d.ts.map +1 -1
- package/dist/src/parser/Python3ParserVisitor.js +553 -1
- package/dist/src/parser/Python3ParserVisitor.js.map +1 -1
- package/dist/src/parser/PythonParser.d.ts +2 -1
- package/dist/src/parser/PythonParser.d.ts.map +1 -1
- package/dist/src/parser/PythonParser.js +45 -27
- package/dist/src/parser/PythonParser.js.map +1 -1
- package/dist/src/parser/SqlParser.d.ts.map +1 -1
- package/dist/src/parser/SqlParser.js +71 -38
- package/dist/src/parser/SqlParser.js.map +1 -1
- package/package.json +8 -9
|
@@ -1,42 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Generated from src/parser/GenericSql.g4 by ANTLR 4.
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
-
if (mod && mod.__esModule) return mod;
|
|
21
|
-
var result = {};
|
|
22
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
-
__setModuleDefault(result, mod);
|
|
24
|
-
return result;
|
|
25
|
-
};
|
|
2
|
+
// Generated from src/parser/GenericSql.g4 by ANTLR 4.13.2
|
|
3
|
+
// noinspection ES6UnusedImports,JSUnusedGlobalSymbols,JSUnusedLocalSymbols
|
|
4
|
+
// @ts-nocheck
|
|
26
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.IdentifierContext = exports.IdPathContext = exports.UnaryOperatorContext = exports.BinaryOperatorContext = exports.NumericContext = exports.ExpContext = exports.BoolExpContext = exports.AliasFieldContext = exports.FieldContext = exports.SelectFieldsContext = exports.FromTablesContext = exports.QueryContext = exports.StatementContext =
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
const FailedPredicateException_1 = require("antlr4ts/FailedPredicateException");
|
|
31
|
-
const NoViableAltException_1 = require("antlr4ts/NoViableAltException");
|
|
32
|
-
const Parser_1 = require("antlr4ts/Parser");
|
|
33
|
-
const ParserRuleContext_1 = require("antlr4ts/ParserRuleContext");
|
|
34
|
-
const ParserATNSimulator_1 = require("antlr4ts/atn/ParserATNSimulator");
|
|
35
|
-
const RecognitionException_1 = require("antlr4ts/RecognitionException");
|
|
36
|
-
const Token_1 = require("antlr4ts/Token");
|
|
37
|
-
const VocabularyImpl_1 = require("antlr4ts/VocabularyImpl");
|
|
38
|
-
const Utils = __importStar(require("antlr4ts/misc/Utils"));
|
|
39
|
-
class GenericSqlParser extends Parser_1.Parser {
|
|
6
|
+
exports.IdentifierContext = exports.IdPathContext = exports.UnaryOperatorContext = exports.BinaryOperatorContext = exports.NumericContext = exports.ExpContext = exports.BoolExpContext = exports.AliasFieldContext = exports.FieldContext = exports.SelectFieldsContext = exports.FromTablesContext = exports.QueryContext = exports.StatementContext = void 0;
|
|
7
|
+
const antlr4_1 = require("antlr4");
|
|
8
|
+
class GenericSqlParser extends antlr4_1.Parser {
|
|
40
9
|
static T__0 = 1;
|
|
41
10
|
static T__1 = 2;
|
|
42
11
|
static T__2 = 3;
|
|
@@ -64,6 +33,7 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
64
33
|
static QUOTED_ID = 25;
|
|
65
34
|
static STRING = 26;
|
|
66
35
|
static WHITESPACE = 27;
|
|
36
|
+
static EOF = antlr4_1.Token.EOF;
|
|
67
37
|
static RULE_statement = 0;
|
|
68
38
|
static RULE_query = 1;
|
|
69
39
|
static RULE_fromTables = 2;
|
|
@@ -77,53 +47,60 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
77
47
|
static RULE_unaryOperator = 10;
|
|
78
48
|
static RULE_idPath = 11;
|
|
79
49
|
static RULE_identifier = 12;
|
|
50
|
+
static literalNames = [null, "'('",
|
|
51
|
+
"')'", "','",
|
|
52
|
+
"'.'", "'SELECT'",
|
|
53
|
+
"'*'", "'FROM'",
|
|
54
|
+
"'WHERE'", "'AND'",
|
|
55
|
+
"'OR'", "'NOT'",
|
|
56
|
+
"'AS'", "'<'",
|
|
57
|
+
"'<='", "'>'",
|
|
58
|
+
"'>='", "'='",
|
|
59
|
+
null, "'IS'",
|
|
60
|
+
"'NULL'", "'CAST'"];
|
|
61
|
+
static symbolicNames = [null, null,
|
|
62
|
+
null, null,
|
|
63
|
+
null, "SELECT",
|
|
64
|
+
"ASTERISK",
|
|
65
|
+
"FROM", "WHERE",
|
|
66
|
+
"AND", "OR",
|
|
67
|
+
"NOT", "AS",
|
|
68
|
+
"LT", "LTE",
|
|
69
|
+
"GT", "GTE",
|
|
70
|
+
"EQUALS", "NOT_EQUALS",
|
|
71
|
+
"IS", "NULL",
|
|
72
|
+
"CAST", "INDEXED_PARAM",
|
|
73
|
+
"ID", "DIGIT",
|
|
74
|
+
"QUOTED_ID",
|
|
75
|
+
"STRING", "WHITESPACE"];
|
|
80
76
|
// tslint:disable:no-trailing-whitespace
|
|
81
77
|
static ruleNames = [
|
|
82
78
|
"statement", "query", "fromTables", "selectFields", "field", "aliasField",
|
|
83
79
|
"boolExp", "exp", "numeric", "binaryOperator", "unaryOperator", "idPath",
|
|
84
80
|
"identifier",
|
|
85
81
|
];
|
|
86
|
-
static _LITERAL_NAMES = [
|
|
87
|
-
undefined, "'('", "')'", "','", "'.'", "'SELECT'", "'*'", "'FROM'", "'WHERE'",
|
|
88
|
-
"'AND'", "'OR'", "'NOT'", "'AS'", "'<'", "'<='", "'>'", "'>='", "'='",
|
|
89
|
-
undefined, "'IS'", "'NULL'", "'CAST'",
|
|
90
|
-
];
|
|
91
|
-
static _SYMBOLIC_NAMES = [
|
|
92
|
-
undefined, undefined, undefined, undefined, undefined, "SELECT", "ASTERISK",
|
|
93
|
-
"FROM", "WHERE", "AND", "OR", "NOT", "AS", "LT", "LTE", "GT", "GTE", "EQUALS",
|
|
94
|
-
"NOT_EQUALS", "IS", "NULL", "CAST", "INDEXED_PARAM", "ID", "DIGIT", "QUOTED_ID",
|
|
95
|
-
"STRING", "WHITESPACE",
|
|
96
|
-
];
|
|
97
|
-
static VOCABULARY = new VocabularyImpl_1.VocabularyImpl(GenericSqlParser._LITERAL_NAMES, GenericSqlParser._SYMBOLIC_NAMES, []);
|
|
98
|
-
// @Override
|
|
99
|
-
// @NotNull
|
|
100
|
-
get vocabulary() {
|
|
101
|
-
return GenericSqlParser.VOCABULARY;
|
|
102
|
-
}
|
|
103
|
-
// tslint:enable:no-trailing-whitespace
|
|
104
|
-
// @Override
|
|
105
82
|
get grammarFileName() { return "GenericSql.g4"; }
|
|
106
|
-
|
|
83
|
+
get literalNames() { return GenericSqlParser.literalNames; }
|
|
84
|
+
get symbolicNames() { return GenericSqlParser.symbolicNames; }
|
|
107
85
|
get ruleNames() { return GenericSqlParser.ruleNames; }
|
|
108
|
-
// @Override
|
|
109
86
|
get serializedATN() { return GenericSqlParser._serializedATN; }
|
|
110
87
|
createFailedPredicateException(predicate, message) {
|
|
111
|
-
return new
|
|
88
|
+
return new antlr4_1.FailedPredicateException(this, predicate, message);
|
|
112
89
|
}
|
|
113
90
|
constructor(input) {
|
|
114
91
|
super(input);
|
|
115
|
-
this._interp = new
|
|
92
|
+
this._interp = new antlr4_1.ParserATNSimulator(this, GenericSqlParser._ATN, GenericSqlParser.DecisionsToDFA, new antlr4_1.PredictionContextCache());
|
|
116
93
|
}
|
|
117
94
|
// @RuleVersion(0)
|
|
118
95
|
statement() {
|
|
119
|
-
let
|
|
120
|
-
this.enterRule(
|
|
96
|
+
let localctx = new StatementContext(this, this._ctx, this.state);
|
|
97
|
+
this.enterRule(localctx, 0, GenericSqlParser.RULE_statement);
|
|
121
98
|
try {
|
|
122
99
|
this.state = 34;
|
|
123
100
|
this._errHandler.sync(this);
|
|
124
101
|
switch (this._input.LA(1)) {
|
|
125
|
-
case
|
|
126
|
-
this.enterOuterAlt(
|
|
102
|
+
case 5:
|
|
103
|
+
this.enterOuterAlt(localctx, 1);
|
|
127
104
|
{
|
|
128
105
|
this.state = 26;
|
|
129
106
|
this.query();
|
|
@@ -131,8 +108,8 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
131
108
|
this.match(GenericSqlParser.EOF);
|
|
132
109
|
}
|
|
133
110
|
break;
|
|
134
|
-
case
|
|
135
|
-
this.enterOuterAlt(
|
|
111
|
+
case 1:
|
|
112
|
+
this.enterOuterAlt(localctx, 2);
|
|
136
113
|
{
|
|
137
114
|
this.state = 29;
|
|
138
115
|
this.match(GenericSqlParser.T__0);
|
|
@@ -145,12 +122,12 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
145
122
|
}
|
|
146
123
|
break;
|
|
147
124
|
default:
|
|
148
|
-
throw new
|
|
125
|
+
throw new antlr4_1.NoViableAltException(this);
|
|
149
126
|
}
|
|
150
127
|
}
|
|
151
128
|
catch (re) {
|
|
152
|
-
if (re instanceof
|
|
153
|
-
|
|
129
|
+
if (re instanceof antlr4_1.RecognitionException) {
|
|
130
|
+
localctx.exception = re;
|
|
154
131
|
this._errHandler.reportError(this, re);
|
|
155
132
|
this._errHandler.recover(this, re);
|
|
156
133
|
}
|
|
@@ -161,15 +138,15 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
161
138
|
finally {
|
|
162
139
|
this.exitRule();
|
|
163
140
|
}
|
|
164
|
-
return
|
|
141
|
+
return localctx;
|
|
165
142
|
}
|
|
166
143
|
// @RuleVersion(0)
|
|
167
144
|
query() {
|
|
168
|
-
let
|
|
169
|
-
this.enterRule(
|
|
145
|
+
let localctx = new QueryContext(this, this._ctx, this.state);
|
|
146
|
+
this.enterRule(localctx, 2, GenericSqlParser.RULE_query);
|
|
170
147
|
let _la;
|
|
171
148
|
try {
|
|
172
|
-
this.enterOuterAlt(
|
|
149
|
+
this.enterOuterAlt(localctx, 1);
|
|
173
150
|
{
|
|
174
151
|
this.state = 36;
|
|
175
152
|
this.match(GenericSqlParser.SELECT);
|
|
@@ -178,23 +155,23 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
178
155
|
this.state = 38;
|
|
179
156
|
this.match(GenericSqlParser.FROM);
|
|
180
157
|
this.state = 39;
|
|
181
|
-
|
|
158
|
+
localctx._from_ = this.fromTables();
|
|
182
159
|
this.state = 42;
|
|
183
160
|
this._errHandler.sync(this);
|
|
184
161
|
_la = this._input.LA(1);
|
|
185
|
-
if (_la ===
|
|
162
|
+
if (_la === 8) {
|
|
186
163
|
{
|
|
187
164
|
this.state = 40;
|
|
188
165
|
this.match(GenericSqlParser.WHERE);
|
|
189
166
|
this.state = 41;
|
|
190
|
-
|
|
167
|
+
localctx._where = this.boolExp(0);
|
|
191
168
|
}
|
|
192
169
|
}
|
|
193
170
|
}
|
|
194
171
|
}
|
|
195
172
|
catch (re) {
|
|
196
|
-
if (re instanceof
|
|
197
|
-
|
|
173
|
+
if (re instanceof antlr4_1.RecognitionException) {
|
|
174
|
+
localctx.exception = re;
|
|
198
175
|
this._errHandler.reportError(this, re);
|
|
199
176
|
this._errHandler.recover(this, re);
|
|
200
177
|
}
|
|
@@ -205,22 +182,22 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
205
182
|
finally {
|
|
206
183
|
this.exitRule();
|
|
207
184
|
}
|
|
208
|
-
return
|
|
185
|
+
return localctx;
|
|
209
186
|
}
|
|
210
187
|
// @RuleVersion(0)
|
|
211
188
|
fromTables() {
|
|
212
|
-
let
|
|
213
|
-
this.enterRule(
|
|
189
|
+
let localctx = new FromTablesContext(this, this._ctx, this.state);
|
|
190
|
+
this.enterRule(localctx, 4, GenericSqlParser.RULE_fromTables);
|
|
214
191
|
try {
|
|
215
|
-
this.enterOuterAlt(
|
|
192
|
+
this.enterOuterAlt(localctx, 1);
|
|
216
193
|
{
|
|
217
194
|
this.state = 44;
|
|
218
195
|
this.aliasField();
|
|
219
196
|
}
|
|
220
197
|
}
|
|
221
198
|
catch (re) {
|
|
222
|
-
if (re instanceof
|
|
223
|
-
|
|
199
|
+
if (re instanceof antlr4_1.RecognitionException) {
|
|
200
|
+
localctx.exception = re;
|
|
224
201
|
this._errHandler.reportError(this, re);
|
|
225
202
|
this._errHandler.recover(this, re);
|
|
226
203
|
}
|
|
@@ -231,15 +208,15 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
231
208
|
finally {
|
|
232
209
|
this.exitRule();
|
|
233
210
|
}
|
|
234
|
-
return
|
|
211
|
+
return localctx;
|
|
235
212
|
}
|
|
236
213
|
// @RuleVersion(0)
|
|
237
214
|
selectFields() {
|
|
238
|
-
let
|
|
239
|
-
this.enterRule(
|
|
215
|
+
let localctx = new SelectFieldsContext(this, this._ctx, this.state);
|
|
216
|
+
this.enterRule(localctx, 6, GenericSqlParser.RULE_selectFields);
|
|
240
217
|
let _la;
|
|
241
218
|
try {
|
|
242
|
-
this.enterOuterAlt(
|
|
219
|
+
this.enterOuterAlt(localctx, 1);
|
|
243
220
|
{
|
|
244
221
|
{
|
|
245
222
|
this.state = 46;
|
|
@@ -247,7 +224,7 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
247
224
|
this.state = 51;
|
|
248
225
|
this._errHandler.sync(this);
|
|
249
226
|
_la = this._input.LA(1);
|
|
250
|
-
while (_la ===
|
|
227
|
+
while (_la === 3) {
|
|
251
228
|
{
|
|
252
229
|
{
|
|
253
230
|
this.state = 47;
|
|
@@ -264,8 +241,8 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
264
241
|
}
|
|
265
242
|
}
|
|
266
243
|
catch (re) {
|
|
267
|
-
if (re instanceof
|
|
268
|
-
|
|
244
|
+
if (re instanceof antlr4_1.RecognitionException) {
|
|
245
|
+
localctx.exception = re;
|
|
269
246
|
this._errHandler.reportError(this, re);
|
|
270
247
|
this._errHandler.recover(this, re);
|
|
271
248
|
}
|
|
@@ -276,38 +253,38 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
276
253
|
finally {
|
|
277
254
|
this.exitRule();
|
|
278
255
|
}
|
|
279
|
-
return
|
|
256
|
+
return localctx;
|
|
280
257
|
}
|
|
281
258
|
// @RuleVersion(0)
|
|
282
259
|
field() {
|
|
283
|
-
let
|
|
284
|
-
this.enterRule(
|
|
260
|
+
let localctx = new FieldContext(this, this._ctx, this.state);
|
|
261
|
+
this.enterRule(localctx, 8, GenericSqlParser.RULE_field);
|
|
285
262
|
try {
|
|
286
263
|
this.state = 56;
|
|
287
264
|
this._errHandler.sync(this);
|
|
288
265
|
switch (this._input.LA(1)) {
|
|
289
|
-
case
|
|
290
|
-
case
|
|
291
|
-
this.enterOuterAlt(
|
|
266
|
+
case 23:
|
|
267
|
+
case 25:
|
|
268
|
+
this.enterOuterAlt(localctx, 1);
|
|
292
269
|
{
|
|
293
270
|
this.state = 54;
|
|
294
271
|
this.aliasField();
|
|
295
272
|
}
|
|
296
273
|
break;
|
|
297
|
-
case
|
|
298
|
-
this.enterOuterAlt(
|
|
274
|
+
case 6:
|
|
275
|
+
this.enterOuterAlt(localctx, 2);
|
|
299
276
|
{
|
|
300
277
|
this.state = 55;
|
|
301
278
|
this.match(GenericSqlParser.ASTERISK);
|
|
302
279
|
}
|
|
303
280
|
break;
|
|
304
281
|
default:
|
|
305
|
-
throw new
|
|
282
|
+
throw new antlr4_1.NoViableAltException(this);
|
|
306
283
|
}
|
|
307
284
|
}
|
|
308
285
|
catch (re) {
|
|
309
|
-
if (re instanceof
|
|
310
|
-
|
|
286
|
+
if (re instanceof antlr4_1.RecognitionException) {
|
|
287
|
+
localctx.exception = re;
|
|
311
288
|
this._errHandler.reportError(this, re);
|
|
312
289
|
this._errHandler.recover(this, re);
|
|
313
290
|
}
|
|
@@ -318,27 +295,27 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
318
295
|
finally {
|
|
319
296
|
this.exitRule();
|
|
320
297
|
}
|
|
321
|
-
return
|
|
298
|
+
return localctx;
|
|
322
299
|
}
|
|
323
300
|
// @RuleVersion(0)
|
|
324
301
|
aliasField() {
|
|
325
|
-
let
|
|
326
|
-
this.enterRule(
|
|
302
|
+
let localctx = new AliasFieldContext(this, this._ctx, this.state);
|
|
303
|
+
this.enterRule(localctx, 10, GenericSqlParser.RULE_aliasField);
|
|
327
304
|
let _la;
|
|
328
305
|
try {
|
|
329
|
-
this.enterOuterAlt(
|
|
306
|
+
this.enterOuterAlt(localctx, 1);
|
|
330
307
|
{
|
|
331
308
|
this.state = 58;
|
|
332
309
|
this.idPath();
|
|
333
310
|
this.state = 63;
|
|
334
311
|
this._errHandler.sync(this);
|
|
335
312
|
_la = this._input.LA(1);
|
|
336
|
-
if ((((_la) & ~0x1F) === 0 && ((1 << _la) &
|
|
313
|
+
if ((((_la) & ~0x1F) === 0 && ((1 << _la) & 41947136) !== 0)) {
|
|
337
314
|
{
|
|
338
315
|
this.state = 60;
|
|
339
316
|
this._errHandler.sync(this);
|
|
340
317
|
_la = this._input.LA(1);
|
|
341
|
-
if (_la ===
|
|
318
|
+
if (_la === 12) {
|
|
342
319
|
{
|
|
343
320
|
this.state = 59;
|
|
344
321
|
this.match(GenericSqlParser.AS);
|
|
@@ -351,8 +328,8 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
351
328
|
}
|
|
352
329
|
}
|
|
353
330
|
catch (re) {
|
|
354
|
-
if (re instanceof
|
|
355
|
-
|
|
331
|
+
if (re instanceof antlr4_1.RecognitionException) {
|
|
332
|
+
localctx.exception = re;
|
|
356
333
|
this._errHandler.reportError(this, re);
|
|
357
334
|
this._errHandler.recover(this, re);
|
|
358
335
|
}
|
|
@@ -363,7 +340,7 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
363
340
|
finally {
|
|
364
341
|
this.exitRule();
|
|
365
342
|
}
|
|
366
|
-
return
|
|
343
|
+
return localctx;
|
|
367
344
|
}
|
|
368
345
|
// @RuleVersion(0)
|
|
369
346
|
boolExp(_p) {
|
|
@@ -372,31 +349,31 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
372
349
|
}
|
|
373
350
|
let _parentctx = this._ctx;
|
|
374
351
|
let _parentState = this.state;
|
|
375
|
-
let
|
|
376
|
-
let _prevctx =
|
|
352
|
+
let localctx = new BoolExpContext(this, this._ctx, _parentState);
|
|
353
|
+
let _prevctx = localctx;
|
|
377
354
|
let _startState = 12;
|
|
378
|
-
this.enterRecursionRule(
|
|
355
|
+
this.enterRecursionRule(localctx, 12, GenericSqlParser.RULE_boolExp, _p);
|
|
379
356
|
try {
|
|
380
357
|
let _alt;
|
|
381
|
-
this.enterOuterAlt(
|
|
358
|
+
this.enterOuterAlt(localctx, 1);
|
|
382
359
|
{
|
|
383
360
|
this.state = 69;
|
|
384
361
|
this._errHandler.sync(this);
|
|
385
362
|
switch (this._input.LA(1)) {
|
|
386
|
-
case
|
|
387
|
-
case
|
|
388
|
-
case
|
|
389
|
-
case
|
|
390
|
-
case
|
|
391
|
-
case
|
|
392
|
-
case
|
|
393
|
-
case
|
|
363
|
+
case 1:
|
|
364
|
+
case 4:
|
|
365
|
+
case 21:
|
|
366
|
+
case 22:
|
|
367
|
+
case 23:
|
|
368
|
+
case 24:
|
|
369
|
+
case 25:
|
|
370
|
+
case 26:
|
|
394
371
|
{
|
|
395
372
|
this.state = 66;
|
|
396
373
|
this.exp(0);
|
|
397
374
|
}
|
|
398
375
|
break;
|
|
399
|
-
case
|
|
376
|
+
case 11:
|
|
400
377
|
{
|
|
401
378
|
this.state = 67;
|
|
402
379
|
this.match(GenericSqlParser.NOT);
|
|
@@ -405,26 +382,26 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
405
382
|
}
|
|
406
383
|
break;
|
|
407
384
|
default:
|
|
408
|
-
throw new
|
|
385
|
+
throw new antlr4_1.NoViableAltException(this);
|
|
409
386
|
}
|
|
410
|
-
this._ctx.
|
|
387
|
+
this._ctx.stop = this._input.LT(-1);
|
|
411
388
|
this.state = 79;
|
|
412
389
|
this._errHandler.sync(this);
|
|
413
|
-
_alt = this.
|
|
414
|
-
while (_alt !== 2 && _alt !==
|
|
390
|
+
_alt = this._interp.adaptivePredict(this._input, 8, this._ctx);
|
|
391
|
+
while (_alt !== 2 && _alt !== antlr4_1.ATN.INVALID_ALT_NUMBER) {
|
|
415
392
|
if (_alt === 1) {
|
|
416
393
|
if (this._parseListeners != null) {
|
|
417
394
|
this.triggerExitRuleEvent();
|
|
418
395
|
}
|
|
419
|
-
_prevctx =
|
|
396
|
+
_prevctx = localctx;
|
|
420
397
|
{
|
|
421
398
|
this.state = 77;
|
|
422
399
|
this._errHandler.sync(this);
|
|
423
|
-
switch (this.
|
|
400
|
+
switch (this._interp.adaptivePredict(this._input, 7, this._ctx)) {
|
|
424
401
|
case 1:
|
|
425
402
|
{
|
|
426
|
-
|
|
427
|
-
this.pushNewRecursionContext(
|
|
403
|
+
localctx = new BoolExpContext(this, _parentctx, _parentState);
|
|
404
|
+
this.pushNewRecursionContext(localctx, _startState, GenericSqlParser.RULE_boolExp);
|
|
428
405
|
this.state = 71;
|
|
429
406
|
if (!(this.precpred(this._ctx, 3))) {
|
|
430
407
|
throw this.createFailedPredicateException("this.precpred(this._ctx, 3)");
|
|
@@ -437,8 +414,8 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
437
414
|
break;
|
|
438
415
|
case 2:
|
|
439
416
|
{
|
|
440
|
-
|
|
441
|
-
this.pushNewRecursionContext(
|
|
417
|
+
localctx = new BoolExpContext(this, _parentctx, _parentState);
|
|
418
|
+
this.pushNewRecursionContext(localctx, _startState, GenericSqlParser.RULE_boolExp);
|
|
442
419
|
this.state = 74;
|
|
443
420
|
if (!(this.precpred(this._ctx, 2))) {
|
|
444
421
|
throw this.createFailedPredicateException("this.precpred(this._ctx, 2)");
|
|
@@ -454,13 +431,13 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
454
431
|
}
|
|
455
432
|
this.state = 81;
|
|
456
433
|
this._errHandler.sync(this);
|
|
457
|
-
_alt = this.
|
|
434
|
+
_alt = this._interp.adaptivePredict(this._input, 8, this._ctx);
|
|
458
435
|
}
|
|
459
436
|
}
|
|
460
437
|
}
|
|
461
438
|
catch (re) {
|
|
462
|
-
if (re instanceof
|
|
463
|
-
|
|
439
|
+
if (re instanceof antlr4_1.RecognitionException) {
|
|
440
|
+
localctx.exception = re;
|
|
464
441
|
this._errHandler.reportError(this, re);
|
|
465
442
|
this._errHandler.recover(this, re);
|
|
466
443
|
}
|
|
@@ -471,7 +448,7 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
471
448
|
finally {
|
|
472
449
|
this.unrollRecursionContexts(_parentctx);
|
|
473
450
|
}
|
|
474
|
-
return
|
|
451
|
+
return localctx;
|
|
475
452
|
}
|
|
476
453
|
// @RuleVersion(0)
|
|
477
454
|
exp(_p) {
|
|
@@ -480,18 +457,18 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
480
457
|
}
|
|
481
458
|
let _parentctx = this._ctx;
|
|
482
459
|
let _parentState = this.state;
|
|
483
|
-
let
|
|
484
|
-
let _prevctx =
|
|
460
|
+
let localctx = new ExpContext(this, this._ctx, _parentState);
|
|
461
|
+
let _prevctx = localctx;
|
|
485
462
|
let _startState = 14;
|
|
486
|
-
this.enterRecursionRule(
|
|
463
|
+
this.enterRecursionRule(localctx, 14, GenericSqlParser.RULE_exp, _p);
|
|
487
464
|
let _la;
|
|
488
465
|
try {
|
|
489
466
|
let _alt;
|
|
490
|
-
this.enterOuterAlt(
|
|
467
|
+
this.enterOuterAlt(localctx, 1);
|
|
491
468
|
{
|
|
492
469
|
this.state = 111;
|
|
493
470
|
this._errHandler.sync(this);
|
|
494
|
-
switch (this.
|
|
471
|
+
switch (this._interp.adaptivePredict(this._input, 10, this._ctx)) {
|
|
495
472
|
case 1:
|
|
496
473
|
{
|
|
497
474
|
this.state = 83;
|
|
@@ -510,7 +487,7 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
510
487
|
this.state = 91;
|
|
511
488
|
this._errHandler.sync(this);
|
|
512
489
|
_la = this._input.LA(1);
|
|
513
|
-
while (_la ===
|
|
490
|
+
while (_la === 3) {
|
|
514
491
|
{
|
|
515
492
|
{
|
|
516
493
|
this.state = 87;
|
|
@@ -579,24 +556,24 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
579
556
|
}
|
|
580
557
|
break;
|
|
581
558
|
}
|
|
582
|
-
this._ctx.
|
|
559
|
+
this._ctx.stop = this._input.LT(-1);
|
|
583
560
|
this.state = 121;
|
|
584
561
|
this._errHandler.sync(this);
|
|
585
|
-
_alt = this.
|
|
586
|
-
while (_alt !== 2 && _alt !==
|
|
562
|
+
_alt = this._interp.adaptivePredict(this._input, 12, this._ctx);
|
|
563
|
+
while (_alt !== 2 && _alt !== antlr4_1.ATN.INVALID_ALT_NUMBER) {
|
|
587
564
|
if (_alt === 1) {
|
|
588
565
|
if (this._parseListeners != null) {
|
|
589
566
|
this.triggerExitRuleEvent();
|
|
590
567
|
}
|
|
591
|
-
_prevctx =
|
|
568
|
+
_prevctx = localctx;
|
|
592
569
|
{
|
|
593
570
|
this.state = 119;
|
|
594
571
|
this._errHandler.sync(this);
|
|
595
|
-
switch (this.
|
|
572
|
+
switch (this._interp.adaptivePredict(this._input, 11, this._ctx)) {
|
|
596
573
|
case 1:
|
|
597
574
|
{
|
|
598
|
-
|
|
599
|
-
this.pushNewRecursionContext(
|
|
575
|
+
localctx = new ExpContext(this, _parentctx, _parentState);
|
|
576
|
+
this.pushNewRecursionContext(localctx, _startState, GenericSqlParser.RULE_exp);
|
|
600
577
|
this.state = 113;
|
|
601
578
|
if (!(this.precpred(this._ctx, 10))) {
|
|
602
579
|
throw this.createFailedPredicateException("this.precpred(this._ctx, 10)");
|
|
@@ -609,8 +586,8 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
609
586
|
break;
|
|
610
587
|
case 2:
|
|
611
588
|
{
|
|
612
|
-
|
|
613
|
-
this.pushNewRecursionContext(
|
|
589
|
+
localctx = new ExpContext(this, _parentctx, _parentState);
|
|
590
|
+
this.pushNewRecursionContext(localctx, _startState, GenericSqlParser.RULE_exp);
|
|
614
591
|
this.state = 117;
|
|
615
592
|
if (!(this.precpred(this._ctx, 9))) {
|
|
616
593
|
throw this.createFailedPredicateException("this.precpred(this._ctx, 9)");
|
|
@@ -624,13 +601,13 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
624
601
|
}
|
|
625
602
|
this.state = 123;
|
|
626
603
|
this._errHandler.sync(this);
|
|
627
|
-
_alt = this.
|
|
604
|
+
_alt = this._interp.adaptivePredict(this._input, 12, this._ctx);
|
|
628
605
|
}
|
|
629
606
|
}
|
|
630
607
|
}
|
|
631
608
|
catch (re) {
|
|
632
|
-
if (re instanceof
|
|
633
|
-
|
|
609
|
+
if (re instanceof antlr4_1.RecognitionException) {
|
|
610
|
+
localctx.exception = re;
|
|
634
611
|
this._errHandler.reportError(this, re);
|
|
635
612
|
this._errHandler.recover(this, re);
|
|
636
613
|
}
|
|
@@ -641,19 +618,19 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
641
618
|
finally {
|
|
642
619
|
this.unrollRecursionContexts(_parentctx);
|
|
643
620
|
}
|
|
644
|
-
return
|
|
621
|
+
return localctx;
|
|
645
622
|
}
|
|
646
623
|
// @RuleVersion(0)
|
|
647
624
|
numeric() {
|
|
648
|
-
let
|
|
649
|
-
this.enterRule(
|
|
625
|
+
let localctx = new NumericContext(this, this._ctx, this.state);
|
|
626
|
+
this.enterRule(localctx, 16, GenericSqlParser.RULE_numeric);
|
|
650
627
|
try {
|
|
651
628
|
let _alt;
|
|
652
629
|
this.state = 143;
|
|
653
630
|
this._errHandler.sync(this);
|
|
654
631
|
switch (this._input.LA(1)) {
|
|
655
|
-
case
|
|
656
|
-
this.enterOuterAlt(
|
|
632
|
+
case 24:
|
|
633
|
+
this.enterOuterAlt(localctx, 1);
|
|
657
634
|
{
|
|
658
635
|
this.state = 125;
|
|
659
636
|
this._errHandler.sync(this);
|
|
@@ -669,15 +646,15 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
669
646
|
}
|
|
670
647
|
break;
|
|
671
648
|
default:
|
|
672
|
-
throw new
|
|
649
|
+
throw new antlr4_1.NoViableAltException(this);
|
|
673
650
|
}
|
|
674
651
|
this.state = 127;
|
|
675
652
|
this._errHandler.sync(this);
|
|
676
|
-
_alt = this.
|
|
677
|
-
} while (_alt !== 2 && _alt !==
|
|
653
|
+
_alt = this._interp.adaptivePredict(this._input, 13, this._ctx);
|
|
654
|
+
} while (_alt !== 2 && _alt !== antlr4_1.ATN.INVALID_ALT_NUMBER);
|
|
678
655
|
this.state = 135;
|
|
679
656
|
this._errHandler.sync(this);
|
|
680
|
-
switch (this.
|
|
657
|
+
switch (this._interp.adaptivePredict(this._input, 15, this._ctx)) {
|
|
681
658
|
case 1:
|
|
682
659
|
{
|
|
683
660
|
this.state = 129;
|
|
@@ -696,19 +673,19 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
696
673
|
}
|
|
697
674
|
break;
|
|
698
675
|
default:
|
|
699
|
-
throw new
|
|
676
|
+
throw new antlr4_1.NoViableAltException(this);
|
|
700
677
|
}
|
|
701
678
|
this.state = 133;
|
|
702
679
|
this._errHandler.sync(this);
|
|
703
|
-
_alt = this.
|
|
704
|
-
} while (_alt !== 2 && _alt !==
|
|
680
|
+
_alt = this._interp.adaptivePredict(this._input, 14, this._ctx);
|
|
681
|
+
} while (_alt !== 2 && _alt !== antlr4_1.ATN.INVALID_ALT_NUMBER);
|
|
705
682
|
}
|
|
706
683
|
break;
|
|
707
684
|
}
|
|
708
685
|
}
|
|
709
686
|
break;
|
|
710
|
-
case
|
|
711
|
-
this.enterOuterAlt(
|
|
687
|
+
case 4:
|
|
688
|
+
this.enterOuterAlt(localctx, 2);
|
|
712
689
|
{
|
|
713
690
|
this.state = 137;
|
|
714
691
|
this.match(GenericSqlParser.T__3);
|
|
@@ -726,21 +703,21 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
726
703
|
}
|
|
727
704
|
break;
|
|
728
705
|
default:
|
|
729
|
-
throw new
|
|
706
|
+
throw new antlr4_1.NoViableAltException(this);
|
|
730
707
|
}
|
|
731
708
|
this.state = 141;
|
|
732
709
|
this._errHandler.sync(this);
|
|
733
|
-
_alt = this.
|
|
734
|
-
} while (_alt !== 2 && _alt !==
|
|
710
|
+
_alt = this._interp.adaptivePredict(this._input, 16, this._ctx);
|
|
711
|
+
} while (_alt !== 2 && _alt !== antlr4_1.ATN.INVALID_ALT_NUMBER);
|
|
735
712
|
}
|
|
736
713
|
break;
|
|
737
714
|
default:
|
|
738
|
-
throw new
|
|
715
|
+
throw new antlr4_1.NoViableAltException(this);
|
|
739
716
|
}
|
|
740
717
|
}
|
|
741
718
|
catch (re) {
|
|
742
|
-
if (re instanceof
|
|
743
|
-
|
|
719
|
+
if (re instanceof antlr4_1.RecognitionException) {
|
|
720
|
+
localctx.exception = re;
|
|
744
721
|
this._errHandler.reportError(this, re);
|
|
745
722
|
this._errHandler.recover(this, re);
|
|
746
723
|
}
|
|
@@ -751,33 +728,30 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
751
728
|
finally {
|
|
752
729
|
this.exitRule();
|
|
753
730
|
}
|
|
754
|
-
return
|
|
731
|
+
return localctx;
|
|
755
732
|
}
|
|
756
733
|
// @RuleVersion(0)
|
|
757
734
|
binaryOperator() {
|
|
758
|
-
let
|
|
759
|
-
this.enterRule(
|
|
735
|
+
let localctx = new BinaryOperatorContext(this, this._ctx, this.state);
|
|
736
|
+
this.enterRule(localctx, 18, GenericSqlParser.RULE_binaryOperator);
|
|
760
737
|
let _la;
|
|
761
738
|
try {
|
|
762
|
-
this.enterOuterAlt(
|
|
739
|
+
this.enterOuterAlt(localctx, 1);
|
|
763
740
|
{
|
|
764
741
|
this.state = 145;
|
|
765
742
|
_la = this._input.LA(1);
|
|
766
|
-
if (!((((_la) & ~0x1F) === 0 && ((1 << _la) &
|
|
743
|
+
if (!((((_la) & ~0x1F) === 0 && ((1 << _la) & 516096) !== 0))) {
|
|
767
744
|
this._errHandler.recoverInline(this);
|
|
768
745
|
}
|
|
769
746
|
else {
|
|
770
|
-
if (this._input.LA(1) === Token_1.Token.EOF) {
|
|
771
|
-
this.matchedEOF = true;
|
|
772
|
-
}
|
|
773
747
|
this._errHandler.reportMatch(this);
|
|
774
748
|
this.consume();
|
|
775
749
|
}
|
|
776
750
|
}
|
|
777
751
|
}
|
|
778
752
|
catch (re) {
|
|
779
|
-
if (re instanceof
|
|
780
|
-
|
|
753
|
+
if (re instanceof antlr4_1.RecognitionException) {
|
|
754
|
+
localctx.exception = re;
|
|
781
755
|
this._errHandler.reportError(this, re);
|
|
782
756
|
this._errHandler.recover(this, re);
|
|
783
757
|
}
|
|
@@ -788,18 +762,18 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
788
762
|
finally {
|
|
789
763
|
this.exitRule();
|
|
790
764
|
}
|
|
791
|
-
return
|
|
765
|
+
return localctx;
|
|
792
766
|
}
|
|
793
767
|
// @RuleVersion(0)
|
|
794
768
|
unaryOperator() {
|
|
795
|
-
let
|
|
796
|
-
this.enterRule(
|
|
769
|
+
let localctx = new UnaryOperatorContext(this, this._ctx, this.state);
|
|
770
|
+
this.enterRule(localctx, 20, GenericSqlParser.RULE_unaryOperator);
|
|
797
771
|
try {
|
|
798
772
|
this.state = 152;
|
|
799
773
|
this._errHandler.sync(this);
|
|
800
|
-
switch (this.
|
|
774
|
+
switch (this._interp.adaptivePredict(this._input, 18, this._ctx)) {
|
|
801
775
|
case 1:
|
|
802
|
-
this.enterOuterAlt(
|
|
776
|
+
this.enterOuterAlt(localctx, 1);
|
|
803
777
|
{
|
|
804
778
|
this.state = 147;
|
|
805
779
|
this.match(GenericSqlParser.IS);
|
|
@@ -808,7 +782,7 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
808
782
|
}
|
|
809
783
|
break;
|
|
810
784
|
case 2:
|
|
811
|
-
this.enterOuterAlt(
|
|
785
|
+
this.enterOuterAlt(localctx, 2);
|
|
812
786
|
{
|
|
813
787
|
this.state = 149;
|
|
814
788
|
this.match(GenericSqlParser.IS);
|
|
@@ -821,8 +795,8 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
821
795
|
}
|
|
822
796
|
}
|
|
823
797
|
catch (re) {
|
|
824
|
-
if (re instanceof
|
|
825
|
-
|
|
798
|
+
if (re instanceof antlr4_1.RecognitionException) {
|
|
799
|
+
localctx.exception = re;
|
|
826
800
|
this._errHandler.reportError(this, re);
|
|
827
801
|
this._errHandler.recover(this, re);
|
|
828
802
|
}
|
|
@@ -833,22 +807,22 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
833
807
|
finally {
|
|
834
808
|
this.exitRule();
|
|
835
809
|
}
|
|
836
|
-
return
|
|
810
|
+
return localctx;
|
|
837
811
|
}
|
|
838
812
|
// @RuleVersion(0)
|
|
839
813
|
idPath() {
|
|
840
|
-
let
|
|
841
|
-
this.enterRule(
|
|
814
|
+
let localctx = new IdPathContext(this, this._ctx, this.state);
|
|
815
|
+
this.enterRule(localctx, 22, GenericSqlParser.RULE_idPath);
|
|
842
816
|
try {
|
|
843
817
|
let _alt;
|
|
844
|
-
this.enterOuterAlt(
|
|
818
|
+
this.enterOuterAlt(localctx, 1);
|
|
845
819
|
{
|
|
846
820
|
this.state = 154;
|
|
847
821
|
this.identifier();
|
|
848
822
|
this.state = 159;
|
|
849
823
|
this._errHandler.sync(this);
|
|
850
|
-
_alt = this.
|
|
851
|
-
while (_alt !== 2 && _alt !==
|
|
824
|
+
_alt = this._interp.adaptivePredict(this._input, 19, this._ctx);
|
|
825
|
+
while (_alt !== 2 && _alt !== antlr4_1.ATN.INVALID_ALT_NUMBER) {
|
|
852
826
|
if (_alt === 1) {
|
|
853
827
|
{
|
|
854
828
|
{
|
|
@@ -861,13 +835,13 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
861
835
|
}
|
|
862
836
|
this.state = 161;
|
|
863
837
|
this._errHandler.sync(this);
|
|
864
|
-
_alt = this.
|
|
838
|
+
_alt = this._interp.adaptivePredict(this._input, 19, this._ctx);
|
|
865
839
|
}
|
|
866
840
|
}
|
|
867
841
|
}
|
|
868
842
|
catch (re) {
|
|
869
|
-
if (re instanceof
|
|
870
|
-
|
|
843
|
+
if (re instanceof antlr4_1.RecognitionException) {
|
|
844
|
+
localctx.exception = re;
|
|
871
845
|
this._errHandler.reportError(this, re);
|
|
872
846
|
this._errHandler.recover(this, re);
|
|
873
847
|
}
|
|
@@ -878,33 +852,30 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
878
852
|
finally {
|
|
879
853
|
this.exitRule();
|
|
880
854
|
}
|
|
881
|
-
return
|
|
855
|
+
return localctx;
|
|
882
856
|
}
|
|
883
857
|
// @RuleVersion(0)
|
|
884
858
|
identifier() {
|
|
885
|
-
let
|
|
886
|
-
this.enterRule(
|
|
859
|
+
let localctx = new IdentifierContext(this, this._ctx, this.state);
|
|
860
|
+
this.enterRule(localctx, 24, GenericSqlParser.RULE_identifier);
|
|
887
861
|
let _la;
|
|
888
862
|
try {
|
|
889
|
-
this.enterOuterAlt(
|
|
863
|
+
this.enterOuterAlt(localctx, 1);
|
|
890
864
|
{
|
|
891
865
|
this.state = 162;
|
|
892
866
|
_la = this._input.LA(1);
|
|
893
|
-
if (!(_la ===
|
|
867
|
+
if (!(_la === 23 || _la === 25)) {
|
|
894
868
|
this._errHandler.recoverInline(this);
|
|
895
869
|
}
|
|
896
870
|
else {
|
|
897
|
-
if (this._input.LA(1) === Token_1.Token.EOF) {
|
|
898
|
-
this.matchedEOF = true;
|
|
899
|
-
}
|
|
900
871
|
this._errHandler.reportMatch(this);
|
|
901
872
|
this.consume();
|
|
902
873
|
}
|
|
903
874
|
}
|
|
904
875
|
}
|
|
905
876
|
catch (re) {
|
|
906
|
-
if (re instanceof
|
|
907
|
-
|
|
877
|
+
if (re instanceof antlr4_1.RecognitionException) {
|
|
878
|
+
localctx.exception = re;
|
|
908
879
|
this._errHandler.reportError(this, re);
|
|
909
880
|
this._errHandler.recover(this, re);
|
|
910
881
|
}
|
|
@@ -915,18 +886,18 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
915
886
|
finally {
|
|
916
887
|
this.exitRule();
|
|
917
888
|
}
|
|
918
|
-
return
|
|
889
|
+
return localctx;
|
|
919
890
|
}
|
|
920
|
-
sempred(
|
|
891
|
+
sempred(localctx, ruleIndex, predIndex) {
|
|
921
892
|
switch (ruleIndex) {
|
|
922
893
|
case 6:
|
|
923
|
-
return this.boolExp_sempred(
|
|
894
|
+
return this.boolExp_sempred(localctx, predIndex);
|
|
924
895
|
case 7:
|
|
925
|
-
return this.exp_sempred(
|
|
896
|
+
return this.exp_sempred(localctx, predIndex);
|
|
926
897
|
}
|
|
927
898
|
return true;
|
|
928
899
|
}
|
|
929
|
-
boolExp_sempred(
|
|
900
|
+
boolExp_sempred(localctx, predIndex) {
|
|
930
901
|
switch (predIndex) {
|
|
931
902
|
case 0:
|
|
932
903
|
return this.precpred(this._ctx, 3);
|
|
@@ -935,7 +906,7 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
935
906
|
}
|
|
936
907
|
return true;
|
|
937
908
|
}
|
|
938
|
-
exp_sempred(
|
|
909
|
+
exp_sempred(localctx, predIndex) {
|
|
939
910
|
switch (predIndex) {
|
|
940
911
|
case 2:
|
|
941
912
|
return this.precpred(this._ctx, 10);
|
|
@@ -944,101 +915,87 @@ class GenericSqlParser extends Parser_1.Parser {
|
|
|
944
915
|
}
|
|
945
916
|
return true;
|
|
946
917
|
}
|
|
947
|
-
static _serializedATN =
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
"\x02\x02\x02~\x80\x07\x1A\x02\x02\x7F~\x03\x02\x02\x02\x80\x81\x03\x02" +
|
|
1000
|
-
"\x02\x02\x81\x7F\x03\x02\x02\x02\x81\x82\x03\x02\x02\x02\x82\x89\x03\x02" +
|
|
1001
|
-
"\x02\x02\x83\x85\x07\x06\x02\x02\x84\x86\x07\x1A\x02\x02\x85\x84\x03\x02" +
|
|
1002
|
-
"\x02\x02\x86\x87\x03\x02\x02\x02\x87\x85\x03\x02\x02\x02\x87\x88\x03\x02" +
|
|
1003
|
-
"\x02\x02\x88\x8A\x03\x02\x02\x02\x89\x83\x03\x02\x02\x02\x89\x8A\x03\x02" +
|
|
1004
|
-
"\x02\x02\x8A\x92\x03\x02\x02\x02\x8B\x8D\x07\x06\x02\x02\x8C\x8E\x07\x1A" +
|
|
1005
|
-
"\x02\x02\x8D\x8C\x03\x02\x02\x02\x8E\x8F\x03\x02\x02\x02\x8F\x8D\x03\x02" +
|
|
1006
|
-
"\x02\x02\x8F\x90\x03\x02\x02\x02\x90\x92\x03\x02\x02\x02\x91\x7F\x03\x02" +
|
|
1007
|
-
"\x02\x02\x91\x8B\x03\x02\x02\x02\x92\x13\x03\x02\x02\x02\x93\x94\t\x02" +
|
|
1008
|
-
"\x02\x02\x94\x15\x03\x02\x02\x02\x95\x96\x07\x15\x02\x02\x96\x9B\x07\x16" +
|
|
1009
|
-
"\x02\x02\x97\x98\x07\x15\x02\x02\x98\x99\x07\r\x02\x02\x99\x9B\x07\x16" +
|
|
1010
|
-
"\x02\x02\x9A\x95\x03\x02\x02\x02\x9A\x97\x03\x02\x02\x02\x9B\x17\x03\x02" +
|
|
1011
|
-
"\x02\x02\x9C\xA1\x05\x1A\x0E\x02\x9D\x9E\x07\x06\x02\x02\x9E\xA0\x05\x1A" +
|
|
1012
|
-
"\x0E\x02\x9F\x9D\x03\x02\x02\x02\xA0\xA3\x03\x02\x02\x02\xA1\x9F\x03\x02" +
|
|
1013
|
-
"\x02\x02\xA1\xA2\x03\x02\x02\x02\xA2\x19\x03\x02\x02\x02\xA3\xA1\x03\x02" +
|
|
1014
|
-
"\x02\x02\xA4\xA5\t\x03\x02\x02\xA5\x1B\x03\x02\x02\x02\x16$,5:>AGOQ]q" +
|
|
1015
|
-
"y{\x81\x87\x89\x8F\x91\x9A\xA1";
|
|
918
|
+
static _serializedATN = [4, 1, 27, 165, 2, 0, 7, 0, 2,
|
|
919
|
+
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,
|
|
920
|
+
10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 0, 35, 8, 0,
|
|
921
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 43, 8, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 5, 3, 50, 8, 3, 10, 3,
|
|
922
|
+
12, 3, 53, 9, 3, 1, 4, 1, 4, 3, 4, 57, 8, 4, 1, 5, 1, 5, 3, 5, 61, 8, 5, 1, 5, 3, 5, 64, 8, 5, 1, 6, 1,
|
|
923
|
+
6, 1, 6, 1, 6, 3, 6, 70, 8, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 5, 6, 78, 8, 6, 10, 6, 12, 6, 81, 9,
|
|
924
|
+
6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 5, 7, 90, 8, 7, 10, 7, 12, 7, 93, 9, 7, 1, 7, 1, 7, 1, 7, 1,
|
|
925
|
+
7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 112, 8, 7, 1, 7, 1,
|
|
926
|
+
7, 1, 7, 1, 7, 1, 7, 1, 7, 5, 7, 120, 8, 7, 10, 7, 12, 7, 123, 9, 7, 1, 8, 4, 8, 126, 8, 8, 11, 8, 12,
|
|
927
|
+
8, 127, 1, 8, 1, 8, 4, 8, 132, 8, 8, 11, 8, 12, 8, 133, 3, 8, 136, 8, 8, 1, 8, 1, 8, 4, 8, 140, 8, 8,
|
|
928
|
+
11, 8, 12, 8, 141, 3, 8, 144, 8, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 153, 8, 10,
|
|
929
|
+
1, 11, 1, 11, 1, 11, 5, 11, 158, 8, 11, 10, 11, 12, 11, 161, 9, 11, 1, 12, 1, 12, 1, 12, 0, 2, 12,
|
|
930
|
+
14, 13, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 0, 2, 1, 0, 13, 18, 2, 0, 23, 23, 25, 25, 177,
|
|
931
|
+
0, 34, 1, 0, 0, 0, 2, 36, 1, 0, 0, 0, 4, 44, 1, 0, 0, 0, 6, 46, 1, 0, 0, 0, 8, 56, 1, 0, 0, 0, 10, 58,
|
|
932
|
+
1, 0, 0, 0, 12, 69, 1, 0, 0, 0, 14, 111, 1, 0, 0, 0, 16, 143, 1, 0, 0, 0, 18, 145, 1, 0, 0, 0, 20, 152,
|
|
933
|
+
1, 0, 0, 0, 22, 154, 1, 0, 0, 0, 24, 162, 1, 0, 0, 0, 26, 27, 3, 2, 1, 0, 27, 28, 5, 0, 0, 1, 28, 35,
|
|
934
|
+
1, 0, 0, 0, 29, 30, 5, 1, 0, 0, 30, 31, 3, 2, 1, 0, 31, 32, 5, 2, 0, 0, 32, 33, 5, 0, 0, 1, 33, 35, 1,
|
|
935
|
+
0, 0, 0, 34, 26, 1, 0, 0, 0, 34, 29, 1, 0, 0, 0, 35, 1, 1, 0, 0, 0, 36, 37, 5, 5, 0, 0, 37, 38, 3, 6,
|
|
936
|
+
3, 0, 38, 39, 5, 7, 0, 0, 39, 42, 3, 4, 2, 0, 40, 41, 5, 8, 0, 0, 41, 43, 3, 12, 6, 0, 42, 40, 1, 0,
|
|
937
|
+
0, 0, 42, 43, 1, 0, 0, 0, 43, 3, 1, 0, 0, 0, 44, 45, 3, 10, 5, 0, 45, 5, 1, 0, 0, 0, 46, 51, 3, 8, 4,
|
|
938
|
+
0, 47, 48, 5, 3, 0, 0, 48, 50, 3, 8, 4, 0, 49, 47, 1, 0, 0, 0, 50, 53, 1, 0, 0, 0, 51, 49, 1, 0, 0, 0,
|
|
939
|
+
51, 52, 1, 0, 0, 0, 52, 7, 1, 0, 0, 0, 53, 51, 1, 0, 0, 0, 54, 57, 3, 10, 5, 0, 55, 57, 5, 6, 0, 0, 56,
|
|
940
|
+
54, 1, 0, 0, 0, 56, 55, 1, 0, 0, 0, 57, 9, 1, 0, 0, 0, 58, 63, 3, 22, 11, 0, 59, 61, 5, 12, 0, 0, 60,
|
|
941
|
+
59, 1, 0, 0, 0, 60, 61, 1, 0, 0, 0, 61, 62, 1, 0, 0, 0, 62, 64, 3, 24, 12, 0, 63, 60, 1, 0, 0, 0, 63,
|
|
942
|
+
64, 1, 0, 0, 0, 64, 11, 1, 0, 0, 0, 65, 66, 6, 6, -1, 0, 66, 70, 3, 14, 7, 0, 67, 68, 5, 11, 0, 0, 68,
|
|
943
|
+
70, 3, 12, 6, 1, 69, 65, 1, 0, 0, 0, 69, 67, 1, 0, 0, 0, 70, 79, 1, 0, 0, 0, 71, 72, 10, 3, 0, 0, 72,
|
|
944
|
+
73, 5, 9, 0, 0, 73, 78, 3, 12, 6, 4, 74, 75, 10, 2, 0, 0, 75, 76, 5, 10, 0, 0, 76, 78, 3, 12, 6, 3,
|
|
945
|
+
77, 71, 1, 0, 0, 0, 77, 74, 1, 0, 0, 0, 78, 81, 1, 0, 0, 0, 79, 77, 1, 0, 0, 0, 79, 80, 1, 0, 0, 0, 80,
|
|
946
|
+
13, 1, 0, 0, 0, 81, 79, 1, 0, 0, 0, 82, 83, 6, 7, -1, 0, 83, 112, 3, 22, 11, 0, 84, 85, 3, 24, 12,
|
|
947
|
+
0, 85, 86, 5, 1, 0, 0, 86, 91, 3, 14, 7, 0, 87, 88, 5, 3, 0, 0, 88, 90, 3, 14, 7, 0, 89, 87, 1, 0, 0,
|
|
948
|
+
0, 90, 93, 1, 0, 0, 0, 91, 89, 1, 0, 0, 0, 91, 92, 1, 0, 0, 0, 92, 94, 1, 0, 0, 0, 93, 91, 1, 0, 0, 0,
|
|
949
|
+
94, 95, 5, 2, 0, 0, 95, 112, 1, 0, 0, 0, 96, 97, 5, 21, 0, 0, 97, 98, 5, 1, 0, 0, 98, 99, 3, 14, 7,
|
|
950
|
+
0, 99, 100, 5, 12, 0, 0, 100, 101, 3, 24, 12, 0, 101, 102, 5, 2, 0, 0, 102, 112, 1, 0, 0, 0, 103,
|
|
951
|
+
112, 5, 26, 0, 0, 104, 112, 3, 16, 8, 0, 105, 112, 3, 24, 12, 0, 106, 112, 5, 22, 0, 0, 107, 108,
|
|
952
|
+
5, 1, 0, 0, 108, 109, 3, 14, 7, 0, 109, 110, 5, 2, 0, 0, 110, 112, 1, 0, 0, 0, 111, 82, 1, 0, 0, 0,
|
|
953
|
+
111, 84, 1, 0, 0, 0, 111, 96, 1, 0, 0, 0, 111, 103, 1, 0, 0, 0, 111, 104, 1, 0, 0, 0, 111, 105, 1,
|
|
954
|
+
0, 0, 0, 111, 106, 1, 0, 0, 0, 111, 107, 1, 0, 0, 0, 112, 121, 1, 0, 0, 0, 113, 114, 10, 10, 0, 0,
|
|
955
|
+
114, 115, 3, 18, 9, 0, 115, 116, 3, 14, 7, 11, 116, 120, 1, 0, 0, 0, 117, 118, 10, 9, 0, 0, 118,
|
|
956
|
+
120, 3, 20, 10, 0, 119, 113, 1, 0, 0, 0, 119, 117, 1, 0, 0, 0, 120, 123, 1, 0, 0, 0, 121, 119, 1,
|
|
957
|
+
0, 0, 0, 121, 122, 1, 0, 0, 0, 122, 15, 1, 0, 0, 0, 123, 121, 1, 0, 0, 0, 124, 126, 5, 24, 0, 0, 125,
|
|
958
|
+
124, 1, 0, 0, 0, 126, 127, 1, 0, 0, 0, 127, 125, 1, 0, 0, 0, 127, 128, 1, 0, 0, 0, 128, 135, 1, 0,
|
|
959
|
+
0, 0, 129, 131, 5, 4, 0, 0, 130, 132, 5, 24, 0, 0, 131, 130, 1, 0, 0, 0, 132, 133, 1, 0, 0, 0, 133,
|
|
960
|
+
131, 1, 0, 0, 0, 133, 134, 1, 0, 0, 0, 134, 136, 1, 0, 0, 0, 135, 129, 1, 0, 0, 0, 135, 136, 1, 0,
|
|
961
|
+
0, 0, 136, 144, 1, 0, 0, 0, 137, 139, 5, 4, 0, 0, 138, 140, 5, 24, 0, 0, 139, 138, 1, 0, 0, 0, 140,
|
|
962
|
+
141, 1, 0, 0, 0, 141, 139, 1, 0, 0, 0, 141, 142, 1, 0, 0, 0, 142, 144, 1, 0, 0, 0, 143, 125, 1, 0,
|
|
963
|
+
0, 0, 143, 137, 1, 0, 0, 0, 144, 17, 1, 0, 0, 0, 145, 146, 7, 0, 0, 0, 146, 19, 1, 0, 0, 0, 147, 148,
|
|
964
|
+
5, 19, 0, 0, 148, 153, 5, 20, 0, 0, 149, 150, 5, 19, 0, 0, 150, 151, 5, 11, 0, 0, 151, 153, 5, 20,
|
|
965
|
+
0, 0, 152, 147, 1, 0, 0, 0, 152, 149, 1, 0, 0, 0, 153, 21, 1, 0, 0, 0, 154, 159, 3, 24, 12, 0, 155,
|
|
966
|
+
156, 5, 4, 0, 0, 156, 158, 3, 24, 12, 0, 157, 155, 1, 0, 0, 0, 158, 161, 1, 0, 0, 0, 159, 157, 1,
|
|
967
|
+
0, 0, 0, 159, 160, 1, 0, 0, 0, 160, 23, 1, 0, 0, 0, 161, 159, 1, 0, 0, 0, 162, 163, 7, 1, 0, 0, 163,
|
|
968
|
+
25, 1, 0, 0, 0, 20, 34, 42, 51, 56, 60, 63, 69, 77, 79, 91, 111, 119, 121, 127, 133, 135, 141,
|
|
969
|
+
143, 152, 159];
|
|
1016
970
|
static __ATN;
|
|
1017
971
|
static get _ATN() {
|
|
1018
972
|
if (!GenericSqlParser.__ATN) {
|
|
1019
|
-
GenericSqlParser.__ATN = new
|
|
973
|
+
GenericSqlParser.__ATN = new antlr4_1.ATNDeserializer().deserialize(GenericSqlParser._serializedATN);
|
|
1020
974
|
}
|
|
1021
975
|
return GenericSqlParser.__ATN;
|
|
1022
976
|
}
|
|
977
|
+
static DecisionsToDFA = GenericSqlParser._ATN.decisionToState.map((ds, index) => new antlr4_1.DFA(ds, index));
|
|
1023
978
|
}
|
|
1024
|
-
exports.
|
|
1025
|
-
class StatementContext extends
|
|
979
|
+
exports.default = GenericSqlParser;
|
|
980
|
+
class StatementContext extends antlr4_1.ParserRuleContext {
|
|
981
|
+
constructor(parser, parent, invokingState) {
|
|
982
|
+
super(parent, invokingState);
|
|
983
|
+
this.parser = parser;
|
|
984
|
+
}
|
|
1026
985
|
query() {
|
|
1027
|
-
return this.
|
|
986
|
+
return this.getTypedRuleContext(QueryContext, 0);
|
|
1028
987
|
}
|
|
1029
|
-
EOF() {
|
|
1030
|
-
|
|
1031
|
-
|
|
988
|
+
EOF() {
|
|
989
|
+
return this.getToken(GenericSqlParser.EOF, 0);
|
|
990
|
+
}
|
|
991
|
+
get ruleIndex() {
|
|
992
|
+
return GenericSqlParser.RULE_statement;
|
|
1032
993
|
}
|
|
1033
|
-
// @Override
|
|
1034
|
-
get ruleIndex() { return GenericSqlParser.RULE_statement; }
|
|
1035
|
-
// @Override
|
|
1036
994
|
enterRule(listener) {
|
|
1037
995
|
if (listener.enterStatement) {
|
|
1038
996
|
listener.enterStatement(this);
|
|
1039
997
|
}
|
|
1040
998
|
}
|
|
1041
|
-
// @Override
|
|
1042
999
|
exitRule(listener) {
|
|
1043
1000
|
if (listener.exitStatement) {
|
|
1044
1001
|
listener.exitStatement(this);
|
|
@@ -1055,33 +1012,39 @@ class StatementContext extends ParserRuleContext_1.ParserRuleContext {
|
|
|
1055
1012
|
}
|
|
1056
1013
|
}
|
|
1057
1014
|
exports.StatementContext = StatementContext;
|
|
1058
|
-
class QueryContext extends
|
|
1059
|
-
|
|
1015
|
+
class QueryContext extends antlr4_1.ParserRuleContext {
|
|
1016
|
+
_from_;
|
|
1060
1017
|
_where;
|
|
1061
|
-
|
|
1018
|
+
constructor(parser, parent, invokingState) {
|
|
1019
|
+
super(parent, invokingState);
|
|
1020
|
+
this.parser = parser;
|
|
1021
|
+
}
|
|
1022
|
+
SELECT() {
|
|
1023
|
+
return this.getToken(GenericSqlParser.SELECT, 0);
|
|
1024
|
+
}
|
|
1062
1025
|
selectFields() {
|
|
1063
|
-
return this.
|
|
1026
|
+
return this.getTypedRuleContext(SelectFieldsContext, 0);
|
|
1027
|
+
}
|
|
1028
|
+
FROM() {
|
|
1029
|
+
return this.getToken(GenericSqlParser.FROM, 0);
|
|
1064
1030
|
}
|
|
1065
|
-
FROM() { return this.getToken(GenericSqlParser.FROM, 0); }
|
|
1066
1031
|
fromTables() {
|
|
1067
|
-
return this.
|
|
1032
|
+
return this.getTypedRuleContext(FromTablesContext, 0);
|
|
1033
|
+
}
|
|
1034
|
+
WHERE() {
|
|
1035
|
+
return this.getToken(GenericSqlParser.WHERE, 0);
|
|
1068
1036
|
}
|
|
1069
|
-
WHERE() { return this.tryGetToken(GenericSqlParser.WHERE, 0); }
|
|
1070
1037
|
boolExp() {
|
|
1071
|
-
return this.
|
|
1038
|
+
return this.getTypedRuleContext(BoolExpContext, 0);
|
|
1072
1039
|
}
|
|
1073
|
-
|
|
1074
|
-
|
|
1040
|
+
get ruleIndex() {
|
|
1041
|
+
return GenericSqlParser.RULE_query;
|
|
1075
1042
|
}
|
|
1076
|
-
// @Override
|
|
1077
|
-
get ruleIndex() { return GenericSqlParser.RULE_query; }
|
|
1078
|
-
// @Override
|
|
1079
1043
|
enterRule(listener) {
|
|
1080
1044
|
if (listener.enterQuery) {
|
|
1081
1045
|
listener.enterQuery(this);
|
|
1082
1046
|
}
|
|
1083
1047
|
}
|
|
1084
|
-
// @Override
|
|
1085
1048
|
exitRule(listener) {
|
|
1086
1049
|
if (listener.exitQuery) {
|
|
1087
1050
|
listener.exitQuery(this);
|
|
@@ -1098,22 +1061,22 @@ class QueryContext extends ParserRuleContext_1.ParserRuleContext {
|
|
|
1098
1061
|
}
|
|
1099
1062
|
}
|
|
1100
1063
|
exports.QueryContext = QueryContext;
|
|
1101
|
-
class FromTablesContext extends
|
|
1064
|
+
class FromTablesContext extends antlr4_1.ParserRuleContext {
|
|
1065
|
+
constructor(parser, parent, invokingState) {
|
|
1066
|
+
super(parent, invokingState);
|
|
1067
|
+
this.parser = parser;
|
|
1068
|
+
}
|
|
1102
1069
|
aliasField() {
|
|
1103
|
-
return this.
|
|
1070
|
+
return this.getTypedRuleContext(AliasFieldContext, 0);
|
|
1104
1071
|
}
|
|
1105
|
-
|
|
1106
|
-
|
|
1072
|
+
get ruleIndex() {
|
|
1073
|
+
return GenericSqlParser.RULE_fromTables;
|
|
1107
1074
|
}
|
|
1108
|
-
// @Override
|
|
1109
|
-
get ruleIndex() { return GenericSqlParser.RULE_fromTables; }
|
|
1110
|
-
// @Override
|
|
1111
1075
|
enterRule(listener) {
|
|
1112
1076
|
if (listener.enterFromTables) {
|
|
1113
1077
|
listener.enterFromTables(this);
|
|
1114
1078
|
}
|
|
1115
1079
|
}
|
|
1116
|
-
// @Override
|
|
1117
1080
|
exitRule(listener) {
|
|
1118
1081
|
if (listener.exitFromTables) {
|
|
1119
1082
|
listener.exitFromTables(this);
|
|
@@ -1130,27 +1093,25 @@ class FromTablesContext extends ParserRuleContext_1.ParserRuleContext {
|
|
|
1130
1093
|
}
|
|
1131
1094
|
}
|
|
1132
1095
|
exports.FromTablesContext = FromTablesContext;
|
|
1133
|
-
class SelectFieldsContext extends
|
|
1096
|
+
class SelectFieldsContext extends antlr4_1.ParserRuleContext {
|
|
1097
|
+
constructor(parser, parent, invokingState) {
|
|
1098
|
+
super(parent, invokingState);
|
|
1099
|
+
this.parser = parser;
|
|
1100
|
+
}
|
|
1101
|
+
field_list() {
|
|
1102
|
+
return this.getTypedRuleContexts(FieldContext);
|
|
1103
|
+
}
|
|
1134
1104
|
field(i) {
|
|
1135
|
-
|
|
1136
|
-
return this.getRuleContexts(FieldContext);
|
|
1137
|
-
}
|
|
1138
|
-
else {
|
|
1139
|
-
return this.getRuleContext(i, FieldContext);
|
|
1140
|
-
}
|
|
1105
|
+
return this.getTypedRuleContext(FieldContext, i);
|
|
1141
1106
|
}
|
|
1142
|
-
|
|
1143
|
-
|
|
1107
|
+
get ruleIndex() {
|
|
1108
|
+
return GenericSqlParser.RULE_selectFields;
|
|
1144
1109
|
}
|
|
1145
|
-
// @Override
|
|
1146
|
-
get ruleIndex() { return GenericSqlParser.RULE_selectFields; }
|
|
1147
|
-
// @Override
|
|
1148
1110
|
enterRule(listener) {
|
|
1149
1111
|
if (listener.enterSelectFields) {
|
|
1150
1112
|
listener.enterSelectFields(this);
|
|
1151
1113
|
}
|
|
1152
1114
|
}
|
|
1153
|
-
// @Override
|
|
1154
1115
|
exitRule(listener) {
|
|
1155
1116
|
if (listener.exitSelectFields) {
|
|
1156
1117
|
listener.exitSelectFields(this);
|
|
@@ -1167,23 +1128,25 @@ class SelectFieldsContext extends ParserRuleContext_1.ParserRuleContext {
|
|
|
1167
1128
|
}
|
|
1168
1129
|
}
|
|
1169
1130
|
exports.SelectFieldsContext = SelectFieldsContext;
|
|
1170
|
-
class FieldContext extends
|
|
1131
|
+
class FieldContext extends antlr4_1.ParserRuleContext {
|
|
1132
|
+
constructor(parser, parent, invokingState) {
|
|
1133
|
+
super(parent, invokingState);
|
|
1134
|
+
this.parser = parser;
|
|
1135
|
+
}
|
|
1171
1136
|
aliasField() {
|
|
1172
|
-
return this.
|
|
1137
|
+
return this.getTypedRuleContext(AliasFieldContext, 0);
|
|
1173
1138
|
}
|
|
1174
|
-
ASTERISK() {
|
|
1175
|
-
|
|
1176
|
-
|
|
1139
|
+
ASTERISK() {
|
|
1140
|
+
return this.getToken(GenericSqlParser.ASTERISK, 0);
|
|
1141
|
+
}
|
|
1142
|
+
get ruleIndex() {
|
|
1143
|
+
return GenericSqlParser.RULE_field;
|
|
1177
1144
|
}
|
|
1178
|
-
// @Override
|
|
1179
|
-
get ruleIndex() { return GenericSqlParser.RULE_field; }
|
|
1180
|
-
// @Override
|
|
1181
1145
|
enterRule(listener) {
|
|
1182
1146
|
if (listener.enterField) {
|
|
1183
1147
|
listener.enterField(this);
|
|
1184
1148
|
}
|
|
1185
1149
|
}
|
|
1186
|
-
// @Override
|
|
1187
1150
|
exitRule(listener) {
|
|
1188
1151
|
if (listener.exitField) {
|
|
1189
1152
|
listener.exitField(this);
|
|
@@ -1200,26 +1163,28 @@ class FieldContext extends ParserRuleContext_1.ParserRuleContext {
|
|
|
1200
1163
|
}
|
|
1201
1164
|
}
|
|
1202
1165
|
exports.FieldContext = FieldContext;
|
|
1203
|
-
class AliasFieldContext extends
|
|
1166
|
+
class AliasFieldContext extends antlr4_1.ParserRuleContext {
|
|
1167
|
+
constructor(parser, parent, invokingState) {
|
|
1168
|
+
super(parent, invokingState);
|
|
1169
|
+
this.parser = parser;
|
|
1170
|
+
}
|
|
1204
1171
|
idPath() {
|
|
1205
|
-
return this.
|
|
1172
|
+
return this.getTypedRuleContext(IdPathContext, 0);
|
|
1206
1173
|
}
|
|
1207
1174
|
identifier() {
|
|
1208
|
-
return this.
|
|
1175
|
+
return this.getTypedRuleContext(IdentifierContext, 0);
|
|
1209
1176
|
}
|
|
1210
|
-
AS() {
|
|
1211
|
-
|
|
1212
|
-
|
|
1177
|
+
AS() {
|
|
1178
|
+
return this.getToken(GenericSqlParser.AS, 0);
|
|
1179
|
+
}
|
|
1180
|
+
get ruleIndex() {
|
|
1181
|
+
return GenericSqlParser.RULE_aliasField;
|
|
1213
1182
|
}
|
|
1214
|
-
// @Override
|
|
1215
|
-
get ruleIndex() { return GenericSqlParser.RULE_aliasField; }
|
|
1216
|
-
// @Override
|
|
1217
1183
|
enterRule(listener) {
|
|
1218
1184
|
if (listener.enterAliasField) {
|
|
1219
1185
|
listener.enterAliasField(this);
|
|
1220
1186
|
}
|
|
1221
1187
|
}
|
|
1222
|
-
// @Override
|
|
1223
1188
|
exitRule(listener) {
|
|
1224
1189
|
if (listener.exitAliasField) {
|
|
1225
1190
|
listener.exitAliasField(this);
|
|
@@ -1236,33 +1201,37 @@ class AliasFieldContext extends ParserRuleContext_1.ParserRuleContext {
|
|
|
1236
1201
|
}
|
|
1237
1202
|
}
|
|
1238
1203
|
exports.AliasFieldContext = AliasFieldContext;
|
|
1239
|
-
class BoolExpContext extends
|
|
1204
|
+
class BoolExpContext extends antlr4_1.ParserRuleContext {
|
|
1205
|
+
constructor(parser, parent, invokingState) {
|
|
1206
|
+
super(parent, invokingState);
|
|
1207
|
+
this.parser = parser;
|
|
1208
|
+
}
|
|
1240
1209
|
exp() {
|
|
1241
|
-
return this.
|
|
1210
|
+
return this.getTypedRuleContext(ExpContext, 0);
|
|
1211
|
+
}
|
|
1212
|
+
NOT() {
|
|
1213
|
+
return this.getToken(GenericSqlParser.NOT, 0);
|
|
1214
|
+
}
|
|
1215
|
+
boolExp_list() {
|
|
1216
|
+
return this.getTypedRuleContexts(BoolExpContext);
|
|
1242
1217
|
}
|
|
1243
1218
|
boolExp(i) {
|
|
1244
|
-
|
|
1245
|
-
return this.getRuleContexts(BoolExpContext);
|
|
1246
|
-
}
|
|
1247
|
-
else {
|
|
1248
|
-
return this.getRuleContext(i, BoolExpContext);
|
|
1249
|
-
}
|
|
1219
|
+
return this.getTypedRuleContext(BoolExpContext, i);
|
|
1250
1220
|
}
|
|
1251
|
-
AND() {
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1221
|
+
AND() {
|
|
1222
|
+
return this.getToken(GenericSqlParser.AND, 0);
|
|
1223
|
+
}
|
|
1224
|
+
OR() {
|
|
1225
|
+
return this.getToken(GenericSqlParser.OR, 0);
|
|
1226
|
+
}
|
|
1227
|
+
get ruleIndex() {
|
|
1228
|
+
return GenericSqlParser.RULE_boolExp;
|
|
1256
1229
|
}
|
|
1257
|
-
// @Override
|
|
1258
|
-
get ruleIndex() { return GenericSqlParser.RULE_boolExp; }
|
|
1259
|
-
// @Override
|
|
1260
1230
|
enterRule(listener) {
|
|
1261
1231
|
if (listener.enterBoolExp) {
|
|
1262
1232
|
listener.enterBoolExp(this);
|
|
1263
1233
|
}
|
|
1264
1234
|
}
|
|
1265
|
-
// @Override
|
|
1266
1235
|
exitRule(listener) {
|
|
1267
1236
|
if (listener.exitBoolExp) {
|
|
1268
1237
|
listener.exitBoolExp(this);
|
|
@@ -1279,46 +1248,52 @@ class BoolExpContext extends ParserRuleContext_1.ParserRuleContext {
|
|
|
1279
1248
|
}
|
|
1280
1249
|
}
|
|
1281
1250
|
exports.BoolExpContext = BoolExpContext;
|
|
1282
|
-
class ExpContext extends
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
}
|
|
1287
|
-
else {
|
|
1288
|
-
return this.getRuleContext(i, ExpContext);
|
|
1289
|
-
}
|
|
1290
|
-
}
|
|
1291
|
-
binaryOperator() {
|
|
1292
|
-
return this.tryGetRuleContext(0, BinaryOperatorContext);
|
|
1293
|
-
}
|
|
1294
|
-
unaryOperator() {
|
|
1295
|
-
return this.tryGetRuleContext(0, UnaryOperatorContext);
|
|
1251
|
+
class ExpContext extends antlr4_1.ParserRuleContext {
|
|
1252
|
+
constructor(parser, parent, invokingState) {
|
|
1253
|
+
super(parent, invokingState);
|
|
1254
|
+
this.parser = parser;
|
|
1296
1255
|
}
|
|
1297
1256
|
idPath() {
|
|
1298
|
-
return this.
|
|
1257
|
+
return this.getTypedRuleContext(IdPathContext, 0);
|
|
1299
1258
|
}
|
|
1300
1259
|
identifier() {
|
|
1301
|
-
return this.
|
|
1260
|
+
return this.getTypedRuleContext(IdentifierContext, 0);
|
|
1261
|
+
}
|
|
1262
|
+
exp_list() {
|
|
1263
|
+
return this.getTypedRuleContexts(ExpContext);
|
|
1264
|
+
}
|
|
1265
|
+
exp(i) {
|
|
1266
|
+
return this.getTypedRuleContext(ExpContext, i);
|
|
1267
|
+
}
|
|
1268
|
+
CAST() {
|
|
1269
|
+
return this.getToken(GenericSqlParser.CAST, 0);
|
|
1270
|
+
}
|
|
1271
|
+
AS() {
|
|
1272
|
+
return this.getToken(GenericSqlParser.AS, 0);
|
|
1273
|
+
}
|
|
1274
|
+
STRING() {
|
|
1275
|
+
return this.getToken(GenericSqlParser.STRING, 0);
|
|
1302
1276
|
}
|
|
1303
|
-
CAST() { return this.tryGetToken(GenericSqlParser.CAST, 0); }
|
|
1304
|
-
AS() { return this.tryGetToken(GenericSqlParser.AS, 0); }
|
|
1305
|
-
STRING() { return this.tryGetToken(GenericSqlParser.STRING, 0); }
|
|
1306
1277
|
numeric() {
|
|
1307
|
-
return this.
|
|
1278
|
+
return this.getTypedRuleContext(NumericContext, 0);
|
|
1308
1279
|
}
|
|
1309
|
-
INDEXED_PARAM() {
|
|
1310
|
-
|
|
1311
|
-
|
|
1280
|
+
INDEXED_PARAM() {
|
|
1281
|
+
return this.getToken(GenericSqlParser.INDEXED_PARAM, 0);
|
|
1282
|
+
}
|
|
1283
|
+
binaryOperator() {
|
|
1284
|
+
return this.getTypedRuleContext(BinaryOperatorContext, 0);
|
|
1285
|
+
}
|
|
1286
|
+
unaryOperator() {
|
|
1287
|
+
return this.getTypedRuleContext(UnaryOperatorContext, 0);
|
|
1288
|
+
}
|
|
1289
|
+
get ruleIndex() {
|
|
1290
|
+
return GenericSqlParser.RULE_exp;
|
|
1312
1291
|
}
|
|
1313
|
-
// @Override
|
|
1314
|
-
get ruleIndex() { return GenericSqlParser.RULE_exp; }
|
|
1315
|
-
// @Override
|
|
1316
1292
|
enterRule(listener) {
|
|
1317
1293
|
if (listener.enterExp) {
|
|
1318
1294
|
listener.enterExp(this);
|
|
1319
1295
|
}
|
|
1320
1296
|
}
|
|
1321
|
-
// @Override
|
|
1322
1297
|
exitRule(listener) {
|
|
1323
1298
|
if (listener.exitExp) {
|
|
1324
1299
|
listener.exitExp(this);
|
|
@@ -1335,27 +1310,25 @@ class ExpContext extends ParserRuleContext_1.ParserRuleContext {
|
|
|
1335
1310
|
}
|
|
1336
1311
|
}
|
|
1337
1312
|
exports.ExpContext = ExpContext;
|
|
1338
|
-
class NumericContext extends
|
|
1313
|
+
class NumericContext extends antlr4_1.ParserRuleContext {
|
|
1314
|
+
constructor(parser, parent, invokingState) {
|
|
1315
|
+
super(parent, invokingState);
|
|
1316
|
+
this.parser = parser;
|
|
1317
|
+
}
|
|
1318
|
+
DIGIT_list() {
|
|
1319
|
+
return this.getTokens(GenericSqlParser.DIGIT);
|
|
1320
|
+
}
|
|
1339
1321
|
DIGIT(i) {
|
|
1340
|
-
|
|
1341
|
-
return this.getTokens(GenericSqlParser.DIGIT);
|
|
1342
|
-
}
|
|
1343
|
-
else {
|
|
1344
|
-
return this.getToken(GenericSqlParser.DIGIT, i);
|
|
1345
|
-
}
|
|
1322
|
+
return this.getToken(GenericSqlParser.DIGIT, i);
|
|
1346
1323
|
}
|
|
1347
|
-
|
|
1348
|
-
|
|
1324
|
+
get ruleIndex() {
|
|
1325
|
+
return GenericSqlParser.RULE_numeric;
|
|
1349
1326
|
}
|
|
1350
|
-
// @Override
|
|
1351
|
-
get ruleIndex() { return GenericSqlParser.RULE_numeric; }
|
|
1352
|
-
// @Override
|
|
1353
1327
|
enterRule(listener) {
|
|
1354
1328
|
if (listener.enterNumeric) {
|
|
1355
1329
|
listener.enterNumeric(this);
|
|
1356
1330
|
}
|
|
1357
1331
|
}
|
|
1358
|
-
// @Override
|
|
1359
1332
|
exitRule(listener) {
|
|
1360
1333
|
if (listener.exitNumeric) {
|
|
1361
1334
|
listener.exitNumeric(this);
|
|
@@ -1372,25 +1345,37 @@ class NumericContext extends ParserRuleContext_1.ParserRuleContext {
|
|
|
1372
1345
|
}
|
|
1373
1346
|
}
|
|
1374
1347
|
exports.NumericContext = NumericContext;
|
|
1375
|
-
class BinaryOperatorContext extends
|
|
1376
|
-
|
|
1377
|
-
LTE() { return this.tryGetToken(GenericSqlParser.LTE, 0); }
|
|
1378
|
-
GT() { return this.tryGetToken(GenericSqlParser.GT, 0); }
|
|
1379
|
-
GTE() { return this.tryGetToken(GenericSqlParser.GTE, 0); }
|
|
1380
|
-
EQUALS() { return this.tryGetToken(GenericSqlParser.EQUALS, 0); }
|
|
1381
|
-
NOT_EQUALS() { return this.tryGetToken(GenericSqlParser.NOT_EQUALS, 0); }
|
|
1382
|
-
constructor(parent, invokingState) {
|
|
1348
|
+
class BinaryOperatorContext extends antlr4_1.ParserRuleContext {
|
|
1349
|
+
constructor(parser, parent, invokingState) {
|
|
1383
1350
|
super(parent, invokingState);
|
|
1351
|
+
this.parser = parser;
|
|
1352
|
+
}
|
|
1353
|
+
LT() {
|
|
1354
|
+
return this.getToken(GenericSqlParser.LT, 0);
|
|
1355
|
+
}
|
|
1356
|
+
LTE() {
|
|
1357
|
+
return this.getToken(GenericSqlParser.LTE, 0);
|
|
1358
|
+
}
|
|
1359
|
+
GT() {
|
|
1360
|
+
return this.getToken(GenericSqlParser.GT, 0);
|
|
1361
|
+
}
|
|
1362
|
+
GTE() {
|
|
1363
|
+
return this.getToken(GenericSqlParser.GTE, 0);
|
|
1364
|
+
}
|
|
1365
|
+
EQUALS() {
|
|
1366
|
+
return this.getToken(GenericSqlParser.EQUALS, 0);
|
|
1367
|
+
}
|
|
1368
|
+
NOT_EQUALS() {
|
|
1369
|
+
return this.getToken(GenericSqlParser.NOT_EQUALS, 0);
|
|
1370
|
+
}
|
|
1371
|
+
get ruleIndex() {
|
|
1372
|
+
return GenericSqlParser.RULE_binaryOperator;
|
|
1384
1373
|
}
|
|
1385
|
-
// @Override
|
|
1386
|
-
get ruleIndex() { return GenericSqlParser.RULE_binaryOperator; }
|
|
1387
|
-
// @Override
|
|
1388
1374
|
enterRule(listener) {
|
|
1389
1375
|
if (listener.enterBinaryOperator) {
|
|
1390
1376
|
listener.enterBinaryOperator(this);
|
|
1391
1377
|
}
|
|
1392
1378
|
}
|
|
1393
|
-
// @Override
|
|
1394
1379
|
exitRule(listener) {
|
|
1395
1380
|
if (listener.exitBinaryOperator) {
|
|
1396
1381
|
listener.exitBinaryOperator(this);
|
|
@@ -1407,22 +1392,28 @@ class BinaryOperatorContext extends ParserRuleContext_1.ParserRuleContext {
|
|
|
1407
1392
|
}
|
|
1408
1393
|
}
|
|
1409
1394
|
exports.BinaryOperatorContext = BinaryOperatorContext;
|
|
1410
|
-
class UnaryOperatorContext extends
|
|
1411
|
-
|
|
1412
|
-
NULL() { return this.getToken(GenericSqlParser.NULL, 0); }
|
|
1413
|
-
NOT() { return this.tryGetToken(GenericSqlParser.NOT, 0); }
|
|
1414
|
-
constructor(parent, invokingState) {
|
|
1395
|
+
class UnaryOperatorContext extends antlr4_1.ParserRuleContext {
|
|
1396
|
+
constructor(parser, parent, invokingState) {
|
|
1415
1397
|
super(parent, invokingState);
|
|
1398
|
+
this.parser = parser;
|
|
1399
|
+
}
|
|
1400
|
+
IS() {
|
|
1401
|
+
return this.getToken(GenericSqlParser.IS, 0);
|
|
1402
|
+
}
|
|
1403
|
+
NULL() {
|
|
1404
|
+
return this.getToken(GenericSqlParser.NULL, 0);
|
|
1405
|
+
}
|
|
1406
|
+
NOT() {
|
|
1407
|
+
return this.getToken(GenericSqlParser.NOT, 0);
|
|
1408
|
+
}
|
|
1409
|
+
get ruleIndex() {
|
|
1410
|
+
return GenericSqlParser.RULE_unaryOperator;
|
|
1416
1411
|
}
|
|
1417
|
-
// @Override
|
|
1418
|
-
get ruleIndex() { return GenericSqlParser.RULE_unaryOperator; }
|
|
1419
|
-
// @Override
|
|
1420
1412
|
enterRule(listener) {
|
|
1421
1413
|
if (listener.enterUnaryOperator) {
|
|
1422
1414
|
listener.enterUnaryOperator(this);
|
|
1423
1415
|
}
|
|
1424
1416
|
}
|
|
1425
|
-
// @Override
|
|
1426
1417
|
exitRule(listener) {
|
|
1427
1418
|
if (listener.exitUnaryOperator) {
|
|
1428
1419
|
listener.exitUnaryOperator(this);
|
|
@@ -1439,27 +1430,25 @@ class UnaryOperatorContext extends ParserRuleContext_1.ParserRuleContext {
|
|
|
1439
1430
|
}
|
|
1440
1431
|
}
|
|
1441
1432
|
exports.UnaryOperatorContext = UnaryOperatorContext;
|
|
1442
|
-
class IdPathContext extends
|
|
1433
|
+
class IdPathContext extends antlr4_1.ParserRuleContext {
|
|
1434
|
+
constructor(parser, parent, invokingState) {
|
|
1435
|
+
super(parent, invokingState);
|
|
1436
|
+
this.parser = parser;
|
|
1437
|
+
}
|
|
1438
|
+
identifier_list() {
|
|
1439
|
+
return this.getTypedRuleContexts(IdentifierContext);
|
|
1440
|
+
}
|
|
1443
1441
|
identifier(i) {
|
|
1444
|
-
|
|
1445
|
-
return this.getRuleContexts(IdentifierContext);
|
|
1446
|
-
}
|
|
1447
|
-
else {
|
|
1448
|
-
return this.getRuleContext(i, IdentifierContext);
|
|
1449
|
-
}
|
|
1442
|
+
return this.getTypedRuleContext(IdentifierContext, i);
|
|
1450
1443
|
}
|
|
1451
|
-
|
|
1452
|
-
|
|
1444
|
+
get ruleIndex() {
|
|
1445
|
+
return GenericSqlParser.RULE_idPath;
|
|
1453
1446
|
}
|
|
1454
|
-
// @Override
|
|
1455
|
-
get ruleIndex() { return GenericSqlParser.RULE_idPath; }
|
|
1456
|
-
// @Override
|
|
1457
1447
|
enterRule(listener) {
|
|
1458
1448
|
if (listener.enterIdPath) {
|
|
1459
1449
|
listener.enterIdPath(this);
|
|
1460
1450
|
}
|
|
1461
1451
|
}
|
|
1462
|
-
// @Override
|
|
1463
1452
|
exitRule(listener) {
|
|
1464
1453
|
if (listener.exitIdPath) {
|
|
1465
1454
|
listener.exitIdPath(this);
|
|
@@ -1476,21 +1465,25 @@ class IdPathContext extends ParserRuleContext_1.ParserRuleContext {
|
|
|
1476
1465
|
}
|
|
1477
1466
|
}
|
|
1478
1467
|
exports.IdPathContext = IdPathContext;
|
|
1479
|
-
class IdentifierContext extends
|
|
1480
|
-
|
|
1481
|
-
QUOTED_ID() { return this.tryGetToken(GenericSqlParser.QUOTED_ID, 0); }
|
|
1482
|
-
constructor(parent, invokingState) {
|
|
1468
|
+
class IdentifierContext extends antlr4_1.ParserRuleContext {
|
|
1469
|
+
constructor(parser, parent, invokingState) {
|
|
1483
1470
|
super(parent, invokingState);
|
|
1471
|
+
this.parser = parser;
|
|
1472
|
+
}
|
|
1473
|
+
ID() {
|
|
1474
|
+
return this.getToken(GenericSqlParser.ID, 0);
|
|
1475
|
+
}
|
|
1476
|
+
QUOTED_ID() {
|
|
1477
|
+
return this.getToken(GenericSqlParser.QUOTED_ID, 0);
|
|
1478
|
+
}
|
|
1479
|
+
get ruleIndex() {
|
|
1480
|
+
return GenericSqlParser.RULE_identifier;
|
|
1484
1481
|
}
|
|
1485
|
-
// @Override
|
|
1486
|
-
get ruleIndex() { return GenericSqlParser.RULE_identifier; }
|
|
1487
|
-
// @Override
|
|
1488
1482
|
enterRule(listener) {
|
|
1489
1483
|
if (listener.enterIdentifier) {
|
|
1490
1484
|
listener.enterIdentifier(this);
|
|
1491
1485
|
}
|
|
1492
1486
|
}
|
|
1493
|
-
// @Override
|
|
1494
1487
|
exitRule(listener) {
|
|
1495
1488
|
if (listener.exitIdentifier) {
|
|
1496
1489
|
listener.exitIdentifier(this);
|