@opra/common
Version:
Opra common package
1,529 lines • 55.5 kB
JavaScript
// Generated from ./src/filter/antlr/OpraFilter.g4 by ANTLR 4.13.2
// noinspection ES6UnusedImports,JSUnusedGlobalSymbols,JSUnusedLocalSymbols
import { ATN, ATNDeserializer, DFA, FailedPredicateException, NoViableAltException, Parser, ParserATNSimulator, ParserRuleContext, PredictionContextCache, RecognitionException, Token, } from '@browsery/antlr4';
class OpraFilterParser extends Parser {
get grammarFileName() { return "OpraFilter.g4"; }
get literalNames() { return OpraFilterParser.literalNames; }
get symbolicNames() { return OpraFilterParser.symbolicNames; }
get ruleNames() { return OpraFilterParser.ruleNames; }
get serializedATN() { return OpraFilterParser._serializedATN; }
createFailedPredicateException(predicate, message) {
return new FailedPredicateException(this, predicate, message);
}
constructor(input) {
super(input);
this._interp = new ParserATNSimulator(this, OpraFilterParser._ATN, OpraFilterParser.DecisionsToDFA, new PredictionContextCache());
}
// @RuleVersion(0)
root() {
let localctx = new RootContext(this, this._ctx, this.state);
this.enterRule(localctx, 0, OpraFilterParser.RULE_root);
try {
this.enterOuterAlt(localctx, 1);
{
this.state = 34;
this.expression(0);
this.state = 35;
this.match(OpraFilterParser.EOF);
}
}
catch (re) {
if (re instanceof RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return localctx;
}
// @RuleVersion(0)
expression(_p) {
if (_p === undefined) {
_p = 0;
}
let _parentctx = this._ctx;
let _parentState = this.state;
let localctx = new ExpressionContext(this, this._ctx, _parentState);
let _prevctx = localctx;
let _startState = 2;
this.enterRecursionRule(localctx, 2, OpraFilterParser.RULE_expression, _p);
let _la;
try {
let _alt;
this.enterOuterAlt(localctx, 1);
{
this.state = 48;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case 35:
{
localctx = new ComparisonExpressionContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 38;
localctx._left = this.comparisonLeft();
this.state = 39;
localctx._operator = this.comparisonOperator();
this.state = 40;
localctx._right = this.comparisonRight();
}
break;
case 1:
{
localctx = new ParenthesizedExpressionContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 42;
this.match(OpraFilterParser.T__0);
this.state = 43;
this.parenthesizedItem();
this.state = 44;
this.match(OpraFilterParser.T__1);
}
break;
case 3:
case 4:
{
localctx = new NegativeExpressionContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 46;
_la = this._input.LA(1);
if (!(_la === 3 || _la === 4)) {
this._errHandler.recoverInline(this);
}
else {
this._errHandler.reportMatch(this);
this.consume();
}
this.state = 47;
this.expression(1);
}
break;
default:
throw new NoViableAltException(this);
}
this._ctx.stop = this._input.LT(-1);
this.state = 56;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input, 1, this._ctx);
while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
if (this._parseListeners != null) {
this.triggerExitRuleEvent();
}
_prevctx = localctx;
{
{
localctx = new LogicalExpressionContext(this, new ExpressionContext(this, _parentctx, _parentState));
this.pushNewRecursionContext(localctx, _startState, OpraFilterParser.RULE_expression);
this.state = 50;
if (!(this.precpred(this._ctx, 3))) {
throw this.createFailedPredicateException("this.precpred(this._ctx, 3)");
}
this.state = 51;
localctx._op = this.logicalOperator();
this.state = 52;
this.expression(4);
}
}
}
this.state = 58;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input, 1, this._ctx);
}
}
}
catch (re) {
if (re instanceof RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.unrollRecursionContexts(_parentctx);
}
return localctx;
}
// @RuleVersion(0)
comparisonLeft() {
let localctx = new ComparisonLeftContext(this, this._ctx, this.state);
this.enterRule(localctx, 4, OpraFilterParser.RULE_comparisonLeft);
try {
this.enterOuterAlt(localctx, 1);
{
this.state = 59;
this.qualifiedIdentifier();
}
}
catch (re) {
if (re instanceof RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return localctx;
}
// @RuleVersion(0)
comparisonRight() {
let localctx = new ComparisonRightContext(this, this._ctx, this.state);
this.enterRule(localctx, 6, OpraFilterParser.RULE_comparisonRight);
try {
this.state = 65;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case 10:
case 11:
case 12:
case 13:
case 14:
case 37:
case 38:
case 39:
case 40:
case 42:
this.enterOuterAlt(localctx, 1);
{
this.state = 61;
this.value();
}
break;
case 35:
this.enterOuterAlt(localctx, 2);
{
this.state = 62;
this.qualifiedIdentifier();
}
break;
case 6:
this.enterOuterAlt(localctx, 3);
{
this.state = 63;
this.externalConstant();
}
break;
case 7:
this.enterOuterAlt(localctx, 4);
{
this.state = 64;
this.arrayValue();
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (re) {
if (re instanceof RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return localctx;
}
// @RuleVersion(0)
parenthesizedItem() {
let localctx = new ParenthesizedItemContext(this, this._ctx, this.state);
this.enterRule(localctx, 8, OpraFilterParser.RULE_parenthesizedItem);
try {
this.enterOuterAlt(localctx, 1);
{
this.state = 67;
this.expression(0);
}
}
catch (re) {
if (re instanceof RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return localctx;
}
// @RuleVersion(0)
value() {
let localctx = new ValueContext(this, this._ctx, this.state);
this.enterRule(localctx, 10, OpraFilterParser.RULE_value);
try {
this.state = 77;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case 40:
localctx = new NumberLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 1);
{
this.state = 69;
this.match(OpraFilterParser.NUMBER);
}
break;
case 13:
case 14:
localctx = new InfinityLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 2);
{
this.state = 70;
this.infinity();
}
break;
case 10:
case 11:
localctx = new BooleanLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 3);
{
this.state = 71;
this.boolean_();
}
break;
case 12:
localctx = new NullLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 4);
{
this.state = 72;
this.null_();
}
break;
case 38:
localctx = new DateTimeLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 5);
{
this.state = 73;
this.match(OpraFilterParser.DATETIME);
}
break;
case 37:
localctx = new DateLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 6);
{
this.state = 74;
this.match(OpraFilterParser.DATE);
}
break;
case 39:
localctx = new TimeLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 7);
{
this.state = 75;
this.match(OpraFilterParser.TIME);
}
break;
case 42:
localctx = new StringLiteralContext(this, localctx);
this.enterOuterAlt(localctx, 8);
{
this.state = 76;
this.match(OpraFilterParser.STRING);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (re) {
if (re instanceof RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return localctx;
}
// @RuleVersion(0)
qualifiedIdentifier() {
let localctx = new QualifiedIdentifierContext(this, this._ctx, this.state);
this.enterRule(localctx, 12, OpraFilterParser.RULE_qualifiedIdentifier);
try {
let _alt;
this.enterOuterAlt(localctx, 1);
{
this.state = 84;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input, 4, this._ctx);
while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
{
{
this.state = 79;
this.identifier();
this.state = 80;
this.match(OpraFilterParser.T__4);
}
}
}
this.state = 86;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input, 4, this._ctx);
}
this.state = 87;
this.identifier();
}
}
catch (re) {
if (re instanceof RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return localctx;
}
// @RuleVersion(0)
externalConstant() {
let localctx = new ExternalConstantContext(this, this._ctx, this.state);
this.enterRule(localctx, 14, OpraFilterParser.RULE_externalConstant);
try {
this.enterOuterAlt(localctx, 1);
{
this.state = 89;
this.match(OpraFilterParser.T__5);
this.state = 90;
this.identifier();
}
}
catch (re) {
if (re instanceof RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return localctx;
}
// @RuleVersion(0)
identifier() {
let localctx = new IdentifierContext(this, this._ctx, this.state);
this.enterRule(localctx, 16, OpraFilterParser.RULE_identifier);
try {
this.enterOuterAlt(localctx, 1);
{
this.state = 92;
this.match(OpraFilterParser.IDENTIFIER);
}
}
catch (re) {
if (re instanceof RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return localctx;
}
// @RuleVersion(0)
arrayValue() {
let localctx = new ArrayValueContext(this, this._ctx, this.state);
this.enterRule(localctx, 18, OpraFilterParser.RULE_arrayValue);
let _la;
try {
this.enterOuterAlt(localctx, 1);
{
this.state = 94;
this.match(OpraFilterParser.T__6);
this.state = 95;
this.value();
this.state = 100;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === 8) {
{
{
this.state = 96;
this.match(OpraFilterParser.T__7);
this.state = 97;
this.value();
}
}
this.state = 102;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 103;
this.match(OpraFilterParser.T__8);
}
}
catch (re) {
if (re instanceof RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return localctx;
}
// @RuleVersion(0)
boolean_() {
let localctx = new BooleanContext(this, this._ctx, this.state);
this.enterRule(localctx, 20, OpraFilterParser.RULE_boolean);
let _la;
try {
this.enterOuterAlt(localctx, 1);
{
this.state = 105;
_la = this._input.LA(1);
if (!(_la === 10 || _la === 11)) {
this._errHandler.recoverInline(this);
}
else {
this._errHandler.reportMatch(this);
this.consume();
}
}
}
catch (re) {
if (re instanceof RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return localctx;
}
// @RuleVersion(0)
null_() {
let localctx = new NullContext(this, this._ctx, this.state);
this.enterRule(localctx, 22, OpraFilterParser.RULE_null);
try {
this.enterOuterAlt(localctx, 1);
{
this.state = 107;
this.match(OpraFilterParser.T__11);
}
}
catch (re) {
if (re instanceof RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return localctx;
}
// @RuleVersion(0)
infinity() {
let localctx = new InfinityContext(this, this._ctx, this.state);
this.enterRule(localctx, 24, OpraFilterParser.RULE_infinity);
let _la;
try {
this.enterOuterAlt(localctx, 1);
{
this.state = 109;
_la = this._input.LA(1);
if (!(_la === 13 || _la === 14)) {
this._errHandler.recoverInline(this);
}
else {
this._errHandler.reportMatch(this);
this.consume();
}
}
}
catch (re) {
if (re instanceof RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return localctx;
}
// @RuleVersion(0)
arithmeticOperator() {
let localctx = new ArithmeticOperatorContext(this, this._ctx, this.state);
this.enterRule(localctx, 26, OpraFilterParser.RULE_arithmeticOperator);
let _la;
try {
this.enterOuterAlt(localctx, 1);
{
this.state = 111;
_la = this._input.LA(1);
if (!((((_la) & ~0x1F) === 0 && ((1 << _la) & 491520) !== 0))) {
this._errHandler.recoverInline(this);
}
else {
this._errHandler.reportMatch(this);
this.consume();
}
}
}
catch (re) {
if (re instanceof RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return localctx;
}
// @RuleVersion(0)
comparisonOperator() {
let localctx = new ComparisonOperatorContext(this, this._ctx, this.state);
this.enterRule(localctx, 28, OpraFilterParser.RULE_comparisonOperator);
let _la;
try {
this.enterOuterAlt(localctx, 1);
{
this.state = 113;
_la = this._input.LA(1);
if (!((((_la) & ~0x1F) === 0 && ((1 << _la) & 2146959360) !== 0))) {
this._errHandler.recoverInline(this);
}
else {
this._errHandler.reportMatch(this);
this.consume();
}
}
}
catch (re) {
if (re instanceof RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return localctx;
}
// @RuleVersion(0)
logicalOperator() {
let localctx = new LogicalOperatorContext(this, this._ctx, this.state);
this.enterRule(localctx, 30, OpraFilterParser.RULE_logicalOperator);
let _la;
try {
this.enterOuterAlt(localctx, 1);
{
this.state = 115;
_la = this._input.LA(1);
if (!(((((_la - 31)) & ~0x1F) === 0 && ((1 << (_la - 31)) & 15) !== 0))) {
this._errHandler.recoverInline(this);
}
else {
this._errHandler.reportMatch(this);
this.consume();
}
}
}
catch (re) {
if (re instanceof RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return localctx;
}
// @RuleVersion(0)
polarityOperator() {
let localctx = new PolarityOperatorContext(this, this._ctx, this.state);
this.enterRule(localctx, 32, OpraFilterParser.RULE_polarityOperator);
try {
this.enterOuterAlt(localctx, 1);
{
this.state = 117;
this.match(OpraFilterParser.POLAR_OP);
}
}
catch (re) {
if (re instanceof RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
}
else {
throw re;
}
}
finally {
this.exitRule();
}
return localctx;
}
sempred(localctx, ruleIndex, predIndex) {
switch (ruleIndex) {
case 1:
return this.expression_sempred(localctx, predIndex);
}
return true;
}
expression_sempred(localctx, predIndex) {
switch (predIndex) {
case 0:
return this.precpred(this._ctx, 3);
}
return true;
}
static get _ATN() {
if (!OpraFilterParser.__ATN) {
OpraFilterParser.__ATN = new ATNDeserializer().deserialize(OpraFilterParser._serializedATN);
}
return OpraFilterParser.__ATN;
}
}
OpraFilterParser.T__0 = 1;
OpraFilterParser.T__1 = 2;
OpraFilterParser.T__2 = 3;
OpraFilterParser.T__3 = 4;
OpraFilterParser.T__4 = 5;
OpraFilterParser.T__5 = 6;
OpraFilterParser.T__6 = 7;
OpraFilterParser.T__7 = 8;
OpraFilterParser.T__8 = 9;
OpraFilterParser.T__9 = 10;
OpraFilterParser.T__10 = 11;
OpraFilterParser.T__11 = 12;
OpraFilterParser.T__12 = 13;
OpraFilterParser.T__13 = 14;
OpraFilterParser.T__14 = 15;
OpraFilterParser.T__15 = 16;
OpraFilterParser.T__16 = 17;
OpraFilterParser.T__17 = 18;
OpraFilterParser.T__18 = 19;
OpraFilterParser.T__19 = 20;
OpraFilterParser.T__20 = 21;
OpraFilterParser.T__21 = 22;
OpraFilterParser.T__22 = 23;
OpraFilterParser.T__23 = 24;
OpraFilterParser.T__24 = 25;
OpraFilterParser.T__25 = 26;
OpraFilterParser.T__26 = 27;
OpraFilterParser.T__27 = 28;
OpraFilterParser.T__28 = 29;
OpraFilterParser.T__29 = 30;
OpraFilterParser.T__30 = 31;
OpraFilterParser.T__31 = 32;
OpraFilterParser.T__32 = 33;
OpraFilterParser.T__33 = 34;
OpraFilterParser.IDENTIFIER = 35;
OpraFilterParser.POLAR_OP = 36;
OpraFilterParser.DATE = 37;
OpraFilterParser.DATETIME = 38;
OpraFilterParser.TIME = 39;
OpraFilterParser.NUMBER = 40;
OpraFilterParser.INTEGER = 41;
OpraFilterParser.STRING = 42;
OpraFilterParser.WHITESPACE = 43;
OpraFilterParser.EOF = Token.EOF;
OpraFilterParser.RULE_root = 0;
OpraFilterParser.RULE_expression = 1;
OpraFilterParser.RULE_comparisonLeft = 2;
OpraFilterParser.RULE_comparisonRight = 3;
OpraFilterParser.RULE_parenthesizedItem = 4;
OpraFilterParser.RULE_value = 5;
OpraFilterParser.RULE_qualifiedIdentifier = 6;
OpraFilterParser.RULE_externalConstant = 7;
OpraFilterParser.RULE_identifier = 8;
OpraFilterParser.RULE_arrayValue = 9;
OpraFilterParser.RULE_boolean = 10;
OpraFilterParser.RULE_null = 11;
OpraFilterParser.RULE_infinity = 12;
OpraFilterParser.RULE_arithmeticOperator = 13;
OpraFilterParser.RULE_comparisonOperator = 14;
OpraFilterParser.RULE_logicalOperator = 15;
OpraFilterParser.RULE_polarityOperator = 16;
OpraFilterParser.literalNames = [null, "'('",
"')'", "'not'",
"'!'", "'.'",
"'@'", "'['",
"','", "']'",
"'true'", "'false'",
"'null'", "'Infinity'",
"'infinity'",
"'+'", "'-'",
"'*'", "'/'",
"'<='", "'<'",
"'>'", "'>='",
"'='", "'!='",
"'in'", "'!in'",
"'like'", "'!like'",
"'ilike'", "'!ilike'",
"'and'", "'or'",
"'&&'", "'||'"];
OpraFilterParser.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, "IDENTIFIER",
"POLAR_OP",
"DATE", "DATETIME",
"TIME", "NUMBER",
"INTEGER",
"STRING", "WHITESPACE"];
// tslint:disable:no-trailing-whitespace
OpraFilterParser.ruleNames = [
"root", "expression", "comparisonLeft", "comparisonRight", "parenthesizedItem",
"value", "qualifiedIdentifier", "externalConstant", "identifier", "arrayValue",
"boolean", "null", "infinity", "arithmeticOperator", "comparisonOperator",
"logicalOperator", "polarityOperator",
];
OpraFilterParser._serializedATN = [4, 1, 43, 120, 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, 1, 0,
1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 49, 8, 1, 1, 1, 1, 1,
1, 1, 1, 1, 5, 1, 55, 8, 1, 10, 1, 12, 1, 58, 9, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 66, 8, 3,
1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 78, 8, 5, 1, 6, 1, 6, 1, 6, 5, 6, 83, 8,
6, 10, 6, 12, 6, 86, 9, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 5, 9, 99, 8,
9, 10, 9, 12, 9, 102, 9, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, 1, 14,
1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 0, 1, 2, 17, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24,
26, 28, 30, 32, 0, 6, 1, 0, 3, 4, 1, 0, 10, 11, 1, 0, 13, 14, 1, 0, 15, 18, 1, 0, 19, 30, 1, 0, 31,
34, 117, 0, 34, 1, 0, 0, 0, 2, 48, 1, 0, 0, 0, 4, 59, 1, 0, 0, 0, 6, 65, 1, 0, 0, 0, 8, 67, 1, 0, 0, 0,
10, 77, 1, 0, 0, 0, 12, 84, 1, 0, 0, 0, 14, 89, 1, 0, 0, 0, 16, 92, 1, 0, 0, 0, 18, 94, 1, 0, 0, 0, 20,
105, 1, 0, 0, 0, 22, 107, 1, 0, 0, 0, 24, 109, 1, 0, 0, 0, 26, 111, 1, 0, 0, 0, 28, 113, 1, 0, 0, 0,
30, 115, 1, 0, 0, 0, 32, 117, 1, 0, 0, 0, 34, 35, 3, 2, 1, 0, 35, 36, 5, 0, 0, 1, 36, 1, 1, 0, 0, 0,
37, 38, 6, 1, -1, 0, 38, 39, 3, 4, 2, 0, 39, 40, 3, 28, 14, 0, 40, 41, 3, 6, 3, 0, 41, 49, 1, 0, 0,
0, 42, 43, 5, 1, 0, 0, 43, 44, 3, 8, 4, 0, 44, 45, 5, 2, 0, 0, 45, 49, 1, 0, 0, 0, 46, 47, 7, 0, 0, 0,
47, 49, 3, 2, 1, 1, 48, 37, 1, 0, 0, 0, 48, 42, 1, 0, 0, 0, 48, 46, 1, 0, 0, 0, 49, 56, 1, 0, 0, 0, 50,
51, 10, 3, 0, 0, 51, 52, 3, 30, 15, 0, 52, 53, 3, 2, 1, 4, 53, 55, 1, 0, 0, 0, 54, 50, 1, 0, 0, 0, 55,
58, 1, 0, 0, 0, 56, 54, 1, 0, 0, 0, 56, 57, 1, 0, 0, 0, 57, 3, 1, 0, 0, 0, 58, 56, 1, 0, 0, 0, 59, 60,
3, 12, 6, 0, 60, 5, 1, 0, 0, 0, 61, 66, 3, 10, 5, 0, 62, 66, 3, 12, 6, 0, 63, 66, 3, 14, 7, 0, 64, 66,
3, 18, 9, 0, 65, 61, 1, 0, 0, 0, 65, 62, 1, 0, 0, 0, 65, 63, 1, 0, 0, 0, 65, 64, 1, 0, 0, 0, 66, 7, 1,
0, 0, 0, 67, 68, 3, 2, 1, 0, 68, 9, 1, 0, 0, 0, 69, 78, 5, 40, 0, 0, 70, 78, 3, 24, 12, 0, 71, 78, 3,
20, 10, 0, 72, 78, 3, 22, 11, 0, 73, 78, 5, 38, 0, 0, 74, 78, 5, 37, 0, 0, 75, 78, 5, 39, 0, 0, 76,
78, 5, 42, 0, 0, 77, 69, 1, 0, 0, 0, 77, 70, 1, 0, 0, 0, 77, 71, 1, 0, 0, 0, 77, 72, 1, 0, 0, 0, 77,
73, 1, 0, 0, 0, 77, 74, 1, 0, 0, 0, 77, 75, 1, 0, 0, 0, 77, 76, 1, 0, 0, 0, 78, 11, 1, 0, 0, 0, 79, 80,
3, 16, 8, 0, 80, 81, 5, 5, 0, 0, 81, 83, 1, 0, 0, 0, 82, 79, 1, 0, 0, 0, 83, 86, 1, 0, 0, 0, 84, 82,
1, 0, 0, 0, 84, 85, 1, 0, 0, 0, 85, 87, 1, 0, 0, 0, 86, 84, 1, 0, 0, 0, 87, 88, 3, 16, 8, 0, 88, 13,
1, 0, 0, 0, 89, 90, 5, 6, 0, 0, 90, 91, 3, 16, 8, 0, 91, 15, 1, 0, 0, 0, 92, 93, 5, 35, 0, 0, 93, 17,
1, 0, 0, 0, 94, 95, 5, 7, 0, 0, 95, 100, 3, 10, 5, 0, 96, 97, 5, 8, 0, 0, 97, 99, 3, 10, 5, 0, 98, 96,
1, 0, 0, 0, 99, 102, 1, 0, 0, 0, 100, 98, 1, 0, 0, 0, 100, 101, 1, 0, 0, 0, 101, 103, 1, 0, 0, 0, 102,
100, 1, 0, 0, 0, 103, 104, 5, 9, 0, 0, 104, 19, 1, 0, 0, 0, 105, 106, 7, 1, 0, 0, 106, 21, 1, 0, 0,
0, 107, 108, 5, 12, 0, 0, 108, 23, 1, 0, 0, 0, 109, 110, 7, 2, 0, 0, 110, 25, 1, 0, 0, 0, 111, 112,
7, 3, 0, 0, 112, 27, 1, 0, 0, 0, 113, 114, 7, 4, 0, 0, 114, 29, 1, 0, 0, 0, 115, 116, 7, 5, 0, 0, 116,
31, 1, 0, 0, 0, 117, 118, 5, 36, 0, 0, 118, 33, 1, 0, 0, 0, 6, 48, 56, 65, 77, 84, 100];
OpraFilterParser.DecisionsToDFA = OpraFilterParser._ATN.decisionToState.map((ds, index) => new DFA(ds, index));
export default OpraFilterParser;
export class RootContext extends ParserRuleContext {
constructor(parser, parent, invokingState) {
super(parent, invokingState);
this.parser = parser;
}
expression() {
return this.getTypedRuleContext(ExpressionContext, 0);
}
EOF() {
return this.getToken(OpraFilterParser.EOF, 0);
}
get ruleIndex() {
return OpraFilterParser.RULE_root;
}
enterRule(listener) {
if (listener.enterRoot) {
listener.enterRoot(this);
}
}
exitRule(listener) {
if (listener.exitRoot) {
listener.exitRoot(this);
}
}
// @Override
accept(visitor) {
if (visitor.visitRoot) {
return visitor.visitRoot(this);
}
else {
return visitor.visitChildren(this);
}
}
}
export class ExpressionContext extends ParserRuleContext {
constructor(parser, parent, invokingState) {
super(parent, invokingState);
this.parser = parser;
}
get ruleIndex() {
return OpraFilterParser.RULE_expression;
}
copyFrom(ctx) {
super.copyFrom(ctx);
}
}
export class ParenthesizedExpressionContext extends ExpressionContext {
constructor(parser, ctx) {
super(parser, ctx.parentCtx, ctx.invokingState);
super.copyFrom(ctx);
}
parenthesizedItem() {
return this.getTypedRuleContext(ParenthesizedItemContext, 0);
}
enterRule(listener) {
if (listener.enterParenthesizedExpression) {
listener.enterParenthesizedExpression(this);
}
}
exitRule(listener) {
if (listener.exitParenthesizedExpression) {
listener.exitParenthesizedExpression(this);
}
}
// @Override
accept(visitor) {
if (visitor.visitParenthesizedExpression) {
return visitor.visitParenthesizedExpression(this);
}
else {
return visitor.visitChildren(this);
}
}
}
export class NegativeExpressionContext extends ExpressionContext {
constructor(parser, ctx) {
super(parser, ctx.parentCtx, ctx.invokingState);
super.copyFrom(ctx);
}
expression() {
return this.getTypedRuleContext(ExpressionContext, 0);
}
enterRule(listener) {
if (listener.enterNegativeExpression) {
listener.enterNegativeExpression(this);
}
}
exitRule(listener) {
if (listener.exitNegativeExpression) {
listener.exitNegativeExpression(this);
}
}
// @Override
accept(visitor) {
if (visitor.visitNegativeExpression) {
return visitor.visitNegativeExpression(this);
}
else {
return visitor.visitChildren(this);
}
}
}
export class ComparisonExpressionContext extends ExpressionContext {
constructor(parser, ctx) {
super(parser, ctx.parentCtx, ctx.invokingState);
super.copyFrom(ctx);
}
comparisonLeft() {
return this.getTypedRuleContext(ComparisonLeftContext, 0);
}
comparisonOperator() {
return this.getTypedRuleContext(ComparisonOperatorContext, 0);
}
comparisonRight() {
return this.getTypedRuleContext(ComparisonRightContext, 0);
}
enterRule(listener) {
if (listener.enterComparisonExpression) {
listener.enterComparisonExpression(this);
}
}
exitRule(listener) {
if (listener.exitComparisonExpression) {
listener.exitComparisonExpression(this);
}
}
// @Override
accept(visitor) {
if (visitor.visitComparisonExpression) {
return visitor.visitComparisonExpression(this);
}
else {
return visitor.visitChildren(this);
}
}
}
export class LogicalExpressionContext extends ExpressionContext {
constructor(parser, ctx) {
super(parser, ctx.parentCtx, ctx.invokingState);
super.copyFrom(ctx);
}
expression_list() {
return this.getTypedRuleContexts(ExpressionContext);
}
expression(i) {
return this.getTypedRuleContext(ExpressionContext, i);
}
logicalOperator() {
return this.getTypedRuleContext(LogicalOperatorContext, 0);
}
enterRule(listener) {
if (listener.enterLogicalExpression) {
listener.enterLogicalExpression(this);
}
}
exitRule(listener) {
if (listener.exitLogicalExpression) {
listener.exitLogicalExpression(this);
}
}
// @Override
accept(visitor) {
if (visitor.visitLogicalExpression) {
return visitor.visitLogicalExpression(this);
}
else {
return visitor.visitChildren(this);
}
}
}
export class ComparisonLeftContext extends ParserRuleContext {
constructor(parser, parent, invokingState) {
super(parent, invokingState);
this.parser = parser;
}
qualifiedIdentifier() {
return this.getTypedRuleContext(QualifiedIdentifierContext, 0);
}
get ruleIndex() {
return OpraFilterParser.RULE_comparisonLeft;
}
enterRule(listener) {
if (listener.enterComparisonLeft) {
listener.enterComparisonLeft(this);
}
}
exitRule(listener) {
if (listener.exitComparisonLeft) {
listener.exitComparisonLeft(this);
}
}
// @Override
accept(visitor) {
if (visitor.visitComparisonLeft) {
return visitor.visitComparisonLeft(this);
}
else {
return visitor.visitChildren(this);
}
}
}
export class ComparisonRightContext extends ParserRuleContext {
constructor(parser, parent, invokingState) {
super(parent, invokingState);
this.parser = parser;
}
value() {
return this.getTypedRuleContext(ValueContext, 0);
}
qualifiedIdentifier() {
return this.getTypedRuleContext(QualifiedIdentifierContext, 0);
}
externalConstant() {
return this.getTypedRuleContext(ExternalConstantContext, 0);
}
arrayValue() {
return this.getTypedRuleContext(ArrayValueContext, 0);
}
get ruleIndex() {
return OpraFilterParser.RULE_comparisonRight;
}
enterRule(listener) {
if (listener.enterComparisonRight) {
listener.enterComparisonRight(this);
}
}
exitRule(listener) {
if (listener.exitComparisonRight) {
listener.exitComparisonRight(this);
}
}
// @Override
accept(visitor) {
if (visitor.visitComparisonRight) {
return visitor.visitComparisonRight(this);
}
else {
return visitor.visitChildren(this);
}
}
}
export class ParenthesizedItemContext extends ParserRuleContext {
constructor(parser, parent, invokingState) {
super(parent, invokingState);
this.parser = parser;
}
expression() {
return this.getTypedRuleContext(ExpressionContext, 0);
}
get ruleIndex() {
return OpraFilterParser.RULE_parenthesizedItem;
}
enterRule(listener) {
if (listener.enterParenthesizedItem) {
listener.enterParenthesizedItem(this);
}
}
exitRule(listener) {
if (listener.exitParenthesizedItem) {
listener.exitParenthesizedItem(this);
}
}
// @Override
accept(visitor) {
if (visitor.visitParenthesizedItem) {
return visitor.visitParenthesizedItem(this);
}
else {
return visitor.visitChildren(this);
}
}
}
export class ValueContext extends ParserRuleContext {
constructor(parser, parent, invokingState) {
super(parent, invokingState);
this.parser = parser;
}
get ruleIndex() {
return OpraFilterParser.RULE_value;
}
copyFrom(ctx) {
super.copyFrom(ctx);
}
}
export class TimeLiteralContext extends ValueContext {
constructor(parser, ctx) {
super(parser, ctx.parentCtx, ctx.invokingState);
super.copyFrom(ctx);
}
TIME() {
return this.getToken(OpraFilterParser.TIME, 0);
}
enterRule(listener) {
if (listener.enterTimeLiteral) {
listener.enterTimeLiteral(this);
}
}
exitRule(listener) {
if (listener.exitTimeLiteral) {
listener.exitTimeLiteral(this);
}
}
// @Override
accept(visitor) {
if (visitor.visitTimeLiteral) {
return visitor.visitTimeLiteral(this);
}
else {
return visitor.visitChildren(this);
}
}
}
export class NullLiteralContext extends ValueContext {
constructor(parser, ctx) {
super(parser, ctx.parentCtx, ctx.invokingState);
super.copyFrom(ctx);
}
null_() {
return this.getTypedRuleContext(NullContext, 0);
}
enterRule(listener) {
if (listener.enterNullLiteral) {
listener.enterNullLiteral(this);
}
}
exitRule(listener) {
if (listener.exitNullLiteral) {
listener.exitNullLiteral(this);
}
}
// @Override
accept(visitor) {
if (visitor.visitNullLiteral) {
return visitor.visitNullLiteral(this);
}
else {
return visitor.visitChildren(this);
}
}
}
export class DateTimeLiteralContext extends ValueContext {
constructor(parser, ctx) {
super(parser, ctx.parentCtx, ctx.invokingState);
super.copyFrom(ctx);
}
DATETIME() {
return this.getToken(OpraFilterParser.DATETIME, 0);
}
enterRule(listener) {
if (listener.enterDateTimeLiteral) {
listener.enterDateTimeLiteral(this);
}
}
exitRule(listener) {
if (listener.exitDateTimeLiteral) {
listener.exitDateTimeLiteral(this);
}
}
// @Override
accept(visitor) {
if (visitor.visitDateTimeLiteral) {
return visitor.visitDateTimeLiteral(this);
}
else {
return visitor.visitChildren(this);
}
}
}
export class StringLiteralContext extends ValueContext {
constructor(parser, ctx) {
super(parser, ctx.parentCtx, ctx.invokingState);
super.copyFrom(ctx);
}
STRING() {
return this.getToken(OpraFilterParser.STRING, 0);
}
enterRule(listener) {
if (listener.enterStringLiteral) {
listener.enterStringLiteral(this);
}
}
exitRule(listener) {
if (listener.exitStringLiteral) {
listener.exitStringLiteral(this);
}
}
// @Override
accept(visitor) {
if (visitor.visitStringLiteral) {
return visitor.visitStringLiteral(this);
}
else {
return visitor.visitChildren(this);
}
}
}
export class DateLiteralContext extends ValueContext {
constructor(parser, ctx) {
super(parser, ctx.parentCtx, ctx.invokingState);
super.copyFrom(ctx);
}
DATE() {
return this.getToken(OpraFilterParser.DATE, 0);
}
enterRule(listener) {
if (listener.enterDateLiteral) {
listener.enterDateLiteral(this);
}
}
exitRule(listener) {
if (listener.exitDateLiteral) {
listener.exitDateLiteral(this);
}
}
// @Override
accept(visitor) {
if (visitor.visitDateLiteral) {
return visitor.visitDateLiteral(this);
}
else {
return visitor.visitChildren(this);
}
}
}
export class InfinityLiteralContext extends ValueContext {
constructor(parser, ctx) {
super(parser, ctx.parentCtx, ctx.invokingState);
super.copyFrom(ctx);
}
infinity() {
return this.getTypedRuleContext(InfinityContext, 0);
}
enterRule(listener) {
if (listener.enterInfinityLiteral) {
listener.enterInfinityLiteral(this);
}
}
exitRule(listener) {
if (listener.exitInfinityLiteral) {
listener.exitInfinityLiteral(this);
}
}
// @Override
accept(visitor) {
if (visitor.visitInfinityLiteral) {
return visitor.visitInfinityLiteral(this);
}
else {
return visitor.visitChildren(this);
}
}
}
export class BooleanLiteralContext extends ValueContext {
constructor(parser, ctx) {
super(parser, ctx.parentCtx, ctx.invokingState);
super.copyFrom(ctx);
}
boolean_() {
return this.getTypedRuleContext(BooleanContext, 0);
}
enterRule(listener) {
if (listener.enterBooleanLiteral) {
listener.enterBooleanLiteral(this);
}
}
exitRule(listener) {
if (listener.exitBooleanLiteral) {
listener.exitBooleanLiteral(this);
}
}
// @Override
accept(visitor) {
if (visitor.visitBooleanLiteral) {
return visitor.visitBooleanLiteral(this);
}
else {
return visitor.visitChildren(this);
}
}
}
export class NumberLiteralContext extends ValueContext {
constructor(parser, ctx) {
super(parser, ctx.parentCtx, ctx.invokingState);
super.copyFrom(ctx);
}
NUMBER() {
return this.getToken(OpraFilterParser.NUMBER, 0);
}
enterRule(listener) {
if (listener.enterNumberLiteral) {
listener.enterNumberLiteral(this);
}
}
exitRule(listener) {
if (listener.exitNumberLiteral) {
listener.exitNumberLiteral(this);
}
}
// @Override
accept(visitor) {
if (visitor.visitNumberLiteral) {
return visitor.visitNumberLiteral(this);
}
else {
return visitor.visitChildren(this);
}
}
}
export class QualifiedIdentifierContext extends ParserRuleContext {
constructor(parser, parent, invokingState) {
super(parent, invokingState);
this.parser = parser;
}
identifier_list() {
return this.getTypedRuleContexts(IdentifierContext);
}
identifier(i) {
return this.getTypedRuleContext(IdentifierContext, i);
}
get ruleIndex() {
return OpraFilterParser.RULE_qualifiedIdentifier;
}
enterRule(listener) {
if (listener.enterQualifiedIdentifier) {
listener.enterQualifiedIdentifier(this);
}
}
exitRule(listener) {
if (listener.exitQualifiedIdentifier) {
listener.exitQualifiedIdentifier(this);
}
}
// @Override
accept(visitor) {
if (visitor.visitQualifiedIdentifier) {
return visitor.visitQualifiedIdentifier(this);
}
else {
return visitor.visitChildren(this);
}
}
}
export class ExternalConstantContext extends ParserRuleContext {
constructor(parser, parent, invokingState) {
super(parent, invokingState);
this.parser = parser;
}
identifier() {
return this.getTypedRuleContext(IdentifierContext, 0);
}
get ruleIndex() {
return OpraFilterParser.RULE_externalConstant;
}
enterRule(listener) {
if (listener.enterExternalConstant) {
listener.enterExternalConstant(this);
}
}
exitRule(listener) {
if (listener.exitExternalConstant) {
listener.exitExternalConstant(this);
}
}
// @Override
accept(visitor) {
if (visitor.visitExternalConstant) {
return visitor.visitExternalConstant(this);
}
else {
return visitor.visitChildren(this);
}
}
}
export class IdentifierContext extends ParserRuleContext {
constructor(parser, parent, invokingState) {
super(parent, invokingState);
this.parser = parser;
}
IDENTIFIER() {
return this.getToken(OpraFilterParser.IDENTIFIER, 0);
}
get ruleIndex() {
return OpraFilterParser.RULE_identifier;
}
enterRule(listener) {
if (listener.enterIdentifier) {
listener.enterIdentifier(this);
}
}
exitRule(listener) {
if (listener.exitIdentifier) {
listener.exitIdentifier(this);
}
}
// @Override
accept(visitor) {
if (visitor.visitIdentifier) {
return visitor.visitIdentifier(this);
}
else {
return visitor.visitChildren(this);
}
}
}
export class ArrayValueContext extends ParserRuleContext {
constructor(parser, parent, invokingState) {
super(parent, invokingState);
this.parser = parser;
}
value_list() {
return this.getTypedRuleContexts(ValueContext);
}
value(i) {
return this.getTypedRuleContext(ValueContext, i);
}
get ruleIndex() {
return OpraFilterParser.RULE_arrayValue;
}
enterRule(listener) {
if (listener.enterArrayValue) {
listener.enterArrayValue(this);
}
}
exitRule(listener) {
if (listener.exitArrayValue) {
listener.exitArrayValue(this);
}
}
// @Ove