# Generated from jql.g4 by ANTLR 4.9.3
# encoding: utf-8
from antlr4 import *
from io import StringIO
import sys

if sys.version_info[1] > 5:
    from typing import TextIO
else:
    from typing.io import TextIO


def serializedATN():
    with StringIO() as buf:
        buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3c")
        buf.write("\u00c4\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7")
        buf.write("\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t\13\4\f\t\f\4\r\t\r\4\16")
        buf.write("\t\16\3\2\7\2\36\n\2\f\2\16\2!\13\2\3\2\3\2\3\3\7\3&\n")
        buf.write("\3\f\3\16\3)\13\3\3\3\3\3\6\3-\n\3\r\3\16\3.\3\3\7\3\62")
        buf.write("\n\3\f\3\16\3\65\13\3\3\3\7\38\n\3\f\3\16\3;\13\3\3\4")
        buf.write("\7\4>\n\4\f\4\16\4A\13\4\3\4\3\4\3\4\7\4F\n\4\f\4\16\4")
        buf.write("I\13\4\3\4\3\4\7\4M\n\4\f\4\16\4P\13\4\7\4R\n\4\f\4\16")
        buf.write("\4U\13\4\3\4\7\4X\n\4\f\4\16\4[\13\4\3\4\5\4^\n\4\3\5")
        buf.write("\7\5a\n\5\f\5\16\5d\13\5\3\5\3\5\5\5h\n\5\3\5\3\5\7\5")
        buf.write("l\n\5\f\5\16\5o\13\5\3\5\3\5\3\5\3\5\5\5u\n\5\3\5\5\5")
        buf.write("x\n\5\3\5\7\5{\n\5\f\5\16\5~\13\5\3\6\3\6\3\6\3\6\5\6")
        buf.write("\u0084\n\6\3\6\3\6\3\6\5\6\u0089\n\6\7\6\u008b\n\6\f\6")
        buf.write("\16\6\u008e\13\6\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3")
        buf.write("\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\5\7\u00a3\n\7\3")
        buf.write("\b\3\b\3\b\3\b\3\b\5\b\u00aa\n\b\3\t\3\t\3\t\3\t\7\t\u00b0")
        buf.write("\n\t\f\t\16\t\u00b3\13\t\3\t\3\t\3\n\3\n\3\13\3\13\3\f")
        buf.write("\3\f\3\r\5\r\u00be\n\r\3\r\3\r\3\16\3\16\3\16\2\2\17\2")
        buf.write("\4\6\b\n\f\16\20\22\24\26\30\32\2\7\4\2\26\26\"\"\4\2")
        buf.write("\27\27\33\33\4\2\25\33\35%\3\2&^\5\2\25\25\30\30!!\2\u00e0")
        buf.write("\2\37\3\2\2\2\4\'\3\2\2\2\6?\3\2\2\2\bb\3\2\2\2\n\177")
        buf.write("\3\2\2\2\f\u00a2\3\2\2\2\16\u00a9\3\2\2\2\20\u00ab\3\2")
        buf.write("\2\2\22\u00b6\3\2\2\2\24\u00b8\3\2\2\2\26\u00ba\3\2\2")
        buf.write("\2\30\u00bd\3\2\2\2\32\u00c1\3\2\2\2\34\36\5\4\3\2\35")
        buf.write("\34\3\2\2\2\36!\3\2\2\2\37\35\3\2\2\2\37 \3\2\2\2 \"\3")
        buf.write("\2\2\2!\37\3\2\2\2\"#\7\2\2\3#\3\3\2\2\2$&\7\7\2\2%$\3")
        buf.write("\2\2\2&)\3\2\2\2\'%\3\2\2\2\'(\3\2\2\2(*\3\2\2\2)\'\3")
        buf.write("\2\2\2*\63\5\6\4\2+-\7\7\2\2,+\3\2\2\2-.\3\2\2\2.,\3\2")
        buf.write("\2\2./\3\2\2\2/\60\3\2\2\2\60\62\5\6\4\2\61,\3\2\2\2\62")
        buf.write("\65\3\2\2\2\63\61\3\2\2\2\63\64\3\2\2\2\649\3\2\2\2\65")
        buf.write("\63\3\2\2\2\668\7\7\2\2\67\66\3\2\2\28;\3\2\2\29\67\3")
        buf.write("\2\2\29:\3\2\2\2:\5\3\2\2\2;9\3\2\2\2<>\7\t\2\2=<\3\2")
        buf.write("\2\2>A\3\2\2\2?=\3\2\2\2?@\3\2\2\2@B\3\2\2\2A?\3\2\2\2")
        buf.write("BS\5\b\5\2CG\t\2\2\2DF\7\t\2\2ED\3\2\2\2FI\3\2\2\2GE\3")
        buf.write("\2\2\2GH\3\2\2\2HJ\3\2\2\2IG\3\2\2\2JN\5\b\5\2KM\7\n\2")
        buf.write("\2LK\3\2\2\2MP\3\2\2\2NL\3\2\2\2NO\3\2\2\2OR\3\2\2\2P")
        buf.write("N\3\2\2\2QC\3\2\2\2RU\3\2\2\2SQ\3\2\2\2ST\3\2\2\2TY\3")
        buf.write("\2\2\2US\3\2\2\2VX\7\n\2\2WV\3\2\2\2X[\3\2\2\2YW\3\2\2")
        buf.write("\2YZ\3\2\2\2Z]\3\2\2\2[Y\3\2\2\2\\^\5\n\6\2]\\\3\2\2\2")
        buf.write("]^\3\2\2\2^\7\3\2\2\2_a\7\37\2\2`_\3\2\2\2ad\3\2\2\2b")
        buf.write("`\3\2\2\2bc\3\2\2\2cg\3\2\2\2db\3\2\2\2eh\5\26\f\2fh\5")
        buf.write("\16\b\2ge\3\2\2\2gf\3\2\2\2hi\3\2\2\2im\5\f\7\2jl\7\t")
        buf.write("\2\2kj\3\2\2\2lo\3\2\2\2mk\3\2\2\2mn\3\2\2\2nt\3\2\2\2")
        buf.write("om\3\2\2\2pu\5\16\b\2qu\5\20\t\2ru\7\3\2\2su\5\32\16\2")
        buf.write("tp\3\2\2\2tq\3\2\2\2tr\3\2\2\2ts\3\2\2\2uw\3\2\2\2vx\5")
        buf.write("\30\r\2wv\3\2\2\2wx\3\2\2\2x|\3\2\2\2y{\7\n\2\2zy\3\2")
        buf.write("\2\2{~\3\2\2\2|z\3\2\2\2|}\3\2\2\2}\t\3\2\2\2~|\3\2\2")
        buf.write("\2\177\u0080\7#\2\2\u0080\u0081\7\31\2\2\u0081\u0083\5")
        buf.write("\16\b\2\u0082\u0084\t\3\2\2\u0083\u0082\3\2\2\2\u0083")
        buf.write("\u0084\3\2\2\2\u0084\u008c\3\2\2\2\u0085\u0086\7\13\2")
        buf.write("\2\u0086\u0088\5\16\b\2\u0087\u0089\t\3\2\2\u0088\u0087")
        buf.write("\3\2\2\2\u0088\u0089\3\2\2\2\u0089\u008b\3\2\2\2\u008a")
        buf.write("\u0085\3\2\2\2\u008b\u008e\3\2\2\2\u008c\u008a\3\2\2\2")
        buf.write("\u008c\u008d\3\2\2\2\u008d\13\3\2\2\2\u008e\u008c\3\2")
        buf.write("\2\2\u008f\u00a3\7\f\2\2\u0090\u00a3\7\24\2\2\u0091\u00a3")
        buf.write("\7\16\2\2\u0092\u00a3\7\17\2\2\u0093\u00a3\7\21\2\2\u0094")
        buf.write("\u00a3\7\20\2\2\u0095\u00a3\7\22\2\2\u0096\u00a3\7\23")
        buf.write("\2\2\u0097\u00a3\7\35\2\2\u0098\u0099\7\37\2\2\u0099\u00a3")
        buf.write("\7\35\2\2\u009a\u00a3\7\36\2\2\u009b\u00a3\7%\2\2\u009c")
        buf.write("\u009d\7\36\2\2\u009d\u00a3\7\37\2\2\u009e\u009f\7%\2")
        buf.write("\2\u009f\u00a3\7\37\2\2\u00a0\u00a1\7\32\2\2\u00a1\u00a3")
        buf.write("\7$\2\2\u00a2\u008f\3\2\2\2\u00a2\u0090\3\2\2\2\u00a2")
        buf.write("\u0091\3\2\2\2\u00a2\u0092\3\2\2\2\u00a2\u0093\3\2\2\2")
        buf.write("\u00a2\u0094\3\2\2\2\u00a2\u0095\3\2\2\2\u00a2\u0096\3")
        buf.write("\2\2\2\u00a2\u0097\3\2\2\2\u00a2\u0098\3\2\2\2\u00a2\u009a")
        buf.write("\3\2\2\2\u00a2\u009b\3\2\2\2\u00a2\u009c\3\2\2\2\u00a2")
        buf.write("\u009e\3\2\2\2\u00a2\u00a0\3\2\2\2\u00a3\r\3\2\2\2\u00a4")
        buf.write("\u00aa\7`\2\2\u00a5\u00aa\7_\2\2\u00a6\u00aa\5\24\13\2")
        buf.write("\u00a7\u00aa\5\26\f\2\u00a8\u00aa\5\32\16\2\u00a9\u00a4")
        buf.write("\3\2\2\2\u00a9\u00a5\3\2\2\2\u00a9\u00a6\3\2\2\2\u00a9")
        buf.write("\u00a7\3\2\2\2\u00a9\u00a8\3\2\2\2\u00aa\17\3\2\2\2\u00ab")
        buf.write("\u00ac\7\t\2\2\u00ac\u00b1\5\16\b\2\u00ad\u00ae\7\13\2")
        buf.write("\2\u00ae\u00b0\5\16\b\2\u00af\u00ad\3\2\2\2\u00b0\u00b3")
        buf.write("\3\2\2\2\u00b1\u00af\3\2\2\2\u00b1\u00b2\3\2\2\2\u00b2")
        buf.write("\u00b4\3\2\2\2\u00b3\u00b1\3\2\2\2\u00b4\u00b5\7\n\2\2")
        buf.write("\u00b5\21\3\2\2\2\u00b6\u00b7\t\4\2\2\u00b7\23\3\2\2\2")
        buf.write("\u00b8\u00b9\7\34\2\2\u00b9\25\3\2\2\2\u00ba\u00bb\t\5")
        buf.write("\2\2\u00bb\27\3\2\2\2\u00bc\u00be\t\6\2\2\u00bd\u00bc")
        buf.write("\3\2\2\2\u00bd\u00be\3\2\2\2\u00be\u00bf\3\2\2\2\u00bf")
        buf.write("\u00c0\5\32\16\2\u00c0\31\3\2\2\2\u00c1\u00c2\7\4\2\2")
        buf.write("\u00c2\33\3\2\2\2\32\37\'.\639?GNSY]bgmtw|\u0083\u0088")
        buf.write("\u008c\u00a2\u00a9\u00b1\u00bd")
        return buf.getvalue()


