@atlassianlabs/jql-parser
Version:
JQL lexer, parser, listener and visitor
1,841 lines (1,457 loc) • 164 kB
JavaScript
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
var _typeof = require("@babel/runtime/helpers/typeof").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.JqlSearchSortContext = exports.JqlOrderByContext = exports.JqlPredicateOperandContext = exports.JqlValuePredicateOperatorContext = exports.JqlUserPredicateOperatorContext = exports.JqlDateRangePredicateOperatorContext = exports.JqlDatePredicateOperatorContext = exports.JqlChangedPredicateContext = exports.JqlWasPredicateContext = exports.JqlArgumentContext = exports.JqlPropertyArgumentContext = exports.JqlListEndContext = exports.JqlListStartContext = exports.JqlListContext = exports.JqlArgumentListContext = exports.JqlFunctionNameContext = exports.JqlFunctionContext = exports.JqlValueContext = exports.JqlEmptyContext = exports.JqlOperandContext = exports.JqlNumberContext = exports.JqlStringContext = exports.JqlCustomFieldContext = exports.JqlFieldPropertyContext = exports.JqlNonNumberFieldContext = exports.JqlNumberFieldContext = exports.JqlFieldContext = exports.JqlChangedOperatorContext = exports.JqlWasInOperatorContext = exports.JqlWasOperatorContext = exports.JqlIsOperatorContext = exports.JqlInOperatorContext = exports.JqlComparisonOperatorContext = exports.JqlLikeOperatorContext = exports.JqlEqualsOperatorContext = exports.JqlChangedClauseContext = exports.JqlWasInClauseContext = exports.JqlWasClauseContext = exports.JqlIsClauseContext = exports.JqlInClauseContext = exports.JqlComparisonClauseContext = exports.JqlLikeClauseContext = exports.JqlEqualsClauseContext = exports.JqlTerminalClauseRhsContext = exports.JqlTerminalClauseContext = exports.JqlSubClauseContext = exports.JqlNotClauseContext = exports.JqlAndClauseContext = exports.JqlOrClauseContext = exports.JqlWhereContext = exports.JqlQueryContext = exports.JQLParser = void 0;
var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _ATNDeserializer = require("antlr4ts/atn/ATNDeserializer");
var _NoViableAltException = require("antlr4ts/NoViableAltException");
var _Parser2 = require("antlr4ts/Parser");
var _ParserRuleContext42 = require("antlr4ts/ParserRuleContext");
var _ParserATNSimulator = require("antlr4ts/atn/ParserATNSimulator");
var _RecognitionException = require("antlr4ts/RecognitionException");
var _Token = require("antlr4ts/Token");
var _VocabularyImpl = require("antlr4ts/VocabularyImpl");
var Utils = _interopRequireWildcard(require("antlr4ts/misc/Utils"));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
// Generated from JQLParser.g4 by ANTLR 4.7.3-SNAPSHOT
var JQLParser = /*#__PURE__*/function (_Parser) {
(0, _inherits2.default)(JQLParser, _Parser);
var _super = (0, _createSuper2.default)(JQLParser);
function JQLParser(input) {
var _this;
(0, _classCallCheck2.default)(this, JQLParser);
_this = _super.call(this, input);
_this._interp = new _ParserATNSimulator.ParserATNSimulator(JQLParser._ATN, (0, _assertThisInitialized2.default)(_this));
return _this;
} // @RuleVersion(0)
(0, _createClass2.default)(JQLParser, [{
key: "vocabulary",
get: // tslint:disable:no-trailing-whitespace
// @Override
// @NotNull
function get() {
return JQLParser.VOCABULARY;
} // tslint:enable:no-trailing-whitespace
// @Override
}, {
key: "grammarFileName",
get: function get() {
return 'JQLParser.g4';
} // @Override
}, {
key: "ruleNames",
get: function get() {
return JQLParser.ruleNames;
} // @Override
}, {
key: "serializedATN",
get: function get() {
return JQLParser._serializedATN;
}
}, {
key: "jqlQuery",
value: function jqlQuery() {
var _localctx = new JqlQueryContext(this._ctx, this.state);
this.enterRule(_localctx, 0, JQLParser.RULE_jqlQuery);
var _la;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 83;
this._errHandler.sync(this);
_la = this._input.LA(1);
if ((_la & ~0x1f) === 0 && (1 << _la & (1 << JQLParser.LPAREN | 1 << JQLParser.BANG | 1 << JQLParser.NOT)) !== 0 || (_la - 33 & ~0x1f) === 0 && (1 << _la - 33 & (1 << JQLParser.POSNUMBER - 33 | 1 << JQLParser.NEGNUMBER - 33 | 1 << JQLParser.CUSTOMFIELD - 33 | 1 << JQLParser.STRING - 33 | 1 << JQLParser.QUOTE_STRING - 33 | 1 << JQLParser.SQUOTE_STRING - 33)) !== 0) {
{
this.state = 82;
this.jqlWhere();
}
}
this.state = 86;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (_la === JQLParser.ORDER) {
{
this.state = 85;
this.jqlOrderBy();
}
}
this.state = 88;
this.match(JQLParser.EOF);
}
} catch (re) {
if (re instanceof _RecognitionException.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return _localctx;
} // @RuleVersion(0)
}, {
key: "jqlWhere",
value: function jqlWhere() {
var _localctx = new JqlWhereContext(this._ctx, this.state);
this.enterRule(_localctx, 2, JQLParser.RULE_jqlWhere);
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 90;
this.jqlOrClause();
}
} catch (re) {
if (re instanceof _RecognitionException.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return _localctx;
} // @RuleVersion(0)
}, {
key: "jqlOrClause",
value: function jqlOrClause() {
var _localctx = new JqlOrClauseContext(this._ctx, this.state);
this.enterRule(_localctx, 4, JQLParser.RULE_jqlOrClause);
var _la;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 92;
this.jqlAndClause();
this.state = 97;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === JQLParser.OR) {
{
{
this.state = 93;
this.match(JQLParser.OR);
this.state = 94;
this.jqlAndClause();
}
}
this.state = 99;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
}
} catch (re) {
if (re instanceof _RecognitionException.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return _localctx;
} // @RuleVersion(0)
}, {
key: "jqlAndClause",
value: function jqlAndClause() {
var _localctx = new JqlAndClauseContext(this._ctx, this.state);
this.enterRule(_localctx, 6, JQLParser.RULE_jqlAndClause);
var _la;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 100;
this.jqlNotClause();
this.state = 105;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === JQLParser.AND) {
{
{
this.state = 101;
this.match(JQLParser.AND);
this.state = 102;
this.jqlNotClause();
}
}
this.state = 107;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
}
} catch (re) {
if (re instanceof _RecognitionException.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return _localctx;
} // @RuleVersion(0)
}, {
key: "jqlNotClause",
value: function jqlNotClause() {
var _localctx = new JqlNotClauseContext(this._ctx, this.state);
this.enterRule(_localctx, 8, JQLParser.RULE_jqlNotClause);
var _la;
try {
this.state = 112;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case JQLParser.BANG:
case JQLParser.NOT:
this.enterOuterAlt(_localctx, 1);
{
this.state = 108;
_la = this._input.LA(1);
if (!(_la === JQLParser.BANG || _la === JQLParser.NOT)) {
this._errHandler.recoverInline(this);
} else {
if (this._input.LA(1) === _Token.Token.EOF) {
this.matchedEOF = true;
}
this._errHandler.reportMatch(this);
this.consume();
}
this.state = 109;
this.jqlNotClause();
}
break;
case JQLParser.LPAREN:
this.enterOuterAlt(_localctx, 2);
{
this.state = 110;
this.jqlSubClause();
}
break;
case JQLParser.POSNUMBER:
case JQLParser.NEGNUMBER:
case JQLParser.CUSTOMFIELD:
case JQLParser.STRING:
case JQLParser.QUOTE_STRING:
case JQLParser.SQUOTE_STRING:
this.enterOuterAlt(_localctx, 3);
{
this.state = 111;
this.jqlTerminalClause();
}
break;
default:
throw new _NoViableAltException.NoViableAltException(this);
}
} catch (re) {
if (re instanceof _RecognitionException.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return _localctx;
} // @RuleVersion(0)
}, {
key: "jqlSubClause",
value: function jqlSubClause() {
var _localctx = new JqlSubClauseContext(this._ctx, this.state);
this.enterRule(_localctx, 10, JQLParser.RULE_jqlSubClause);
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 114;
this.match(JQLParser.LPAREN);
this.state = 115;
this.jqlOrClause();
this.state = 116;
this.match(JQLParser.RPAREN);
}
} catch (re) {
if (re instanceof _RecognitionException.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return _localctx;
} // @RuleVersion(0)
}, {
key: "jqlTerminalClause",
value: function jqlTerminalClause() {
var _localctx = new JqlTerminalClauseContext(this._ctx, this.state);
this.enterRule(_localctx, 12, JQLParser.RULE_jqlTerminalClause);
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 118;
this.jqlField();
this.state = 119;
this.jqlTerminalClauseRhs();
}
} catch (re) {
if (re instanceof _RecognitionException.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return _localctx;
} // @RuleVersion(0)
}, {
key: "jqlTerminalClauseRhs",
value: function jqlTerminalClauseRhs() {
var _localctx = new JqlTerminalClauseRhsContext(this._ctx, this.state);
this.enterRule(_localctx, 14, JQLParser.RULE_jqlTerminalClauseRhs);
var _la;
try {
this.state = 176;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 14, this._ctx)) {
case 1:
_localctx = new JqlEqualsClauseContext(_localctx);
this.enterOuterAlt(_localctx, 1);
{
this.state = 121;
this.jqlEqualsOperator();
this.state = 125;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 5, this._ctx)) {
case 1:
{
this.state = 122;
this.jqlEmpty();
}
break;
case 2:
{
this.state = 123;
this.jqlValue();
}
break;
case 3:
{
this.state = 124;
this.jqlFunction();
}
break;
}
}
break;
case 2:
_localctx = new JqlLikeClauseContext(_localctx);
this.enterOuterAlt(_localctx, 2);
{
this.state = 127;
this.jqlLikeOperator();
this.state = 131;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 6, this._ctx)) {
case 1:
{
this.state = 128;
this.jqlEmpty();
}
break;
case 2:
{
this.state = 129;
this.jqlValue();
}
break;
case 3:
{
this.state = 130;
this.jqlFunction();
}
break;
}
}
break;
case 3:
_localctx = new JqlComparisonClauseContext(_localctx);
this.enterOuterAlt(_localctx, 3);
{
this.state = 133;
this.jqlComparisonOperator();
this.state = 136;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 7, this._ctx)) {
case 1:
{
this.state = 134;
this.jqlValue();
}
break;
case 2:
{
this.state = 135;
this.jqlFunction();
}
break;
}
}
break;
case 4:
_localctx = new JqlInClauseContext(_localctx);
this.enterOuterAlt(_localctx, 4);
{
this.state = 138;
this.jqlInOperator();
this.state = 141;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case JQLParser.LPAREN:
{
this.state = 139;
this.jqlList();
}
break;
case JQLParser.POSNUMBER:
case JQLParser.NEGNUMBER:
case JQLParser.STRING:
case JQLParser.QUOTE_STRING:
case JQLParser.SQUOTE_STRING:
{
this.state = 140;
this.jqlFunction();
}
break;
default:
throw new _NoViableAltException.NoViableAltException(this);
}
}
break;
case 5:
_localctx = new JqlIsClauseContext(_localctx);
this.enterOuterAlt(_localctx, 5);
{
this.state = 143;
this.jqlIsOperator();
this.state = 144;
this.jqlEmpty();
}
break;
case 6:
_localctx = new JqlWasClauseContext(_localctx);
this.enterOuterAlt(_localctx, 6);
{
this.state = 146;
this.jqlWasOperator();
this.state = 150;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 9, this._ctx)) {
case 1:
{
this.state = 147;
this.jqlEmpty();
}
break;
case 2:
{
this.state = 148;
this.jqlValue();
}
break;
case 3:
{
this.state = 149;
this.jqlFunction();
}
break;
}
this.state = 155;
this._errHandler.sync(this);
_la = this._input.LA(1);
while ((_la & ~0x1f) === 0 && (1 << _la & (1 << JQLParser.BEFORE | 1 << JQLParser.AFTER | 1 << JQLParser.ON | 1 << JQLParser.DURING | 1 << JQLParser.BY)) !== 0) {
{
{
this.state = 152;
this.jqlWasPredicate();
}
}
this.state = 157;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
}
break;
case 7:
_localctx = new JqlWasInClauseContext(_localctx);
this.enterOuterAlt(_localctx, 7);
{
this.state = 158;
this.jqlWasInOperator();
this.state = 161;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case JQLParser.LPAREN:
{
this.state = 159;
this.jqlList();
}
break;
case JQLParser.POSNUMBER:
case JQLParser.NEGNUMBER:
case JQLParser.STRING:
case JQLParser.QUOTE_STRING:
case JQLParser.SQUOTE_STRING:
{
this.state = 160;
this.jqlFunction();
}
break;
default:
throw new _NoViableAltException.NoViableAltException(this);
}
this.state = 166;
this._errHandler.sync(this);
_la = this._input.LA(1);
while ((_la & ~0x1f) === 0 && (1 << _la & (1 << JQLParser.BEFORE | 1 << JQLParser.AFTER | 1 << JQLParser.ON | 1 << JQLParser.DURING | 1 << JQLParser.BY)) !== 0) {
{
{
this.state = 163;
this.jqlWasPredicate();
}
}
this.state = 168;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
}
break;
case 8:
_localctx = new JqlChangedClauseContext(_localctx);
this.enterOuterAlt(_localctx, 8);
{
this.state = 169;
this.jqlChangedOperator();
this.state = 173;
this._errHandler.sync(this);
_la = this._input.LA(1);
while ((_la & ~0x1f) === 0 && (1 << _la & (1 << JQLParser.BEFORE | 1 << JQLParser.AFTER | 1 << JQLParser.FROM | 1 << JQLParser.TO | 1 << JQLParser.ON | 1 << JQLParser.DURING | 1 << JQLParser.BY)) !== 0) {
{
{
this.state = 170;
this.jqlChangedPredicate();
}
}
this.state = 175;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
}
break;
}
} catch (re) {
if (re instanceof _RecognitionException.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return _localctx;
} // @RuleVersion(0)
}, {
key: "jqlEqualsOperator",
value: function jqlEqualsOperator() {
var _localctx = new JqlEqualsOperatorContext(this._ctx, this.state);
this.enterRule(_localctx, 16, JQLParser.RULE_jqlEqualsOperator);
var _la;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 178;
_la = this._input.LA(1);
if (!(_la === JQLParser.EQUALS || _la === JQLParser.NOT_EQUALS)) {
this._errHandler.recoverInline(this);
} else {
if (this._input.LA(1) === _Token.Token.EOF) {
this.matchedEOF = true;
}
this._errHandler.reportMatch(this);
this.consume();
}
}
} catch (re) {
if (re instanceof _RecognitionException.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return _localctx;
} // @RuleVersion(0)
}, {
key: "jqlLikeOperator",
value: function jqlLikeOperator() {
var _localctx = new JqlLikeOperatorContext(this._ctx, this.state);
this.enterRule(_localctx, 18, JQLParser.RULE_jqlLikeOperator);
var _la;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 180;
_la = this._input.LA(1);
if (!(_la === JQLParser.LIKE || _la === JQLParser.NOT_LIKE)) {
this._errHandler.recoverInline(this);
} else {
if (this._input.LA(1) === _Token.Token.EOF) {
this.matchedEOF = true;
}
this._errHandler.reportMatch(this);
this.consume();
}
}
} catch (re) {
if (re instanceof _RecognitionException.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return _localctx;
} // @RuleVersion(0)
}, {
key: "jqlComparisonOperator",
value: function jqlComparisonOperator() {
var _localctx = new JqlComparisonOperatorContext(this._ctx, this.state);
this.enterRule(_localctx, 20, JQLParser.RULE_jqlComparisonOperator);
var _la;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 182;
_la = this._input.LA(1);
if (!((_la & ~0x1f) === 0 && (1 << _la & (1 << JQLParser.LT | 1 << JQLParser.GT | 1 << JQLParser.GTEQ | 1 << JQLParser.LTEQ)) !== 0)) {
this._errHandler.recoverInline(this);
} else {
if (this._input.LA(1) === _Token.Token.EOF) {
this.matchedEOF = true;
}
this._errHandler.reportMatch(this);
this.consume();
}
}
} catch (re) {
if (re instanceof _RecognitionException.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return _localctx;
} // @RuleVersion(0)
}, {
key: "jqlInOperator",
value: function jqlInOperator() {
var _localctx = new JqlInOperatorContext(this._ctx, this.state);
this.enterRule(_localctx, 22, JQLParser.RULE_jqlInOperator);
try {
this.state = 187;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case JQLParser.IN:
this.enterOuterAlt(_localctx, 1);
{
this.state = 184;
this.match(JQLParser.IN);
}
break;
case JQLParser.NOT:
this.enterOuterAlt(_localctx, 2);
{
this.state = 185;
this.match(JQLParser.NOT);
this.state = 186;
this.match(JQLParser.IN);
}
break;
default:
throw new _NoViableAltException.NoViableAltException(this);
}
} catch (re) {
if (re instanceof _RecognitionException.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return _localctx;
} // @RuleVersion(0)
}, {
key: "jqlIsOperator",
value: function jqlIsOperator() {
var _localctx = new JqlIsOperatorContext(this._ctx, this.state);
this.enterRule(_localctx, 24, JQLParser.RULE_jqlIsOperator);
try {
this.state = 192;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 16, this._ctx)) {
case 1:
this.enterOuterAlt(_localctx, 1);
{
this.state = 189;
this.match(JQLParser.IS);
}
break;
case 2:
this.enterOuterAlt(_localctx, 2);
{
this.state = 190;
this.match(JQLParser.IS);
this.state = 191;
this.match(JQLParser.NOT);
}
break;
}
} catch (re) {
if (re instanceof _RecognitionException.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return _localctx;
} // @RuleVersion(0)
}, {
key: "jqlWasOperator",
value: function jqlWasOperator() {
var _localctx = new JqlWasOperatorContext(this._ctx, this.state);
this.enterRule(_localctx, 26, JQLParser.RULE_jqlWasOperator);
try {
this.state = 197;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 17, this._ctx)) {
case 1:
this.enterOuterAlt(_localctx, 1);
{
this.state = 194;
this.match(JQLParser.WAS);
}
break;
case 2:
this.enterOuterAlt(_localctx, 2);
{
this.state = 195;
this.match(JQLParser.WAS);
this.state = 196;
this.match(JQLParser.NOT);
}
break;
}
} catch (re) {
if (re instanceof _RecognitionException.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return _localctx;
} // @RuleVersion(0)
}, {
key: "jqlWasInOperator",
value: function jqlWasInOperator() {
var _localctx = new JqlWasInOperatorContext(this._ctx, this.state);
this.enterRule(_localctx, 28, JQLParser.RULE_jqlWasInOperator);
try {
this.state = 204;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 18, this._ctx)) {
case 1:
this.enterOuterAlt(_localctx, 1);
{
this.state = 199;
this.match(JQLParser.WAS);
this.state = 200;
this.match(JQLParser.IN);
}
break;
case 2:
this.enterOuterAlt(_localctx, 2);
{
this.state = 201;
this.match(JQLParser.WAS);
this.state = 202;
this.match(JQLParser.NOT);
this.state = 203;
this.match(JQLParser.IN);
}
break;
}
} catch (re) {
if (re instanceof _RecognitionException.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return _localctx;
} // @RuleVersion(0)
}, {
key: "jqlChangedOperator",
value: function jqlChangedOperator() {
var _localctx = new JqlChangedOperatorContext(this._ctx, this.state);
this.enterRule(_localctx, 30, JQLParser.RULE_jqlChangedOperator);
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 206;
this.match(JQLParser.CHANGED);
}
} catch (re) {
if (re instanceof _RecognitionException.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return _localctx;
} // @RuleVersion(0)
}, {
key: "jqlField",
value: function jqlField() {
var _localctx = new JqlFieldContext(this._ctx, this.state);
this.enterRule(_localctx, 32, JQLParser.RULE_jqlField);
var _la;
try {
this.state = 219;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case JQLParser.POSNUMBER:
case JQLParser.NEGNUMBER:
_localctx = new JqlNumberFieldContext(_localctx);
this.enterOuterAlt(_localctx, 1);
{
this.state = 208;
this.jqlNumber();
}
break;
case JQLParser.CUSTOMFIELD:
case JQLParser.STRING:
case JQLParser.QUOTE_STRING:
case JQLParser.SQUOTE_STRING:
_localctx = new JqlNonNumberFieldContext(_localctx);
this.enterOuterAlt(_localctx, 2);
{
{
this.state = 211;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case JQLParser.STRING:
case JQLParser.QUOTE_STRING:
case JQLParser.SQUOTE_STRING:
{
this.state = 209;
this.jqlString();
}
break;
case JQLParser.CUSTOMFIELD:
{
this.state = 210;
this.jqlCustomField();
}
break;
default:
throw new _NoViableAltException.NoViableAltException(this);
}
this.state = 216;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === JQLParser.LBRACKET) {
{
{
this.state = 213;
this.jqlFieldProperty();
}
}
this.state = 218;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
}
}
break;
default:
throw new _NoViableAltException.NoViableAltException(this);
}
} catch (re) {
if (re instanceof _RecognitionException.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return _localctx;
} // @RuleVersion(0)
}, {
key: "jqlFieldProperty",
value: function jqlFieldProperty() {
var _localctx = new JqlFieldPropertyContext(this._ctx, this.state);
this.enterRule(_localctx, 34, JQLParser.RULE_jqlFieldProperty);
var _la;
try {
this.enterOuterAlt(_localctx, 1);
{
{
this.state = 221;
this.match(JQLParser.LBRACKET);
{
this.state = 222;
this.jqlArgument();
}
this.state = 223;
this.match(JQLParser.RBRACKET);
}
this.state = 228;
this._errHandler.sync(this);
_la = this._input.LA(1);
while ((_la - 33 & ~0x1f) === 0 && (1 << _la - 33 & (1 << JQLParser.POSNUMBER - 33 | 1 << JQLParser.NEGNUMBER - 33 | 1 << JQLParser.STRING - 33 | 1 << JQLParser.QUOTE_STRING - 33 | 1 << JQLParser.SQUOTE_STRING - 33)) !== 0) {
{
{
this.state = 225;
this.jqlPropertyArgument();
}
}
this.state = 230;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
}
} catch (re) {
if (re instanceof _RecognitionException.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return _localctx;
} // @RuleVersion(0)
}, {
key: "jqlCustomField",
value: function jqlCustomField() {
var _localctx = new JqlCustomFieldContext(this._ctx, this.state);
this.enterRule(_localctx, 36, JQLParser.RULE_jqlCustomField);
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 231;
this.match(JQLParser.CUSTOMFIELD);
this.state = 232;
this.match(JQLParser.LBRACKET);
this.state = 233;
this.match(JQLParser.POSNUMBER);
this.state = 234;
this.match(JQLParser.RBRACKET);
}
} catch (re) {
if (re instanceof _RecognitionException.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return _localctx;
} // @RuleVersion(0)
}, {
key: "jqlString",
value: function jqlString() {
var _localctx = new JqlStringContext(this._ctx, this.state);
this.enterRule(_localctx, 38, JQLParser.RULE_jqlString);
var _la;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 236;
_la = this._input.LA(1);
if (!((_la - 37 & ~0x1f) === 0 && (1 << _la - 37 & (1 << JQLParser.STRING - 37 | 1 << JQLParser.QUOTE_STRING - 37 | 1 << JQLParser.SQUOTE_STRING - 37)) !== 0)) {
this._errHandler.recoverInline(this);
} else {
if (this._input.LA(1) === _Token.Token.EOF) {
this.matchedEOF = true;
}
this._errHandler.reportMatch(this);
this.consume();
}
}
} catch (re) {
if (re instanceof _RecognitionException.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return _localctx;
} // @RuleVersion(0)
}, {
key: "jqlNumber",
value: function jqlNumber() {
var _localctx = new JqlNumberContext(this._ctx, this.state);
this.enterRule(_localctx, 40, JQLParser.RULE_jqlNumber);
var _la;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 238;
_localctx._jqlNum = this._input.LT(1);
_la = this._input.LA(1);
if (!(_la === JQLParser.POSNUMBER || _la === JQLParser.NEGNUMBER)) {
_localctx._jqlNum = this._errHandler.recoverInline(this);
} else {
if (this._input.LA(1) === _Token.Token.EOF) {
this.matchedEOF = true;
}
this._errHandler.reportMatch(this);
this.consume();
}
}
} catch (re) {
if (re instanceof _RecognitionException.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return _localctx;
} // @RuleVersion(0)
}, {
key: "jqlOperand",
value: function jqlOperand() {
var _localctx = new JqlOperandContext(this._ctx, this.state);
this.enterRule(_localctx, 42, JQLParser.RULE_jqlOperand);
try {
this.state = 244;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 23, this._ctx)) {
case 1:
this.enterOuterAlt(_localctx, 1);
{
this.state = 240;
this.jqlEmpty();
}
break;
case 2:
this.enterOuterAlt(_localctx, 2);
{
this.state = 241;
this.jqlValue();
}
break;
case 3:
this.enterOuterAlt(_localctx, 3);
{
this.state = 242;
this.jqlFunction();
}
break;
case 4:
this.enterOuterAlt(_localctx, 4);
{
this.state = 243;
this.jqlList();
}
break;
}
} catch (re) {
if (re instanceof _RecognitionException.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return _localctx;
} // @RuleVersion(0)
}, {
key: "jqlEmpty",
value: function jqlEmpty() {
var _localctx = new JqlEmptyContext(this._ctx, this.state);
this.enterRule(_localctx, 44, JQLParser.RULE_jqlEmpty);
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 246;
this.match(JQLParser.EMPTY);
}
} catch (re) {
if (re instanceof _RecognitionException.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return _localctx;
} // @RuleVersion(0)
}, {
key: "jqlValue",
value: function jqlValue() {
var _localctx = new JqlValueContext(this._ctx, this.state);
this.enterRule(_localctx, 46, JQLParser.RULE_jqlValue);
try {
this.state = 250;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case JQLParser.STRING:
case JQLParser.QUOTE_STRING:
case JQLParser.SQUOTE_STRING:
this.enterOuterAlt(_localctx, 1);
{
this.state = 248;
this.jqlString();
}
break;
case JQLParser.POSNUMBER:
case JQLParser.NEGNUMBER:
this.enterOuterAlt(_localctx, 2);
{
this.state = 249;
this.jqlNumber();
}
break;
default:
throw new _NoViableAltException.NoViableAltException(this);
}
} catch (re) {
if (re instanceof _RecognitionException.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return _localctx;
} // @RuleVersion(0)
}, {
key: "jqlFunction",
value: function jqlFunction() {
var _localctx = new JqlFunctionContext(this._ctx, this.state);
this.enterRule(_localctx, 48, JQLParser.RULE_jqlFunction);
var _la;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 252;
this.jqlFunctionName();
this.state = 253;
this.match(JQLParser.LPAREN);
this.state = 255;
this._errHandler.sync(this);
_la = this._input.LA(1);
if ((_la - 33 & ~0x1f) === 0 && (1 << _la - 33 & (1 << JQLParser.POSNUMBER - 33 | 1 << JQLParser.NEGNUMBER - 33 | 1 << JQLParser.STRING - 33 | 1 << JQLParser.QUOTE_STRING - 33 | 1 << JQLParser.SQUOTE_STRING - 33)) !== 0) {
{
this.state = 254;
this.jqlArgumentList();
}
}
this.state = 257;
this.match(JQLParser.RPAREN);
}
} catch (re) {
if (re instanceof _RecognitionException.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return _localctx;
} // @RuleVersion(0)
}, {
key: "jqlFunctionName",
value: function jqlFunctionName() {
var _localctx = new JqlFunctionNameContext(this._ctx, this.state);
this.enterRule(_localctx, 50, JQLParser.RULE_jqlFunctionName);
try {
this.state = 261;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case JQLParser.STRING:
case JQLParser.QUOTE_STRING:
case JQLParser.SQUOTE_STRING:
this.enterOuterAlt(_localctx, 1);
{
this.state = 259;
this.jqlString();
}
break;
case JQLParser.POSNUMBER:
case JQLParser.NEGNUMBER:
this.enterOuterAlt(_localctx, 2);
{
this.state = 260;
this.jqlNumber();
}
break;
default:
throw new _NoViableAltException.NoViableAltException(this);
}
} catch (re) {
if (re instanceof _RecognitionException.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return _localctx;
} // @RuleVersion(0)
}, {
key: "jqlArgumentList",
value: function jqlArgumentList() {
var _localctx = new JqlArgumentListContext(this._ctx, this.state);
this.enterRule(_localctx, 52, JQLParser.RULE_jqlArgumentList);
var _la;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 263;
this.jqlArgument();
this.state = 268;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === JQLParser.COMMA) {
{
{
this.state = 264;
this.match(JQLParser.COMMA);
this.state = 265;
this.jqlArgument();
}
}
this.state = 270;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
}
} catch (re) {
if (re instanceof _RecognitionException.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return _localctx;
} // @RuleVersion(0)
}, {
key: "jqlList",
value: function jqlList() {
var _localctx = new JqlListContext(this._ctx, this.state);
this.enterRule(_localctx, 54, JQLParser.RULE_jqlList);
var _la;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 271;
this.jqlListStart();
this.state = 272;
this.jqlOperand();
this.state = 277;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === JQLParser.COMMA) {
{
{
this.state = 273;
this.match(JQLParser.COMMA);
this.state = 274;
this.jqlOperand();
}
}
this.state = 279;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 280;
this.jqlListEnd();
}
} catch (re) {
if (re instanceof _RecognitionException.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return _localctx;
} // @RuleVersion(0)
}, {
key: "jqlListStart",
value: function jqlListStart() {
var _localctx = new JqlListStartContext(this._ctx, this.state);
this.enterRule(_localctx, 56, JQLParser.RULE_jqlListStart);
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 282;
this.match(JQLParser.LPAREN);
}
} catch (re) {
if (re instanceof _RecognitionException.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return _localctx;
} // @RuleVersion(0)
}, {
key: "jqlListEnd",
value: function jqlListEnd() {
var _localctx = new JqlListEndContext(this._ctx, this.state);
this.enterRule(_localctx, 58, JQLParser.RULE_jqlListEnd);
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 284;
this.match(JQLParser.RPAREN);
}
} catch (re) {
if (re instanceof _RecognitionException.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return _localctx;
} // @RuleVersion(0)
}, {
key: "jqlPropertyArgument",
value: function jqlPropertyArgument() {
var _localctx = new JqlPropertyArgumentContext(this._ctx, this.state);
this.enterRule(_localctx, 60, JQLParser.RULE_jqlPropertyArgument);
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 286;
this.jqlArgument();
}
} catch (re) {
if (re instanceof _RecognitionException.RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return _localctx;
} // @RuleVersion(0)
}, {
key: "jqlArgument",