@judo/idem
Version:
A powerful and expressive query language designed for filtering and manipulating data
3,936 lines • 93.3 kB
JavaScript
var U = Object.defineProperty;
var M = (i, t, e) => t in i ? U(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
var r = (i, t, e) => M(i, typeof t != "symbol" ? t + "" : t, e);
import * as p from "antlr4ng";
import { AbstractParseTreeVisitor as D, CharStream as H, CommonTokenStream as O } from "antlr4ng";
class B extends D {
constructor() {
super(...arguments);
/**
* Visit a parse tree produced by `IdemParser.parse`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitParse");
/**
* Visit a parse tree produced by the `selfExpression`
* labeled alternative in `IdemParser.expression`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitSelfExpression");
/**
* Visit a parse tree produced by the `unaryMinusExpression`
* labeled alternative in `IdemParser.expression`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitUnaryMinusExpression");
/**
* Visit a parse tree produced by the `notExpression`
* labeled alternative in `IdemParser.expression`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitNotExpression");
/**
* Visit a parse tree produced by the `literalExpression`
* labeled alternative in `IdemParser.expression`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitLiteralExpression");
/**
* Visit a parse tree produced by the `identifierExpression`
* labeled alternative in `IdemParser.expression`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitIdentifierExpression");
/**
* Visit a parse tree produced by the `parenthesesExpression`
* labeled alternative in `IdemParser.expression`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitParenthesesExpression");
/**
* Visit a parse tree produced by the `powerExpression`
* labeled alternative in `IdemParser.expression`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitPowerExpression");
/**
* Visit a parse tree produced by the `multiplyDivideModExpression`
* labeled alternative in `IdemParser.expression`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitMultiplyDivideModExpression");
/**
* Visit a parse tree produced by the `addSubtractExpression`
* labeled alternative in `IdemParser.expression`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitAddSubtractExpression");
/**
* Visit a parse tree produced by the `comparisonExpression`
* labeled alternative in `IdemParser.expression`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitComparisonExpression");
/**
* Visit a parse tree produced by the `inExpression`
* labeled alternative in `IdemParser.expression`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitInExpression");
/**
* Visit a parse tree produced by the `equalityExpression`
* labeled alternative in `IdemParser.expression`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitEqualityExpression");
/**
* Visit a parse tree produced by the `andExpression`
* labeled alternative in `IdemParser.expression`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitAndExpression");
/**
* Visit a parse tree produced by the `xorExpression`
* labeled alternative in `IdemParser.expression`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitXorExpression");
/**
* Visit a parse tree produced by the `orExpression`
* labeled alternative in `IdemParser.expression`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitOrExpression");
/**
* Visit a parse tree produced by the `impliesExpression`
* labeled alternative in `IdemParser.expression`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitImpliesExpression");
/**
* Visit a parse tree produced by the `ternaryExpression`
* labeled alternative in `IdemParser.expression`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitTernaryExpression");
/**
* Visit a parse tree produced by the `functionCallExpression`
* labeled alternative in `IdemParser.expression`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitFunctionCallExpression");
/**
* Visit a parse tree produced by the `navigationExpression`
* labeled alternative in `IdemParser.expression`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitNavigationExpression");
/**
* Visit a parse tree produced by the `indexAccessExpression`
* labeled alternative in `IdemParser.expression`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitIndexAccessExpression");
/**
* Visit a parse tree produced by the `numericLiteralAlt`
* labeled alternative in `IdemParser.literal`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitNumericLiteralAlt");
/**
* Visit a parse tree produced by the `stringLiteralAlt`
* labeled alternative in `IdemParser.literal`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitStringLiteralAlt");
/**
* Visit a parse tree produced by the `booleanTrueLiteralAlt`
* labeled alternative in `IdemParser.literal`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitBooleanTrueLiteralAlt");
/**
* Visit a parse tree produced by the `booleanFalseLiteralAlt`
* labeled alternative in `IdemParser.literal`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitBooleanFalseLiteralAlt");
/**
* Visit a parse tree produced by the `temporalLiteralAlt`
* labeled alternative in `IdemParser.literal`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitTemporalLiteralAlt");
/**
* Visit a parse tree produced by the `nullLiteralAlt`
* labeled alternative in `IdemParser.literal`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitNullLiteralAlt");
/**
* Visit a parse tree produced by the `enumLiteralAlt`
* labeled alternative in `IdemParser.literal`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitEnumLiteralAlt");
/**
* Visit a parse tree produced by `IdemParser.enumLiteral`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitEnumLiteral");
/**
* Visit a parse tree produced by `IdemParser.qualifiedName`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitQualifiedName");
/**
* Visit a parse tree produced by the `dateLiteral`
* labeled alternative in `IdemParser.temporalLiteral`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitDateLiteral");
/**
* Visit a parse tree produced by the `timestampLiteral`
* labeled alternative in `IdemParser.temporalLiteral`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitTimestampLiteral");
/**
* Visit a parse tree produced by the `timeLiteral`
* labeled alternative in `IdemParser.temporalLiteral`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitTimeLiteral");
/**
* Visit a parse tree produced by the `todayLiteral`
* labeled alternative in `IdemParser.temporalLiteral`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitTodayLiteral");
/**
* Visit a parse tree produced by the `yesterdayLiteral`
* labeled alternative in `IdemParser.temporalLiteral`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitYesterdayLiteral");
/**
* Visit a parse tree produced by the `tomorrowLiteral`
* labeled alternative in `IdemParser.temporalLiteral`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitTomorrowLiteral");
/**
* Visit a parse tree produced by `IdemParser.argumentList`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitArgumentList");
/**
* Visit a parse tree produced by `IdemParser.argument`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitArgument");
/**
* Visit a parse tree produced by `IdemParser.iteratorArgument`.
* @param ctx the parse tree
* @return the visitor result
*/
r(this, "visitIteratorArgument");
}
}
class I extends B {
constructor() {
super(...arguments);
// Entry point
r(this, "visitParse", (e) => this.visit(e.expression()));
// --- Literal Visitor Methods (for labeled alternatives in the 'literal' rule) ---
r(this, "visitNumericLiteralAlt", (e) => ({ type: "Number", value: e.Number().getText() }));
r(this, "visitStringLiteralAlt", (e) => {
const n = e.StringLiteral().getText();
return { type: "String", value: n.substring(1, n.length - 1) };
});
r(this, "visitBooleanTrueLiteralAlt", (e) => ({ type: "Boolean", value: !0 }));
r(this, "visitBooleanFalseLiteralAlt", (e) => ({ type: "Boolean", value: !1 }));
r(this, "visitNullLiteralAlt", (e) => ({ type: "Null" }));
r(this, "visitTemporalLiteralAlt", (e) => this.visit(e.temporalLiteral()));
r(this, "visitEnumLiteralAlt", (e) => this.visit(e.enumLiteral()));
// --- Temporal Literal Visitor Methods (for labeled alternatives in the 'temporalLiteral' rule) ---
r(this, "visitDateLiteral", (e) => ({ type: "Date", value: e.DATE().getText() }));
r(this, "visitTimestampLiteral", (e) => ({ type: "Timestamp", value: e.TIMESTAMP().getText() }));
r(this, "visitTimeLiteral", (e) => ({ type: "Time", value: e.TIME().getText() }));
r(this, "visitTodayLiteral", (e) => ({ type: "Today" }));
r(this, "visitYesterdayLiteral", (e) => ({ type: "Yesterday" }));
r(this, "visitTomorrowLiteral", (e) => ({ type: "Tomorrow" }));
// --- Sub-Rule Visitors ---
r(this, "visitEnumLiteral", (e) => ({ type: "EnumLiteral", value: e.getText() }));
r(this, "visitLiteralExpression", (e) => this.visit(e.literal()));
r(this, "visitParenthesesExpression", (e) => this.visit(e.expression()));
r(this, "visitFunctionCallExpression", (e) => {
let n = [];
const a = e.argumentList();
if (a) {
const u = this.visit(a);
u != null && u.children && (n = u.children);
}
return {
type: "FunctionCall",
target: this.visit(e.expression()),
name: e.Identifier().getText(),
args: n
};
});
r(this, "visitNavigationExpression", (e) => ({
type: "Navigation",
target: this.visit(e.expression()),
name: e.Identifier().getText()
}));
r(this, "visitSelfExpression", (e) => {
let n = { type: "Self" };
if (e.Identifier().length > 0)
for (const a of e.Identifier())
n = { type: "Navigation", target: n, name: a.getText() };
return n;
});
r(this, "visitUnaryMinusExpression", (e) => ({ type: "Unary", operator: "-", children: [this.visit(e.expression())] }));
r(this, "visitNotExpression", (e) => ({ type: "Unary", operator: "not", children: [this.visit(e.expression())] }));
r(this, "visitPowerExpression", (e) => this.visitBinaryExpression(e));
r(this, "visitMultiplyDivideModExpression", (e) => this.visitBinaryExpression(e));
r(this, "visitAddSubtractExpression", (e) => this.visitBinaryExpression(e));
r(this, "visitComparisonExpression", (e) => this.visitBinaryExpression(e));
r(this, "visitEqualityExpression", (e) => this.visitBinaryExpression(e));
r(this, "visitAndExpression", (e) => this.visitBinaryExpression(e));
r(this, "visitXorExpression", (e) => this.visitBinaryExpression(e));
r(this, "visitOrExpression", (e) => this.visitBinaryExpression(e));
r(this, "visitImpliesExpression", (e) => this.visitBinaryExpression(e));
r(this, "visitTernaryExpression", (e) => {
const n = e.expression(0), a = e.expression(1), u = e.expression(2);
if (!n || !a || !u)
throw new Error("Invalid ternary expression structure: missing operand.");
return {
type: "Ternary",
children: [this.visit(n), this.visit(a), this.visit(u)]
};
});
r(this, "visitInExpression", (e) => this.visitBinaryExpression(e));
r(this, "visitIdentifierExpression", (e) => ({ type: "Identifier", name: e.getText() }));
r(this, "visitIndexAccessExpression", (e) => {
const n = e.expression(0), a = e.expression(1);
if (!n || !a)
throw new Error("Invalid index access expression structure.");
return { type: "IndexAccess", children: [this.visit(n), this.visit(a)] };
});
r(this, "visitArgumentList", (e) => ({ type: "ArgumentList", children: e.argument().map((a) => this.visit(a)) }));
r(this, "visitArgument", (e) => {
const n = e.getChild(0);
if (!n)
throw new Error("Invalid index access expression structure.");
return this.visit(n);
});
r(this, "visitIteratorArgument", (e) => {
const n = e.Cases();
return {
type: "IteratorArgument",
iteratorVar: e.Identifier().getText(),
iteratorExpression: this.visit(e.expression()),
direction: n ? n.getText().toUpperCase() : "ASC"
};
});
}
// biome-ignore lint/suspicious/noExplicitAny: this is fine
buildBinary(e, n, a) {
return {
type: "Binary",
operator: n.getText(),
children: [this.visit(e), this.visit(a)]
};
}
visitBinaryExpression(e) {
const n = e.expression(0), a = e.expression(1);
if (!n || !a)
throw new Error("Invalid binary expression structure: missing operand.");
return this.buildBinary(n, e.getChild(1), a);
}
}
const o = class o extends p.Lexer {
constructor(t) {
super(t), this.interpreter = new p.LexerATNSimulator(this, o._ATN, o.decisionsToDFA, new p.PredictionContextCache());
}
get grammarFileName() {
return "Idem.g4";
}
get literalNames() {
return o.literalNames;
}
get symbolicNames() {
return o.symbolicNames;
}
get ruleNames() {
return o.ruleNames;
}
get serializedATN() {
return o._serializedATN;
}
get channelNames() {
return o.channelNames;
}
get modeNames() {
return o.modeNames;
}
static get _ATN() {
return o.__ATN || (o.__ATN = new p.ATNDeserializer().deserialize(o._serializedATN)), o.__ATN;
}
get vocabulary() {
return o.vocabulary;
}
};
r(o, "T__0", 1), r(o, "T__1", 2), r(o, "T__2", 3), r(o, "T__3", 4), r(o, "T__4", 5), r(o, "T__5", 6), r(o, "T__6", 7), r(o, "T__7", 8), r(o, "T__8", 9), r(o, "T__9", 10), r(o, "T__10", 11), r(o, "T__11", 12), r(o, "T__12", 13), r(o, "T__13", 14), r(o, "T__14", 15), r(o, "T__15", 16), r(o, "T__16", 17), r(o, "T__17", 18), r(o, "T__18", 19), r(o, "T__19", 20), r(o, "T__20", 21), r(o, "T__21", 22), r(o, "T__22", 23), r(o, "T__23", 24), r(o, "T__24", 25), r(o, "T__25", 26), r(o, "T__26", 27), r(o, "T__27", 28), r(o, "T__28", 29), r(o, "T__29", 30), r(o, "T__30", 31), r(o, "T__31", 32), r(o, "T__32", 33), r(o, "T__33", 34), r(o, "T__34", 35), r(o, "Self", 36), r(o, "In", 37), r(o, "Cases", 38), r(o, "Or", 39), r(o, "Xor", 40), r(o, "And", 41), r(o, "Not", 42), r(o, "Implies", 43), r(o, "Identifier", 44), r(o, "Number", 45), r(o, "StringLiteral", 46), r(o, "DATE", 47), r(o, "TIMESTAMP", 48), r(o, "TIME", 49), r(o, "WS", 50), r(o, "channelNames", [
"DEFAULT_TOKEN_CHANNEL",
"HIDDEN"
]), r(o, "literalNames", [
null,
"'!'",
"'('",
"')'",
"'.'",
"'-'",
"'^'",
"'*'",
"'/'",
"'div'",
"'mod'",
"'%'",
"'+'",
"'<='",
"'>='",
"'<'",
"'>'",
"'='",
"'=='",
"'!='",
"'<>'",
"'?'",
"':'",
"'['",
"']'",
"'true'",
"'false'",
"'null'",
"'#'",
"'::'",
"'`'",
"'today'",
"'yesterday'",
"'tomorrow'",
"','",
"'|'",
"'self'",
"'in'",
null,
"'or'",
"'xor'",
"'and'",
"'not'",
"'implies'"
]), r(o, "symbolicNames", [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
"Self",
"In",
"Cases",
"Or",
"Xor",
"And",
"Not",
"Implies",
"Identifier",
"Number",
"StringLiteral",
"DATE",
"TIMESTAMP",
"TIME",
"WS"
]), r(o, "modeNames", [
"DEFAULT_MODE"
]), r(o, "ruleNames", [
"T__0",
"T__1",
"T__2",
"T__3",
"T__4",
"T__5",
"T__6",
"T__7",
"T__8",
"T__9",
"T__10",
"T__11",
"T__12",
"T__13",
"T__14",
"T__15",
"T__16",
"T__17",
"T__18",
"T__19",
"T__20",
"T__21",
"T__22",
"T__23",
"T__24",
"T__25",
"T__26",
"T__27",
"T__28",
"T__29",
"T__30",
"T__31",
"T__32",
"T__33",
"T__34",
"Self",
"In",
"Cases",
"Or",
"Xor",
"And",
"Not",
"Implies",
"LETTER",
"DIGIT",
"Identifier",
"Number",
"StringLiteral",
"DATE",
"TIMESTAMP",
"TIME",
"WS"
]), r(o, "_serializedATN", [
4,
0,
50,
350,
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,
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,
1,
0,
1,
0,
1,
1,
1,
1,
1,
2,
1,
2,
1,
3,
1,
3,
1,
4,
1,
4,
1,
5,
1,
5,
1,
6,
1,
6,
1,
7,
1,
7,
1,
8,
1,
8,
1,
8,
1,
8,
1,
9,
1,
9,
1,
9,
1,
9,
1,
10,
1,
10,
1,
11,
1,
11,
1,
12,
1,
12,
1,
12,
1,
13,
1,
13,
1,
13,
1,
14,
1,
14,
1,
15,
1,
15,
1,
16,
1,
16,
1,
17,
1,
17,
1,
17,
1,
18,
1,
18,
1,
18,
1,
19,
1,
19,
1,
19,
1,
20,
1,
20,
1,
21,
1,
21,
1,
22,
1,
22,
1,
23,
1,
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,
26,
1,
26,
1,
26,
1,
26,
1,
27,
1,
27,
1,
28,
1,
28,
1,
28,
1,
29,
1,
29,
1,
30,
1,
30,
1,
30,
1,
30,
1,
30,
1,
30,
1,
31,
1,
31,
1,
31,
1,
31,
1,
31,
1,
31,
1,
31,
1,
31,
1,
31,
1,
31,
1,
32,
1,
32,
1,
32,
1,
32,
1,
32,
1,
32,
1,
32,
1,
32,
1,
32,
1,
33,
1,
33,
1,
34,
1,
34,
1,
35,
1,
35,
1,
35,
1,
35,
1,
35,
1,
36,
1,
36,
1,
36,
1,
37,
1,
37,
1,
37,
1,
37,
1,
37,
1,
37,
1,
37,
3,
37,
230,
8,
37,
1,
38,
1,
38,
1,
38,
1,
39,
1,
39,
1,
39,
1,
39,
1,
40,
1,
40,
1,
40,
1,
40,
1,
41,
1,
41,
1,
41,
1,
41,
1,
42,
1,
42,
1,
42,
1,
42,
1,
42,
1,
42,
1,
42,
1,
42,
1,
43,
1,
43,
1,
44,
1,
44,
1,
45,
1,
45,
1,
45,
5,
45,
262,
8,
45,
10,
45,
12,
45,
265,
9,
45,
1,
46,
4,
46,
268,
8,
46,
11,
46,
12,
46,
269,
1,
46,
1,
46,
4,
46,
274,
8,
46,
11,
46,
12,
46,
275,
3,
46,
278,
8,
46,
1,
47,
1,
47,
1,
47,
1,
47,
1,
47,
1,
47,
5,
47,
286,
8,
47,
10,
47,
12,
47,
289,
9,
47,
1,
47,
1,
47,
1,
47,
1,
47,
1,
47,
1,
47,
1,
47,
5,
47,
298,
8,
47,
10,
47,
12,
47,
301,
9,
47,
1,
47,
3,
47,
304,
8,
47,
1,
48,
1,
48,
1,
48,
1,
48,
1,
48,
1,
48,
1,
48,
1,
48,
1,
48,
1,
48,
1,
48,
1,
49,
1,
49,
1,
49,
1,
49,
1,
49,
1,
49,
1,
49,
1,
49,
1,
49,
1,
49,
1,
49,
3,
49,
328,
8,
49,
1,
49,
3,
49,
331,
8,
49,
1,
50,
1,
50,
1,
50,
1,
50,
1,
50,
1,
50,
1,
50,
1,
50,
1,
50,
3,
50,
342,
8,
50,
1,
51,
4,
51,
345,
8,
51,
11,
51,
12,
51,
346,
1,
51,
1,
51,
0,
0,
52,
1,
1,
3,
2,
5,
3,
7,
4,
9,
5,
11,
6,
13,
7,
15,
8,
17,
9,
19,
10,
21,
11,
23,
12,
25,
13,
27,
14,
29,
15,
31,
16,
33,
17,
35,
18,
37,
19,
39,
20,
41,
21,
43,
22,
45,
23,
47,
24,
49,
25,
51,
26,
53,
27,
55,
28,
57,
29,
59,
30,
61,
31,
63,
32,
65,
33,
67,
34,
69,
35,
71,
36,
73,
37,
75,
38,
77,
39,
79,
40,
81,
41,
83,
42,
85,
43,
87,
0,
89,
0,
91,
44,
93,
45,
95,
46,
97,
47,
99,
48,
101,
49,
103,
50,
1,
0,
4,
3,
0,
65,
90,
95,
95,
97,
122,
3,
0,
10,
10,
13,
13,
34,
34,
3,
0,
10,
10,
13,
13,
39,
39,
3,
0,
9,
10,
13,
13,
32,
32,
364,
0,
1,
1,
0,
0,
0,
0,
3,
1,
0,
0,
0,
0,
5,
1,
0,
0,
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,
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,
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,
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,
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,
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,
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,
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,
0,
91,
1,
0,
0,
0,
0,
93,
1,
0,
0,
0,
0,
95,
1,
0,
0,
0,
0,
97,
1,
0,
0,
0,
0,
99,
1,
0,
0,
0,
0,
101,
1,
0,
0,
0,
0,
103,
1,
0,
0,
0,
1,
105,
1,
0,
0,
0,
3,
107,
1,
0,
0,
0,
5,
109,
1,
0,
0,
0,
7,
111,
1,
0,
0,
0,
9,
113,
1,
0,
0,
0,
11,
115,
1,
0,
0,
0,
13,
117,
1,
0,
0,
0,
15,
119,
1,
0,
0,
0,
17,
121,
1,
0,
0,
0,
19,
125,
1,
0,
0,
0,
21,
129,
1,
0,
0,
0,
23,
131,
1,
0,
0,
0,
25,
133,
1,
0,
0,
0,
27,
136,
1,
0,
0,
0,
29,
139,
1,
0,
0,
0,
31,
141,
1,
0,
0,
0,
33,
143,
1,
0,
0,
0,
35,
145,
1,
0,
0,
0,
37,
148,
1,
0,
0,
0,
39,
151,
1,
0,
0,
0,
41,
154,
1,
0,
0,
0,
43,
156,
1,
0,
0,
0,
45,
158,
1,
0,
0,
0,
47,
160,
1,
0,
0,
0,
49,
162,
1,
0,
0,
0,
51,
167,
1,
0,
0,
0,
53,
173,
1,
0,
0,
0,
55,
178,
1,
0,
0,
0,
57,
180,
1,
0,
0,
0,
59,
183,
1,
0,
0,
0,
61,
185,
1,
0,
0,
0,
63,
191,
1,
0,
0,
0,
65,
201,
1,
0,
0,
0,
67,
210,
1,
0,
0,
0,
69,
212,
1,
0,
0,
0,
71,
214,
1,
0,
0,
0,
73,
219,
1,
0,
0,
0,
75,
229,
1,
0,
0,
0,
77,
231,
1,
0,
0,
0,
79,
234,
1,
0,
0,
0,
81,
238,
1,
0,
0,
0,
83,
242,
1,
0,
0,
0,
85,
246,
1,
0,
0,
0,
87,
254,
1,
0,
0,
0,
89,
256,
1,
0,
0,
0,
91,
258,
1,
0,
0,
0,
93,
267,
1,
0,
0,
0,
95,
303,
1,
0,
0,
0,
97,
305,
1,
0,
0,
0,
99,
316,
1,
0,
0,
0,
101,
332,
1,
0,
0,
0,
103,
344,
1,
0,
0,
0,
105,
106,
5,
33,
0,
0,
106,
2,
1,
0,
0,
0,
107,
108,
5,
40,
0,
0,
108,
4,
1,
0,
0,
0,
109,
110,
5,
41,
0,
0,
110,
6,
1,
0,
0,
0,
111,
112,
5,
46,
0,
0,
112,
8,
1,
0,
0,
0,
113,
114,
5,
45,
0,
0,
114,
10,
1,
0,
0,
0,
115,
116,
5,
94,
0,
0,
116,
12,
1,
0,
0,
0,
117,
118,
5,
42,
0,
0,
118,
14,
1,
0,
0,
0,
119,
120,
5,
47,
0,
0,
120,
16,
1,
0,
0,
0,
121,
122,
5,
100,
0,
0,
122,
123,
5,
105,
0,
0,
123,
124,
5,
118,
0,
0,
124,
18,
1,
0,
0,
0,
125,
126,
5,
109,
0,
0,
126,
127,
5,
111,
0,
0,
127,
128,
5,
100,
0,
0,
128,
20,
1,
0,
0,
0,
129,
130,
5,
37,
0,
0,
130,
22,
1,
0,
0,
0,
131,
132,
5,
43,
0,
0,
132,
24,
1,
0,
0,
0,
133,
134,
5,
60,
0,
0,
134,
135,
5,
61,
0,
0,
135,
26,
1,
0,
0,
0,
136,
137,
5,
62,
0,
0,
137,
138,
5,
61,
0,
0,
138,
28,
1,
0,
0,
0,
139,
140,
5,
60,
0,
0,
140,
30,
1,
0,
0,
0,
141,
142,
5,
62,
0,
0,
142,
32,
1,
0,
0,
0,
143,
144,
5,
61,
0,
0,
144,
34,
1,
0,
0,
0,
145,
146,
5,
61,
0,
0,
146,
147,
5,
61,
0,
0,
147,
36,
1,
0,
0,
0,
148,
149,
5,
33,
0,
0,
149,
150,
5,
61,
0,
0,
150,
38,
1,
0,
0,
0,
151,
152,
5,
60,
0,
0,
152,
153,
5,
62,
0,
0,
153,
40,
1,
0,
0,
0,
154,
155,
5,
63,
0,
0,
155,
42,
1,
0,
0,
0,
156,
157,
5,
58,
0,
0,
157,
44,
1,
0,
0,
0,
158,
159,
5,
91,
0,
0,
159,
46,
1,
0,
0,
0,
160,
161,
5,
93,
0,
0,
161,
48,
1,
0,
0,
0,
162,
163,
5,
116,
0,
0,
163,
164,
5,
114,
0,
0,
164,
165,
5,
117,
0,
0,
165,
166,
5,
101,
0,
0,
166,
50,
1,
0,
0,
0,
167,
168,
5,
102,
0,
0,
168,
169,
5,
97,
0,
0,
169,
170,
5,
108,
0,
0,
170,
171,
5,
115,
0,
0,
171,
172,
5,
101,
0,
0,
172,
52,
1,
0,
0,
0,
173,
174,
5,
110,
0,
0,
174,
175,
5,
117,
0,
0,
175,
176,
5,
108,
0,
0,
176,
177,
5,
108,
0,
0,
177,
54,
1,
0,
0,
0,
178,
179,
5,
35,
0,
0,
179,
56,
1,
0,
0,
0,
180,
181,
5,
58,
0,
0,
181,
182,
5,
58,
0,
0,
182,
58,
1,
0,
0,
0,
183,
184,
5,
96,
0,
0,
184,
60,
1,
0,
0,
0,
185,
186,
5,
116,
0,
0,
186,
187,
5,
111,
0,
0,
187,
188,
5,
100,
0,
0,
188,
189,
5,
97,
0,
0,
189,
190,
5,
121,
0,
0,
190,
62,
1,
0,
0,
0,
191,
192,
5,
121,
0,
0,
192,
193,
5,
101,
0,
0,
193,
194,
5,
115,
0,
0,
194,
195,
5,
116,
0,
0,
195,
196,
5,
101,
0,
0,
196,
197,
5,
114,
0,
0,
197,
198,
5,
100,
0,
0,
198,
199,
5,
97,
0,
0,
199,
200,
5,
121,
0,
0,
200,
64,
1,
0,
0,
0,
201,
202,
5,
116,
0,
0,
202,
203,
5,
111,
0,
0,
203,
204,
5,
109,
0,
0,
204,
205,
5,
111,
0,
0,
205,
206,
5,
114,
0,
0,
206,
207,
5,
114,
0,
0,
207,
208,
5,
111,
0,
0,
208,
209,
5,
119,
0,
0,
209,
66,
1,
0,
0,
0,
210,
211,
5,
44,
0,
0,
211,
68,
1,
0,
0,
0,
212,
213,
5,
124,
0,
0,
213,
70,
1,
0,
0,
0,
214,
215,
5,
115,
0,
0,
215,
216,
5,
101,
0,
0,
216,
217,
5,
108,
0,
0,
217,
218,
5,
102,
0,
0,
218,
72,
1,
0,
0,
0,
219,
220,
5,
105,
0,
0,
220,
221,
5,
110,
0,
0,
221,
74,
1,
0,
0,
0,
222,
223,
5,
65,
0,
0,
223,
224,
5,
83,
0,
0,
224,
230,
5,
67,
0,
0,
225,
226,
5,
68,
0,
0,
226,
227,
5,
69,
0,
0,
227,
228,
5,
83,
0,
0,
228,
230,
5,
67,
0,
0,
229,
222,
1,
0,
0,
0,
229,
225,
1,
0,
0,
0,
230,
76,
1,
0,
0,
0,
231,
232,
5,
111,
0,
0,
232,
233,
5,
114,
0,
0,
233,
78,
1,
0,
0,
0,
234,
235,
5,
120,
0,
0,
235,
236,
5,
111,
0,
0,
236,
237,
5,
114,
0,
0,
237,
80,
1,
0,
0,
0,
238,
239,
5,
97,
0,
0,
239,
240,
5,
110,
0,
0,
240,
241,
5,
100,
0,
0,
241,
82,
1,
0,
0,
0,
242,
243,
5,
110,
0,
0,
243,
244,
5,
111,
0,
0,
244,
245,
5,
116,
0,
0,
245,
84,
1,
0,
0,
0,
246,
247,
5,
105,
0,
0,
247,
248,
5,
109,
0,
0,
248,
249,
5,
112,
0,
0,
249,
250,
5,
108,
0,
0,
250,
251,
5,
105,
0,
0,
251,
252,
5,
101,
0,
0,
252,
253,
5,
115,
0,
0,
253,
86,
1,
0,
0,
0,
254,
255,
7,
0,
0,
0,
255,
88,
1,
0,
0,
0,
256,
257,
2,
48,
57,
0,
257,
90,
1,
0,
0,
0,
258,
263,
3,
87,
43,
0,
259,
262,
3,
87,
43,
0,
260,
262,
3,
89,
44,
0,
261,
259,
1,
0,
0,
0,
261,
260,
1,
0,
0,
0,
262,
265,
1,
0,
0,
0,
263,
261,
1,
0,
0,
0,
263,
264,
1,
0,
0,
0,
264,
92,
1,
0,
0,
0,
265,
263,
1,
0,
0,
0,
266,
268,
3,
89,
44,
0,
267,
266,
1,
0,
0,
0,
268,
269,
1,
0,
0,
0,
269,
267,
1,
0,
0,
0,
269,
270,
1,
0,
0,
0,
270,
277,
1,
0,
0,
0,
271,
273,
5,
46,
0,
0,
272,
274,
3,
89,
44,
0,
273,
272,
1,
0,
0,
0,
274,
275,
1,
0,
0,
0,
275,
273,
1,
0,
0,
0,
275,
276,
1,
0,
0,
0,
276,
278,
1,
0,
0,
0,
277,
271,
1,
0,
0,
0,
277,
278,
1,
0,
0,
0,
278,
94,
1,
0,
0,
0,
279,
287,
5,
34,
0,
0,
280,
286,
8,
1,
0,
0,
281,
282,
5,
92,
0,
0,
282,
286,
5,
92,
0,
0,
283,
284,
5,
92,
0,
0,
284,
286,
5,
34,
0,
0,
285,
280,
1,
0,
0,
0,
285,
281,
1,
0,
0,
0,
285,
283,
1,
0,
0,
0,
286,
289,
1,
0,
0,
0,
287,
285,
1,
0,
0,
0,
287,
288,
1,
0,
0,
0,
288,
290,
1,
0,
0,
0,
289,
287,
1,
0,
0,
0,
290,
304,
5,
34,
0,
0,
291,
299,
5,
39,
0,
0,
292,
298,
8,
2,
0,
0,
293,
294,
5,
92,
0,
0,
294,
298,
5,
92,
0,
0,
295,
296,
5,
92,
0,
0,
296,
298,
5,
39,
0,
0,
297,
292,
1,
0,
0,
0,
297,
293,
1,
0,
0,
0,
297,
295,
1,
0,
0,
0,
298,
301,
1,
0,
0,
0,
299,
297,
1,
0,
0,
0,
299,
300,
1,
0,
0,
0,
300,
302,
1,
0,
0,
0,
301,
299,
1,
0,
0,
0,
302,
304,
5,
39,
0,
0,
303,
279,
1,
0,
0,
0,
303,
291,
1,
0,
0,
0,
304,
96,
1,
0,
0,
0,
305,
306,
3,
89,
44,
0,
306,
307,
3,
89,
44,
0,
307,
308,
3,
89,
44,
0,
308,
309,
3,
89,
44,
0,
309,
310,
5,
45,
0,
0,
310,
311,
3,
89,
44,
0,
311,
312,
3,
89,
44,
0,
312,
313,
5,
45,
0,
0,
313,
314,
3,
89,
44,
0,
314,
315,
3,
89,
44,
0,
315,
98,
1,
0,
0,
0,
316,
317,
3,
97,
48,
0,
317,
318,
5,
84,
0,
0,
318,
319,
3,
89,
44,
0,
319,
320,
3,
89,
44,
0,
320,
321,
5,
58,
0,
0,
321,
322,
3,
89,
44,
0,
322,
327,
3,
89,
44,
0,
323,
324,
5,
58,
0,
0,
324,
325,
3,
89,
44,
0,
325,
326,
3,
89,
44,
0,
326,
328,
1,
0,
0,
0,
327,
323,
1,
0,
0,
0,
327,
328,
1,
0,
0,
0,
328,
330,
1,
0,
0,
0,
329,
331,
5,
90,
0,
0,
330,
329,
1,
0,
0,
0,
330,
331,
1,
0,
0,
0,
331,
100,
1,
0,
0,
0,
332,
333,
3,
89,
44,
0,
333,
334,
3,
89,
44,
0,
334,
335,
5,
58,
0,
0,
335,
336,
3,
89,
44,
0,
336,
341,
3,
89,
44,
0,
337,
338,
5,
58,
0,
0,
338,
339,
3,
89,
44,
0,
339,
340,
3,
89,
44,
0,
340,
342,
1,
0,
0,
0,
341,
337,
1,
0,
0,
0,
341,
342,
1,
0,
0,
0,
342,
102,
1,
0,
0,
0,
343,
345,
7,
3,
0,
0,
344,
343,
1,
0,
0,
0,
345,
346,
1,
0,
0,
0,
346,
344,
1,
0,
0,
0,
346,
347,
1,
0,
0,
0,
347,
348,
1,
0,
0,
0,
348,
349,
6,
51,
0,
0,
349,
104,
1,
0,
0,
0,
16,
0,
229,
261,
263,
269,
275,
277,
285,
287,
297,
299,
303,
327,
330,
341,
346,
1,
6,
0,
0
]), r(o, "__ATN"), r(o, "vocabulary", new p.Vocabulary(o.literalNames, o.symbolicNames, [])), r(o, "decisionsToDFA", o._ATN.decisionToState.map((t, e) => new p.DFA(t, e)));
let y = o;
const s = class s extends p.Parser {
get grammarFileName() {
return "Idem.g4";
}
get literalNames() {
return s.literalNames;
}
get symbolicNames() {
return s.symbolicNames;
}
get ruleNames() {
return s.ruleNames;
}
get serializedATN() {
return s._serializedATN;
}
createFailedPredicateException(t, e) {
return new p.FailedPredicateException(this, t, e);
}
constructor(t) {
super(t), this.interpreter = new p.ParserATNSimulator(this, s._ATN, s.decisionsToDFA, new p.PredictionContextCache());
}
parse() {
let t = new V(this.context, this.state);
this.enterRule(t, 0, s.RULE_parse);
try {
this.enterOuterAlt(t, 1), this.state = 18, this.expression(0);
} catch (e) {
if (e instanceof p.RecognitionException)
this.errorHandler.reportError(this, e), this.errorHandler.recover(this, e);
else
throw e;
} finally {
this.exitRule();
}
return t;
}
expression(t) {
t === void 0 && (t = 0);
let e = this.context, n = this.state, a = new l(this.context, n), u = a, c = 2;
this.enterRecursionRule(a, 2, s.RULE_expression, t);
let d;
try {
let f;
this.enterOuterAlt(a, 1);
{
switch (this.state = 39, this.errorHandler.sync(this), this.interpreter.adaptivePredict(this.tokenStream, 1, this.context)) {
case 1:
for (a = new z(a), this.context = a, u = a, this.state = 21, this.match(s.Self), this.state = 26, this.errorHandler.sync(this), f = this.interpreter.adaptivePredict(this.tokenStream, 0, this.context); f !== 2 && f !== p.ATN.INVALID_ALT_NUMBER; )
f === 1 && (this.state = 22, this.match(s.T__3), this.state = 23, this.match(s.Identifier)), this.state = 28, this.errorHandler.sync(this), f = this.interpreter.adaptivePredict(this.tokenStream, 0, this.context);
break;
case 2:
a = new X(a), this.context = a, u = a, this.state = 29, this.match(s.T__4), this.state = 30, this.expression(17);
break;
case 3:
a = new q(a), this.context = a, u = a, this.state = 31, this.match(s.Not), this.state = 32, this.expression(16);
break;
case 4:
a = new P(a), this.context = a, u = a, this.state = 33, this.literal();
break;
case 5:
a = new Y(a), this.context = a, u = a, this.state = 34, this.match(s.Identifier);
break;
case 6:
a = new $(a), this.context = a, u = a, this.state = 35, this.match(s.T__1), this.state = 36, this.expression(0), this.state = 37, this.match(s.T__2);
break;
}
for (this.context.stop = this.tokenStream.LT(-1), this.state = 95, this.errorHandler.sync(this), f = this.interpreter.adaptivePredict(this.tokenStream, 4, this.context); f !== 2 && f !== p.ATN.INVALID_ALT_NUMBER; ) {
if (f === 1)
switch (this.parseListeners != null && this.triggerExitRuleEvent(), u = a, this.state = 93, this.errorHandler.sync(this), this.interpreter.adaptivePredict(this.tokenStream, 3, this.context)) {
case 1:
{
if (a = new Q(new l(e, n)), this.pushNewRecursionContext(a, c, s.RULE_expression), this.state = 41, !this.precpred(this.context, 15))
throw this.createFailedPredicateException("this.precpred(this.context, 15)");
this.state = 42, this.match(s.T__5), this.state = 43, this.expression(16);
}
break;
case 2:
{
if (a = new j(new l(e, n)), this.pushNewRecursionContext(a, c, s.RULE_expression), this.state = 44, !this.precpred(this.context, 14))
throw this.createFailedPredicateException("this.precpred(this.context, 14)");
this.state = 45, d = this.tokenStream.LA(1), (d & -32) === 0 && (1 << d & 3968) !== 0 ? (this.errorHandler.reportMatch(this), this.consume()) : this.errorHandler.recoverInline(this), this.state = 46, this.expression(15);
}
break;
case 3:
{
if (a = new W(new l(e, n)), this.pushNewRecursionContext(a, c, s.RULE_expression), this.state = 47, !this.precpred(this.context, 13))
throw this.createFailedPredicateException("this.precpred(this.context, 13)");
this.state = 48, d = this.tokenStream.LA(1), d === 5 || d === 12 ? (this.errorHandler.reportMatch(this), this.consume()) : this.errorHandler.recoverInline(this), this.state = 49, this.expression(14);
}
break;
case 4:
{
if (a = new G(new l(e, n)), this.pushNewRecursionContext(a, c, s.RULE_expression), this.state = 50, !this.precpred(this.context, 12))
throw this.createFailedPredicateException("this.precpred(this.context, 12)");
this.state = 51, d = this.tokenStream.LA(1), (d & -32) === 0 && (1 << d & 122880) !== 0 ? (this.errorHandler.reportMatch(this), this.consume()) : this.errorHandler.recoverInline(this), this.state = 52, this.expression(13);
}
break;
case 5:
{
if (a = new K(new l(e, n)), this.pushNewRecursionContext(a, c, s.RULE_expression), this.state = 53, !this.precpred(this.context, 11))
throw this.createFailedPredicateException("this.precpred(this.context, 11)");
this.state = 54, this.match(s.In), this.state = 55, this.expression(12);
}
break;
case 6:
{
if (a = new Z(new l(e, n)), this.pushNewRecursionContext(a, c, s.RULE_expression), this.state = 56, !this.precpred(this.context, 10))
throw this.createFailedPredicateException("this.precpred(this.context, 10)");
this.state = 57, d = this.tokenStream.LA(1), (d & -32) === 0 && (1 << d & 1966080) !== 0 ? (this.errorHandler.reportMatch(this), this.consume()) : this.errorHandler.recoverInline(this), this.state = 58, this.expression(11);
}
break;
case 7:
{
if (a = new J(new l(e, n)), this.pushNewRecursionContext(a, c, s.RULE_expression), this.state = 59, !this.precpred(this.context, 9))
throw this.createFailedPredicateException("this.precpred(this.context, 9)");
this.state = 60, this.match(s.And), this.state = 61, this.expression(10);
}
break;
case 8:
{
if (a = new tt(new l(e, n)), this.pushNewRecursionContext(a, c, s.RULE_expression), this.state = 62, !this.precpred(this.context, 8))
throw this.createFailedPredicateException("this.precpred(this.context, 8)");
this.state = 63, this.match(s.Xor), this.state = 64, this.expression(9);
}
break;
case 9:
{
if (a = new et(new l(e, n)), this.pushNewRecursionContext(a, c, s.RULE_expression), this.state = 65, !this.precpred(this.context, 7))
throw this.createFailedPredicateException("this.precpred(this.context, 7)");
this.state = 66, this.match(s.Or), this.state = 67, this.expression(8);
}
break;
case 10:
{
if (a = new it(new l(e, n)), this.pushNewRecursionContext(a, c, s.RULE_expression), this.state = 68, !this.precpred(this.context, 6))
throw this.createFailedPredicateException("this.precpred(this.context, 6)");
this.state = 69, this.match(s.Implies), this.state = 70, this.expression(7);
}
break;
case 11:
{
if (a = new rt(new l(e, n)), this.pushNewRecursionContext(a, c, s.RULE_expression), this.state = 71, !this.precpred(this.context, 5))
throw this.createFailedPredicateException("this.precpred(this.context, 5)");
this.state = 72, this.match(s.T__20), this.state = 73, this.expression(0), this.state = 74, this.match(s.T__21), this.state = 75, this.expression(6);
}
break;
case 12:
{
if (a = new st(new l(e, n)), this.pushNewRecursionContext(a, c, s.RULE_expression), this.state = 77, !this.precpred(this.context, 20))
throw this.createFailedPredicateException("this.precpred(this.context, 20)");
switch (this.state = 78, this.match(s.T__0), this.state = 79, this.match(s.Identifier), this.state = 80, this.match(s.T__1), this.state = 82, this.errorHandler.sync(this), this.interpreter.adaptivePredict(this.tokenStream, 2, this.context)) {
case 1:
this.state = 81, this.argumentList();
break;
}
this.state = 84, this.match(s.T__2);
}
break;
case 13:
{
if (a = new nt(new l(e, n)), this.pushNewRecursionContext(a, c, s.RULE_expression), this.state = 85, !this.precpred(this.context, 19))
throw this.createFailedPredicateException("this.precpred(this.context, 19)");
this.state = 86, this.match(s.T__3), this.state = 87, this.match(s.Identifier);
}
break;
case 14:
{
if (a = new at(new l(e, n)), this.pushNewRecursionContext(a, c, s.RULE_expression), this.state = 88, !this.precpred(this.context, 1))
throw this.createFailedPredicateException("this.precpred(this.context, 1)");
this.state = 89, this.match(s.T__22), this.state = 90, this.expression(0), this.state = 91, this.match(s.T__23);
}
break;
}
this.state = 97, this.errorHandler.sync(this), f = this.interpreter.adaptivePredict(this.tokenStream, 4, this.context);
}
}
} catch (f) {
if (f instanceof p.RecognitionException)
this.errorHandler.reportError(this, f), this.errorHandler.recover(this, f);
else
throw f;
} finally {
this.unrollRecursionContexts(e);
}
return a;
}
literal() {
let t = new m(this.context, this.state);
this.enterRule(t, 4, s.RULE_literal);
try {
switch (this.state = 105, this.errorHandler.sync(this), this.tokenStream.LA(1)) {
case s.Number:
t = new ot(t), this.enterOuterAlt(t, 1), this.state = 98, this.match(s.Number);
break;
case s.StringLiteral:
t = new lt(t), this.enterOuterAlt(t, 2), this.state = 99, this.match(s.StringLiteral);
break;
case s.T__24:
t = new ut(t), this.enterOuterAlt(t, 3), this.state = 100, this.match(s.T__24);
break;
case s.T__25:
t = new ct(t), this.enterOuterAlt(t, 4), this.state = 101, this.match(s.T__25);
break;
case s.T__29:
case s.T__30:
case s.T__31:
case s.T__32:
t = new ht(t), this.enterOuterAlt(t, 5), this.state = 102, this.temporalLiteral();
break;
case s.T__26:
t = new pt(t), this.enterOuterAlt(t, 6), this.state = 103, this.match(s.T__26);
break;
case s.Identifier:
t = new xt(t), this.enterOuterAlt(t, 7), this.state = 104, this.enumLiteral();
break;
default:
throw new p.NoViableAltException(this);
}
} catch (e) {
if (e instanceof p.RecognitionException)
this.errorHandler.reportError(this, e), this.errorHandler.recover(this, e);
else
throw e;
} finally {
this.exitRule();
}
return t;
}
enumLiteral() {
let t = new w(this.context, this.state);
this.enterRule(t, 6, s.RULE_enumLiteral);
try {
this.enterOuterAlt(t, 1), this.state = 107, this.qualifiedName(), this.state = 108, this.match(s.T__27), this.state = 109, this.match(s.Identifier);
} catch (e) {
if (e instanceof p.RecognitionException)
this.errorHandler.reportError(this, e), this.errorHandler.recover(this, e);
else
throw e;
} finally {
this.exitRule();
}
return t;
}
qualifiedName() {
let t = new N(this.context, this.state);
this.enterRule(t, 8, s.RULE_qualifiedName);
let e;
try {
for (this.enterOuterAlt(t, 1), this.state = 111, this.match(s.Identifier), this.state = 116, this.errorHandler.sync(this), e = this.tokenStream.LA(1); e === 29; )
this.state = 112, this.match(s.T__28), this.state = 113, this.match(s.Identifier), this.state = 118, this.errorHandler.sync(this), e = this.tokenStream.LA(1);
} catch (n) {
if (n instanceof p.RecognitionException)
this.errorHandler.reportError(this, n), this.errorHandler.recover(this, n);
else
throw n;
} finally {
this.exitRule();
}
return t;
}
temporalLiteral() {
let t = new g(this.context, this.state);
this.enterRule(t, 10, s.RULE_temporalLiteral);
try {
switch (this.state = 131, this.errorHandler.sync(this), this.interpreter.adaptivePredict(this.tokenStream, 7, this.context)) {
case 1:
t = new ft(t), this.enterOuterAlt(t, 1), this.state = 119, this.match(s.T__29), this.state = 120, this.match(s.DATE), this.state = 121, this.match(s.T__29);
break;
case 2:
t = new dt(t), this.enterOuterAlt(t, 2), this.state = 122, this.match(s.T__29), this.state = 123, this.match(s.TIMESTAMP), this.state = 124, this.match(s.T__29);
break;
case 3:
t = new Et(t), this.enterOuterAlt(t, 3), this.state = 125, this.match(s.T__29), this.state = 126, this.match(s.TIME), this.state = 127, this.match(s.T__29);
break;
case 4:
t = new Tt(t), this.enterOuterAlt(t, 4), this.state = 128, this.match(s.T__30);
break;
case 5:
t = new mt(t), this.enterOuterAlt(t, 5), this.state = 129, this.match(s.T__31);
break;
case 6:
t = new gt(t), this.enterOuterAlt(t, 6), this.state = 130, this.match(s.T__32);
break;
}
} catc