class jqlParser(Parser):

    grammarFileName = "jql.g4"

    atn = ATNDeserializer().deserialize(serializedATN())

    decisionsToDFA = [DFA(ds, i) for i, ds in enumerate(atn.decisionToState)]

    sharedContextCache = PredictionContextCache()

    literalNames = [
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "<INVALID>",
        "' '",
        "';'",
        "'.'",
        "'('",
        "')'",
        "','",
        "'='",
        "'*'",
        "'~'",
        "'!~'",
        "'<'",
        "'<='",
        "'>'",
        "'>='",
        "'!='",
    ]

    symbolicNames = [
        "<INVALID>",
        "FUNCTION",
        "DATETIME",
        "NUMBER",
        "WHITESPACE",
        "SCOL",
        "DOT",
        "PAR_OPEN",
        "PAR_CLOSE",
        "COMMA",
        "EQ",
        "ASTERISK",
        "CONTAINS",
        "NOT_CONTAINS",
        "LT",
        "LT_EQ",
        "GT",
        "GT_EQ",
        "NOT_EQ",
        "K_AFTER",
        "K_AND",
        "K_ASC",
        "K_BEFORE",
        "K_BY",
        "K_CHANGED",
        "K_DESC",
        "K_EMPTY",
        "K_IN",
        "K_IS",
        "K_NOT",
        "K_NULL",
        "K_ON",
        "K_OR",
        "K_ORDER",
        "K_TO",
        "K_WAS",
        "F_AFFECTED_VERSION",
        "F_APPROVALS",
        "F_ASSIGNEE",
        "F_ATTACHMENTS",
        "F_CATEGORY",
        "F_COMMENT_RANGE",
        "F_COMPONENT",
        "F_CREATED",
        "F_CREATED_DATE",
        "F_CREATOR",
        "F_CUSTOM_FIELD",
        "F_CUSTOMER_REQUEST_TYPE",
        "F_DATE",
        "F_DESCRIPTION",
        "F_DUE",
        "F_DURATION",
        "F_ENVIRONMENT",
        "F_EPIC_LINK",
        "F_FILTER",
        "F_FIX_VERSION",
        "F_ISSUE",
        "F_ISSUE_KEY",
        "F_ISSUE_TYPE",
        "F_KEY",
        "F_LABEL",
        "F_LABELS",
        "F_LAST_VIEWED",
        "F_LEVEL",
        "F_NUMBER",
        "F_ORGANIZATION",
        "F_ORIGINAL_ESTIMATE",
        "F_PARENT",
        "F_PRIORITY",
        "F_PROJECT",
        "F_RANK",
        "F_REMAINING_ESTIMATE",
        "F_REPORTER",
        "F_REQUEST_CHANNEL_TYPE",
        "F_REQUEST_LAST_ACTIVITY_TIME",
        "F_RESOLUTION",
        "F_RESOLUTION_DATE",
        "F_RESOLVED",
        "F_SLA",
        "F_SPRINT",
        "F_STATUS",
        "F_SUMMARY",
        "F_TEXT",
        "F_TIME_SPENT",
        "F_TYPE",
        "F_UPDATED",
        "F_USER",
        "F_VERSION",
        "F_VOTER",
        "F_VOTES",
        "F_WATCHER",
        "F_WATCHERS",
        "F_WORK_RATIO",
        "IDENTIFIER",
        "STRING_LITERAL",
        "COMMENT_RANGE",
        "COMMENT_LINE",
        "SPACES",
    ]

    RULE_parse = 0
    RULE_jql_stmt_list = 1
    RULE_jql_stmt = 2
    RULE_expr = 3
    RULE_ordering_term = 4
    RULE_operator = 5
    RULE_literal_value = 6
    RULE_literal_list = 7
    RULE_keyword = 8
    RULE_state_name = 9
    RULE_field = 10
    RULE_compare_dates = 11
    RULE_dates = 12

    ruleNames = [
        "parse",
        "jql_stmt_list",
        "jql_stmt",
        "expr",
        "ordering_term",
        "operator",
        "literal_value",
        "literal_list",
        "keyword",
        "state_name",
        "field",
        "compare_dates",
        "dates",
    ]

    EOF = Token.EOF
    FUNCTION = 1
    DATETIME = 2
    NUMBER = 3
    WHITESPACE = 4
    SCOL = 5
    DOT = 6
    PAR_OPEN = 7
    PAR_CLOSE = 8
    COMMA = 9
    EQ = 10
    ASTERISK = 11
    CONTAINS = 12
    NOT_CONTAINS = 13
    LT = 14
    LT_EQ = 15
    GT = 16
    GT_EQ = 17
    NOT_EQ = 18
    K_AFTER = 19
    K_AND = 20
    K_ASC = 21
    K_BEFORE = 22
    K_BY = 23
    K_CHANGED = 24
    K_DESC = 25
    K_EMPTY = 26
    K_IN = 27
    K_IS = 28
    K_NOT = 29
    K_NULL = 30
    K_ON = 31
    K_OR = 32
    K_ORDER = 33
    K_TO = 34
    K_WAS = 35
    F_AFFECTED_VERSION = 36
    F_APPROVALS = 37
    F_ASSIGNEE = 38
    F_ATTACHMENTS = 39
    F_CATEGORY = 40
    F_COMMENT_RANGE = 41
    F_COMPONENT = 42
    F_CREATED = 43
    F_CREATED_DATE = 44
    F_CREATOR = 45
    F_CUSTOM_FIELD = 46
    F_CUSTOMER_REQUEST_TYPE = 47
    F_DATE = 48
    F_DESCRIPTION = 49
    F_DUE = 50
    F_DURATION = 51
    F_ENVIRONMENT = 52
    F_EPIC_LINK = 53
    F_FILTER = 54
    F_FIX_VERSION = 55
    F_ISSUE = 56
    F_ISSUE_KEY = 57
    F_ISSUE_TYPE = 58
    F_KEY = 59
    F_LABEL = 60
    F_LABELS = 61
    F_LAST_VIEWED = 62
    F_LEVEL = 63
    F_NUMBER = 64
    F_ORGANIZATION = 65
    F_ORIGINAL_ESTIMATE = 66
    F_PARENT = 67
    F_PRIORITY = 68
    F_PROJECT = 69
    F_RANK = 70
    F_REMAINING_ESTIMATE = 71
    F_REPORTER = 72
    F_REQUEST_CHANNEL_TYPE = 73
    F_REQUEST_LAST_ACTIVITY_TIME = 74
    F_RESOLUTION = 75
    F_RESOLUTION_DATE = 76
    F_RESOLVED = 77
    F_SLA = 78
    F_SPRINT = 79
    F_STATUS = 80
    F_SUMMARY = 81
    F_TEXT = 82
    F_TIME_SPENT = 83
    F_TYPE = 84
    F_UPDATED = 85
    F_USER = 86
    F_VERSION = 87
    F_VOTER = 88
    F_VOTES = 89
    F_WATCHER = 90
    F_WATCHERS = 91
    F_WORK_RATIO = 92
    IDENTIFIER = 93
    STRING_LITERAL = 94
    COMMENT_RANGE = 95
    COMMENT_LINE = 96
    SPACES = 97

    def __init__(self, input: TokenStream, output: TextIO = sys.stdout):
        super().__init__(input, output)
        self.checkVersion("4.9.3")
        self._interp = ParserATNSimulator(self, self.atn, self.decisionsToDFA, self.sharedContextCache)
        self._predicates = None

    class ParseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def EOF(self):
            return self.getToken(jqlParser.EOF, 0)

        def jql_stmt_list(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(jqlParser.Jql_stmt_listContext)
            else:
                return self.getTypedRuleContext(jqlParser.Jql_stmt_listContext, i)

        def getRuleIndex(self):
            return jqlParser.RULE_parse

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterParse"):
                listener.enterParse(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitParse"):
                listener.exitParse(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitParse"):
                return visitor.visitParse(self)
            else:
                return visitor.visitChildren(self)

    def parse(self):

        localctx = jqlParser.ParseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_parse)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 29
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (
                ((_la) & ~0x3F) == 0
                and (
                    (1 << _la)
                    & (
                        (1 << jqlParser.DATETIME)
                        | (1 << jqlParser.SCOL)
                        | (1 << jqlParser.PAR_OPEN)
                        | (1 << jqlParser.K_EMPTY)
                        | (1 << jqlParser.K_NOT)
                        | (1 << jqlParser.F_AFFECTED_VERSION)
                        | (1 << jqlParser.F_APPROVALS)
                        | (1 << jqlParser.F_ASSIGNEE)
                        | (1 << jqlParser.F_ATTACHMENTS)
                        | (1 << jqlParser.F_CATEGORY)
                        | (1 << jqlParser.F_COMMENT_RANGE)
                        | (1 << jqlParser.F_COMPONENT)
                        | (1 << jqlParser.F_CREATED)
                        | (1 << jqlParser.F_CREATED_DATE)
                        | (1 << jqlParser.F_CREATOR)
                        | (1 << jqlParser.F_CUSTOM_FIELD)
                        | (1 << jqlParser.F_CUSTOMER_REQUEST_TYPE)
                        | (1 << jqlParser.F_DATE)
                        | (1 << jqlParser.F_DESCRIPTION)
                        | (1 << jqlParser.F_DUE)
                        | (1 << jqlParser.F_DURATION)
                        | (1 << jqlParser.F_ENVIRONMENT)
                        | (1 << jqlParser.F_EPIC_LINK)
                        | (1 << jqlParser.F_FILTER)
                        | (1 << jqlParser.F_FIX_VERSION)
                        | (1 << jqlParser.F_ISSUE)
                        | (1 << jqlParser.F_ISSUE_KEY)
                        | (1 << jqlParser.F_ISSUE_TYPE)
                        | (1 << jqlParser.F_KEY)
                        | (1 << jqlParser.F_LABEL)
                        | (1 << jqlParser.F_LABELS)
                        | (1 << jqlParser.F_LAST_VIEWED)
                        | (1 << jqlParser.F_LEVEL)
                    )
                )
                != 0
            ) or (
                (((_la - 64)) & ~0x3F) == 0
                and (
                    (1 << (_la - 64))
                    & (
                        (1 << (jqlParser.F_NUMBER - 64))
                        | (1 << (jqlParser.F_ORGANIZATION - 64))
                        | (1 << (jqlParser.F_ORIGINAL_ESTIMATE - 64))
                        | (1 << (jqlParser.F_PARENT - 64))
                        | (1 << (jqlParser.F_PRIORITY - 64))
                        | (1 << (jqlParser.F_PROJECT - 64))
                        | (1 << (jqlParser.F_RANK - 64))
                        | (1 << (jqlParser.F_REMAINING_ESTIMATE - 64))
                        | (1 << (jqlParser.F_REPORTER - 64))
                        | (1 << (jqlParser.F_REQUEST_CHANNEL_TYPE - 64))
                        | (1 << (jqlParser.F_REQUEST_LAST_ACTIVITY_TIME - 64))
                        | (1 << (jqlParser.F_RESOLUTION - 64))
                        | (1 << (jqlParser.F_RESOLUTION_DATE - 64))
                        | (1 << (jqlParser.F_RESOLVED - 64))
                        | (1 << (jqlParser.F_SLA - 64))
                        | (1 << (jqlParser.F_SPRINT - 64))
                        | (1 << (jqlParser.F_STATUS - 64))
                        | (1 << (jqlParser.F_SUMMARY - 64))
                        | (1 << (jqlParser.F_TEXT - 64))
                        | (1 << (jqlParser.F_TIME_SPENT - 64))
                        | (1 << (jqlParser.F_TYPE - 64))
                        | (1 << (jqlParser.F_UPDATED - 64))
                        | (1 << (jqlParser.F_USER - 64))
                        | (1 << (jqlParser.F_VERSION - 64))
                        | (1 << (jqlParser.F_VOTER - 64))
                        | (1 << (jqlParser.F_VOTES - 64))
                        | (1 << (jqlParser.F_WATCHER - 64))
                        | (1 << (jqlParser.F_WATCHERS - 64))
                        | (1 << (jqlParser.F_WORK_RATIO - 64))
                        | (1 << (jqlParser.IDENTIFIER - 64))
                        | (1 << (jqlParser.STRING_LITERAL - 64))
                    )
                )
                != 0
            ):
                self.state = 26
                self.jql_stmt_list()
                self.state = 31
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 32
            self.match(jqlParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Jql_stmt_listContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def jql_stmt(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(jqlParser.Jql_stmtContext)
            else:
                return self.getTypedRuleContext(jqlParser.Jql_stmtContext, i)

        def SCOL(self, i: int = None):
            if i is None:
                return self.getTokens(jqlParser.SCOL)
            else:
                return self.getToken(jqlParser.SCOL, i)

        def getRuleIndex(self):
            return jqlParser.RULE_jql_stmt_list

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterJql_stmt_list"):
                listener.enterJql_stmt_list(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitJql_stmt_list"):
                listener.exitJql_stmt_list(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitJql_stmt_list"):
                return visitor.visitJql_stmt_list(self)
            else:
                return visitor.visitChildren(self)

    def jql_stmt_list(self):

        localctx = jqlParser.Jql_stmt_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_jql_stmt_list)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 37
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == jqlParser.SCOL:
                self.state = 34
                self.match(jqlParser.SCOL)
                self.state = 39
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 40
            self.jql_stmt()
            self.state = 49
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input, 3, self._ctx)
            while _alt != 2 and _alt != ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 42
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    while True:
                        self.state = 41
                        self.match(jqlParser.SCOL)
                        self.state = 44
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if not (_la == jqlParser.SCOL):
                            break

                    self.state = 46
                    self.jql_stmt()
                self.state = 51
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input, 3, self._ctx)

            self.state = 55
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input, 4, self._ctx)
            while _alt != 2 and _alt != ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 52
                    self.match(jqlParser.SCOL)
                self.state = 57
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input, 4, self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Jql_stmtContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def expr(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(jqlParser.ExprContext)
            else:
                return self.getTypedRuleContext(jqlParser.ExprContext, i)

        def PAR_OPEN(self, i: int = None):
            if i is None:
                return self.getTokens(jqlParser.PAR_OPEN)
            else:
                return self.getToken(jqlParser.PAR_OPEN, i)

        def PAR_CLOSE(self, i: int = None):
            if i is None:
                return self.getTokens(jqlParser.PAR_CLOSE)
            else:
                return self.getToken(jqlParser.PAR_CLOSE, i)

        def ordering_term(self):
            return self.getTypedRuleContext(jqlParser.Ordering_termContext, 0)

        def K_AND(self, i: int = None):
            if i is None:
                return self.getTokens(jqlParser.K_AND)
            else:
                return self.getToken(jqlParser.K_AND, i)

        def K_OR(self, i: int = None):
            if i is None:
                return self.getTokens(jqlParser.K_OR)
            else:
                return self.getToken(jqlParser.K_OR, i)

        def getRuleIndex(self):
            return jqlParser.RULE_jql_stmt

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterJql_stmt"):
                listener.enterJql_stmt(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitJql_stmt"):
                listener.exitJql_stmt(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitJql_stmt"):
                return visitor.visitJql_stmt(self)
            else:
                return visitor.visitChildren(self)

    def jql_stmt(self):

        localctx = jqlParser.Jql_stmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_jql_stmt)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 61
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == jqlParser.PAR_OPEN:
                self.state = 58
                self.match(jqlParser.PAR_OPEN)
                self.state = 63
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 64
            self.expr()
            self.state = 81
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == jqlParser.K_AND or _la == jqlParser.K_OR:
                self.state = 65
                _la = self._input.LA(1)
                if not (_la == jqlParser.K_AND or _la == jqlParser.K_OR):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 69
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la == jqlParser.PAR_OPEN:
                    self.state = 66
                    self.match(jqlParser.PAR_OPEN)
                    self.state = 71
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 72
                self.expr()
                self.state = 76
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input, 7, self._ctx)
                while _alt != 2 and _alt != ATN.INVALID_ALT_NUMBER:
                    if _alt == 1:
                        self.state = 73
                        self.match(jqlParser.PAR_CLOSE)
                    self.state = 78
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input, 7, self._ctx)

                self.state = 83
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 87
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == jqlParser.PAR_CLOSE:
                self.state = 84
                self.match(jqlParser.PAR_CLOSE)
                self.state = 89
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 91
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == jqlParser.K_ORDER:
                self.state = 90
                self.ordering_term()

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class ExprContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def operator(self):
            return self.getTypedRuleContext(jqlParser.OperatorContext, 0)

        def field(self):
            return self.getTypedRuleContext(jqlParser.FieldContext, 0)

        def literal_value(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(jqlParser.Literal_valueContext)
            else:
                return self.getTypedRuleContext(jqlParser.Literal_valueContext, i)

        def literal_list(self):
            return self.getTypedRuleContext(jqlParser.Literal_listContext, 0)

        def FUNCTION(self):
            return self.getToken(jqlParser.FUNCTION, 0)

        def dates(self):
            return self.getTypedRuleContext(jqlParser.DatesContext, 0)

        def K_NOT(self, i: int = None):
            if i is None:
                return self.getTokens(jqlParser.K_NOT)
            else:
                return self.getToken(jqlParser.K_NOT, i)

        def PAR_OPEN(self, i: int = None):
            if i is None:
                return self.getTokens(jqlParser.PAR_OPEN)
            else:
                return self.getToken(jqlParser.PAR_OPEN, i)

        def compare_dates(self):
            return self.getTypedRuleContext(jqlParser.Compare_datesContext, 0)

        def PAR_CLOSE(self, i: int = None):
            if i is None:
                return self.getTokens(jqlParser.PAR_CLOSE)
            else:
                return self.getToken(jqlParser.PAR_CLOSE, i)

        def getRuleIndex(self):
            return jqlParser.RULE_expr

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterExpr"):
                listener.enterExpr(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitExpr"):
                listener.exitExpr(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitExpr"):
                return visitor.visitExpr(self)
            else:
                return visitor.visitChildren(self)

    def expr(self):

        localctx = jqlParser.ExprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_expr)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 96
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == jqlParser.K_NOT:
                self.state = 93
                self.match(jqlParser.K_NOT)
                self.state = 98
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 101
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 12, self._ctx)
            if la_ == 1:
                self.state = 99
                self.field()
                pass

            elif la_ == 2:
                self.state = 100
                self.literal_value()
                pass

            self.state = 103
            self.operator()
            self.state = 107
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input, 13, self._ctx)
            while _alt != 2 and _alt != ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 104
                    self.match(jqlParser.PAR_OPEN)
                self.state = 109
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input, 13, self._ctx)

            self.state = 114
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 14, self._ctx)
            if la_ == 1:
                self.state = 110
                self.literal_value()
                pass

            elif la_ == 2:
                self.state = 111
                self.literal_list()
                pass

            elif la_ == 3:
                self.state = 112
                self.match(jqlParser.FUNCTION)
                pass

            elif la_ == 4:
                self.state = 113
                self.dates()
                pass

            self.state = 117
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 15, self._ctx)
            if la_ == 1:
                self.state = 116
                self.compare_dates()

            self.state = 122
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input, 16, self._ctx)
            while _alt != 2 and _alt != ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 119
                    self.match(jqlParser.PAR_CLOSE)
                self.state = 124
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input, 16, self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Ordering_termContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def K_ORDER(self):
            return self.getToken(jqlParser.K_ORDER, 0)

        def K_BY(self):
            return self.getToken(jqlParser.K_BY, 0)

        def literal_value(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(jqlParser.Literal_valueContext)
            else:
                return self.getTypedRuleContext(jqlParser.Literal_valueContext, i)

        def COMMA(self, i: int = None):
            if i is None:
                return self.getTokens(jqlParser.COMMA)
            else:
                return self.getToken(jqlParser.COMMA, i)

        def K_ASC(self, i: int = None):
            if i is None:
                return self.getTokens(jqlParser.K_ASC)
            else:
                return self.getToken(jqlParser.K_ASC, i)

        def K_DESC(self, i: int = None):
            if i is None:
                return self.getTokens(jqlParser.K_DESC)
            else:
                return self.getToken(jqlParser.K_DESC, i)

        def getRuleIndex(self):
            return jqlParser.RULE_ordering_term

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterOrdering_term"):
                listener.enterOrdering_term(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitOrdering_term"):
                listener.exitOrdering_term(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitOrdering_term"):
                return visitor.visitOrdering_term(self)
            else:
                return visitor.visitChildren(self)

    def ordering_term(self):

        localctx = jqlParser.Ordering_termContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_ordering_term)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 125
            self.match(jqlParser.K_ORDER)
            self.state = 126
            self.match(jqlParser.K_BY)
            self.state = 127
            self.literal_value()
            self.state = 129
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la == jqlParser.K_ASC or _la == jqlParser.K_DESC:
                self.state = 128
                _la = self._input.LA(1)
                if not (_la == jqlParser.K_ASC or _la == jqlParser.K_DESC):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()

            self.state = 138
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == jqlParser.COMMA:
                self.state = 131
                self.match(jqlParser.COMMA)
                self.state = 132
                self.literal_value()
                self.state = 134
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la == jqlParser.K_ASC or _la == jqlParser.K_DESC:
                    self.state = 133
                    _la = self._input.LA(1)
                    if not (_la == jqlParser.K_ASC or _la == jqlParser.K_DESC):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()

                self.state = 140
                self._errHandler.sync(self)
                _la = self._input.LA(1)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class OperatorContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def EQ(self):
            return self.getToken(jqlParser.EQ, 0)

        def NOT_EQ(self):
            return self.getToken(jqlParser.NOT_EQ, 0)

        def CONTAINS(self):
            return self.getToken(jqlParser.CONTAINS, 0)

        def NOT_CONTAINS(self):
            return self.getToken(jqlParser.NOT_CONTAINS, 0)

        def LT_EQ(self):
            return self.getToken(jqlParser.LT_EQ, 0)

        def LT(self):
            return self.getToken(jqlParser.LT, 0)

        def GT(self):
            return self.getToken(jqlParser.GT, 0)

        def GT_EQ(self):
            return self.getToken(jqlParser.GT_EQ, 0)

        def K_IN(self):
            return self.getToken(jqlParser.K_IN, 0)

        def K_NOT(self):
            return self.getToken(jqlParser.K_NOT, 0)

        def K_IS(self):
            return self.getToken(jqlParser.K_IS, 0)

        def K_WAS(self):
            return self.getToken(jqlParser.K_WAS, 0)

        def K_CHANGED(self):
            return self.getToken(jqlParser.K_CHANGED, 0)

        def K_TO(self):
            return self.getToken(jqlParser.K_TO, 0)

        def getRuleIndex(self):
            return jqlParser.RULE_operator

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterOperator"):
                listener.enterOperator(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitOperator"):
                listener.exitOperator(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitOperator"):
                return visitor.visitOperator(self)
            else:
                return visitor.visitChildren(self)

    def operator(self):

        localctx = jqlParser.OperatorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_operator)
        try:
            self.state = 160
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input, 20, self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 141
                self.match(jqlParser.EQ)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 142
                self.match(jqlParser.NOT_EQ)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 143
                self.match(jqlParser.CONTAINS)
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 144
                self.match(jqlParser.NOT_CONTAINS)
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 145
                self.match(jqlParser.LT_EQ)
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 146
                self.match(jqlParser.LT)
                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 147
                self.match(jqlParser.GT)
                pass

            elif la_ == 8:
                self.enterOuterAlt(localctx, 8)
                self.state = 148
                self.match(jqlParser.GT_EQ)
                pass

            elif la_ == 9:
                self.enterOuterAlt(localctx, 9)
                self.state = 149
                self.match(jqlParser.K_IN)
                pass

            elif la_ == 10:
                self.enterOuterAlt(localctx, 10)
                self.state = 150
                self.match(jqlParser.K_NOT)
                self.state = 151
                self.match(jqlParser.K_IN)
                pass

            elif la_ == 11:
                self.enterOuterAlt(localctx, 11)
                self.state = 152
                self.match(jqlParser.K_IS)
                pass

            elif la_ == 12:
                self.enterOuterAlt(localctx, 12)
                self.state = 153
                self.match(jqlParser.K_WAS)
                pass

            elif la_ == 13:
                self.enterOuterAlt(localctx, 13)
                self.state = 154
                self.match(jqlParser.K_IS)
                self.state = 155
                self.match(jqlParser.K_NOT)
                pass

            elif la_ == 14:
                self.enterOuterAlt(localctx, 14)
                self.state = 156
                self.match(jqlParser.K_WAS)
                self.state = 157
                self.match(jqlParser.K_NOT)
                pass

            elif la_ == 15:
                self.enterOuterAlt(localctx, 15)
                self.state = 158
                self.match(jqlParser.K_CHANGED)
                self.state = 159
                self.match(jqlParser.K_TO)
                pass

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Literal_valueContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def STRING_LITERAL(self):
            return self.getToken(jqlParser.STRING_LITERAL, 0)

        def IDENTIFIER(self):
            return self.getToken(jqlParser.IDENTIFIER, 0)

        def state_name(self):
            return self.getTypedRuleContext(jqlParser.State_nameContext, 0)

        def field(self):
            return self.getTypedRuleContext(jqlParser.FieldContext, 0)

        def dates(self):
            return self.getTypedRuleContext(jqlParser.DatesContext, 0)

        def getRuleIndex(self):
            return jqlParser.RULE_literal_value

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterLiteral_value"):
                listener.enterLiteral_value(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitLiteral_value"):
                listener.exitLiteral_value(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitLiteral_value"):
                return visitor.visitLiteral_value(self)
            else:
                return visitor.visitChildren(self)

    def literal_value(self):

        localctx = jqlParser.Literal_valueContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_literal_value)
        try:
            self.state = 167
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [jqlParser.STRING_LITERAL]:
                self.enterOuterAlt(localctx, 1)
                self.state = 162
                self.match(jqlParser.STRING_LITERAL)
                pass
            elif token in [jqlParser.IDENTIFIER]:
                self.enterOuterAlt(localctx, 2)
                self.state = 163
                self.match(jqlParser.IDENTIFIER)
                pass
            elif token in [jqlParser.K_EMPTY]:
                self.enterOuterAlt(localctx, 3)
                self.state = 164
                self.state_name()
                pass
            elif token in [
                jqlParser.F_AFFECTED_VERSION,
                jqlParser.F_APPROVALS,
                jqlParser.F_ASSIGNEE,
                jqlParser.F_ATTACHMENTS,
                jqlParser.F_CATEGORY,
                jqlParser.F_COMMENT_RANGE,
                jqlParser.F_COMPONENT,
                jqlParser.F_CREATED,
                jqlParser.F_CREATED_DATE,
                jqlParser.F_CREATOR,
                jqlParser.F_CUSTOM_FIELD,
                jqlParser.F_CUSTOMER_REQUEST_TYPE,
                jqlParser.F_DATE,
                jqlParser.F_DESCRIPTION,
                jqlParser.F_DUE,
                jqlParser.F_DURATION,
                jqlParser.F_ENVIRONMENT,
                jqlParser.F_EPIC_LINK,
                jqlParser.F_FILTER,
                jqlParser.F_FIX_VERSION,
                jqlParser.F_ISSUE,
                jqlParser.F_ISSUE_KEY,
                jqlParser.F_ISSUE_TYPE,
                jqlParser.F_KEY,
                jqlParser.F_LABEL,
                jqlParser.F_LABELS,
                jqlParser.F_LAST_VIEWED,
                jqlParser.F_LEVEL,
                jqlParser.F_NUMBER,
                jqlParser.F_ORGANIZATION,
                jqlParser.F_ORIGINAL_ESTIMATE,
                jqlParser.F_PARENT,
                jqlParser.F_PRIORITY,
                jqlParser.F_PROJECT,
                jqlParser.F_RANK,
                jqlParser.F_REMAINING_ESTIMATE,
                jqlParser.F_REPORTER,
                jqlParser.F_REQUEST_CHANNEL_TYPE,
                jqlParser.F_REQUEST_LAST_ACTIVITY_TIME,
                jqlParser.F_RESOLUTION,
                jqlParser.F_RESOLUTION_DATE,
                jqlParser.F_RESOLVED,
                jqlParser.F_SLA,
                jqlParser.F_SPRINT,
                jqlParser.F_STATUS,
                jqlParser.F_SUMMARY,
                jqlParser.F_TEXT,
                jqlParser.F_TIME_SPENT,
                jqlParser.F_TYPE,
                jqlParser.F_UPDATED,
                jqlParser.F_USER,
                jqlParser.F_VERSION,
                jqlParser.F_VOTER,
                jqlParser.F_VOTES,
                jqlParser.F_WATCHER,
                jqlParser.F_WATCHERS,
                jqlParser.F_WORK_RATIO,
            ]:
                self.enterOuterAlt(localctx, 4)
                self.state = 165
                self.field()
                pass
            elif token in [jqlParser.DATETIME]:
                self.enterOuterAlt(localctx, 5)
                self.state = 166
                self.dates()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Literal_listContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def PAR_OPEN(self):
            return self.getToken(jqlParser.PAR_OPEN, 0)

        def literal_value(self, i: int = None):
            if i is None:
                return self.getTypedRuleContexts(jqlParser.Literal_valueContext)
            else:
                return self.getTypedRuleContext(jqlParser.Literal_valueContext, i)

        def PAR_CLOSE(self):
            return self.getToken(jqlParser.PAR_CLOSE, 0)

        def COMMA(self, i: int = None):
            if i is None:
                return self.getTokens(jqlParser.COMMA)
            else:
                return self.getToken(jqlParser.COMMA, i)

        def getRuleIndex(self):
            return jqlParser.RULE_literal_list

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterLiteral_list"):
                listener.enterLiteral_list(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitLiteral_list"):
                listener.exitLiteral_list(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitLiteral_list"):
                return visitor.visitLiteral_list(self)
            else:
                return visitor.visitChildren(self)

    def literal_list(self):

        localctx = jqlParser.Literal_listContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_literal_list)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 169
            self.match(jqlParser.PAR_OPEN)
            self.state = 170
            self.literal_value()
            self.state = 175
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la == jqlParser.COMMA:
                self.state = 171
                self.match(jqlParser.COMMA)
                self.state = 172
                self.literal_value()
                self.state = 177
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 178
            self.match(jqlParser.PAR_CLOSE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class KeywordContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def K_AFTER(self):
            return self.getToken(jqlParser.K_AFTER, 0)

        def K_AND(self):
            return self.getToken(jqlParser.K_AND, 0)

        def K_ASC(self):
            return self.getToken(jqlParser.K_ASC, 0)

        def K_BEFORE(self):
            return self.getToken(jqlParser.K_BEFORE, 0)

        def K_BY(self):
            return self.getToken(jqlParser.K_BY, 0)

        def K_CHANGED(self):
            return self.getToken(jqlParser.K_CHANGED, 0)

        def K_DESC(self):
            return self.getToken(jqlParser.K_DESC, 0)

        def K_IN(self):
            return self.getToken(jqlParser.K_IN, 0)

        def K_IS(self):
            return self.getToken(jqlParser.K_IS, 0)

        def K_NOT(self):
            return self.getToken(jqlParser.K_NOT, 0)

        def K_NULL(self):
            return self.getToken(jqlParser.K_NULL, 0)

        def K_ON(self):
            return self.getToken(jqlParser.K_ON, 0)

        def K_OR(self):
            return self.getToken(jqlParser.K_OR, 0)

        def K_ORDER(self):
            return self.getToken(jqlParser.K_ORDER, 0)

        def K_TO(self):
            return self.getToken(jqlParser.K_TO, 0)

        def K_WAS(self):
            return self.getToken(jqlParser.K_WAS, 0)

        def getRuleIndex(self):
            return jqlParser.RULE_keyword

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterKeyword"):
                listener.enterKeyword(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitKeyword"):
                listener.exitKeyword(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitKeyword"):
                return visitor.visitKeyword(self)
            else:
                return visitor.visitChildren(self)

    def keyword(self):

        localctx = jqlParser.KeywordContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_keyword)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 180
            _la = self._input.LA(1)
            if not (
                (
                    ((_la) & ~0x3F) == 0
                    and (
                        (1 << _la)
                        & (
                            (1 << jqlParser.K_AFTER)
                            | (1 << jqlParser.K_AND)
                            | (1 << jqlParser.K_ASC)
                            | (1 << jqlParser.K_BEFORE)
                            | (1 << jqlParser.K_BY)
                            | (1 << jqlParser.K_CHANGED)
                            | (1 << jqlParser.K_DESC)
                            | (1 << jqlParser.K_IN)
                            | (1 << jqlParser.K_IS)
                            | (1 << jqlParser.K_NOT)
                            | (1 << jqlParser.K_NULL)
                            | (1 << jqlParser.K_ON)
                            | (1 << jqlParser.K_OR)
                            | (1 << jqlParser.K_ORDER)
                            | (1 << jqlParser.K_TO)
                            | (1 << jqlParser.K_WAS)
                        )
                    )
                    != 0
                )
            ):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class State_nameContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def K_EMPTY(self):
            return self.getToken(jqlParser.K_EMPTY, 0)

        def getRuleIndex(self):
            return jqlParser.RULE_state_name

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterState_name"):
                listener.enterState_name(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitState_name"):
                listener.exitState_name(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitState_name"):
                return visitor.visitState_name(self)
            else:
                return visitor.visitChildren(self)

    def state_name(self):

        localctx = jqlParser.State_nameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_state_name)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 182
            self.match(jqlParser.K_EMPTY)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class FieldContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def F_AFFECTED_VERSION(self):
            return self.getToken(jqlParser.F_AFFECTED_VERSION, 0)

        def F_APPROVALS(self):
            return self.getToken(jqlParser.F_APPROVALS, 0)

        def F_ASSIGNEE(self):
            return self.getToken(jqlParser.F_ASSIGNEE, 0)

        def F_ATTACHMENTS(self):
            return self.getToken(jqlParser.F_ATTACHMENTS, 0)

        def F_CATEGORY(self):
            return self.getToken(jqlParser.F_CATEGORY, 0)

        def F_COMMENT_RANGE(self):
            return self.getToken(jqlParser.F_COMMENT_RANGE, 0)

        def F_COMPONENT(self):
            return self.getToken(jqlParser.F_COMPONENT, 0)

        def F_CREATED(self):
            return self.getToken(jqlParser.F_CREATED, 0)

        def F_CREATED_DATE(self):
            return self.getToken(jqlParser.F_CREATED_DATE, 0)

        def F_CREATOR(self):
            return self.getToken(jqlParser.F_CREATOR, 0)

        def F_CUSTOM_FIELD(self):
            return self.getToken(jqlParser.F_CUSTOM_FIELD, 0)

        def F_CUSTOMER_REQUEST_TYPE(self):
            return self.getToken(jqlParser.F_CUSTOMER_REQUEST_TYPE, 0)

        def F_DATE(self):
            return self.getToken(jqlParser.F_DATE, 0)

        def F_DESCRIPTION(self):
            return self.getToken(jqlParser.F_DESCRIPTION, 0)

        def F_DUE(self):
            return self.getToken(jqlParser.F_DUE, 0)

        def F_DURATION(self):
            return self.getToken(jqlParser.F_DURATION, 0)

        def F_ENVIRONMENT(self):
            return self.getToken(jqlParser.F_ENVIRONMENT, 0)

        def F_EPIC_LINK(self):
            return self.getToken(jqlParser.F_EPIC_LINK, 0)

        def F_FILTER(self):
            return self.getToken(jqlParser.F_FILTER, 0)

        def F_FIX_VERSION(self):
            return self.getToken(jqlParser.F_FIX_VERSION, 0)

        def F_ISSUE(self):
            return self.getToken(jqlParser.F_ISSUE, 0)

        def F_ISSUE_KEY(self):
            return self.getToken(jqlParser.F_ISSUE_KEY, 0)

        def F_ISSUE_TYPE(self):
            return self.getToken(jqlParser.F_ISSUE_TYPE, 0)

        def F_KEY(self):
            return self.getToken(jqlParser.F_KEY, 0)

        def F_LABEL(self):
            return self.getToken(jqlParser.F_LABEL, 0)

        def F_LABELS(self):
            return self.getToken(jqlParser.F_LABELS, 0)

        def F_LAST_VIEWED(self):
            return self.getToken(jqlParser.F_LAST_VIEWED, 0)

        def F_LEVEL(self):
            return self.getToken(jqlParser.F_LEVEL, 0)

        def F_NUMBER(self):
            return self.getToken(jqlParser.F_NUMBER, 0)

        def F_ORGANIZATION(self):
            return self.getToken(jqlParser.F_ORGANIZATION, 0)

        def F_ORIGINAL_ESTIMATE(self):
            return self.getToken(jqlParser.F_ORIGINAL_ESTIMATE, 0)

        def F_PARENT(self):
            return self.getToken(jqlParser.F_PARENT, 0)

        def F_PRIORITY(self):
            return self.getToken(jqlParser.F_PRIORITY, 0)

        def F_PROJECT(self):
            return self.getToken(jqlParser.F_PROJECT, 0)

        def F_RANK(self):
            return self.getToken(jqlParser.F_RANK, 0)

        def F_REMAINING_ESTIMATE(self):
            return self.getToken(jqlParser.F_REMAINING_ESTIMATE, 0)

        def F_REPORTER(self):
            return self.getToken(jqlParser.F_REPORTER, 0)

        def F_REQUEST_CHANNEL_TYPE(self):
            return self.getToken(jqlParser.F_REQUEST_CHANNEL_TYPE, 0)

        def F_REQUEST_LAST_ACTIVITY_TIME(self):
            return self.getToken(jqlParser.F_REQUEST_LAST_ACTIVITY_TIME, 0)

        def F_RESOLUTION(self):
            return self.getToken(jqlParser.F_RESOLUTION, 0)

        def F_RESOLUTION_DATE(self):
            return self.getToken(jqlParser.F_RESOLUTION_DATE, 0)

        def F_RESOLVED(self):
            return self.getToken(jqlParser.F_RESOLVED, 0)

        def F_SLA(self):
            return self.getToken(jqlParser.F_SLA, 0)

        def F_SPRINT(self):
            return self.getToken(jqlParser.F_SPRINT, 0)

        def F_STATUS(self):
            return self.getToken(jqlParser.F_STATUS, 0)

        def F_SUMMARY(self):
            return self.getToken(jqlParser.F_SUMMARY, 0)

        def F_TEXT(self):
            return self.getToken(jqlParser.F_TEXT, 0)

        def F_TIME_SPENT(self):
            return self.getToken(jqlParser.F_TIME_SPENT, 0)

        def F_TYPE(self):
            return self.getToken(jqlParser.F_TYPE, 0)

        def F_UPDATED(self):
            return self.getToken(jqlParser.F_UPDATED, 0)

        def F_USER(self):
            return self.getToken(jqlParser.F_USER, 0)

        def F_VERSION(self):
            return self.getToken(jqlParser.F_VERSION, 0)

        def F_VOTER(self):
            return self.getToken(jqlParser.F_VOTER, 0)

        def F_VOTES(self):
            return self.getToken(jqlParser.F_VOTES, 0)

        def F_WATCHER(self):
            return self.getToken(jqlParser.F_WATCHER, 0)

        def F_WATCHERS(self):
            return self.getToken(jqlParser.F_WATCHERS, 0)

        def F_WORK_RATIO(self):
            return self.getToken(jqlParser.F_WORK_RATIO, 0)

        def getRuleIndex(self):
            return jqlParser.RULE_field

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterField"):
                listener.enterField(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitField"):
                listener.exitField(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitField"):
                return visitor.visitField(self)
            else:
                return visitor.visitChildren(self)

    def field(self):

        localctx = jqlParser.FieldContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_field)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 184
            _la = self._input.LA(1)
            if not (
                (
                    (((_la - 36)) & ~0x3F) == 0
                    and (
                        (1 << (_la - 36))
                        & (
                            (1 << (jqlParser.F_AFFECTED_VERSION - 36))
                            | (1 << (jqlParser.F_APPROVALS - 36))
                            | (1 << (jqlParser.F_ASSIGNEE - 36))
                            | (1 << (jqlParser.F_ATTACHMENTS - 36))
                            | (1 << (jqlParser.F_CATEGORY - 36))
                            | (1 << (jqlParser.F_COMMENT_RANGE - 36))
                            | (1 << (jqlParser.F_COMPONENT - 36))
                            | (1 << (jqlParser.F_CREATED - 36))
                            | (1 << (jqlParser.F_CREATED_DATE - 36))
                            | (1 << (jqlParser.F_CREATOR - 36))
                            | (1 << (jqlParser.F_CUSTOM_FIELD - 36))
                            | (1 << (jqlParser.F_CUSTOMER_REQUEST_TYPE - 36))
                            | (1 << (jqlParser.F_DATE - 36))
                            | (1 << (jqlParser.F_DESCRIPTION - 36))
                            | (1 << (jqlParser.F_DUE - 36))
                            | (1 << (jqlParser.F_DURATION - 36))
                            | (1 << (jqlParser.F_ENVIRONMENT - 36))
                            | (1 << (jqlParser.F_EPIC_LINK - 36))
                            | (1 << (jqlParser.F_FILTER - 36))
                            | (1 << (jqlParser.F_FIX_VERSION - 36))
                            | (1 << (jqlParser.F_ISSUE - 36))
                            | (1 << (jqlParser.F_ISSUE_KEY - 36))
                            | (1 << (jqlParser.F_ISSUE_TYPE - 36))
                            | (1 << (jqlParser.F_KEY - 36))
                            | (1 << (jqlParser.F_LABEL - 36))
                            | (1 << (jqlParser.F_LABELS - 36))
                            | (1 << (jqlParser.F_LAST_VIEWED - 36))
                            | (1 << (jqlParser.F_LEVEL - 36))
                            | (1 << (jqlParser.F_NUMBER - 36))
                            | (1 << (jqlParser.F_ORGANIZATION - 36))
                            | (1 << (jqlParser.F_ORIGINAL_ESTIMATE - 36))
                            | (1 << (jqlParser.F_PARENT - 36))
                            | (1 << (jqlParser.F_PRIORITY - 36))
                            | (1 << (jqlParser.F_PROJECT - 36))
                            | (1 << (jqlParser.F_RANK - 36))
                            | (1 << (jqlParser.F_REMAINING_ESTIMATE - 36))
                            | (1 << (jqlParser.F_REPORTER - 36))
                            | (1 << (jqlParser.F_REQUEST_CHANNEL_TYPE - 36))
                            | (1 << (jqlParser.F_REQUEST_LAST_ACTIVITY_TIME - 36))
                            | (1 << (jqlParser.F_RESOLUTION - 36))
                            | (1 << (jqlParser.F_RESOLUTION_DATE - 36))
                            | (1 << (jqlParser.F_RESOLVED - 36))
                            | (1 << (jqlParser.F_SLA - 36))
                            | (1 << (jqlParser.F_SPRINT - 36))
                            | (1 << (jqlParser.F_STATUS - 36))
                            | (1 << (jqlParser.F_SUMMARY - 36))
                            | (1 << (jqlParser.F_TEXT - 36))
                            | (1 << (jqlParser.F_TIME_SPENT - 36))
                            | (1 << (jqlParser.F_TYPE - 36))
                            | (1 << (jqlParser.F_UPDATED - 36))
                            | (1 << (jqlParser.F_USER - 36))
                            | (1 << (jqlParser.F_VERSION - 36))
                            | (1 << (jqlParser.F_VOTER - 36))
                            | (1 << (jqlParser.F_VOTES - 36))
                            | (1 << (jqlParser.F_WATCHER - 36))
                            | (1 << (jqlParser.F_WATCHERS - 36))
                            | (1 << (jqlParser.F_WORK_RATIO - 36))
                        )
                    )
                    != 0
                )
            ):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class Compare_datesContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def dates(self):
            return self.getTypedRuleContext(jqlParser.DatesContext, 0)

        def K_ON(self):
            return self.getToken(jqlParser.K_ON, 0)

        def K_AFTER(self):
            return self.getToken(jqlParser.K_AFTER, 0)

        def K_BEFORE(self):
            return self.getToken(jqlParser.K_BEFORE, 0)

        def getRuleIndex(self):
            return jqlParser.RULE_compare_dates

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterCompare_dates"):
                listener.enterCompare_dates(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitCompare_dates"):
                listener.exitCompare_dates(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitCompare_dates"):
                return visitor.visitCompare_dates(self)
            else:
                return visitor.visitChildren(self)

    def compare_dates(self):

        localctx = jqlParser.Compare_datesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_compare_dates)
        self._la = 0  # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 187
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if ((_la) & ~0x3F) == 0 and (
                (1 << _la) & ((1 << jqlParser.K_AFTER) | (1 << jqlParser.K_BEFORE) | (1 << jqlParser.K_ON))
            ) != 0:
                self.state = 186
                _la = self._input.LA(1)
                if not (
                    (
                        ((_la) & ~0x3F) == 0
                        and (
                            (1 << _la) & ((1 << jqlParser.K_AFTER) | (1 << jqlParser.K_BEFORE) | (1 << jqlParser.K_ON))
                        )
                        != 0
                    )
                ):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()

            self.state = 189
            self.dates()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class DatesContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def DATETIME(self):
            return self.getToken(jqlParser.DATETIME, 0)

        def getRuleIndex(self):
            return jqlParser.RULE_dates

        def enterRule(self, listener: ParseTreeListener):
            if hasattr(listener, "enterDates"):
                listener.enterDates(self)

        def exitRule(self, listener: ParseTreeListener):
            if hasattr(listener, "exitDates"):
                listener.exitDates(self)

        def accept(self, visitor: ParseTreeVisitor):
            if hasattr(visitor, "visitDates"):
                return visitor.visitDates(self)
            else:
                return visitor.visitChildren(self)

    def dates(self):

        localctx = jqlParser.DatesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_dates)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 191
            self.match(jqlParser.DATETIME)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx
