Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

54.8 KB
Raw Blame
// Generated from FilterQuery.g4 by ANTLR 4.13.2
// noinspection ES6UnusedImports,JSUnusedGlobalSymbols,JSUnusedLocalSymbols

import {
	ATN,
	ATNDeserializer, DecisionState, DFA, FailedPredicateException,
	RecognitionException, NoViableAltException, BailErrorStrategy,
	Parser, ParserATNSimulator,
	RuleContext, ParserRuleContext, PredictionMode, PredictionContextCache,
	TerminalNode, RuleNode,
	Token, TokenStream,
	Interval, IntervalSet
} from 'antlr4';
import FilterQueryListener from "./FilterQueryListener.js";
import FilterQueryVisitor from "./FilterQueryVisitor.js";

// for running tests with parameters, TODO: discuss strategy for typed parameters in CI
// eslint-disable-next-line no-unused-vars
type int = number;

export default class FilterQueryParser extends Parser {
	public static readonly LPAREN = 1;
	public static readonly RPAREN = 2;
	public static readonly LBRACK = 3;
	public static readonly RBRACK = 4;
	public static readonly COMMA = 5;
	public static readonly EQUALS = 6;
	public static readonly NOT_EQUALS = 7;
	public static readonly NEQ = 8;
	public static readonly LT = 9;
	public static readonly LE = 10;
	public static readonly GT = 11;
	public static readonly GE = 12;
	public static readonly LIKE = 13;
	public static readonly ILIKE = 14;
	public static readonly BETWEEN = 15;
	public static readonly EXISTS = 16;
	public static readonly REGEXP = 17;
	public static readonly CONTAINS = 18;
	public static readonly IN = 19;
	public static readonly NOT = 20;
	public static readonly AND = 21;
	public static readonly OR = 22;
	public static readonly HASTOKEN = 23;
	public static readonly HAS = 24;
	public static readonly HASANY = 25;
	public static readonly HASALL = 26;
	public static readonly SEARCH = 27;
	public static readonly BOOL = 28;
	public static readonly NUMBER = 29;
	public static readonly QUOTED_TEXT = 30;
	public static readonly KEY = 31;
	public static readonly WS = 32;
	public static readonly FREETEXT = 33;
	public static override readonly EOF = Token.EOF;
	public static readonly RULE_query = 0;
	public static readonly RULE_expression = 1;
	public static readonly RULE_orExpression = 2;
	public static readonly RULE_andExpression = 3;
	public static readonly RULE_unaryExpression = 4;
	public static readonly RULE_primary = 5;
	public static readonly RULE_comparison = 6;
	public static readonly RULE_inClause = 7;
	public static readonly RULE_notInClause = 8;
	public static readonly RULE_valueList = 9;
	public static readonly RULE_fullText = 10;
	public static readonly RULE_functionCall = 11;
	public static readonly RULE_searchCall = 12;
	public static readonly RULE_functionParamList = 13;
	public static readonly RULE_functionParam = 14;
	public static readonly RULE_array = 15;
	public static readonly RULE_value = 16;
	public static readonly RULE_key = 17;
	public static readonly literalNames: (string | null)[] = [ null, "'('", 
                                                            "')'", "'['", 
                                                            "']'", "','", 
                                                            null, "'!='", 
                                                            "'<>'", "'<'", 
                                                            "'<='", "'>'", 
                                                            "'>='" ];
	public static readonly symbolicNames: (string | null)[] = [ null, "LPAREN", 
                                                             "RPAREN", "LBRACK", 
                                                             "RBRACK", "COMMA", 
                                                             "EQUALS", "NOT_EQUALS", 
                                                             "NEQ", "LT", 
                                                             "LE", "GT", 
                                                             "GE", "LIKE", 
                                                             "ILIKE", "BETWEEN", 
                                                             "EXISTS", "REGEXP", 
                                                             "CONTAINS", 
                                                             "IN", "NOT", 
                                                             "AND", "OR", 
                                                             "HASTOKEN", 
                                                             "HAS", "HASANY", 
                                                             "HASALL", "SEARCH", 
                                                             "BOOL", "NUMBER", 
                                                             "QUOTED_TEXT", 
                                                             "KEY", "WS", 
                                                             "FREETEXT" ];
	// tslint:disable:no-trailing-whitespace
	public static readonly ruleNames: string[] = [
		"query", "expression", "orExpression", "andExpression", "unaryExpression", 
		"primary", "comparison", "inClause", "notInClause", "valueList", "fullText", 
		"functionCall", "searchCall", "functionParamList", "functionParam", "array", 
		"value", "key",
	];
	public get grammarFileName(): string { return "FilterQuery.g4"; }
	public get literalNames(): (string | null)[] { return FilterQueryParser.literalNames; }
	public get symbolicNames(): (string | null)[] { return FilterQueryParser.symbolicNames; }
	public get ruleNames(): string[] { return FilterQueryParser.ruleNames; }
	public get serializedATN(): number[] { return FilterQueryParser._serializedATN; }

	protected createFailedPredicateException(predicate?: string, message?: string): FailedPredicateException {
		return new FailedPredicateException(this, predicate, message);
	}

	constructor(input: TokenStream) {
		super(input);
		this._interp = new ParserATNSimulator(this, FilterQueryParser._ATN, FilterQueryParser.DecisionsToDFA, new PredictionContextCache());
	}
	// @RuleVersion(0)
	public query(): QueryContext {
		let localctx: QueryContext = new QueryContext(this, this._ctx, this.state);
		this.enterRule(localctx, 0, FilterQueryParser.RULE_query);
		try {
			this.enterOuterAlt(localctx, 1);
			{
			this.state = 36;
			this.expression();
			this.state = 37;
			this.match(FilterQueryParser.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)
	public expression(): ExpressionContext {
		let localctx: ExpressionContext = new ExpressionContext(this, this._ctx, this.state);
		this.enterRule(localctx, 2, FilterQueryParser.RULE_expression);
		try {
			this.enterOuterAlt(localctx, 1);
			{
			this.state = 39;
			this.orExpression();
			}
		}
		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)
	public orExpression(): OrExpressionContext {
		let localctx: OrExpressionContext = new OrExpressionContext(this, this._ctx, this.state);
		this.enterRule(localctx, 4, FilterQueryParser.RULE_orExpression);
		let _la: number;
		try {
			this.enterOuterAlt(localctx, 1);
			{
			this.state = 41;
			this.andExpression();
			this.state = 46;
			this._errHandler.sync(this);
			_la = this._input.LA(1);
			while (_la===22) {
				{
				{
				this.state = 42;
				this.match(FilterQueryParser.OR);
				this.state = 43;
				this.andExpression();
				}
				}
				this.state = 48;
				this._errHandler.sync(this);
				_la = this._input.LA(1);
			}
			}
		}
		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)
	public andExpression(): AndExpressionContext {
		let localctx: AndExpressionContext = new AndExpressionContext(this, this._ctx, this.state);
		this.enterRule(localctx, 6, FilterQueryParser.RULE_andExpression);
		let _la: number;
		try {
			this.enterOuterAlt(localctx, 1);
			{
			this.state = 49;
			this.unaryExpression();
			this.state = 55;
			this._errHandler.sync(this);
			_la = this._input.LA(1);
			while ((((_la) & ~0x1F) === 0 && ((1 << _la) & 4289724418) !== 0) || _la===33) {
				{
				this.state = 53;
				this._errHandler.sync(this);
				switch (this._input.LA(1)) {
				case 21:
					{
					this.state = 50;
					this.match(FilterQueryParser.AND);
					this.state = 51;
					this.unaryExpression();
					}
					break;
				case 1:
				case 20:
				case 23:
				case 24:
				case 25:
				case 26:
				case 27:
				case 28:
				case 29:
				case 30:
				case 31:
				case 33:
					{
					this.state = 52;
					this.unaryExpression();
					}
					break;
				default:
					throw new NoViableAltException(this);
				}
				}
				this.state = 57;
				this._errHandler.sync(this);
				_la = this._input.LA(1);
			}
			}
		}
		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)
	public unaryExpression(): UnaryExpressionContext {
		let localctx: UnaryExpressionContext = new UnaryExpressionContext(this, this._ctx, this.state);
		this.enterRule(localctx, 8, FilterQueryParser.RULE_unaryExpression);
		let _la: number;
		try {
			this.enterOuterAlt(localctx, 1);
			{
			this.state = 59;
			this._errHandler.sync(this);
			_la = this._input.LA(1);
			if (_la===20) {
				{
				this.state = 58;
				this.match(FilterQueryParser.NOT);
				}
			}

			this.state = 61;
			this.primary();
			}
		}
		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)
	public primary(): PrimaryContext {
		let localctx: PrimaryContext = new PrimaryContext(this, this._ctx, this.state);
		this.enterRule(localctx, 10, FilterQueryParser.RULE_primary);
		try {
			this.state = 73;
			this._errHandler.sync(this);
			switch ( this._interp.adaptivePredict(this._input, 4, this._ctx) ) {
			case 1:
				this.enterOuterAlt(localctx, 1);
				{
				this.state = 63;
				this.match(FilterQueryParser.LPAREN);
				this.state = 64;
				this.orExpression();
				this.state = 65;
				this.match(FilterQueryParser.RPAREN);
				}
				break;
			case 2:
				this.enterOuterAlt(localctx, 2);
				{
				this.state = 67;
				this.comparison();
				}
				break;
			case 3:
				this.enterOuterAlt(localctx, 3);
				{
				this.state = 68;
				this.functionCall();
				}
				break;
			case 4:
				this.enterOuterAlt(localctx, 4);
				{
				this.state = 69;
				this.searchCall();
				}
				break;
			case 5:
				this.enterOuterAlt(localctx, 5);
				{
				this.state = 70;
				this.fullText();
				}
				break;
			case 6:
				this.enterOuterAlt(localctx, 6);
				{
				this.state = 71;
				this.key();
				}
				break;
			case 7:
				this.enterOuterAlt(localctx, 7);
				{
				this.state = 72;
				this.value();
				}
				break;
			}
		}
		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)
	public comparison(): ComparisonContext {
		let localctx: ComparisonContext = new ComparisonContext(this, this._ctx, this.state);
		this.enterRule(localctx, 12, FilterQueryParser.RULE_comparison);
		let _la: number;
		try {
			this.state = 152;
			this._errHandler.sync(this);
			switch ( this._interp.adaptivePredict(this._input, 5, this._ctx) ) {
			case 1:
				this.enterOuterAlt(localctx, 1);
				{
				this.state = 75;
				this.key();
				this.state = 76;
				this.match(FilterQueryParser.EQUALS);
				this.state = 77;
				this.value();
				}
				break;
			case 2:
				this.enterOuterAlt(localctx, 2);
				{
				this.state = 79;
				this.key();
				this.state = 80;
				_la = this._input.LA(1);
				if(!(_la===7 || _la===8)) {
				this._errHandler.recoverInline(this);
				}
				else {
					this._errHandler.reportMatch(this);
				    this.consume();
				}
				this.state = 81;
				this.value();
				}
				break;
			case 3:
				this.enterOuterAlt(localctx, 3);
				{
				this.state = 83;
				this.key();
				this.state = 84;
				this.match(FilterQueryParser.LT);
				this.state = 85;
				this.value();
				}
				break;
			case 4:
				this.enterOuterAlt(localctx, 4);
				{
				this.state = 87;
				this.key();
				this.state = 88;
				this.match(FilterQueryParser.LE);
				this.state = 89;
				this.value();
				}
				break;
			case 5:
				this.enterOuterAlt(localctx, 5);
				{
				this.state = 91;
				this.key();
				this.state = 92;
				this.match(FilterQueryParser.GT);
				this.state = 93;
				this.value();
				}
				break;
			case 6:
				this.enterOuterAlt(localctx, 6);
				{
				this.state = 95;
				this.key();
				this.state = 96;
				this.match(FilterQueryParser.GE);
				this.state = 97;
				this.value();
				}
				break;
			case 7:
				this.enterOuterAlt(localctx, 7);
				{
				this.state = 99;
				this.key();
				this.state = 100;
				_la = this._input.LA(1);
				if(!(_la===13 || _la===14)) {
				this._errHandler.recoverInline(this);
				}
				else {
					this._errHandler.reportMatch(this);
				    this.consume();
				}
				this.state = 101;
				this.value();
				}
				break;
			case 8:
				this.enterOuterAlt(localctx, 8);
				{
				this.state = 103;
				this.key();
				this.state = 104;
				this.match(FilterQueryParser.NOT);
				this.state = 105;
				_la = this._input.LA(1);
				if(!(_la===13 || _la===14)) {
				this._errHandler.recoverInline(this);
				}
				else {
					this._errHandler.reportMatch(this);
				    this.consume();
				}
				this.state = 106;
				this.value();
				}
				break;
			case 9:
				this.enterOuterAlt(localctx, 9);
				{
				this.state = 108;
				this.key();
				this.state = 109;
				this.match(FilterQueryParser.BETWEEN);
				this.state = 110;
				this.value();
				this.state = 111;
				this.match(FilterQueryParser.AND);
				this.state = 112;
				this.value();
				}
				break;
			case 10:
				this.enterOuterAlt(localctx, 10);
				{
				this.state = 114;
				this.key();
				this.state = 115;
				this.match(FilterQueryParser.NOT);
				this.state = 116;
				this.match(FilterQueryParser.BETWEEN);
				this.state = 117;
				this.value();
				this.state = 118;
				this.match(FilterQueryParser.AND);
				this.state = 119;
				this.value();
				}
				break;
			case 11:
				this.enterOuterAlt(localctx, 11);
				{
				this.state = 121;
				this.key();
				this.state = 122;
				this.inClause();
				}
				break;
			case 12:
				this.enterOuterAlt(localctx, 12);
				{
				this.state = 124;
				this.key();
				this.state = 125;
				this.notInClause();
				}
				break;
			case 13:
				this.enterOuterAlt(localctx, 13);
				{
				this.state = 127;
				this.key();
				this.state = 128;
				this.match(FilterQueryParser.EXISTS);
				}
				break;
			case 14:
				this.enterOuterAlt(localctx, 14);
				{
				this.state = 130;
				this.key();
				this.state = 131;
				this.match(FilterQueryParser.NOT);
				this.state = 132;
				this.match(FilterQueryParser.EXISTS);
				}
				break;
			case 15:
				this.enterOuterAlt(localctx, 15);
				{
				this.state = 134;
				this.key();
				this.state = 135;
				this.match(FilterQueryParser.REGEXP);
				this.state = 136;
				this.value();
				}
				break;
			case 16:
				this.enterOuterAlt(localctx, 16);
				{
				this.state = 138;
				this.key();
				this.state = 139;
				this.match(FilterQueryParser.NOT);
				this.state = 140;
				this.match(FilterQueryParser.REGEXP);
				this.state = 141;
				this.value();
				}
				break;
			case 17:
				this.enterOuterAlt(localctx, 17);
				{
				this.state = 143;
				this.key();
				this.state = 144;
				this.match(FilterQueryParser.CONTAINS);
				this.state = 145;
				this.value();
				}
				break;
			case 18:
				this.enterOuterAlt(localctx, 18);
				{
				this.state = 147;
				this.key();
				this.state = 148;
				this.match(FilterQueryParser.NOT);
				this.state = 149;
				this.match(FilterQueryParser.CONTAINS);
				this.state = 150;
				this.value();
				}
				break;
			}
		}
		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)
	public inClause(): InClauseContext {
		let localctx: InClauseContext = new InClauseContext(this, this._ctx, this.state);
		this.enterRule(localctx, 14, FilterQueryParser.RULE_inClause);
		try {
			this.state = 166;
			this._errHandler.sync(this);
			switch ( this._interp.adaptivePredict(this._input, 6, this._ctx) ) {
			case 1:
				this.enterOuterAlt(localctx, 1);
				{
				this.state = 154;
				this.match(FilterQueryParser.IN);
				this.state = 155;
				this.match(FilterQueryParser.LPAREN);
				this.state = 156;
				this.valueList();
				this.state = 157;
				this.match(FilterQueryParser.RPAREN);
				}
				break;
			case 2:
				this.enterOuterAlt(localctx, 2);
				{
				this.state = 159;
				this.match(FilterQueryParser.IN);
				this.state = 160;
				this.match(FilterQueryParser.LBRACK);
				this.state = 161;
				this.valueList();
				this.state = 162;
				this.match(FilterQueryParser.RBRACK);
				}
				break;
			case 3:
				this.enterOuterAlt(localctx, 3);
				{
				this.state = 164;
				this.match(FilterQueryParser.IN);
				this.state = 165;
				this.value();
				}
				break;
			}
		}
		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)
	public notInClause(): NotInClauseContext {
		let localctx: NotInClauseContext = new NotInClauseContext(this, this._ctx, this.state);
		this.enterRule(localctx, 16, FilterQueryParser.RULE_notInClause);
		try {
			this.state = 183;
			this._errHandler.sync(this);
			switch ( this._interp.adaptivePredict(this._input, 7, this._ctx) ) {
			case 1:
				this.enterOuterAlt(localctx, 1);
				{
				this.state = 168;
				this.match(FilterQueryParser.NOT);
				this.state = 169;
				this.match(FilterQueryParser.IN);
				this.state = 170;
				this.match(FilterQueryParser.LPAREN);
				this.state = 171;
				this.valueList();
				this.state = 172;
				this.match(FilterQueryParser.RPAREN);
				}
				break;
			case 2:
				this.enterOuterAlt(localctx, 2);
				{
				this.state = 174;
				this.match(FilterQueryParser.NOT);
				this.state = 175;
				this.match(FilterQueryParser.IN);
				this.state = 176;
				this.match(FilterQueryParser.LBRACK);
				this.state = 177;
				this.valueList();
				this.state = 178;
				this.match(FilterQueryParser.RBRACK);
				}
				break;
			case 3:
				this.enterOuterAlt(localctx, 3);
				{
				this.state = 180;
				this.match(FilterQueryParser.NOT);
				this.state = 181;
				this.match(FilterQueryParser.IN);
				this.state = 182;
				this.value();
				}
				break;
			}
		}
		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)
	public valueList(): ValueListContext {
		let localctx: ValueListContext = new ValueListContext(this, this._ctx, this.state);
		this.enterRule(localctx, 18, FilterQueryParser.RULE_valueList);
		let _la: number;
		try {
			this.enterOuterAlt(localctx, 1);
			{
			this.state = 185;
			this.value();
			this.state = 190;
			this._errHandler.sync(this);
			_la = this._input.LA(1);
			while (_la===5) {
				{
				{
				this.state = 186;
				this.match(FilterQueryParser.COMMA);
				this.state = 187;
				this.value();
				}
				}
				this.state = 192;
				this._errHandler.sync(this);
				_la = this._input.LA(1);
			}
			}
		}
		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)
	public fullText(): FullTextContext {
		let localctx: FullTextContext = new FullTextContext(this, this._ctx, this.state);
		this.enterRule(localctx, 20, FilterQueryParser.RULE_fullText);
		let _la: number;
		try {
			this.enterOuterAlt(localctx, 1);
			{
			this.state = 193;
			_la = this._input.LA(1);
			if(!(_la===30 || _la===33)) {
			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)
	public functionCall(): FunctionCallContext {
		let localctx: FunctionCallContext = new FunctionCallContext(this, this._ctx, this.state);
		this.enterRule(localctx, 22, FilterQueryParser.RULE_functionCall);
		let _la: number;
		try {
			this.enterOuterAlt(localctx, 1);
			{
			this.state = 195;
			_la = this._input.LA(1);
			if(!((((_la) & ~0x1F) === 0 && ((1 << _la) & 125829120) !== 0))) {
			this._errHandler.recoverInline(this);
			}
			else {
				this._errHandler.reportMatch(this);
			    this.consume();
			}
			this.state = 196;
			this.match(FilterQueryParser.LPAREN);
			this.state = 197;
			this.functionParamList();
			this.state = 198;
			this.match(FilterQueryParser.RPAREN);
			}
		}
		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)
	public searchCall(): SearchCallContext {
		let localctx: SearchCallContext = new SearchCallContext(this, this._ctx, this.state);
		this.enterRule(localctx, 24, FilterQueryParser.RULE_searchCall);
		try {
			this.enterOuterAlt(localctx, 1);
			{
			this.state = 200;
			this.match(FilterQueryParser.SEARCH);
			this.state = 201;
			this.match(FilterQueryParser.LPAREN);
			this.state = 202;
			this.valueList();
			this.state = 203;
			this.match(FilterQueryParser.RPAREN);
			}
		}
		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)
	public functionParamList(): FunctionParamListContext {
		let localctx: FunctionParamListContext = new FunctionParamListContext(this, this._ctx, this.state);
		this.enterRule(localctx, 26, FilterQueryParser.RULE_functionParamList);
		let _la: number;
		try {
			this.enterOuterAlt(localctx, 1);
			{
			this.state = 205;
			this.functionParam();
			this.state = 210;
			this._errHandler.sync(this);
			_la = this._input.LA(1);
			while (_la===5) {
				{
				{
				this.state = 206;
				this.match(FilterQueryParser.COMMA);
				this.state = 207;
				this.functionParam();
				}
				}
				this.state = 212;
				this._errHandler.sync(this);
				_la = this._input.LA(1);
			}
			}
		}
		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)
	public functionParam(): FunctionParamContext {
		let localctx: FunctionParamContext = new FunctionParamContext(this, this._ctx, this.state);
		this.enterRule(localctx, 28, FilterQueryParser.RULE_functionParam);
		try {
			this.state = 216;
			this._errHandler.sync(this);
			switch ( this._interp.adaptivePredict(this._input, 10, this._ctx) ) {
			case 1:
				this.enterOuterAlt(localctx, 1);
				{
				this.state = 213;
				this.key();
				}
				break;
			case 2:
				this.enterOuterAlt(localctx, 2);
				{
				this.state = 214;
				this.value();
				}
				break;
			case 3:
				this.enterOuterAlt(localctx, 3);
				{
				this.state = 215;
				this.array();
				}
				break;
			}
		}
		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)
	public array(): ArrayContext {
		let localctx: ArrayContext = new ArrayContext(this, this._ctx, this.state);
		this.enterRule(localctx, 30, FilterQueryParser.RULE_array);
		try {
			this.enterOuterAlt(localctx, 1);
			{
			this.state = 218;
			this.match(FilterQueryParser.LBRACK);
			this.state = 219;
			this.valueList();
			this.state = 220;
			this.match(FilterQueryParser.RBRACK);
			}
		}
		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)
	public value(): ValueContext {
		let localctx: ValueContext = new ValueContext(this, this._ctx, this.state);
		this.enterRule(localctx, 32, FilterQueryParser.RULE_value);
		let _la: number;
		try {
			this.enterOuterAlt(localctx, 1);
			{
			this.state = 222;
			_la = this._input.LA(1);
			if(!((((_la) & ~0x1F) === 0 && ((1 << _la) & 4026531840) !== 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)
	public key(): KeyContext {
		let localctx: KeyContext = new KeyContext(this, this._ctx, this.state);
		this.enterRule(localctx, 34, FilterQueryParser.RULE_key);
		try {
			this.enterOuterAlt(localctx, 1);
			{
			this.state = 224;
			this.match(FilterQueryParser.KEY);
			}
		}
		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;
	}

	public static readonly _serializedATN: number[] = [4,1,33,227,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,1,0,1,0,1,0,1,1,1,1,1,2,1,2,1,2,5,2,45,8,2,10,2,12,2,48,9,2,1,3,1,
	3,1,3,1,3,5,3,54,8,3,10,3,12,3,57,9,3,1,4,3,4,60,8,4,1,4,1,4,1,5,1,5,1,
	5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,3,5,74,8,5,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,
	6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,
	6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,
	6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,
	6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,3,6,153,8,
	6,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,167,8,7,1,8,1,8,1,
	8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,3,8,184,8,8,1,9,1,9,1,
	9,5,9,189,8,9,10,9,12,9,192,9,9,1,10,1,10,1,11,1,11,1,11,1,11,1,11,1,12,
	1,12,1,12,1,12,1,12,1,13,1,13,1,13,5,13,209,8,13,10,13,12,13,212,9,13,1,
	14,1,14,1,14,3,14,217,8,14,1,15,1,15,1,15,1,15,1,16,1,16,1,17,1,17,1,17,
	0,0,18,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,0,5,1,0,7,8,1,0,
	13,14,2,0,30,30,33,33,1,0,23,26,1,0,28,31,243,0,36,1,0,0,0,2,39,1,0,0,0,
	4,41,1,0,0,0,6,49,1,0,0,0,8,59,1,0,0,0,10,73,1,0,0,0,12,152,1,0,0,0,14,
	166,1,0,0,0,16,183,1,0,0,0,18,185,1,0,0,0,20,193,1,0,0,0,22,195,1,0,0,0,
	24,200,1,0,0,0,26,205,1,0,0,0,28,216,1,0,0,0,30,218,1,0,0,0,32,222,1,0,
	0,0,34,224,1,0,0,0,36,37,3,2,1,0,37,38,5,0,0,1,38,1,1,0,0,0,39,40,3,4,2,
	0,40,3,1,0,0,0,41,46,3,6,3,0,42,43,5,22,0,0,43,45,3,6,3,0,44,42,1,0,0,0,
	45,48,1,0,0,0,46,44,1,0,0,0,46,47,1,0,0,0,47,5,1,0,0,0,48,46,1,0,0,0,49,
	55,3,8,4,0,50,51,5,21,0,0,51,54,3,8,4,0,52,54,3,8,4,0,53,50,1,0,0,0,53,
	52,1,0,0,0,54,57,1,0,0,0,55,53,1,0,0,0,55,56,1,0,0,0,56,7,1,0,0,0,57,55,
	1,0,0,0,58,60,5,20,0,0,59,58,1,0,0,0,59,60,1,0,0,0,60,61,1,0,0,0,61,62,
	3,10,5,0,62,9,1,0,0,0,63,64,5,1,0,0,64,65,3,4,2,0,65,66,5,2,0,0,66,74,1,
	0,0,0,67,74,3,12,6,0,68,74,3,22,11,0,69,74,3,24,12,0,70,74,3,20,10,0,71,
	74,3,34,17,0,72,74,3,32,16,0,73,63,1,0,0,0,73,67,1,0,0,0,73,68,1,0,0,0,
	73,69,1,0,0,0,73,70,1,0,0,0,73,71,1,0,0,0,73,72,1,0,0,0,74,11,1,0,0,0,75,
	76,3,34,17,0,76,77,5,6,0,0,77,78,3,32,16,0,78,153,1,0,0,0,79,80,3,34,17,
	0,80,81,7,0,0,0,81,82,3,32,16,0,82,153,1,0,0,0,83,84,3,34,17,0,84,85,5,
	9,0,0,85,86,3,32,16,0,86,153,1,0,0,0,87,88,3,34,17,0,88,89,5,10,0,0,89,
	90,3,32,16,0,90,153,1,0,0,0,91,92,3,34,17,0,92,93,5,11,0,0,93,94,3,32,16,
	0,94,153,1,0,0,0,95,96,3,34,17,0,96,97,5,12,0,0,97,98,3,32,16,0,98,153,
	1,0,0,0,99,100,3,34,17,0,100,101,7,1,0,0,101,102,3,32,16,0,102,153,1,0,
	0,0,103,104,3,34,17,0,104,105,5,20,0,0,105,106,7,1,0,0,106,107,3,32,16,
	0,107,153,1,0,0,0,108,109,3,34,17,0,109,110,5,15,0,0,110,111,3,32,16,0,
	111,112,5,21,0,0,112,113,3,32,16,0,113,153,1,0,0,0,114,115,3,34,17,0,115,
	116,5,20,0,0,116,117,5,15,0,0,117,118,3,32,16,0,118,119,5,21,0,0,119,120,
	3,32,16,0,120,153,1,0,0,0,121,122,3,34,17,0,122,123,3,14,7,0,123,153,1,
	0,0,0,124,125,3,34,17,0,125,126,3,16,8,0,126,153,1,0,0,0,127,128,3,34,17,
	0,128,129,5,16,0,0,129,153,1,0,0,0,130,131,3,34,17,0,131,132,5,20,0,0,132,
	133,5,16,0,0,133,153,1,0,0,0,134,135,3,34,17,0,135,136,5,17,0,0,136,137,
	3,32,16,0,137,153,1,0,0,0,138,139,3,34,17,0,139,140,5,20,0,0,140,141,5,
	17,0,0,141,142,3,32,16,0,142,153,1,0,0,0,143,144,3,34,17,0,144,145,5,18,
	0,0,145,146,3,32,16,0,146,153,1,0,0,0,147,148,3,34,17,0,148,149,5,20,0,
	0,149,150,5,18,0,0,150,151,3,32,16,0,151,153,1,0,0,0,152,75,1,0,0,0,152,
	79,1,0,0,0,152,83,1,0,0,0,152,87,1,0,0,0,152,91,1,0,0,0,152,95,1,0,0,0,
	152,99,1,0,0,0,152,103,1,0,0,0,152,108,1,0,0,0,152,114,1,0,0,0,152,121,
	1,0,0,0,152,124,1,0,0,0,152,127,1,0,0,0,152,130,1,0,0,0,152,134,1,0,0,0,
	152,138,1,0,0,0,152,143,1,0,0,0,152,147,1,0,0,0,153,13,1,0,0,0,154,155,
	5,19,0,0,155,156,5,1,0,0,156,157,3,18,9,0,157,158,5,2,0,0,158,167,1,0,0,
	0,159,160,5,19,0,0,160,161,5,3,0,0,161,162,3,18,9,0,162,163,5,4,0,0,163,
	167,1,0,0,0,164,165,5,19,0,0,165,167,3,32,16,0,166,154,1,0,0,0,166,159,
	1,0,0,0,166,164,1,0,0,0,167,15,1,0,0,0,168,169,5,20,0,0,169,170,5,19,0,
	0,170,171,5,1,0,0,171,172,3,18,9,0,172,173,5,2,0,0,173,184,1,0,0,0,174,
	175,5,20,0,0,175,176,5,19,0,0,176,177,5,3,0,0,177,178,3,18,9,0,178,179,
	5,4,0,0,179,184,1,0,0,0,180,181,5,20,0,0,181,182,5,19,0,0,182,184,3,32,
	16,0,183,168,1,0,0,0,183,174,1,0,0,0,183,180,1,0,0,0,184,17,1,0,0,0,185,
	190,3,32,16,0,186,187,5,5,0,0,187,189,3,32,16,0,188,186,1,0,0,0,189,192,
	1,0,0,0,190,188,1,0,0,0,190,191,1,0,0,0,191,19,1,0,0,0,192,190,1,0,0,0,
	193,194,7,2,0,0,194,21,1,0,0,0,195,196,7,3,0,0,196,197,5,1,0,0,197,198,
	3,26,13,0,198,199,5,2,0,0,199,23,1,0,0,0,200,201,5,27,0,0,201,202,5,1,0,
	0,202,203,3,18,9,0,203,204,5,2,0,0,204,25,1,0,0,0,205,210,3,28,14,0,206,
	207,5,5,0,0,207,209,3,28,14,0,208,206,1,0,0,0,209,212,1,0,0,0,210,208,1,
	0,0,0,210,211,1,0,0,0,211,27,1,0,0,0,212,210,1,0,0,0,213,217,3,34,17,0,
	214,217,3,32,16,0,215,217,3,30,15,0,216,213,1,0,0,0,216,214,1,0,0,0,216,
	215,1,0,0,0,217,29,1,0,0,0,218,219,5,3,0,0,219,220,3,18,9,0,220,221,5,4,
	0,0,221,31,1,0,0,0,222,223,7,4,0,0,223,33,1,0,0,0,224,225,5,31,0,0,225,
	35,1,0,0,0,11,46,53,55,59,73,152,166,183,190,210,216];

	private static __ATN: ATN;
	public static get _ATN(): ATN {
		if (!FilterQueryParser.__ATN) {
			FilterQueryParser.__ATN = new ATNDeserializer().deserialize(FilterQueryParser._serializedATN);
		}

		return FilterQueryParser.__ATN;
	}


	static DecisionsToDFA = FilterQueryParser._ATN.decisionToState.map( (ds: DecisionState, index: number) => new DFA(ds, index) );

}

export class QueryContext extends ParserRuleContext {
	constructor(parser?: FilterQueryParser, parent?: ParserRuleContext, invokingState?: number) {
		super(parent, invokingState);
    	this.parser = parser;
	}
	public expression(): ExpressionContext {
		return this.getTypedRuleContext(ExpressionContext, 0) as ExpressionContext;
	}
	public EOF(): TerminalNode {
		return this.getToken(FilterQueryParser.EOF, 0);
	}
    public get ruleIndex(): number {
    	return FilterQueryParser.RULE_query;
	}
	public enterRule(listener: FilterQueryListener): void {
	    if(listener.enterQuery) {
	 		listener.enterQuery(this);
		}
	}
	public exitRule(listener: FilterQueryListener): void {
	    if(listener.exitQuery) {
	 		listener.exitQuery(this);
		}
	}
	// @Override
	public accept<Result>(visitor: FilterQueryVisitor<Result>): Result {
		if (visitor.visitQuery) {
			return visitor.visitQuery(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class ExpressionContext extends ParserRuleContext {
	constructor(parser?: FilterQueryParser, parent?: ParserRuleContext, invokingState?: number) {
		super(parent, invokingState);
    	this.parser = parser;
	}
	public orExpression(): OrExpressionContext {
		return this.getTypedRuleContext(OrExpressionContext, 0) as OrExpressionContext;
	}
    public get ruleIndex(): number {
    	return FilterQueryParser.RULE_expression;
	}
	public enterRule(listener: FilterQueryListener): void {
	    if(listener.enterExpression) {
	 		listener.enterExpression(this);
		}
	}
	public exitRule(listener: FilterQueryListener): void {
	    if(listener.exitExpression) {
	 		listener.exitExpression(this);
		}
	}
	// @Override
	public accept<Result>(visitor: FilterQueryVisitor<Result>): Result {
		if (visitor.visitExpression) {
			return visitor.visitExpression(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class OrExpressionContext extends ParserRuleContext {
	constructor(parser?: FilterQueryParser, parent?: ParserRuleContext, invokingState?: number) {
		super(parent, invokingState);
    	this.parser = parser;
	}
	public andExpression_list(): AndExpressionContext[] {
		return this.getTypedRuleContexts(AndExpressionContext) as AndExpressionContext[];
	}
	public andExpression(i: number): AndExpressionContext {
		return this.getTypedRuleContext(AndExpressionContext, i) as AndExpressionContext;
	}
	public OR_list(): TerminalNode[] {
	    	return this.getTokens(FilterQueryParser.OR);
	}
	public OR(i: number): TerminalNode {
		return this.getToken(FilterQueryParser.OR, i);
	}
    public get ruleIndex(): number {
    	return FilterQueryParser.RULE_orExpression;
	}
	public enterRule(listener: FilterQueryListener): void {
	    if(listener.enterOrExpression) {
	 		listener.enterOrExpression(this);
		}
	}
	public exitRule(listener: FilterQueryListener): void {
	    if(listener.exitOrExpression) {
	 		listener.exitOrExpression(this);
		}
	}
	// @Override
	public accept<Result>(visitor: FilterQueryVisitor<Result>): Result {
		if (visitor.visitOrExpression) {
			return visitor.visitOrExpression(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class AndExpressionContext extends ParserRuleContext {
	constructor(parser?: FilterQueryParser, parent?: ParserRuleContext, invokingState?: number) {
		super(parent, invokingState);
    	this.parser = parser;
	}
	public unaryExpression_list(): UnaryExpressionContext[] {
		return this.getTypedRuleContexts(UnaryExpressionContext) as UnaryExpressionContext[];
	}
	public unaryExpression(i: number): UnaryExpressionContext {
		return this.getTypedRuleContext(UnaryExpressionContext, i) as UnaryExpressionContext;
	}
	public AND_list(): TerminalNode[] {
	    	return this.getTokens(FilterQueryParser.AND);
	}
	public AND(i: number): TerminalNode {
		return this.getToken(FilterQueryParser.AND, i);
	}
    public get ruleIndex(): number {
    	return FilterQueryParser.RULE_andExpression;
	}
	public enterRule(listener: FilterQueryListener): void {
	    if(listener.enterAndExpression) {
	 		listener.enterAndExpression(this);
		}
	}
	public exitRule(listener: FilterQueryListener): void {
	    if(listener.exitAndExpression) {
	 		listener.exitAndExpression(this);
		}
	}
	// @Override
	public accept<Result>(visitor: FilterQueryVisitor<Result>): Result {
		if (visitor.visitAndExpression) {
			return visitor.visitAndExpression(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class UnaryExpressionContext extends ParserRuleContext {
	constructor(parser?: FilterQueryParser, parent?: ParserRuleContext, invokingState?: number) {
		super(parent, invokingState);
    	this.parser = parser;
	}
	public primary(): PrimaryContext {
		return this.getTypedRuleContext(PrimaryContext, 0) as PrimaryContext;
	}
	public NOT(): TerminalNode {
		return this.getToken(FilterQueryParser.NOT, 0);
	}
    public get ruleIndex(): number {
    	return FilterQueryParser.RULE_unaryExpression;
	}
	public enterRule(listener: FilterQueryListener): void {
	    if(listener.enterUnaryExpression) {
	 		listener.enterUnaryExpression(this);
		}
	}
	public exitRule(listener: FilterQueryListener): void {
	    if(listener.exitUnaryExpression) {
	 		listener.exitUnaryExpression(this);
		}
	}
	// @Override
	public accept<Result>(visitor: FilterQueryVisitor<Result>): Result {
		if (visitor.visitUnaryExpression) {
			return visitor.visitUnaryExpression(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class PrimaryContext extends ParserRuleContext {
	constructor(parser?: FilterQueryParser, parent?: ParserRuleContext, invokingState?: number) {
		super(parent, invokingState);
    	this.parser = parser;
	}
	public LPAREN(): TerminalNode {
		return this.getToken(FilterQueryParser.LPAREN, 0);
	}
	public orExpression(): OrExpressionContext {
		return this.getTypedRuleContext(OrExpressionContext, 0) as OrExpressionContext;
	}
	public RPAREN(): TerminalNode {
		return this.getToken(FilterQueryParser.RPAREN, 0);
	}
	public comparison(): ComparisonContext {
		return this.getTypedRuleContext(ComparisonContext, 0) as ComparisonContext;
	}
	public functionCall(): FunctionCallContext {
		return this.getTypedRuleContext(FunctionCallContext, 0) as FunctionCallContext;
	}
	public searchCall(): SearchCallContext {
		return this.getTypedRuleContext(SearchCallContext, 0) as SearchCallContext;
	}
	public fullText(): FullTextContext {
		return this.getTypedRuleContext(FullTextContext, 0) as FullTextContext;
	}
	public key(): KeyContext {
		return this.getTypedRuleContext(KeyContext, 0) as KeyContext;
	}
	public value(): ValueContext {
		return this.getTypedRuleContext(ValueContext, 0) as ValueContext;
	}
    public get ruleIndex(): number {
    	return FilterQueryParser.RULE_primary;
	}
	public enterRule(listener: FilterQueryListener): void {
	    if(listener.enterPrimary) {
	 		listener.enterPrimary(this);
		}
	}
	public exitRule(listener: FilterQueryListener): void {
	    if(listener.exitPrimary) {
	 		listener.exitPrimary(this);
		}
	}
	// @Override
	public accept<Result>(visitor: FilterQueryVisitor<Result>): Result {
		if (visitor.visitPrimary) {
			return visitor.visitPrimary(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class ComparisonContext extends ParserRuleContext {
	constructor(parser?: FilterQueryParser, parent?: ParserRuleContext, invokingState?: number) {
		super(parent, invokingState);
    	this.parser = parser;
	}
	public key(): KeyContext {
		return this.getTypedRuleContext(KeyContext, 0) as KeyContext;
	}
	public EQUALS(): TerminalNode {
		return this.getToken(FilterQueryParser.EQUALS, 0);
	}
	public value_list(): ValueContext[] {
		return this.getTypedRuleContexts(ValueContext) as ValueContext[];
	}
	public value(i: number): ValueContext {
		return this.getTypedRuleContext(ValueContext, i) as ValueContext;
	}
	public NOT_EQUALS(): TerminalNode {
		return this.getToken(FilterQueryParser.NOT_EQUALS, 0);
	}
	public NEQ(): TerminalNode {
		return this.getToken(FilterQueryParser.NEQ, 0);
	}
	public LT(): TerminalNode {
		return this.getToken(FilterQueryParser.LT, 0);
	}
	public LE(): TerminalNode {
		return this.getToken(FilterQueryParser.LE, 0);
	}
	public GT(): TerminalNode {
		return this.getToken(FilterQueryParser.GT, 0);
	}
	public GE(): TerminalNode {
		return this.getToken(FilterQueryParser.GE, 0);
	}
	public LIKE(): TerminalNode {
		return this.getToken(FilterQueryParser.LIKE, 0);
	}
	public ILIKE(): TerminalNode {
		return this.getToken(FilterQueryParser.ILIKE, 0);
	}
	public NOT(): TerminalNode {
		return this.getToken(FilterQueryParser.NOT, 0);
	}
	public BETWEEN(): TerminalNode {
		return this.getToken(FilterQueryParser.BETWEEN, 0);
	}
	public AND(): TerminalNode {
		return this.getToken(FilterQueryParser.AND, 0);
	}
	public inClause(): InClauseContext {
		return this.getTypedRuleContext(InClauseContext, 0) as InClauseContext;
	}
	public notInClause(): NotInClauseContext {
		return this.getTypedRuleContext(NotInClauseContext, 0) as NotInClauseContext;
	}
	public EXISTS(): TerminalNode {
		return this.getToken(FilterQueryParser.EXISTS, 0);
	}
	public REGEXP(): TerminalNode {
		return this.getToken(FilterQueryParser.REGEXP, 0);
	}
	public CONTAINS(): TerminalNode {
		return this.getToken(FilterQueryParser.CONTAINS, 0);
	}
    public get ruleIndex(): number {
    	return FilterQueryParser.RULE_comparison;
	}
	public enterRule(listener: FilterQueryListener): void {
	    if(listener.enterComparison) {
	 		listener.enterComparison(this);
		}
	}
	public exitRule(listener: FilterQueryListener): void {
	    if(listener.exitComparison) {
	 		listener.exitComparison(this);
		}
	}
	// @Override
	public accept<Result>(visitor: FilterQueryVisitor<Result>): Result {
		if (visitor.visitComparison) {
			return visitor.visitComparison(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class InClauseContext extends ParserRuleContext {
	constructor(parser?: FilterQueryParser, parent?: ParserRuleContext, invokingState?: number) {
		super(parent, invokingState);
    	this.parser = parser;
	}
	public IN(): TerminalNode {
		return this.getToken(FilterQueryParser.IN, 0);
	}
	public LPAREN(): TerminalNode {
		return this.getToken(FilterQueryParser.LPAREN, 0);
	}
	public valueList(): ValueListContext {
		return this.getTypedRuleContext(ValueListContext, 0) as ValueListContext;
	}
	public RPAREN(): TerminalNode {
		return this.getToken(FilterQueryParser.RPAREN, 0);
	}
	public LBRACK(): TerminalNode {
		return this.getToken(FilterQueryParser.LBRACK, 0);
	}
	public RBRACK(): TerminalNode {
		return this.getToken(FilterQueryParser.RBRACK, 0);
	}
	public value(): ValueContext {
		return this.getTypedRuleContext(ValueContext, 0) as ValueContext;
	}
    public get ruleIndex(): number {
    	return FilterQueryParser.RULE_inClause;
	}
	public enterRule(listener: FilterQueryListener): void {
	    if(listener.enterInClause) {
	 		listener.enterInClause(this);
		}
	}
	public exitRule(listener: FilterQueryListener): void {
	    if(listener.exitInClause) {
	 		listener.exitInClause(this);
		}
	}
	// @Override
	public accept<Result>(visitor: FilterQueryVisitor<Result>): Result {
		if (visitor.visitInClause) {
			return visitor.visitInClause(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class NotInClauseContext extends ParserRuleContext {
	constructor(parser?: FilterQueryParser, parent?: ParserRuleContext, invokingState?: number) {
		super(parent, invokingState);
    	this.parser = parser;
	}
	public NOT(): TerminalNode {
		return this.getToken(FilterQueryParser.NOT, 0);
	}
	public IN(): TerminalNode {
		return this.getToken(FilterQueryParser.IN, 0);
	}
	public LPAREN(): TerminalNode {
		return this.getToken(FilterQueryParser.LPAREN, 0);
	}
	public valueList(): ValueListContext {
		return this.getTypedRuleContext(ValueListContext, 0) as ValueListContext;
	}
	public RPAREN(): TerminalNode {
		return this.getToken(FilterQueryParser.RPAREN, 0);
	}
	public LBRACK(): TerminalNode {
		return this.getToken(FilterQueryParser.LBRACK, 0);
	}
	public RBRACK(): TerminalNode {
		return this.getToken(FilterQueryParser.RBRACK, 0);
	}
	public value(): ValueContext {
		return this.getTypedRuleContext(ValueContext, 0) as ValueContext;
	}
    public get ruleIndex(): number {
    	return FilterQueryParser.RULE_notInClause;
	}
	public enterRule(listener: FilterQueryListener): void {
	    if(listener.enterNotInClause) {
	 		listener.enterNotInClause(this);
		}
	}
	public exitRule(listener: FilterQueryListener): void {
	    if(listener.exitNotInClause) {
	 		listener.exitNotInClause(this);
		}
	}
	// @Override
	public accept<Result>(visitor: FilterQueryVisitor<Result>): Result {
		if (visitor.visitNotInClause) {
			return visitor.visitNotInClause(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class ValueListContext extends ParserRuleContext {
	constructor(parser?: FilterQueryParser, parent?: ParserRuleContext, invokingState?: number) {
		super(parent, invokingState);
    	this.parser = parser;
	}
	public value_list(): ValueContext[] {
		return this.getTypedRuleContexts(ValueContext) as ValueContext[];
	}
	public value(i: number): ValueContext {
		return this.getTypedRuleContext(ValueContext, i) as ValueContext;
	}
	public COMMA_list(): TerminalNode[] {
	    	return this.getTokens(FilterQueryParser.COMMA);
	}
	public COMMA(i: number): TerminalNode {
		return this.getToken(FilterQueryParser.COMMA, i);
	}
    public get ruleIndex(): number {
    	return FilterQueryParser.RULE_valueList;
	}
	public enterRule(listener: FilterQueryListener): void {
	    if(listener.enterValueList) {
	 		listener.enterValueList(this);
		}
	}
	public exitRule(listener: FilterQueryListener): void {
	    if(listener.exitValueList) {
	 		listener.exitValueList(this);
		}
	}
	// @Override
	public accept<Result>(visitor: FilterQueryVisitor<Result>): Result {
		if (visitor.visitValueList) {
			return visitor.visitValueList(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class FullTextContext extends ParserRuleContext {
	constructor(parser?: FilterQueryParser, parent?: ParserRuleContext, invokingState?: number) {
		super(parent, invokingState);
    	this.parser = parser;
	}
	public QUOTED_TEXT(): TerminalNode {
		return this.getToken(FilterQueryParser.QUOTED_TEXT, 0);
	}
	public FREETEXT(): TerminalNode {
		return this.getToken(FilterQueryParser.FREETEXT, 0);
	}
    public get ruleIndex(): number {
    	return FilterQueryParser.RULE_fullText;
	}
	public enterRule(listener: FilterQueryListener): void {
	    if(listener.enterFullText) {
	 		listener.enterFullText(this);
		}
	}
	public exitRule(listener: FilterQueryListener): void {
	    if(listener.exitFullText) {
	 		listener.exitFullText(this);
		}
	}
	// @Override
	public accept<Result>(visitor: FilterQueryVisitor<Result>): Result {
		if (visitor.visitFullText) {
			return visitor.visitFullText(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class FunctionCallContext extends ParserRuleContext {
	constructor(parser?: FilterQueryParser, parent?: ParserRuleContext, invokingState?: number) {
		super(parent, invokingState);
    	this.parser = parser;
	}
	public LPAREN(): TerminalNode {
		return this.getToken(FilterQueryParser.LPAREN, 0);
	}
	public functionParamList(): FunctionParamListContext {
		return this.getTypedRuleContext(FunctionParamListContext, 0) as FunctionParamListContext;
	}
	public RPAREN(): TerminalNode {
		return this.getToken(FilterQueryParser.RPAREN, 0);
	}
	public HASTOKEN(): TerminalNode {
		return this.getToken(FilterQueryParser.HASTOKEN, 0);
	}
	public HAS(): TerminalNode {
		return this.getToken(FilterQueryParser.HAS, 0);
	}
	public HASANY(): TerminalNode {
		return this.getToken(FilterQueryParser.HASANY, 0);
	}
	public HASALL(): TerminalNode {
		return this.getToken(FilterQueryParser.HASALL, 0);
	}
    public get ruleIndex(): number {
    	return FilterQueryParser.RULE_functionCall;
	}
	public enterRule(listener: FilterQueryListener): void {
	    if(listener.enterFunctionCall) {
	 		listener.enterFunctionCall(this);
		}
	}
	public exitRule(listener: FilterQueryListener): void {
	    if(listener.exitFunctionCall) {
	 		listener.exitFunctionCall(this);
		}
	}
	// @Override
	public accept<Result>(visitor: FilterQueryVisitor<Result>): Result {
		if (visitor.visitFunctionCall) {
			return visitor.visitFunctionCall(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class SearchCallContext extends ParserRuleContext {
	constructor(parser?: FilterQueryParser, parent?: ParserRuleContext, invokingState?: number) {
		super(parent, invokingState);
    	this.parser = parser;
	}
	public SEARCH(): TerminalNode {
		return this.getToken(FilterQueryParser.SEARCH, 0);
	}
	public LPAREN(): TerminalNode {
		return this.getToken(FilterQueryParser.LPAREN, 0);
	}
	public valueList(): ValueListContext {
		return this.getTypedRuleContext(ValueListContext, 0) as ValueListContext;
	}
	public RPAREN(): TerminalNode {
		return this.getToken(FilterQueryParser.RPAREN, 0);
	}
    public get ruleIndex(): number {
    	return FilterQueryParser.RULE_searchCall;
	}
	public enterRule(listener: FilterQueryListener): void {
	    if(listener.enterSearchCall) {
	 		listener.enterSearchCall(this);
		}
	}
	public exitRule(listener: FilterQueryListener): void {
	    if(listener.exitSearchCall) {
	 		listener.exitSearchCall(this);
		}
	}
	// @Override
	public accept<Result>(visitor: FilterQueryVisitor<Result>): Result {
		if (visitor.visitSearchCall) {
			return visitor.visitSearchCall(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class FunctionParamListContext extends ParserRuleContext {
	constructor(parser?: FilterQueryParser, parent?: ParserRuleContext, invokingState?: number) {
		super(parent, invokingState);
    	this.parser = parser;
	}
	public functionParam_list(): FunctionParamContext[] {
		return this.getTypedRuleContexts(FunctionParamContext) as FunctionParamContext[];
	}
	public functionParam(i: number): FunctionParamContext {
		return this.getTypedRuleContext(FunctionParamContext, i) as FunctionParamContext;
	}
	public COMMA_list(): TerminalNode[] {
	    	return this.getTokens(FilterQueryParser.COMMA);
	}
	public COMMA(i: number): TerminalNode {
		return this.getToken(FilterQueryParser.COMMA, i);
	}
    public get ruleIndex(): number {
    	return FilterQueryParser.RULE_functionParamList;
	}
	public enterRule(listener: FilterQueryListener): void {
	    if(listener.enterFunctionParamList) {
	 		listener.enterFunctionParamList(this);
		}
	}
	public exitRule(listener: FilterQueryListener): void {
	    if(listener.exitFunctionParamList) {
	 		listener.exitFunctionParamList(this);
		}
	}
	// @Override
	public accept<Result>(visitor: FilterQueryVisitor<Result>): Result {
		if (visitor.visitFunctionParamList) {
			return visitor.visitFunctionParamList(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class FunctionParamContext extends ParserRuleContext {
	constructor(parser?: FilterQueryParser, parent?: ParserRuleContext, invokingState?: number) {
		super(parent, invokingState);
    	this.parser = parser;
	}
	public key(): KeyContext {
		return this.getTypedRuleContext(KeyContext, 0) as KeyContext;
	}
	public value(): ValueContext {
		return this.getTypedRuleContext(ValueContext, 0) as ValueContext;
	}
	public array(): ArrayContext {
		return this.getTypedRuleContext(ArrayContext, 0) as ArrayContext;
	}
    public get ruleIndex(): number {
    	return FilterQueryParser.RULE_functionParam;
	}
	public enterRule(listener: FilterQueryListener): void {
	    if(listener.enterFunctionParam) {
	 		listener.enterFunctionParam(this);
		}
	}
	public exitRule(listener: FilterQueryListener): void {
	    if(listener.exitFunctionParam) {
	 		listener.exitFunctionParam(this);
		}
	}
	// @Override
	public accept<Result>(visitor: FilterQueryVisitor<Result>): Result {
		if (visitor.visitFunctionParam) {
			return visitor.visitFunctionParam(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class ArrayContext extends ParserRuleContext {
	constructor(parser?: FilterQueryParser, parent?: ParserRuleContext, invokingState?: number) {
		super(parent, invokingState);
    	this.parser = parser;
	}
	public LBRACK(): TerminalNode {
		return this.getToken(FilterQueryParser.LBRACK, 0);
	}
	public valueList(): ValueListContext {
		return this.getTypedRuleContext(ValueListContext, 0) as ValueListContext;
	}
	public RBRACK(): TerminalNode {
		return this.getToken(FilterQueryParser.RBRACK, 0);
	}
    public get ruleIndex(): number {
    	return FilterQueryParser.RULE_array;
	}
	public enterRule(listener: FilterQueryListener): void {
	    if(listener.enterArray) {
	 		listener.enterArray(this);
		}
	}
	public exitRule(listener: FilterQueryListener): void {
	    if(listener.exitArray) {
	 		listener.exitArray(this);
		}
	}
	// @Override
	public accept<Result>(visitor: FilterQueryVisitor<Result>): Result {
		if (visitor.visitArray) {
			return visitor.visitArray(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class ValueContext extends ParserRuleContext {
	constructor(parser?: FilterQueryParser, parent?: ParserRuleContext, invokingState?: number) {
		super(parent, invokingState);
    	this.parser = parser;
	}
	public QUOTED_TEXT(): TerminalNode {
		return this.getToken(FilterQueryParser.QUOTED_TEXT, 0);
	}
	public NUMBER(): TerminalNode {
		return this.getToken(FilterQueryParser.NUMBER, 0);
	}
	public BOOL(): TerminalNode {
		return this.getToken(FilterQueryParser.BOOL, 0);
	}
	public KEY(): TerminalNode {
		return this.getToken(FilterQueryParser.KEY, 0);
	}
    public get ruleIndex(): number {
    	return FilterQueryParser.RULE_value;
	}
	public enterRule(listener: FilterQueryListener): void {
	    if(listener.enterValue) {
	 		listener.enterValue(this);
		}
	}
	public exitRule(listener: FilterQueryListener): void {
	    if(listener.exitValue) {
	 		listener.exitValue(this);
		}
	}
	// @Override
	public accept<Result>(visitor: FilterQueryVisitor<Result>): Result {
		if (visitor.visitValue) {
			return visitor.visitValue(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class KeyContext extends ParserRuleContext {
	constructor(parser?: FilterQueryParser, parent?: ParserRuleContext, invokingState?: number) {
		super(parent, invokingState);
    	this.parser = parser;
	}
	public KEY(): TerminalNode {
		return this.getToken(FilterQueryParser.KEY, 0);
	}
    public get ruleIndex(): number {
    	return FilterQueryParser.RULE_key;
	}
	public enterRule(listener: FilterQueryListener): void {
	    if(listener.enterKey) {
	 		listener.enterKey(this);
		}
	}
	public exitRule(listener: FilterQueryListener): void {
	    if(listener.exitKey) {
	 		listener.exitKey(this);
		}
	}
	// @Override
	public accept<Result>(visitor: FilterQueryVisitor<Result>): Result {
		if (visitor.visitKey) {
			return visitor.visitKey(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}